clingo-bootstrap: force setuptools through variant (#40866)
This commit is contained in:
parent
70171d6caf
commit
668a5b45e5
3 changed files with 14 additions and 0 deletions
3
.github/workflows/bootstrap.yml
vendored
3
.github/workflows/bootstrap.yml
vendored
|
@ -159,6 +159,9 @@ jobs:
|
||||||
brew install cmake bison@2.7 tree
|
brew install cmake bison@2.7 tree
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
||||||
|
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
- name: Bootstrap clingo
|
- name: Bootstrap clingo
|
||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
|
|
|
@ -291,6 +291,10 @@ def try_import(self, module: str, abstract_spec_str: str) -> bool:
|
||||||
with spack_python_interpreter():
|
with spack_python_interpreter():
|
||||||
# Add hint to use frontend operating system on Cray
|
# Add hint to use frontend operating system on Cray
|
||||||
concrete_spec = spack.spec.Spec(abstract_spec_str + " ^" + spec_for_current_python())
|
concrete_spec = spack.spec.Spec(abstract_spec_str + " ^" + spec_for_current_python())
|
||||||
|
# This is needed to help the old concretizer taking the `setuptools` dependency
|
||||||
|
# only when bootstrapping from sources on Python 3.12
|
||||||
|
if spec_for_current_python() == "python@3.12":
|
||||||
|
concrete_spec.constrain("+force_setuptools")
|
||||||
|
|
||||||
if module == "clingo":
|
if module == "clingo":
|
||||||
# TODO: remove when the old concretizer is deprecated # pylint: disable=fixme
|
# TODO: remove when the old concretizer is deprecated # pylint: disable=fixme
|
||||||
|
|
|
@ -32,6 +32,13 @@ class ClingoBootstrap(Clingo):
|
||||||
description="Enable a series of Spack-specific optimizations (PGO, LTO, mimalloc)",
|
description="Enable a series of Spack-specific optimizations (PGO, LTO, mimalloc)",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
variant(
|
||||||
|
"force_setuptools",
|
||||||
|
default=False,
|
||||||
|
description="Force a dependency on setuptools to help the old concretizer",
|
||||||
|
)
|
||||||
|
depends_on("py-setuptools", type="build", when="+force_setuptools")
|
||||||
|
|
||||||
# Enable LTO
|
# Enable LTO
|
||||||
conflicts("~ipo", when="+optimized")
|
conflicts("~ipo", when="+optimized")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue