"""Verify the frozen import or a precisely recorded, issue-linked downstream tree.""" import argparse import json from pathlib import Path import sys sys.dont_write_bytecode = True from source_provenance import verify_source parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('--require-tracked', action='store_true', help='Also verify source blobs and provenance records against the Git index.') args = parser.parse_args() try: print(json.dumps(verify_source(Path(__file__).resolve().parents[1], args.require_tracked), indent=2)) except (ValueError, OSError) as error: parser.exit(1, f'Source verification failed: {error}\n')