diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 2d1715655..e3f7d7107 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -715,6 +715,9 @@ def parse_options(): if IS_WINDOWS: # Installing under Windows doesn't make sense as the install prefix is used # but that doesn't make sense under Windows + # CMW: It makes perfectly good sense; the prefix is Python's sys.prefix, + # i.e., something along the lines of C:\Python\... At the moment we are not + # sure whether we would want to install libz3.dll into that directory though. PYTHON_INSTALL_ENABLED = False else: if not PYTHON_PACKAGE_DIR.startswith(PREFIX): @@ -1352,21 +1355,19 @@ class PythonInstallComponent(Component): if not PYTHON_INSTALL_ENABLED: return - if self.is_osx_hack(): - # Use full path that is outside of install prefix + if IS_WINDOWS or IS_OSX: + # Use full path that is possibly outside of install prefix self.pythonPkgDir = PYTHON_PACKAGE_DIR - self.in_prefix_install = False + self.in_prefix_install = PYTHON_PACKAGE_DIR.startswith(PREFIX) assert os.path.isabs(self.pythonPkgDir) else: - # Use path inside the prefix (should be the normal case) + # Use path inside the prefix (should be the normal case on Linux) + # CMW: Also normal on *BSD? assert PYTHON_PACKAGE_DIR.startswith(PREFIX) self.pythonPkgDir = strip_path_prefix(PYTHON_PACKAGE_DIR, PREFIX) assert not os.path.isabs(self.pythonPkgDir) assert self.in_prefix_install - def is_osx_hack(self): - return IS_OSX and not PYTHON_PACKAGE_DIR.startswith(PREFIX) - def main_component(self): return False