Compare commits

...

19 Commits

Author SHA1 Message Date
dunatotatos
a5f404cff5 Update py-numcodecs. (#45715) 2024-08-31 15:15:18 -06:00
Martin Pokorny
8100b0d575 casacore: add new versions 3.6.1, 3.6.0, 3.2.1 (#46068) 2024-08-31 15:14:52 -06:00
Juan Miguel Carceller
b38ab54028 whizard: add a patch when using hepmc3 3.3.0 or newer (#45862)
* whizard: add a patch when using hepmc3 3.3.0 or newer

* whizard: comment with patch origin

---------

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-08-31 13:13:42 -06:00
Stephen Nicholas Swatman
412f22b76a podio: apply patch for gcc 14 builds (#45854)
* podio: apply patch for gcc 14 builds

Podio versions after 0.17.0 but before 1.0.0 are broken when using gcc
14 because of a missing include, which is addressed in the podio pull
request at https://github.com/AIDASoft/podio/pull/600. This commit
patches pre-1.0.0 versions of Podio so they can be compiled with gcc 14,
which is important for building Acts.

* Style

* Style 2

* Fixes

* Add comment:

* Add sha256
2024-08-31 13:42:02 -05:00
Jen Herting
d226ef31bd New package: py-jsonlines (#46124)
* py-jsonlines: new package

* py-jsonlines: fix dependency

---------

Co-authored-by: Alex C Leute <acl2809@rit.edu>
2024-08-31 12:30:07 -05:00
Jen Herting
ae32af927d New package: py-ops (#46122)
* New package: py-ops

* [py-ops]

- added version 2.16.0
- ran black
- updated copyright
- added license()

---------

Co-authored-by: vehrc <vehrc@rit.edu>
2024-08-31 12:11:27 -05:00
Alex Richert
400dd40492 sigio: add v2.3.3 (#46116) 2024-08-31 12:01:08 -05:00
dependabot[bot]
04bdff33ad build(deps): bump actions/setup-python from 5.1.1 to 5.2.0 (#46129)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](39cd14951b...f677139bbe)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-31 11:51:49 -05:00
Pranav Sivaraman
017e3dd417 doctest: add new package (#46138) 2024-08-31 11:48:20 -05:00
Alex Richert
f7e3902ca8 landsfcutil: add v2.4.2 (#46144) 2024-08-31 09:13:10 -05:00
Alex Richert
89da8d4c84 gfsio: add v1.4.2 (#46145) 2024-08-31 09:12:23 -05:00
Alex Richert
8cac74699b sfcio: add v1.4.2 (#46146)
* sfcio: add v1.4.2

* [@spackbot] updating style on behalf of AlexanderRichert-NOAA
2024-08-31 09:11:13 -05:00
dependabot[bot]
db311eef46 build(deps): bump actions/upload-artifact from 4.3.6 to 4.4.0 (#46149)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.6 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](834a144ee9...50769540e7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-31 08:38:16 -05:00
etiennemlb
1427735876 unzip: use more generic strip flag for cce (#46087)
* Use more generic strip flag for cce

* [@spackbot] updating style on behalf of etiennemlb

* Apply always
2024-08-30 12:57:24 -05:00
Kacper Kornet
f88ca8cc1f plumed: add v2.9.1 (#46022) 2024-08-30 15:29:49 +02:00
Massimiliano Culpo
bf1f4e15ee boost: remove Compiler.cxx_names (#46037) 2024-08-30 13:25:40 +02:00
Harmen Stoppels
dd756d53de windows-vis: fix failing pipeline (#46135)
* seacas: fix gnu parallel dep

* add vtk@9.0 platform=windows conflict
2024-08-30 12:57:16 +02:00
Massimiliano Culpo
1c1970e727 Put some more constraint on a few mpi providers (#46132)
This should help not selecting, by default, some niche implementation that are supposed to be externals.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-08-30 11:16:35 +02:00
Massimiliano Culpo
c283fce487 Remove DetectedPackage class (#46071)
This PR simplifies the code doing external spec detection by removing 
the `DetectedPackage` class. Now, functions accepting or returning lists 
of `DetectedPackage`, will accept or return list of specs.

Performance doesn't seem to change if we use `Spec.__reduce__` instead 
of `DetectionPackage.__reduce__`.
2024-08-30 08:11:17 +00:00
41 changed files with 282 additions and 142 deletions

View File

@@ -29,7 +29,7 @@ jobs:
shell: ${{ matrix.system.shell }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: ${{inputs.python_version}}
- name: Install Python packages

View File

@@ -63,7 +63,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: "3.12"
- name: Bootstrap clingo
@@ -128,7 +128,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: |
3.8

View File

@@ -87,7 +87,7 @@ jobs:
fi
- name: Upload Dockerfile
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: dockerfiles_${{ matrix.dockerfile[0] }}
path: dockerfiles
@@ -126,7 +126,7 @@ jobs:
needs: deploy-images
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact/merge@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: dockerfiles
pattern: dockerfiles_*

View File

@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: 3.9
- name: Install Python packages

View File

@@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -91,7 +91,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.11'
- name: Install System packages
@@ -151,7 +151,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.11'
- name: Install System packages
@@ -188,7 +188,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -225,7 +225,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: 3.9
- name: Install Python packages

View File

@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.11'
cache: 'pip'
@@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.11'
cache: 'pip'

View File

@@ -72,3 +72,13 @@ packages:
permissions:
read: world
write: user
cray-mpich:
buildable: false
cray-mvapich2:
buildable: false
fujitsu-mpi:
buildable: false
hpcx-mpi:
buildable: false
spectrum-mpi:
buildable: false

View File

@@ -315,9 +315,9 @@ def get_external_python_for_prefix(self):
)
python_externals_detected = [
d.spec
for d in python_externals_detection.get("python", [])
if d.prefix == self.spec.external_path
spec
for spec in python_externals_detection.get("python", [])
if spec.external_path == self.spec.external_path
]
if python_externals_detected:
return python_externals_detected[0]

View File

@@ -273,24 +273,24 @@ def find_compilers(
valid_compilers = {}
for name, detected in detected_packages.items():
compilers = [x for x in detected if CompilerConfigFactory.from_external_spec(x.spec)]
compilers = [x for x in detected if CompilerConfigFactory.from_external_spec(x)]
if not compilers:
continue
valid_compilers[name] = compilers
def _has_fortran_compilers(x):
if "compilers" not in x.spec.extra_attributes:
if "compilers" not in x.extra_attributes:
return False
return "fortran" in x.spec.extra_attributes["compilers"]
return "fortran" in x.extra_attributes["compilers"]
if mixed_toolchain:
gccs = [x for x in valid_compilers.get("gcc", []) if _has_fortran_compilers(x)]
if gccs:
best_gcc = sorted(
gccs, key=lambda x: spack.spec.parse_with_version_concrete(x.spec).version
gccs, key=lambda x: spack.spec.parse_with_version_concrete(x).version
)[-1]
gfortran = best_gcc.spec.extra_attributes["compilers"]["fortran"]
gfortran = best_gcc.extra_attributes["compilers"]["fortran"]
for name in ("llvm", "apple-clang"):
if name not in valid_compilers:
continue
@@ -298,11 +298,11 @@ def _has_fortran_compilers(x):
for candidate in candidates:
if _has_fortran_compilers(candidate):
continue
candidate.spec.extra_attributes["compilers"]["fortran"] = gfortran
candidate.extra_attributes["compilers"]["fortran"] = gfortran
new_compilers = []
for name, detected in valid_compilers.items():
for config in CompilerConfigFactory.from_specs([x.spec for x in detected]):
for config in CompilerConfigFactory.from_specs(detected):
c = _compiler_from_config_entry(config["compiler"])
if c in known_compilers:
continue

View File

@@ -2,17 +2,11 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from .common import (
DetectedPackage,
executable_prefix,
set_virtuals_nonbuildable,
update_configuration,
)
from .common import executable_prefix, set_virtuals_nonbuildable, update_configuration
from .path import by_path, executables_in_path
from .test import detection_tests
__all__ = [
"DetectedPackage",
"by_path",
"executables_in_path",
"executable_prefix",

View File

@@ -6,9 +6,9 @@
function to update packages.yaml given a list of detected packages.
Ideally, each detection method should be placed in a specific subpackage
and implement at least a function that returns a list of DetectedPackage
objects. The update in packages.yaml can then be done using the function
provided here.
and implement at least a function that returns a list of specs.
The update in packages.yaml can then be done using the function provided here.
The module also contains other functions that might be useful across different
detection mechanisms.
@@ -17,9 +17,10 @@
import itertools
import os
import os.path
import pathlib
import re
import sys
from typing import Dict, List, NamedTuple, Optional, Set, Tuple, Union
from typing import Dict, List, Optional, Set, Tuple, Union
import llnl.util.tty
@@ -30,27 +31,6 @@
import spack.util.windows_registry
class DetectedPackage(NamedTuple):
"""Information on a package that has been detected."""
#: Spec that was detected
spec: spack.spec.Spec
#: Prefix of the spec
prefix: str
def __reduce__(self):
return DetectedPackage.restore, (str(self.spec), self.prefix, self.spec.extra_attributes)
@staticmethod
def restore(
spec_str: str, prefix: str, extra_attributes: Optional[Dict[str, str]]
) -> "DetectedPackage":
spec = spack.spec.Spec.from_detection(
spec_str=spec_str, external_path=prefix, extra_attributes=extra_attributes
)
return DetectedPackage(spec=spec, prefix=prefix)
def _externals_in_packages_yaml() -> Set[spack.spec.Spec]:
"""Returns all the specs mentioned as externals in packages.yaml"""
packages_yaml = spack.config.get("packages")
@@ -65,7 +45,7 @@ def _externals_in_packages_yaml() -> Set[spack.spec.Spec]:
def _pkg_config_dict(
external_pkg_entries: List[DetectedPackage],
external_pkg_entries: List["spack.spec.Spec"],
) -> Dict[str, Union[bool, List[Dict[str, ExternalEntryType]]]]:
"""Generate a package specific config dict according to the packages.yaml schema.
@@ -85,22 +65,19 @@ def _pkg_config_dict(
pkg_dict = spack.util.spack_yaml.syaml_dict()
pkg_dict["externals"] = []
for e in external_pkg_entries:
if not _spec_is_valid(e.spec):
if not _spec_is_valid(e):
continue
external_items: List[Tuple[str, ExternalEntryType]] = [
("spec", str(e.spec)),
("prefix", e.prefix),
("spec", str(e)),
("prefix", pathlib.Path(e.external_path).as_posix()),
]
if e.spec.external_modules:
external_items.append(("modules", e.spec.external_modules))
if e.external_modules:
external_items.append(("modules", e.external_modules))
if e.spec.extra_attributes:
if e.extra_attributes:
external_items.append(
(
"extra_attributes",
spack.util.spack_yaml.syaml_dict(e.spec.extra_attributes.items()),
)
("extra_attributes", spack.util.spack_yaml.syaml_dict(e.extra_attributes.items()))
)
# external_items.extend(e.spec.extra_attributes.items())
@@ -221,33 +198,32 @@ def library_prefix(library_dir: str) -> str:
def update_configuration(
detected_packages: Dict[str, List[DetectedPackage]],
detected_packages: Dict[str, List["spack.spec.Spec"]],
scope: Optional[str] = None,
buildable: bool = True,
) -> List[spack.spec.Spec]:
"""Add the packages passed as arguments to packages.yaml
Args:
detected_packages: list of DetectedPackage objects to be added
detected_packages: list of specs to be added
scope: configuration scope where to add the detected packages
buildable: whether the detected packages are buildable or not
"""
predefined_external_specs = _externals_in_packages_yaml()
pkg_to_cfg, all_new_specs = {}, []
for package_name, entries in detected_packages.items():
new_entries = [e for e in entries if (e.spec not in predefined_external_specs)]
new_entries = [s for s in entries if s not in predefined_external_specs]
pkg_config = _pkg_config_dict(new_entries)
external_entries = pkg_config.get("externals", [])
assert not isinstance(external_entries, bool), "unexpected value for external entry"
all_new_specs.extend([x.spec for x in new_entries])
all_new_specs.extend(new_entries)
if buildable is False:
pkg_config["buildable"] = False
pkg_to_cfg[package_name] = pkg_config
pkgs_cfg = spack.config.get("packages", scope=scope)
pkgs_cfg = spack.config.merge_yaml(pkgs_cfg, pkg_to_cfg)
spack.config.set("packages", pkgs_cfg, scope=scope)

View File

@@ -24,7 +24,6 @@
import spack.util.ld_so_conf
from .common import (
DetectedPackage,
WindowsCompilerExternalPaths,
WindowsKitExternalPaths,
_convert_to_iterable,
@@ -229,7 +228,7 @@ def prefix_from_path(self, *, path: str) -> str:
def detect_specs(
self, *, pkg: Type["spack.package_base.PackageBase"], paths: List[str]
) -> List[DetectedPackage]:
) -> List["spack.spec.Spec"]:
"""Given a list of files matching the search patterns, returns a list of detected specs.
Args:
@@ -295,16 +294,16 @@ def detect_specs(
warnings.warn(msg)
continue
if spec.external_path:
prefix = spec.external_path
if not spec.external_path:
spec.external_path = prefix
result.append(DetectedPackage(spec=spec, prefix=prefix))
result.append(spec)
return result
def find(
self, *, pkg_name: str, repository, initial_guess: Optional[List[str]] = None
) -> List[DetectedPackage]:
) -> List["spack.spec.Spec"]:
"""For a given package, returns a list of detected specs.
Args:
@@ -388,7 +387,7 @@ def by_path(
*,
path_hints: Optional[List[str]] = None,
max_workers: Optional[int] = None,
) -> Dict[str, List[DetectedPackage]]:
) -> Dict[str, List["spack.spec.Spec"]]:
"""Return the list of packages that have been detected on the system, keyed by
unqualified package name.

View File

@@ -68,7 +68,7 @@ def execute(self) -> List[spack.spec.Spec]:
with self._mock_layout() as path_hints:
entries = by_path([self.test.pkg_name], path_hints=path_hints)
_, unqualified_name = spack.repo.partition_package_name(self.test.pkg_name)
specs = set(x.spec for x in entries[unqualified_name])
specs = set(entries[unqualified_name])
return list(specs)
@contextlib.contextmanager

View File

@@ -44,7 +44,7 @@ def test_find_external_single_package(mock_executable):
assert len(specs_by_package) == 1 and "cmake" in specs_by_package
detected_spec = specs_by_package["cmake"]
assert len(detected_spec) == 1 and detected_spec[0].spec == Spec("cmake@1.foo")
assert len(detected_spec) == 1 and detected_spec[0] == Spec("cmake@1.foo")
def test_find_external_two_instances_same_package(mock_executable):
@@ -61,10 +61,10 @@ def test_find_external_two_instances_same_package(mock_executable):
)
assert len(detected_specs) == 2
spec_to_path = {e.spec: e.prefix for e in detected_specs}
spec_to_path = {s: s.external_path for s in detected_specs}
assert spec_to_path[Spec("cmake@1.foo")] == (
spack.detection.executable_prefix(str(cmake1.parent))
)
), spec_to_path
assert spec_to_path[Spec("cmake@3.17.2")] == (
spack.detection.executable_prefix(str(cmake2.parent))
)
@@ -72,12 +72,8 @@ 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", external_path="/x/y1/"), "/x/y1/"
),
spack.detection.DetectedPackage(
Spec.from_detection("cmake@3.17.2", external_path="/x/y2/"), "/x/y2/"
),
Spec.from_detection("cmake@1.foo", external_path="/x/y1"),
Spec.from_detection("cmake@3.17.2", external_path="/x/y2"),
]
pkg_to_entries = {"cmake": entries}
@@ -88,8 +84,8 @@ def test_find_external_update_config(mutable_config):
cmake_cfg = pkgs_cfg["cmake"]
cmake_externals = cmake_cfg["externals"]
assert {"spec": "cmake@1.foo", "prefix": "/x/y1/"} in cmake_externals
assert {"spec": "cmake@3.17.2", "prefix": "/x/y2/"} in cmake_externals
assert {"spec": "cmake@1.foo", "prefix": "/x/y1"} in cmake_externals
assert {"spec": "cmake@3.17.2", "prefix": "/x/y2"} in cmake_externals
def test_get_executables(working_env, mock_executable):
@@ -229,19 +225,15 @@ 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/"}],
"externals": [{"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix"}],
"buildable": False,
}
}
mutable_config.update_config("packages", pkgs_cfg_init)
entries = [
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/"
),
Spec.from_detection("find-externals1@1.1", external_path="/x/y1"),
Spec.from_detection("find-externals1@1.2", external_path="/x/y2"),
]
pkg_to_entries = {"find-externals1": entries}
scope = spack.config.default_modify_scope("packages")
@@ -251,8 +243,8 @@ def test_find_external_merge(mutable_config, mutable_mock_repo, tmp_path):
pkg_cfg = pkgs_cfg["find-externals1"]
pkg_externals = pkg_cfg["externals"]
assert {"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix/"} in pkg_externals
assert {"spec": "find-externals1@1.2", "prefix": "/x/y2/"} in pkg_externals
assert {"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix"} in pkg_externals
assert {"spec": "find-externals1@1.2", "prefix": "/x/y2"} in pkg_externals
def test_list_detectable_packages(mutable_config, mutable_mock_repo):
@@ -278,7 +270,7 @@ def _determine_variants(cls, exes, version_str):
assert len(detected_specs) == 1
gcc = detected_specs[0].spec
gcc = detected_specs[0]
assert gcc.name == "gcc"
assert gcc.external_path == os.path.sep + os.path.join("opt", "gcc", "bin")

View File

@@ -2109,11 +2109,13 @@ def test_external_python_extension_find_dependency_from_detection(self, monkeypa
"""Test that python extensions have access to a python dependency
when python isn't otherwise in the DAG"""
python_spec = Spec("python@=detected")
prefix = os.path.sep + "fake"
python_spec = Spec.from_detection("python@=detected", external_path=prefix)
def find_fake_python(classes, path_hints):
return {"python": [spack.detection.DetectedPackage(python_spec, prefix=path_hints[0])]}
return {
"python": [Spec.from_detection("python@=detected", external_path=path_hints[0])]
}
monkeypatch.setattr(spack.detection, "by_path", find_fake_python)
external_conf = {
@@ -2128,7 +2130,8 @@ def find_fake_python(classes, path_hints):
assert "python" in spec["py-extension1"]
assert spec["python"].prefix == prefix
assert spec["python"] == python_spec
assert spec["python"].external
assert spec["python"].satisfies(python_spec)
def test_external_python_extension_find_unified_python(self):
"""Test that python extensions use the same python as other specs in unified env"""

View File

@@ -11,11 +11,7 @@
def test_detection_update_config(mutable_config):
# mock detected package
detected_packages = collections.defaultdict(list)
detected_packages["cmake"] = [
spack.detection.common.DetectedPackage(
spec=spack.spec.Spec("cmake@3.27.5"), prefix="/usr/bin"
)
]
detected_packages["cmake"] = [spack.spec.Spec("cmake@3.27.5", external_path="/usr/bin")]
# update config for new package
spack.detection.common.update_configuration(detected_packages)

View File

@@ -462,24 +462,24 @@ def flag_handler(self, name, flags):
def determine_toolset(self, spec):
toolsets = {
"g++": "gcc",
"icpc": "intel",
"icpx": "intel",
"clang++": "clang",
"armclang++": "clang",
"xlc++": "xlcpp",
"xlc++_r": "xlcpp",
"pgc++": "pgi",
"nvc++": "pgi",
"FCC": "clang",
"%gcc": "gcc",
"%intel": "intel",
"%oneapi": "intel",
"%clang": "clang",
"%arm": "clang",
"%xl": "xlcpp",
"%xl_r": "xlcpp",
"%pgi": "pgi",
"%nvhpc": "pgi",
"%fj": "clang",
}
if spec.satisfies("@1.47:"):
toolsets["icpc"] += "-linux"
toolsets["icpx"] += "-linux"
toolsets["%intel"] += "-linux"
toolsets["%oneapi"] += "-linux"
for cc, toolset in toolsets.items():
if cc in self.compiler.cxx_names:
if self.spec.satisfies(cc):
return toolset
# fallback to gcc if no toolset found

View File

@@ -18,9 +18,12 @@ class Casacore(CMakePackage):
license("LGPL-2.0-only")
version("3.6.1", sha256="480d3340fa17e9ba67f18efbaff4bbb272a01d1f400d2295c0b6c86eb7abcf82")
version("3.6.0", sha256="c88075aa73c2139b323b71a7f5d56cec5a6a0de649efd11e2d00ca033be5a0d7")
version("3.5.0", sha256="63f1c8eff932b0fcbd38c598a5811e6e5397b72835b637d6f426105a183b3f91")
version("3.4.0", sha256="31f02ad2e26f29bab4a47a2a69e049d7bc511084a0b8263360e6157356f92ae1")
version("3.3.0", sha256="3a714644b908ef6e81489b792cc9b80f6d8267a275e15d38a42a6a5137d39d3d")
version("3.2.1", sha256="f87ce81d2b42ec5401cff8317baeeb9a3b408b716bb791ef252ad97af6e235ad")
version("3.2.0", sha256="ae5d3786cb6dfdd7ebc5eecc0c724ff02bbf6929720bc23be43a027978e79a5f")
version("3.1.2", sha256="ac94f4246412eb45d503f1019cabe2bb04e3861e1f3254b832d9b1164ea5f281")
version("3.1.1", sha256="85d2b17d856592fb206b17e0a344a29330650a4269c80b87f8abb3eaf3dadad4")
@@ -28,9 +31,9 @@ class Casacore(CMakePackage):
version("3.0.0", sha256="6f0e68fd77b5c96299f7583a03a53a90980ec347bff9dfb4c0abb0e2933e6bcb")
version("2.4.1", sha256="58eccc875053b2c6fe44fe53b6463030ef169597ec29926936f18d27b5087d63")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("cmake@3.7.1:", type="build")
@@ -63,15 +66,18 @@ class Casacore(CMakePackage):
depends_on("fftw@3.0.0: precision=float,double", when="~fftpack")
depends_on("sofa-c", type="test")
depends_on("hdf5", when="+hdf5")
depends_on("adios2+mpi", when="+adios2")
depends_on("adios2@2.6.0:", when="+adios2")
depends_on("adios2+mpi", when="+adios2+mpi")
depends_on("adios2~mpi", when="+adios2~mpi")
depends_on("mpi", when="+mpi")
depends_on("python@2.6:", when="+python")
depends_on("python@2.6:", when="@:3.5.0 +python")
depends_on("python@3:", when="@3.6.0: +python")
depends_on("boost +python", when="+python")
depends_on("boost +system +filesystem", when="+dysco")
depends_on("py-numpy", when="+python")
depends_on("py-numpy@:1", when="@:3.6.0 +python")
depends_on("py-numpy", when="@3.6.1: +python")
depends_on("gsl", when="+dysco")
conflicts("~mpi", when="+adios2")
conflicts("+tablelocking", when="+mpi")
conflicts("~threads", when="+openmp")
@@ -97,19 +103,27 @@ def cmake_args(self):
# FFTPack can be selected.
if spec.satisfies("@3.4.0:"):
if spec.satisfies("+fftpack"):
args.append("-DBUILD_FFTPACK_DEPRECATED=YES")
args.append(self.define("BUILD_FFTPACK_DEPRECATED", True))
else:
args.append(self.define("USE_FFTW3", spec.satisfies("~fftpack")))
# Python2 and Python3 binding
if spec.satisfies("~python"):
args.extend(["-DBUILD_PYTHON=NO", "-DBUILD_PYTHON3=NO"])
args.extend([self.define("BUILD_PYTHON", False), self.define("BUILD_PYTHON3", False)])
elif spec.satisfies("^python@3.0.0:"):
args.extend(["-DBUILD_PYTHON=NO", "-DBUILD_PYTHON3=YES"])
args.extend([self.define("BUILD_PYTHON", False), self.define("BUILD_PYTHON3", True)])
else:
args.extend(["-DBUILD_PYTHON=YES", "-DBUILD_PYTHON3=NO"])
args.extend([self.define("BUILD_PYTHON", True), self.define("BUILD_PYTHON3", False)])
if spec.satisfies("@3.6.0:"):
args.append(self.define("USE_PCH", True))
# tests won't pass unless measures data are installed, which
# we don't do in this package, and for which we don't yet
# provide any way of specifying at build time
#
# args.append(self.define('BUILD_TESTING', self.run_tests))
args.append(self.define("BUILD_TESTING", False))
args.append("-DBUILD_TESTING=OFF")
return args
def patch(self):

View File

@@ -32,6 +32,8 @@ class CrayMpich(Package):
depends_on("cray-pmi")
depends_on("libfabric")
requires("platform=linux", msg="Cray MPICH is only available on Cray")
# cray-mpich 8.1.7: features MPI compiler wrappers
variant("wrappers", default=True, when="@8.1.7:", description="enable MPI wrappers")

View File

@@ -26,6 +26,8 @@ class CrayMvapich2(Package):
provides("mpi@3")
requires("platform=linux", msg="Cray MVAPICH2 is only available on Cray")
def setup_run_environment(self, env):
if spack_cc is None:
return

View File

@@ -0,0 +1,25 @@
# 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 Doctest(CMakePackage):
"""The fastest feature-rich C++11/14/17/20/23 single-header testing framework"""
homepage = "https://github.com/doctest/doctest"
url = "https://github.com/doctest/doctest/archive/refs/tags/v2.4.11.tar.gz"
license("MIT", checked_by="pranav-sivaraman")
version("2.4.11", sha256="632ed2c05a7f53fa961381497bf8069093f0d6628c5f26286161fbd32a560186")
depends_on("cxx", type="build")
depends_on("cmake@3:", type="build")
def cmake_args(self):
args = [self.define("DOCTEST_WITH_TESTS", self.run_tests)]
return args

View File

@@ -22,6 +22,8 @@ class FujitsuMpi(Package):
msg="currently only supports Fujitsu, Clang, or GCC compilers",
)
requires("platform=linux")
def install(self, spec, prefix):
raise InstallError("Fujitsu MPI is not installable; it is vendor supplied")

View File

@@ -19,12 +19,15 @@ class Gfsio(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
version("1.4.2", sha256="1e92ba60c603a8d3019b2aa8134fb3a69e078b2d9398990638576d6c5aea4beb")
version("1.4.1", sha256="eab106302f520600decc4f9665d7c6a55e7b4901fab6d9ef40f29702b89b69b1")
depends_on("fortran", type="build")
depends_on("pfunit", type="test")
conflicts("%oneapi", when="@:1.4.1", msg="Requires @1.4.2: for Intel oneAPI")
def cmake_args(self):
args = [self.define("ENABLE_TESTS", self.run_tests)]
return args

View File

@@ -253,15 +253,15 @@ class Gromacs(CMakePackage, CudaPackage):
# see https://github.com/spack/spack/releases/tag/v0.20.0
plumed_patches = {
"=2023": "2.9.0",
"2022.5": "2.8.2:2.9.0",
"=2023": "2.9.1",
"2022.5": "2.8.2:2.9.1",
"2022.3": "2.8.1",
"2021.7": "2.8.2:2.9.0",
"2021.7": "2.8.2:2.9.1",
"2021.6": "2.8.1",
"2021.5": "2.7.5:2.7.6",
"2021.4": "2.7.3:2.8.0",
"=2021": "2.7.1:2.7.2",
"2020.7": "2.8.1:2.9.0",
"2020.7": "2.8.1:2.9.1",
"2020.6": "2.7.2:2.8.0",
"2020.5": "2.7.1",
"2020.4": "2.6.2:2.7.0",

View File

@@ -19,8 +19,10 @@ class HpcxMpi(Package):
provides("mpi")
requires("platform=linux")
def install(self, spec, prefix):
raise InstallError("HPC-X MPI is not buildable, it is for external " "specs only.")
raise InstallError("HPC-X MPI is not buildable, it is for external specs only.")
def setup_dependent_package(self, module, dependent_spec):
# This works for AOCC (AMD), Intel and GNU.

View File

@@ -19,12 +19,15 @@ class Landsfcutil(CMakePackage):
maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
version("develop", branch="develop")
version("2.4.2", sha256="ac0ee4edaab3d273d9a6acffea8aa8a5b363366c3ade3e32539c057e84e4fa73")
version("2.4.1", sha256="831c5005a480eabe9a8542b4deec838c2650f6966863ea2711cc0cc5db51ca14")
depends_on("fortran", type="build")
depends_on("pfunit", type="test")
conflicts("%oneapi", when="@:2.4.1", msg="Requires @2.4.2: for Intel oneAPI")
def cmake_args(self):
args = [self.define("ENABLE_TESTS", self.run_tests)]
return args

View File

@@ -33,6 +33,8 @@ class Msmpi(Package):
patch("ifort_compat.patch")
requires("platform=windows")
@classmethod
def determine_version(cls, exe):
# MSMPI is typically MS only, don't detect on other platforms

View File

@@ -32,6 +32,7 @@ class Plumed(AutotoolsPackage):
version("master", branch="master")
version("2.9.1", sha256="e24563ad1eb657611918e0c978d9c5212340f128b4f1aa5efbd439a0b2e91b58")
version("2.9.0", sha256="612d2387416b5f82dd8545709921440370e144fd46cef633654cf0ee43bac5f8")
version("2.8.3", sha256="e98da486e252cdf290b0b5b2f3f021409ea0d2d775ab609a6ad68fc1ab143a3b")

View File

@@ -99,6 +99,13 @@ class Podio(CMakePackage):
conflicts("+rntuple", when="@:0.16", msg="rntuple support requires at least podio@0.17")
# See https://github.com/AIDASoft/podio/pull/600
patch(
"https://github.com/AIDASoft/podio/commit/0222a077aaff817b21a46a590af0f8329dd27d67.patch?full_index=1",
when="@0.17:0.99",
sha256="9e42e0995634f2afdd358cd19383e882dc9143cce1b6afb0d2c4a1ec9add6e15",
)
# See https://github.com/AIDASoft/podio/pull/599 that landed after 0.99
extends("python", when="@1.0:")

View File

@@ -0,0 +1,21 @@
# 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 PyJsonlines(PythonPackage):
"""Library with helpers for the jsonlines file format"""
homepage = "https://github.com/wbolster/jsonlines"
pypi = "jsonlines/jsonlines-4.0.0.tar.gz"
license("BSD-3-Clause", checked_by="alex391")
version("4.0.0", sha256="0c6d2c09117550c089995247f605ae4cf77dd1533041d366351f6f298822ea74")
depends_on("py-setuptools", type="build")
depends_on("py-attrs@19.2.0:", type=("build", "run"))

View File

@@ -24,6 +24,9 @@ class PyNumcodecs(PythonPackage):
version("main", branch="main", submodules=True)
version("master", branch="main", submodules=True, deprecated=True)
version("0.13.0", sha256="ba4fac7036ea5a078c7afe1d4dffeb9685080d42f19c9c16b12dad866703aa2e")
version("0.12.1", sha256="05d91a433733e7eef268d7e80ec226a0232da244289614a8f3826901aec1098e")
version("0.12.0", sha256="6388e5f4e94d18a7165fbd1c9d3637673b74157cff8bc644005f9e2a4c717d6e")
version("0.11.0", sha256="6c058b321de84a1729299b0eae4d652b2e48ea1ca7f9df0da65cb13470e635eb")
version("0.7.3", sha256="022b12ad83eb623ec53f154859d49f6ec43b15c36052fa864eaf2d9ee786dd85")
version("0.6.4", sha256="ef4843d5db4d074e607e9b85156835c10d006afc10e175bda62ff5412fca6e4d")
@@ -32,7 +35,8 @@ class PyNumcodecs(PythonPackage):
variant("msgpack", default=False, description="Codec to encode data as msgpacked bytes.")
depends_on("python@3.8:", when="@0.11:", type=("build", "link", "run"))
depends_on("python@3.10:", when="@0.13:", type=("build", "link", "run"))
depends_on("python@3.8:", when="@0.11:0.12", type=("build", "link", "run"))
depends_on("python@3.6:3", when="@0.7:0.10", type=("build", "link", "run"))
depends_on("py-setuptools@64:", when="@0.11:", type="build")
depends_on("py-setuptools@18.1:", type="build")

View File

@@ -0,0 +1,24 @@
# 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 PyOps(PythonPackage):
"""The Python library behind great charms"""
homepage = "https://github.com/canonical/operator"
pypi = "ops/ops-1.4.0.tar.gz"
license("Apache-2.0", checked_by="qwertos")
version("2.16.0", sha256="c4405185744c82589fca4752a76cd7eabd667cf2d3f07d2700b82777186b8de9")
version("1.4.0", sha256="6bb7c8d8cd3eb1da99469564e37a04f9677205c4c07ef97167e0b93a17ccb59a")
depends_on("python@3.8:", when="@2.16:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-pyyaml", type=("build", "run"))
depends_on("py-pyyaml@6", when="@2.16:", type=("build", "run"))
depends_on("py-websocket-client@1", when="@2.16:", type=("build", "run"))

View File

@@ -231,7 +231,9 @@ class Seacas(CMakePackage):
depends_on("cmake@3.17:", when="@:2023-05-30", type="build")
depends_on("mpi", when="+mpi")
depends_on("zlib-api", when="+zlib")
depends_on("parallel")
depends_on("parallel", when="platform=linux", type="run")
depends_on("parallel", when="platform=darwin", type="run")
depends_on("parallel", when="platform=freebsd", type="run")
depends_on("trilinos~exodus+mpi+pamgen", when="+mpi+pamgen")
depends_on("trilinos~exodus~mpi+pamgen", when="~mpi+pamgen")
# Always depends on netcdf-c
@@ -487,3 +489,9 @@ def cmake_args(self):
options.append(define("CMAKE_INSTALL_NAME_DIR", self.prefix.lib))
return options
@run_after("install")
def symlink_parallel(self):
if not self.spec.dependencies("parallel"):
return
symlink(self.spec["parallel"].prefix.bin.parallel, self.prefix.bin.parallel)

View File

@@ -19,12 +19,15 @@ class Sfcio(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
version("1.4.2", sha256="bfde52320b836886a766ff8d0d6707b8a533c903b947f8b49250c544aaccaaac")
version("1.4.1", sha256="d9f900cf18ec1a839b4128c069b1336317ffc682086283443354896746b89c59")
depends_on("fortran", type="build")
depends_on("pfunit", type="test")
conflicts("%oneapi", when="@:1.4.1", msg="Requires @1.4.2: for Intel oneAPI")
def cmake_args(self):
args = [self.define("ENABLE_TESTS", self.run_tests)]
return args

View File

@@ -19,10 +19,13 @@ class Sigio(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
version("2.3.3", sha256="2b4a04be3be10f222d0ff47f973f65a03b8b5521dcad8e8866f3bfe4e8dfafab")
version("2.3.2", sha256="333f3cf3a97f97103cbafcafc2ad89b24faa55b1332a98adc1637855e8a5b613")
depends_on("fortran", type="build")
conflicts("%oneapi", when="@:2.3.2", msg="Requires @2.3.3: for Intel OneAPI")
def cmake_args(self):
args = [self.define("ENABLE_TESTS", self.run_tests)]
return args

View File

@@ -20,7 +20,7 @@ class SpectrumMpi(BundlePackage):
provides("mpi")
conflicts("platform=windows")
requires("platform=linux")
executables = ["^ompi_info$"]

View File

@@ -22,6 +22,7 @@ class Unzip(MakefilePackage):
# clang and oneapi need this patch, likely others
# There is no problem with it on gcc, so make it a catch all
patch("configure-cflags.patch")
patch("strip.patch")
def get_make_args(self):
make_args = ["-f", join_path("unix", "Makefile")]
@@ -31,7 +32,7 @@ def get_make_args(self):
cflags.append("-Wno-error=implicit-int")
cflags.append("-DLARGE_FILE_SUPPORT")
make_args.append(f"LOC=\"{' '.join(cflags)}\"")
make_args.append(f"LOC={' '.join(cflags)}")
return make_args
@property

View File

@@ -0,0 +1,11 @@
--- spack-src/unix/configure 2024-08-23 14:21:34.822163922 +0200
+++ spack-src/unix/configure.patched 2024-08-23 14:27:24.862640828 +0200
@@ -17,7 +17,7 @@
IZ_BZIP2=${3}
CFLAGS="${CFLAGS} -I. -DUNIX"
LFLAGS1=""
-LFLAGS2="-s"
+LFLAGS2="-Wl,-s"
LN="ln -s"
CFLAGS_OPT=''

View File

@@ -142,6 +142,10 @@ class Vtk(CMakePackage):
# a patch with the same name is also applied to paraview
# the two patches are the same but for the path to the files they patch
patch("vtk_alias_hdf5.patch", when="@9:")
# VTK 9.0 on Windows uses dll instead of lib for hdf5-hl target, which fails linking. Can't
# be fixed by bumping CMake lower bound, because VTK vendors FindHDF5.cmake. Various other
# patches to FindHDF5.cmake are missing, so add conflict instead of a series of patches.
conflicts("@9.0 platform=windows")
depends_on("libxt", when="^[virtuals=gl] glx platform=linux")
# VTK will need Qt5OpenGL, and qt needs '-opengl' for that

View File

@@ -0,0 +1,25 @@
--- a/src/hepmc/HepMC3Wrap.cpp 2024-08-21 20:16:15.770305323 +0200
+++ b/src/hepmc/HepMC3Wrap.cpp 2024-08-21 20:16:28.463638884 +0200
@@ -161,7 +162,7 @@
}
extern "C" void gen_event_add_vertex( GenEvent* evt, GenVertex* v ) {
- evt->add_vertex( v );
+ evt->add_vertex( GenVertexPtr(v) );
}
extern "C" void gen_event_set_signal_process_vertex
@@ -237,11 +238,11 @@
}
extern "C" void gen_vertex_add_particle_in( GenVertex* v, GenParticle* p ) {
- v->add_particle_in( p );
+ v->add_particle_in( GenParticlePtr(p) );
}
extern "C" void gen_vertex_add_particle_out( GenVertex* v, GenParticle* p ) {
- v->add_particle_out( p );
+ v->add_particle_out( GenParticlePtr(p) );
}
extern "C" bool gen_vertex_is_valid( GenVertex* v ) {

View File

@@ -92,6 +92,9 @@ class Whizard(AutotoolsPackage):
# that happens, this needs to be adapted with a when clause
patch("parallel_build_fix.patch", when="@3:3.1.3")
patch("parallel_build_fix_2.8.patch", when="@2.8")
# Subset of https://gitlab.tp.nt.uni-siegen.de/whizard/public/-/commit/f6048e4
patch("hepmc3.3.0.patch", when="@3:3.1.4^hepmc3@3.3.0:")
# Make sure that the patch actually has an effect by running autoreconf
force_autoreconf = True
# Which then requires the following build dependencies