Compare commits
42 Commits
hs/fix/rep
...
hs/perl/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6866270bcf | ||
|
|
bfc52d6f50 | ||
|
|
0107792a9e | ||
|
|
de6f07094e | ||
|
|
63c60c18c7 | ||
|
|
f01a442ad4 | ||
|
|
cca0eb6873 | ||
|
|
c39725a9e6 | ||
|
|
e58351f421 | ||
|
|
2a028144ba | ||
|
|
22a7419235 | ||
|
|
7e21357045 | ||
|
|
cf7e1643c3 | ||
|
|
158ddf72cf | ||
|
|
9567b13b4f | ||
|
|
f6da60b541 | ||
|
|
3caff2c5a0 | ||
|
|
091a8a4734 | ||
|
|
cfcee7d092 | ||
|
|
c6d04286c5 | ||
|
|
3c3e1c6d30 | ||
|
|
3669f0356b | ||
|
|
dd72df89d6 | ||
|
|
445667adbe | ||
|
|
3ec4797513 | ||
|
|
50e8f6395c | ||
|
|
bf9426a48d | ||
|
|
bf08b1e2c6 | ||
|
|
687137a057 | ||
|
|
6c4c9985d5 | ||
|
|
2927e708bc | ||
|
|
a9d3bd8d7f | ||
|
|
64fc66ab48 | ||
|
|
c86b2860aa | ||
|
|
d991ebbe09 | ||
|
|
3f00eeabd2 | ||
|
|
b77d9b87f8 | ||
|
|
e46dae9eb6 | ||
|
|
760fc05da3 | ||
|
|
e07503e4ac | ||
|
|
aba8d85b4d | ||
|
|
546625cdb8 |
1
.github/workflows/import-check.yaml
vendored
1
.github/workflows/import-check.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
||||
jobs:
|
||||
# Check we don't make the situation with circular imports worse
|
||||
import-check:
|
||||
continue-on-error: true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: julia-actions/setup-julia@v2
|
||||
|
||||
2
.github/workflows/sync-packages.yaml
vendored
2
.github/workflows/sync-packages.yaml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
run: |
|
||||
cd spack-packages
|
||||
git-filter-repo --quiet --source ../spack \
|
||||
--subdirectory-filter var/spack/repos \
|
||||
--path var/spack/repos/ --path-rename var/spack/repos/:python/ \
|
||||
--path share/spack/gitlab/cloud_pipelines/ --path-rename share/spack/gitlab/cloud_pipelines/:.ci/gitlab/ \
|
||||
--refs develop
|
||||
- name: Push
|
||||
|
||||
@@ -276,7 +276,7 @@ remove dependent packages *before* removing their dependencies or use the
|
||||
Garbage collection
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
When Spack builds software from sources, if often installs tools that are needed
|
||||
When Spack builds software from sources, it often installs tools that are needed
|
||||
just to build or test other software. These are not necessary at runtime.
|
||||
To support cases where removing these tools can be a benefit Spack provides
|
||||
the ``spack gc`` ("garbage collector") command, which will uninstall all unneeded packages:
|
||||
|
||||
@@ -89,7 +89,7 @@ You can see that the mirror is added with ``spack mirror list`` as follows:
|
||||
spack-public https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/
|
||||
|
||||
|
||||
At this point, you've create a buildcache, but spack hasn't indexed it, so if
|
||||
At this point, you've created a buildcache, but Spack hasn't indexed it, so if
|
||||
you run ``spack buildcache list`` you won't see any results. You need to index
|
||||
this new build cache as follows:
|
||||
|
||||
@@ -318,7 +318,7 @@ other system dependencies. However, they are still compatible with tools like
|
||||
``skopeo``, ``podman``, and ``docker`` for pulling and pushing.
|
||||
|
||||
.. note::
|
||||
The docker ``overlayfs2`` storage driver is limited to 128 layers, above which a
|
||||
The Docker ``overlayfs2`` storage driver is limited to 128 layers, above which a
|
||||
``max depth exceeded`` error may be produced when pulling the image. There
|
||||
are `alternative drivers <https://docs.docker.com/storage/storagedriver/>`_.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ is an entire command dedicated to the management of every aspect of bootstrappin
|
||||
|
||||
.. command-output:: spack bootstrap --help
|
||||
|
||||
Spack is configured to bootstrap its dependencies lazily by default; i.e. the first time they are needed and
|
||||
Spack is configured to bootstrap its dependencies lazily by default; i.e., the first time they are needed and
|
||||
can't be found. You can readily check if any prerequisite for using Spack is missing by running:
|
||||
|
||||
.. code-block:: console
|
||||
@@ -36,8 +36,8 @@ can't be found. You can readily check if any prerequisite for using Spack is mis
|
||||
|
||||
In the case of the output shown above Spack detected that both ``clingo`` and ``gnupg``
|
||||
are missing and it's giving detailed information on why they are needed and whether
|
||||
they can be bootstrapped. The return code of this command summarizes the results, if any
|
||||
dependencies are missing the return code is ``1``, otherwise ``0``. Running a command that
|
||||
they can be bootstrapped. The return code of this command summarizes the results; if any
|
||||
dependencies are missing, the return code is ``1``, otherwise ``0``. Running a command that
|
||||
concretizes a spec, like:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@@ -228,7 +228,7 @@ def setup(sphinx):
|
||||
("py:class", "spack.install_test.Pb"),
|
||||
("py:class", "spack.filesystem_view.SimpleFilesystemView"),
|
||||
("py:class", "spack.traverse.EdgeAndDepth"),
|
||||
("py:class", "archspec.cpu.microarchitecture.Microarchitecture"),
|
||||
("py:class", "_vendoring.archspec.cpu.microarchitecture.Microarchitecture"),
|
||||
("py:class", "spack.compiler.CompilerCache"),
|
||||
# TypeVar that is not handled correctly
|
||||
("py:class", "llnl.util.lang.T"),
|
||||
|
||||
@@ -148,8 +148,8 @@ this can expose you to attacks. Use at your own risk.
|
||||
``ssl_certs``
|
||||
--------------------
|
||||
|
||||
Path to custom certificats for SSL verification. The value can be a
|
||||
filesytem path, or an environment variable that expands to an absolute file path.
|
||||
Path to custom certificates for SSL verification. The value can be a
|
||||
filesystem path, or an environment variable that expands to an absolute file path.
|
||||
The default value is set to the environment variable ``SSL_CERT_FILE``
|
||||
to use the same syntax used by many other applications that automatically
|
||||
detect custom certificates.
|
||||
|
||||
@@ -11,7 +11,7 @@ Container Images
|
||||
Spack :ref:`environments` can easily be turned into container images. This page
|
||||
outlines two ways in which this can be done:
|
||||
|
||||
1. By installing the environment on the host system, and copying the installations
|
||||
1. By installing the environment on the host system and copying the installations
|
||||
into the container image. This approach does not require any tools like Docker
|
||||
or Singularity to be installed.
|
||||
2. By generating a Docker or Singularity recipe that can be used to build the
|
||||
@@ -56,8 +56,8 @@ environment roots and its runtime dependencies.
|
||||
|
||||
.. note::
|
||||
|
||||
When using registries like GHCR and Docker Hub, the ``--oci-password`` flag is not
|
||||
the password for your account, but a personal access token you need to generate separately.
|
||||
When using registries like GHCR and Docker Hub, the ``--oci-password`` flag specifies not
|
||||
the password for your account, but rather a personal access token you need to generate separately.
|
||||
|
||||
The specified ``--base-image`` should have a libc that is compatible with the host system.
|
||||
For example if your host system is Ubuntu 20.04, you can use ``ubuntu:20.04``, ``ubuntu:22.04``
|
||||
|
||||
@@ -20,7 +20,7 @@ be present on the machine where Spack is run:
|
||||
:header-rows: 1
|
||||
|
||||
These requirements can be easily installed on most modern Linux systems;
|
||||
on macOS, the Command Line Tools package is required, and a full XCode suite
|
||||
on macOS, the Command Line Tools package is required, and a full Xcode suite
|
||||
may be necessary for some packages such as Qt and apple-gl. Spack is designed
|
||||
to run on HPC platforms like Cray. Not all packages should be expected
|
||||
to work on all platforms.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Modules (modules.yaml)
|
||||
======================
|
||||
|
||||
The use of module systems to manage user environment in a controlled way
|
||||
The use of module systems to manage user environments in a controlled way
|
||||
is a common practice at HPC centers that is sometimes embraced also by
|
||||
individual programmers on their development machines. To support this
|
||||
common practice Spack integrates with `Environment Modules
|
||||
@@ -490,7 +490,7 @@ that are already in the Lmod hierarchy.
|
||||
|
||||
|
||||
.. note::
|
||||
Tcl and Lua modules also allow for explicit conflicts between modulefiles.
|
||||
Tcl and Lua modules also allow for explicit conflicts between module files.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@@ -513,7 +513,7 @@ that are already in the Lmod hierarchy.
|
||||
:meth:`~spack.spec.Spec.format` method.
|
||||
|
||||
For Lmod and Environment Modules versions prior 4.2, it is important to
|
||||
express the conflict on both modulefiles conflicting with each other.
|
||||
express the conflict on both module files conflicting with each other.
|
||||
|
||||
|
||||
.. note::
|
||||
@@ -550,7 +550,7 @@ that are already in the Lmod hierarchy.
|
||||
|
||||
.. warning::
|
||||
Consistency of Core packages
|
||||
The user is responsible for maintining consistency among core packages, as ``core_specs``
|
||||
The user is responsible for maintaining consistency among core packages, as ``core_specs``
|
||||
bypasses the hierarchy that allows Lmod to safely switch between coherent software stacks.
|
||||
|
||||
.. warning::
|
||||
|
||||
@@ -179,7 +179,7 @@ Spack can be found at :ref:`package_class_structure`.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class Foo(CmakePackage):
|
||||
class Foo(CMakePackage):
|
||||
def cmake_args(self):
|
||||
...
|
||||
|
||||
@@ -1212,7 +1212,7 @@ class-level tarball URL and VCS. For example:
|
||||
version("master", branch="master")
|
||||
version("12.12.1", md5="ecd4606fa332212433c98bf950a69cc7")
|
||||
version("12.10.1", md5="667333dbd7c0f031d47d7c5511fd0810")
|
||||
version("12.8.1", "9f37f683ee2b427b5540db8a20ed6b15")
|
||||
version("12.8.1", md5="9f37f683ee2b427b5540db8a20ed6b15")
|
||||
|
||||
If a package contains both a ``url`` and ``git`` class-level attribute,
|
||||
Spack decides which to use based on the arguments to the ``version()``
|
||||
@@ -1343,7 +1343,7 @@ Submodules
|
||||
|
||||
version("1.0.1", tag="v1.0.1", submodules=True)
|
||||
|
||||
If a package has needs more fine-grained control over submodules, define
|
||||
If a package needs more fine-grained control over submodules, define
|
||||
``submodules`` to be a callable function that takes the package instance as
|
||||
its only argument. The function should return a list of submodules to be fetched.
|
||||
|
||||
@@ -2308,31 +2308,19 @@ looks like this:
|
||||
|
||||
parallel = False
|
||||
|
||||
Similarly, you can disable parallel builds only for specific make
|
||||
commands, as ``libdwarf`` does:
|
||||
You can also disable parallel builds only for specific make
|
||||
invocation:
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 9, 12
|
||||
:emphasize-lines: 5
|
||||
:linenos:
|
||||
|
||||
class Libelf(Package):
|
||||
...
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=" + prefix,
|
||||
"--enable-shared",
|
||||
"--disable-dependency-tracking",
|
||||
"--disable-debug")
|
||||
make()
|
||||
|
||||
# The mkdir commands in libelf's install can fail in parallel
|
||||
make("install", parallel=False)
|
||||
|
||||
The first make will run in parallel here, but the second will not. If
|
||||
you set ``parallel`` to ``False`` at the package level, then each call
|
||||
to ``make()`` will be sequential by default, but packagers can call
|
||||
``make(parallel=True)`` to override it.
|
||||
|
||||
Note that the ``--jobs`` option works out of the box for all standard
|
||||
build systems. If you are using a non-standard build system instead, you
|
||||
can use the variable ``make_jobs`` to extract the number of jobs specified
|
||||
@@ -2507,7 +2495,7 @@ necessary when there are breaking changes in the dependency that the
|
||||
package cannot handle. In Spack we often add forward compatibility
|
||||
bounds only at the time a new, breaking version of a dependency is
|
||||
released. As with backward compatibility, it is typical to see a list
|
||||
of forward compatibility bounds in a package file as seperate lines:
|
||||
of forward compatibility bounds in a package file as separate lines:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -3383,7 +3371,7 @@ the above attribute implementations:
|
||||
"/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/lib/libFooBaz.so"
|
||||
])
|
||||
|
||||
# baz library directories in the baz subdirectory of the foo porefix
|
||||
# baz library directories in the baz subdirectory of the foo prefix
|
||||
>>> spec["baz"].libs.directories
|
||||
[
|
||||
"/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/lib"
|
||||
@@ -5740,7 +5728,7 @@ running each executable, ``foo`` and ``bar``, as independent test parts.
|
||||
.. note::
|
||||
|
||||
The method name ``copy_test_files`` here is for illustration purposes.
|
||||
You are free to use a name that is more suited to your package.
|
||||
You are free to use a name that is better suited to your package.
|
||||
|
||||
The key to copying files for stand-alone testing at build time is use
|
||||
of the ``run_after`` directive, which ensures the associated files are
|
||||
@@ -7249,7 +7237,7 @@ which are not, there is the `checked_by` parameter in the license directive:
|
||||
|
||||
license("<license>", when="<when>", checked_by="<github username>")
|
||||
|
||||
When you have validated a github license, either when doing so explicitly or
|
||||
When you have validated a package license, either when doing so explicitly or
|
||||
as part of packaging a new package, please set the `checked_by` parameter
|
||||
to your Github username to signal that the license has been manually
|
||||
verified.
|
||||
|
||||
@@ -214,7 +214,7 @@ package versions, simply run the following commands:
|
||||
|
||||
Running ``spack mark -i --all`` tells Spack to mark all of the existing
|
||||
packages within an environment as "implicitly" installed. This tells
|
||||
spack's garbage collection system that these packages should be cleaned up.
|
||||
Spack's garbage collection system that these packages should be cleaned up.
|
||||
|
||||
Don't worry however, this will not remove your entire environment.
|
||||
Running ``spack install`` will reexamine your spack environment after
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from _pyrsistent_version import *
|
||||
1
lib/spack/external/_vendoring/altgraph.pyi
vendored
1
lib/spack/external/_vendoring/altgraph.pyi
vendored
@@ -1 +0,0 @@
|
||||
from altgraph import *
|
||||
@@ -1,3 +1,3 @@
|
||||
"""Init file to avoid namespace packages"""
|
||||
|
||||
__version__ = "0.2.4"
|
||||
__version__ = "0.2.5"
|
||||
@@ -9,8 +9,8 @@
|
||||
import argparse
|
||||
import typing
|
||||
|
||||
import archspec
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
|
||||
def _make_parser() -> argparse.ArgumentParser:
|
||||
@@ -24,7 +24,7 @@ def _make_parser() -> argparse.ArgumentParser:
|
||||
"-V",
|
||||
help="Show the version and exit.",
|
||||
action="version",
|
||||
version=f"archspec, version {archspec.__version__}",
|
||||
version=f"archspec, version {_vendoring.archspec.__version__}",
|
||||
)
|
||||
parser.add_argument("--help", "-h", help="Show the help and exit.", action="help")
|
||||
|
||||
@@ -45,9 +45,9 @@ def _make_parser() -> argparse.ArgumentParser:
|
||||
|
||||
|
||||
def cpu() -> int:
|
||||
"""Run the `archspec cpu` subcommand."""
|
||||
"""Run the `_vendoring.archspec.cpu` subcommand."""
|
||||
try:
|
||||
print(archspec.cpu.host())
|
||||
print(_vendoring.archspec.cpu.host())
|
||||
except FileNotFoundError as exc:
|
||||
print(exc)
|
||||
return 1
|
||||
@@ -8,9 +8,9 @@
|
||||
import re
|
||||
import warnings
|
||||
|
||||
import archspec
|
||||
import archspec.cpu.alias
|
||||
import archspec.cpu.schema
|
||||
import _vendoring.archspec
|
||||
import _vendoring.archspec.cpu.alias
|
||||
import _vendoring.archspec.cpu.schema
|
||||
|
||||
from .alias import FEATURE_ALIASES
|
||||
from .schema import LazyDictionary
|
||||
@@ -384,7 +384,7 @@ def fill_target_from_dict(name, data, targets):
|
||||
)
|
||||
|
||||
known_targets = {}
|
||||
data = archspec.cpu.schema.TARGETS_JSON["microarchitectures"]
|
||||
data = _vendoring.archspec.cpu.schema.TARGETS_JSON["microarchitectures"]
|
||||
for name in data:
|
||||
if name in known_targets:
|
||||
# name was already brought in as ancestor to a target
|
||||
20
lib/spack/external/_vendoring/archspec/vendor/cpuid/LICENSE
vendored
Normal file
20
lib/spack/external/_vendoring/archspec/vendor/cpuid/LICENSE
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Anders Høst
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
1
lib/spack/external/_vendoring/jsonschema.pyi
vendored
1
lib/spack/external/_vendoring/jsonschema.pyi
vendored
@@ -1 +0,0 @@
|
||||
from jsonschema import *
|
||||
1
lib/spack/external/_vendoring/macholib.pyi
vendored
1
lib/spack/external/_vendoring/macholib.pyi
vendored
@@ -1 +0,0 @@
|
||||
from macholib import *
|
||||
@@ -1,213 +0,0 @@
|
||||
# flake8: noqa: E704
|
||||
# from https://gist.github.com/WuTheFWasThat/091a17d4b5cab597dfd5d4c2d96faf09
|
||||
# Stubs for pyrsistent (Python 3.6)
|
||||
|
||||
from typing import Any
|
||||
from typing import AnyStr
|
||||
from typing import Callable
|
||||
from typing import Iterable
|
||||
from typing import Iterator
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
from typing import Mapping
|
||||
from typing import MutableMapping
|
||||
from typing import Sequence
|
||||
from typing import Set
|
||||
from typing import Union
|
||||
from typing import Tuple
|
||||
from typing import Type
|
||||
from typing import TypeVar
|
||||
from typing import overload
|
||||
|
||||
# see commit 08519aa for explanation of the re-export
|
||||
from pyrsistent.typing import CheckedKeyTypeError as CheckedKeyTypeError
|
||||
from pyrsistent.typing import CheckedPMap as CheckedPMap
|
||||
from pyrsistent.typing import CheckedPSet as CheckedPSet
|
||||
from pyrsistent.typing import CheckedPVector as CheckedPVector
|
||||
from pyrsistent.typing import CheckedType as CheckedType
|
||||
from pyrsistent.typing import CheckedValueTypeError as CheckedValueTypeError
|
||||
from pyrsistent.typing import InvariantException as InvariantException
|
||||
from pyrsistent.typing import PClass as PClass
|
||||
from pyrsistent.typing import PBag as PBag
|
||||
from pyrsistent.typing import PDeque as PDeque
|
||||
from pyrsistent.typing import PList as PList
|
||||
from pyrsistent.typing import PMap as PMap
|
||||
from pyrsistent.typing import PMapEvolver as PMapEvolver
|
||||
from pyrsistent.typing import PSet as PSet
|
||||
from pyrsistent.typing import PSetEvolver as PSetEvolver
|
||||
from pyrsistent.typing import PTypeError as PTypeError
|
||||
from pyrsistent.typing import PVector as PVector
|
||||
from pyrsistent.typing import PVectorEvolver as PVectorEvolver
|
||||
|
||||
T = TypeVar('T')
|
||||
KT = TypeVar('KT')
|
||||
VT = TypeVar('VT')
|
||||
|
||||
def pmap(initial: Union[Mapping[KT, VT], Iterable[Tuple[KT, VT]]] = {}, pre_size: int = 0) -> PMap[KT, VT]: ...
|
||||
def m(**kwargs: VT) -> PMap[str, VT]: ...
|
||||
|
||||
def pvector(iterable: Iterable[T] = ...) -> PVector[T]: ...
|
||||
def v(*iterable: T) -> PVector[T]: ...
|
||||
|
||||
def pset(iterable: Iterable[T] = (), pre_size: int = 8) -> PSet[T]: ...
|
||||
def s(*iterable: T) -> PSet[T]: ...
|
||||
|
||||
# see class_test.py for use cases
|
||||
Invariant = Tuple[bool, Optional[Union[str, Callable[[], str]]]]
|
||||
|
||||
@overload
|
||||
def field(
|
||||
type: Union[Type[T], Sequence[Type[T]]] = ...,
|
||||
invariant: Callable[[Any], Union[Invariant, Iterable[Invariant]]] = lambda _: (True, None),
|
||||
initial: Any = object(),
|
||||
mandatory: bool = False,
|
||||
factory: Callable[[Any], T] = lambda x: x,
|
||||
serializer: Callable[[Any, T], Any] = lambda _, value: value,
|
||||
) -> T: ...
|
||||
# The actual return value (_PField) is irrelevant after a PRecord has been instantiated,
|
||||
# see https://github.com/tobgu/pyrsistent/blob/master/pyrsistent/_precord.py#L10
|
||||
@overload
|
||||
def field(
|
||||
type: Any = ...,
|
||||
invariant: Callable[[Any], Union[Invariant, Iterable[Invariant]]] = lambda _: (True, None),
|
||||
initial: Any = object(),
|
||||
mandatory: bool = False,
|
||||
factory: Callable[[Any], Any] = lambda x: x,
|
||||
serializer: Callable[[Any, Any], Any] = lambda _, value: value,
|
||||
) -> Any: ...
|
||||
|
||||
# Use precise types for the simplest use cases, but fall back to Any for
|
||||
# everything else. See record_test.py for the wide range of possible types for
|
||||
# item_type
|
||||
@overload
|
||||
def pset_field(
|
||||
item_type: Type[T],
|
||||
optional: bool = False,
|
||||
initial: Iterable[T] = ...,
|
||||
) -> PSet[T]: ...
|
||||
@overload
|
||||
def pset_field(
|
||||
item_type: Any,
|
||||
optional: bool = False,
|
||||
initial: Any = (),
|
||||
) -> PSet[Any]: ...
|
||||
|
||||
@overload
|
||||
def pmap_field(
|
||||
key_type: Type[KT],
|
||||
value_type: Type[VT],
|
||||
optional: bool = False,
|
||||
invariant: Callable[[Any], Tuple[bool, Optional[str]]] = lambda _: (True, None),
|
||||
) -> PMap[KT, VT]: ...
|
||||
@overload
|
||||
def pmap_field(
|
||||
key_type: Any,
|
||||
value_type: Any,
|
||||
optional: bool = False,
|
||||
invariant: Callable[[Any], Tuple[bool, Optional[str]]] = lambda _: (True, None),
|
||||
) -> PMap[Any, Any]: ...
|
||||
|
||||
@overload
|
||||
def pvector_field(
|
||||
item_type: Type[T],
|
||||
optional: bool = False,
|
||||
initial: Iterable[T] = ...,
|
||||
) -> PVector[T]: ...
|
||||
@overload
|
||||
def pvector_field(
|
||||
item_type: Any,
|
||||
optional: bool = False,
|
||||
initial: Any = (),
|
||||
) -> PVector[Any]: ...
|
||||
|
||||
def pbag(elements: Iterable[T]) -> PBag[T]: ...
|
||||
def b(*elements: T) -> PBag[T]: ...
|
||||
|
||||
def plist(iterable: Iterable[T] = (), reverse: bool = False) -> PList[T]: ...
|
||||
def l(*elements: T) -> PList[T]: ...
|
||||
|
||||
def pdeque(iterable: Optional[Iterable[T]] = None, maxlen: Optional[int] = None) -> PDeque[T]: ...
|
||||
def dq(*iterable: T) -> PDeque[T]: ...
|
||||
|
||||
@overload
|
||||
def optional(type: T) -> Tuple[T, Type[None]]: ...
|
||||
@overload
|
||||
def optional(*typs: Any) -> Tuple[Any, ...]: ...
|
||||
|
||||
T_PRecord = TypeVar('T_PRecord', bound='PRecord')
|
||||
class PRecord(PMap[AnyStr, Any]):
|
||||
_precord_fields: Mapping
|
||||
_precord_initial_values: Mapping
|
||||
|
||||
def __hash__(self) -> int: ...
|
||||
def __init__(self, **kwargs: Any) -> None: ...
|
||||
def __iter__(self) -> Iterator[Any]: ...
|
||||
def __len__(self) -> int: ...
|
||||
@classmethod
|
||||
def create(
|
||||
cls: Type[T_PRecord],
|
||||
kwargs: Mapping,
|
||||
_factory_fields: Optional[Iterable] = None,
|
||||
ignore_extra: bool = False,
|
||||
) -> T_PRecord: ...
|
||||
# This is OK because T_PRecord is a concrete type
|
||||
def discard(self: T_PRecord, key: KT) -> T_PRecord: ...
|
||||
def remove(self: T_PRecord, key: KT) -> T_PRecord: ...
|
||||
|
||||
def serialize(self, format: Optional[Any] = ...) -> MutableMapping: ...
|
||||
|
||||
# From pyrsistent documentation:
|
||||
# This set function differs slightly from that in the PMap
|
||||
# class. First of all it accepts key-value pairs. Second it accepts multiple key-value
|
||||
# pairs to perform one, atomic, update of multiple fields.
|
||||
@overload
|
||||
def set(self, key: KT, val: VT) -> Any: ...
|
||||
@overload
|
||||
def set(self, **kwargs: VT) -> Any: ...
|
||||
|
||||
def immutable(
|
||||
members: Union[str, Iterable[str]] = '',
|
||||
name: str = 'Immutable',
|
||||
verbose: bool = False,
|
||||
) -> Tuple: ... # actually a namedtuple
|
||||
|
||||
# ignore mypy warning "Overloaded function signatures 1 and 5 overlap with
|
||||
# incompatible return types"
|
||||
@overload
|
||||
def freeze(o: Mapping[KT, VT]) -> PMap[KT, VT]: ... # type: ignore
|
||||
@overload
|
||||
def freeze(o: List[T]) -> PVector[T]: ... # type: ignore
|
||||
@overload
|
||||
def freeze(o: Tuple[T, ...]) -> Tuple[T, ...]: ...
|
||||
@overload
|
||||
def freeze(o: Set[T]) -> PSet[T]: ... # type: ignore
|
||||
@overload
|
||||
def freeze(o: T) -> T: ...
|
||||
|
||||
|
||||
@overload
|
||||
def thaw(o: PMap[KT, VT]) -> MutableMapping[KT, VT]: ... # type: ignore
|
||||
@overload
|
||||
def thaw(o: PVector[T]) -> List[T]: ... # type: ignore
|
||||
@overload
|
||||
def thaw(o: Tuple[T, ...]) -> Tuple[T, ...]: ...
|
||||
# collections.abc.MutableSet is kind of garbage:
|
||||
# https://stackoverflow.com/questions/24977898/why-does-collections-mutableset-not-bestow-an-update-method
|
||||
@overload
|
||||
def thaw(o: PSet[T]) -> Set[T]: ... # type: ignore
|
||||
@overload
|
||||
def thaw(o: T) -> T: ...
|
||||
|
||||
def mutant(fn: Callable) -> Callable: ...
|
||||
|
||||
def inc(x: int) -> int: ...
|
||||
@overload
|
||||
def discard(evolver: PMapEvolver[KT, VT], key: KT) -> None: ...
|
||||
@overload
|
||||
def discard(evolver: PVectorEvolver[T], key: int) -> None: ...
|
||||
@overload
|
||||
def discard(evolver: PSetEvolver[T], key: T) -> None: ...
|
||||
def rex(expr: str) -> Callable[[Any], bool]: ...
|
||||
def ny(_: Any) -> bool: ...
|
||||
|
||||
def get_in(keys: Iterable, coll: Mapping, default: Optional[Any] = None, no_default: bool = False) -> Any: ...
|
||||
1
lib/spack/external/_vendoring/ruamel.pyi
vendored
1
lib/spack/external/_vendoring/ruamel.pyi
vendored
@@ -1 +0,0 @@
|
||||
from ruamel import *
|
||||
@@ -1 +0,0 @@
|
||||
from six import *
|
||||
@@ -1 +0,0 @@
|
||||
from six.moves import *
|
||||
@@ -1 +0,0 @@
|
||||
from six.moves.configparser import *
|
||||
81
lib/spack/external/archspec/README.md
vendored
81
lib/spack/external/archspec/README.md
vendored
@@ -1,81 +0,0 @@
|
||||
[](https://github.com/archspec/archspec/actions)
|
||||
[](https://codecov.io/gh/archspec/archspec)
|
||||
[](https://archspec.readthedocs.io/en/latest/?badge=latest)
|
||||
|
||||
|
||||
# Archspec (Python bindings)
|
||||
|
||||
Archspec aims at providing a standard set of human-understandable labels for
|
||||
various aspects of a system architecture like CPU, network fabrics, etc. and
|
||||
APIs to detect, query and compare them.
|
||||
|
||||
This project grew out of [Spack](https://spack.io/) and is currently under
|
||||
active development. At present it supports APIs to detect and model
|
||||
compatibility relationships among different CPU microarchitectures.
|
||||
|
||||
## Getting started with development
|
||||
|
||||
The `archspec` Python package needs [poetry](https://python-poetry.org/) to
|
||||
be installed from VCS sources. The preferred method to install it is via
|
||||
its custom installer outside of any virtual environment:
|
||||
```console
|
||||
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
|
||||
```
|
||||
You can refer to [Poetry's documentation](https://python-poetry.org/docs/#installation)
|
||||
for further details or for other methods to install this tool. You'll also need `tox`
|
||||
to run unit test:
|
||||
```console
|
||||
$ pip install --user tox
|
||||
```
|
||||
Finally you'll need to clone the repository:
|
||||
```console
|
||||
$ git clone --recursive https://github.com/archspec/archspec.git
|
||||
```
|
||||
|
||||
### Running unit tests
|
||||
Once you have your environment ready you can run `archspec` unit tests
|
||||
using ``tox`` from the root of the repository:
|
||||
```console
|
||||
$ tox
|
||||
[ ... ]
|
||||
py27: commands succeeded
|
||||
py35: commands succeeded
|
||||
py36: commands succeeded
|
||||
py37: commands succeeded
|
||||
py38: commands succeeded
|
||||
pylint: commands succeeded
|
||||
flake8: commands succeeded
|
||||
black: commands succeeded
|
||||
congratulations :)
|
||||
```
|
||||
|
||||
## Citing Archspec
|
||||
|
||||
If you are referencing `archspec` in a publication, please cite the following
|
||||
paper:
|
||||
|
||||
* Massimiliano Culpo, Gregory Becker, Carlos Eduardo Arango Gutierrez, Kenneth
|
||||
Hoste, and Todd Gamblin.
|
||||
[**`archspec`: A library for detecting, labeling, and reasoning about
|
||||
microarchitectures**](https://tgamblin.github.io/pubs/archspec-canopie-hpc-2020.pdf).
|
||||
In *2nd International Workshop on Containers and New Orchestration Paradigms
|
||||
for Isolated Environments in HPC (CANOPIE-HPC'20)*, Online Event, November
|
||||
12, 2020.
|
||||
|
||||
## License
|
||||
|
||||
Archspec is distributed under the terms of both the MIT license and the
|
||||
Apache License (Version 2.0). Users may choose either license, at their
|
||||
option.
|
||||
|
||||
All new contributions must be made under both the MIT and Apache-2.0
|
||||
licenses.
|
||||
|
||||
See [LICENSE-MIT](https://github.com/archspec/archspec/blob/master/LICENSE-MIT),
|
||||
[LICENSE-APACHE](https://github.com/archspec/archspec/blob/master/LICENSE-APACHE),
|
||||
[COPYRIGHT](https://github.com/archspec/archspec/blob/master/COPYRIGHT), and
|
||||
[NOTICE](https://github.com/archspec/archspec/blob/master/NOTICE) for details.
|
||||
|
||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
LLNL-CODE-811653
|
||||
22
lib/spack/external/archspec/json/COPYRIGHT
vendored
22
lib/spack/external/archspec/json/COPYRIGHT
vendored
@@ -1,22 +0,0 @@
|
||||
Intellectual Property Notice
|
||||
------------------------------
|
||||
|
||||
Archspec is licensed under the Apache License, Version 2.0 (LICENSE-APACHE
|
||||
or http://www.apache.org/licenses/LICENSE-2.0) or the MIT license,
|
||||
(LICENSE-MIT or http://opensource.org/licenses/MIT), at your option.
|
||||
|
||||
Copyrights and patents in the Archspec project are retained by contributors.
|
||||
No copyright assignment is required to contribute to Archspec.
|
||||
|
||||
|
||||
SPDX usage
|
||||
------------
|
||||
|
||||
Individual files contain SPDX tags instead of the full license text.
|
||||
This enables machine processing of license information based on the SPDX
|
||||
License Identifiers that are available here: https://spdx.org/licenses/
|
||||
|
||||
Files that are dual-licensed as Apache-2.0 OR MIT contain the following
|
||||
text in the license header:
|
||||
|
||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
1
lib/spack/external/vendor.txt
vendored
1
lib/spack/external/vendor.txt
vendored
@@ -9,3 +9,4 @@ macholib==1.16.2
|
||||
altgraph==0.17.3
|
||||
ruamel.yaml==0.17.21
|
||||
typing_extensions==4.1.1
|
||||
archspec @ git+https://github.com/archspec/archspec.git@38ce485258ffc4fc6dd6688f8dc90cb269478c47
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
import warnings
|
||||
from typing import Optional, Sequence, Union
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
from _vendoring.typing_extensions import TypedDict
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import llnl.util.filesystem as fs
|
||||
from llnl.util import tty
|
||||
|
||||
@@ -138,7 +137,7 @@ def _fix_ext_suffix(candidate_spec: "spack.spec.Spec"):
|
||||
}
|
||||
|
||||
# If the current architecture is not problematic return
|
||||
generic_target = archspec.cpu.host().family
|
||||
generic_target = _vendoring.archspec.cpu.host().family
|
||||
if str(generic_target) not in _suffix_to_be_checked:
|
||||
return
|
||||
|
||||
@@ -235,7 +234,7 @@ def _root_spec(spec_str: str) -> str:
|
||||
platform = str(spack.platforms.host())
|
||||
|
||||
spec_str += f" platform={platform}"
|
||||
target = archspec.cpu.host().family
|
||||
target = _vendoring.archspec.cpu.host().family
|
||||
spec_str += f" target={target}"
|
||||
|
||||
tty.debug(f"[BOOTSTRAP ROOT SPEC] {spec_str}")
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import sys
|
||||
from typing import Dict, Optional, Tuple
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import spack.compilers.config
|
||||
import spack.compilers.libraries
|
||||
@@ -30,7 +30,7 @@ class ClingoBootstrapConcretizer:
|
||||
def __init__(self, configuration):
|
||||
self.host_platform = spack.platforms.host()
|
||||
self.host_os = self.host_platform.default_operating_system()
|
||||
self.host_target = archspec.cpu.host().family
|
||||
self.host_target = _vendoring.archspec.cpu.host().family
|
||||
self.host_architecture = spack.spec.ArchSpec.default_arch()
|
||||
self.host_architecture.target = str(self.host_target)
|
||||
self.host_compiler = self._valid_compiler_or_raise()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import sys
|
||||
from typing import Iterable, List
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
from llnl.util import tty
|
||||
|
||||
@@ -51,7 +51,7 @@ def environment_root(cls) -> pathlib.Path:
|
||||
"""Environment root directory"""
|
||||
bootstrap_root_path = root_path()
|
||||
python_part = spec_for_current_python().replace("@", "")
|
||||
arch_part = archspec.cpu.host().family
|
||||
arch_part = _vendoring.archspec.cpu.host().family
|
||||
interpreter_part = hashlib.md5(sys.exec_prefix.encode()).hexdigest()[:5]
|
||||
environment_dir = f"{python_part}-{arch_part}-{interpreter_part}"
|
||||
return pathlib.Path(
|
||||
@@ -112,7 +112,7 @@ def _write_spack_yaml_file(self) -> None:
|
||||
context = {
|
||||
"python_spec": spec_for_current_python(),
|
||||
"python_prefix": sys.exec_prefix,
|
||||
"architecture": archspec.cpu.host().family,
|
||||
"architecture": _vendoring.archspec.cpu.host().family,
|
||||
"environment_path": self.environment_root(),
|
||||
"environment_specs": self.spack_dev_requirements(),
|
||||
"store_path": store_path(),
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
overload,
|
||||
)
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import llnl.util.tty as tty
|
||||
from llnl.string import plural
|
||||
@@ -440,10 +440,12 @@ def optimization_flags(compiler, target):
|
||||
# Try to check if the current compiler comes with a version number or
|
||||
# has an unexpected suffix. If so, treat it as a compiler with a
|
||||
# custom spec.
|
||||
version_number, _ = archspec.cpu.version_components(compiler.version.dotted_numeric_string)
|
||||
version_number, _ = _vendoring.archspec.cpu.version_components(
|
||||
compiler.version.dotted_numeric_string
|
||||
)
|
||||
try:
|
||||
result = target.optimization_flags(compiler.name, version_number)
|
||||
except (ValueError, archspec.cpu.UnsupportedMicroarchitecture):
|
||||
except (ValueError, _vendoring.archspec.cpu.UnsupportedMicroarchitecture):
|
||||
result = ""
|
||||
|
||||
return result
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import collections
|
||||
import warnings
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import llnl.util.tty.colify as colify
|
||||
import llnl.util.tty.color as color
|
||||
@@ -92,11 +92,11 @@ def display_target_group(header, target_group):
|
||||
def arch(parser, args):
|
||||
if args.generic_target:
|
||||
# TODO: add deprecation warning in 0.24
|
||||
print(archspec.cpu.host().generic)
|
||||
print(_vendoring.archspec.cpu.host().generic)
|
||||
return
|
||||
|
||||
if args.known_targets:
|
||||
display_targets(archspec.cpu.TARGETS)
|
||||
display_targets(_vendoring.archspec.cpu.TARGETS)
|
||||
return
|
||||
|
||||
if args.frontend:
|
||||
|
||||
@@ -514,17 +514,18 @@ def extend_with_dependencies(specs):
|
||||
|
||||
|
||||
def concrete_specs_from_cli_or_file(args):
|
||||
tty.msg("Concretizing input specs")
|
||||
if args.specs:
|
||||
specs = spack.cmd.parse_specs(args.specs, concretize=True)
|
||||
specs = spack.cmd.parse_specs(args.specs, concretize=False)
|
||||
if not specs:
|
||||
raise SpackError("unable to parse specs from command line")
|
||||
|
||||
if args.file:
|
||||
specs = specs_from_text_file(args.file, concretize=True)
|
||||
specs = specs_from_text_file(args.file, concretize=False)
|
||||
if not specs:
|
||||
raise SpackError("unable to parse specs from file '{}'".format(args.file))
|
||||
return specs
|
||||
|
||||
concrete_specs = spack.cmd.matching_specs_from_env(specs)
|
||||
return concrete_specs
|
||||
|
||||
|
||||
class IncludeFilter:
|
||||
@@ -607,11 +608,6 @@ def process_mirror_stats(present, mirrored, error):
|
||||
|
||||
def mirror_create(args):
|
||||
"""create a directory to be used as a spack mirror, and fill it with package archives"""
|
||||
if args.specs and args.all:
|
||||
raise SpackError(
|
||||
"cannot specify specs on command line if you chose to mirror all specs with '--all'"
|
||||
)
|
||||
|
||||
if args.file and args.all:
|
||||
raise SpackError(
|
||||
"cannot specify specs with a file if you chose to mirror all specs with '--all'"
|
||||
|
||||
@@ -201,7 +201,19 @@ def repo_migrate(args: Any) -> int:
|
||||
repo_v2 = None
|
||||
exit_code = 0
|
||||
|
||||
if exit_code == 0 and isinstance(repo_v2, spack.repo.Repo):
|
||||
if not args.fix:
|
||||
tty.error(
|
||||
f"No changes were made to the repository {repo.root} with namespace "
|
||||
f"'{repo.namespace}'. Run with --fix to apply the above changes."
|
||||
)
|
||||
|
||||
elif exit_code == 1:
|
||||
tty.error(
|
||||
f"Repository '{repo.namespace}' could not be migrated to the latest Package API. "
|
||||
"Please check the error messages above."
|
||||
)
|
||||
|
||||
elif isinstance(repo_v2, spack.repo.Repo):
|
||||
tty.info(
|
||||
f"Repository '{repo_v2.namespace}' was successfully migrated from "
|
||||
f"package API {repo.package_api_str} to {repo_v2.package_api_str}."
|
||||
@@ -212,15 +224,9 @@ def repo_migrate(args: Any) -> int:
|
||||
f" spack repo add {shlex.quote(repo_v2.root)}"
|
||||
)
|
||||
|
||||
elif exit_code == 0:
|
||||
else:
|
||||
tty.info(f"Repository '{repo.namespace}' was successfully migrated")
|
||||
|
||||
elif not args.fix and exit_code == 1:
|
||||
tty.error(
|
||||
f"No changes were made to the repository {repo.root} with namespace "
|
||||
f"'{repo.namespace}'. Run with --fix to apply the above changes."
|
||||
)
|
||||
|
||||
return exit_code
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import warnings
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import llnl.util.filesystem as fs
|
||||
import llnl.util.lang
|
||||
@@ -316,7 +316,7 @@ def from_external_yaml(config: Dict[str, Any]) -> Optional[spack.spec.Spec]:
|
||||
@staticmethod
|
||||
def _finalize_external_concretization(abstract_spec):
|
||||
if CompilerFactory._GENERIC_TARGET is None:
|
||||
CompilerFactory._GENERIC_TARGET = archspec.cpu.host().family
|
||||
CompilerFactory._GENERIC_TARGET = _vendoring.archspec.cpu.host().family
|
||||
|
||||
if abstract_spec.architecture:
|
||||
abstract_spec.architecture.complete_with_defaults()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
import warnings
|
||||
from typing import List, Tuple
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import llnl.util.lang
|
||||
import llnl.util.tty as tty
|
||||
@@ -734,7 +734,7 @@ def _compatible_sys_types():
|
||||
"""
|
||||
host_platform = spack.platforms.host()
|
||||
host_os = str(host_platform.default_operating_system())
|
||||
host_target = archspec.cpu.host()
|
||||
host_target = _vendoring.archspec.cpu.host()
|
||||
compatible_targets = [host_target] + host_target.ancestors
|
||||
|
||||
compatible_archs = [
|
||||
@@ -794,7 +794,7 @@ def shell_set(var, value):
|
||||
# print environment module system if available. This can be expensive
|
||||
# on clusters, so skip it if not needed.
|
||||
if "modules" in info:
|
||||
generic_arch = archspec.cpu.host().family
|
||||
generic_arch = _vendoring.archspec.cpu.host().family
|
||||
module_spec = "environment-modules target={0}".format(generic_arch)
|
||||
specs = spack.store.STORE.db.query(module_spec)
|
||||
if specs:
|
||||
|
||||
@@ -986,7 +986,9 @@ def url_for_version(self, version):
|
||||
"""
|
||||
return self._implement_all_urls_for_version(version)[0]
|
||||
|
||||
def update_external_dependencies(self, extendee_spec=None):
|
||||
def _update_external_dependencies(
|
||||
self, extendee_spec: Optional[spack.spec.Spec] = None
|
||||
) -> None:
|
||||
"""
|
||||
Method to override in package classes to handle external dependencies
|
||||
"""
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import warnings
|
||||
from typing import Optional
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import llnl.util.lang
|
||||
|
||||
@@ -38,15 +38,15 @@ def __init__(self, name):
|
||||
self.name = name
|
||||
self._init_targets()
|
||||
|
||||
def add_target(self, name: str, target: archspec.cpu.Microarchitecture) -> None:
|
||||
def add_target(self, name: str, target: _vendoring.archspec.cpu.Microarchitecture) -> None:
|
||||
if name in Platform.reserved_targets:
|
||||
msg = f"{name} is a spack reserved alias and cannot be the name of a target"
|
||||
raise ValueError(msg)
|
||||
self.targets[name] = target
|
||||
|
||||
def _init_targets(self):
|
||||
self.default = archspec.cpu.host().name
|
||||
for name, microarchitecture in archspec.cpu.TARGETS.items():
|
||||
self.default = _vendoring.archspec.cpu.host().name
|
||||
for name, microarchitecture in _vendoring.archspec.cpu.TARGETS.items():
|
||||
self.add_target(name, microarchitecture)
|
||||
|
||||
def target(self, name):
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import platform
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import spack.operating_systems
|
||||
|
||||
@@ -28,7 +28,7 @@ def __init__(self, name=None):
|
||||
def _init_targets(self):
|
||||
targets = ("aarch64", "m1") if platform.machine() == "arm64" else ("x86_64", "core2")
|
||||
for t in targets:
|
||||
self.add_target(t, archspec.cpu.TARGETS[t])
|
||||
self.add_target(t, _vendoring.archspec.cpu.TARGETS[t])
|
||||
|
||||
@classmethod
|
||||
def detect(cls):
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
Union,
|
||||
)
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import llnl.util.lang
|
||||
import llnl.util.tty as tty
|
||||
@@ -1617,7 +1617,7 @@ def target_ranges(self, spec, single_target_fn):
|
||||
target = spec.architecture.target
|
||||
|
||||
# Check if the target is a concrete target
|
||||
if str(target) in archspec.cpu.TARGETS:
|
||||
if str(target) in _vendoring.archspec.cpu.TARGETS:
|
||||
return [single_target_fn(spec.name, target)]
|
||||
|
||||
self.target_constraints.add(target)
|
||||
@@ -2753,7 +2753,7 @@ def _supported_targets(self, compiler_name, compiler_version, targets):
|
||||
compiler_name, compiler_version.dotted_numeric_string
|
||||
)
|
||||
supported.append(target)
|
||||
except archspec.cpu.UnsupportedMicroarchitecture:
|
||||
except _vendoring.archspec.cpu.UnsupportedMicroarchitecture:
|
||||
continue
|
||||
except ValueError:
|
||||
continue
|
||||
@@ -2818,7 +2818,7 @@ def target_defaults(self, specs):
|
||||
if not spec.architecture or not spec.architecture.target:
|
||||
continue
|
||||
|
||||
target = archspec.cpu.TARGETS.get(spec.target.name)
|
||||
target = _vendoring.archspec.cpu.TARGETS.get(spec.target.name)
|
||||
if not target:
|
||||
self.target_ranges(spec, None)
|
||||
continue
|
||||
@@ -2830,7 +2830,7 @@ def target_defaults(self, specs):
|
||||
candidate_targets.append(ancestor)
|
||||
|
||||
platform = spack.platforms.host()
|
||||
uarch = archspec.cpu.TARGETS.get(platform.default)
|
||||
uarch = _vendoring.archspec.cpu.TARGETS.get(platform.default)
|
||||
best_targets = {uarch.family.name}
|
||||
for compiler in self.possible_compilers:
|
||||
supported = self._supported_targets(compiler.name, compiler.version, candidate_targets)
|
||||
@@ -2938,7 +2938,7 @@ def _all_targets_satisfiying(single_constraint):
|
||||
return [single_constraint]
|
||||
|
||||
t_min, _, t_max = single_constraint.partition(":")
|
||||
for test_target in archspec.cpu.TARGETS.values():
|
||||
for test_target in _vendoring.archspec.cpu.TARGETS.values():
|
||||
# Check lower bound
|
||||
if t_min and not t_min <= test_target:
|
||||
continue
|
||||
@@ -3894,7 +3894,7 @@ def external_spec_selected(self, node, idx):
|
||||
|
||||
if extendee_spec:
|
||||
extendee_node = SpecBuilder.make_node(pkg=extendee_spec.name)
|
||||
package.update_external_dependencies(self._specs.get(extendee_node, None))
|
||||
package._update_external_dependencies(self._specs.get(extendee_node))
|
||||
|
||||
def depends_on(self, parent_node, dependency_node, type):
|
||||
dependency_spec = self._specs[dependency_node]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import collections
|
||||
from typing import Dict, List, NamedTuple, Set, Tuple, Union
|
||||
|
||||
import archspec.cpu
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
from llnl.util import lang, tty
|
||||
|
||||
@@ -34,7 +34,7 @@ def unreachable(self, *, pkg_name: str, when_spec: spack.spec.Spec) -> bool:
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def candidate_targets(self) -> List[archspec.cpu.Microarchitecture]:
|
||||
def candidate_targets(self) -> List[_vendoring.archspec.cpu.Microarchitecture]:
|
||||
"""Returns a list of targets that are candidate for concretization"""
|
||||
raise NotImplementedError
|
||||
|
||||
@@ -70,7 +70,7 @@ def __init__(self, *, configuration: spack.config.Configuration, repo: spack.rep
|
||||
self.configuration = configuration
|
||||
self.repo = repo
|
||||
self._platform_condition = spack.spec.Spec(
|
||||
f"platform={spack.platforms.host()} target={archspec.cpu.host().family}:"
|
||||
f"platform={spack.platforms.host()} target={_vendoring.archspec.cpu.host().family}:"
|
||||
)
|
||||
|
||||
try:
|
||||
@@ -110,10 +110,10 @@ def unreachable(self, *, pkg_name: str, when_spec: spack.spec.Spec) -> bool:
|
||||
"""
|
||||
return False
|
||||
|
||||
def candidate_targets(self) -> List[archspec.cpu.Microarchitecture]:
|
||||
def candidate_targets(self) -> List[_vendoring.archspec.cpu.Microarchitecture]:
|
||||
"""Returns a list of targets that are candidate for concretization"""
|
||||
platform = spack.platforms.host()
|
||||
default_target = archspec.cpu.TARGETS[platform.default]
|
||||
default_target = _vendoring.archspec.cpu.TARGETS[platform.default]
|
||||
|
||||
# Construct the list of targets which are compatible with the host
|
||||
candidate_targets = [default_target] + default_target.ancestors
|
||||
@@ -125,7 +125,7 @@ def candidate_targets(self) -> List[archspec.cpu.Microarchitecture]:
|
||||
additional_targets_in_family = sorted(
|
||||
[
|
||||
t
|
||||
for t in archspec.cpu.TARGETS.values()
|
||||
for t in _vendoring.archspec.cpu.TARGETS.values()
|
||||
if (t.family.name == default_target.family.name and t not in candidate_targets)
|
||||
],
|
||||
key=lambda x: len(x.ancestors),
|
||||
|
||||
@@ -74,10 +74,9 @@
|
||||
overload,
|
||||
)
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
from _vendoring.typing_extensions import Literal
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import llnl.path
|
||||
import llnl.string
|
||||
import llnl.util.filesystem as fs
|
||||
@@ -217,10 +216,12 @@ def ensure_modern_format_string(fmt: str) -> None:
|
||||
)
|
||||
|
||||
|
||||
def _make_microarchitecture(name: str) -> archspec.cpu.Microarchitecture:
|
||||
if isinstance(name, archspec.cpu.Microarchitecture):
|
||||
def _make_microarchitecture(name: str) -> _vendoring.archspec.cpu.Microarchitecture:
|
||||
if isinstance(name, _vendoring.archspec.cpu.Microarchitecture):
|
||||
return name
|
||||
return archspec.cpu.TARGETS.get(name, archspec.cpu.generic_microarchitecture(name))
|
||||
return _vendoring.archspec.cpu.TARGETS.get(
|
||||
name, _vendoring.archspec.cpu.generic_microarchitecture(name)
|
||||
)
|
||||
|
||||
|
||||
@lang.lazy_lexicographic_ordering
|
||||
@@ -364,7 +365,7 @@ def target(self, value):
|
||||
# will assumed to be the host machine's platform.
|
||||
|
||||
def target_or_none(t):
|
||||
if isinstance(t, archspec.cpu.Microarchitecture):
|
||||
if isinstance(t, _vendoring.archspec.cpu.Microarchitecture):
|
||||
return t
|
||||
if t and t != "None":
|
||||
return _make_microarchitecture(t)
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import platform
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import spack.concretize
|
||||
import spack.operating_systems
|
||||
import spack.platforms
|
||||
@@ -125,7 +124,8 @@ def test_satisfy_strict_constraint_when_not_concrete(architecture_tuple, constra
|
||||
)
|
||||
@pytest.mark.usefixtures("mock_packages", "config")
|
||||
@pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="tests are for x86_64 uarch ranges"
|
||||
str(_vendoring.archspec.cpu.host().family) != "x86_64",
|
||||
reason="tests are for x86_64 uarch ranges",
|
||||
)
|
||||
def test_concretize_target_ranges(root_target_range, dep_target_range, result, monkeypatch):
|
||||
spec = spack.concretize.concretize_one(
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
import sys
|
||||
from typing import Dict, Optional, Tuple
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
from llnl.path import Path, convert_to_platform_path
|
||||
from llnl.util.filesystem import HeaderList, LibraryList
|
||||
|
||||
@@ -727,14 +726,15 @@ def test_rpath_with_duplicate_link_deps():
|
||||
@pytest.mark.filterwarnings("ignore:microarchitecture specific")
|
||||
@pytest.mark.not_on_windows("Windows doesn't support the compiler wrapper")
|
||||
def test_optimization_flags(compiler_spec, target_name, expected_flags, compiler_factory):
|
||||
target = archspec.cpu.TARGETS[target_name]
|
||||
target = _vendoring.archspec.cpu.TARGETS[target_name]
|
||||
compiler = spack.spec.parse_with_version_concrete(compiler_spec)
|
||||
opt_flags = spack.build_environment.optimization_flags(compiler, target)
|
||||
assert opt_flags == expected_flags
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="tests check specific x86_64 uarch flags"
|
||||
str(_vendoring.archspec.cpu.host().family) != "x86_64",
|
||||
reason="tests check specific x86_64 uarch flags",
|
||||
)
|
||||
@pytest.mark.not_on_windows("Windows doesn't support the compiler wrapper")
|
||||
def test_optimization_flags_are_using_node_target(default_mock_concretization, monkeypatch):
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
import glob
|
||||
import os
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import py.path
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import llnl.util.filesystem as fs
|
||||
|
||||
import spack
|
||||
@@ -217,7 +216,8 @@ def test_autotools_gnuconfig_replacement_disabled(self, mutable_database):
|
||||
|
||||
@pytest.mark.disable_clean_stage_check
|
||||
@pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="test data is specific for x86_64"
|
||||
str(_vendoring.archspec.cpu.host().family) != "x86_64",
|
||||
reason="test data is specific for x86_64",
|
||||
)
|
||||
def test_autotools_gnuconfig_replacement_no_gnuconfig(self, mutable_database, monkeypatch):
|
||||
"""
|
||||
|
||||
@@ -61,6 +61,26 @@ def test_mirror_from_env(mutable_mock_env_path, tmp_path, mock_packages, mock_fe
|
||||
assert mirror_res == expected
|
||||
|
||||
|
||||
# Test for command line-specified spec in concretized environment
|
||||
def test_mirror_spec_from_env(mutable_mock_env_path, tmp_path, mock_packages, mock_fetch):
|
||||
mirror_dir = str(tmp_path / "mirror-B")
|
||||
env_name = "test"
|
||||
|
||||
env("create", env_name)
|
||||
with ev.read(env_name):
|
||||
add("simple-standalone-test@0.9")
|
||||
concretize()
|
||||
with spack.config.override("config:checksum", False):
|
||||
mirror("create", "-d", mirror_dir, "simple-standalone-test")
|
||||
|
||||
e = ev.read(env_name)
|
||||
assert set(os.listdir(mirror_dir)) == set([s.name for s in e.user_specs])
|
||||
spec = e.concrete_roots()[0]
|
||||
mirror_res = os.listdir(os.path.join(mirror_dir, spec.name))
|
||||
expected = ["%s.tar.gz" % spec.format("{name}-{version}")]
|
||||
assert mirror_res == expected
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def source_for_pkg_with_hash(mock_packages, tmpdir):
|
||||
s = spack.concretize.concretize_one("trivial-pkg-with-valid-hash")
|
||||
@@ -401,8 +421,7 @@ def test_all_specs_with_all_versions_dont_concretize(self):
|
||||
@pytest.mark.parametrize(
|
||||
"cli_args,error_str",
|
||||
[
|
||||
# Passed more than one among -f --all and specs
|
||||
({"specs": "hdf5", "file": None, "all": True}, "cannot specify specs on command line"),
|
||||
# Passed more than one among -f --all
|
||||
(
|
||||
{"specs": None, "file": "input.txt", "all": True},
|
||||
"cannot specify specs with a file if",
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
import os
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import spack.concretize
|
||||
import spack.config
|
||||
import spack.paths
|
||||
@@ -86,7 +85,8 @@ def test_external_nodes_do_not_have_runtimes(runtime_repo, mutable_config, tmp_p
|
||||
{"pkg-a": "gcc-runtime@9.4.0", "pkg-b": "gcc-runtime@9.4.0"},
|
||||
1,
|
||||
marks=pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="test data is x86_64 specific"
|
||||
str(_vendoring.archspec.cpu.host().family) != "x86_64",
|
||||
reason="test data is x86_64 specific",
|
||||
),
|
||||
),
|
||||
pytest.param(
|
||||
@@ -98,7 +98,8 @@ def test_external_nodes_do_not_have_runtimes(runtime_repo, mutable_config, tmp_p
|
||||
},
|
||||
2,
|
||||
marks=pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="test data is x86_64 specific"
|
||||
str(_vendoring.archspec.cpu.host().family) != "x86_64",
|
||||
reason="test data is x86_64 specific",
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
import platform
|
||||
import sys
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import _vendoring.jinja2
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import llnl.util.lang
|
||||
|
||||
import spack.binary_distribution
|
||||
@@ -146,12 +145,12 @@ def current_host(request, monkeypatch):
|
||||
|
||||
monkeypatch.setattr(spack.platforms.Test, "default", cpu)
|
||||
if not is_preference:
|
||||
target = archspec.cpu.TARGETS[cpu]
|
||||
monkeypatch.setattr(archspec.cpu, "host", lambda: target)
|
||||
target = _vendoring.archspec.cpu.TARGETS[cpu]
|
||||
monkeypatch.setattr(_vendoring.archspec.cpu, "host", lambda: target)
|
||||
yield target
|
||||
else:
|
||||
target = archspec.cpu.TARGETS["sapphirerapids"]
|
||||
monkeypatch.setattr(archspec.cpu, "host", lambda: target)
|
||||
target = _vendoring.archspec.cpu.TARGETS["sapphirerapids"]
|
||||
monkeypatch.setattr(_vendoring.archspec.cpu, "host", lambda: target)
|
||||
with spack.config.override("packages:all", {"target": [cpu]}):
|
||||
yield target
|
||||
|
||||
@@ -383,7 +382,7 @@ def test_different_compilers_get_different_flags(
|
||||
"gcc": {"externals": [gcc11_with_flags]},
|
||||
},
|
||||
)
|
||||
t = archspec.cpu.host().family
|
||||
t = _vendoring.archspec.cpu.host().family
|
||||
client = spack.concretize.concretize_one(
|
||||
Spec(
|
||||
f"cmake-client platform=test os=redhat6 target={t} %gcc@11.1.0"
|
||||
@@ -976,7 +975,7 @@ def test_noversion_pkg(self, spec):
|
||||
def test_adjusting_default_target_based_on_compiler(
|
||||
self, spec, compiler_spec, best_achievable, current_host, compiler_factory, mutable_config
|
||||
):
|
||||
best_achievable = archspec.cpu.TARGETS[best_achievable]
|
||||
best_achievable = _vendoring.archspec.cpu.TARGETS[best_achievable]
|
||||
expected = best_achievable if best_achievable < current_host else current_host
|
||||
mutable_config.set(
|
||||
"packages", {"gcc": {"externals": [compiler_factory(spec=f"{compiler_spec}")]}}
|
||||
@@ -1645,7 +1644,7 @@ def test_target_granularity(self):
|
||||
# The test architecture uses core2 as the default target. Check that when
|
||||
# we configure Spack for "generic" granularity we concretize for x86_64
|
||||
default_target = spack.platforms.test.Test.default
|
||||
generic_target = archspec.cpu.TARGETS[default_target].generic.name
|
||||
generic_target = _vendoring.archspec.cpu.TARGETS[default_target].generic.name
|
||||
s = Spec("python")
|
||||
assert spack.concretize.concretize_one(s).satisfies("target=%s" % default_target)
|
||||
with spack.config.override("concretizer:targets", {"granularity": "generic"}):
|
||||
@@ -2011,7 +2010,7 @@ def test_installed_specs_disregard_conflicts(self, mutable_database, monkeypatch
|
||||
def test_require_targets_are_allowed(self, mutable_config, mutable_database):
|
||||
"""Test that users can set target constraints under the require attribute."""
|
||||
# Configuration to be added to packages.yaml
|
||||
required_target = archspec.cpu.TARGETS[spack.platforms.test.Test.default].family
|
||||
required_target = _vendoring.archspec.cpu.TARGETS[spack.platforms.test.Test.default].family
|
||||
external_conf = {"all": {"require": f"target={required_target}"}}
|
||||
mutable_config.set("packages", external_conf)
|
||||
|
||||
|
||||
@@ -20,13 +20,12 @@
|
||||
import tempfile
|
||||
import xml.etree.ElementTree
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import _vendoring.archspec.cpu.microarchitecture
|
||||
import _vendoring.archspec.cpu.schema
|
||||
import py
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
import archspec.cpu.microarchitecture
|
||||
import archspec.cpu.schema
|
||||
|
||||
import llnl.util.lang
|
||||
import llnl.util.lock
|
||||
import llnl.util.tty as tty
|
||||
@@ -372,12 +371,12 @@ def clean_test_environment():
|
||||
def _host():
|
||||
"""Mock archspec host so there is no inconsistency on the Windows platform
|
||||
This function cannot be local as it needs to be pickleable"""
|
||||
return archspec.cpu.Microarchitecture("x86_64", [], "generic", [], {}, 0)
|
||||
return _vendoring.archspec.cpu.Microarchitecture("x86_64", [], "generic", [], {}, 0)
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def archspec_host_is_spack_test_host(monkeypatch):
|
||||
monkeypatch.setattr(archspec.cpu, "host", _host)
|
||||
monkeypatch.setattr(_vendoring.archspec.cpu, "host", _host)
|
||||
|
||||
|
||||
# Hooks to add command line options or set other custom behaviors.
|
||||
@@ -728,14 +727,14 @@ def mock_uarch_json(tmpdir_factory):
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def mock_uarch_configuration(mock_uarch_json):
|
||||
"""Create mock dictionaries for the archspec.cpu."""
|
||||
"""Create mock dictionaries for the _vendoring.archspec.cpu."""
|
||||
|
||||
def load_json():
|
||||
with open(mock_uarch_json, encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
targets_json = load_json()
|
||||
targets = archspec.cpu.microarchitecture._known_microarchitectures()
|
||||
targets = _vendoring.archspec.cpu.microarchitecture._known_microarchitectures()
|
||||
|
||||
yield targets_json, targets
|
||||
|
||||
@@ -744,8 +743,8 @@ def load_json():
|
||||
def mock_targets(mock_uarch_configuration, monkeypatch):
|
||||
"""Use this fixture to enable mock uarch targets for testing."""
|
||||
targets_json, targets = mock_uarch_configuration
|
||||
monkeypatch.setattr(archspec.cpu.schema, "TARGETS_JSON", targets_json)
|
||||
monkeypatch.setattr(archspec.cpu.microarchitecture, "TARGETS", targets)
|
||||
monkeypatch.setattr(_vendoring.archspec.cpu.schema, "TARGETS_JSON", targets_json)
|
||||
monkeypatch.setattr(_vendoring.archspec.cpu.microarchitecture, "TARGETS", targets)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
@@ -773,7 +772,7 @@ def configuration_dir(tmpdir_factory, linux_os):
|
||||
config_template = test_config / "config.yaml"
|
||||
config.write(config_template.read_text().format(install_tree_root, locks))
|
||||
|
||||
target = str(archspec.cpu.host().family)
|
||||
target = str(_vendoring.archspec.cpu.host().family)
|
||||
compilers = tmpdir.join("site", "packages.yaml")
|
||||
compilers_template = test_config / "packages.yaml"
|
||||
compilers.write(compilers_template.read_text().format(linux_os=linux_os, target=target))
|
||||
@@ -2117,7 +2116,7 @@ def _factory(*, spec):
|
||||
@pytest.fixture()
|
||||
def host_architecture_str():
|
||||
"""Returns the broad architecture family (x86_64, aarch64, etc.)"""
|
||||
return str(archspec.cpu.host().family)
|
||||
return str(_vendoring.archspec.cpu.host().family)
|
||||
|
||||
|
||||
def _true(x):
|
||||
|
||||
@@ -11,10 +11,9 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import spack
|
||||
import spack.cmd
|
||||
import spack.cmd.external
|
||||
@@ -104,7 +103,7 @@ def spec_json(self):
|
||||
|
||||
@pytest.fixture
|
||||
def _common_arch(test_platform):
|
||||
generic = archspec.cpu.TARGETS[test_platform.default].family
|
||||
generic = _vendoring.archspec.cpu.TARGETS[test_platform.default].family
|
||||
return JsonArchEntry(platform=test_platform.name, os="redhat6", target=generic.name)
|
||||
|
||||
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
import os
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import spack.concretize
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
@@ -221,7 +220,8 @@ def test_setenv_raw_value(self, modulefile_content, module_configuration):
|
||||
assert len([x for x in content if 'setenv("FOO", "{{name}}, {name}, {{}}, {}")' in x]) == 1
|
||||
|
||||
@pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="test data is specific for x86_64"
|
||||
str(_vendoring.archspec.cpu.host().family) != "x86_64",
|
||||
reason="test data is specific for x86_64",
|
||||
)
|
||||
def test_help_message(self, modulefile_content, module_configuration):
|
||||
"""Tests the generation of module help message."""
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
import os
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import spack.concretize
|
||||
import spack.modules.common
|
||||
import spack.modules.tcl
|
||||
@@ -186,7 +185,8 @@ def test_setenv_raw_value(self, modulefile_content, module_configuration):
|
||||
assert len([x for x in content if "setenv FOO {{{name}}, {name}, {{}}, {}}" in x]) == 1
|
||||
|
||||
@pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="test data is specific for x86_64"
|
||||
str(_vendoring.archspec.cpu.host().family) != "x86_64",
|
||||
reason="test data is specific for x86_64",
|
||||
)
|
||||
def test_help_message(self, modulefile_content, module_configuration):
|
||||
"""Tests the generation of module help message."""
|
||||
|
||||
@@ -75,7 +75,6 @@ section-order = [
|
||||
"future",
|
||||
"standard-library",
|
||||
"third-party",
|
||||
"archspec",
|
||||
"llnl",
|
||||
"spack",
|
||||
"first-party",
|
||||
@@ -84,7 +83,6 @@ section-order = [
|
||||
|
||||
[tool.ruff.lint.isort.sections]
|
||||
spack = ["spack"]
|
||||
archspec = ["archspec"]
|
||||
llnl = ["llnl"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
@@ -104,13 +102,11 @@ sections = [
|
||||
"FUTURE",
|
||||
"STDLIB",
|
||||
"THIRDPARTY",
|
||||
"ARCHSPEC",
|
||||
"LLNL",
|
||||
"FIRSTPARTY",
|
||||
"LOCALFOLDER",
|
||||
]
|
||||
known_first_party = "spack"
|
||||
known_archspec = "archspec"
|
||||
known_llnl = "llnl"
|
||||
known_third_party = ["ruamel", "six"]
|
||||
src_paths = "lib"
|
||||
@@ -264,6 +260,9 @@ substitute = [
|
||||
{ match = "from attr", replace = "from _vendoring.attr" },
|
||||
{ match = "import jsonschema", replace = "import _vendoring.jsonschema" },
|
||||
{ match = "from jsonschema", replace = "from _vendoring.jsonschema" },
|
||||
{ match = "archspec.cpu", replace = "_vendoring.archspec.cpu" },
|
||||
{ match = "archspec.__version__", replace = "_vendoring.archspec.__version__" },
|
||||
{ match = "import archspec", replace = "import _vendoring.archspec" },
|
||||
]
|
||||
drop = [
|
||||
# contains unnecessary scripts
|
||||
@@ -285,11 +284,21 @@ drop = [
|
||||
"pvectorc.*.so",
|
||||
# Trim jsonschema tests
|
||||
"jsonschema/tests",
|
||||
"archspec/json/tests",
|
||||
"archspec/vendor/cpuid/.gitignore",
|
||||
"pyrsistent/__init__.pyi",
|
||||
]
|
||||
|
||||
[tool.vendoring.typing-stubs]
|
||||
six = ["six.__init__", "six.moves.__init__", "six.moves.configparser"]
|
||||
_pyrsistent_version = []
|
||||
altgraph = []
|
||||
archspec = []
|
||||
distro = []
|
||||
jsonschema = []
|
||||
macholib = []
|
||||
pyrsistent = []
|
||||
ruamel = []
|
||||
six = []
|
||||
|
||||
[tool.vendoring.license.directories]
|
||||
setuptools = "pkg_resources"
|
||||
|
||||
@@ -69,7 +69,7 @@ spack:
|
||||
- alpgen
|
||||
- ampt
|
||||
- apfel +lhapdf +python
|
||||
- celeritas ~cuda +openmp ~rocm +vecgeom
|
||||
- celeritas ~cuda +openmp ~rocm +vecgeom +covfie
|
||||
- cepgen
|
||||
- cernlib +shared
|
||||
- collier
|
||||
@@ -130,12 +130,12 @@ spack:
|
||||
|
||||
# CUDA
|
||||
#- acts +cuda +traccc cuda_arch=80
|
||||
#- celeritas +cuda ~openmp +vecgeom cuda_arch=80
|
||||
#- celeritas +cuda ~openmp +vecgeom cuda_arch=80 +covfie
|
||||
- root +cuda +cudnn +tmva-gpu
|
||||
- vecgeom +cuda cuda_arch=80
|
||||
|
||||
# ROCm
|
||||
- celeritas +rocm amdgpu_target=gfx90a ~openmp ~vecgeom # only available with ORANGE
|
||||
- celeritas +rocm amdgpu_target=gfx90a ~openmp ~vecgeom # only available with ORANGE
|
||||
|
||||
ci:
|
||||
pipeline-gen:
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import stat
|
||||
from typing import Dict, Iterable, List, Mapping, Optional, Tuple
|
||||
|
||||
import archspec
|
||||
import _vendoring.archspec.cpu
|
||||
|
||||
import llnl.util.filesystem as fs
|
||||
from llnl.util.lang import ClassProperty, classproperty, match_predicate
|
||||
@@ -250,7 +250,7 @@ def test_imports(self) -> None:
|
||||
):
|
||||
python("-c", f"import {module}")
|
||||
|
||||
def update_external_dependencies(self, extendee_spec=None):
|
||||
def _update_external_dependencies(self, extendee_spec: Optional[Spec] = None) -> None:
|
||||
"""
|
||||
Ensure all external python packages have a python dependency
|
||||
|
||||
@@ -286,7 +286,7 @@ def update_external_dependencies(self, extendee_spec=None):
|
||||
if not python.architecture.os:
|
||||
python.architecture.os = platform.default_operating_system()
|
||||
if not python.architecture.target:
|
||||
python.architecture.target = archspec.cpu.host().family.name
|
||||
python.architecture.target = _vendoring.archspec.cpu.host().family.name
|
||||
|
||||
python.external_path = self.spec.external_path
|
||||
python._mark_concrete()
|
||||
|
||||
@@ -19,6 +19,7 @@ class AwsOfiNccl(AutotoolsPackage):
|
||||
maintainers("bvanessen")
|
||||
|
||||
version("master", branch="master")
|
||||
version("1.14.2", sha256="e523ea08ce0caeff5c949b2134b4897186d793ce908904dd9d47bb08230b9bbd")
|
||||
version("1.13.0", sha256="50dd231a0a99cec29300df46b8e828139ced15322a3c3c41b1d22dcc9a62ec02")
|
||||
version("1.12.1", sha256="821f0929c016e5448785bbc6795af5096559ecfc6c9479eb3818cafa61424576")
|
||||
version("1.12.0", sha256="93029207103b75f4dc15f023b3b8692851202b52b7e2824723dd5d328f0ea65b")
|
||||
@@ -51,7 +52,7 @@ class AwsOfiNccl(AutotoolsPackage):
|
||||
depends_on("libtool", type="build")
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version < Version("1.7.0"):
|
||||
if version < Version("1.7.0") or version >= Version("1.14.0"):
|
||||
return super().url_for_version(version)
|
||||
url_fmt = "https://github.com/aws/aws-ofi-nccl/archive/v{0}-aws.tar.gz"
|
||||
return url_fmt.format(version)
|
||||
|
||||
@@ -4,23 +4,19 @@
|
||||
|
||||
from spack_repo.builtin.build_systems.generic import Package
|
||||
|
||||
import archspec
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Blast2go(Package):
|
||||
"""Blast2GO is a bioinformatics platform for high-quality functional
|
||||
annotation and analysis of genomic datasets."""
|
||||
annotation and analysis of genomic datasets.
|
||||
"""
|
||||
|
||||
homepage = "https://www.blast2go.com/"
|
||||
|
||||
version("5.2.5", sha256="c37aeda25f96ac0553b52da6b5af3167d50671ddbfb3b39bcb11afe5d0643891")
|
||||
|
||||
for t in set(
|
||||
[str(x.family) for x in archspec.cpu.TARGETS.values() if str(x.family) != "x86_64"]
|
||||
):
|
||||
conflicts("target={0}:".format(t), msg="blast2go is available x86_64 only")
|
||||
requires("target=x86_64:", msg="blast2go is available x86_64 only")
|
||||
|
||||
depends_on("bash", type="build")
|
||||
depends_on("blast-plus", type="run")
|
||||
|
||||
@@ -19,12 +19,17 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
|
||||
git = "https://github.com/celeritas-project/celeritas.git"
|
||||
url = "https://github.com/celeritas-project/celeritas/releases/download/v0.1.0/celeritas-0.1.0.tar.gz"
|
||||
|
||||
maintainers("sethrj")
|
||||
maintainers("sethrj", "drbenmorgan")
|
||||
|
||||
license("Apache-2.0")
|
||||
|
||||
sanity_check_is_file = ["bin/celer-sim"]
|
||||
|
||||
version("develop", branch="develop", get_full_repo=True)
|
||||
|
||||
version("0.6.0", sha256="c776dee357ecff42f85ed02c328f24b092400af28e67af2c0e195ce8f67613b0")
|
||||
version("0.5.3", sha256="4d1fe1f34e899c3599898fb6d44686d2582a41b0872784514aa8c562597b3ee6")
|
||||
version("0.5.2", sha256="46311c096b271d0331b82c02485ac6bf650d5b0f7bd948fb01aef5058f8824e3")
|
||||
version("0.5.1", sha256="182d5466fbd98ba9400b343b55f6a06e03b77daed4de1dd16f632ac0a3620249")
|
||||
version("0.5.0", sha256="4a8834224d96fd01897e5872ac109f60d91ef0bd7b63fac05a73dcdb61a5530e")
|
||||
version("0.4.4", sha256="8b5ae63aa2d50c2ecf48d752424e4a33c50c07d9f0f5ca5448246de3286fd836")
|
||||
@@ -59,11 +64,13 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
|
||||
multi=False,
|
||||
description="C++ standard version",
|
||||
)
|
||||
variant("covfie", default=False, when="@0.6:", description="Enable covfie magnetic fields")
|
||||
variant("debug", default=False, description="Enable runtime debug assertions")
|
||||
variant("doc", default=False, description="Build and install documentation")
|
||||
variant("geant4", default=True, description="Enable Geant4 integration")
|
||||
variant("hepmc3", default=True, description="Use HepMC3 I/O interfaces")
|
||||
variant("openmp", default=False, description="Use OpenMP multithreading")
|
||||
variant("perfetto", default=False, when="@0.5:", description="Use Perfetto profiling")
|
||||
variant("root", default=False, description="Use ROOT I/O")
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
variant("swig", default=False, when="@:0.4", description="Generate SWIG Python bindings")
|
||||
@@ -75,7 +82,9 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("cmake@3.18:", type="build", when="+cuda+vecgeom")
|
||||
depends_on("cmake@3.22:", type="build", when="+rocm")
|
||||
|
||||
depends_on("cli11", when="@0.6:")
|
||||
depends_on("nlohmann-json")
|
||||
depends_on("covfie@0.13:", when="+covfie")
|
||||
depends_on("geant4@10.5:11.1", when="@0.3.1:0.4.1 +geant4")
|
||||
depends_on("geant4@10.5:11.2", when="@0.4.2:0.4 +geant4")
|
||||
depends_on("geant4@10.5:", when="@0.5: +geant4")
|
||||
@@ -104,14 +113,20 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
|
||||
for _std in _cxxstd_values:
|
||||
for _pkg in ["geant4", "root", "vecgeom"]:
|
||||
depends_on(f"{_pkg} cxxstd={_std}", when=f"+{_pkg} cxxstd={_std}")
|
||||
# NOTE: as a private dependency, covfie cxxstd can differ from the
|
||||
# celeritas "public" standard
|
||||
|
||||
# Ensure consistent CUDA architectures
|
||||
depends_on("vecgeom +cuda cuda_arch=none", when="+vecgeom +cuda cuda_arch=none")
|
||||
for _arch in CudaPackage.cuda_arch_values:
|
||||
depends_on(f"vecgeom +cuda cuda_arch={_arch}", when=f"+vecgeom +cuda cuda_arch={_arch}")
|
||||
for _pkg in ["covfie", "vecgeom"]:
|
||||
depends_on(f"{_pkg} +cuda cuda_arch={_arch}", when=f"+{_pkg} +cuda cuda_arch={_arch}")
|
||||
|
||||
conflicts("+rocm", when="+covfie", msg="HIP support is not yet available with covfie")
|
||||
conflicts("+rocm", when="+cuda", msg="AMD and NVIDIA accelerators are incompatible")
|
||||
conflicts("+rocm", when="+vecgeom", msg="HIP support is only available with ORANGE")
|
||||
for _arch in ["cuda", "rocm"]:
|
||||
conflicts("+perfetto", when=f"+{_arch}", msg="Perfetto is only used for CPU profiling")
|
||||
|
||||
# geant4@11.3.0 now returns const G4Element::GetElementTable()
|
||||
patch(
|
||||
@@ -134,7 +149,18 @@ def cmake_args(self):
|
||||
define("CELERITAS_USE_Python", True),
|
||||
]
|
||||
|
||||
for pkg in ["CUDA", "Geant4", "HepMC3", "OpenMP", "ROOT", "SWIG", "VecGeom"]:
|
||||
# NOTE: package names are stylized like the dependency asks: Find{pkg}.cmake
|
||||
for pkg in [
|
||||
"covfie",
|
||||
"CUDA",
|
||||
"Geant4",
|
||||
"HepMC3",
|
||||
"OpenMP",
|
||||
"Perfetto",
|
||||
"ROOT",
|
||||
"SWIG",
|
||||
"VecGeom",
|
||||
]:
|
||||
args.append(from_variant("CELERITAS_USE_" + pkg, pkg.lower()))
|
||||
|
||||
if self.spec.satisfies("+cuda"):
|
||||
@@ -162,8 +188,9 @@ def cmake_args(self):
|
||||
args.extend(
|
||||
(
|
||||
define(f"CELERITAS_BUILTIN_{pkg}", False)
|
||||
for pkg in ["GTest", "nlohmann_json", "G4VG"]
|
||||
for pkg in ["covfie", "CLI11", "GTest", "nlohmann_json", "G4VG"]
|
||||
)
|
||||
)
|
||||
# NOTE: Perfetto is always vendored!
|
||||
|
||||
return args
|
||||
|
||||
@@ -13,13 +13,14 @@ class Chafa(AutotoolsPackage):
|
||||
suitable for display in a terminal."""
|
||||
|
||||
homepage = "https://hpjansson.org/chafa/"
|
||||
url = "https://hpjansson.org/chafa/releases/chafa-1.14.5.tar.xz"
|
||||
url = "https://hpjansson.org/chafa/releases/chafa-1.16.0.tar.xz"
|
||||
git = "https://github.com/hpjansson/chafa.git"
|
||||
|
||||
license("LGPL-3.0-or-later", checked_by="Buldram")
|
||||
maintainers("Buldram")
|
||||
|
||||
version("master", branch="master")
|
||||
version("1.16.0", sha256="bf863e57b6200b696bde1742aa95d7feb8cd23b9df1e91e91859b2b1e54fd290")
|
||||
version("1.14.5", sha256="7b5b384d5fb76a641d00af0626ed2115fb255ea371d9bef11f8500286a7b09e5")
|
||||
version("1.14.4", sha256="d0708a63f05b79269dae862a42671e38aece47fbd4fc852904bca51a65954454")
|
||||
version("1.14.3", sha256="f3d5530a96c8e55eea180448896e973093e0302f4cbde45d028179af8cfd90f3")
|
||||
@@ -75,6 +76,19 @@ def configure_args(self):
|
||||
*self.with_or_without("jxl"),
|
||||
]
|
||||
|
||||
@run_after("install")
|
||||
def install_completions(self):
|
||||
mkdirp(zsh_completion_path(self.prefix))
|
||||
install(
|
||||
"tools/completions/zsh-completion.zsh", zsh_completion_path(self.prefix) / "_chafa"
|
||||
)
|
||||
if self.spec.satisfies("@master"):
|
||||
mkdirp(fish_completion_path(self.prefix))
|
||||
install(
|
||||
"tools/completions/fish-completion.fish",
|
||||
fish_completion_path(self.prefix) / "chafa.fish",
|
||||
)
|
||||
|
||||
@run_after("install", when="+man")
|
||||
def install_man(self):
|
||||
mkdirp(prefix.share.man.man1)
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
import _vendoring.archspec.cpu
|
||||
from spack_repo.builtin.build_systems.generic import Package
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
from llnl.util import lang
|
||||
|
||||
import spack.compilers.libraries
|
||||
@@ -183,12 +182,12 @@ def setup_dependent_build_environment(
|
||||
env.set(f"SPACK_{wrapper_var_name}_RPATH_ARG", compiler_pkg.rpath_arg)
|
||||
|
||||
uarch = dependent_spec.architecture.target
|
||||
version_number, _ = archspec.cpu.version_components(
|
||||
version_number, _ = _vendoring.archspec.cpu.version_components(
|
||||
compiler_pkg.spec.version.dotted_numeric_string
|
||||
)
|
||||
try:
|
||||
isa_arg = uarch.optimization_flags(compiler_pkg.archspec_name(), version_number)
|
||||
except (ValueError, archspec.cpu.UnsupportedMicroarchitecture):
|
||||
except (ValueError, _vendoring.archspec.cpu.UnsupportedMicroarchitecture):
|
||||
isa_arg = ""
|
||||
|
||||
if isa_arg:
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack_repo.builtin.build_systems.makefile import MakefilePackage
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Cryoef(MakefilePackage):
|
||||
"""An open-source software package for robust analysis of the orientation distribution
|
||||
of cryoelectron microscopy data."""
|
||||
|
||||
homepage = "https://www.mrc-lmb.cam.ac.uk/crusso/cryoEF"
|
||||
url = "https://www.mrc-lmb.cam.ac.uk/crusso/cryoEF/cryoEF_v1.1.0.tar.gz"
|
||||
|
||||
version("1.1.0", sha256="655ed8543a0226754bdeb6e0dd4efc0467f15dc4c9c963c44ef7b8d3d0e41b62")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fftw-api@3")
|
||||
|
||||
def patch(self):
|
||||
filter_file(
|
||||
"-lfftw3", f"-lfftw3 {self.spec['fftw-api'].libs.ld_flags} -no-pie", "Makefile"
|
||||
)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree("TestData", prefix.TestData)
|
||||
install_tree("bin", prefix.bin)
|
||||
install_tree("lib", prefix.lib)
|
||||
install("PlotOD.py", prefix.bin)
|
||||
@@ -41,3 +41,4 @@ class CyrusSasl(AutotoolsPackage):
|
||||
depends_on("groff", type="build")
|
||||
depends_on("openssl", type="link")
|
||||
depends_on("libxcrypt", type="link")
|
||||
depends_on("krb5", type="link")
|
||||
|
||||
@@ -22,6 +22,7 @@ class Direnv(GoPackage):
|
||||
|
||||
# Versions (newest to oldest)
|
||||
version("master", branch="master")
|
||||
version("2.36.0", sha256="edb89ca67ef46a792d4e20177dae9dbd229e26dcbcfb17baa9645c1ff7cc47b0")
|
||||
version("2.35.0", sha256="a7aaec49d1b305f0745dad364af967fb3dc9bb5befc9f29d268d528b5a474e57")
|
||||
version("2.34.0", sha256="3d7067e71500e95d69eac86a271a6b6fc3f2f2817ba0e9a589524bf3e73e007c")
|
||||
version("2.33.0", sha256="8ef18051aa6bdcd6b59f04f02acdd0b78849b8ddbdbd372d4957af7889c903ea")
|
||||
@@ -34,5 +35,6 @@ class Direnv(GoPackage):
|
||||
version("2.11.3", sha256="2d34103a7f9645059270763a0cfe82085f6d9fe61b2a85aca558689df0e7b006")
|
||||
|
||||
# Build dependencies
|
||||
depends_on("go@1.24:", type="build", when="@2.36:")
|
||||
depends_on("go@1.20:", type="build", when="@2.33:")
|
||||
depends_on("go@1.16:", type="build", when="@2.28:")
|
||||
|
||||
@@ -26,6 +26,7 @@ class E2fsprogs(AutotoolsPackage):
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
depends_on("uuid")
|
||||
depends_on("texinfo", type="build")
|
||||
depends_on("fuse", when="+fuse2fs")
|
||||
depends_on("pkgconfig", when="+fuse2fs")
|
||||
|
||||
@@ -16,67 +16,20 @@ class Fairlogger(CMakePackage):
|
||||
maintainers("dennisklein", "ChristianTackeGSI")
|
||||
|
||||
version("develop", branch="dev", get_full_repo=True)
|
||||
version("1.11.1", sha256="bba5814f101d705792499e43b387190d8b8c7592466171ae045d4926485f2f70")
|
||||
version("1.10.4", sha256="2fa321893f2c8c599cca160db243299ce1e941fbfb3f935b1139caa943bc0dba")
|
||||
version("1.9.3", sha256="0c02076ed708372d5ae7bdebcefc8e45a8cbfa480eea781308336d60a2781f3a")
|
||||
version("2.2.0", sha256="8dfb11e3aa0a9c545f3dfb310d261956727cea558d4123fd8c9c98e135e4d02b")
|
||||
version(
|
||||
"1.9.0",
|
||||
sha256="13bcaa0d4129f8d4e69a0a2ece8e5b7073760082c8aa028e3fc0c11106503095",
|
||||
"1.11.1",
|
||||
sha256="bba5814f101d705792499e43b387190d8b8c7592466171ae045d4926485f2f70",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.8.0",
|
||||
sha256="3f0a38dba1411b542d998e02badcc099c057b33a402954fc5c2ab74947a0c42c",
|
||||
"1.10.4",
|
||||
sha256="2fa321893f2c8c599cca160db243299ce1e941fbfb3f935b1139caa943bc0dba",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.7.0",
|
||||
sha256="ef467f0a70afc0549442323d70b165fa0b0b4b4e6f17834573ca15e8e0b007e4",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.6.2",
|
||||
sha256="5c6ef0c0029eb451fee71756cb96e6c5011040a9813e8889667b6f3b6b04ed03",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.6.1",
|
||||
sha256="3894580f4c398d724ba408e410e50f70c9f452e8cfaf7c3ff8118c08df28eaa8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.6.0",
|
||||
sha256="721e8cadfceb2f63014c2a727e098babc6deba653baab8866445a772385d0f5b",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.5.0",
|
||||
sha256="8e74e0b1e50ee86f4fca87a44c6b393740b32099ac3880046bf252c31c58dd42",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.4.0",
|
||||
sha256="75457e86984cc03ce87d6ad37adc5aab1910cabd39a9bbe5fb21ce2475a91138",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.3.0",
|
||||
sha256="5cedea2773f7091d69aae9fd8f724e6e47929ee3784acdd295945a848eb36b93",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.2.0",
|
||||
sha256="bc0e049cf84ceb308132d8679e7f22fcdca5561dda314d5233d0d5fe2b0f8c62",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.1.0",
|
||||
sha256="e185e5bd07df648224f85e765d18579fae0de54adaab9a194335e3ad6d3d29f7",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.0.6",
|
||||
sha256="2fc266a6e494adda40837be406aef8d9838f385ffd64fbfafb1164833906b4e0",
|
||||
"1.9.3",
|
||||
sha256="0c02076ed708372d5ae7bdebcefc8e45a8cbfa480eea781308336d60a2781f3a",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
@@ -92,14 +45,21 @@ class Fairlogger(CMakePackage):
|
||||
variant(
|
||||
"cxxstd",
|
||||
default="default",
|
||||
values=("default", conditional("11", when="@:1.9"), "14", "17", "20"),
|
||||
values=(
|
||||
"default",
|
||||
conditional("11", when="@:1.9"),
|
||||
conditional("14", when="@:1"),
|
||||
"17",
|
||||
"20",
|
||||
"23",
|
||||
"26",
|
||||
),
|
||||
multi=False,
|
||||
description="Use the specified C++ standard when building.",
|
||||
)
|
||||
variant(
|
||||
"pretty", default=False, description="Use BOOST_PRETTY_FUNCTION macro (Supported by 1.4+)."
|
||||
)
|
||||
conflicts("+pretty", when="@:1.3")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
@@ -108,14 +68,15 @@ class Fairlogger(CMakePackage):
|
||||
|
||||
depends_on("boost", when="+pretty")
|
||||
conflicts("^boost@1.70:", when="^cmake@:3.14")
|
||||
depends_on("fmt")
|
||||
depends_on("fmt@:8", when="@:1.9")
|
||||
depends_on("fmt@5.3.0:5", when="@1.6.0:1.6.1")
|
||||
depends_on("fmt@5.3.0:", when="@1.6.2:")
|
||||
|
||||
def patch(self):
|
||||
"""FairLogger gets its version number from git.
|
||||
But the tarball doesn't have that information, so
|
||||
we patch the spack version into CMakeLists.txt"""
|
||||
|
||||
The tarball doesn't have that information, so we patch the spack
|
||||
version into CMakeLists.txt.
|
||||
"""
|
||||
if not self.spec.satisfies("@develop"):
|
||||
filter_file(
|
||||
r"(get_git_version\(.*)\)",
|
||||
@@ -123,14 +84,17 @@ def patch(self):
|
||||
"CMakeLists.txt",
|
||||
)
|
||||
|
||||
if self.spec.satisfies("@:1"):
|
||||
filter_file(r"(LANGUAGES C CXX)", r"LANGUAGES CXX", "CMakeLists.txt")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [self.define("DISABLE_COLOR", True)]
|
||||
args = [
|
||||
self.define("DISABLE_COLOR", True),
|
||||
self.define_from_variant("USE_BOOST_PRETTY_FUNCTION", "pretty"),
|
||||
self.define("USE_EXTERNAL_FMT", True),
|
||||
]
|
||||
if self.spec.variants["cxxstd"].value != "default":
|
||||
args.append(self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"))
|
||||
if self.spec.satisfies("@1.4:"):
|
||||
args.append(self.define_from_variant("USE_BOOST_PRETTY_FUNCTION", "pretty"))
|
||||
if self.spec.satisfies("@1.6:"):
|
||||
args.append(self.define("USE_EXTERNAL_FMT", True))
|
||||
if self.spec.satisfies("^boost@:1.69"):
|
||||
args.append(self.define("Boost_NO_BOOST_CMAKE", True))
|
||||
return args
|
||||
|
||||
@@ -57,6 +57,7 @@ class Fairmq(CMakePackage):
|
||||
depends_on("git")
|
||||
|
||||
depends_on("boost@1.66: +container+program_options+filesystem+date_time+regex")
|
||||
conflicts("^boost@1.88:")
|
||||
depends_on("fairlogger@1.6: +pretty")
|
||||
depends_on("libzmq@4.1.4:")
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ class Fzf(GoPackage):
|
||||
|
||||
# Versions from newest to oldest
|
||||
version("master", branch="master")
|
||||
version("0.62.0", sha256="e5beae86a3d026b2c2cfc165715d45b831b9f337a9e96f711ba3bc3d15e50900")
|
||||
version("0.61.0", sha256="5d72cdf708c6adc240b3b43dfecd218cf4703ea609422fb4d62812e9f79f0a12")
|
||||
version("0.60.3", sha256="bdef337774050c26c6c4a6f38bc4ccb0901450854cd7f667cb3a330166a9ada5")
|
||||
version("0.60.0", sha256="69255fd9301e491b6ac6788bf1caf5d4f70d9209b4b8ab70ceb1caf6a69b5c16")
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
from spack_repo.builtin.build_systems.compiler import CompilerPackage
|
||||
from spack_repo.builtin.build_systems.gnu import GNUMirrorPackage
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
from llnl.util.symlink import readlink
|
||||
|
||||
import spack.platforms
|
||||
@@ -773,7 +771,7 @@ def get_common_target_flags(self, spec):
|
||||
for uarch in microarchitectures:
|
||||
try:
|
||||
return uarch.optimization_flags("gcc", str(spec.version))
|
||||
except archspec.cpu.UnsupportedMicroarchitecture:
|
||||
except ValueError:
|
||||
pass
|
||||
# no arch specific flags in common, unlikely to happen.
|
||||
return ""
|
||||
|
||||
@@ -18,9 +18,11 @@ class Goimports(GoPackage):
|
||||
|
||||
license("BSD-3-Clause", checked_by="alecbcs")
|
||||
|
||||
version("0.33.0", sha256="22fd6c3146bf6cd38aa1b1a4f94ddf9e07ac5eb62f5db713ceb6d91df015cf4a")
|
||||
version("0.28.0", sha256="2c0aa55c1748ba406eec2db21bf44ebec62b1d5812b6ba350b5d421af1544adb")
|
||||
version("0.25.0", sha256="c536188f5db744371f526f3059960945ed580b3ee60553a4f01956251ab36d20")
|
||||
|
||||
depends_on("go@1.23:", type="build", when="@0.31:")
|
||||
depends_on("go@1.22:", type="build", when="@0.25:")
|
||||
|
||||
build_directory = "cmd/goimports"
|
||||
|
||||
@@ -17,6 +17,7 @@ class Gopls(GoPackage):
|
||||
|
||||
license("BSD-3-Clause", checked_by="alecbcs")
|
||||
|
||||
version("0.18.1", sha256="e49fae5dd964432a0ea1661868e858acd2aa66aaf7e1c1d646fb8506f15c8e52")
|
||||
version("0.17.1", sha256="5794ebd3302ef4fd08de284834b22810dbb17b7e08efeeaa9b96d5c94eb90d6d")
|
||||
version("0.16.2", sha256="be68b3159fcb8cde9ebb8b468f67f03531c58be2de33edbac69e5599f2d4a2c1")
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ class Hugo(GoPackage):
|
||||
|
||||
license("Apache-2.0")
|
||||
|
||||
version("0.147.3", sha256="cc37a9ecec5f8065d1854916c317015fb2b6e8ecc391db5a04adfc3818599152")
|
||||
version("0.145.0", sha256="f6cfcfa4575ff25a08e68b638367df60b28e28a7917471c5deec6396eae26ae2")
|
||||
version("0.140.2", sha256="45594ddf39d62d227cfd54c19fb9a09ab851cf537caee6138de0ddd4f1f6f117")
|
||||
version("0.135.0", sha256="a75c4c684d2125255f214d11b9834a5ec6eb64353f4de2c06952d2b3b7430f0e")
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
from spack_repo.builtin.build_systems.cmake import CMakePackage
|
||||
|
||||
import archspec
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@@ -62,10 +60,7 @@ class Iwyu(CMakePackage):
|
||||
depends_on("llvm+clang@8.0:8", when="@0.12")
|
||||
depends_on("llvm+clang@7.0:7", when="@0.11")
|
||||
|
||||
# iwyu uses X86AsmParser so must have the x86 target on non-x86 arch
|
||||
_arches = set(str(x.family) for x in archspec.cpu.TARGETS.values())
|
||||
for _arch in _arches - set(["x86", "x86_64"]):
|
||||
depends_on("llvm targets=x86", when=f"arch={_arch}:")
|
||||
requires("llvm targets=all", "llvm targets=x86", msg="iwyu needs the X86AsmParser")
|
||||
|
||||
patch("iwyu-013-cmake.patch", when="@0.13:0.14")
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ class Justbuild(Package):
|
||||
license("Apache-2.0")
|
||||
|
||||
version("master", branch="master")
|
||||
version("1.5.2", tag="v1.5.2", commit="bcf1d9a1ed766ee35808f23b48481cbc5168346f")
|
||||
version("1.5.1", tag="v1.5.1", commit="bf25529bddd6dca549235ae1b3fecc34e3025e56")
|
||||
version("1.5.0", tag="v1.5.0", commit="21d9afbfb744596f0e7646c386870e78dbeab922")
|
||||
version("1.4.3", tag="v1.4.3", commit="dfbfdc230805a7c92baa7e49d82edc2816e00511")
|
||||
version("1.4.2", tag="v1.4.2", commit="7fd5d41bc219acf0d15da5dfc75d8dd4a6c53ba3")
|
||||
|
||||
@@ -19,6 +19,7 @@ class Kubectl(GoPackage):
|
||||
|
||||
license("Apache-2.0")
|
||||
|
||||
version("1.33.1", sha256="f89203e326de4c827a23ef9aa430d8a3133f62cfa1f5a894e8c85784f01bf055")
|
||||
version("1.32.3", sha256="b1ed5abe78a626804aadc49ecb8ade6fd33b27ab8c23d43cd59dc86f6462ac09")
|
||||
version("1.31.7", sha256="92005ebd010a8d4fe3a532444c4645840e0af486062611a4d9c8d862414c3f56")
|
||||
version("1.30.11", sha256="f30e4082b6a554d4a2bfedd8b2308a5e6012287e15bec94f72987f717bab4133")
|
||||
@@ -40,13 +41,12 @@ class Kubectl(GoPackage):
|
||||
"1.27.0", sha256="536025dba2714ee5e940bb0a6b1df9ca97c244fa5b00236e012776a69121c323"
|
||||
)
|
||||
|
||||
with default_args(type="build"):
|
||||
depends_on("bash")
|
||||
|
||||
depends_on("go@1.23:", when="@1.32:")
|
||||
depends_on("go@1.22:", when="@1.30:")
|
||||
depends_on("go@1.21:", when="@1.29:")
|
||||
depends_on("go@1.20:", when="@1.27:")
|
||||
depends_on("bash", type="build")
|
||||
depends_on("go@1.24:", type="build", when="@1.33:")
|
||||
depends_on("go@1.23:", type="build", when="@1.32:")
|
||||
depends_on("go@1.22:", type="build", when="@1.30:")
|
||||
depends_on("go@1.21:", type="build", when="@1.29:")
|
||||
depends_on("go@1.20:", type="build", when="@1.27:")
|
||||
|
||||
build_directory = "cmd/kubectl"
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class Mgis(CMakePackage):
|
||||
depends_on("fortran", type="build") # generated
|
||||
|
||||
depends_on("tfel@5.0.1", when="@3.0.1")
|
||||
depends_on("tfel@5.0.0", when="@3.0.0")
|
||||
depends_on("tfel@5.0.0", when="@3.0")
|
||||
depends_on("tfel@4.2.3", when="@2.2.1")
|
||||
depends_on("tfel@4.2.0", when="@2.2.0")
|
||||
depends_on("tfel@4.1.0", when="@2.1")
|
||||
|
||||
@@ -58,6 +58,10 @@ class Mpfr(AutotoolsPackage, GNUMirrorPackage):
|
||||
# Check the Bugs section of old release pages for patches.
|
||||
# https://www.mpfr.org/mpfr-X.Y.Z/#bugs
|
||||
for ver, checksum in (
|
||||
("4.2.1", "3ec29a67cfa75c35e90d32cafa552956018c79526b4aa412f3beff21dacfb41e"),
|
||||
("4.2.0", "a9099cee74188d5f522b7b3fca0097196c6dd38126f8f042d233010cbf92e8d0"),
|
||||
("4.1.1", "80a3c2709be21acaac12a9cc99888d63a00fa77fb75576f205fe8ba1984ff44a"),
|
||||
("4.1.0", "75af77904037442fcd3061a4fee2394194716c542e96989dcfac2445c842daf1"),
|
||||
("4.0.2", "3f80b836948aa96f8d1cb9cc7f3f55973f19285482a96f9a4e1623d460bcccf0"),
|
||||
("4.0.1", "5230aab653fa8675fc05b5bdd3890e071e8df49a92a9d58c4284024affd27739"),
|
||||
("3.1.6", "7a6dd71bcda4803d6b89612706a17b8816e1acd5dd9bf1bec29cf748f3b60008"),
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
from spack_repo.builtin.build_systems.compiler import CompilerPackage
|
||||
from spack_repo.builtin.build_systems.generic import Package
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import spack.platforms
|
||||
from spack.package import *
|
||||
|
||||
@@ -150,7 +148,7 @@ def init_msvc(self):
|
||||
# get current platform architecture and format for vcvars argument
|
||||
arch = spack.platforms.real_host().default.lower()
|
||||
arch = arch.replace("-", "_")
|
||||
if str(archspec.cpu.host().family) == "x86_64":
|
||||
if self.spec.satisfies("target=x86_64:"):
|
||||
arch = "amd64"
|
||||
|
||||
msvc_version = Version(re.search(Msvc.compiler_version_regex, self.cc).group(1))
|
||||
|
||||
@@ -51,6 +51,7 @@ class Openldap(AutotoolsPackage):
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
depends_on("uuid")
|
||||
depends_on("icu4c", when="+icu")
|
||||
|
||||
with when("~client_only"):
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
from spack_repo.builtin.build_systems.generic import Package
|
||||
|
||||
from llnl.util.filesystem import windows_sfn
|
||||
from llnl.util.lang import match_predicate
|
||||
from llnl.util.symlink import symlink
|
||||
|
||||
from spack.operating_systems.mac_os import macos_version
|
||||
from spack.package import *
|
||||
@@ -580,23 +578,6 @@ def make_briefly_writable(self, path):
|
||||
yield
|
||||
os.chmod(path, perm)
|
||||
|
||||
# ========================================================================
|
||||
# Handle specifics of activating and deactivating perl modules.
|
||||
# ========================================================================
|
||||
|
||||
def perl_ignore(self, ext_pkg, args):
|
||||
"""Add some ignore files to activate/deactivate args."""
|
||||
ignore_arg = args.get("ignore", lambda f: False)
|
||||
|
||||
# Many perl packages describe themselves in a perllocal.pod file,
|
||||
# so the files conflict when multiple packages are activated.
|
||||
# We could merge the perllocal.pod files in activated packages,
|
||||
# but this is unnecessary for correct operation of perl.
|
||||
# For simplicity, we simply ignore all perllocal.pod files:
|
||||
patterns = [r"perllocal\.pod$"]
|
||||
|
||||
return match_predicate(ignore_arg, patterns)
|
||||
|
||||
@property
|
||||
def command(self):
|
||||
"""Returns the Perl command, which may vary depending on the version
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user