From 02783d0bfba4cc6b424651327baefd0b8761aa38 Mon Sep 17 00:00:00 2001 From: Andrew Dutcher Date: Wed, 14 Sep 2016 01:10:44 -0700 Subject: [PATCH] Minor tweaks to make things more reliable/less obnoxious --- scripts/mk_util.py | 2 +- src/api/python/.gitignore | 1 + src/api/python/setup.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index eca0c4738..305f94609 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -1299,7 +1299,7 @@ class DLLComponent(Component): if IS_WINDOWS or IS_OSX: out.write('\n\tcp %s %s' % (self.dll_file(), self.staging_link)) else: - out.write('\n\tln -s %s %s' % (os.path.join(reverse_path(self.staging_link), self.dll_file()), self.staging_link)) + out.write('\n\tln -f -s %s %s' % (os.path.join(reverse_path(self.staging_link), self.dll_file()), self.staging_link)) out.write('\n') if self.static: if IS_WINDOWS: diff --git a/src/api/python/.gitignore b/src/api/python/.gitignore index a0a01631f..86e4bc9ce 100644 --- a/src/api/python/.gitignore +++ b/src/api/python/.gitignore @@ -5,3 +5,4 @@ build *.egg-info bin z3/lib +z3/include diff --git a/src/api/python/setup.py b/src/api/python/setup.py index 6ccd45c60..a43ded92e 100644 --- a/src/api/python/setup.py +++ b/src/api/python/setup.py @@ -41,6 +41,9 @@ def _clean_bins(): shutil.rmtree(HEADERS_DIR, ignore_errors=True) def _configure_z3(): + # bail out early if we don't need to do this - it forces a rebuild every time otherwise + if os.path.exists(BUILD_DIR): + return args = [sys.executable, os.path.join(SRC_DIR, 'scripts', 'mk_make.py')] if sys.platform == 'win32' and platform.architecture()[0] == '64bit':