.PHONY: regen-limited-abi
regen-limited-abi: all
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/stable_abi.py --generate-all $(srcdir)/Misc/stable_abi.toml
+ $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/stable_abi.py --generate-all
############################################################################
# Regenerate Unicode Data
.PHONY: check-limited-abi
check-limited-abi: all
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/stable_abi.py --all $(srcdir)/Misc/stable_abi.toml
+ $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/stable_abi.py --all
.PHONY: update-config
update-config:
import csv
SCRIPT_NAME = 'Tools/build/stable_abi.py'
+DEFAULT_MANIFEST_PATH = (
+ Path(__file__).parent / '../../Misc/stable_abi.toml').resolve()
MISSING = object()
EXCLUDED_HEADERS = {
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument(
- "file", type=Path, metavar='FILE',
- help="file with the stable abi manifest",
+ "file", type=Path, metavar='FILE', nargs='?',
+ default=DEFAULT_MANIFEST_PATH,
+ help=f"file with the stable abi manifest (default: {DEFAULT_MANIFEST_PATH})",
)
parser.add_argument(
"--generate", action='store_true',
if args.list:
for gen in generators:
- print(f'{gen.arg_name}: {base_path / gen.default_path}')
+ print(f'{gen.arg_name}: {(base_path / gen.default_path).resolve()}')
sys.exit(0)
run_all_generators = args.generate_all
if not results:
if args.generate:
- parser.error('No file specified. Use --help for usage.')
- parser.error('No check specified. Use --help for usage.')
+ parser.error('No file specified. Use --generate-all to regenerate '
+ + 'all files, or --help for usage.')
+ parser.error('No check specified. Use --all to check all files, '
+ + 'or --help for usage.')
failed_results = [name for name, result in results.items() if not result]