summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-06-08 22:33:56 -0700
committerGitHub <noreply@github.com>2022-06-09 07:33:56 +0200
commit57822d3014f05d595bc7d6b71c048e4034f5247f (patch)
tree5aa02edad9fc66944e121c8592300a276c34f913
parent3fdb3f832af56a4afc38da1691fff3ca6596bf20 (diff)
downloadspack-57822d3014f05d595bc7d6b71c048e4034f5247f.tar.gz
spack-57822d3014f05d595bc7d6b71c048e4034f5247f.tar.bz2
spack-57822d3014f05d595bc7d6b71c048e4034f5247f.tar.xz
spack-57822d3014f05d595bc7d6b71c048e4034f5247f.zip
clingo: fix ~python build (#30824)
-rw-r--r--.github/workflows/bootstrap.yml1
-rw-r--r--var/spack/repos/builtin/packages/clingo/package.py24
2 files changed, 15 insertions, 10 deletions
diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index fce8c81d1f..4aeb013a56 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -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/**'
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