From 0d28978a4870880193ee3e4d5242a42cd729b641 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 1 Aug 2020 19:32:50 +0200 Subject: [PATCH] Reuse py build dir in build script to speed up builds --- nix/build-all.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nix/build-all.py b/nix/build-all.py index 00fa49f17f..b9a100f672 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -748,10 +748,15 @@ if "IfcOpenShell-Python" in targets: for PYTHON_VERSION, _, TAG in PYTHON_VERSION_CONFS(): logger.info("\rConfiguring python {PYTHON_VERSION}{TAG} wrapper...".format(**locals())) - python_dir = os.path.join(IFCOS_DIR, "python-{PYTHON_VERSION}{TAG}".format(**locals())) + # python_dir = os.path.join(IFCOS_DIR, "python-{PYTHON_VERSION}{TAG}".format(**locals())) + python_dir = os.path.join(IFCOS_DIR, "pythonwrapper") if not os.path.exists(python_dir): os.makedirs(python_dir) + cache_path = os.path.join(python_dir, "CMakeCache.txt") + if os.path.exists(cache_path): + os.unlink(cache_path) + PYTHON_LIBRARY=run([bash, "-c", "ls {DEPS_DIR}/install/python-{PYTHON_VERSION}{TAG}/lib/libpython*.*".format(**locals())]) PYTHON_INCLUDE=run([bash, "-c", "ls -d {DEPS_DIR}/install/python-{PYTHON_VERSION}{TAG}/include/python*".format(**locals())]) PYTHON_EXECUTABLE=os.path.join(DEPS_DIR, "install", "python-{PYTHON_VERSION}{TAG}".format(**locals()), "bin", "python{PYTHON_VERSION[0]}".format(**locals()))