mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 22:23:22 +00:00
parent
c2ab9b72dc
commit
ea218da2c4
1 changed files with 8 additions and 7 deletions
|
@ -715,6 +715,9 @@ def parse_options():
|
||||||
if IS_WINDOWS:
|
if IS_WINDOWS:
|
||||||
# Installing under Windows doesn't make sense as the install prefix is used
|
# Installing under Windows doesn't make sense as the install prefix is used
|
||||||
# but that doesn't make sense under Windows
|
# 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
|
PYTHON_INSTALL_ENABLED = False
|
||||||
else:
|
else:
|
||||||
if not PYTHON_PACKAGE_DIR.startswith(PREFIX):
|
if not PYTHON_PACKAGE_DIR.startswith(PREFIX):
|
||||||
|
@ -1352,21 +1355,19 @@ class PythonInstallComponent(Component):
|
||||||
if not PYTHON_INSTALL_ENABLED:
|
if not PYTHON_INSTALL_ENABLED:
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.is_osx_hack():
|
if IS_WINDOWS or IS_OSX:
|
||||||
# Use full path that is outside of install prefix
|
# Use full path that is possibly outside of install prefix
|
||||||
self.pythonPkgDir = PYTHON_PACKAGE_DIR
|
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)
|
assert os.path.isabs(self.pythonPkgDir)
|
||||||
else:
|
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)
|
assert PYTHON_PACKAGE_DIR.startswith(PREFIX)
|
||||||
self.pythonPkgDir = strip_path_prefix(PYTHON_PACKAGE_DIR, PREFIX)
|
self.pythonPkgDir = strip_path_prefix(PYTHON_PACKAGE_DIR, PREFIX)
|
||||||
assert not os.path.isabs(self.pythonPkgDir)
|
assert not os.path.isabs(self.pythonPkgDir)
|
||||||
assert self.in_prefix_install
|
assert self.in_prefix_install
|
||||||
|
|
||||||
def is_osx_hack(self):
|
|
||||||
return IS_OSX and not PYTHON_PACKAGE_DIR.startswith(PREFIX)
|
|
||||||
|
|
||||||
def main_component(self):
|
def main_component(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue