Compare commits

..

76 Commits

Author SHA1 Message Date
Harmen Stoppels
bf17cd8dd6 vtk: lzma patch for v9.0 2024-08-30 10:16:18 +02:00
Harmen Stoppels
4b54e72351 troubleshoot further.. 2024-08-30 10:03:19 +02:00
Harmen Stoppels
199cbce5ef windows-vis: vtk~mpi (#46133) 2024-08-30 09:38:41 +02:00
Massimiliano Culpo
82dea7e6ce mpitrampoline: fix wrong use of compiler.cc_names (#46038) 2024-08-30 07:50:09 +02:00
Harmen Stoppels
bd71ce5856 cray: allow failure due to broken blas (#46111)
1. libsci_cray.so is broken, as it fails to list `libdl.so` in
   DT_NEEDED.
2. cray compilers fail to build a different blas
2024-08-30 07:49:10 +02:00
Mark Abraham
73fc86cbc3 gromacs: support version 2024.3 (#46117) 2024-08-29 17:38:04 -06:00
Chris White
3589edcc6d conduit package: Honor compiler extra_rpaths + extras (#46046)
- Honor compiler extra_rpaths (this build bypasses spack wrappers,
  so the RPATHs are added explicitly as CMake options)
- Use root_cmakelists_dir instead of adding it to the command line
- Add BLT as a dependency, allowing different versions outside of what
  is in the tarball
- Put a copy of host-config in the stage directory: this allows
  examination of the host-config when a build fails (before, the
  host-config was just stored in the install directory, which is
  deleted by default on a failed build)
2024-08-29 13:59:15 -07:00
Chris Marsh
cade66d842 CMakePackage: Set policy CMP0042 NEW on macos (#46114)
so linking to shared libraries works well at runtime on darwin for all packages with cmake_minimum_required < 3.
2024-08-29 18:49:53 +00:00
Louise Spellacy
c5766aa757 linaro-forge: added 24.0.4 version (#46112)
Updated platform.machine() to only match "aarch64".
"arm64" not supported by "spack arch"
2024-08-29 12:33:49 -06:00
Harmen Stoppels
c3e9bd4fbf spectrum-mpi: no windows (#46119) 2024-08-29 20:04:33 +02:00
Harmen Stoppels
05357052ac py-greenlet: add missing forward compat bound (#46113) 2024-08-29 17:55:26 +02:00
Harmen Stoppels
dc3f5cd606 windows_establish_runtime_linkage: post install hook (#46103) 2024-08-29 17:16:36 +02:00
Alberto Invernizzi
9a16927993 paraview: add cdi support (#44222)
* add basic CDI package

* add CDI variant to paraview

* [@spackbot] updating style on behalf of albestro

---------

Co-authored-by: albestro <albestro@users.noreply.github.com>
2024-08-29 14:19:04 +02:00
Wouter Deconinck
093b273f5c py-mypy: add v1.11.2 (#46099) 2024-08-29 05:46:36 -06:00
Tamara Dahlgren
b6ff126494 Executable: make the timeout message readable (#46098) 2024-08-29 11:46:15 +00:00
Harmen Stoppels
fe8f631b7d tau: fix (cray) compiler names/paths (#46104)
fixes a build issue on cray ci
2024-08-29 11:24:58 +02:00
Massimiliano Culpo
f9065f0c7e Remove "get_compiler_duplicates" (#46077)
This function is used only in tests.
2024-08-29 06:53:17 +02:00
etiennemlb
699735016f Add more compiler leniency (#46083) 2024-08-28 16:33:26 -07:00
Arne Becker
ec85bbe3f7 perl-compress-bzip2: new package (#46055)
* perl-compress-bzip2: new package
  Adds Compress::Bzip2
* Use bzip2 from Spack, not system
2024-08-28 13:57:01 -07:00
Taillefumier Mathieu
7e1ad8f321 [Update] New version of sirius (#46049) 2024-08-28 13:38:06 -07:00
Derek Ryan Strong
0eb8f4f0f9 pmix: add v5.0.3 and fix variants (#45621)
* Add pmix v5.0.3 and fix variants
* Update pmix homepage link
* pmix: Simplify/update hwloc dependency
* pmix: Update versions for --disable-sphinx configure option
* pmix: Add munge variant
* pmix: Add zlib dependency
* pmix: Fix dependency py-sphinx@5
2024-08-28 12:59:48 -07:00
renjithravindrankannath
ee27dc5d45 llvm-amdgpu: Updating LD_LIBRARY_PATH w.r.t new prefix path (#45940)
* Updating LD_LIBRARY_PATH w.r.t new prefix path

* Updating hsa external path for 6.x
2024-08-28 11:26:05 -07:00
Robert Underwood
ec0a57cba4 py-numcodecs rename git branch to match upstream (#46085)
* py-numcodecs rename git branch to match upstream
2024-08-28 19:16:23 +02:00
Jordan Galby
4c91e6245c Don't check checksums on spack-develop packages (#46076)
Fix regression introduced in spack 0.22.1 where Spack would ask about checksums
on spack-develop packages.
2024-08-28 17:07:30 +00:00
Satish Balay
6a1dfbda97 mfem, pflotran, alquimia: remove old versions with xsdk string (in version) that were used in old/removed xsdk releases (#45837) 2024-08-28 10:03:51 -07:00
Jordan Galby
6b0011c8f1 For "when:" and install_environment.json: Support fully qualified hostname (#45522) 2024-08-28 18:38:54 +02:00
Nicholas Sly
8b5521ec0a Replace unparsable apostrophe character with ASCII "'". (#46069) 2024-08-28 18:34:06 +02:00
Mikael Simberg
b9e4e98f15 boost: install BoostConfig.cmake even when header-only (#46062)
* Install BoostConfig.cmake even when header-only

* boost: Only use --without-libraries when --with-libraries would have an empty list
2024-08-28 17:44:02 +02:00
Harmen Stoppels
85487f23bc buildcache.py: elide string not spec (#46074) 2024-08-28 15:27:44 +02:00
Harmen Stoppels
fb4811ec3f Drop now redundant use of inspect (#46057)
inspect.isclass -> isinstance(..., type)
inspect.getmro -> cls.__mro__
2024-08-28 14:35:08 +02:00
Mark Abraham
202e64872a gromacs: add conflict between NVSHMEM and cuFFTMp (#46065)
* Add conflict between NVSHMEM and cuFFTMp for GROMACS package

These don't work in the same build configuration.

* [@spackbot] updating style on behalf of mabraham

* Update package.py

Also constrain NVSHMEM appropriately

* Update var/spack/repos/builtin/packages/gromacs/package.py

Co-authored-by: Andrey Alekseenko <al42and@gmail.com>

* Update package.py

* [@spackbot] updating style on behalf of mabraham

* Update package.py

* Update package.py

* Update package.py

* [@spackbot] updating style on behalf of mabraham

---------

Co-authored-by: mabraham <mabraham@users.noreply.github.com>
Co-authored-by: Christoph Junghans <christoph.junghans@gmail.com>
Co-authored-by: Andrey Alekseenko <al42and@gmail.com>
2024-08-28 04:34:37 -06:00
Massimiliano Culpo
25ba3124bd Spec.from_detection now accounts for external prefix (#46063)
Change the signature of Spec.from_detection to set the
external prefix, and the external modules, if they are
present.

Delete "spack.package_prefs.spec_externals" since it
is unused.
2024-08-28 10:51:36 +02:00
Massimiliano Culpo
df57e1ceb3 Remove llnl.util.lang.has_method, use built-in hasattr instead (#46072) 2024-08-28 10:17:12 +02:00
Adam J. Stewart
59b4b785e0 py-numpy: add v2.0.2 (#46056) 2024-08-27 11:20:42 -07:00
Brian Spilner
b1b21a4d02 cdo-2.4.3 (#46033)
cdo-2.4.3 - fixed hash
2024-08-27 11:17:16 -07:00
Ye Luo
b1af32cb60 Introduce offload variant for llvm >= 19. (#45865) 2024-08-27 13:44:01 -04:00
Harmen Stoppels
9d8f94a7c8 spack_yaml: delete custom deepcopy (#46048) 2024-08-27 18:45:44 +02:00
Massimiliano Culpo
1297673a70 Remove "prevent_cray_detection" context manager (#46060)
This context manager was used to prevent detecting a platform
as "cray". Since now Cray machines are detected as linux, we can
remove the context manager.
2024-08-27 18:43:07 +02:00
Harmen Stoppels
0fee2c234e config.py: tell don't ask (#46040) 2024-08-27 15:55:44 +02:00
Alec Scott
229cf49c71 bfs: add v4.0.1 (#46044)
* bfs: add v4.0.1

* fix style
2024-08-27 08:15:38 -05:00
Massimiliano Culpo
394e6159d6 Remove a few unused classes and globals (#46054) 2024-08-27 15:06:39 +02:00
Stephen Nicholas Swatman
cbe18d9cbc detray: add version 0.73.0 (#46053)
This commit adds version 0.73.0 of the detray package. As this version
drops support for pre-C++20 standards, I had to update the `cxxstd`
variant logic.
2024-08-27 08:05:06 -05:00
Stephen Nicholas Swatman
2d83707f84 acts: add version 36.2.0 (#46052)
This commit adds version 36.2.0 of ACTS. As far as I can tell, there are
no dependency changes.
2024-08-27 07:18:06 -05:00
Massimiliano Culpo
9a91f021a7 Move spack.compilers._to_dict to Compiler (#46051) 2024-08-27 14:01:50 +02:00
Harmen Stoppels
297e43b097 abi.py: remove (#46047) 2024-08-27 10:38:54 +02:00
FrederickDeny
900765901d Added e4s-cl@1.0.4 (#46043) 2024-08-26 23:26:12 -06:00
Nick Hagerty
680d1f2e58 lammps: improve FFT selection and add fft_kokkos variant (#45969) 2024-08-27 07:15:12 +02:00
Richard Berger
76957f19f9 nvpl-fft: new package (#45985) 2024-08-26 21:42:30 -06:00
AcriusWinter
c7001efeb8 sundials: new test API (#45373)
* sundials: new test API

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-08-26 15:34:06 -07:00
Harmen Stoppels
a60d1084b1 jsonschema: remove optional deps (#46041) 2024-08-26 22:15:52 +02:00
Harmen Stoppels
497e19f0e3 distro.py: avoid excessive stat calls (#46030) 2024-08-26 18:55:55 +02:00
Pranav Sivaraman
cd6ee96398 parallel-hashmap: add v1.3.12 (#46017)
Co-authored-by: pranav-sivaraman <pranav-sivaraman@users.noreply.github.com>
2024-08-26 10:03:38 -06:00
Wouter Deconinck
904d85b53b fastjson: add v1.2.83, v2.0.52 (#45733)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-08-26 16:29:02 +02:00
Tamara Dahlgren
199653dd31 Bugfix/hsakmt-roct: use correct version for rocm-core and llvm-amdgpu (#45817) 2024-08-26 16:14:20 +02:00
Matthieu Dorier
fdfb4e9893 mruby: add v3.3.0 (#45964) 2024-08-26 15:33:00 +02:00
Adam J. Stewart
afa76ebbdc py-smp: add v0.3.4 (#45967) 2024-08-26 15:31:53 +02:00
Patrick Diehl
e5c045cc1c kokkos: add v4.4.00 (#45758)
Co-authored-by: Patrick Diehl <diehlpk@lanl.gov>
2024-08-26 15:28:35 +02:00
pauleonix
8c92836c39 cuda: add v12.6 (#45558) 2024-08-26 15:27:07 +02:00
Wouter Deconinck
a782e6bc33 r-googlesheets4: fix r-gargle dependency (#45980) 2024-08-26 14:37:00 +02:00
mvlopri
4ede0ae5e3 seacas: add parallel as a dependency (#45981) 2024-08-26 14:31:17 +02:00
Wouter Deconinck
986325eb0d r-pbkrtest: fix typo in dependency (#45997) 2024-08-26 14:25:01 +02:00
Wouter Deconinck
8bcd64ce6c r-diagram: fix dependency on non-existent R version (#46003) 2024-08-26 14:11:41 +02:00
Wouter Deconinck
f079ad3690 r-sf: deprecate unconcretizable 0.5-5 (#46016) 2024-08-26 14:10:25 +02:00
Juan Miguel Carceller
8c1d6188e3 gaudi: remove redundant dependency on cppgsl (#46029)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-08-26 14:09:48 +02:00
Todd Gamblin
1d70ab934c ci generate: don't warn when no cdash config (#46004)
Right now if you run `spack ci generate` you get a warning about CDash credentials even
if there's no CDash configuration specified. We should only warn if there was actually a
CDash config.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-26 13:58:41 +02:00
Kacper Kornet
fa704e867c polyml: add new package (#46020) 2024-08-26 13:42:30 +02:00
Kacper Kornet
85939b26ae mrbayes: readline and mpi variants are mutually exclusive (#46021) 2024-08-26 13:38:57 +02:00
Wouter Deconinck
a5436b3962 R: external detection (#46023)
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-08-26 13:37:35 +02:00
James Shen
a8e25193e0 root: patch v6.22.08 (#46019) 2024-08-26 13:16:25 +02:00
Wouter Deconinck
480d6f9911 cppunit: add v1.15.1; deprecate custom commit version (#46026) 2024-08-26 13:15:29 +02:00
Harmen Stoppels
02f329a8af compilers: avoid redundant fs operations and cache (#46031) 2024-08-26 12:49:58 +02:00
Wouter Deconinck
2de712b35f netfilter pkgs: avoid 3rd party urls, add latest official version (#46027)
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-08-26 12:41:11 +02:00
Wouter Deconinck
aa49b3d8ce lshw: add v02.20 (#46028) 2024-08-26 09:46:41 +02:00
Adam J. Stewart
eccecba39a Python: add v3.12.5, default to latest version (#45712)
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-25 18:49:01 -07:00
Harmen Stoppels
94c99fc5d4 variant.py: extract spec bits into spec.py (#45941) 2024-08-24 09:45:23 +02:00
John W. Parent
1f1021a47f PythonExtension: use different bin dir on Windows (#45427) 2024-08-24 09:34:24 +02:00
115 changed files with 1320 additions and 1197 deletions

View File

@@ -893,8 +893,9 @@ The valid variables for a ``when`` clause are:
#. ``env``. The user environment (usually ``os.environ`` in Python).
#. ``hostname``. The hostname of the system (if ``hostname`` is an
executable in the user's PATH).
#. ``hostname``. The hostname of the system.
#. ``full_hostname``. The fully qualified hostname of the system.
^^^^^^^^^^^^^^^^^^^^^^^^
SpecLists as Constraints

View File

@@ -1265,27 +1265,29 @@ def _distro_release_info(self) -> Dict[str, str]:
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
else:
try:
basenames = [
basename
for basename in os.listdir(self.etc_dir)
if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES
and os.path.isfile(os.path.join(self.etc_dir, basename))
]
with os.scandir(self.etc_dir) as it:
etc_files = [
p.path for p in it
if p.is_file() and p.name not in _DISTRO_RELEASE_IGNORE_BASENAMES
]
# We sort for repeatability in cases where there are multiple
# distro specific files; e.g. CentOS, Oracle, Enterprise all
# containing `redhat-release` on top of their own.
basenames.sort()
etc_files.sort()
except OSError:
# This may occur when /etc is not readable but we can't be
# sure about the *-release files. Check common entries of
# /etc for information. If they turn out to not be there the
# error is handled in `_parse_distro_release_file()`.
basenames = _DISTRO_RELEASE_BASENAMES
for basename in basenames:
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
etc_files = [
os.path.join(self.etc_dir, basename)
for basename in _DISTRO_RELEASE_BASENAMES
]
for filepath in etc_files:
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(os.path.basename(filepath))
if match is None:
continue
filepath = os.path.join(self.etc_dir, basename)
distro_info = self._parse_distro_release_file(filepath)
# The name is always present if the pattern matches.
if "name" not in distro_info:

View File

@@ -231,96 +231,6 @@ def is_host_name(instance):
return True
try:
# The built-in `idna` codec only implements RFC 3890, so we go elsewhere.
import idna
except ImportError:
pass
else:
@_checks_drafts(draft7="idn-hostname", raises=idna.IDNAError)
def is_idn_host_name(instance):
if not isinstance(instance, str_types):
return True
idna.encode(instance)
return True
try:
import rfc3987
except ImportError:
try:
from rfc3986_validator import validate_rfc3986
except ImportError:
pass
else:
@_checks_drafts(name="uri")
def is_uri(instance):
if not isinstance(instance, str_types):
return True
return validate_rfc3986(instance, rule="URI")
@_checks_drafts(
draft6="uri-reference",
draft7="uri-reference",
raises=ValueError,
)
def is_uri_reference(instance):
if not isinstance(instance, str_types):
return True
return validate_rfc3986(instance, rule="URI_reference")
else:
@_checks_drafts(draft7="iri", raises=ValueError)
def is_iri(instance):
if not isinstance(instance, str_types):
return True
return rfc3987.parse(instance, rule="IRI")
@_checks_drafts(draft7="iri-reference", raises=ValueError)
def is_iri_reference(instance):
if not isinstance(instance, str_types):
return True
return rfc3987.parse(instance, rule="IRI_reference")
@_checks_drafts(name="uri", raises=ValueError)
def is_uri(instance):
if not isinstance(instance, str_types):
return True
return rfc3987.parse(instance, rule="URI")
@_checks_drafts(
draft6="uri-reference",
draft7="uri-reference",
raises=ValueError,
)
def is_uri_reference(instance):
if not isinstance(instance, str_types):
return True
return rfc3987.parse(instance, rule="URI_reference")
try:
from strict_rfc3339 import validate_rfc3339
except ImportError:
try:
from rfc3339_validator import validate_rfc3339
except ImportError:
validate_rfc3339 = None
if validate_rfc3339:
@_checks_drafts(name="date-time")
def is_datetime(instance):
if not isinstance(instance, str_types):
return True
return validate_rfc3339(instance)
@_checks_drafts(draft7="time")
def is_time(instance):
if not isinstance(instance, str_types):
return True
return is_datetime("1970-01-01T" + instance)
@_checks_drafts(name="regex", raises=re.error)
def is_regex(instance):
if not isinstance(instance, str_types):
@@ -340,86 +250,3 @@ def is_draft3_time(instance):
if not isinstance(instance, str_types):
return True
return datetime.datetime.strptime(instance, "%H:%M:%S")
try:
import webcolors
except ImportError:
pass
else:
def is_css_color_code(instance):
return webcolors.normalize_hex(instance)
@_checks_drafts(draft3="color", raises=(ValueError, TypeError))
def is_css21_color(instance):
if (
not isinstance(instance, str_types) or
instance.lower() in webcolors.css21_names_to_hex
):
return True
return is_css_color_code(instance)
def is_css3_color(instance):
if instance.lower() in webcolors.css3_names_to_hex:
return True
return is_css_color_code(instance)
try:
import jsonpointer
except ImportError:
pass
else:
@_checks_drafts(
draft6="json-pointer",
draft7="json-pointer",
raises=jsonpointer.JsonPointerException,
)
def is_json_pointer(instance):
if not isinstance(instance, str_types):
return True
return jsonpointer.JsonPointer(instance)
# TODO: I don't want to maintain this, so it
# needs to go either into jsonpointer (pending
# https://github.com/stefankoegl/python-json-pointer/issues/34) or
# into a new external library.
@_checks_drafts(
draft7="relative-json-pointer",
raises=jsonpointer.JsonPointerException,
)
def is_relative_json_pointer(instance):
# Definition taken from:
# https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01#section-3
if not isinstance(instance, str_types):
return True
non_negative_integer, rest = [], ""
for i, character in enumerate(instance):
if character.isdigit():
non_negative_integer.append(character)
continue
if not non_negative_integer:
return False
rest = instance[i:]
break
return (rest == "#") or jsonpointer.JsonPointer(rest)
try:
import uritemplate.exceptions
except ImportError:
pass
else:
@_checks_drafts(
draft6="uri-template",
draft7="uri-template",
raises=uritemplate.exceptions.InvalidTemplate,
)
def is_uri_template(
instance,
template_validator=uritemplate.Validator().force_balanced_braces(),
):
template = uritemplate.URITemplate(instance)
return template_validator.validate(template)

45
lib/spack/external/patches/distro.patch vendored Normal file
View File

@@ -0,0 +1,45 @@
diff --git a/lib/spack/external/_vendoring/distro/distro.py b/lib/spack/external/_vendoring/distro/distro.py
index 89e1868047..50c3b18d4d 100644
--- a/lib/spack/external/_vendoring/distro/distro.py
+++ b/lib/spack/external/_vendoring/distro/distro.py
@@ -1265,27 +1265,29 @@ def _distro_release_info(self) -> Dict[str, str]:
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
else:
try:
- basenames = [
- basename
- for basename in os.listdir(self.etc_dir)
- if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES
- and os.path.isfile(os.path.join(self.etc_dir, basename))
- ]
+ with os.scandir(self.etc_dir) as it:
+ etc_files = [
+ p.path for p in it
+ if p.is_file() and p.name not in _DISTRO_RELEASE_IGNORE_BASENAMES
+ ]
# We sort for repeatability in cases where there are multiple
# distro specific files; e.g. CentOS, Oracle, Enterprise all
# containing `redhat-release` on top of their own.
- basenames.sort()
+ etc_files.sort()
except OSError:
# This may occur when /etc is not readable but we can't be
# sure about the *-release files. Check common entries of
# /etc for information. If they turn out to not be there the
# error is handled in `_parse_distro_release_file()`.
- basenames = _DISTRO_RELEASE_BASENAMES
- for basename in basenames:
- match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
+ etc_files = [
+ os.path.join(self.etc_dir, basename)
+ for basename in _DISTRO_RELEASE_BASENAMES
+ ]
+
+ for filepath in etc_files:
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(os.path.basename(filepath))
if match is None:
continue
- filepath = os.path.join(self.etc_dir, basename)
distro_info = self._parse_distro_release_file(filepath)
# The name is always present if the pattern matches.
if "name" not in distro_info:

View File

@@ -13,3 +13,191 @@ index 6b630cdfbb..1791fe7fbf 100644
-__version__ = metadata.version("jsonschema")
+
+__version__ = "3.2.0"
diff --git a/lib/spack/external/_vendoring/jsonschema/_format.py b/lib/spack/external/_vendoring/jsonschema/_format.py
index 281a7cfcff..29061e3661 100644
--- a/lib/spack/external/_vendoring/jsonschema/_format.py
+++ b/lib/spack/external/_vendoring/jsonschema/_format.py
@@ -231,96 +231,6 @@ def is_host_name(instance):
return True
-try:
- # The built-in `idna` codec only implements RFC 3890, so we go elsewhere.
- import idna
-except ImportError:
- pass
-else:
- @_checks_drafts(draft7="idn-hostname", raises=idna.IDNAError)
- def is_idn_host_name(instance):
- if not isinstance(instance, str_types):
- return True
- idna.encode(instance)
- return True
-
-
-try:
- import rfc3987
-except ImportError:
- try:
- from rfc3986_validator import validate_rfc3986
- except ImportError:
- pass
- else:
- @_checks_drafts(name="uri")
- def is_uri(instance):
- if not isinstance(instance, str_types):
- return True
- return validate_rfc3986(instance, rule="URI")
-
- @_checks_drafts(
- draft6="uri-reference",
- draft7="uri-reference",
- raises=ValueError,
- )
- def is_uri_reference(instance):
- if not isinstance(instance, str_types):
- return True
- return validate_rfc3986(instance, rule="URI_reference")
-
-else:
- @_checks_drafts(draft7="iri", raises=ValueError)
- def is_iri(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="IRI")
-
- @_checks_drafts(draft7="iri-reference", raises=ValueError)
- def is_iri_reference(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="IRI_reference")
-
- @_checks_drafts(name="uri", raises=ValueError)
- def is_uri(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="URI")
-
- @_checks_drafts(
- draft6="uri-reference",
- draft7="uri-reference",
- raises=ValueError,
- )
- def is_uri_reference(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="URI_reference")
-
-
-try:
- from strict_rfc3339 import validate_rfc3339
-except ImportError:
- try:
- from rfc3339_validator import validate_rfc3339
- except ImportError:
- validate_rfc3339 = None
-
-if validate_rfc3339:
- @_checks_drafts(name="date-time")
- def is_datetime(instance):
- if not isinstance(instance, str_types):
- return True
- return validate_rfc3339(instance)
-
- @_checks_drafts(draft7="time")
- def is_time(instance):
- if not isinstance(instance, str_types):
- return True
- return is_datetime("1970-01-01T" + instance)
-
-
@_checks_drafts(name="regex", raises=re.error)
def is_regex(instance):
if not isinstance(instance, str_types):
@@ -340,86 +250,3 @@ def is_draft3_time(instance):
if not isinstance(instance, str_types):
return True
return datetime.datetime.strptime(instance, "%H:%M:%S")
-
-
-try:
- import webcolors
-except ImportError:
- pass
-else:
- def is_css_color_code(instance):
- return webcolors.normalize_hex(instance)
-
- @_checks_drafts(draft3="color", raises=(ValueError, TypeError))
- def is_css21_color(instance):
- if (
- not isinstance(instance, str_types) or
- instance.lower() in webcolors.css21_names_to_hex
- ):
- return True
- return is_css_color_code(instance)
-
- def is_css3_color(instance):
- if instance.lower() in webcolors.css3_names_to_hex:
- return True
- return is_css_color_code(instance)
-
-
-try:
- import jsonpointer
-except ImportError:
- pass
-else:
- @_checks_drafts(
- draft6="json-pointer",
- draft7="json-pointer",
- raises=jsonpointer.JsonPointerException,
- )
- def is_json_pointer(instance):
- if not isinstance(instance, str_types):
- return True
- return jsonpointer.JsonPointer(instance)
-
- # TODO: I don't want to maintain this, so it
- # needs to go either into jsonpointer (pending
- # https://github.com/stefankoegl/python-json-pointer/issues/34) or
- # into a new external library.
- @_checks_drafts(
- draft7="relative-json-pointer",
- raises=jsonpointer.JsonPointerException,
- )
- def is_relative_json_pointer(instance):
- # Definition taken from:
- # https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01#section-3
- if not isinstance(instance, str_types):
- return True
- non_negative_integer, rest = [], ""
- for i, character in enumerate(instance):
- if character.isdigit():
- non_negative_integer.append(character)
- continue
-
- if not non_negative_integer:
- return False
-
- rest = instance[i:]
- break
- return (rest == "#") or jsonpointer.JsonPointer(rest)
-
-
-try:
- import uritemplate.exceptions
-except ImportError:
- pass
-else:
- @_checks_drafts(
- draft6="uri-template",
- draft7="uri-template",
- raises=uritemplate.exceptions.InvalidTemplate,
- )
- def is_uri_template(
- instance,
- template_validator=uritemplate.Validator().force_balanced_braces(),
- ):
- template = uritemplate.URITemplate(instance)
- return template_validator.validate(template)

View File

@@ -6,7 +6,6 @@
import collections.abc
import contextlib
import functools
import inspect
import itertools
import os
import re
@@ -16,7 +15,7 @@
from typing import Any, Callable, Iterable, List, Tuple
# Ignore emacs backups when listing modules
ignore_modules = [r"^\.#", "~$"]
ignore_modules = r"^\.#|~$"
def index_by(objects, *funcs):
@@ -91,15 +90,6 @@ def attr_setdefault(obj, name, value):
return getattr(obj, name)
def has_method(cls, name):
for base in inspect.getmro(cls):
if base is object:
continue
if name in base.__dict__:
return True
return False
def union_dicts(*dicts):
"""Use update() to combine all dicts into one.
@@ -164,19 +154,22 @@ def list_modules(directory, **kwargs):
order."""
list_directories = kwargs.setdefault("directories", True)
for name in os.listdir(directory):
if name == "__init__.py":
continue
ignore = re.compile(ignore_modules)
path = os.path.join(directory, name)
if list_directories and os.path.isdir(path):
init_py = os.path.join(path, "__init__.py")
if os.path.isfile(init_py):
yield name
with os.scandir(directory) as it:
for entry in it:
if entry.name == "__init__.py" or entry.name == "__pycache__":
continue
elif name.endswith(".py"):
if not any(re.search(pattern, name) for pattern in ignore_modules):
yield re.sub(".py$", "", name)
if (
list_directories
and entry.is_dir()
and os.path.isfile(os.path.join(entry.path, "__init__.py"))
):
yield entry.name
elif entry.name.endswith(".py") and entry.is_file() and not ignore.search(entry.name):
yield entry.name[:-3] # strip .py
def decorator_with_or_without_args(decorator):
@@ -223,8 +216,8 @@ def setter(name, value):
value.__name__ = name
setattr(cls, name, value)
if not has_method(cls, "_cmp_key"):
raise TypeError("'%s' doesn't define _cmp_key()." % cls.__name__)
if not hasattr(cls, "_cmp_key"):
raise TypeError(f"'{cls.__name__}' doesn't define _cmp_key().")
setter("__eq__", lambda s, o: (s is o) or (o is not None and s._cmp_key() == o._cmp_key()))
setter("__lt__", lambda s, o: o is not None and s._cmp_key() < o._cmp_key())
@@ -374,8 +367,8 @@ def cd_fun():
TypeError: If the class does not have a ``_cmp_iter`` method
"""
if not has_method(cls, "_cmp_iter"):
raise TypeError("'%s' doesn't define _cmp_iter()." % cls.__name__)
if not hasattr(cls, "_cmp_iter"):
raise TypeError(f"'{cls.__name__}' doesn't define _cmp_iter().")
# comparison operators are implemented in terms of lazy_eq and lazy_lt
def eq(self, other):
@@ -850,20 +843,19 @@ def uniq(sequence):
return uniq_list
def elide_list(line_list, max_num=10):
def elide_list(line_list: List[str], max_num: int = 10) -> List[str]:
"""Takes a long list and limits it to a smaller number of elements,
replacing intervening elements with '...'. For example::
elide_list([1,2,3,4,5,6], 4)
elide_list(["1", "2", "3", "4", "5", "6"], 4)
gives::
[1, 2, 3, '...', 6]
["1", "2", "3", "...", "6"]
"""
if len(line_list) > max_num:
return line_list[: max_num - 1] + ["..."] + line_list[-1:]
else:
return line_list
return [*line_list[: max_num - 1], "...", line_list[-1]]
return line_list
@contextlib.contextmanager

View File

@@ -1,131 +0,0 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from llnl.util.lang import memoized
import spack.spec
import spack.version
from spack.compilers.clang import Clang
from spack.util.executable import Executable, ProcessError
class ABI:
"""This class provides methods to test ABI compatibility between specs.
The current implementation is rather rough and could be improved."""
def architecture_compatible(
self, target: spack.spec.Spec, constraint: spack.spec.Spec
) -> bool:
"""Return true if architecture of target spec is ABI compatible
to the architecture of constraint spec. If either the target
or constraint specs have no architecture, target is also defined
as architecture ABI compatible to constraint."""
return (
not target.architecture
or not constraint.architecture
or target.architecture.intersects(constraint.architecture)
)
@memoized
def _gcc_get_libstdcxx_version(self, version):
"""Returns gcc ABI compatibility info by getting the library version of
a compiler's libstdc++ or libgcc_s"""
from spack.build_environment import dso_suffix
spec = spack.spec.CompilerSpec("gcc", version)
compilers = spack.compilers.compilers_for_spec(spec)
if not compilers:
return None
compiler = compilers[0]
rungcc = None
libname = None
output = None
if compiler.cxx:
rungcc = Executable(compiler.cxx)
libname = "libstdc++." + dso_suffix
elif compiler.cc:
rungcc = Executable(compiler.cc)
libname = "libgcc_s." + dso_suffix
else:
return None
try:
# Some gcc's are actually clang and don't respond properly to
# --print-file-name (they just print the filename, not the
# full path). Ignore these and expect them to be handled as clang.
if Clang.default_version(rungcc.exe[0]) != "unknown":
return None
output = rungcc("--print-file-name=%s" % libname, output=str)
except ProcessError:
return None
if not output:
return None
libpath = os.path.realpath(output.strip())
if not libpath:
return None
return os.path.basename(libpath)
@memoized
def _gcc_compiler_compare(self, pversion, cversion):
"""Returns true iff the gcc version pversion and cversion
are ABI compatible."""
plib = self._gcc_get_libstdcxx_version(pversion)
clib = self._gcc_get_libstdcxx_version(cversion)
if not plib or not clib:
return False
return plib == clib
def _intel_compiler_compare(
self, pversion: spack.version.ClosedOpenRange, cversion: spack.version.ClosedOpenRange
) -> bool:
"""Returns true iff the intel version pversion and cversion
are ABI compatible"""
# Test major and minor versions. Ignore build version.
pv = pversion.lo
cv = cversion.lo
return pv.up_to(2) == cv.up_to(2)
def compiler_compatible(
self, parent: spack.spec.Spec, child: spack.spec.Spec, loose: bool = False
) -> bool:
"""Return true if compilers for parent and child are ABI compatible."""
if not parent.compiler or not child.compiler:
return True
if parent.compiler.name != child.compiler.name:
# Different compiler families are assumed ABI incompatible
return False
if loose:
return True
# TODO: Can we move the specialized ABI matching stuff
# TODO: into compiler classes?
for pversion in parent.compiler.versions:
for cversion in child.compiler.versions:
# For a few compilers use specialized comparisons.
# Otherwise match on version match.
if pversion.intersects(cversion):
return True
elif parent.compiler.name == "gcc" and self._gcc_compiler_compare(
pversion, cversion
):
return True
elif parent.compiler.name == "intel" and self._intel_compiler_compare(
pversion, cversion
):
return True
return False
def compatible(
self, target: spack.spec.Spec, constraint: spack.spec.Spec, loose: bool = False
) -> bool:
"""Returns true if target spec is ABI compatible to constraint spec"""
return self.architecture_compatible(target, constraint) and self.compiler_compatible(
target, constraint, loose=loose
)

View File

@@ -39,7 +39,6 @@ def _search_duplicate_compilers(error_cls):
import collections
import collections.abc
import glob
import inspect
import io
import itertools
import os
@@ -525,7 +524,7 @@ def _search_for_reserved_attributes_names_in_packages(pkgs, error_cls):
name_definitions = collections.defaultdict(list)
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
for cls_item in inspect.getmro(pkg_cls):
for cls_item in pkg_cls.__mro__:
for name in RESERVED_NAMES:
current_value = cls_item.__dict__.get(name)
if current_value is None:

View File

@@ -2561,7 +2561,6 @@ def install_root_node(spec, unsigned=False, force=False, sha256=None):
with spack.util.path.filter_padding():
tty.msg('Installing "{0}" from a buildcache'.format(spec.format()))
extract_tarball(spec, download_result, force)
spec.package.windows_establish_runtime_linkage()
spack.hooks.post_install(spec, False)
spack.store.STORE.db.add(spec, spack.store.STORE.layout)

View File

@@ -152,7 +152,7 @@ def _ensure_bootstrap_configuration() -> Generator:
bootstrap_store_path = store_path()
user_configuration = _read_and_sanitize_configuration()
with spack.environment.no_active_environment():
with spack.platforms.prevent_cray_detection(), spack.platforms.use_platform(
with spack.platforms.use_platform(
spack.platforms.real_host()
), spack.repo.use_repositories(spack.paths.packages_path):
# Default configuration scopes excluding command line

View File

@@ -1559,7 +1559,7 @@ def __init__(self, package):
#: Modules for the classes in the MRO up to PackageBase
modules_in_mro = []
for cls in inspect.getmro(type(package)):
for cls in type(package).__mro__:
module = cls.module
if module == self.current_module:

View File

@@ -108,6 +108,11 @@ def _conditional_cmake_defaults(pkg: spack.package_base.PackageBase, args: List[
if _supports_compilation_databases(pkg):
args.append(CMakeBuilder.define("CMAKE_EXPORT_COMPILE_COMMANDS", True))
# Enable MACOSX_RPATH by default when cmake_minimum_required < 3
# https://cmake.org/cmake/help/latest/policy/CMP0042.html
if pkg.spec.satisfies("platform=darwin") and cmake.satisfies("@3:"):
args.append(CMakeBuilder.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"))
def generator(*names: str, default: Optional[str] = None):
"""The build system generator to use.

View File

@@ -138,14 +138,14 @@ def cuda_flags(arch_list):
conflicts("%gcc@11.2:", when="+cuda ^cuda@:11.5")
conflicts("%gcc@12:", when="+cuda ^cuda@:11.8")
conflicts("%gcc@13:", when="+cuda ^cuda@:12.3")
conflicts("%gcc@14:", when="+cuda ^cuda@:12.5")
conflicts("%gcc@14:", when="+cuda ^cuda@:12.6")
conflicts("%clang@12:", when="+cuda ^cuda@:11.4.0")
conflicts("%clang@13:", when="+cuda ^cuda@:11.5")
conflicts("%clang@14:", when="+cuda ^cuda@:11.7")
conflicts("%clang@15:", when="+cuda ^cuda@:12.0")
conflicts("%clang@16:", when="+cuda ^cuda@:12.1")
conflicts("%clang@17:", when="+cuda ^cuda@:12.3")
conflicts("%clang@18:", when="+cuda ^cuda@:12.5")
conflicts("%clang@18:", when="+cuda ^cuda@:12.6")
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0")

View File

@@ -17,7 +17,7 @@
import llnl.util.filesystem as fs
import llnl.util.lang as lang
import llnl.util.tty as tty
from llnl.util.filesystem import HeaderList, LibraryList
from llnl.util.filesystem import HeaderList, LibraryList, join_path
import spack.builder
import spack.config
@@ -120,6 +120,12 @@ def skip_modules(self) -> Iterable[str]:
"""
return []
@property
def bindir(self) -> str:
"""Path to Python package's bindir, bin on unix like OS's Scripts on Windows"""
windows = self.spec.satisfies("platform=windows")
return join_path(self.spec.prefix, "Scripts" if windows else "bin")
def view_file_conflicts(self, view, merge_map):
"""Report all file conflicts, excepting special cases for python.
Specifically, this does not report errors for duplicate

View File

@@ -1110,7 +1110,8 @@ def main_script_replacements(cmd):
cdash_handler.populate_buildgroup(all_job_names)
except (SpackError, HTTPError, URLError, TimeoutError) as err:
tty.warn(f"Problem populating buildgroup: {err}")
else:
elif cdash_config:
# warn only if there was actually a CDash configuration.
tty.warn("Unable to populate buildgroup without CDash credentials")
service_job_retries = {

View File

@@ -460,7 +460,7 @@ def push_fn(args):
"The following {} specs were skipped as they already exist in the buildcache:\n"
" {}\n"
" Use --force to overwrite them.".format(
len(skipped), ", ".join(elide_list(skipped, 5))
len(skipped), ", ".join(elide_list([_format_spec(s) for s in skipped], 5))
)
)

View File

@@ -29,6 +29,9 @@
__all__ = ["Compiler"]
PATH_INSTANCE_VARS = ["cc", "cxx", "f77", "fc"]
FLAG_INSTANCE_VARS = ["cflags", "cppflags", "cxxflags", "fflags"]
@llnl.util.lang.memoized
def _get_compiler_version_output(compiler_path, version_arg, ignore_errors=()):
@@ -700,6 +703,30 @@ def compiler_environment(self):
os.environ.clear()
os.environ.update(backup_env)
def to_dict(self):
flags_dict = {fname: " ".join(fvals) for fname, fvals in self.flags.items()}
flags_dict.update(
{attr: getattr(self, attr, None) for attr in FLAG_INSTANCE_VARS if hasattr(self, attr)}
)
result = {
"spec": str(self.spec),
"paths": {attr: getattr(self, attr, None) for attr in PATH_INSTANCE_VARS},
"flags": flags_dict,
"operating_system": str(self.operating_system),
"target": str(self.target),
"modules": self.modules or [],
"environment": self.environment or {},
"extra_rpaths": self.extra_rpaths or [],
}
if self.enable_implicit_rpaths is not None:
result["implicit_rpaths"] = self.enable_implicit_rpaths
if self.alias:
result["alias"] = self.alias
return result
class CompilerAccessError(spack.error.SpackError):
def __init__(self, compiler, paths):

View File

@@ -6,7 +6,6 @@
"""This module contains functions related to finding compilers on the
system and configuring Spack to use multiple compilers.
"""
import collections
import importlib
import os
import sys
@@ -31,8 +30,6 @@
from spack.util.environment import get_path
from spack.util.naming import mod_to_class
_path_instance_vars = ["cc", "cxx", "f77", "fc"]
_flags_instance_vars = ["cflags", "cppflags", "cxxflags", "fflags"]
_other_instance_vars = [
"modules",
"operating_system",
@@ -90,29 +87,7 @@ def converter(cspec_like, *args, **kwargs):
def _to_dict(compiler):
"""Return a dict version of compiler suitable to insert in YAML."""
d = {}
d["spec"] = str(compiler.spec)
d["paths"] = dict((attr, getattr(compiler, attr, None)) for attr in _path_instance_vars)
d["flags"] = dict((fname, " ".join(fvals)) for fname, fvals in compiler.flags.items())
d["flags"].update(
dict(
(attr, getattr(compiler, attr, None))
for attr in _flags_instance_vars
if hasattr(compiler, attr)
)
)
d["operating_system"] = str(compiler.operating_system)
d["target"] = str(compiler.target)
d["modules"] = compiler.modules or []
d["environment"] = compiler.environment or {}
d["extra_rpaths"] = compiler.extra_rpaths or []
if compiler.enable_implicit_rpaths is not None:
d["implicit_rpaths"] = compiler.enable_implicit_rpaths
if compiler.alias:
d["alias"] = compiler.alias
return {"compiler": d}
return {"compiler": compiler.to_dict()}
def get_compiler_config(
@@ -394,8 +369,9 @@ def replace_apple_clang(name):
return [replace_apple_clang(name) for name in all_compiler_module_names()]
@llnl.util.lang.memoized
def all_compiler_module_names() -> List[str]:
return [name for name in llnl.util.lang.list_modules(spack.paths.compilers_path)]
return list(llnl.util.lang.list_modules(spack.paths.compilers_path))
@_auto_compiler_spec
@@ -487,13 +463,15 @@ def compiler_from_dict(items):
os = items.get("operating_system", None)
target = items.get("target", None)
if not ("paths" in items and all(n in items["paths"] for n in _path_instance_vars)):
if not (
"paths" in items and all(n in items["paths"] for n in spack.compiler.PATH_INSTANCE_VARS)
):
raise InvalidCompilerConfigurationError(cspec)
cls = class_for_compiler_name(cspec.name)
compiler_paths = []
for c in _path_instance_vars:
for c in spack.compiler.PATH_INSTANCE_VARS:
compiler_path = items["paths"][c]
if compiler_path != "None":
compiler_paths.append(compiler_path)
@@ -621,24 +599,6 @@ def compiler_for_spec(compiler_spec, arch_spec):
return compilers[0]
@_auto_compiler_spec
def get_compiler_duplicates(compiler_spec, arch_spec):
config = spack.config.CONFIG
scope_to_compilers = {}
for scope in config.scopes:
compilers = compilers_for_spec(compiler_spec, arch_spec=arch_spec, scope=scope)
if compilers:
scope_to_compilers[scope] = compilers
cfg_file_to_duplicates = {}
for scope, compilers in scope_to_compilers.items():
config_file = config.get_config_filename(scope, "compilers")
cfg_file_to_duplicates[config_file] = compilers
return cfg_file_to_duplicates
@llnl.util.lang.memoized
def class_for_compiler_name(compiler_name):
"""Given a compiler module name, get the corresponding Compiler class."""
@@ -661,50 +621,10 @@ def class_for_compiler_name(compiler_name):
return cls
def all_os_classes():
"""
Return the list of classes for all operating systems available on
this platform
"""
classes = []
platform = spack.platforms.host()
for os_class in platform.operating_sys.values():
classes.append(os_class)
return classes
def all_compiler_types():
return [class_for_compiler_name(c) for c in supported_compilers()]
#: Gathers the attribute values by which a detected compiler is considered
#: unique in Spack.
#:
#: - os: the operating system
#: - compiler_name: the name of the compiler (e.g. 'gcc', 'clang', etc.)
#: - version: the version of the compiler
#:
CompilerID = collections.namedtuple("CompilerID", ["os", "compiler_name", "version"])
#: Variations on a matched compiler name
NameVariation = collections.namedtuple("NameVariation", ["prefix", "suffix"])
#: Groups together the arguments needed by `detect_version`. The four entries
#: in the tuple are:
#:
#: - id: An instance of the CompilerID named tuple (version can be set to None
#: as it will be detected later)
#: - variation: a NameVariation for file being tested
#: - language: compiler language being tested (one of 'cc', 'cxx', 'fc', 'f77')
#: - path: full path to the executable being tested
#:
DetectVersionArgs = collections.namedtuple(
"DetectVersionArgs", ["id", "variation", "language", "path"]
)
def is_mixed_toolchain(compiler):
"""Returns True if the current compiler is a mixed toolchain,
False otherwise.
@@ -903,17 +823,12 @@ def _extract_os_and_target(spec: "spack.spec.Spec"):
class InvalidCompilerConfigurationError(spack.error.SpackError):
def __init__(self, compiler_spec):
super().__init__(
'Invalid configuration for [compiler "%s"]: ' % compiler_spec,
"Compiler configuration must contain entries for all compilers: %s"
% _path_instance_vars,
f'Invalid configuration for [compiler "{compiler_spec}"]: ',
f"Compiler configuration must contain entries for "
f"all compilers: {spack.compiler.PATH_INSTANCE_VARS}",
)
class NoCompilersError(spack.error.SpackError):
def __init__(self):
super().__init__("Spack could not find any compilers!")
class UnknownCompilerError(spack.error.SpackError):
def __init__(self, compiler_name):
super().__init__("Spack doesn't support the requested compiler: {0}".format(compiler_name))
@@ -924,25 +839,3 @@ def __init__(self, compiler_spec, target):
super().__init__(
"No compilers for operating system %s satisfy spec %s" % (target, compiler_spec)
)
class CompilerDuplicateError(spack.error.SpackError):
def __init__(self, compiler_spec, arch_spec):
config_file_to_duplicates = get_compiler_duplicates(compiler_spec, arch_spec)
duplicate_table = list((x, len(y)) for x, y in config_file_to_duplicates.items())
descriptor = lambda num: "time" if num == 1 else "times"
duplicate_msg = lambda cfgfile, count: "{0}: {1} {2}".format(
cfgfile, str(count), descriptor(count)
)
msg = (
"Compiler configuration contains entries with duplicate"
+ " specification ({0}, {1})".format(compiler_spec, arch_spec)
+ " in the following files:\n\t"
+ "\n\t".join(duplicate_msg(x, y) for x, y in duplicate_table)
)
super().__init__(msg)
class CompilerSpecInsufficientlySpecificError(spack.error.SpackError):
def __init__(self, compiler_spec):
super().__init__("Multiple compilers satisfy spec %s" % compiler_spec)

View File

@@ -8,7 +8,6 @@
from contextlib import contextmanager
from itertools import chain
import spack.abi
import spack.compilers
import spack.config
import spack.environment

View File

@@ -1090,7 +1090,7 @@ def validate(
def read_config_file(
filename: str, schema: Optional[YamlConfigDict] = None
path: str, schema: Optional[YamlConfigDict] = None
) -> Optional[YamlConfigDict]:
"""Read a YAML configuration file.
@@ -1100,21 +1100,9 @@ def read_config_file(
# to preserve flexibility in calling convention (don't need to provide
# schema when it's not necessary) while allowing us to validate against a
# known schema when the top-level key could be incorrect.
if not os.path.exists(filename):
# Ignore nonexistent files.
tty.debug(f"Skipping nonexistent config path {filename}", level=3)
return None
elif not os.path.isfile(filename):
raise ConfigFileError(f"Invalid configuration. {filename} exists but is not a file.")
elif not os.access(filename, os.R_OK):
raise ConfigFileError(f"Config file is not readable: {filename}")
try:
tty.debug(f"Reading config from file {filename}")
with open(filename) as f:
with open(path) as f:
tty.debug(f"Reading config from file {path}")
data = syaml.load_config(f)
if data:
@@ -1125,15 +1113,20 @@ def read_config_file(
return data
except StopIteration:
raise ConfigFileError(f"Config file is empty or is not a valid YAML dict: {filename}")
except FileNotFoundError:
# Ignore nonexistent files.
tty.debug(f"Skipping nonexistent config path {path}", level=3)
return None
except OSError as e:
raise ConfigFileError(f"Path is not a file or is not readable: {path}: {str(e)}") from e
except StopIteration as e:
raise ConfigFileError(f"Config file is empty or is not a valid YAML dict: {path}") from e
except syaml.SpackYAMLError as e:
raise ConfigFileError(str(e)) from e
except OSError as e:
raise ConfigFileError(f"Error reading configuration file {filename}: {str(e)}") from e
def _override(string: str) -> bool:
"""Test if a spack YAML string is an override.

View File

@@ -45,7 +45,9 @@ def __reduce__(self):
def restore(
spec_str: str, prefix: str, extra_attributes: Optional[Dict[str, str]]
) -> "DetectedPackage":
spec = spack.spec.Spec.from_detection(spec_str=spec_str, extra_attributes=extra_attributes)
spec = spack.spec.Spec.from_detection(
spec_str=spec_str, external_path=prefix, extra_attributes=extra_attributes
)
return DetectedPackage(spec=spec, prefix=prefix)

View File

@@ -104,7 +104,9 @@ def _create_executable_scripts(self, mock_executables: MockExecutables) -> List[
@property
def expected_specs(self) -> List[spack.spec.Spec]:
return [
spack.spec.Spec.from_detection(item.spec, extra_attributes=item.extra_attributes)
spack.spec.Spec.from_detection(
item.spec, external_path=self.tmpdir.name, extra_attributes=item.extra_attributes
)
for item in self.test.results
]

View File

@@ -488,7 +488,6 @@ def _process_binary_cache_tarball(
with timer.measure("install"), spack.util.path.filter_padding():
binary_distribution.extract_tarball(pkg.spec, download_result, force=False, timer=timer)
pkg.windows_establish_runtime_linkage()
if hasattr(pkg, "_post_buildcache_install_hook"):
pkg._post_buildcache_install_hook()

View File

@@ -25,7 +25,6 @@
so package authors should use their judgement.
"""
import functools
import inspect
from contextlib import contextmanager
import spack.directives_meta
@@ -133,7 +132,7 @@ def __call__(self, package_or_builder_self, *args, **kwargs):
# its superclasses for successive calls. We don't have that
# information within `SpecMultiMethod`, because it is not
# associated with the package class.
for cls in inspect.getmro(package_or_builder_self.__class__)[1:]:
for cls in package_or_builder_self.__class__.__mro__[1:]:
superself = cls.__dict__.get(self.__name__, None)
if isinstance(superself, SpecMultiMethod):

View File

@@ -246,10 +246,7 @@ def determine_spec_details(cls, prefix, objs_in_prefix):
if version_str:
objs_by_version[version_str].append(obj)
except Exception as e:
msg = (
"An error occurred when trying to detect " 'the version of "{0}" [{1}]'
)
tty.debug(msg.format(obj, str(e)))
tty.debug(f"Cannot detect the version of '{obj}' [{str(e)}]")
specs = []
for version_str, objs in objs_by_version.items():
@@ -262,27 +259,23 @@ def determine_spec_details(cls, prefix, objs_in_prefix):
if isinstance(variant, str):
variant = (variant, {})
variant_str, extra_attributes = variant
spec_str = "{0}@{1} {2}".format(cls.name, version_str, variant_str)
spec_str = f"{cls.name}@{version_str} {variant_str}"
# Pop a few reserved keys from extra attributes, since
# they have a different semantics
external_path = extra_attributes.pop("prefix", None)
external_modules = extra_attributes.pop("modules", None)
try:
spec = spack.spec.Spec(
spec = spack.spec.Spec.from_detection(
spec_str,
external_path=external_path,
external_modules=external_modules,
extra_attributes=extra_attributes,
)
except Exception as e:
msg = 'Parsing failed [spec_str="{0}", error={1}]'
tty.debug(msg.format(spec_str, str(e)))
tty.debug(f'Parsing failed [spec_str="{spec_str}", error={str(e)}]')
else:
specs.append(
spack.spec.Spec.from_detection(
spec, extra_attributes=extra_attributes
)
)
specs.append(spec)
return sorted(specs)
@@ -885,7 +878,7 @@ def fullname(cls):
def fullnames(cls):
"""Fullnames for this package and any packages from which it inherits."""
fullnames = []
for cls in inspect.getmro(cls):
for cls in cls.__mro__:
namespace = getattr(cls, "namespace", None)
if namespace:
fullnames.append("%s.%s" % (namespace, cls.name))
@@ -1474,6 +1467,7 @@ def do_fetch(self, mirror_only=False):
checksum
and (self.version not in self.versions)
and (not isinstance(self.version, GitVersion))
and ("dev_path" not in self.spec.variants)
):
tty.warn(
"There is no checksum on file to fetch %s safely."

View File

@@ -5,10 +5,11 @@
import stat
import warnings
import spack.config
import spack.error
import spack.repo
import spack.spec
from spack.config import ConfigError
from spack.util.path import canonicalize_path
from spack.version import Version
_lesser_spec_types = {"compiler": spack.spec.CompilerSpec, "version": Version}
@@ -154,44 +155,6 @@ def preferred_variants(cls, pkg_name):
)
def spec_externals(spec):
"""Return a list of external specs (w/external directory path filled in),
one for each known external installation.
"""
# break circular import.
from spack.util.module_cmd import path_from_modules # noqa: F401
def _package(maybe_abstract_spec):
pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
return pkg_cls(maybe_abstract_spec)
allpkgs = spack.config.get("packages")
names = set([spec.name])
names |= set(vspec.name for vspec in _package(spec).virtuals_provided)
external_specs = []
for name in names:
pkg_config = allpkgs.get(name, {})
pkg_externals = pkg_config.get("externals", [])
for entry in pkg_externals:
spec_str = entry["spec"]
external_path = entry.get("prefix", None)
if external_path:
external_path = canonicalize_path(external_path)
external_modules = entry.get("modules", None)
external_spec = spack.spec.Spec.from_detection(
spack.spec.Spec(
spec_str, external_path=external_path, external_modules=external_modules
),
extra_attributes=entry.get("extra_attributes", {}),
)
if external_spec.intersects(spec):
external_specs.append(external_spec)
# Defensively copy returned specs
return [s.copy() for s in external_specs]
def is_spec_buildable(spec):
"""Return true if the spec is configured as buildable"""
allpkgs = spack.config.get("packages")

View File

@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import hashlib
import inspect
import os
import os.path
import pathlib
@@ -185,8 +184,8 @@ def __init__(
# search mro to look for the file
abs_path: Optional[str] = None
# At different times we call FilePatch on instances and classes
pkg_cls = pkg if inspect.isclass(pkg) else pkg.__class__
for cls in inspect.getmro(pkg_cls): # type: ignore
pkg_cls = pkg if isinstance(pkg, type) else pkg.__class__
for cls in pkg_cls.__mro__: # type: ignore
if not hasattr(cls, "module"):
# We've gone too far up the MRO
break

View File

@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import contextlib
from ._functions import _host, by_name, platforms, prevent_cray_detection, reset
from ._functions import _host, by_name, platforms, reset
from ._platform import Platform
from .darwin import Darwin
from .freebsd import FreeBSD
@@ -23,7 +23,6 @@
"host",
"by_name",
"reset",
"prevent_cray_detection",
]
#: The "real" platform of the host running Spack. This should not be changed

View File

@@ -2,12 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import contextlib
import llnl.util.lang
import spack.util.environment
from .darwin import Darwin
from .freebsd import FreeBSD
from .linux import Linux
@@ -57,14 +53,3 @@ def by_name(name):
"""
platform_cls = cls_by_name(name)
return platform_cls() if platform_cls else None
@contextlib.contextmanager
def prevent_cray_detection():
"""Context manager that prevents the detection of the Cray platform"""
reset()
try:
with spack.util.environment.set_env(MODULEPATH=""):
yield
finally:
reset()

View File

@@ -1281,7 +1281,7 @@ def get_pkg_class(self, pkg_name: str) -> Type["spack.package_base.PackageBase"]
raise RepoError(msg) from e
cls = getattr(module, class_name)
if not inspect.isclass(cls):
if not isinstance(cls, type):
tty.die(f"{pkg_name}.{class_name} is not a class")
# Clear any prior changes to class attributes in case the class was loaded from the

View File

@@ -51,6 +51,7 @@
import collections
import collections.abc
import enum
import io
import itertools
import os
import pathlib
@@ -1427,7 +1428,7 @@ def __init__(
# init an empty spec that matches anything.
self.name = None
self.versions = vn.VersionList(":")
self.variants = vt.VariantMap(self)
self.variants = VariantMap(self)
self.architecture = None
self.compiler = None
self.compiler_flags = FlagMap(self)
@@ -2577,22 +2578,27 @@ def from_signed_json(stream):
return Spec.from_dict(extracted_json)
@staticmethod
def from_detection(spec_str, extra_attributes=None):
def from_detection(
spec_str: str,
*,
external_path: str,
external_modules: Optional[List[str]] = None,
extra_attributes: Optional[Dict] = None,
) -> "Spec":
"""Construct a spec from a spec string determined during external
detection and attach extra attributes to it.
Args:
spec_str (str): spec string
extra_attributes (dict): dictionary containing extra attributes
Returns:
spack.spec.Spec: external spec
spec_str: spec string
external_path: prefix of the external spec
external_modules: optional module files to be loaded when the external spec is used
extra_attributes: dictionary containing extra attributes
"""
s = Spec(spec_str)
s = Spec(spec_str, external_path=external_path, external_modules=external_modules)
extra_attributes = syaml.sorted_dict(extra_attributes or {})
# This is needed to be able to validate multi-valued variants,
# otherwise they'll still be abstract in the context of detection.
vt.substitute_abstract_variants(s)
substitute_abstract_variants(s)
s.extra_attributes = extra_attributes
return s
@@ -2915,7 +2921,7 @@ def validate_or_raise(self):
# Ensure correctness of variants (if the spec is not virtual)
if not spec.virtual:
Spec.ensure_valid_variants(spec)
vt.substitute_abstract_variants(spec)
substitute_abstract_variants(spec)
@staticmethod
def ensure_valid_variants(spec):
@@ -3884,7 +3890,7 @@ def format_attribute(match_object: Match) -> str:
if part.startswith("_"):
raise SpecFormatStringError("Attempted to format private attribute")
else:
if part == "variants" and isinstance(current, vt.VariantMap):
if part == "variants" and isinstance(current, VariantMap):
# subscript instead of getattr for variant names
current = current[part]
else:
@@ -4339,6 +4345,152 @@ def attach_git_version_lookup(self):
v.attach_lookup(spack.version.git_ref_lookup.GitRefLookup(self.fullname))
class VariantMap(lang.HashableMap):
"""Map containing variant instances. New values can be added only
if the key is not already present."""
def __init__(self, spec: Spec):
super().__init__()
self.spec = spec
def __setitem__(self, name, vspec):
# Raise a TypeError if vspec is not of the right type
if not isinstance(vspec, vt.AbstractVariant):
raise TypeError(
"VariantMap accepts only values of variant types "
f"[got {type(vspec).__name__} instead]"
)
# Raise an error if the variant was already in this map
if name in self.dict:
msg = 'Cannot specify variant "{0}" twice'.format(name)
raise vt.DuplicateVariantError(msg)
# Raise an error if name and vspec.name don't match
if name != vspec.name:
raise KeyError(
f'Inconsistent key "{name}", must be "{vspec.name}" to ' "match VariantSpec"
)
# Set the item
super().__setitem__(name, vspec)
def substitute(self, vspec):
"""Substitutes the entry under ``vspec.name`` with ``vspec``.
Args:
vspec: variant spec to be substituted
"""
if vspec.name not in self:
raise KeyError(f"cannot substitute a key that does not exist [{vspec.name}]")
# Set the item
super().__setitem__(vspec.name, vspec)
def satisfies(self, other):
return all(k in self and self[k].satisfies(other[k]) for k in other)
def intersects(self, other):
return all(self[k].intersects(other[k]) for k in other if k in self)
def constrain(self, other: "VariantMap") -> bool:
"""Add all variants in other that aren't in self to self. Also constrain all multi-valued
variants that are already present. Return True iff self changed"""
if other.spec is not None and other.spec._concrete:
for k in self:
if k not in other:
raise vt.UnsatisfiableVariantSpecError(self[k], "<absent>")
changed = False
for k in other:
if k in self:
# If they are not compatible raise an error
if not self[k].compatible(other[k]):
raise vt.UnsatisfiableVariantSpecError(self[k], other[k])
# If they are compatible merge them
changed |= self[k].constrain(other[k])
else:
# If it is not present copy it straight away
self[k] = other[k].copy()
changed = True
return changed
@property
def concrete(self):
"""Returns True if the spec is concrete in terms of variants.
Returns:
bool: True or False
"""
return self.spec._concrete or all(v in self for v in self.spec.package_class.variants)
def copy(self) -> "VariantMap":
clone = VariantMap(self.spec)
for name, variant in self.items():
clone[name] = variant.copy()
return clone
def __str__(self):
if not self:
return ""
# print keys in order
sorted_keys = sorted(self.keys())
# Separate boolean variants from key-value pairs as they print
# differently. All booleans go first to avoid ' ~foo' strings that
# break spec reuse in zsh.
bool_keys = []
kv_keys = []
for key in sorted_keys:
bool_keys.append(key) if isinstance(self[key].value, bool) else kv_keys.append(key)
# add spaces before and after key/value variants.
string = io.StringIO()
for key in bool_keys:
string.write(str(self[key]))
for key in kv_keys:
string.write(" ")
string.write(str(self[key]))
return string.getvalue()
def substitute_abstract_variants(spec: Spec):
"""Uses the information in `spec.package` to turn any variant that needs
it into a SingleValuedVariant.
This method is best effort. All variants that can be substituted will be
substituted before any error is raised.
Args:
spec: spec on which to operate the substitution
"""
# This method needs to be best effort so that it works in matrix exlusion
# in $spack/lib/spack/spack/spec_list.py
failed = []
for name, v in spec.variants.items():
if name == "dev_path":
spec.variants.substitute(vt.SingleValuedVariant(name, v._original_value))
continue
elif name in vt.reserved_names:
continue
elif name not in spec.package_class.variants:
failed.append(name)
continue
pkg_variant, _ = spec.package_class.variants[name]
new_variant = pkg_variant.make_variant(v._original_value)
pkg_variant.validate_or_raise(new_variant, spec.package_class)
spec.variants.substitute(new_variant)
# Raise all errors at once
if failed:
raise vt.UnknownVariantError(spec, failed)
def parse_with_version_concrete(spec_like: Union[str, Spec], compiler: bool = False):
"""Same as Spec(string), but interprets @x as @=x"""
s: Union[CompilerSpec, Spec] = CompilerSpec(spec_like) if compiler else Spec(spec_like)
@@ -4740,6 +4892,7 @@ def get_host_environment() -> Dict[str, Any]:
"architecture": arch_spec,
"arch_str": str(arch_spec),
"hostname": socket.gethostname(),
"full_hostname": socket.getfqdn(),
}

View File

@@ -5,6 +5,7 @@
import itertools
from typing import List
import spack.spec
import spack.variant
from spack.error import SpackError
from spack.spec import Spec
@@ -225,7 +226,7 @@ def _expand_matrix_constraints(matrix_config):
# Catch exceptions because we want to be able to operate on
# abstract specs without needing package information
try:
spack.variant.substitute_abstract_variants(test_spec)
spack.spec.substitute_abstract_variants(test_spec)
except spack.variant.UnknownVariantError:
pass

View File

@@ -1,66 +0,0 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
""" Test ABI compatibility helpers"""
import pytest
from spack.abi import ABI
from spack.spec import Spec
@pytest.mark.parametrize(
"target,constraint,expected",
[
("foo", "bar", True),
("platform=linux", "foo", True),
("foo", "arch=linux-fedora31-x86_64", True),
("arch=linux-fedora31-skylake", "arch=linux-fedora31-skylake", True),
("arch=linux-fedora31-skylake", "arch=linux-fedora31-x86_64", False),
("platform=linux os=fedora31", "arch=linux-fedora31-x86_64", True),
("platform=linux", "arch=linux-fedora31-x86_64", True),
("platform=linux os=fedora31", "platform=linux", True),
("platform=darwin", "arch=linux-fedora31-x86_64", False),
("os=fedora31", "platform=linux", True),
],
)
def test_architecture_compatibility(target, constraint, expected):
assert ABI().architecture_compatible(Spec(target), Spec(constraint)) == expected
@pytest.mark.parametrize(
"target,constraint,loose,expected",
[
("foo", "bar", False, True),
("%gcc", "foo", False, True),
("foo", "%gcc", False, True),
("%gcc", "%gcc", False, True),
("%gcc", "%intel", False, False),
("%gcc", "%clang", False, False),
("%gcc@9.1", "%gcc@9.2", False, False), # TODO should be true ?
("%gcc@9.2.1", "%gcc@9.2.2", False, False), # TODO should be true ?
("%gcc@4.9", "%gcc@9.2", False, False),
("%clang@5", "%clang@6", False, False),
("%gcc@9.1", "%gcc@9.2", True, True),
("%gcc@9.2.1", "%gcc@9.2.2", True, True),
("%gcc@4.9", "%gcc@9.2", True, True),
("%clang@5", "%clang@6", True, True),
],
)
def test_compiler_compatibility(target, constraint, loose, expected):
assert ABI().compiler_compatible(Spec(target), Spec(constraint), loose=loose) == expected
@pytest.mark.parametrize(
"target,constraint,loose,expected",
[
("foo", "bar", False, True),
("%gcc", "platform=linux", False, True),
("%gcc@9.2.1", "%gcc@8.3.1 platform=linux", False, False),
("%gcc@9.2.1", "%gcc@8.3.1 platform=linux", True, True),
("%gcc@9.2.1 arch=linux-fedora31-skylake", "%gcc@9.2.1 platform=linux", False, True),
],
)
def test_compatibility(target, constraint, loose, expected):
assert ABI().compatible(Spec(target), Spec(constraint), loose=loose) == expected

View File

@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import inspect
import os
import platform
import posixpath
@@ -593,7 +592,7 @@ def test_setting_attributes(self, default_mock_concretization):
# We can also propagate the settings to classes in the MRO
module_wrapper.propagate_changes_to_mro()
for cls in inspect.getmro(type(s.package)):
for cls in type(s.package).__mro__:
current_module = cls.module
if current_module == spack.package_base:
break

View File

@@ -72,8 +72,12 @@ def test_find_external_two_instances_same_package(mock_executable):
def test_find_external_update_config(mutable_config):
entries = [
spack.detection.DetectedPackage(Spec.from_detection("cmake@1.foo"), "/x/y1/"),
spack.detection.DetectedPackage(Spec.from_detection("cmake@3.17.2"), "/x/y2/"),
spack.detection.DetectedPackage(
Spec.from_detection("cmake@1.foo", external_path="/x/y1/"), "/x/y1/"
),
spack.detection.DetectedPackage(
Spec.from_detection("cmake@3.17.2", external_path="/x/y2/"), "/x/y2/"
),
]
pkg_to_entries = {"cmake": entries}
@@ -221,10 +225,8 @@ def fail():
assert "Skipping manifest and continuing" in output
def test_find_external_merge(mutable_config, mutable_mock_repo):
"""Check that 'spack find external' doesn't overwrite an existing spec
entry in packages.yaml.
"""
def test_find_external_merge(mutable_config, mutable_mock_repo, tmp_path):
"""Checks that 'spack find external' doesn't overwrite an existing spec in packages.yaml."""
pkgs_cfg_init = {
"find-externals1": {
"externals": [{"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix/"}],
@@ -234,8 +236,12 @@ def test_find_external_merge(mutable_config, mutable_mock_repo):
mutable_config.update_config("packages", pkgs_cfg_init)
entries = [
spack.detection.DetectedPackage(Spec.from_detection("find-externals1@1.1"), "/x/y1/"),
spack.detection.DetectedPackage(Spec.from_detection("find-externals1@1.2"), "/x/y2/"),
spack.detection.DetectedPackage(
Spec.from_detection("find-externals1@1.1", external_path="/x/y1/"), "/x/y1/"
),
spack.detection.DetectedPackage(
Spec.from_detection("find-externals1@1.2", external_path="/x/y2/"), "/x/y2/"
),
]
pkg_to_entries = {"find-externals1": entries}
scope = spack.config.default_modify_scope("packages")

View File

@@ -42,25 +42,6 @@ def test_multiple_conflicting_compiler_definitions(mutable_config):
assert cmp.f77 == "f77"
def test_get_compiler_duplicates(mutable_config, compiler_factory):
# In this case there is only one instance of the specified compiler in
# the test configuration (so it is not actually a duplicate), but the
# method behaves the same.
cnl_compiler = compiler_factory(spec="gcc@4.5.0", operating_system="CNL")
# CNL compiler has no target attribute, and this is essential to make detection pass
del cnl_compiler["compiler"]["target"]
mutable_config.set(
"compilers", [compiler_factory(spec="gcc@4.5.0", operating_system="SuSE11"), cnl_compiler]
)
cfg_file_to_duplicates = spack.compilers.get_compiler_duplicates(
"gcc@4.5.0", spack.spec.ArchSpec("cray-CNL-xeon")
)
assert len(cfg_file_to_duplicates) == 1
cfg_file, duplicates = next(iter(cfg_file_to_duplicates.items()))
assert len(duplicates) == 1
def test_compiler_flags_from_config_are_grouped():
compiler_entry = {
"spec": "intel@17.0.2",

View File

@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import inspect
import itertools
import os
import re
@@ -700,7 +699,7 @@ def test_parse_multiple_specs(text, tokens, expected_specs):
],
)
def test_cli_spec_roundtrip(args, expected):
if inspect.isclass(expected) and issubclass(expected, BaseException):
if isinstance(expected, type) and issubclass(expected, BaseException):
with pytest.raises(expected):
spack.cmd.parse_specs(args)
return

View File

@@ -8,6 +8,7 @@
import spack.error
import spack.variant
from spack.spec import VariantMap
from spack.variant import (
BoolValuedVariant,
DuplicateVariantError,
@@ -18,7 +19,6 @@
SingleValuedVariant,
UnsatisfiableVariantSpecError,
Variant,
VariantMap,
disjoint_sets,
)

View File

@@ -275,9 +275,9 @@ def streamify(arg, mode):
long_msg = cmd_line_string + f"\n{result}"
if fail_on_error:
raise ProcessTimeoutError(
f"\nProcess timed out after {timeout}s"
f"We expected the following command to run quickly but\
it did not, please report this as an issue: {long_msg}",
f"\nProcess timed out after {timeout}s. "
"We expected the following command to run quickly but it did not, "
f"please report this as an issue: {long_msg}",
long_message=long_msg,
) from te

View File

@@ -14,7 +14,6 @@
"""
import collections
import collections.abc
import copy
import ctypes
import enum
import functools
@@ -400,20 +399,6 @@ def as_string(self, data) -> str:
return result.getvalue()
def deepcopy(data):
"""Returns a deepcopy of the input YAML data."""
result = copy.deepcopy(data)
if isinstance(result, comments.CommentedMap):
# HACK to fully copy ruamel CommentedMap that doesn't provide copy
# method. Especially necessary for environments
extracted_comments = extract_comments(data)
if extracted_comments:
set_comments(result, data_comments=extracted_comments)
return result
def load_config(str_or_file):
"""Load but modify the loader instance so that it will add __line__
attributes to the returned object."""

View File

@@ -9,7 +9,6 @@
import collections.abc
import functools
import inspect
import io
import itertools
import re
@@ -550,165 +549,6 @@ def __str__(self):
return "{0}{1}".format("+" if self.value else "~", self.name)
class VariantMap(lang.HashableMap):
"""Map containing variant instances. New values can be added only
if the key is not already present.
"""
def __init__(self, spec):
super().__init__()
self.spec = spec
def __setitem__(self, name, vspec):
# Raise a TypeError if vspec is not of the right type
if not isinstance(vspec, AbstractVariant):
msg = "VariantMap accepts only values of variant types"
msg += " [got {0} instead]".format(type(vspec).__name__)
raise TypeError(msg)
# Raise an error if the variant was already in this map
if name in self.dict:
msg = 'Cannot specify variant "{0}" twice'.format(name)
raise DuplicateVariantError(msg)
# Raise an error if name and vspec.name don't match
if name != vspec.name:
msg = 'Inconsistent key "{0}", must be "{1}" to match VariantSpec'
raise KeyError(msg.format(name, vspec.name))
# Set the item
super().__setitem__(name, vspec)
def substitute(self, vspec):
"""Substitutes the entry under ``vspec.name`` with ``vspec``.
Args:
vspec: variant spec to be substituted
"""
if vspec.name not in self:
msg = "cannot substitute a key that does not exist [{0}]"
raise KeyError(msg.format(vspec.name))
# Set the item
super().__setitem__(vspec.name, vspec)
def satisfies(self, other):
return all(k in self and self[k].satisfies(other[k]) for k in other)
def intersects(self, other):
return all(self[k].intersects(other[k]) for k in other if k in self)
def constrain(self, other):
"""Add all variants in other that aren't in self to self. Also
constrain all multi-valued variants that are already present.
Return True if self changed, False otherwise
Args:
other (VariantMap): instance against which we constrain self
Returns:
bool: True or False
"""
if other.spec is not None and other.spec._concrete:
for k in self:
if k not in other:
raise UnsatisfiableVariantSpecError(self[k], "<absent>")
changed = False
for k in other:
if k in self:
# If they are not compatible raise an error
if not self[k].compatible(other[k]):
raise UnsatisfiableVariantSpecError(self[k], other[k])
# If they are compatible merge them
changed |= self[k].constrain(other[k])
else:
# If it is not present copy it straight away
self[k] = other[k].copy()
changed = True
return changed
@property
def concrete(self):
"""Returns True if the spec is concrete in terms of variants.
Returns:
bool: True or False
"""
return self.spec._concrete or all(v in self for v in self.spec.package_class.variants)
def copy(self):
"""Return an instance of VariantMap equivalent to self.
Returns:
VariantMap: a copy of self
"""
clone = VariantMap(self.spec)
for name, variant in self.items():
clone[name] = variant.copy()
return clone
def __str__(self):
if not self:
return ""
# print keys in order
sorted_keys = sorted(self.keys())
# Separate boolean variants from key-value pairs as they print
# differently. All booleans go first to avoid ' ~foo' strings that
# break spec reuse in zsh.
bool_keys = []
kv_keys = []
for key in sorted_keys:
bool_keys.append(key) if isinstance(self[key].value, bool) else kv_keys.append(key)
# add spaces before and after key/value variants.
string = io.StringIO()
for key in bool_keys:
string.write(str(self[key]))
for key in kv_keys:
string.write(" ")
string.write(str(self[key]))
return string.getvalue()
def substitute_abstract_variants(spec):
"""Uses the information in `spec.package` to turn any variant that needs
it into a SingleValuedVariant.
This method is best effort. All variants that can be substituted will be
substituted before any error is raised.
Args:
spec: spec on which to operate the substitution
"""
# This method needs to be best effort so that it works in matrix exlusion
# in $spack/lib/spack/spack/spec_list.py
failed = []
for name, v in spec.variants.items():
if name in reserved_names:
if name == "dev_path":
new_variant = SingleValuedVariant(name, v._original_value)
spec.variants.substitute(new_variant)
continue
if name not in spec.package_class.variants:
failed.append(name)
continue
pkg_variant, _ = spec.package_class.variants[name]
new_variant = pkg_variant.make_variant(v._original_value)
pkg_variant.validate_or_raise(new_variant, spec.package_class)
spec.variants.substitute(new_variant)
# Raise all errors at once
if failed:
raise UnknownVariantError(spec, failed)
# The class below inherit from Sequence to disguise as a tuple and comply
# with the semantic expected by the 'values' argument of the variant directive
class DisjointSetsOfValues(collections.abc.Sequence):

View File

@@ -885,6 +885,7 @@ e4s-cray-rhel-generate:
extends: [ ".generate-cray-rhel", ".e4s-cray-rhel" ]
e4s-cray-rhel-build:
allow_failure: true # libsci_cray.so broken, misses DT_NEEDED for libdl.so
extends: [ ".build", ".e4s-cray-rhel" ]
trigger:
include:
@@ -907,6 +908,7 @@ e4s-cray-sles-generate:
extends: [ ".generate-cray-sles", ".e4s-cray-sles" ]
e4s-cray-sles-build:
allow_failure: true # libsci_cray.so broken, misses DT_NEEDED for libdl.so
extends: [ ".build", ".e4s-cray-sles" ]
trigger:
include:

View File

@@ -26,8 +26,8 @@ packages:
lammps:
require:
- one_of:
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel ^intel-oneapi-mkl target=x86_64_v4"
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package ^intel-oneapi-mkl target=x86_64_v3"
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel fft=mkl ^intel-oneapi-mkl target=x86_64_v4"
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl target=x86_64_v3"
when: "%intel"
libidn2:
require:

View File

@@ -6,7 +6,7 @@
spack:
view: false
specs:
- vtk
- vtk~mpi
cdash:
build-group: Windows Visualization (Kitware)

View File

@@ -32,4 +32,4 @@ def determine_spec_details(cls, prefix, exes_in_prefix):
match = re.search(r"find-externals1.*version\s+(\S+)", output)
if match:
version_str = match.group(1)
return Spec.from_detection("find-externals1@{0}".format(version_str))
return Spec.from_detection(f"find-externals1@{version_str}", external_path=prefix)

View File

@@ -41,6 +41,7 @@ class Acts(CMakePackage, CudaPackage):
# Supported Acts versions
version("main", branch="main")
version("master", branch="main", deprecated=True) # For compatibility
version("36.2.0", commit="e2fb53da911dc481969e56d635898a46b8d78df9", submodules=True)
version("36.1.0", commit="3f19d1a0eec1d11937d66d0ef603f0b25b9b4e96", submodules=True)
version("36.0.0", commit="6eca77c45b136861272694edbb61bb77200948a5", submodules=True)
version("35.2.0", commit="b3b09f46d064c43050dd3d21cdf51d7a412134fc", submodules=True)

View File

@@ -21,8 +21,6 @@ class Alquimia(CMakePackage):
version("1.1.0", commit="211931c3e76b1ae7cdb48c46885b248412d6fe3d") # tag v1.1.0
version("1.0.10", commit="b2c11b6cde321f4a495ef9fcf267cb4c7a9858a0") # tag v.1.0.10
version("1.0.9", commit="2ee3bcfacc63f685864bcac2b6868b48ad235225") # tag v.1.0.9
version("xsdk-0.6.0", commit="9a0aedd3a927d4d5e837f8fd18b74ad5a78c3821")
version("xsdk-0.5.0", commit="8397c3b00a09534c5473ff3ab21f0e32bb159380")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
@@ -35,8 +33,6 @@ class Alquimia(CMakePackage):
depends_on("pflotran@5.0.0", when="@1.1.0")
depends_on("pflotran@4.0.1", when="@1.0.10")
depends_on("pflotran@3.0.2", when="@1.0.9")
depends_on("pflotran@xsdk-0.6.0", when="@xsdk-0.6.0")
depends_on("pflotran@xsdk-0.5.0", when="@xsdk-0.5.0")
depends_on("pflotran@develop", when="@develop")
depends_on("petsc@3.10:", when="@develop")

View File

@@ -16,13 +16,14 @@ class Bfs(MakefilePackage):
license("0BSD")
version("4.0.1", sha256="8117b76b0a967887278a11470cbfa9e7aeae98f11a7eeb136f456ac462e5ba23")
version("3.1.1", sha256="d73f345c1021e0630e0db930a3fa68dd1f968833037d8471ee1096e5040bf91b")
version("3.1", sha256="aa6a94231915d3d37e5dd62d194cb58a575a8f45270020f2bdd5ab41e31d1492")
version("3.0.4", sha256="7196f5a624871c91ad051752ea21043c198a875189e08c70ab3167567a72889d")
version("3.0.2", sha256="d3456a9aeecc031064db0dbe012e55a11eb97be88d0ab33a90e570fe66457f92")
version("3.0.1", sha256="a38bb704201ed29f4e0b989fb2ab3791ca51c3eff90acfc31fff424579bbf962")
depends_on("c", type="build") # generated
depends_on("c", type="build")
depends_on("acl", when="platform=linux")
depends_on("attr", when="platform=linux")
@@ -30,5 +31,15 @@ class Bfs(MakefilePackage):
depends_on("liburing", when="platform=linux @3.1:")
depends_on("oniguruma")
@run_before("build", when="@4:")
def configure(self):
args = ["--enable-release", f"--prefix={self.prefix}"]
configure_exe = Executable("./configure")
configure_exe(*args)
def install(self, spec, prefix):
make("install", f"PREFIX={prefix}")
if spec.satisfies("@:3"):
make("install", f"PREFIX={prefix}")
else:
make("install")

View File

@@ -497,7 +497,7 @@ def bjam_python_line(self, spec):
spec["python"].libs[0],
)
def determine_bootstrap_options(self, spec, with_libs, options):
def determine_bootstrap_options(self, spec, with_libs, without_libs, options):
boost_toolset_id = self.determine_toolset(spec)
# Arm compiler bootstraps with 'gcc' (but builds as 'clang')
@@ -505,7 +505,10 @@ def determine_bootstrap_options(self, spec, with_libs, options):
options.append("--with-toolset=gcc")
else:
options.append("--with-toolset=%s" % boost_toolset_id)
options.append("--with-libraries=%s" % ",".join(with_libs))
if with_libs:
options.append("--with-libraries=%s" % ",".join(with_libs))
else:
options.append("--without-libraries=%s" % ",".join(without_libs))
if spec.satisfies("+python"):
options.append("--with-python=%s" % spec["python"].command.path)
@@ -677,43 +680,46 @@ def install(self, spec, prefix):
env["PATH"] = newdir + ":" + env["PATH"]
with_libs = list()
without_libs = list()
for lib in Boost.all_libs:
if "+{0}".format(lib) in spec:
with_libs.append(lib)
else:
without_libs.append(lib)
remove_if_in_list = lambda lib, libs: libs.remove(lib) if lib in libs else None
# Remove libraries that the release version does not support
if spec.satisfies("@1.69.0:") and "signals" in with_libs:
with_libs.remove("signals")
if not spec.satisfies("@1.54.0:") and "log" in with_libs:
with_libs.remove("log")
if not spec.satisfies("@1.53.0:") and "atomic" in with_libs:
with_libs.remove("atomic")
if not spec.satisfies("@1.48.0:") and "locale" in with_libs:
with_libs.remove("locale")
if not spec.satisfies("@1.47.0:") and "chrono" in with_libs:
with_libs.remove("chrono")
if not spec.satisfies("@1.43.0:") and "random" in with_libs:
with_libs.remove("random")
if not spec.satisfies("@1.39.0:") and "exception" in with_libs:
with_libs.remove("exception")
if spec.satisfies("@1.69.0:"):
remove_if_in_list("signals", with_libs)
remove_if_in_list("signals", without_libs)
if not spec.satisfies("@1.54.0:"):
remove_if_in_list("log", with_libs)
remove_if_in_list("log", without_libs)
if not spec.satisfies("@1.53.0:"):
remove_if_in_list("atomic", with_libs)
remove_if_in_list("atomic", without_libs)
if not spec.satisfies("@1.48.0:"):
remove_if_in_list("locale", with_libs)
remove_if_in_list("locale", without_libs)
if not spec.satisfies("@1.47.0:"):
remove_if_in_list("chrono", with_libs)
remove_if_in_list("chrono", without_libs)
if not spec.satisfies("@1.43.0:"):
remove_if_in_list("random", with_libs)
remove_if_in_list("random", without_libs)
if not spec.satisfies("@1.39.0:"):
remove_if_in_list("exception", with_libs)
remove_if_in_list("exception", without_libs)
if spec.satisfies("+graph") and spec.satisfies("+mpi"):
with_libs.append("graph_parallel")
if not with_libs:
# if no libraries are specified for compilation, then you dont have
# to configure/build anything, just copy over to the prefix
# directory.
src = join_path(self.stage.source_path, "boost")
mkdirp(join_path(prefix, "include"))
dst = join_path(prefix, "include", "boost")
install_tree(src, dst)
return
remove_if_in_list("graph_parallel", without_libs)
# to make Boost find the user-config.jam
env["BOOST_BUILD_PATH"] = self.stage.source_path
bootstrap_options = ["--prefix=%s" % prefix]
self.determine_bootstrap_options(spec, with_libs, bootstrap_options)
self.determine_bootstrap_options(spec, with_libs, without_libs, bootstrap_options)
if self.spec.satisfies("platform=windows"):
bootstrap = Executable("cmd.exe")

View File

@@ -0,0 +1,30 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Cdi(AutotoolsPackage):
"""
CDI is a C and Fortran Interface to access Climate and NWP model Data.
Supported data formats are GRIB, netCDF, SERVICE, EXTRA and IEG.
"""
homepage = "https://code.mpimet.mpg.de/projects/cdi"
url = "https://code.mpimet.mpg.de/attachments/download/29309/cdi-2.4.0.tar.gz"
version("2.4.0", sha256="91fca015b04c6841b9eab8b49e7726d35e35b9ec4350922072ec6e9d5eb174ef")
variant(
"netcdf", default=True, description="This is needed to read/write NetCDF files with CDI"
)
depends_on("netcdf-c", when="+netcdf")
def configure_args(self):
args = []
if "+netcdf" in self.spec:
args.append("--with-netcdf=" + self.spec["netcdf-c"].prefix)
return args

View File

@@ -20,6 +20,11 @@ class Cdo(AutotoolsPackage):
maintainers("skosukhin", "Try2Code")
version(
"2.4.3",
sha256="4a608b70ee1907b45e149ad44033bb47d35b7da96096553193bd362ca9d445eb",
url="https://code.mpimet.mpg.de/attachments/download/29616/cdo-2.4.3.tar.gz",
)
version(
"2.4.2",
sha256="4df1fe2b8f92f54c27eb9f399edfab40d9322005a6732ca1524ef5c1627ac4e7",

View File

@@ -14,7 +14,7 @@
from spack.package import *
def cmake_cache_entry(name, value, vtype=None):
def cmake_cache_entry(name, value, vtype=None, force=False):
"""
Helper that creates CMake cache entry strings used in
'host-config' files.
@@ -24,7 +24,8 @@ def cmake_cache_entry(name, value, vtype=None):
vtype = "BOOL"
else:
vtype = "PATH"
return 'set({0} "{1}" CACHE {2} "")\n\n'.format(name, value, vtype)
force_str = " FORCE" if force else ""
return 'set({0} "{1}" CACHE {2} ""{3})\n\n'.format(name, value, vtype, force_str)
class Conduit(CMakePackage):
@@ -76,6 +77,8 @@ class Conduit(CMakePackage):
maintainers("cyrush")
root_cmakelists_dir = "src"
###########################################################################
# package variants
###########################################################################
@@ -121,6 +124,12 @@ class Conduit(CMakePackage):
# package dependencies
###########################################################################
#######################
# BLT
#######################
depends_on("blt", type="build")
depends_on("blt@0.6.2:", type="build", when="@0.9:")
#######################
# CMake
#######################
@@ -245,7 +254,7 @@ def url_for_version(self, version):
def cmake_args(self):
host_config = self._get_host_config_path(self.spec)
options = []
options.extend(["-C", host_config, "../spack-src/src/"])
options.extend(["-C", host_config])
return options
@run_after("build")
@@ -255,6 +264,13 @@ def build_test(self):
print("Running Conduit Unit Tests...")
make("test")
# Copy the generated host-config to install directory for downstream use
@run_before("install")
def copy_host_config(self):
src = self._get_host_config_path(self.spec)
dst = join_path(self.spec.prefix, os.path.basename(src))
copy(src, dst)
@run_after("install")
@on_package_attributes(run_tests=True)
def check_install(self):
@@ -291,7 +307,8 @@ def _get_host_config_path(self, spec):
host_config_path = "{0}-{1}-{2}-conduit-{3}.cmake".format(
socket.gethostname(), sys_type, spec.compiler, spec.dag_hash()
)
dest_dir = spec.prefix
dest_dir = self.stage.source_path
host_config_path = os.path.abspath(join_path(dest_dir, host_config_path))
return host_config_path
@@ -392,15 +409,31 @@ def hostconfig(self):
if fflags:
cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags))
# Add various rpath linker flags
rpaths = []
if self.compiler.extra_rpaths:
rpaths += self.compiler.extra_rpaths
# Note: This is not needed if we add `extra_rpaths` to this compiler spec case
if (f_compiler is not None) and ("gfortran" in f_compiler) and ("clang" in cpp_compiler):
libdir = os.path.join(os.path.dirname(os.path.dirname(f_compiler)), "lib")
flags = ""
for _libpath in [libdir, libdir + "64"]:
if os.path.exists(_libpath):
flags += " -Wl,-rpath,{0}".format(_libpath)
description = "Adds a missing libstdc++ rpath"
if flags:
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, description))
rpaths.append(_libpath)
linkerflags = ""
for rpath in rpaths:
linkerflags += "-Wl,-rpath,{} ".format(rpath)
cfg.write(cmake_cache_entry("CMAKE_EXE_LINKER_FLAGS", linkerflags))
if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", linkerflags))
else:
cfg.write(cmake_cache_entry("CMAKE_STATIC_LINKER_FLAGS", linkerflags))
#######################
# BLT
#######################
cfg.write(cmake_cache_entry("BLT_SOURCE_DIR", spec["blt"].prefix))
#######################
# Examples/Utilities
@@ -436,7 +469,7 @@ def hostconfig(self):
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags))
if spec.satisfies("+shared"):
flags = "${CMAKE_SHARED_LINKER_FLAGS} " + rpaths
cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", flags))
cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", flags, force=True))
#######################
# Python

View File

@@ -276,7 +276,7 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage):
depends_on("sirius@7.3:", when="@9.1")
depends_on("sirius@7.4:7.5", when="@2023.2")
depends_on("sirius@7.5:", when="@2024.1:")
depends_on("sirius@7.6: +pugixml", when="@2024.2:")
with when("+libvori"):
depends_on("libvori@201219:", when="@8.1")
depends_on("libvori@210412:", when="@8.2:")

View File

@@ -16,18 +16,16 @@ class Cppunit(AutotoolsPackage):
license("LGPL-2.1-or-later")
version("master", branch="master")
version("1.15_20220904", commit="78e64f0edb4f3271a6ddbcdf9cba05138597bfca")
version(
"1.14.0",
sha256="3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780",
preferred=True,
)
version("1.15.1", sha256="89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7")
version("1.15_20220904", commit="78e64f0edb4f3271a6ddbcdf9cba05138597bfca", deprecated=True)
version("1.14.0", sha256="3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780")
version("1.13.2", sha256="3f47d246e3346f2ba4d7c9e882db3ad9ebd3fcbd2e8b732f946e0e3eeb9f429f")
depends_on("cxx", type="build") # generated
depends_on("cxx", type="build")
# https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_12_6_X/master/cppunit-1.14-defaulted-function-deleted.patch
patch("cppunit-1.14-defaulted-function-deleted.patch", when="@1.15:")
# https://cgit.freedesktop.org/libreoffice/cppunit/commit/?h=cppunit-1.15.1&id=834f3a287387bd6230c98b0c5375aff568c75e02
patch("cppunit-1.14-defaulted-function-deleted.patch", when="@1.15_20220904")
variant(
"cxxstd",
@@ -45,9 +43,9 @@ class Cppunit(AutotoolsPackage):
description="Build shared libs, static libs or both",
)
depends_on("autoconf", type="build", when="@1.15_20220904")
depends_on("automake", type="build", when="@1.15_20220904")
depends_on("libtool", type="build", when="@1.15_20220904")
depends_on("autoconf", type="build", when="@master,1.15_20220904")
depends_on("automake", type="build", when="@master,1.15_20220904")
depends_on("libtool", type="build", when="@master,1.15_20220904")
def setup_build_environment(self, env):
cxxstd = self.spec.variants["cxxstd"].value

View File

@@ -24,6 +24,16 @@
# format returned by platform.system() and 'arch' by platform.machine()
_versions = {
"12.6.0": {
"Linux-aarch64": (
"398db7baca17d51ad5035c606714c96380c965fd1742478c743bc6bbb1d8f63c",
"https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux_sbsa.run",
),
"Linux-x86_64": (
"31ab04394e69b14dd8656e2b44c2877db1a0e898dff8a7546a4c628438101b94",
"https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run",
),
},
"12.5.1": {
"Linux-aarch64": (
"353e8abc52ca80adf05002b775c7b3a2d2feefcf1c25ae13f8757f9a11efba3e",

View File

@@ -20,6 +20,7 @@ class Detray(CMakePackage):
license("MPL-2.0", checked_by="stephenswat")
version("0.73.0", sha256="f574016bc7515a34a675b577e93316e18cf753f1ab7581dcf1c8271a28cb7406")
version("0.72.1", sha256="6cc8d34bc0d801338e9ab142c4a9884d19d9c02555dbb56972fab86b98d0f75b")
version("0.71.0", sha256="2be2b3dac6f77aa8cea033eba841378dc3703ff93c99e4d05ea03df685e6d508")
version("0.70.0", sha256="14fa1d478d44d5d987caea6f4b365bce870aa8e140c21b802c527afa3a5db869")
@@ -28,13 +29,18 @@ class Detray(CMakePackage):
version("0.67.0", sha256="87b1b29f333c955ea6160f9dda89628490d85a9e5186c2f35f57b322bbe27e18")
variant("csv", default=True, description="Enable the CSV IO plugin")
variant(
"cxxstd",
default="17",
values=("17", "20", "23"),
multi=False,
description="C++ standard used",
_cxxstd_values = (
conditional("17", when="@:0.72.1"),
conditional("20", when="@0.67.0:"),
conditional("23", when="@0.67.0:"),
)
_cxxstd_common = {
"values": _cxxstd_values,
"multi": False,
"description": "C++ standard used.",
}
variant("cxxstd", default="17", when="@:0.72.1", **_cxxstd_common)
variant("cxxstd", default="20", when="@0.73.0:", **_cxxstd_common)
variant("json", default=True, description="Enable the JSON IO plugin")
variant(
"scalar",
@@ -57,10 +63,14 @@ class Detray(CMakePackage):
depends_on("acts-algebra-plugins +eigen", when="+eigen")
depends_on("acts-algebra-plugins +smatrix", when="+smatrix")
# Detray imposes requirements on the C++ standard values used by Algebra
# Plugins.
with when("+smatrix"):
depends_on("acts-algebra-plugins cxxstd=17", when="cxxstd=17")
depends_on("acts-algebra-plugins cxxstd=20", when="cxxstd=20")
depends_on("acts-algebra-plugins cxxstd=23", when="cxxstd=23")
for _cxxstd in _cxxstd_values:
for _v in _cxxstd:
depends_on(
f"acts-algebra-plugins cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when}"
)
depends_on("actsvg +meta")

View File

@@ -22,6 +22,7 @@ class E4sCl(PythonPackage):
license("MIT")
version("master", branch="master")
version("1.0.4", commit="9781a62af20f951e3c2c19a522f4fc16d20a256e")
version("1.0.3", commit="1b34fa7964273675ce18b9cd3006b4b87dda1ef2")
version("1.0.1", commit="b2c92993e0c7cb42de07f0f7cc02da3a06816192")
version("1.0.0", commit="410bb2e6601d9b90243a487ad7f7d2dabd8ba04c")

View File

@@ -12,10 +12,18 @@ class Fastjson(MavenPackage):
string to an equivalent Java object."""
homepage = "https://github.com/alibaba/fastjson/wiki"
url = "https://github.com/alibaba/fastjson/archive/1.2.68.tar.gz"
url = "https://github.com/alibaba/fastjson2/archive/2.0.52.tar.gz"
license("Apache-2.0")
license("Apache-2.0", checked_by="wdconinc")
version("2.0.52", sha256="23c84854da465d8cff4e252bf20ef4b82cf2c7bc57944b9a316fd31a8977d2a1")
version("1.2.83", sha256="82fffe7859b1b6630f9a5e9b11c3cc5d043ba91f578d30cd1a60afa369ad448b")
version("1.2.68", sha256="0b3f5308830e5e5abacf9dc8e4115c20153c1cdabec228c3eca48a48c9d5f4d7")
depends_on("java@8", type=("build", "run"))
def url_for_version(self, version):
if version < Version("2"):
return f"https://github.com/alibaba/fastjson/archive/{version}.tar.gz"
else:
return f"https://github.com/alibaba/fastjson2/archive/{version}.tar.gz"

View File

@@ -109,7 +109,6 @@ class Gaudi(CMakePackage):
depends_on(pv[0], when=pv[1] + " +examples")
# Adding these dependencies triggers the build of most optional components
depends_on("cppgsl", when="+cppunit")
depends_on("cppunit", when="+cppunit")
depends_on("doxygen +graphviz", when="+docs")
depends_on("gperftools", when="+gperftools")

View File

@@ -33,6 +33,7 @@ class Gromacs(CMakePackage, CudaPackage):
version("main", branch="main")
version("master", branch="main", deprecated=True)
version("2024.3", sha256="bbda056ee59390be7d58d84c13a9ec0d4e3635617adf2eb747034922cba1f029")
version("2024.2", sha256="802a7e335f2e895770f57b159e4ec368ebb0ff2ce6daccf706c6e8025c36852b")
version("2024.1", sha256="937d8f12a36fffbf2af7add71adbb5aa5c5537892d46c9a76afbecab1aa0aac7")
version("2024", sha256="04d226d52066a8bc3a42e00d6213de737b4ec292e26703065924ff01956801e2")
@@ -161,9 +162,18 @@ class Gromacs(CMakePackage, CudaPackage):
variant(
"nvshmem",
default=False,
description="Enable nvshmem support for nvidia gpus",
when="+cuda+mpi",
when="@2024:+mpi+cuda",
description="Enable NVSHMEM support for Nvidia GPUs",
)
conflicts(
"+nvshmem",
when="+cufftmp",
msg=(
"The GROMACS support for NVSHMEM does not work with the GROMACS support "
"for cuFFTMp (even though cuFFTMp uses NVSHMEM in its implementation)"
),
)
variant("openmp", default=True, description="Enables OpenMP at configure time")
variant("openmp_max_threads", default="none", description="Max number of OpenMP threads")
conflicts(

View File

@@ -359,6 +359,9 @@ def get_paths(self):
if self.spec.satisfies("@5.7:"):
paths["hip-path"] = rocm_prefix
if self.spec.satisfies("@6.0:"):
paths["hsa-rocr-dev"] = rocm_prefix
else:
paths = {
"hip-path": self.spec.prefix,

View File

@@ -64,7 +64,7 @@ class HsakmtRoct(CMakePackage):
"6.0.2",
"6.1.0",
"6.1.1",
"6.1.0",
"6.1.2",
]:
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
depends_on(f"llvm-amdgpu@{ver}", type="test", when=f"@{ver}")

View File

@@ -25,6 +25,7 @@ class KokkosKernels(CMakePackage, CudaPackage):
# openssl sha256 kokkos-kernels-x.y.z.tar.gz
version("develop", branch="develop")
version("master", branch="master")
version("4.4.00", sha256="6559871c091eb5bcff53bae5a0f04f2298971d1aa1b2c135bd5a2dae3f9376a2")
version("4.3.01", sha256="749553a6ea715ba1e56fa0b13b42866bb9880dba7a94e343eadf40d08c68fab8")
version("4.3.00", sha256="03c3226ee97dbca4fa56fe69bc4eefa0673e23c37f2741943d9362424a63950e")
version("4.2.01", sha256="058052b3a40f5d4e447b7ded5c480f1b0d4aa78373b0bc7e43804d0447c34ca8")
@@ -51,6 +52,7 @@ class KokkosKernels(CMakePackage, CudaPackage):
depends_on("kokkos")
depends_on("kokkos@master", when="@master")
depends_on("kokkos@develop", when="@develop")
depends_on("kokkos@4.4.00", when="@4.4.00")
depends_on("kokkos@4.3.01", when="@4.3.01")
depends_on("kokkos@4.3.00", when="@4.3.00")
depends_on("kokkos@4.2.01", when="@4.2.01")

View File

@@ -27,6 +27,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version("develop", branch="develop")
version("4.4.00", sha256="c638980cb62c34969b8c85b73e68327a2cb64f763dd33e5241f5fd437170205a")
version("4.3.01", sha256="5998b7c732664d6b5e219ccc445cd3077f0e3968b4be480c29cd194b4f45ec70")
version("4.3.00", sha256="53cf30d3b44dade51d48efefdaee7a6cf109a091b702a443a2eda63992e5fe0d")
version("4.2.01", sha256="cbabbabba021d00923fb357d2e1b905dda3838bd03c885a6752062fe03c67964")

View File

@@ -600,6 +600,22 @@ def url_for_version(self, version):
values=("single", "double"),
multi=False,
)
variant(
"fft",
default="fftw3",
when="+kspace",
description="FFT library for KSPACE package",
values=("kiss", "fftw3", "mkl"),
multi=False,
)
variant(
"fft_kokkos",
default="fftw3",
when="@20240417: +kspace+kokkos",
description="FFT library for Kokkos-enabled KSPACE package",
values=("kiss", "fftw3", "mkl", "hipfft", "cufft"),
multi=False,
)
variant(
"gpu_precision",
default="mixed",
@@ -613,8 +629,11 @@ def url_for_version(self, version):
depends_on("cmake@3.16:", when="@20231121:")
depends_on("mpi", when="+mpi")
depends_on("mpi", when="+mpiio")
depends_on("fftw-api@3", when="+kspace")
depends_on("hipfft", when="+kspace+kokkos+rocm")
depends_on("fftw-api@3", when="+kspace fft=fftw3")
depends_on("mkl", when="+kspace fft=mkl")
depends_on("hipfft", when="+kokkos+kspace+rocm fft_kokkos=hipfft")
depends_on("fftw-api@3", when="+kokkos+kspace fft_kokkos=fftw3")
depends_on("mkl", when="+kokkos+kspace fft_kokkos=mkl")
depends_on("voropp+pic", when="+voronoi")
depends_on("netcdf-c+mpi", when="+user-netcdf")
depends_on("netcdf-c+mpi", when="+netcdf")
@@ -817,6 +836,10 @@ def cmake_args(self):
args.append(self.define_from_variant("HIP_ARCH", "amdgpu_target"))
else:
args.append(self.define("PKG_GPU", False))
else:
args.append(self.define("EXTERNAL_KOKKOS", True))
if spec.satisfies("@20240207: +kokkos+kspace"):
args.append(self.define_from_variant("FFT_KOKKOS", "fft_kokkos"))
if spec.satisfies("@20180629:+lib"):
args.append(self.define("BUILD_LIB", True))
@@ -856,15 +879,9 @@ def cmake_args(self):
opt = "{0}_{1}".format(pkg_prefix, pkg.replace("-package", "").upper())
args.append(self.define(opt, "+{0}".format(pkg) in spec))
if "+kspace" in spec:
# If FFTW3 is selected, then CMake will try to detect, if threaded
# FFTW libraries are available and enable them by default.
if "^fftw" in spec or "^cray-fftw" in spec or "^amdfftw" in spec:
args.append(self.define("FFT", "FFTW3"))
elif spec["fftw-api"].name in INTEL_MATH_LIBRARIES:
args.append(self.define("FFT", "MKL"))
elif "^armpl-gcc" in spec or "^acfl" in spec:
args.append(self.define("FFT", "FFTW3"))
if spec.satisfies("+kspace"):
args.append(self.define_from_variant("FFT", "fft"))
if spec.satisfies("fft=fftw3 ^armpl-gcc") or spec.satisfies("fft=fftw3 ^acfl"):
args.append(self.define("FFTW3_LIBRARY", self.spec["fftw-api"].libs[0]))
args.append(
self.define("FFTW3_INCLUDE_DIR", self.spec["fftw-api"].headers.directories[0])
@@ -874,8 +891,6 @@ def cmake_args(self):
# for transposing 3d FFT data.
args.append(self.define("FFT_SINGLE", spec.satisfies("fftw_precision=single")))
if "+kokkos" in spec:
args.append(self.define("EXTERNAL_KOKKOS", True))
if "+user-adios" in spec or "+adios" in spec:
args.append(self.define("ADIOS2_DIR", self.spec["adios2"].prefix))
if "+user-plumed" in spec or "+plumed" in spec:

View File

@@ -74,8 +74,8 @@ def setup_run_environment(self, env):
@classmethod
def determine_spec_details(cls, prefix, exes_in_prefix):
path = os.environ.get("LHAPDF_DATA_PATH", None)
if not path:
return None
# unfortunately the sets are not versioned -
# just hardcode the current version and hope it is fine
s = Spec.from_detection("lhapdfsets@6.3.0")
s.external_path = path
return s if path else None
return Spec.from_detection("lhapdfsets@6.3.0", external_path=path)

View File

@@ -8,19 +8,35 @@
class Libmnl(AutotoolsPackage):
"""libmnl is a minimalistic user-space library oriented to Netlink
developers.There are a lot of common tasks in parsing, validating,
developers. There are a lot of common tasks in parsing, validating,
constructing of both the Netlink header and TLVs that are repetitive
and easy to get wrong.This library aims to provide simple helpers
and easy to get wrong. This library aims to provide simple helpers
that allows you to re-use code and to avoid re-inventing the wheel."""
homepage = "https://github.com/threatstack/libmnl"
url = "https://github.com/threatstack/libmnl/archive/libmnl-1.0.3.tar.gz"
homepage = "https://netfilter.org/projects/libmnl/"
url = "https://netfilter.org/projects/libmnl/files/libmnl-1.0.5.tar.bz2"
license("LGPL-2.1-or-later")
license("LGPL-2.1-or-later", checked_by="wdconinc")
version("1.0.3", sha256="14405da1bb3a679c24e0fe1f2845d47359ed2de8055e588df4b6b19cab68e901")
version("1.0.2", sha256="2caec4716aceb245130f4e42f8c118b92618e37db8bb94e2799aff42b95c269f")
version("1.0.1", sha256="60fe2a6ce59f6118b75b598dc11fc89b97e20ff8633fbea26fc568c45bbb672b")
version("1.0.5", sha256="274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525")
# Versions that were initially sourced at a third party are now deprecated
with default_args(deprecated=True):
version(
"1.0.3",
sha256="14405da1bb3a679c24e0fe1f2845d47359ed2de8055e588df4b6b19cab68e901",
url="https://github.com/threatstack/libmnl/archive/libmnl-1.0.3.tar.gz",
)
version(
"1.0.2",
sha256="2caec4716aceb245130f4e42f8c118b92618e37db8bb94e2799aff42b95c269f",
url="https://github.com/threatstack/libmnl/archive/libmnl-1.0.2.tar.gz",
)
version(
"1.0.1",
sha256="60fe2a6ce59f6118b75b598dc11fc89b97e20ff8633fbea26fc568c45bbb672b",
url="https://github.com/threatstack/libmnl/archive/libmnl-1.0.1.tar.gz",
)
depends_on("autoconf", type="build")
depends_on("automake", type="build")

View File

@@ -10,14 +10,34 @@ class LibnetfilterConntrack(AutotoolsPackage):
"""libnetfilter_conntrack is a userspace library providing a programming
interface (API) to the in-kernel connection tracking state table."""
homepage = "https://netfilter.org"
url = "https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.4.tar.gz"
homepage = "https://netfilter.org/projects/libnetfilter_conntrack/"
url = "https://www.netfilter.org/projects/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.5.tar.bz2"
license("GPL-2.0-or-later")
license("GPL-2.0-or-later", checked_by="wdconinc")
version("1.0.4", sha256="68168697b9d6430b7797ddd579e13a2cef06ea15c154dfd14e18be64e035ea6e")
version("1.0.3", sha256="e2129d7c0346c7140355d643da8e3409cbd755689ea889bc0d6dbd557f1b5671")
version("1.0.2", sha256="97f641a2e47053bd87bc817292519d6661e8f84a22d3314724b83b9f5eaddbff")
version("1.0.9", sha256="67bd9df49fe34e8b82144f6dfb93b320f384a8ea59727e92ff8d18b5f4b579a8")
version("1.0.8", sha256="0cd13be008923528687af6c6b860f35392d49251c04ee0648282d36b1faec1cf")
version("1.0.7", sha256="33685351e29dff93cc21f5344b6e628e41e32b9f9e567f4bec0478eb41f989b6")
version("1.0.6", sha256="efcc08021284e75f4d96d3581c5155a11f08fd63316b1938cbcb269c87f37feb")
version("1.0.5", sha256="fc9d7daf43605a73045de203bbfc0bca3e07f72d4ac61bcf656868f48692d73a")
# Versions that were initially sourced at a third party are now deprecated
with default_args(deprecated=True):
version(
"1.0.4",
sha256="68168697b9d6430b7797ddd579e13a2cef06ea15c154dfd14e18be64e035ea6e",
url="https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.4.tar.gz",
)
version(
"1.0.3",
sha256="e2129d7c0346c7140355d643da8e3409cbd755689ea889bc0d6dbd557f1b5671",
url="https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.3.tar.gz",
)
version(
"1.0.2",
sha256="97f641a2e47053bd87bc817292519d6661e8f84a22d3314724b83b9f5eaddbff",
url="https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.2.tar.gz",
)
depends_on("c", type="build") # generated
@@ -26,5 +46,6 @@ class LibnetfilterConntrack(AutotoolsPackage):
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("pkgconfig", type="build")
depends_on("libmnl@1.0.3:")
depends_on("libnfnetlink@1.0.0:")

View File

@@ -9,14 +9,21 @@
class LibnetfilterCthelper(AutotoolsPackage):
"""Libnetfilter-cthelper library for user space helpers / ALGs"""
homepage = "https://github.com/vyos/libnetfilter-cthelper/"
url = "https://github.com/vyos/libnetfilter-cthelper/archive/VyOS_1.2-2019Q4.tar.gz"
homepage = "https://netfilter.org/projects/libnetfilter_cthelper/"
url = "https://www.netfilter.org/projects/libnetfilter_cthelper/files/libnetfilter_cthelper-1.0.5.tar.bz2"
license("GPL-2.0-or-later")
version(
"1.2-2019Q4", sha256="15a7b13999d1428d75e720c8116318cd51bec1d365852ae1778d3c85b93a9777"
)
version("1.0.1", sha256="14073d5487233897355d3ff04ddc1c8d03cc5ba8d2356236aa88161a9f2dc912")
# Versions that were initially sourced at a third party are now deprecated
with default_args(deprecated=True):
# This appears to be version 1.0.0
version(
"1.2-2019Q4",
sha256="15a7b13999d1428d75e720c8116318cd51bec1d365852ae1778d3c85b93a9777",
url="https://github.com/vyos/libnetfilter-cthelper/archive/VyOS_1.2-2019Q4.tar.gz",
)
depends_on("c", type="build") # generated
@@ -24,4 +31,6 @@ class LibnetfilterCthelper(AutotoolsPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("libmnl")
depends_on("pkgconfig", type="build")
depends_on("libmnl@1.0:")

View File

@@ -9,14 +9,21 @@
class LibnetfilterCttimeout(AutotoolsPackage):
"""Conntrack timeout policy library."""
homepage = "https://github.com/vyos/libnetfilter-cttimeout/"
url = "https://github.com/vyos/libnetfilter-cttimeout/archive/VyOS_1.2-2019Q4.tar.gz"
homepage = "https://netfilter.org/projects/libnetfilter_cttimeout/"
url = "https://www.netfilter.org/projects/libnetfilter_cttimeout/files/libnetfilter_cttimeout-1.0.1.tar.bz2"
license("GPL-2.0-only")
license("GPL-2.0-only", checked_by="wdconinc")
version(
"1.2-2019Q4", sha256="71cebdf07a578901b160a54199062a4b4cd445e14742e2c7badc0900d8ae56b6"
)
version("1.0.1", sha256="0b59da2f3204e1c80cb85d1f6d72285fc07b01a2f5678abf5dccfbbefd650325")
# Versions that were initially sourced at a third party are now deprecated
with default_args(deprecated=True):
# This appears to be version 1.0.0
version(
"1.2-2019Q4",
sha256="71cebdf07a578901b160a54199062a4b4cd445e14742e2c7badc0900d8ae56b6",
url="https://github.com/vyos/libnetfilter-cttimeout/archive/VyOS_1.2-2019Q4.tar.gz",
)
depends_on("c", type="build") # generated
@@ -24,5 +31,6 @@ class LibnetfilterCttimeout(AutotoolsPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("pkgconfig", type="build")
depends_on("libmnl")

View File

@@ -9,14 +9,21 @@
class LibnetfilterQueue(AutotoolsPackage):
"""Libnetfilter-queue libnetfilter queue library."""
homepage = "https://github.com/vyos/libnetfilter-queue/"
url = "https://github.com/vyos/libnetfilter-queue/archive/VyOS_1.2-2019Q4.tar.gz"
homepage = "https://netfilter.org/projects/libnetfilter_queue/"
url = "https://www.netfilter.org/projects/libnetfilter_queue/files/libnetfilter_queue-1.0.5.tar.bz2"
license("GPL-2.0-only")
version(
"1.2-2019Q4", sha256="73b87e600b492cf9e3aa8fb6e9855e1ccc523a7bc466c1fd1a0e6ffa424d746e"
)
version("1.0.5", sha256="f9ff3c11305d6e03d81405957bdc11aea18e0d315c3e3f48da53a24ba251b9f5")
# Versions that were initially sourced at a third party are now deprecated
with default_args(deprecated=True):
# This appears to be version 1.0.2
version(
"1.2-2019Q4",
sha256="73b87e600b492cf9e3aa8fb6e9855e1ccc523a7bc466c1fd1a0e6ffa424d746e",
url="https://github.com/vyos/libnetfilter-queue/archive/VyOS_1.2-2019Q4.tar.gz",
)
depends_on("c", type="build") # generated
@@ -24,6 +31,7 @@ class LibnetfilterQueue(AutotoolsPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("pkgconfig", type="build")
depends_on("libnfnetlink")
depends_on("libmnl")
depends_on("libmnl@1.0.3:")

View File

@@ -12,14 +12,30 @@ class Libnfnetlink(AutotoolsPackage):
netfilter subsystem specific libraries such as libnfnetlink_conntrack,
libnfnetlink_log and libnfnetlink_queue."""
homepage = "https://netfilter.org"
url = "https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-1.0.1.tar.gz"
homepage = "https://netfilter.org/projects/libnfnetlink/"
url = "https://netfilter.org/projects/libnfnetlink/files/libnfnetlink-1.0.2.tar.bz2"
license("GPL-2.0-only")
version("1.0.1", sha256="11dd8a1045b03d47c878535eeb6b9eb34db295d21903a4dfd2c2cc63f45e675b")
version("1.0.0", sha256="1d43456e51d5ff2e8bc84b68d8acad3bb15603cfaa806ba9693eea4f2aa1abeb")
version("0.0.41", sha256="84381ad3aec4fc4884c020c7774a241160d92ed50c9f93a2660db94e212cbb72")
version("1.0.2", sha256="b064c7c3d426efb4786e60a8e6859b82ee2f2c5e49ffeea640cfe4fe33cbc376")
# Versions that were initially sourced at a third party are now deprecated
with default_args(deprecated=True):
version(
"1.0.1",
sha256="11dd8a1045b03d47c878535eeb6b9eb34db295d21903a4dfd2c2cc63f45e675b",
url="https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-1.0.1.tar.gz",
)
version(
"1.0.0",
sha256="1d43456e51d5ff2e8bc84b68d8acad3bb15603cfaa806ba9693eea4f2aa1abeb",
url="https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-1.0.0.tar.gz",
)
version(
"0.0.41",
sha256="84381ad3aec4fc4884c020c7774a241160d92ed50c9f93a2660db94e212cbb72",
url="https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-0.0.41.tar.gz",
)
depends_on("c", type="build") # generated

View File

@@ -10,11 +10,12 @@ class Libnftnl(AutotoolsPackage):
"""A library for low-level interaction with nftables Netlink's API
over libmnl."""
homepage = "https://git.netfilter.org/libnftnl/"
url = "https://ftp.netfilter.org/pub/libnftnl/libnftnl-1.1.5.tar.bz2"
homepage = "https://netfilter.org/projects/libmnl/"
url = "https://netfilter.org/projects/libnftnl/files/libnftnl-1.2.7.tar.xz"
license("GPL-2.0-or-later")
license("GPL-2.0-or-later", checked_by="wdconinc")
version("1.2.7", sha256="9122774f968093d5c0bacddd67de480f31fa4073405a7fc058a34b0f387aecb3")
version("1.1.6", sha256="c1eb5a696fc1d4b3b412770586017bc01af93da3ddd25233d34a62979dee1eca")
version("1.1.5", sha256="66de4d05227c0a1a731c369b193010d18a05b1185c2735211e0ecf658eeb14f3")
version("1.1.4", sha256="c8c7988347adf261efac5bba59f8e5f995ffb65f247a88cc144e69620573ed20")
@@ -22,4 +23,12 @@ class Libnftnl(AutotoolsPackage):
depends_on("c", type="build") # generated
depends_on("pkgconfig", type="build")
depends_on("libmnl@1.0.3:")
depends_on("libmnl@1.0.0:")
depends_on("libmnl@1.0.3:", when="@1.1.1:")
depends_on("libmnl@1.0.4:", when="@1.1.7:")
def url_for_version(self, version):
if version >= Version("1.2.5"):
return f"https://netfilter.org/projects/libnftnl/files/libnftnl-{version}.tar.xz"
else:
return f"https://netfilter.org/projects/libnftnl/files/libnftnl-{version}.tar.bz2"

View File

@@ -22,7 +22,10 @@ class LinaroForge(Package):
homepage = "https://www.linaroforge.com"
maintainers("kenche-linaro")
if platform.machine() in ["aarch64", "arm64"]:
if platform.machine() == "aarch64":
version(
"24.0.4", sha256="d126e4690f7c9bf21e541721dac51dcee1f336a882211426bf98a15d80671e3d"
)
version(
"24.0.3", sha256="5030c5c23824963f82e94ed606e47cce802393fa4cb7757966818baa7012aa21"
)
@@ -91,6 +94,9 @@ class LinaroForge(Package):
"21.1.3", sha256="eecbc5686d60994c5468b2d7cd37bebe5d9ac0ba37bd1f98fbfc69b071db541e"
)
elif platform.machine() == "x86_64":
version(
"24.0.4", sha256="001e7b7cd796d8e807971b99a9ca233c24f8fcd6eee4e9b4bbb0ec8560d44f08"
)
version(
"24.0.3", sha256="1796559fb86220d5e17777215d3820f4b04aba271782276b81601d5065284526"
)

View File

@@ -274,12 +274,12 @@ def cmake_args(self):
# Make sure that the compiler paths are in the LD_LIBRARY_PATH
def setup_run_environment(self, env):
llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix
env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/llvm/lib")
env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/lib")
# Make sure that the compiler paths are in the LD_LIBRARY_PATH
def setup_dependent_run_environment(self, env, dependent_spec):
llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix
env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/llvm/lib")
env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/lib")
# Required for enabling asan on dependent packages
def setup_dependent_build_environment(self, env, dependent_spec):

View File

@@ -165,8 +165,12 @@ class Llvm(CMakePackage, CudaPackage, LlvmDetection, CompilerPackage):
"or as a project (with the compiler in use)",
)
variant("offload", default=True, when="@19:", description="Build the Offload subproject")
conflicts("+offload", when="~clang")
variant("libomptarget", default=True, description="Build the OpenMP offloading library")
conflicts("+libomptarget", when="~clang")
conflicts("+libomptarget", when="~offload @19:")
for _p in ["darwin", "windows"]:
conflicts("+libomptarget", when="platform={0}".format(_p))
del _p
@@ -912,6 +916,9 @@ def cmake_args(self):
elif "openmp=project" in spec:
projects.append("openmp")
if "+offload" in spec:
runtimes.append("offload")
if "+libomptarget" in spec:
cmake_args.append(define("OPENMP_ENABLE_LIBOMPTARGET", True))
else:

View File

@@ -17,17 +17,21 @@ class Lshw(MakefilePackage):
homepage = "https://github.com/lyonel/lshw"
url = "https://github.com/lyonel/lshw/archive/B.02.18.tar.gz"
list_url = "https://github.com/lyonel/lshw/tags"
license("GPL-3.0-or-later")
license("GPL-2.0-only", checked_by="wdconinc")
version("02.20", sha256="6b8346a89fb0f0f1798e66f6a707a881d38b9b3a67256b30fc4628dac09f291a")
version("02.18", sha256="aa8cb2eebf36e9e46dfc227f24784aa8c87181ec96e57ee6c455da8a0ce4fa77")
version("02.17", sha256="0bb76c7df7733dc9b80d5d35f9d9752409ddb506e190453a2cc960461de5ddeb")
version("02.16", sha256="58a7731d204791dd33db5eb3fde9808d1235283e069e6c33a193637ccec27b3e")
version("02.15", sha256="33c51ba0554d4bcd8ff9a67e5971a63b9ddd58213e2901a09000815376bc61b9")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
def install(self, spec, prefix):
make("install")
install_tree(".", prefix)
def setup_build_environment(self, env):
env.set("PREFIX", self.prefix)
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)

View File

@@ -82,6 +82,10 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
# https://bitbucket.org/icl/magma/issues/25/error-cusparsesolveanalysisinfo_t-does-not
conflicts("^cuda@11:", when="@:2.5.3")
# currently not compatible with CUDA-12.6
# https://github.com/icl-utk-edu/magma/issues/7
conflicts("^cuda@12.6:", when="@:2.8.0")
# Many cuda_arch values are not yet recognized by MAGMA's CMakeLists.txt
for target in [10, 11, 12, 13, 21, 32, 52, 53, 61, 62, 72, 86]:
conflicts(f"cuda_arch={target}")

View File

@@ -106,9 +106,6 @@ class Mfem(Package, CudaPackage, ROCmPackage):
extension="tar.gz",
)
# Tagged development version used by xSDK
version("4.0.1-xsdk", commit="c55c80d17b82d80de04b849dd526e17044f8c99a")
version(
"4.0.0",
sha256="df5bdac798ea84a263979f6fbf79de9013e1c55562f95f98644c3edcacfbc727",
@@ -309,8 +306,8 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("sundials@2.7.0+mpi+hypre", when="@:3.3.0+sundials+mpi")
depends_on("sundials@2.7.0:", when="@3.3.2:+sundials~mpi")
depends_on("sundials@2.7.0:+mpi+hypre", when="@3.3.2:+sundials+mpi")
depends_on("sundials@5.0.0:5", when="@4.0.1-xsdk:4.4+sundials~mpi")
depends_on("sundials@5.0.0:5+mpi+hypre", when="@4.0.1-xsdk:4.4+sundials+mpi")
depends_on("sundials@5.0.0:5", when="@4.1.0:4.4+sundials~mpi")
depends_on("sundials@5.0.0:5+mpi+hypre", when="@4.1.0:4.4+sundials+mpi")
depends_on("sundials@5.0.0:6.7.0", when="@4.5.0:+sundials~mpi")
depends_on("sundials@5.0.0:6.7.0+mpi+hypre", when="@4.5.0:+sundials+mpi")
conflicts("cxxstd=11", when="^sundials@6.4.0:")

View File

@@ -74,10 +74,15 @@ class Mgard(CMakePackage, CudaPackage):
def flag_handler(self, name, flags):
if name == "cxxflags":
if self.spec.satisfies("@2020-10-01 %oneapi@2023:"):
flags.append("-Wno-error=c++11-narrowing")
if self.spec.satisfies("@2020-10-01 %apple-clang@15:"):
flags.append("-Wno-error=c++11-narrowing")
for a_spec in [
"@2020-10-01 %oneapi@2023:",
"@2020-10-01 %apple-clang@15:",
"@2020-10-01 %aocc@3:",
"@2020-10-01 %cce@15:",
"@2020-10-01 %rocmcc@4:",
]:
if self.spec.satisfies(a_spec):
flags.append("-Wno-error=c++11-narrowing")
return (flags, None, None)
def cmake_args(self):

View File

@@ -84,9 +84,9 @@ def libs(self):
def setup_run_environment(self, env):
# Because MPI implementations provide compilers, they have to add to
# their run environments the code to make the compilers available.
env.set("MPITRAMPOLINE_CC", self.compiler.cc_names[0])
env.set("MPITRAMPOLINE_CXX", self.compiler.cxx_names[0])
env.set("MPITRAMPOLINE_FC", self.compiler.fc_names[0])
env.set("MPITRAMPOLINE_CC", self.compiler.cc)
env.set("MPITRAMPOLINE_CXX", self.compiler.cxx)
env.set("MPITRAMPOLINE_FC", self.compiler.fc)
env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
env.set("MPICXX", join_path(self.prefix.bin, "mpicxx"))
env.set("MPIF77", join_path(self.prefix.bin, "mpifc"))

View File

@@ -28,6 +28,8 @@ class Mrbayes(AutotoolsPackage):
"readline", default=False, description="Enable readline library, not recommended with MPI"
)
conflicts("+readline", when="+mpi", msg="MPI and readline support are exclusive")
depends_on("libbeagle", when="+beagle")
depends_on("mpi", when="+mpi")
depends_on("readline", when="+readline")

View File

@@ -18,6 +18,7 @@ class Mruby(Package):
license("MIT")
version("master", branch="master")
version("3.3.0", sha256="53088367e3d7657eb722ddfacb938f74aed1f8538b3717fe0b6eb8f58402af65")
version("3.2.0", sha256="3c198e4a31d31fe8524013066fac84a67fe6cd6067d92c25a1c79089744cb608")
version("3.1.0", sha256="64ce0a967028a1a913d3dfc8d3f33b295332ab73be6f68e96d0f675f18c79ca8")
version("3.0.0", sha256="95b798cdd931ef29d388e2b0b267cba4dc469e8722c37d4ef8ee5248bc9075b0")

View File

@@ -0,0 +1,38 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class NvplFft(Package):
"""NVPL FFT (NVIDIA Performance Libraries FFT) is part of NVIDIA Performance Libraries
and provides Fast Fourier Transform (FFT) calculations on ARM CPUs.
"""
homepage = "https://docs.nvidia.com/nvpl/_static/blas/index.html"
url = (
"https://developer.download.nvidia.com/compute/nvpl/redist"
"/nvpl_fft/linux-sbsa/nvpl_fft-linux-sbsa-0.1.0-archive.tar.xz"
)
license("UNKNOWN")
version("0.3.0", sha256="e20791b77fa705e5a4f7aa5dada39b2a41e898189e0e60e680576128d532269b")
version("0.2.0.2", sha256="264343405aad6aca451bf8bd0988b6217b2bb17fd8f99394b83e04d9ab2f7f91")
version("0.1.0", sha256="0344f8e15e5b40f4d552f7013fe04a32e54a092cc3ebede51ddfce74b44c6e7d")
provides("fftw-api@3")
requires("target=armv8.2a:", msg="Any CPU with Arm-v8.2a+ microarch")
conflicts("%gcc@:7")
conflicts("%clang@:13")
def url_for_version(self, version):
url = "https://developer.download.nvidia.com/compute/nvpl/redist/nvpl_fft/linux-sbsa/nvpl_fft-linux-sbsa-{0}-archive.tar.xz"
return url.format(version)
def install(self, spec, prefix):
install_tree(".", prefix)

View File

@@ -15,10 +15,20 @@ class ParallelHashmap(CMakePackage):
license("Apache-2.0")
version("1.3.12", sha256="0cc203144321924cfbfcc401f42d8204c0dd24e2760c7a1c091baa16d9777c08")
version("1.3.11", sha256="0515a681bfb24207013786a7737e9d8561302e656689d8a65ea480bbabab460f")
depends_on("cxx", type="build") # generated
variant("examples", description="Build examples", default=False)
depends_on("cxx", type="build")
depends_on("cmake@3.8:", type="build")
patch("pthread.patch")
def cmake_args(self):
args = [
self.define_from_variant("PHMAP_BUILD_EXAMPLES", "examples"),
self.define("PHMAP_BUILD_TESTS", False), # disable due to vendored gtest
]
return args

View File

@@ -88,6 +88,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
variant("adios2", default=False, description="Enable ADIOS2 support", when="@5.8:")
variant("visitbridge", default=False, description="Enable VisItBridge support")
variant("raytracing", default=False, description="Enable Raytracing support")
variant("cdi", default=False, description="Enable CDI support")
variant(
"openpmd",
default=False,
@@ -234,6 +235,8 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
depends_on("openimagedenoise", when="+raytracing")
depends_on("ospray +mpi", when="+raytracing +mpi")
depends_on("cdi", when="+cdi")
depends_on("bzip2")
depends_on("double-conversion")
depends_on("expat")
@@ -706,6 +709,10 @@ def use_x11():
cmake_args.append(self.define_from_variant("VTK_ENABLE_OSPRAY", "raytracing"))
cmake_args.append(self.define_from_variant("VTKOSPRAY_ENABLE_DENOISER", "raytracing"))
# CDI
cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_ENABLE_CDIReader", "cdi"))
cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_AUTOLOAD_CDIReader", "cdi"))
return cmake_args
def test_smoke_test(self):

View File

@@ -0,0 +1,35 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PerlCompressBzip2(PerlPackage):
"""Interface to Bzip2 compression library"""
homepage = "https://metacpan.org/pod/Compress::Bzip2"
url = "https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Compress-Bzip2-2.28.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("2.28", sha256="859f835c3f5c998810d8b2a6f9e282ff99d6cb66ccfa55cae7e66dafb035116e")
depends_on("c", type="build")
depends_on("bzip2", type=("build", "test", "run"))
def setup_build_environment(self, env):
env.set("BZLIB_INCLUDE", self.spec["bzip2"].prefix.include)
env.set("BZLIB_LIB", self.spec["bzip2"].prefix.lib)
env.set("BZLIB_BIN", self.spec["bzip2"].prefix.bin)
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Compress::Bzip2; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out

View File

@@ -23,10 +23,6 @@ class Pflotran(AutotoolsPackage):
version("5.0.0", commit="f0fe931c72c03580e489724afeb8c5451406b942") # tag v5.0.0
version("4.0.1", commit="fd351a49b687e27f46eae92e9259156eea74897d") # tag v4.0.1
version("3.0.2", commit="9e07f416a66b0ad304c720b61aa41cba9a0929d5") # tag v3.0.2
version("xsdk-0.6.0", commit="46e14355c1827c057f2e1b3e3ae934119ab023b2")
version("xsdk-0.5.0", commit="98a959c591b72f73373febf5f9735d2c523b4c20")
version("xsdk-0.4.0", commit="c851cbc94fc56a32cfdb0678f3c24b9936a5584e")
version("xsdk-0.3.0", branch="release/xsdk-0.3.0")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
@@ -40,10 +36,6 @@ class Pflotran(AutotoolsPackage):
depends_on("petsc@3.20:+hdf5+metis", when="@5.0.0")
depends_on("petsc@3.18:+hdf5+metis", when="@4.0.1")
depends_on("petsc@3.16:+hdf5+metis", when="@3.0.2")
depends_on("petsc@3.14:+hdf5+metis", when="@xsdk-0.6.0")
depends_on("petsc@3.12:+hdf5+metis", when="@xsdk-0.5.0")
depends_on("petsc@3.10:+hdf5+metis", when="@xsdk-0.4.0")
depends_on("petsc@3.8.0:+hdf5+metis", when="@xsdk-0.3.0")
# https://github.com/spack/spack/pull/37579#issuecomment-1545998141
conflicts("^hdf5@1.14.1", when="%oneapi")
@@ -55,10 +47,6 @@ def build(self, spec, prefix):
else:
make("all")
@property
def parallel(self):
return self.spec.satisfies("@xsdk-0.4.0:")
def flag_handler(self, name, flags):
if "%gcc@10:" in self.spec and name == "fflags":
flags.append("-fallow-argument-mismatch")

View File

@@ -31,16 +31,16 @@ class Pmix(AutotoolsPackage):
while maintaining strict separation between it and the standard
itself."""
homepage = "https://pmix.org"
url = "https://github.com/pmix/pmix/releases/download/v3.1.3/pmix-3.1.3.tar.bz2"
homepage = "https://openpmix.github.io/"
url = "https://github.com/openpmix/openpmix/releases/download/v5.0.3/pmix-5.0.3.tar.bz2"
git = "https://github.com/openpmix/openpmix.git"
maintainers("rhc54")
license("BSD-3-Clause-Open-MPI")
# Branches 4.2 & 5.0 will also need submodules
version("master", branch="master", submodules=True)
version("5.0.3", sha256="3f779434ed59fc3d63e4f77f170605ac3a80cd40b1f324112214b0efbdc34f13")
version("5.0.2", sha256="28227ff2ba925da2c3fece44502f23a91446017de0f5a58f5cea9370c514b83c")
version("5.0.1", sha256="d4371792d4ba4c791e1010100b4bf9a65500ababaf5ff25d681f938527a67d4a")
version("5.0.0", sha256="92a85c4946346816c297ac244fbaf4f723bba87fb7e4424a057c2dabd569928d")
@@ -154,40 +154,46 @@ class Pmix(AutotoolsPackage):
deprecated=True,
)
depends_on("c", type="build") # generated
variant(
"pmi_backwards_compatibility",
default=True,
description="Toggle pmi backwards compatibility",
)
variant("docs", default=False, when="@master", description="Build documentation")
variant("munge", default=False, description="Enable MUNGE support")
variant("python", default=False, when="@4.1.2:", description="Enable Python bindings")
variant(
"restful",
default=False,
when="@4:",
description="Allow a PMIx server to request services from " "a system-level REST server",
description="Allow a PMIx server to request services from a system-level REST server",
)
variant(
"pmi_backwards_compatibility",
default=True,
when="@1.2.5:3",
description="Enable PMI backwards compatibility",
)
variant("python", default=False, when="@4.1.2:", description="Enable python bindings")
variant("docs", default=False, description="Build manpages")
depends_on("m4", type="build", when="@master")
depends_on("autoconf", type="build", when="@master")
depends_on("automake", type="build", when="@master")
depends_on("libtool", type="build", when="@master")
depends_on("perl", type="build", when="@master")
depends_on("pandoc", type="build", when="+docs")
depends_on("c", type="build")
depends_on("pkgconfig", type="build")
depends_on("m4", type="build", when="@master")
depends_on("autoconf@2.69:", type="build", when="@master")
depends_on("automake@1.13.4:", type="build", when="@master")
depends_on("libtool@2.4.2:", type="build", when="@master")
depends_on("flex@2.5.39:", type="build", when="@master")
depends_on("perl", type="build", when="@master")
depends_on("python@3.7:", type="build", when="+docs")
depends_on("py-sphinx@5:", type="build", when="+docs")
depends_on("py-recommonmark", type="build", when="+docs")
depends_on("py-docutils", type="build", when="+docs")
depends_on("py-sphinx-rtd-theme", type="build", when="+docs")
depends_on("libevent@2.0.20:")
depends_on("hwloc@1.0:1", when="@:2")
depends_on("hwloc@1.11:1,2:", when="@3:")
depends_on("hwloc@1.11:", when="@3:")
depends_on("hwloc@1", when="@:2")
depends_on("zlib-api", when="@2:")
depends_on("curl", when="+restful")
depends_on("jansson@2.11:", when="+restful")
depends_on("python", when="+python")
depends_on("py-cython", when="+python")
depends_on("py-setuptools", when="+python")
depends_on("munge", when="+munge")
def autoreconf(self, spec, prefix):
"""Only needed when building from git checkout"""
@@ -213,7 +219,13 @@ def find_external_lib_path(self, pkg_name, path_match_str=""):
def configure_args(self):
spec = self.spec
config_args = ["--enable-shared", "--enable-static", "--disable-sphinx", "--without-munge"]
config_args = ["--enable-shared", "--enable-static"]
if spec.satisfies("~docs") or spec.satisfies("@4.2.3:5"):
config_args.append("--disable-sphinx")
if spec.satisfies("@2:"):
config_args.append("--with-zlib=" + spec["zlib-api"].prefix)
config_args.append("--with-libevent=" + spec["libevent"].prefix)
config_args.append("--with-hwloc=" + spec["hwloc"].prefix)
@@ -233,15 +245,21 @@ def configure_args(self):
config_args.extend(self.enable_or_disable("python-bindings", variant="python"))
if spec.satisfies("+munge"):
config_args.append("--with-munge=" + spec["munge"].prefix)
else:
config_args.append("--without-munge")
if spec.satisfies("+restful"):
config_args.append("--with-curl=" + spec["curl"].prefix)
config_args.append("--with-jansson=" + spec["jansson"].prefix)
config_args.extend(
self.enable_or_disable(
"pmi-backward-compatibility", variant="pmi_backwards_compatibility"
)
)
if "~docs" in self.spec:
config_args.append("--disable-man-pages")
# Versions < 2.1.1 have a bug in the test code that *sometimes*
# causes problems on strict alignment architectures such as
# aarch64. Work-around is to just not build the test code.

View File

@@ -0,0 +1,28 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Polyml(AutotoolsPackage):
"""The Poly/ML implementation of Standard ML."""
homepage = "https://polyml.org/"
url = "https://github.com/polyml/polyml/archive/refs/tags/v5.9.1.tar.gz"
license("LGPL-2.1-only", checked_by="draenog")
version("5.9.1", sha256="52f56a57a4f308f79446d479e744312195b298aa65181893bce2dfc023a3663c")
variant(
"gmp", default=True, description="Use the GMP library for arbitrary precision arithmetic"
)
depends_on("gmp", when="+gmp")
filter_compiler_wrappers("polyc", relative_root="bin")
def configure_args(self):
config_args = self.with_or_without("gmp")
return config_args

View File

@@ -32,5 +32,8 @@ class PyGreenlet(PythonPackage):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("python", type=("build", "link", "run"))
with default_args(type=("build", "link", "run")):
depends_on("python")
depends_on("python@:3.11", when="@:2")
depends_on("py-setuptools", type="build")

View File

@@ -16,6 +16,7 @@ class PyHuggingfaceHub(PythonPackage):
license("Apache-2.0")
version("0.24.6", sha256="cc2579e761d070713eaa9c323e3debe39d5b464ae3a7261c39a9195b27bb8000")
version("0.23.4", sha256="35d99016433900e44ae7efe1c209164a5a81dbbcd53a52f99c281dcd7ce22431")
version("0.19.4", sha256="176a4fc355a851c17550e7619488f383189727eab209534d7cef2114dae77b22")
version("0.14.1", sha256="9ab899af8e10922eac65e290d60ab956882ab0bf643e3d990b1394b6b47b7fbc")
@@ -34,12 +35,12 @@ class PyHuggingfaceHub(PythonPackage):
depends_on("py-filelock", type=("build", "run"))
depends_on("py-fsspec@2023.5:", when="@0.18:", type=("build", "run"))
depends_on("py-fsspec", when="@0.14:", type=("build", "run"))
depends_on("py-packaging@20.9:", when="@0.10:", type=("build", "run"))
depends_on("py-pyyaml@5.1:", when="@0.10:", type=("build", "run"))
depends_on("py-requests", type=("build", "run"))
depends_on("py-tqdm@4.42.1:", when="@0.12:", type=("build", "run"))
depends_on("py-tqdm", type=("build", "run"))
depends_on("py-pyyaml@5.1:", when="@0.10:", type=("build", "run"))
depends_on("py-typing-extensions@3.7.4.3:", when="@0.10:", type=("build", "run"))
depends_on("py-typing-extensions", when="@0.0.10:", type=("build", "run"))
depends_on("py-packaging@20.9:", when="@0.10:", type=("build", "run"))
depends_on("py-inquirerpy@0.3.4", when="@0.14:+cli", type=("build", "run"))

View File

@@ -17,6 +17,7 @@ class PyMypy(PythonPackage):
license("MIT AND PSF-2.0", checked_by="tgamblin")
version("1.11.2", sha256="7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79")
version("1.11.1", sha256="f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08")
version("1.10.1", sha256="1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0")
version("1.9.0", sha256="3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974")

View File

@@ -22,7 +22,8 @@ class PyNumcodecs(PythonPackage):
license("MIT")
version("master", branch="master", submodules=True)
version("main", branch="main", submodules=True)
version("master", branch="main", submodules=True, deprecated=True)
version("0.11.0", sha256="6c058b321de84a1729299b0eae4d652b2e48ea1ca7f9df0da65cb13470e635eb")
version("0.7.3", sha256="022b12ad83eb623ec53f154859d49f6ec43b15c36052fa864eaf2d9ee786dd85")
version("0.6.4", sha256="ef4843d5db4d074e607e9b85156835c10d006afc10e175bda62ff5412fca6e4d")

View File

@@ -23,6 +23,7 @@ class PyNumpy(PythonPackage):
version("main", branch="main")
version("2.1.0", sha256="7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2")
version("2.0.2", sha256="883c987dee1880e2a864ab0dc9892292582510604156762362d9326444636e78")
version("2.0.1", sha256="485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3")
version("2.0.0", sha256="cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864")
version("1.26.4", sha256="2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010")

View File

@@ -13,7 +13,9 @@ class PySegmentationModelsPytorch(PythonPackage):
pypi = "segmentation_models_pytorch/segmentation_models_pytorch-0.2.0.tar.gz"
license("MIT")
maintainers("adamjstewart")
version("0.3.4", sha256="f4aee7f6add479bd3c3953e855b7055fc657dc6800bf7fc8ab733fd7f8acb163")
version("0.3.3", sha256="b3b21ab4cd26a6b2b9e7a6ed466ace6452eb26ed3c31ae491ea2d7cbb01e384b")
version("0.3.2", sha256="8372733e57a10cb8f6b9e18a20577fbb3fb83549b6945664dc774a9b6d3ecd13")
version("0.3.1", sha256="d4a4817cf48872c3461bb7d22864c00f9d491719a6460adb252c035f9b0e8d51")
@@ -26,8 +28,11 @@ class PySegmentationModelsPytorch(PythonPackage):
depends_on("py-pretrainedmodels@0.7.4", type=("build", "run"))
depends_on("py-efficientnet-pytorch@0.7.1", when="@0.3:", type=("build", "run"))
depends_on("py-efficientnet-pytorch@0.6.3", when="@:0.2", type=("build", "run"))
depends_on("py-timm@0.9.7", when="@0.3.4", type=("build", "run"))
depends_on("py-timm@0.9.2", when="@0.3.3", type=("build", "run"))
depends_on("py-timm@0.6.12", when="@0.3.2", type=("build", "run"))
depends_on("py-timm@0.4.12", when="@:0.3.1", type=("build", "run"))
depends_on("py-huggingface-hub@0.24.6:", when="@0.3.4:", type=("build", "run"))
depends_on("py-tqdm", when="@0.3:", type=("build", "run"))
depends_on("pil", when="@0.3:", type=("build", "run"))
depends_on("py-six", when="@0.3.4:", type=("build", "run"))

View File

@@ -16,6 +16,7 @@ class PyTimm(PythonPackage):
license("Apache-2.0")
version("0.9.7", sha256="2bfb1029e90b72e65eb9c75556169815f2e82257eaa1f6ebd623a4b4a52867a2")
version("0.9.5", sha256="669835f0030cfb2412c464b7b563bb240d4d41a141226afbbf1b457e4f18cff1")
version("0.9.2", sha256="d0977cc5e02c69bda979fca8b52aa315a5f2cb64ebf8ad2c4631b1e452762c14")
version("0.9.1", sha256="171420ac499e7999d38fb8b08fffa5ca3950b38db23bba84763cd92621ca80a2")

View File

@@ -93,6 +93,9 @@ def setup_dependent_run_environment(self, env, dependent_spec):
path = os.path.join(dependent_spec.prefix, directory)
if os.path.isdir(path):
env.prepend_path("PYTHONPATH", path)
dep_bin_dir = getattr(dependent_spec.package, "bindir", None)
if dep_bin_dir and os.path.isdir(dep_bin_dir):
env.prepend_path("PATH", dep_bin_dir)
def setup_dependent_package(self, module, dependent_spec):
"""Called before python modules' install() methods."""

View File

@@ -59,16 +59,13 @@ class Python(Package):
license("0BSD")
version("3.12.5", sha256="38dc4e2c261d49c661196066edbfb70fdb16be4a79cc8220c224dfeb5636d405")
version("3.12.4", sha256="01b3c1c082196f3b33168d344a9c85fb07bfe0e7ecfe77fee4443420d1ce2ad9")
version("3.12.3", sha256="a6b9459f45a6ebbbc1af44f5762623fa355a0c87208ed417628b379d762dddb0")
version("3.12.2", sha256="a7c4f6a9dc423d8c328003254ab0c9338b83037bd787d680826a5bf84308116e")
version("3.12.1", sha256="d01ec6a33bc10009b09c17da95cc2759af5a580a7316b3a446eb4190e13f97b2")
version("3.12.0", sha256="51412956d24a1ef7c97f1cb5f70e185c13e3de1f50d131c0aac6338080687afb")
version(
"3.11.9",
sha256="e7de3240a8bc2b1e1ba5c81bf943f06861ff494b69fda990ce2722a504c6153d",
preferred=True,
)
version("3.11.9", sha256="e7de3240a8bc2b1e1ba5c81bf943f06861ff494b69fda990ce2722a504c6153d")
version("3.11.8", sha256="d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889")
version("3.11.7", sha256="068c05f82262e57641bd93458dfa883128858f5f4997aad7a36fd25b13b29209")
version("3.11.6", sha256="c049bf317e877cbf9fce8c3af902436774ecef5249a29d10984ca3a37f7f4736")

View File

@@ -24,5 +24,5 @@ class RDiagram(RPackage):
version("1.6.5", sha256="e9c03e7712e0282c5d9f2b760bafe2aac9e99a9723578d9e6369d60301f574e4")
depends_on("r@2.01:", type=("build", "run"))
depends_on("r@2.1:", type=("build", "run"))
depends_on("r-shape", type=("build", "run"))

Some files were not shown because too many files have changed in this diff Show More