clingo: fix ~python build (#30824)

This commit is contained in:
Adam J. Stewart 2022-06-08 22:33:56 -07:00 committed by GitHub
parent 3fdb3f832a
commit 57822d3014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 10 deletions

View file

@ -12,6 +12,7 @@ on:
# built-in repository or documentation
- 'var/spack/repos/builtin/**'
- '!var/spack/repos/builtin/packages/clingo-bootstrap/**'
- '!var/spack/repos/builtin/packages/clingo/**'
- '!var/spack/repos/builtin/packages/python/**'
- '!var/spack/repos/builtin/packages/re2c/**'
- 'lib/spack/docs/**'

View file

@ -86,15 +86,19 @@ def cmake_args(self):
except UnsupportedCompilerFlag:
InstallError('clingo requires a C++14-compliant C++ compiler')
args = [
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',
'-DCLINGO_BUILD_WITH_LUA=OFF',
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