mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 18:05:21 +00:00
Merge pull request #374 from delcypher/less_agressive_out_of_install_prefix_warnings
Make warnings when installing Python bindings on OSX that are outside the install prefix less aggressive
This commit is contained in:
commit
bb55744fc0
|
@ -3529,7 +3529,7 @@ class MakeRuleCmd(object):
|
|||
return "$(DESTDIR)$(PREFIX)/"
|
||||
|
||||
@classmethod
|
||||
def _install_root(cls, path, in_prefix, out):
|
||||
def _install_root(cls, path, in_prefix, out, is_install=True):
|
||||
if in_prefix:
|
||||
assert not os.path.isabs(path)
|
||||
install_root = cls.install_root()
|
||||
|
@ -3541,7 +3541,11 @@ class MakeRuleCmd(object):
|
|||
assert IS_OSX
|
||||
assert os.path.isabs(path)
|
||||
install_root = "$(DESTDIR)"
|
||||
cls.write_cmd(out, 'echo "WARNING: {} is not in the install prefix. This will likely lead to a broken installation."'.format(path))
|
||||
action_string = 'install' if is_install else 'uninstall'
|
||||
cls.write_cmd(out, 'echo "WARNING: {}ing files/directories ({}) that are not in the install prefix ($(PREFIX))."'.format(
|
||||
action_string, path))
|
||||
print("WARNING: Generating makefile rule that {}s {} '{}' which is outside the installation prefix '{}'.".format(
|
||||
action_string, 'to' if is_install else 'from', path, PREFIX))
|
||||
return install_root
|
||||
|
||||
@classmethod
|
||||
|
@ -3564,7 +3568,7 @@ class MakeRuleCmd(object):
|
|||
assert len(pattern) > 0
|
||||
assert isinstance(pattern, str)
|
||||
assert not ' ' in pattern
|
||||
install_root = cls._install_root(pattern, in_prefix, out)
|
||||
install_root = cls._install_root(pattern, in_prefix, out, is_install=False)
|
||||
|
||||
cls.write_cmd(out, "rm -f {install_root}{pattern}".format(
|
||||
install_root=install_root,
|
||||
|
|
Loading…
Reference in a new issue