diff options
author | Ethan Stam <33101855+EthanS94@users.noreply.github.com> | 2021-06-22 12:20:09 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 11:20:09 -0700 |
commit | 09a6f3533b7e1a0cbc8b6b65ce4cd36ef736e043 (patch) | |
tree | 7e6789fc4a49bed35673522913f10bfccd27be8d /var | |
parent | e4c38ba14c0430036bf20813c2b28e829f734237 (diff) | |
download | spack-09a6f3533b7e1a0cbc8b6b65ce4cd36ef736e043.tar.gz spack-09a6f3533b7e1a0cbc8b6b65ce4cd36ef736e043.tar.bz2 spack-09a6f3533b7e1a0cbc8b6b65ce4cd36ef736e043.tar.xz spack-09a6f3533b7e1a0cbc8b6b65ce4cd36ef736e043.zip |
z3: set CMAKE_INSTALL_PYTHON_PKG_DIR for +python build (#24470)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/z3/package.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/z3/package.py b/var/spack/repos/builtin/packages/z3/package.py index fe1aec86ad..fa434f00ce 100644 --- a/var/spack/repos/builtin/packages/z3/package.py +++ b/var/spack/repos/builtin/packages/z3/package.py @@ -35,9 +35,20 @@ class Z3(CMakePackage): build_directory = 'build' def cmake_args(self): + spec = self.spec + args = [ self.define_from_variant('Z3_USE_LIB_GMP', 'gmp'), self.define_from_variant('Z3_BUILD_PYTHON_BINDINGS', 'python'), self.define_from_variant('Z3_INSTALL_PYTHON_BINDINGS', 'python') ] + + if spec.satisfies('+python'): + args.append( + self.define('CMAKE_INSTALL_PYTHON_PKG_DIR', join_path( + prefix.lib, + 'python%s' % spec['python'].version.up_to(2), + 'site-packages')) + ) + return args |