fix(01): keep bundled Python commands from writing bytecode caches
This commit is contained in:
1 parent
23ee1c2e47
commit
2fe8b40ea5
5 files changed
+22
No files matched your search
@@ -9,6 +9,10 @@ import hashlib
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# A bundled CLI must not create bytecode inside the sealed checkpoint.
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.dont_write_bytecode = True
|
||||||
|
|
||||||
from fidelity_checkpoint import MATERIALS, PROJECT, _package, preflight
|
from fidelity_checkpoint import MATERIALS, PROJECT, _package, preflight
|
||||||
from fidelity_receipts import (audit_scenarios, canonical_bytes, contained_path,
|
from fidelity_receipts import (audit_scenarios, canonical_bytes, contained_path,
|
||||||
identify_file, identify_tree, read_json, read_receipt, validate_receipt,
|
identify_file, identify_tree, read_json, read_receipt, validate_receipt,
|
||||||
|
|||||||
@@ -17,9 +17,14 @@ import re
|
|||||||
import shutil
|
import shutil
|
||||||
import signal
|
import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
# A bundled CLI must not create bytecode inside the sealed checkpoint.
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.dont_write_bytecode = True
|
||||||
|
|
||||||
from fidelity_checkpoint import _package
|
from fidelity_checkpoint import _package
|
||||||
from fidelity_receipts import (MAX_JSON_BYTES, _id, _write_json, canonical_bytes,
|
from fidelity_receipts import (MAX_JSON_BYTES, _id, _write_json, canonical_bytes,
|
||||||
contained_path, identify_file, import_receipt, read_json, separated_roots,
|
contained_path, identify_file, import_receipt, read_json, separated_roots,
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
# A bundled CLI must not create bytecode inside the sealed checkpoint.
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.dont_write_bytecode = True
|
||||||
|
|
||||||
from fidelity_receipts import (canonical_bytes, contained_path, identify_file,
|
from fidelity_receipts import (canonical_bytes, contained_path, identify_file,
|
||||||
identify_tree, read_json, relative_name, separated_roots, source_identity,
|
identify_tree, read_json, relative_name, separated_roots, source_identity,
|
||||||
utc_now, validate_receipt, validate_scenario_contract, verify_inventory,
|
utc_now, validate_receipt, validate_scenario_contract, verify_inventory,
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
|
|
||||||
|
# A bundled CLI must not create bytecode inside the sealed checkpoint.
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.dont_write_bytecode = True
|
||||||
|
|
||||||
from fidelity_receipts import (KINDS, MAX_JSON_BYTES, canonical_bytes, contained_path,
|
from fidelity_receipts import (KINDS, MAX_JSON_BYTES, canonical_bytes, contained_path,
|
||||||
identify_file, read_json, validate_receipt)
|
identify_file, read_json, validate_receipt)
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,14 @@ from pathlib import Path
|
|||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
from urllib.parse import quote, unquote, urlsplit
|
from urllib.parse import quote, unquote, urlsplit
|
||||||
|
|
||||||
|
# A bundled CLI must not create bytecode inside the sealed checkpoint.
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.dont_write_bytecode = True
|
||||||
|
|
||||||
from fidelity_receipts import (MAX_JSON_BYTES, canonical_bytes, contained_path,
|
from fidelity_receipts import (MAX_JSON_BYTES, canonical_bytes, contained_path,
|
||||||
identify_file, read_json, read_receipt, separated_roots,
|
identify_file, read_json, read_receipt, separated_roots,
|
||||||
validate_receipt)
|
validate_receipt)
|
||||||
|
|||||||
Reference in new issue
Block a user