From f7d9a5ba935163ddefd3e1883878556d713d6fee Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Wed, 13 Dec 2023 19:32:00 -0800 Subject: [PATCH] Revert "Disable Python compilation cache during build (#7052)" (#7054) This reverts commit 8293be859f0b8eb4c2b818f245c912864e79bde0. --- scripts/mk_util.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 90271321b..0728c2cb7 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -2994,16 +2994,9 @@ def cp_z3py_to_build(): for f in files: if f.endswith('.pyc'): rmf(os.path.join(root, f)) - # We do not want a second copy of the compiled files in the system-wide cache, - # so we disable it temporarily. This is an issue with recent versions of MacOS - # where XCode's Python has a cache, but the build scripts don't have access to - # it (e.g. during OPAM package installation). - pycache_prefix_before = sys.pycache_prefix - sys.pycache_prefix = None # Compile Z3Py files if compileall.compile_dir(z3py_src, force=1) != 1: raise MKException("failed to compile Z3Py sources") - sys.pycache_prefix = pycache_prefix_before if is_verbose: print("Generated python bytecode") # Copy sources to build