diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2022-06-08 22:33:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 07:33:56 +0200 |
commit | 57822d3014f05d595bc7d6b71c048e4034f5247f (patch) | |
tree | 5aa02edad9fc66944e121c8592300a276c34f913 /var | |
parent | 3fdb3f832af56a4afc38da1691fff3ca6596bf20 (diff) | |
download | spack-57822d3014f05d595bc7d6b71c048e4034f5247f.tar.gz spack-57822d3014f05d595bc7d6b71c048e4034f5247f.tar.bz2 spack-57822d3014f05d595bc7d6b71c048e4034f5247f.tar.xz spack-57822d3014f05d595bc7d6b71c048e4034f5247f.zip |
clingo: fix ~python build (#30824)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/clingo/package.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/clingo/package.py b/var/spack/repos/builtin/packages/clingo/package.py index 2f32df4536..01438c1a3b 100644 --- a/var/spack/repos/builtin/packages/clingo/package.py +++ b/var/spack/repos/builtin/packages/clingo/package.py @@ -86,15 +86,19 @@ class Clingo(CMakePackage): except UnsupportedCompilerFlag: InstallError('clingo requires a C++14-compliant C++ compiler') - args = [ - '-DCLINGO_REQUIRE_PYTHON=ON', - '-DCLINGO_BUILD_WITH_PYTHON=ON', - '-DPYCLINGO_USER_INSTALL=OFF', - '-DPYCLINGO_USE_INSTALL_PREFIX=ON', - '-DCLINGO_BUILD_WITH_LUA=OFF', - self.cmake_py_shared - ] - if self.spec['cmake'].satisfies('@3.16.0:'): - args += self.cmake_python_hints + args = ['-DCLINGO_BUILD_WITH_LUA=OFF'] + + if '+python' in self.spec: + args += [ + '-DCLINGO_REQUIRE_PYTHON=ON', + '-DCLINGO_BUILD_WITH_PYTHON=ON', + '-DPYCLINGO_USER_INSTALL=OFF', + '-DPYCLINGO_USE_INSTALL_PREFIX=ON', + self.cmake_py_shared + ] + if self.spec['cmake'].satisfies('@3.16.0:'): + args += self.cmake_python_hints + else: + args += ['-DCLINGO_BUILD_WITH_PYTHON=OFF'] return args |