environment spec lists: improve ability to query architecture in when clauses (#17056)

This commit is contained in:
Greg Becker
2020-06-25 12:13:26 -05:00
committed by GitHub
parent e04c89f086
commit f936e3a1db
3 changed files with 34 additions and 5 deletions

View File

@@ -647,7 +647,7 @@ named list ``compilers`` is ``['%gcc', '%clang', '%intel']`` on
spack:
definitions:
- compilers: ['%gcc', '%clang']
- when: target == 'x86_64'
- when: arch.satisfies('x86_64:')
compilers: ['%intel']
.. note::
@@ -666,8 +666,12 @@ The valid variables for a ``when`` clause are:
#. ``target``. The target string of the default Spack
architecture on the system.
#. ``architecture`` or ``arch``. The full string of the
default Spack architecture on the system.
#. ``architecture`` or ``arch``. A Spack spec satisfying the default Spack
architecture on the system. This supports querying via the ``satisfies``
method, as shown above.
#. ``arch_str``. The architecture string of the default Spack architecture
on the system.
#. ``re``. The standard regex module in Python.