From 4c05fe569c257d7615c85898bb2b31f680c6d2dd Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 6 Dec 2022 11:54:02 +0100 Subject: Bootstrap most of Spack dependencies using environments (#34029) This commit reworks the bootstrapping procedure to use Spack environments as much as possible. The `spack.bootstrap` module has also been reorganized into a Python package. A distinction is made among "core" Spack dependencies (clingo, GnuPG, patchelf) and other dependencies. For a number of reasons, explained in the `spack.bootstrap.core` module docstring, "core" dependencies are bootstrapped with the current ad-hoc method. All the other dependencies are instead bootstrapped using a Spack environment that lives in a directory specific to the interpreter and the architecture being used. --- share/spack/spack-completion.bash | 2 +- share/spack/templates/bootstrap/spack.yaml | 34 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 share/spack/templates/bootstrap/spack.yaml (limited to 'share') diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index b66f4cb1aa..5c90b1b5f3 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -408,7 +408,7 @@ _spack_bootstrap() { } _spack_bootstrap_now() { - SPACK_COMPREPLY="-h --help" + SPACK_COMPREPLY="-h --help --dev" } _spack_bootstrap_status() { diff --git a/share/spack/templates/bootstrap/spack.yaml b/share/spack/templates/bootstrap/spack.yaml new file mode 100644 index 0000000000..4573bb485e --- /dev/null +++ b/share/spack/templates/bootstrap/spack.yaml @@ -0,0 +1,34 @@ +# This environment contains Spack non-core dependencies for the +# following configuration +# +# Python spec: {{ python_spec }} +# Python interpreter: {{ python_prefix }} +# Architecture: {{ architecture }} +# +spack: + specs: +{% for spec in environment_specs %} + - "{{ spec }}" +{% endfor %} + view: {{ environment_path }}/view + + config: + install_tree: + root: {{ store_path }} + + packages: + python: + buildable: false + externals: + - spec: "{{ python_spec }}" + prefix: "{{ python_prefix }}" + + py-typed-ast: + require: "+wheel" + + py-platformdirs: + require: "+wheel" + + concretizer: + reuse: false + unify: true -- cgit v1.2.3-60-g2f50