summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2020-01-24 21:16:48 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2020-01-24 21:16:48 -0800
commita57edb7029ef5946d56a59168c1c8e454677871c (patch)
tree0df5be39c860e83fb709e319b77558c292d76dea /var
parent71243f3f7b85ffcd63bf8d54f801fa515458ff07 (diff)
downloadspack-a57edb7029ef5946d56a59168c1c8e454677871c.tar.gz
spack-a57edb7029ef5946d56a59168c1c8e454677871c.tar.bz2
spack-a57edb7029ef5946d56a59168c1c8e454677871c.tar.xz
spack-a57edb7029ef5946d56a59168c1c8e454677871c.zip
configure z3+python to build python libraries in its own prefix (#14604)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/z3/package.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/z3/package.py b/var/spack/repos/builtin/packages/z3/package.py
index 6a47a720a5..bd02c0c0db 100644
--- a/var/spack/repos/builtin/packages/z3/package.py
+++ b/var/spack/repos/builtin/packages/z3/package.py
@@ -22,6 +22,7 @@ class Z3(MakefilePackage):
variant('python', default=False, description='Enable python binding')
depends_on('python', type=('build', 'run'))
+ extends('python', when='+python')
# Referenced: https://github.com/Z3Prover/z3/issues/1016
patch('fix_1016_1.patch', when='@:4.4.1')
@@ -31,9 +32,18 @@ class Z3(MakefilePackage):
def configure_args(self):
spec = self.spec
- return [
- '--python' if '+python' in spec else ''
- ]
+
+ args = []
+
+ if spec.satisfies('+python'):
+ args.append('--python')
+ args.append(
+ '--pypkgdir=%s' % join_path(
+ prefix.lib,
+ 'python%s' % spec['python'].version.up_to(2),
+ 'site-packages'))
+
+ return args
def bootstrap(self, spec, prefix):
options = ['--prefix={0}'.format(prefix)] + self.configure_args()