Compare commits
39 Commits
hs/py-blac
...
packages/a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bba4a37ed4 | ||
![]() |
68517389a0 | ||
![]() |
df5ad63331 | ||
![]() |
e79dc4422e | ||
![]() |
f0e5568a54 | ||
![]() |
1a1f0aa07b | ||
![]() |
c4ea924977 | ||
![]() |
57df23a51f | ||
![]() |
97d66b637f | ||
![]() |
92e1807672 | ||
![]() |
e4a8d45d86 | ||
![]() |
d6669845ed | ||
![]() |
60efada6a2 | ||
![]() |
a093a65a25 | ||
![]() |
1524aceb9a | ||
![]() |
9d0766be48 | ||
![]() |
7e89b3521a | ||
![]() |
2e372c53ab | ||
![]() |
8639779002 | ||
![]() |
a0e09139fc | ||
![]() |
b02ac87c55 | ||
![]() |
a9da160160 | ||
![]() |
f1678f4c7b | ||
![]() |
dae3b69f2c | ||
![]() |
cec7e6c4b5 | ||
![]() |
5931236f55 | ||
![]() |
e695185770 | ||
![]() |
5356469ba5 | ||
![]() |
605c3de633 | ||
![]() |
45c4446b90 | ||
![]() |
4ba6407cb8 | ||
![]() |
c221635c79 | ||
![]() |
46ff553ec2 | ||
![]() |
fcc85adc7f | ||
![]() |
da1ac0fdd4 | ||
![]() |
0accf26472 | ||
![]() |
545750873e | ||
![]() |
7d4523a9fc | ||
![]() |
754a64d1fe |
@@ -1,6 +1,6 @@
|
||||
black==25.1.0
|
||||
clingo==5.7.1
|
||||
flake8==7.1.1
|
||||
flake8==7.1.2
|
||||
isort==6.0.0
|
||||
mypy==1.11.2
|
||||
types-six==1.17.0.20241205
|
||||
|
@@ -7,7 +7,7 @@ docutils==0.21.2
|
||||
pygments==2.19.1
|
||||
urllib3==2.3.0
|
||||
pytest==8.3.4
|
||||
isort==5.13.2
|
||||
isort==6.0.0
|
||||
black==25.1.0
|
||||
flake8==7.1.1
|
||||
flake8==7.1.2
|
||||
mypy==1.11.1
|
||||
|
@@ -41,6 +41,16 @@ def __init__(self, dst, src_a=None, src_b=None):
|
||||
self.src_a = src_a
|
||||
self.src_b = src_b
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"MergeConflict(dst={self.dst!r}, src_a={self.src_a!r}, src_b={self.src_b!r})"
|
||||
|
||||
|
||||
def _samefile(a: str, b: str):
|
||||
try:
|
||||
return os.path.samefile(a, b)
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
|
||||
class SourceMergeVisitor(BaseDirectoryVisitor):
|
||||
"""
|
||||
@@ -168,16 +178,21 @@ def before_visit_dir(self, root: str, rel_path: str, depth: int) -> bool:
|
||||
# Don't recurse when dir is ignored.
|
||||
return False
|
||||
elif self._in_files(proj_rel_path):
|
||||
# Can't create a dir where a file is.
|
||||
_, src_a_root, src_a_relpath = self._file(proj_rel_path)
|
||||
# A file-dir conflict is fatal except if they're the same file (symlinked dir).
|
||||
src_a = os.path.join(*self._file(proj_rel_path))
|
||||
src_b = os.path.join(root, rel_path)
|
||||
|
||||
if not _samefile(src_a, src_b):
|
||||
self.fatal_conflicts.append(
|
||||
MergeConflict(
|
||||
dst=proj_rel_path,
|
||||
src_a=os.path.join(src_a_root, src_a_relpath),
|
||||
src_b=os.path.join(root, rel_path),
|
||||
)
|
||||
MergeConflict(dst=proj_rel_path, src_a=src_a, src_b=src_b)
|
||||
)
|
||||
return False
|
||||
|
||||
# Remove the link in favor of the dir.
|
||||
existing_proj_rel_path, _, _ = self._file(proj_rel_path)
|
||||
self._del_file(existing_proj_rel_path)
|
||||
self._add_directory(proj_rel_path, root, rel_path)
|
||||
return True
|
||||
elif self._in_directories(proj_rel_path):
|
||||
# No new directory, carry on.
|
||||
return True
|
||||
@@ -215,7 +230,7 @@ def before_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> bo
|
||||
if handle_as_dir:
|
||||
return self.before_visit_dir(root, rel_path, depth)
|
||||
|
||||
self.visit_file(root, rel_path, depth)
|
||||
self.visit_file(root, rel_path, depth, symlink=True)
|
||||
return False
|
||||
|
||||
def visit_file(self, root: str, rel_path: str, depth: int, *, symlink: bool = False) -> None:
|
||||
@@ -224,29 +239,22 @@ def visit_file(self, root: str, rel_path: str, depth: int, *, symlink: bool = Fa
|
||||
if self.ignore(rel_path):
|
||||
pass
|
||||
elif self._in_directories(proj_rel_path):
|
||||
# Can't create a file where a dir is; fatal error
|
||||
# Can't create a file where a dir is, unless they are the same file (symlinked dir),
|
||||
# in which case we simply drop the symlink in favor of the actual dir.
|
||||
src_a = os.path.join(*self._directory(proj_rel_path))
|
||||
src_b = os.path.join(root, rel_path)
|
||||
if not symlink or not _samefile(src_a, src_b):
|
||||
self.fatal_conflicts.append(
|
||||
MergeConflict(
|
||||
dst=proj_rel_path,
|
||||
src_a=os.path.join(*self._directory(proj_rel_path)),
|
||||
src_b=os.path.join(root, rel_path),
|
||||
)
|
||||
MergeConflict(dst=proj_rel_path, src_a=src_a, src_b=src_b)
|
||||
)
|
||||
elif self._in_files(proj_rel_path):
|
||||
# When two files project to the same path, they conflict iff they are distinct.
|
||||
# If they are the same (i.e. one links to the other), register regular files rather
|
||||
# than symlinks. The reason is that in copy-type views, we need a copy of the actual
|
||||
# file, not the symlink.
|
||||
|
||||
src_a = os.path.join(*self._file(proj_rel_path))
|
||||
src_b = os.path.join(root, rel_path)
|
||||
|
||||
try:
|
||||
samefile = os.path.samefile(src_a, src_b)
|
||||
except OSError:
|
||||
samefile = False
|
||||
|
||||
if not samefile:
|
||||
if not _samefile(src_a, src_b):
|
||||
# Distinct files produce a conflict.
|
||||
self.file_conflicts.append(
|
||||
MergeConflict(dst=proj_rel_path, src_a=src_a, src_b=src_b)
|
||||
@@ -259,7 +267,6 @@ def visit_file(self, root: str, rel_path: str, depth: int, *, symlink: bool = Fa
|
||||
existing_proj_rel_path, _, _ = self._file(proj_rel_path)
|
||||
self._del_file(existing_proj_rel_path)
|
||||
self._add_file(proj_rel_path, root, rel_path)
|
||||
|
||||
else:
|
||||
# Otherwise register this file to be linked.
|
||||
self._add_file(proj_rel_path, root, rel_path)
|
||||
|
@@ -269,7 +269,7 @@ def __init__(
|
||||
|
||||
@staticmethod
|
||||
def _poll_interval_generator(
|
||||
_wait_times: Optional[Tuple[float, float, float]] = None
|
||||
_wait_times: Optional[Tuple[float, float, float]] = None,
|
||||
) -> Generator[float, None, None]:
|
||||
"""This implements a backoff scheme for polling a contended resource
|
||||
by suggesting a succession of wait times between polls.
|
||||
|
@@ -2,8 +2,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
"""Utility classes for logging the output of blocks of code.
|
||||
"""
|
||||
"""Utility classes for logging the output of blocks of code."""
|
||||
import atexit
|
||||
import ctypes
|
||||
import errno
|
||||
|
@@ -923,7 +923,7 @@ class FileTypes:
|
||||
UNKNOWN = 2
|
||||
|
||||
|
||||
NOT_ISO8859_1_TEXT = re.compile(b"[\x00\x7F-\x9F]")
|
||||
NOT_ISO8859_1_TEXT = re.compile(b"[\x00\x7f-\x9f]")
|
||||
|
||||
|
||||
def file_type(f: IO[bytes]) -> int:
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
import re
|
||||
import sys
|
||||
from typing import Dict, Optional
|
||||
from typing import Dict, Optional, Tuple
|
||||
|
||||
import llnl.string
|
||||
import llnl.util.lang
|
||||
@@ -181,7 +181,11 @@ def checksum(parser, args):
|
||||
print()
|
||||
|
||||
if args.add_to_package:
|
||||
add_versions_to_package(pkg, version_lines, args.batch)
|
||||
path = spack.repo.PATH.filename_for_package_name(pkg.name)
|
||||
num_versions_added = add_versions_to_pkg(path, version_lines)
|
||||
tty.msg(f"Added {num_versions_added} new versions to {pkg.name} in {path}")
|
||||
if not args.batch and sys.stdin.isatty():
|
||||
editor(path)
|
||||
|
||||
|
||||
def print_checksum_status(pkg: PackageBase, version_hashes: dict):
|
||||
@@ -227,20 +231,9 @@ def print_checksum_status(pkg: PackageBase, version_hashes: dict):
|
||||
tty.die("Invalid checksums found.")
|
||||
|
||||
|
||||
def add_versions_to_package(pkg: PackageBase, version_lines: str, is_batch: bool):
|
||||
"""
|
||||
Add checksumed versions to a package's instructions and open a user's
|
||||
editor so they may double check the work of the function.
|
||||
|
||||
Args:
|
||||
pkg (spack.package_base.PackageBase): A package class for a given package in Spack.
|
||||
version_lines (str): A string of rendered version lines.
|
||||
|
||||
"""
|
||||
# Get filename and path for package
|
||||
filename = spack.repo.PATH.filename_for_package_name(pkg.name)
|
||||
def _update_version_statements(package_src: str, version_lines: str) -> Tuple[int, str]:
|
||||
"""Returns a tuple of number of versions added and the package's modified contents."""
|
||||
num_versions_added = 0
|
||||
|
||||
version_statement_re = re.compile(r"([\t ]+version\([^\)]*\))")
|
||||
version_re = re.compile(r'[\t ]+version\(\s*"([^"]+)"[^\)]*\)')
|
||||
|
||||
@@ -252,9 +245,7 @@ def add_versions_to_package(pkg: PackageBase, version_lines: str, is_batch: bool
|
||||
if match:
|
||||
new_versions.append((Version(match.group(1)), ver_line))
|
||||
|
||||
with open(filename, "r+", encoding="utf-8") as f:
|
||||
contents = f.read()
|
||||
split_contents = version_statement_re.split(contents)
|
||||
split_contents = version_statement_re.split(package_src)
|
||||
|
||||
for i, subsection in enumerate(split_contents):
|
||||
# If there are no more versions to add we should exit
|
||||
@@ -273,12 +264,15 @@ def add_versions_to_package(pkg: PackageBase, version_lines: str, is_batch: bool
|
||||
elif parsed_version == new_versions[0][0]:
|
||||
new_versions.pop(0)
|
||||
|
||||
# Seek back to the start of the file so we can rewrite the file contents.
|
||||
f.seek(0)
|
||||
f.writelines("".join(split_contents))
|
||||
return num_versions_added, "".join(split_contents)
|
||||
|
||||
tty.msg(f"Added {num_versions_added} new versions to {pkg.name}")
|
||||
tty.msg(f"Open {filename} to review the additions.")
|
||||
|
||||
if sys.stdout.isatty() and not is_batch:
|
||||
editor(filename)
|
||||
def add_versions_to_pkg(path: str, version_lines: str) -> int:
|
||||
"""Add new versions to a package.py file. Returns the number of versions added."""
|
||||
with open(path, "r", encoding="utf-8") as f:
|
||||
package_src = f.read()
|
||||
num_versions_added, package_src = _update_version_statements(package_src, version_lines)
|
||||
if num_versions_added > 0:
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
f.write(package_src)
|
||||
return num_versions_added
|
||||
|
@@ -310,7 +310,7 @@ def find_windows_kit_roots() -> List[str]:
|
||||
|
||||
@staticmethod
|
||||
def find_windows_kit_bin_paths(
|
||||
kit_base: Union[Optional[str], Optional[list]] = None
|
||||
kit_base: Union[Optional[str], Optional[list]] = None,
|
||||
) -> List[str]:
|
||||
"""Returns Windows kit bin directory per version"""
|
||||
kit_base = WindowsKitExternalPaths.find_windows_kit_roots() if not kit_base else kit_base
|
||||
@@ -325,7 +325,7 @@ def find_windows_kit_bin_paths(
|
||||
|
||||
@staticmethod
|
||||
def find_windows_kit_lib_paths(
|
||||
kit_base: Union[Optional[str], Optional[list]] = None
|
||||
kit_base: Union[Optional[str], Optional[list]] = None,
|
||||
) -> List[str]:
|
||||
"""Returns Windows kit lib directory per version"""
|
||||
kit_base = WindowsKitExternalPaths.find_windows_kit_roots() if not kit_base else kit_base
|
||||
|
@@ -568,7 +568,7 @@ def patch(
|
||||
"""
|
||||
|
||||
def _execute_patch(
|
||||
pkg_or_dep: Union[Type[spack.package_base.PackageBase], Dependency]
|
||||
pkg_or_dep: Union[Type[spack.package_base.PackageBase], Dependency],
|
||||
) -> None:
|
||||
pkg = pkg_or_dep.pkg if isinstance(pkg_or_dep, Dependency) else pkg_or_dep
|
||||
|
||||
|
@@ -283,21 +283,21 @@ def relocate_text_bin(binaries: Iterable[str], prefix_to_prefix: PrefixToPrefix)
|
||||
def is_macho_magic(magic: bytes) -> bool:
|
||||
return (
|
||||
# In order of popularity: 64-bit mach-o le/be, 32-bit mach-o le/be.
|
||||
magic.startswith(b"\xCF\xFA\xED\xFE")
|
||||
or magic.startswith(b"\xFE\xED\xFA\xCF")
|
||||
or magic.startswith(b"\xCE\xFA\xED\xFE")
|
||||
or magic.startswith(b"\xFE\xED\xFA\xCE")
|
||||
magic.startswith(b"\xcf\xfa\xed\xfe")
|
||||
or magic.startswith(b"\xfe\xed\xfa\xcf")
|
||||
or magic.startswith(b"\xce\xfa\xed\xfe")
|
||||
or magic.startswith(b"\xfe\xed\xfa\xce")
|
||||
# universal binaries: 0xcafebabe be (most common?) or 0xbebafeca le (not sure if exists).
|
||||
# Here we need to disambiguate mach-o and JVM class files. In mach-o the next 4 bytes are
|
||||
# the number of binaries; in JVM class files it's the java version number. We assume there
|
||||
# are less than 10 binaries in a universal binary.
|
||||
or (magic.startswith(b"\xCA\xFE\xBA\xBE") and int.from_bytes(magic[4:8], "big") < 10)
|
||||
or (magic.startswith(b"\xBE\xBA\xFE\xCA") and int.from_bytes(magic[4:8], "little") < 10)
|
||||
or (magic.startswith(b"\xca\xfe\xba\xbe") and int.from_bytes(magic[4:8], "big") < 10)
|
||||
or (magic.startswith(b"\xbe\xba\xfe\xca") and int.from_bytes(magic[4:8], "little") < 10)
|
||||
)
|
||||
|
||||
|
||||
def is_elf_magic(magic: bytes) -> bool:
|
||||
return magic.startswith(b"\x7FELF")
|
||||
return magic.startswith(b"\x7fELF")
|
||||
|
||||
|
||||
def is_binary(filename: str) -> bool:
|
||||
|
@@ -2706,7 +2706,7 @@ def name_and_dependency_types(s: str) -> Tuple[str, dt.DepFlag]:
|
||||
return name, depflag
|
||||
|
||||
def spec_and_dependency_types(
|
||||
s: Union[Spec, Tuple[Spec, str]]
|
||||
s: Union[Spec, Tuple[Spec, str]],
|
||||
) -> Tuple[Spec, dt.DepFlag]:
|
||||
"""Given a non-string key in the literal, extracts the spec
|
||||
and its dependency types.
|
||||
@@ -3409,12 +3409,20 @@ def _intersects_dependencies(self, other):
|
||||
# These two loops handle cases where there is an overly restrictive
|
||||
# vpkg in one spec for a provider in the other (e.g., mpi@3: is not
|
||||
# compatible with mpich2)
|
||||
for spec in self.virtual_dependencies():
|
||||
if spec.name in other_index and not other_index.providers_for(spec):
|
||||
for spec in self.traverse():
|
||||
if (
|
||||
spack.repo.PATH.is_virtual(spec.name)
|
||||
and spec.name in other_index
|
||||
and not other_index.providers_for(spec)
|
||||
):
|
||||
return False
|
||||
|
||||
for spec in other.virtual_dependencies():
|
||||
if spec.name in self_index and not self_index.providers_for(spec):
|
||||
for spec in other.traverse():
|
||||
if (
|
||||
spack.repo.PATH.is_virtual(spec.name)
|
||||
and spec.name in self_index
|
||||
and not self_index.providers_for(spec)
|
||||
):
|
||||
return False
|
||||
|
||||
return True
|
||||
@@ -3558,10 +3566,6 @@ def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
|
||||
for rhs in other.traverse(root=False)
|
||||
)
|
||||
|
||||
def virtual_dependencies(self):
|
||||
"""Return list of any virtual deps in this spec."""
|
||||
return [spec for spec in self.traverse() if spack.repo.PATH.is_virtual(spec.name)]
|
||||
|
||||
@property # type: ignore[misc] # decorated prop not supported in mypy
|
||||
def patches(self):
|
||||
"""Return patch objects for any patch sha256 sums on this Spec.
|
||||
@@ -3783,8 +3787,11 @@ def __contains__(self, spec):
|
||||
# if anonymous or same name, we only have to look at the root
|
||||
if not spec.name or spec.name == self.name:
|
||||
return self.satisfies(spec)
|
||||
else:
|
||||
return any(s.satisfies(spec) for s in self.traverse(root=False))
|
||||
try:
|
||||
dep = self[spec.name]
|
||||
except KeyError:
|
||||
return False
|
||||
return dep.satisfies(spec)
|
||||
|
||||
def eq_dag(self, other, deptypes=True, vs=None, vo=None):
|
||||
"""True if the full dependency DAGs of specs are equal."""
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import argparse
|
||||
import pathlib
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -37,6 +38,10 @@ def get_checksums_for_versions(url_by_version, package_name, **kwargs):
|
||||
def url_exists(url, curl=None):
|
||||
return True
|
||||
|
||||
def add_versions_to_pkg(pkg, version_lines, open_in_editor):
|
||||
raise AssertionError("Should not be called")
|
||||
|
||||
monkeypatch.setattr(spack.cmd.checksum, "add_versions_to_pkg", add_versions_to_pkg)
|
||||
monkeypatch.setattr(
|
||||
spack.package_base.PackageBase, "fetch_remote_versions", fetch_remote_versions
|
||||
)
|
||||
@@ -88,7 +93,6 @@ def test_checksum_args(arguments, expected):
|
||||
(["--batch", "preferred-test"], "version of preferred-test"),
|
||||
(["--latest", "preferred-test"], "Found 1 version"),
|
||||
(["--preferred", "preferred-test"], "Found 1 version"),
|
||||
(["--add-to-package", "preferred-test"], "Added 0 new versions to"),
|
||||
(["--verify", "preferred-test"], "Verified 1 of 1"),
|
||||
(["--verify", "zlib", "1.2.13"], "1.2.13 [-] No previous checksum"),
|
||||
],
|
||||
@@ -271,34 +275,35 @@ def test_checksum_interactive_unrecognized_command():
|
||||
assert interactive_version_filter(v.copy(), input=input) == v
|
||||
|
||||
|
||||
def test_checksum_versions(mock_packages, can_fetch_versions):
|
||||
def test_checksum_versions(mock_packages, can_fetch_versions, monkeypatch):
|
||||
pkg_cls = spack.repo.PATH.get_pkg_class("zlib")
|
||||
versions = [str(v) for v in pkg_cls.versions]
|
||||
output = spack_checksum("zlib", *versions)
|
||||
assert "Found 3 versions" in output
|
||||
assert "version(" in output
|
||||
output = spack_checksum("--add-to-package", "zlib", *versions)
|
||||
assert "Found 3 versions" in output
|
||||
assert "Added 0 new versions to" in output
|
||||
|
||||
|
||||
def test_checksum_missing_version(mock_packages, cannot_fetch_versions):
|
||||
def test_checksum_missing_version(mock_packages, cannot_fetch_versions, monkeypatch):
|
||||
def add_versions_to_pkg(pkg, version_lines, open_in_editor):
|
||||
raise AssertionError("Should not be called")
|
||||
|
||||
monkeypatch.setattr(spack.cmd.checksum, "add_versions_to_pkg", add_versions_to_pkg)
|
||||
output = spack_checksum("preferred-test", "99.99.99", fail_on_error=False)
|
||||
assert "Could not find any remote versions" in output
|
||||
output = spack_checksum("--add-to-package", "preferred-test", "99.99.99", fail_on_error=False)
|
||||
assert "Could not find any remote versions" in output
|
||||
assert "Added 1 new versions to" not in output
|
||||
|
||||
|
||||
def test_checksum_deprecated_version(mock_packages, can_fetch_versions):
|
||||
def add_versions_to_pkg(pkg, version_lines, open_in_editor):
|
||||
raise AssertionError("Should not be called")
|
||||
|
||||
output = spack_checksum("deprecated-versions", "1.1.0", fail_on_error=False)
|
||||
assert "Version 1.1.0 is deprecated" in output
|
||||
output = spack_checksum(
|
||||
"--add-to-package", "deprecated-versions", "1.1.0", fail_on_error=False
|
||||
)
|
||||
assert "Version 1.1.0 is deprecated" in output
|
||||
# TODO alecbcs: broken assertion.
|
||||
# assert "Added 0 new versions to" not in output
|
||||
|
||||
|
||||
def test_checksum_url(mock_packages, config):
|
||||
@@ -337,3 +342,52 @@ def test_checksum_manual_download_fails(mock_packages, monkeypatch):
|
||||
monkeypatch.setattr(spack.package_base.PackageBase, "download_instr", error)
|
||||
with pytest.raises(ManualDownloadRequiredError, match=error):
|
||||
spack_checksum(name, *versions)
|
||||
|
||||
|
||||
def test_upate_package_contents(tmp_path: pathlib.Path):
|
||||
"""Test that the package.py file is updated with the new versions."""
|
||||
pkg_path = tmp_path / "package.py"
|
||||
pkg_path.write_text(
|
||||
"""\
|
||||
from spack.package import *
|
||||
|
||||
class Zlib(Package):
|
||||
homepage = "http://zlib.net"
|
||||
url = "http://zlib.net/fossils/zlib-1.2.11.tar.gz"
|
||||
|
||||
version("1.2.11", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")
|
||||
version("1.2.8", sha256="36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d")
|
||||
version("1.2.3", sha256="1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e")
|
||||
variant("pic", default=True, description="test")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make("install")
|
||||
"""
|
||||
)
|
||||
version_lines = """\
|
||||
version("1.2.13", sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890")
|
||||
version("1.2.5", sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890")
|
||||
version("1.2.3", sha256="1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e")
|
||||
"""
|
||||
# two new versions are added
|
||||
assert spack.cmd.checksum.add_versions_to_pkg(str(pkg_path), version_lines) == 2
|
||||
assert (
|
||||
pkg_path.read_text()
|
||||
== """\
|
||||
from spack.package import *
|
||||
|
||||
class Zlib(Package):
|
||||
homepage = "http://zlib.net"
|
||||
url = "http://zlib.net/fossils/zlib-1.2.11.tar.gz"
|
||||
|
||||
version("1.2.13", sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890") # FIXME
|
||||
version("1.2.11", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")
|
||||
version("1.2.8", sha256="36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d")
|
||||
version("1.2.5", sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890") # FIXME
|
||||
version("1.2.3", sha256="1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e")
|
||||
variant("pic", default=True, description="test")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make("install")
|
||||
"""
|
||||
)
|
||||
|
@@ -190,7 +190,6 @@ def test_environment_cant_modify_environments_root(tmpdir):
|
||||
@pytest.mark.parametrize(
|
||||
"original_content",
|
||||
[
|
||||
(
|
||||
"""\
|
||||
spack:
|
||||
specs:
|
||||
@@ -199,7 +198,6 @@ def test_environment_cant_modify_environments_root(tmpdir):
|
||||
- - a
|
||||
concretizer:
|
||||
unify: false"""
|
||||
)
|
||||
],
|
||||
)
|
||||
def test_roundtrip_spack_yaml_with_comments(original_content, mock_packages, config, tmp_path):
|
||||
|
@@ -557,7 +557,7 @@ def test_combine_phase_logs(tmpdir):
|
||||
|
||||
def test_combine_phase_logs_does_not_care_about_encoding(tmpdir):
|
||||
# this is invalid utf-8 at a minimum
|
||||
data = b"\x00\xF4\xBF\x00\xBF\xBF"
|
||||
data = b"\x00\xf4\xbf\x00\xbf\xbf"
|
||||
input = [str(tmpdir.join("a")), str(tmpdir.join("b"))]
|
||||
output = str(tmpdir.join("c"))
|
||||
|
||||
|
@@ -341,39 +341,53 @@ def test_destination_merge_visitor_file_dir_clashes(tmpdir):
|
||||
assert b_to_a.fatal_conflicts[0].dst == "example"
|
||||
|
||||
|
||||
def test_source_merge_visitor_does_not_register_identical_file_conflicts(tmp_path: pathlib.Path):
|
||||
"""Tests whether the SourceMergeVisitor does not register identical file conflicts.
|
||||
but instead registers the file that triggers the potential conflict."""
|
||||
(tmp_path / "dir_bottom").mkdir()
|
||||
(tmp_path / "dir_bottom" / "file").write_bytes(b"hello")
|
||||
@pytest.mark.parametrize("normalize", [True, False])
|
||||
def test_source_merge_visitor_handles_same_file_gracefully(
|
||||
tmp_path: pathlib.Path, normalize: bool
|
||||
):
|
||||
"""Symlinked files/dirs from one prefix to the other are not file or fatal conflicts, they are
|
||||
resolved by taking the underlying file/dir, and this does not depend on the order prefixes
|
||||
are visited."""
|
||||
|
||||
(tmp_path / "dir_top").mkdir()
|
||||
(tmp_path / "dir_top" / "file").symlink_to(tmp_path / "dir_bottom" / "file")
|
||||
(tmp_path / "dir_top" / "zzzz").write_bytes(b"hello")
|
||||
def u(path: str) -> str:
|
||||
return path.upper() if normalize else path
|
||||
|
||||
visitor = SourceMergeVisitor()
|
||||
visitor.set_projection(str(tmp_path / "view"))
|
||||
(tmp_path / "a").mkdir()
|
||||
(tmp_path / "a" / "file").write_bytes(b"hello")
|
||||
(tmp_path / "a" / "dir").mkdir()
|
||||
(tmp_path / "a" / "dir" / "foo").write_bytes(b"hello")
|
||||
|
||||
visit_directory_tree(str(tmp_path / "dir_top"), visitor)
|
||||
(tmp_path / "b").mkdir()
|
||||
(tmp_path / "b" / u("file")).symlink_to(tmp_path / "a" / "file")
|
||||
(tmp_path / "b" / u("dir")).symlink_to(tmp_path / "a" / "dir")
|
||||
(tmp_path / "b" / "bar").write_bytes(b"hello")
|
||||
|
||||
# After visiting the top dir, we should have `file` and `zzzz` listed, in that order. Using
|
||||
# .items() to test order.
|
||||
assert list(visitor.files.items()) == [
|
||||
(str(tmp_path / "view" / "file"), (str(tmp_path / "dir_top"), "file")),
|
||||
(str(tmp_path / "view" / "zzzz"), (str(tmp_path / "dir_top"), "zzzz")),
|
||||
]
|
||||
|
||||
# Then after visiting the bottom dir, the "conflict" should be resolved, and `file` should
|
||||
# come from the bottom dir.
|
||||
visit_directory_tree(str(tmp_path / "dir_bottom"), visitor)
|
||||
assert not visitor.file_conflicts
|
||||
assert list(visitor.files.items()) == [
|
||||
(str(tmp_path / "view" / "zzzz"), (str(tmp_path / "dir_top"), "zzzz")),
|
||||
(str(tmp_path / "view" / "file"), (str(tmp_path / "dir_bottom"), "file")),
|
||||
visitor_1 = SourceMergeVisitor(normalize_paths=normalize)
|
||||
visitor_1.set_projection(str(tmp_path / "view"))
|
||||
for p in ("a", "b"):
|
||||
visit_directory_tree(str(tmp_path / p), visitor_1)
|
||||
|
||||
visitor_2 = SourceMergeVisitor(normalize_paths=normalize)
|
||||
visitor_2.set_projection(str(tmp_path / "view"))
|
||||
for p in ("b", "a"):
|
||||
visit_directory_tree(str(tmp_path / p), visitor_2)
|
||||
|
||||
assert not visitor_1.file_conflicts and not visitor_2.file_conflicts
|
||||
assert not visitor_1.fatal_conflicts and not visitor_2.fatal_conflicts
|
||||
assert (
|
||||
sorted(visitor_1.files.items())
|
||||
== sorted(visitor_2.files.items())
|
||||
== [
|
||||
(str(tmp_path / "view" / "bar"), (str(tmp_path / "b"), "bar")),
|
||||
(str(tmp_path / "view" / "dir" / "foo"), (str(tmp_path / "a"), f"dir{os.sep}foo")),
|
||||
(str(tmp_path / "view" / "file"), (str(tmp_path / "a"), "file")),
|
||||
]
|
||||
)
|
||||
assert visitor_1.directories[str(tmp_path / "view" / "dir")] == (str(tmp_path / "a"), "dir")
|
||||
assert visitor_2.directories[str(tmp_path / "view" / "dir")] == (str(tmp_path / "a"), "dir")
|
||||
|
||||
|
||||
def test_source_merge_visitor_does_deals_with_dangling_symlinks(tmp_path: pathlib.Path):
|
||||
def test_source_merge_visitor_deals_with_dangling_symlinks(tmp_path: pathlib.Path):
|
||||
"""When a file and a dangling symlink conflict, this should be handled like a file conflict."""
|
||||
(tmp_path / "dir_a").mkdir()
|
||||
os.symlink("non-existent", str(tmp_path / "dir_a" / "file"))
|
||||
@@ -398,227 +412,125 @@ def test_source_merge_visitor_does_deals_with_dangling_symlinks(tmp_path: pathli
|
||||
assert visitor.files == {str(tmp_path / "view" / "file"): (str(tmp_path / "dir_a"), "file")}
|
||||
|
||||
|
||||
def test_source_visitor_no_path_normalization(tmp_path: pathlib.Path):
|
||||
src = str(tmp_path / "a")
|
||||
@pytest.mark.parametrize("normalize", [True, False])
|
||||
def test_source_visitor_file_file(tmp_path: pathlib.Path, normalize: bool):
|
||||
(tmp_path / "a").mkdir()
|
||||
(tmp_path / "b").mkdir()
|
||||
(tmp_path / "a" / "file").write_bytes(b"")
|
||||
(tmp_path / "b" / "FILE").write_bytes(b"")
|
||||
|
||||
a = SourceMergeVisitor(normalize_paths=False)
|
||||
a.visit_file(src, "file", 0)
|
||||
a.visit_file(src, "FILE", 0)
|
||||
assert len(a.files) == 2
|
||||
assert len(a.directories) == 0
|
||||
assert "file" in a.files and "FILE" in a.files
|
||||
assert len(a.file_conflicts) == 0
|
||||
v = SourceMergeVisitor(normalize_paths=normalize)
|
||||
for p in ("a", "b"):
|
||||
visit_directory_tree(str(tmp_path / p), v)
|
||||
|
||||
a = SourceMergeVisitor(normalize_paths=False)
|
||||
a.visit_file(src, "file", 0)
|
||||
a.before_visit_dir(src, "FILE", 0)
|
||||
assert len(a.files) == 1
|
||||
assert "file" in a.files and "FILE" not in a.files
|
||||
assert len(a.directories) == 1
|
||||
assert "FILE" in a.directories
|
||||
assert len(a.fatal_conflicts) == 0
|
||||
assert len(a.file_conflicts) == 0
|
||||
|
||||
# without normalization, order doesn't matter
|
||||
a = SourceMergeVisitor(normalize_paths=False)
|
||||
a.before_visit_dir(src, "FILE", 0)
|
||||
a.visit_file(src, "file", 0)
|
||||
assert len(a.files) == 1
|
||||
assert "file" in a.files and "FILE" not in a.files
|
||||
assert len(a.directories) == 1
|
||||
assert "FILE" in a.directories
|
||||
assert len(a.fatal_conflicts) == 0
|
||||
assert len(a.file_conflicts) == 0
|
||||
|
||||
a = SourceMergeVisitor(normalize_paths=False)
|
||||
a.before_visit_dir(src, "FILE", 0)
|
||||
a.before_visit_dir(src, "file", 0)
|
||||
assert len(a.files) == 0
|
||||
assert len(a.directories) == 2
|
||||
assert "FILE" in a.directories and "file" in a.directories
|
||||
assert len(a.fatal_conflicts) == 0
|
||||
assert len(a.file_conflicts) == 0
|
||||
if normalize:
|
||||
assert len(v.files) == 1
|
||||
assert len(v.directories) == 0
|
||||
assert "file" in v.files # first file wins
|
||||
assert len(v.file_conflicts) == 1
|
||||
else:
|
||||
assert len(v.files) == 2
|
||||
assert len(v.directories) == 0
|
||||
assert "file" in v.files and "FILE" in v.files
|
||||
assert not v.fatal_conflicts
|
||||
assert not v.file_conflicts
|
||||
|
||||
|
||||
def test_source_visitor_path_normalization(tmp_path: pathlib.Path, monkeypatch):
|
||||
src_a = str(tmp_path / "a")
|
||||
src_b = str(tmp_path / "b")
|
||||
@pytest.mark.parametrize("normalize", [True, False])
|
||||
def test_source_visitor_file_dir(tmp_path: pathlib.Path, normalize: bool):
|
||||
(tmp_path / "a").mkdir()
|
||||
(tmp_path / "a" / "file").write_bytes(b"")
|
||||
(tmp_path / "b").mkdir()
|
||||
(tmp_path / "b" / "FILE").mkdir()
|
||||
v1 = SourceMergeVisitor(normalize_paths=normalize)
|
||||
for p in ("a", "b"):
|
||||
visit_directory_tree(str(tmp_path / p), v1)
|
||||
v2 = SourceMergeVisitor(normalize_paths=normalize)
|
||||
for p in ("b", "a"):
|
||||
visit_directory_tree(str(tmp_path / p), v2)
|
||||
|
||||
os.mkdir(src_a)
|
||||
os.mkdir(src_b)
|
||||
assert not v1.file_conflicts and not v2.file_conflicts
|
||||
|
||||
file = os.path.join(src_a, "file")
|
||||
FILE = os.path.join(src_b, "FILE")
|
||||
|
||||
with open(file, "wb"):
|
||||
pass
|
||||
|
||||
with open(FILE, "wb"):
|
||||
pass
|
||||
|
||||
assert os.path.exists(file)
|
||||
assert os.path.exists(FILE)
|
||||
|
||||
# file conflict with os.path.samefile reporting it's NOT the same file
|
||||
a = SourceMergeVisitor(normalize_paths=True)
|
||||
a.visit_file(src_a, "file", 0)
|
||||
a.visit_file(src_b, "FILE", 0)
|
||||
assert a.files
|
||||
assert len(a.files) == 1
|
||||
# first file wins
|
||||
assert "file" in a.files
|
||||
# this is a conflict since the files are reported to be distinct
|
||||
assert len(a.file_conflicts) == 1
|
||||
assert "FILE" in [c.dst for c in a.file_conflicts]
|
||||
|
||||
os.remove(FILE)
|
||||
os.link(file, FILE)
|
||||
|
||||
assert os.path.exists(file)
|
||||
assert os.path.exists(FILE)
|
||||
assert os.path.samefile(file, FILE)
|
||||
|
||||
# file conflict with os.path.samefile reporting it's the same file
|
||||
a = SourceMergeVisitor(normalize_paths=True)
|
||||
a.visit_file(src_a, "file", 0)
|
||||
a.visit_file(src_b, "FILE", 0)
|
||||
assert a.files
|
||||
assert len(a.files) == 1
|
||||
# second file wins
|
||||
assert "FILE" in a.files
|
||||
# not a conflict
|
||||
assert len(a.file_conflicts) == 0
|
||||
|
||||
a = SourceMergeVisitor(normalize_paths=True)
|
||||
a.visit_file(src_a, "file", 0)
|
||||
a.before_visit_dir(src_a, "FILE", 0)
|
||||
assert a.files
|
||||
assert len(a.files) == 1
|
||||
assert "file" in a.files
|
||||
assert len(a.directories) == 0
|
||||
assert len(a.fatal_conflicts) == 1
|
||||
conflicts = [c.dst for c in a.fatal_conflicts]
|
||||
assert "FILE" in conflicts
|
||||
|
||||
a = SourceMergeVisitor(normalize_paths=True)
|
||||
a.before_visit_dir(src_a, "FILE", 0)
|
||||
a.visit_file(src_a, "file", 0)
|
||||
assert len(a.directories) == 1
|
||||
assert "FILE" in a.directories
|
||||
assert len(a.files) == 0
|
||||
assert len(a.fatal_conflicts) == 1
|
||||
conflicts = [c.dst for c in a.fatal_conflicts]
|
||||
assert "file" in conflicts
|
||||
|
||||
a = SourceMergeVisitor(normalize_paths=True)
|
||||
a.before_visit_dir(src_a, "FILE", 0)
|
||||
a.before_visit_dir(src_a, "file", 0)
|
||||
assert len(a.directories) == 1
|
||||
# first dir wins
|
||||
assert "FILE" in a.directories
|
||||
assert len(a.files) == 0
|
||||
assert len(a.fatal_conflicts) == 0
|
||||
if normalize:
|
||||
assert len(v1.fatal_conflicts) == len(v2.fatal_conflicts) == 1
|
||||
else:
|
||||
assert len(v1.files) == len(v2.files) == 1
|
||||
assert "file" in v1.files and "file" in v2.files
|
||||
assert len(v1.directories) == len(v2.directories) == 1
|
||||
assert "FILE" in v1.directories and "FILE" in v2.directories
|
||||
assert not v1.fatal_conflicts and not v2.fatal_conflicts
|
||||
|
||||
|
||||
def test_destination_visitor_no_path_normalization(tmp_path: pathlib.Path):
|
||||
src = str(tmp_path / "a")
|
||||
dest = str(tmp_path / "b")
|
||||
@pytest.mark.parametrize("normalize", [True, False])
|
||||
def test_source_visitor_dir_dir(tmp_path: pathlib.Path, normalize: bool):
|
||||
(tmp_path / "a").mkdir()
|
||||
(tmp_path / "a" / "dir").mkdir()
|
||||
(tmp_path / "b").mkdir()
|
||||
(tmp_path / "b" / "DIR").mkdir()
|
||||
v = SourceMergeVisitor(normalize_paths=normalize)
|
||||
for p in ("a", "b"):
|
||||
visit_directory_tree(str(tmp_path / p), v)
|
||||
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=False)
|
||||
src_visitor.visit_file(src, "file", 0)
|
||||
assert len(src_visitor.files) == 1
|
||||
assert len(src_visitor.directories) == 0
|
||||
assert "file" in src_visitor.files
|
||||
assert not v.files
|
||||
assert not v.fatal_conflicts
|
||||
assert not v.file_conflicts
|
||||
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.visit_file(dest, "FILE", 0)
|
||||
# not a conflict, since normalization is off
|
||||
assert len(dest_visitor.src.files) == 1
|
||||
assert len(dest_visitor.src.directories) == 0
|
||||
assert "file" in dest_visitor.src.files
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 0
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=False)
|
||||
src_visitor.visit_file(src, "file", 0)
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.before_visit_dir(dest, "FILE", 0)
|
||||
assert len(dest_visitor.src.files) == 1
|
||||
assert "file" in dest_visitor.src.files
|
||||
assert len(dest_visitor.src.directories) == 0
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 0
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
|
||||
# not insensitive, order does not matter
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=False)
|
||||
src_visitor.before_visit_dir(src, "file", 0)
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.visit_file(dest, "FILE", 0)
|
||||
assert len(dest_visitor.src.files) == 0
|
||||
assert len(dest_visitor.src.directories) == 1
|
||||
assert "file" in dest_visitor.src.directories
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 0
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=False)
|
||||
src_visitor.before_visit_dir(src, "file", 0)
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.before_visit_dir(dest, "FILE", 0)
|
||||
assert len(dest_visitor.src.files) == 0
|
||||
assert len(dest_visitor.src.directories) == 1
|
||||
assert "file" in dest_visitor.src.directories
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 0
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
if normalize:
|
||||
assert len(v.directories) == 1
|
||||
assert "dir" in v.directories
|
||||
else:
|
||||
assert len(v.directories) == 2
|
||||
assert "DIR" in v.directories and "dir" in v.directories
|
||||
|
||||
|
||||
def test_destination_visitor_path_normalization(tmp_path: pathlib.Path):
|
||||
src = str(tmp_path / "a")
|
||||
dest = str(tmp_path / "b")
|
||||
@pytest.mark.parametrize("normalize", [True, False])
|
||||
def test_dst_visitor_file_file(tmp_path: pathlib.Path, normalize: bool):
|
||||
(tmp_path / "a").mkdir()
|
||||
(tmp_path / "b").mkdir()
|
||||
(tmp_path / "a" / "file").write_bytes(b"")
|
||||
(tmp_path / "b" / "FILE").write_bytes(b"")
|
||||
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=True)
|
||||
src_visitor.visit_file(src, "file", 0)
|
||||
assert len(src_visitor.files) == 1
|
||||
assert len(src_visitor.directories) == 0
|
||||
assert "file" in src_visitor.files
|
||||
src = SourceMergeVisitor(normalize_paths=normalize)
|
||||
visit_directory_tree(str(tmp_path / "a"), src)
|
||||
visit_directory_tree(str(tmp_path / "b"), DestinationMergeVisitor(src))
|
||||
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.visit_file(dest, "FILE", 0)
|
||||
assert len(dest_visitor.src.files) == 1
|
||||
assert len(dest_visitor.src.directories) == 0
|
||||
assert "file" in dest_visitor.src.files
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 1
|
||||
assert "FILE" in [c.dst for c in dest_visitor.src.fatal_conflicts]
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
assert len(src.files) == 1
|
||||
assert len(src.directories) == 0
|
||||
assert "file" in src.files
|
||||
assert not src.file_conflicts
|
||||
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=True)
|
||||
src_visitor.visit_file(src, "file", 0)
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.before_visit_dir(dest, "FILE", 0)
|
||||
assert len(dest_visitor.src.files) == 1
|
||||
assert "file" in dest_visitor.src.files
|
||||
assert len(dest_visitor.src.directories) == 0
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 1
|
||||
assert "FILE" in [c.dst for c in dest_visitor.src.fatal_conflicts]
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
if normalize:
|
||||
assert len(src.fatal_conflicts) == 1
|
||||
assert "FILE" in [c.dst for c in src.fatal_conflicts]
|
||||
else:
|
||||
assert not src.fatal_conflicts
|
||||
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=True)
|
||||
src_visitor.before_visit_dir(src, "file", 0)
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.visit_file(dest, "FILE", 0)
|
||||
assert len(dest_visitor.src.files) == 0
|
||||
assert len(dest_visitor.src.directories) == 1
|
||||
assert "file" in dest_visitor.src.directories
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 1
|
||||
assert "FILE" in [c.dst for c in dest_visitor.src.fatal_conflicts]
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
|
||||
src_visitor = SourceMergeVisitor(normalize_paths=True)
|
||||
src_visitor.before_visit_dir(src, "file", 0)
|
||||
dest_visitor = DestinationMergeVisitor(src_visitor)
|
||||
dest_visitor.before_visit_dir(dest, "FILE", 0)
|
||||
assert len(dest_visitor.src.files) == 0
|
||||
# this removes the mkdir action, no directory left over
|
||||
assert len(dest_visitor.src.directories) == 0
|
||||
# but it's also not a conflict
|
||||
assert len(dest_visitor.src.fatal_conflicts) == 0
|
||||
assert len(dest_visitor.src.file_conflicts) == 0
|
||||
@pytest.mark.parametrize("normalize", [True, False])
|
||||
def test_dst_visitor_file_dir(tmp_path: pathlib.Path, normalize: bool):
|
||||
(tmp_path / "a").mkdir()
|
||||
(tmp_path / "a" / "file").write_bytes(b"")
|
||||
(tmp_path / "b").mkdir()
|
||||
(tmp_path / "b" / "FILE").mkdir()
|
||||
src1 = SourceMergeVisitor(normalize_paths=normalize)
|
||||
visit_directory_tree(str(tmp_path / "a"), src1)
|
||||
visit_directory_tree(str(tmp_path / "b"), DestinationMergeVisitor(src1))
|
||||
src2 = SourceMergeVisitor(normalize_paths=normalize)
|
||||
visit_directory_tree(str(tmp_path / "b"), src2)
|
||||
visit_directory_tree(str(tmp_path / "a"), DestinationMergeVisitor(src2))
|
||||
|
||||
assert len(src1.files) == 1
|
||||
assert "file" in src1.files
|
||||
assert not src1.directories
|
||||
assert not src2.file_conflicts
|
||||
assert len(src2.directories) == 1
|
||||
|
||||
if normalize:
|
||||
assert len(src1.fatal_conflicts) == 1
|
||||
assert "FILE" in [c.dst for c in src1.fatal_conflicts]
|
||||
assert not src2.files
|
||||
assert len(src2.fatal_conflicts) == 1
|
||||
assert "file" in [c.dst for c in src2.fatal_conflicts]
|
||||
else:
|
||||
assert not src1.fatal_conflicts and not src2.fatal_conflicts
|
||||
assert not src1.file_conflicts and not src2.file_conflicts
|
||||
|
@@ -65,12 +65,21 @@ def test_repo_unknown_pkg(mutable_mock_repo):
|
||||
mutable_mock_repo.get_pkg_class("builtin.mock.nonexistentpackage")
|
||||
|
||||
|
||||
@pytest.mark.not_on_windows("mtime granularity issues on windows")
|
||||
def test_repo_last_mtime(mock_packages):
|
||||
latest_mtime = max(
|
||||
os.path.getmtime(p.module.__file__) for p in spack.repo.PATH.all_package_classes()
|
||||
mtime_with_package_py = [
|
||||
(os.path.getmtime(p.module.__file__), p.module.__file__)
|
||||
for p in spack.repo.PATH.all_package_classes()
|
||||
]
|
||||
repo_mtime = spack.repo.PATH.last_mtime()
|
||||
max_mtime, max_file = max(mtime_with_package_py)
|
||||
if max_mtime > repo_mtime:
|
||||
modified_after = "\n ".join(
|
||||
f"{path} ({mtime})" for mtime, path in mtime_with_package_py if mtime > repo_mtime
|
||||
)
|
||||
assert spack.repo.PATH.last_mtime() == latest_mtime
|
||||
assert (
|
||||
max_mtime <= repo_mtime
|
||||
), f"the following files were modified while running tests:\n {modified_after}"
|
||||
assert max_mtime == repo_mtime, f"last_mtime incorrect for {max_file}"
|
||||
|
||||
|
||||
def test_repo_invisibles(mutable_mock_repo, extra_repo):
|
||||
|
@@ -933,6 +933,11 @@ def test_indexing_prefers_direct_or_transitive_link_deps():
|
||||
with pytest.raises(KeyError):
|
||||
root["a2"]
|
||||
|
||||
# Check consistency of __contains__ with __getitem__
|
||||
assert "z3 +through_z1" in root
|
||||
assert "z3 +through_a1" in a1
|
||||
assert "a2" not in root
|
||||
|
||||
|
||||
def test_getitem_sticks_to_subdag():
|
||||
"""Test that indexing on Spec by virtual does not traverse outside the dag, which happens in
|
||||
|
@@ -8,7 +8,6 @@
|
||||
import pytest
|
||||
|
||||
import spack.concretize
|
||||
import spack.directives
|
||||
import spack.directives_meta
|
||||
import spack.paths
|
||||
import spack.repo
|
||||
|
@@ -2,8 +2,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
"""Non-fixture utilities for test code. Must be imported.
|
||||
"""
|
||||
"""Non-fixture utilities for test code. Must be imported."""
|
||||
from spack.main import make_argument_parser
|
||||
|
||||
|
||||
|
@@ -38,7 +38,7 @@ spack:
|
||||
- ripgrep
|
||||
- gh
|
||||
- fd
|
||||
# - bfs # liburing: /usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
|
||||
- bfs
|
||||
- fzf
|
||||
- tree
|
||||
- jq
|
||||
|
@@ -37,7 +37,7 @@ spack:
|
||||
- ripgrep
|
||||
- gh
|
||||
- fd
|
||||
# - bfs # liburing: /usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
|
||||
- bfs
|
||||
- fzf
|
||||
- tree
|
||||
- jq
|
||||
|
@@ -44,7 +44,7 @@ spack:
|
||||
- ripgrep
|
||||
- gh
|
||||
- fd
|
||||
# - bfs # liburing: /usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
|
||||
- bfs
|
||||
- fzf
|
||||
- tree
|
||||
- jq
|
||||
|
@@ -4,6 +4,7 @@ spack:
|
||||
concretizer:
|
||||
reuse: false
|
||||
unify: when_possible
|
||||
static_analysis: true
|
||||
|
||||
packages:
|
||||
all:
|
||||
|
@@ -40,6 +40,7 @@ class Acts(CMakePackage, CudaPackage):
|
||||
# Supported Acts versions
|
||||
version("main", branch="main")
|
||||
version("master", branch="main", deprecated=True) # For compatibility
|
||||
version("39.1.0", commit="09225b0d0bba24d57a696e347e3027b39404bb75", submodules=True)
|
||||
version("39.0.0", commit="b055202e2fbdd509bc186eb4782714bc46f38f3f", submodules=True)
|
||||
version("38.2.0", commit="9cb8f4494656553fd9b85955938b79b2fac4c9b0", submodules=True)
|
||||
version("38.1.0", commit="8a20c88808f10bf4fcdfd7c6e077f23614c3ab90", submodules=True)
|
||||
|
66
var/spack/repos/builtin/packages/aotriton/package.py
Normal file
66
var/spack/repos/builtin/packages/aotriton/package.py
Normal file
@@ -0,0 +1,66 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Aotriton(CMakePackage):
|
||||
"""Ahead of Time (AOT) Triton Math Library."""
|
||||
|
||||
homepage = "https://github.com/ROCm/aotriton"
|
||||
git = "https://github.com/ROCm/aotriton.git"
|
||||
url = "https://github.com/ROCm/aotriton/archive/refs/tags/0.8.2b.tar.gz"
|
||||
|
||||
maintainers("afzpatel", "srekolam", "renjithravindrankannath")
|
||||
|
||||
license("MIT")
|
||||
|
||||
version(
|
||||
"0.8.2b", tag="0.8.2b", commit="b24f43a9771622faa157155568b9a200c3b49e41", submodules=True
|
||||
)
|
||||
version(
|
||||
"0.8.1b", tag="0.8.1b", commit="3a80554a88ae3b1bcf4b27bc74ad9d7b913b58f6", submodules=True
|
||||
)
|
||||
version("0.8b", tag="0.8b", commit="6f8cbcac8a92775291bb1ba8f514d4beb350baf4", submodules=True)
|
||||
|
||||
generator("ninja")
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
depends_on("py-setuptools@40.8:", type="build")
|
||||
depends_on("py-filelock", type=("build", "run"))
|
||||
|
||||
depends_on("cmake@3.26:", type="build")
|
||||
depends_on("python", type="build")
|
||||
depends_on("z3", type="link")
|
||||
depends_on("zlib-api", type="link")
|
||||
depends_on("xz", type="link")
|
||||
depends_on("pkgconfig", type="build")
|
||||
conflicts("^openssl@3.3.0")
|
||||
|
||||
# ROCm dependencies
|
||||
depends_on("hip", type="build")
|
||||
depends_on("llvm-amdgpu", type="build")
|
||||
depends_on("comgr", type="build")
|
||||
depends_on("hsa-rocr-dev", type="build")
|
||||
|
||||
def patch(self):
|
||||
if self.spec.satisfies("^hip"):
|
||||
filter_file(
|
||||
"/opt/rocm/llvm/bin/ld.lld",
|
||||
f'{self.spec["llvm-amdgpu"].prefix}/bin/ld.lld',
|
||||
"third_party/triton/third_party/amd/backend/compiler.py",
|
||||
string=True,
|
||||
)
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
"""Set environment variables used to control the build"""
|
||||
if self.spec.satisfies("%clang"):
|
||||
env.set("TRITON_HIP_LLD_PATH", self.spec["llvm-amdgpu"].prefix / bin / ld.lld)
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
args.append(self.define("AOTRITON_GPU_BUILD_TIMEOUT", 0))
|
||||
return args
|
@@ -16,6 +16,7 @@ class Armadillo(CMakePackage):
|
||||
|
||||
license("Apache-2.0")
|
||||
|
||||
version("14.2.3", sha256="fc70c3089a8d2bb7f2510588597d4b35b4323f6d4be5db5c17c6dba20ab4a9cc")
|
||||
version("14.2.2", sha256="3054c8e63db3abdf1a5c8f9fdb7e6b4ad833f9bcfb58324c0ff86de0784c70e0")
|
||||
version("14.0.3", sha256="ebd6215eeb01ee412fed078c8a9f7f87d4e1f6187ebcdc1bc09f46095a4f4003")
|
||||
version("14.0.2", sha256="248e2535fc092add6cb7dea94fc86ae1c463bda39e46fd82d2a7165c1c197dff")
|
||||
|
@@ -6,15 +6,21 @@
|
||||
|
||||
|
||||
class Bfs(MakefilePackage):
|
||||
"""A breadth-first version of the UNIX find command."""
|
||||
"""BFS is a breadth-first variant of the UNIX find command that offers
|
||||
consistent, intuitive behavior and improved performance."""
|
||||
|
||||
homepage = "https://github.com/tavianator/bfs"
|
||||
url = "https://github.com/tavianator/bfs/archive/refs/tags/3.0.1.tar.gz"
|
||||
git = "https://github.com/tavianator/bfs.git"
|
||||
|
||||
maintainers("alecbcs")
|
||||
|
||||
license("0BSD")
|
||||
|
||||
sanity_check_is_file = ["bin/bfs"]
|
||||
|
||||
version("main", branch="main")
|
||||
version("4.0.5", sha256="f7d9ebff00d9a010a5d6cc9b7bf1933095d7e5c0b11a8ec48c96c7ed8f993e5f")
|
||||
version("4.0.4", sha256="209da9e9f43d8fe30fd689c189ea529e9d6b5358ce84a63a44721003aea3e1ca")
|
||||
version("4.0.1", sha256="8117b76b0a967887278a11470cbfa9e7aeae98f11a7eeb136f456ac462e5ba23")
|
||||
version("3.1.1", sha256="d73f345c1021e0630e0db930a3fa68dd1f968833037d8471ee1096e5040bf91b")
|
||||
@@ -23,12 +29,16 @@ class Bfs(MakefilePackage):
|
||||
version("3.0.2", sha256="d3456a9aeecc031064db0dbe012e55a11eb97be88d0ab33a90e570fe66457f92")
|
||||
version("3.0.1", sha256="a38bb704201ed29f4e0b989fb2ab3791ca51c3eff90acfc31fff424579bbf962")
|
||||
|
||||
# Build dependencies
|
||||
depends_on("c", type="build")
|
||||
|
||||
# System dependencies
|
||||
depends_on("acl", when="platform=linux")
|
||||
depends_on("attr", when="platform=linux")
|
||||
depends_on("libcap", when="platform=linux")
|
||||
depends_on("liburing", when="platform=linux @3.1:")
|
||||
depends_on("liburing@2.4:", when="platform=linux @3.1:")
|
||||
|
||||
# Required dependencies
|
||||
depends_on("oniguruma")
|
||||
|
||||
@run_before("build", when="@4:")
|
||||
@@ -39,6 +49,7 @@ def configure(self):
|
||||
configure_exe(*args)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
"""Install the package."""
|
||||
if spec.satisfies("@:3"):
|
||||
make("install", f"PREFIX={prefix}")
|
||||
else:
|
||||
|
@@ -1,25 +0,0 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class BioconductorDupradar(RPackage):
|
||||
"""Assessment of duplication rates in RNA-Seq datasets"""
|
||||
|
||||
homepage = "https://bioconductor.org/packages/3.16/bioc/html/dupRadar.html"
|
||||
url = "https://bioconductor.org/packages/release/bioc/src/contrib/dupRadar_1.30.0.tar.gz"
|
||||
maintainers("pabloaledo")
|
||||
|
||||
bioc = "dupradar"
|
||||
|
||||
version(
|
||||
"1.30.0",
|
||||
sha256="a299d7a4578047dfc19237e34255b0f50f70ce41d29762ef9f5a7741ba35aa3d",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("r-kernsmooth")
|
||||
depends_on("subread")
|
||||
depends_on("bioconductor-rsubread")
|
@@ -1,33 +0,0 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class BioconductorEbseq(RPackage):
|
||||
"""An R package for gene and isoform differential expression analysis of RNA-seq data.
|
||||
|
||||
R/EBSeq is an R package for identifying genes and isoforms differentially
|
||||
expressed (DE) across two or more biological conditions in an RNA-seq
|
||||
experiment. Details can be found in Leng et al., 2013. It provides the syntax
|
||||
required for identifying DE genes and isoforms in a two-group RNA-seq
|
||||
experiment as well for identifying DE genes across more than two conditions
|
||||
(the commands for identifying DE isoforms across more than two conditions
|
||||
are the same as those required for gene-level analysis)."""
|
||||
|
||||
homepage = "https://www.biostat.wisc.edu/~kendzior/EBSEQ/"
|
||||
url = "https://bioconductor.org/packages/release/bioc/src/contrib/EBSeq_1.40.0.tar.gz"
|
||||
maintainers("pabloaledo")
|
||||
|
||||
bioc = "ebseq"
|
||||
|
||||
version(
|
||||
"1.40.0",
|
||||
sha256="a5d3a88743d61062c6d68a426b19c53a4afd2fa216abc884d42c187780994378",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("r-blockmodeling")
|
||||
depends_on("r-gplots")
|
||||
depends_on("r-testthat")
|
@@ -1,23 +0,0 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class BioconductorRsubread(RPackage):
|
||||
"""Mapping, quantification and variant analysis of sequencing data"""
|
||||
|
||||
homepage = "https://bioconductor.org/packages/3.16/bioc/html/Rsubread.html"
|
||||
url = "https://bioconductor.org/packages/release/bioc/src/contrib/Rsubread_2.14.2.tar.gz"
|
||||
|
||||
bioc = "rsubread"
|
||||
|
||||
depends_on("r-matrix")
|
||||
depends_on("zlib-api")
|
||||
|
||||
version(
|
||||
"2.14.2",
|
||||
sha256="ac8be0fad0eb2743443e3a60a9a94eec78c746638aaccca70e7166d034dcebb5",
|
||||
deprecated=True,
|
||||
)
|
@@ -1,42 +0,0 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class BioconductorTximeta(RPackage):
|
||||
"""Transcript Quantification Import with Automatic Metadata
|
||||
|
||||
Transcript quantification import from Salmon and alevin with automatic
|
||||
attachment of transcript ranges and release information, and other associated
|
||||
metadata. De novo transcriptomes can be linked to the appropriate sources with
|
||||
linkedTxomes and shared for computational reproducibility."""
|
||||
|
||||
homepage = "https://bioconductor.org/packages/release/bioc/html/tximeta.html"
|
||||
url = "https://bioconductor.org/packages/release/bioc/src/contrib/tximeta_1.18.1.tar.gz"
|
||||
|
||||
bioc = "tximeta"
|
||||
|
||||
version(
|
||||
"1.18.1",
|
||||
sha256="ee486fc4b2352e2998a3c0c2064449ebcf09b5815f982597ea58311dc8064408",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("r", type=("build", "run"))
|
||||
depends_on("r-annotationdbi")
|
||||
depends_on("r-annotationhub")
|
||||
depends_on("r-biocfilecache")
|
||||
depends_on("r-biostrings")
|
||||
depends_on("r-ensembldb")
|
||||
depends_on("r-genomeinfodb")
|
||||
depends_on("r-genomicfeatures")
|
||||
depends_on("r-genomicranges")
|
||||
depends_on("r-iranges")
|
||||
depends_on("r-s4vectors")
|
||||
depends_on("r-summarizedexperiment")
|
||||
depends_on("r-tximport")
|
||||
depends_on("r-jsonlite")
|
||||
depends_on("r-matrix")
|
||||
depends_on("r-tibble")
|
@@ -21,6 +21,7 @@ class Catch2(CMakePackage):
|
||||
version("develop", branch="devel")
|
||||
|
||||
# Releases
|
||||
version("3.8.0", sha256="1ab2de20460d4641553addfdfe6acd4109d871d5531f8f519a52ea4926303087")
|
||||
version("3.7.1", sha256="c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c")
|
||||
version("3.6.0", sha256="485932259a75c7c6b72d4b874242c489ea5155d17efa345eb8cc72159f49f356")
|
||||
version("3.5.4", sha256="b7754b711242c167d8f60b890695347f90a1ebc95949a045385114165d606dbb")
|
||||
@@ -115,6 +116,7 @@ class Catch2(CMakePackage):
|
||||
version("1.3.0", sha256="245f6ee73e2fea66311afa1da59e5087ddab8b37ce64994ad88506e8af28c6ac")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("cmake@3.16:", type="build", when="@3.8:")
|
||||
|
||||
variant(
|
||||
"cxxstd",
|
||||
|
@@ -19,6 +19,8 @@ class Covfie(CMakePackage, CudaPackage):
|
||||
|
||||
maintainers("stephenswat")
|
||||
|
||||
version("0.12.1", sha256="c33d7707ee30ab5fa8df686a780600343760701023ac0b23355627e1f2f044de")
|
||||
version("0.12.0", sha256="e35e94075a40e89c4691ff373e3061577295d583a2546c682b2d652d9fce7828")
|
||||
version("0.11.0", sha256="39fcd0f218d3b4f3aacc6af497a8cda8767511efae7a72b47781f10fd4340f4f")
|
||||
version("0.10.0", sha256="d44142b302ffc193ad2229f1d2cc6d8d720dd9da8c37989ada4f23018f86c964")
|
||||
|
||||
|
@@ -19,6 +19,7 @@ class Detray(CMakePackage):
|
||||
|
||||
license("MPL-2.0", checked_by="stephenswat")
|
||||
|
||||
version("0.88.1", sha256="89134c86c6857cb3a821181e3bb0565ebb726dd8b1245678db1681483d792cf9")
|
||||
version("0.88.0", sha256="bda15501c9c96af961e24ce243982f62051c535b9fe458fb28336a19b54eb47d")
|
||||
version("0.87.0", sha256="2d4a76432dd6ddbfc00b88b5d482072e471fefc264b60748bb1f9a123963576e")
|
||||
version("0.86.0", sha256="98350c94e8a2395b8712b7102fd449536857e8158b38a96cc913c79b70301170")
|
||||
|
@@ -0,0 +1,13 @@
|
||||
diff --git a/configure b/configure
|
||||
index 879d44f..b4bab5f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -352,7 +352,7 @@ else
|
||||
#dynlibopt="-shared"
|
||||
# the following more elaborate set of options requested by Alexander Puck Neuwirth
|
||||
# for compatibility with gentoo, cf. https://github.com/fjcontrib/fjcontrib/issues/4
|
||||
- dynlibopt="-shared -Wl,--as-needed -Wl,-soname,fastjetcontribfragile.so.0"
|
||||
+ dynlibopt="-shared -Wl,--as-needed -Wl,-soname,libfastjetcontribfragile.so"
|
||||
dynlibext="so"
|
||||
dynlibpostproc="" # some dummy command needed
|
||||
fi
|
@@ -15,6 +15,9 @@ class Fjcontrib(AutotoolsPackage):
|
||||
|
||||
license("GPL-2.0-or-later")
|
||||
|
||||
version("1.100", sha256="52ad945d9195c40f347958dc04041e41c7130e845ebdf0c13f1bbdd5b6d2429b")
|
||||
version("1.056", sha256="fc31544424dece0d0676ea2433ad1e96fd9db82920bc7a7ef6294ce94e659d6e")
|
||||
version("1.055", sha256="d9aa46560fdfd85082f202a5a9ce64768fe0c598660f013206a8c9c17ecd0f36")
|
||||
version("1.054", sha256="1ef922d4c45863e5fe7a3b64dc441703db6b1c2cc92d4160125dc629b05ac331")
|
||||
version("1.052", sha256="bde63c28cbdf992bedea4ddedfc3cd52c9fec241a767cc455dd4ad10e8210c39")
|
||||
version("1.051", sha256="76a2ec612c768db3eb6bbaf686d02b05ddb64dde477d185e20df563b52308473")
|
||||
@@ -67,6 +70,9 @@ class Fjcontrib(AutotoolsPackage):
|
||||
version("0.001", sha256="51f24ad55e28fb1f9d698270602e5077c920fcf58d8ccfd274efbe829d7dd821")
|
||||
version("0.000", sha256="9486b11201e6b6e181b8a3abecd929403ae9aa67de0eb8b7353fb82ab4b89f41")
|
||||
|
||||
# fix incorrect soname in 1.100
|
||||
patch("configure-1.100.patch", when="@1.100")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
depends_on("fastjet")
|
||||
|
@@ -17,12 +17,14 @@ class Gnutls(AutotoolsPackage):
|
||||
|
||||
homepage = "https://www.gnutls.org"
|
||||
url = "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/gnutls-3.5.19.tar.xz"
|
||||
git = "https://gitlab.com/gnutls/gnutls.git"
|
||||
list_depth = 2
|
||||
|
||||
maintainers("alecbcs")
|
||||
|
||||
license("LGPL-2.1-or-later")
|
||||
|
||||
version("3.8.9", sha256="69e113d802d1670c4d5ac1b99040b1f2d5c7c05daec5003813c049b5184820ed")
|
||||
version("3.8.8", sha256="ac4f020e583880b51380ed226e59033244bc536cad2623f2e26f5afa2939d8fb")
|
||||
version("3.8.4", sha256="2bea4e154794f3f00180fa2a5c51fe8b005ac7a31cd58bd44cdfa7f36ebc3a9b")
|
||||
version("3.8.3", sha256="f74fc5954b27d4ec6dfbb11dea987888b5b124289a3703afcada0ee520f4173e")
|
||||
|
@@ -17,9 +17,13 @@ class Gocryptfs(GoPackage):
|
||||
|
||||
license("MIT", checked_by="snehring")
|
||||
|
||||
version("2.5.1", sha256="b2e69d382caef598ffa1071b8d5f6e9df30d38fe2f9e9b0bee0d2e7436654f6d")
|
||||
version("2.4.0", sha256="26a93456588506f4078f192b70e7816b6a4042a14b748b28a50d2b6c9b10e2ec")
|
||||
|
||||
depends_on("c", type="build") # generated
|
||||
|
||||
depends_on("go@1.16:", type="build")
|
||||
depends_on("go@1.19:", type="build", when="@2.5:")
|
||||
|
||||
depends_on("openssl")
|
||||
depends_on("pkgconfig", type="build")
|
||||
|
@@ -153,10 +153,15 @@ def flag_handler(self, name, flags):
|
||||
self.spec.satisfies("@:4.2.15 %apple-clang")
|
||||
or self.spec.satisfies("%clang@16:")
|
||||
or self.spec.satisfies("%oneapi")
|
||||
or self.spec.satisfies("%gcc@14:")
|
||||
):
|
||||
flags.append("-Wno-error=implicit-function-declaration")
|
||||
|
||||
if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%apple-clang@15:"):
|
||||
if (
|
||||
self.spec.satisfies("%clang@16:")
|
||||
or self.spec.satisfies("%apple-clang@15:")
|
||||
or self.spec.satisfies("%gcc@14:")
|
||||
):
|
||||
flags.append("-Wno-error=implicit-int")
|
||||
|
||||
return flags, None, None
|
||||
|
@@ -16,7 +16,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
homepage = "https://github.com/LLNL/hiop"
|
||||
git = "https://github.com/LLNL/hiop.git"
|
||||
maintainers("ryandanehy", "cameronrutherford", "pelesh")
|
||||
maintainers("nychiang", "cnpetra", "pelesh")
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
|
50
var/spack/repos/builtin/packages/libgpiod/package.py
Normal file
50
var/spack/repos/builtin/packages/libgpiod/package.py
Normal file
@@ -0,0 +1,50 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Libgpiod(AutotoolsPackage):
|
||||
"""C library and tools for interacting with the linux GPIO character device
|
||||
(gpiod stands for GPIO device)"""
|
||||
|
||||
homepage = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/"
|
||||
git = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod"
|
||||
|
||||
maintainers("davekeeshan")
|
||||
|
||||
license("LGPL-2.1-or-later")
|
||||
|
||||
version("master", branch="master")
|
||||
version("2.2.0", sha256="ae35329db7027c740e90c883baf27c26311f0614e6a7b115771b28188b992aec")
|
||||
version("2.1.3", sha256="8d80ea022ae78122aa525308e7423b83064bff278fcd9cd045b94b4f81f8057d")
|
||||
version("2.1.2", sha256="b1bdf1e3f75238695f93e442062bafc069170f2bf4f0cd4b8e049ca67131a1f0")
|
||||
version("2.1.1", sha256="0af43a6089d69f9d075cf67ca2ae5972b9081e38e6b3d46cea37d67e2df6fb9b")
|
||||
version("2.1.0", sha256="fd6ed4b2c674fe6cc3b481880f6cde1eea79e296e95a139b85401eaaea6de3fc")
|
||||
version("2.0.2", sha256="3532e1dbaffdc2c5965a761a0750f2691ee49aad273ddbbd93acf6a727b1b65c")
|
||||
version("2.0.1", sha256="b6eda55356160a8e73906e3d48e959ef81296787d764975b10f257e9660668e9")
|
||||
version("2.0.0", sha256="62071ac22872d9b936408e4a067d15edcdd61dce864ace8725eacdaefe23b898")
|
||||
version("1.6.5", sha256="1473d3035b506065393a4569763cf6b5c98e59c8f865326374ebadffa2578f3a")
|
||||
version("1.6.4", sha256="829d4ac268df07853609d67cfc7f476e9aa736cb2a68a630be99e8fad197be0a")
|
||||
version("1.6.3", sha256="eb446070be1444fd7d32d32bbca53c2f3bbb0a21193db86198cf6050b7a28441")
|
||||
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
depends_on("autoconf", type="build")
|
||||
depends_on("autoconf-archive", type="build")
|
||||
depends_on("automake", type="build")
|
||||
depends_on("pkgconfig", type="build")
|
||||
depends_on("libtool", type="build")
|
||||
|
||||
def autoreconf(self, spec, prefix):
|
||||
Executable("./autogen.sh")()
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-{0}.tar.gz"
|
||||
if version[2] == 0:
|
||||
return url.format(version.up_to(1))
|
||||
else:
|
||||
return url.format(version)
|
@@ -33,5 +33,5 @@ class LibpressioNvcomp(CMakePackage, CudaPackage):
|
||||
|
||||
def cmake_args(self):
|
||||
cuda_arch = self.spec.variants["cuda_arch"].value
|
||||
args = [("-DCMAKE_CUDA_ARCHITECTURES=%s" % cuda_arch)]
|
||||
args = ["-DCMAKE_CUDA_ARCHITECTURES=%s" % cuda_arch]
|
||||
return args
|
||||
|
@@ -2,27 +2,50 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Liburing(AutotoolsPackage):
|
||||
"""This is the io_uring library, liburing. liburing provides helpers
|
||||
to setup and teardown io_uring instances, and also a simplified interface
|
||||
for applications that don't need (or want) to deal with the full kernel
|
||||
side implementation."""
|
||||
"""Linux-native io_uring I/O access library.
|
||||
|
||||
liburing provides helpers to setup and teardown io_uring instances,
|
||||
and a simplified interface for applications that don't need (or want)
|
||||
to deal with the full kernel side implementation. It enables high-performance
|
||||
asynchronous I/O operations on Linux systems supporting the io_uring
|
||||
interface.
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/axboe/liburing"
|
||||
url = "https://github.com/axboe/liburing/archive/refs/tags/liburing-2.3.tar.gz"
|
||||
git = "https://github.com/axboe/liburing.git"
|
||||
|
||||
maintainers("alecbcs")
|
||||
|
||||
license("LGPL-2.1-or-later OR MIT")
|
||||
|
||||
# Sanity checks
|
||||
sanity_check_is_file = ["include/liburing.h", "lib/liburing.so"]
|
||||
sanity_check_is_dir = ["include", "lib"]
|
||||
|
||||
# Versions
|
||||
version("master", branch="master")
|
||||
version("2.9", sha256="897b1153b55543e8b92a5a3eb9b906537a5fedcf8afaf241f8b8787940c79f8d")
|
||||
version("2.4", sha256="2398ec82d967a6f903f3ae1fd4541c754472d3a85a584dc78c5da2fabc90706b")
|
||||
version("2.3", sha256="60b367dbdc6f2b0418a6e0cd203ee0049d9d629a36706fcf91dfb9428bae23c8")
|
||||
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
# Build dependencies
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
conflicts("platform=darwin", msg="Only supported on linux")
|
||||
conflicts("platform=windows", msg="Only supported on linux")
|
||||
# Platform conflicts
|
||||
conflicts("platform=darwin", msg="liburing is only supported on Linux.")
|
||||
conflicts("platform=windows", msg="liburing is only supported on Linux.")
|
||||
|
||||
# Define build targets
|
||||
@property
|
||||
def build_targets(self):
|
||||
if self.spec.satisfies("@2.7:"):
|
||||
# avoid examples and test
|
||||
return ["library"]
|
||||
else:
|
||||
return ["all"]
|
||||
|
@@ -5,7 +5,7 @@
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Libxau(AutotoolsPackage, XorgPackage):
|
||||
class Libxau(AutotoolsPackage, MesonPackage, XorgPackage):
|
||||
"""The libXau package contains a library implementing the X11
|
||||
Authorization Protocol. This is useful for restricting client
|
||||
access to the display."""
|
||||
@@ -17,6 +17,9 @@ class Libxau(AutotoolsPackage, XorgPackage):
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
build_system("autotools", conditional("meson", when="@1.0.12:"), default="autotools")
|
||||
|
||||
version("1.0.12", sha256="2402dd938da4d0a332349ab3d3586606175e19cb32cb9fe013c19f1dc922dcee")
|
||||
version("1.0.11", sha256="3a321aaceb803577a4776a5efe78836eb095a9e44bbc7a465d29463e1a14f189")
|
||||
version("1.0.10", sha256="51a54da42475d4572a0b59979ec107c27dacf6c687c2b7b04e5cf989a7c7e60c")
|
||||
version("1.0.9", sha256="1f123d8304b082ad63a9e89376400a3b1d4c29e67e3ea07b3f659cccca690eea")
|
||||
|
@@ -15,6 +15,7 @@ class Libxcursor(AutotoolsPackage, XorgPackage):
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("1.2.3", sha256="74e72da27e61cc2cfd2e267c14f500ea47775850048ee0b00362a55c9b60ee9b")
|
||||
version("1.2.2", sha256="98c3a30a3f85274c167d1ac5419d681ce41f14e27bfa5fe3003c8172cd8af104")
|
||||
version("1.2.1", sha256="77f96b9ad0a3c422cfa826afabaf1e02b9bfbfc8908c5fa1a45094faad074b98")
|
||||
version("1.1.14", sha256="be0954faf274969ffa6d95b9606b9c0cfee28c13b6fc014f15606a0c8b05c17b")
|
||||
|
@@ -18,6 +18,9 @@ class Libxfont2(AutotoolsPackage, XorgPackage):
|
||||
|
||||
license("MIT")
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("2.0.7", sha256="90b331c2fd2d0420767c4652e007d054c97a3f03a88c55e3b986bd3acfd7e338")
|
||||
version("2.0.6", sha256="a944df7b6837c8fa2067f6a5fc25d89b0acc4011cd0bc085106a03557fb502fc")
|
||||
version("2.0.1", sha256="381b6b385a69343df48a082523c856aed9042fbbc8ee0a6342fb502e4321230a")
|
||||
|
||||
|
@@ -17,6 +17,9 @@ class Libxshmfence(AutotoolsPackage, XorgPackage):
|
||||
|
||||
license("MIT")
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("1.3.3", sha256="d4a4df096aba96fea02c029ee3a44e11a47eb7f7213c1a729be83e85ec3fde10")
|
||||
version("1.3.2", sha256="870df257bc40b126d91b5a8f1da6ca8a524555268c50b59c0acd1a27f361606f")
|
||||
version("1.3.1", sha256="1129f95147f7bfe6052988a087f1b7cb7122283d2c47a7dbf7135ce0df69b4f8")
|
||||
version("1.3", sha256="b884300d26a14961a076fbebc762a39831cb75f92bed5ccf9836345b459220c7")
|
||||
|
@@ -15,6 +15,7 @@ class Libxt(AutotoolsPackage, XorgPackage):
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("1.3.1", sha256="cf2212189869adb94ffd58c7d9a545a369b83d2274930bfbe148da354030b355")
|
||||
version("1.3.0", sha256="de4a80c4cc7785b9620e572de71026805f68e85a2bf16c386009ef0e50be3f77")
|
||||
version("1.2.1", sha256="6da1bfa9dd0ed87430a5ce95b129485086394df308998ebe34d98e378e3dfb33")
|
||||
version("1.2.0", sha256="d4bee88898fc5e1dc470e361430c72fbc529b9cdbbb6c0ed3affea3a39f97d8d")
|
||||
|
@@ -24,6 +24,7 @@ class Libxtst(AutotoolsPackage, XorgPackage):
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("1.2.5", sha256="244ba6e1c5ffa44f1ba251affdfa984d55d99c94bb925a342657e5e7aaf6d39c")
|
||||
version("1.2.4", sha256="01366506aeb033f6dffca5326af85f670746b0cabbfd092aabefb046cf48c445")
|
||||
version("1.2.3", sha256="a0c83acce02d4923018c744662cb28eb0dbbc33b4adc027726879ccf68fbc2c2")
|
||||
version("1.2.2", sha256="221838960c7b9058cd6795c1c3ee8e25bae1c68106be314bc3036a4f26be0e6c")
|
||||
|
@@ -16,6 +16,7 @@ class Libxv(AutotoolsPackage, XorgPackage):
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("1.0.13", sha256="9a0c31392b8968a4f29a0ad9c51e7ce225bcec3c4cbab9f2a241f921776b2991")
|
||||
version("1.0.12", sha256="ce706619a970a580a0e35e9b5c98bdd2af243ac6494c65f44608a89a86100126")
|
||||
version("1.0.11", sha256="c4112532889b210e21cf05f46f0f2f8354ff7e1b58061e12d7a76c95c0d47bb1")
|
||||
version("1.0.10", sha256="89a664928b625558268de81c633e300948b3752b0593453d7815f8775bab5293")
|
||||
|
@@ -15,6 +15,7 @@ class Libxxf86vm(AutotoolsPackage, XorgPackage):
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("1.1.6", sha256="d2b4b1ec4eb833efca9981f19ed1078a8a73eed0bb3ca5563b64527ae8021e52")
|
||||
version("1.1.5", sha256="f3f1c29fef8accb0adbd854900c03c6c42f1804f2bc1e4f3ad7b2e1f3b878128")
|
||||
version("1.1.4", sha256="5108553c378a25688dcb57dca383664c36e293d60b1505815f67980ba9318a99")
|
||||
|
||||
|
@@ -80,18 +80,22 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"cuda_arch=none", when="+cuda", msg="magma: Please indicate a CUDA arch value or values"
|
||||
)
|
||||
|
||||
# currently not compatible with CUDA-11
|
||||
# Versions before 2.5.3 were not compatible with CUDA-11
|
||||
# https://bitbucket.org/icl/magma/issues/22/cuda-11-changes-issue
|
||||
# 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
|
||||
# 2.8.0 release 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
|
||||
# Many cuda_arch values were not recognized by MAGMA's CMakeLists.txt
|
||||
with when("@:2.8"):
|
||||
# All cuda_arch values are supported in 2.9.0 release
|
||||
for target in [10, 11, 12, 13, 21, 32, 52, 53, 61, 62, 72, 86]:
|
||||
conflicts(f"cuda_arch={target}")
|
||||
conflicts(
|
||||
f"cuda_arch={target}", msg=f"magma: cuda_arch={target} needs a version > 2.8.0"
|
||||
)
|
||||
|
||||
# Some cuda_arch values had support added recently
|
||||
conflicts("cuda_arch=37", when="@:2.5", msg="magma: cuda_arch=37 needs a version > 2.5")
|
||||
@@ -206,7 +210,6 @@ def test_c(self):
|
||||
with working_dir(test_dir):
|
||||
pkg_config_path = self.prefix.lib.pkgconfig
|
||||
with spack.util.environment.set_env(PKG_CONFIG_PATH=pkg_config_path):
|
||||
|
||||
make("c")
|
||||
tests = [
|
||||
("example_sparse", "sparse solver"),
|
||||
|
@@ -16,6 +16,14 @@ class MochiMargo(AutotoolsPackage):
|
||||
maintainers("carns", "mdorier", "fbudin69500")
|
||||
|
||||
version("main", branch="main")
|
||||
version("0.19.0", sha256="269e3b52228fb59a8ab502b8fac4761fc15440817455bb006f311093bd4c02f3")
|
||||
version("0.18.3", sha256="4871af11d3cadc81e6f08a2112782c61324d9cdabc9e9b61c595c95da6d75127")
|
||||
version("0.18.2", sha256="a3a9fde826954be06b9123887533f91e6725faf6f6c682c080b97c2172a22057")
|
||||
version("0.18.1", sha256="06221986deaa5eb20001c49f29d580722a16b5bde66c1333b3b02f677ef973b5")
|
||||
version("0.18.0", sha256="5b3e8b64217490bd8643506699cd06538abaf1bb19eb0429506de62bf0c8402e")
|
||||
version("0.17.3", sha256="286ec8bab62e8f21b1d1acb0afa6699be247504de783897433b5d81ef3b5fe18")
|
||||
version("0.17.2", sha256="2da1a3dbbe7d5eb6bb51cead00c0428f2d699da9fd4c3bae86088c9e36080089")
|
||||
version("0.17.1", sha256="835d2a98ac6f6c647fa0e7e152a802c489d72170c82d3b7ba7af9a26fdd13367")
|
||||
version("0.17.0", sha256="5c456cdc2e3156f902e5068468ee6d061eb252dcfdfcb2b570726e9cf84fc2e8")
|
||||
version("0.16.0", sha256="5fb7ea3633b5bcc735e605dba27187ea893958bf86b8928184028735a338c61b")
|
||||
version("0.15.0", sha256="f962f02ddaae125eaf15bf89126ee47b4f852d366b14248d2d67a0be8f661224")
|
||||
|
@@ -15,6 +15,17 @@ class MochiThallium(CMakePackage):
|
||||
maintainers("mdorier")
|
||||
|
||||
version("main", branch="main")
|
||||
version("0.15.0", sha256="a7872e926e97fdf80a67c8e44f1217a959c689763dbcf9712abd913d1ef23bdf")
|
||||
version("0.14.6", sha256="dfdd39fc840a82a69c1698e764239e8aa0a5573f677a52fb2bdd6bffd529a232")
|
||||
version("0.14.5", sha256="8a13f1adb6a549053f56b46235ea81ed9c047cd702b8980035fc81be3ea942e3")
|
||||
version("0.14.4", sha256="bca33ef4af640581a1729606b708974a955a2a2a2f3817ee110c2c9da2da9a99")
|
||||
version("0.14.3", sha256="b37b8fa9976471950e9d74e0269c2dc80ca5353e97c7ee4603460077fab28ca3")
|
||||
version("0.14.2", sha256="7dc03a84845aa4b902c0b52d8384dd1b9bef02b53f880efb02ec58a12d8c6381")
|
||||
version("0.14.1", sha256="0de7b7b5b517af552ababab7b5ef973207515398f7fd9685b3f6841432913c7b")
|
||||
version("0.14.0", sha256="3af3c2e4cae15a256e76df89ed9ad46ced68ca9b045216a9510f563e96722104")
|
||||
version("0.13.1", sha256="8166c412ebeb58898198069adbaf126362cffb2ba80ccf3c24b5cead0368acfa")
|
||||
version("0.13.0", sha256="29f50b338c247ce5945ea90241ad938b951c4bac8af070cc3136f10f309ae542")
|
||||
version("0.12.0", sha256="cbb6ea8f479d74a4310847ffd7eb4fb11107732540ebc13b5989b7c9809f6d06")
|
||||
version("0.11.3", sha256="d1ffd7ee1ccbcfb00f246cb29c5bc2560e59f8808609cbc19b7098aa8fc903c4")
|
||||
version("0.11.2", sha256="4f1e57ca843b7592525c179dec73bfb603a27fbda4feaf028d636e05c1b38e36")
|
||||
version("0.11.1", sha256="be99bec2309ce1945a777fba720175f409972cbf27b73388728a740d6406a040")
|
||||
@@ -54,8 +65,10 @@ class MochiThallium(CMakePackage):
|
||||
description="Use the cereal library for serialization",
|
||||
when="@0.4.1:",
|
||||
)
|
||||
conflicts("~cereal", when="@0.14.0:", msg="Thallium 0.14.0 and above requires Cereal")
|
||||
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
depends_on("mochi-margo@0.18.0:", when="@0.14.0:")
|
||||
depends_on("mochi-margo@0.12.0:", when="@0.11.2:")
|
||||
depends_on("mochi-margo@0.9.8:", when="@0.10.0:")
|
||||
depends_on("mochi-margo@0.7:", when="@0.7:")
|
||||
|
23
var/spack/repos/builtin/packages/neofoam/package.py
Normal file
23
var/spack/repos/builtin/packages/neofoam/package.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Neofoam(CMakePackage):
|
||||
"""NeoFOAM is a WIP prototype of a modern CFD core."""
|
||||
|
||||
homepage = "https://github.com/exasim-project/NeoFOAM"
|
||||
git = "https://github.com/exasim-project/NeoFOAM.git"
|
||||
|
||||
maintainers("greole", "HenningScheufler")
|
||||
|
||||
license("MIT", checked_by="greole")
|
||||
|
||||
version("main", branch="main")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("mpi")
|
||||
depends_on("kokkos@4.3.0")
|
@@ -15,18 +15,22 @@ class Openloops(Package):
|
||||
at NLO QCD and NLO EW."""
|
||||
|
||||
homepage = "https://openloops.hepforge.org/"
|
||||
url = "https://openloops.hepforge.org/downloads?f=OpenLoops-2.1.1.tar.gz"
|
||||
url = "https://gitlab.com/openloops/OpenLoops/-/archive/OpenLoops-2.1.3/OpenLoops-OpenLoops-2.1.3.tar.gz"
|
||||
|
||||
tags = ["hep"]
|
||||
|
||||
license("GPL-3.0-only")
|
||||
|
||||
version("2.1.4", sha256="3423688d016ffcda3b738de89418338e95249276ac634e77f356a20deb57daaa")
|
||||
version("2.1.3", sha256="b26ee805d63b781244a5bab4db09f4a7a5a5c9ed371ead0d5260f00a0a94b233")
|
||||
version("2.1.2", sha256="f52575cae3d70b6b51a5d423e9cd0e076ed5961afcc015eec00987e64529a6ae")
|
||||
version("2.1.1", sha256="f1c47ece812227eab584e2c695fef74423d2f212873f762b8658f728685bcb91")
|
||||
|
||||
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")
|
||||
|
||||
# conflicts because there is a scons 3.0.5 in 2.1.2
|
||||
conflicts("^python@3.12:", when="@:2.1.2")
|
||||
|
||||
all_processes = [
|
||||
"tbln",
|
||||
@@ -249,6 +253,11 @@ class Openloops(Package):
|
||||
|
||||
phases = ["configure", "build", "build_processes", "install"]
|
||||
|
||||
def url_for_version(self, v):
|
||||
if self.spec.satisfies("@:2.1.2"):
|
||||
return f"https://openloops.hepforge.org/downloads?f=OpenLoops-{v}.tar.gz"
|
||||
return f"https://gitlab.com/openloops/OpenLoops/-/archive/OpenLoops-{v}/OpenLoops-OpenLoops-{v}.tar.gz"
|
||||
|
||||
def configure(self, spec, prefix):
|
||||
spack_env = (
|
||||
"PATH LD_LIBRARY_PATH CPATH C_INCLUDE_PATH" + "CPLUS_INCLUDE_PATH INTEL_LICENSE_FILE"
|
||||
|
@@ -6,7 +6,11 @@
|
||||
|
||||
|
||||
class Pass(MakefilePackage):
|
||||
"""A minimal password manager following the UNIX philosphy."""
|
||||
"""Pass is a simple password manager that follows the Unix philosophy.
|
||||
|
||||
It stores passwords in gpg encrypted files organized in a directory hierarchy,
|
||||
provides commands for adding, editing, generating, and retrieving passwords,
|
||||
and features integration with git for versioning and synchronization."""
|
||||
|
||||
homepage = "https://www.passwordstore.org/"
|
||||
git = "https://git.zx2c4.com/password-store.git"
|
||||
@@ -15,26 +19,37 @@ class Pass(MakefilePackage):
|
||||
|
||||
license("GPL-2.0", checked_by="taliaferro")
|
||||
|
||||
# Sanity checks
|
||||
sanity_check_is_file = ["bin/pass"]
|
||||
sanity_check_is_dir = ["share/bash-completion/completions"]
|
||||
|
||||
# Versions - newest to oldest
|
||||
version("master", branch="master")
|
||||
version("1.7.4", tag="1.7.4", commit="1078f2514d579178d5df7042c6a790e9c9b731ad")
|
||||
|
||||
# Variants
|
||||
variant("xclip", default=False, description="install the X11 clipboard provider")
|
||||
|
||||
# Required dependencies
|
||||
depends_on("bash")
|
||||
depends_on("gnupg")
|
||||
depends_on("git")
|
||||
depends_on("tree")
|
||||
depends_on("util-linux") # for GNU getopt
|
||||
depends_on("gnupg")
|
||||
depends_on("libqrencode")
|
||||
depends_on("openssl") # used for base64 only
|
||||
depends_on("tree")
|
||||
depends_on("util-linux") # for GNU getopt
|
||||
|
||||
# Optional dependencies
|
||||
depends_on("xclip", when="+xclip")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("PREFIX", prefix)
|
||||
"""Set required environment variables for build."""
|
||||
env.set("PREFIX", self.prefix)
|
||||
env.set("WITH_ALLCOMP", "yes")
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
"""
|
||||
"""Patch platform-specific dependency paths in script files.
|
||||
|
||||
Pass's install process involves slotting in a small script snippet at
|
||||
the start of the file, defining certain platform-specific behaviors
|
||||
including the paths where some of its key dependencies are likely to
|
||||
@@ -42,7 +57,6 @@ def edit(self, spec, prefix):
|
||||
but the paths to the dependencies are wrong (for example, on MacOS
|
||||
it looks for getopt in /opt/homebrew.) We can hardcode those paths here.
|
||||
"""
|
||||
|
||||
bash_exec = self.spec["bash"].command
|
||||
gpg_exec = self.spec["gnupg"].prefix.bin.gpg
|
||||
getopt_exec = self.spec["util-linux"].prefix.bin.getopt
|
||||
|
@@ -610,14 +610,14 @@ def configure_options(self):
|
||||
if "+exodusii+fortran" in spec and "+fortran" in spec:
|
||||
options.append("--with-exodusii-fortran-bindings")
|
||||
|
||||
direct_dependencies = {
|
||||
*(spec.name for spec in spec.dependencies()),
|
||||
*(virtual for edge in spec.edges_to_dependencies() for virtual in edge.virtuals),
|
||||
}
|
||||
# tuple format (spacklibname, petsclibname, useinc, uselib)
|
||||
# default: 'gmp', => ('gmp', 'gmp', True, True)
|
||||
# any other combination needs a full tuple
|
||||
# if not (useinc || uselib): usedir - i.e (False, False)
|
||||
direct_dependencies = []
|
||||
for dep in spec.dependencies():
|
||||
direct_dependencies.append(dep.name)
|
||||
direct_dependencies.extend(set(vspec.name for vspec in dep.package.virtuals_provided))
|
||||
for library in (
|
||||
("cuda", "cuda", False, False),
|
||||
("hip", "hip", True, False),
|
||||
|
46
var/spack/repos/builtin/packages/plsm/package.py
Normal file
46
var/spack/repos/builtin/packages/plsm/package.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Plsm(CMakePackage, CudaPackage):
|
||||
"""plsm is a generic library for spatial subdivision within an N-dimensional lattice."""
|
||||
|
||||
homepage = "https://github.com/ORNL-Fusion/plsm"
|
||||
url = "https://github.com/ORNL-Fusion/plsm/archive/refs/tags/v2.1.2.tar.gz"
|
||||
git = "https://github.com/ORNL-Fusion/plsm.git"
|
||||
|
||||
maintainers("PhilipFackler", "sblondel")
|
||||
license("BSD-3-Clause", checked_by="PhilipFackler")
|
||||
|
||||
version("2.1.2", sha256="0816fc604b35aac9d848063c2cb2e20abef5e39e146d745873a061a9445ec277")
|
||||
version("2.0.4", sha256="a92080c7015d33a11ffd0d790a75341d1b1e3b7d19331fbd48c5e6a15a09693d")
|
||||
version("2.0.3", sha256="d7ca114dd566ee8f1485bcb5e4d9307a43c33f107d295cec31a568b3ad7064bc")
|
||||
version("2.0.1", sha256="b5b60172ee398a08df9d11b04719d85c7c99c6a5b10b3709f72fcd40a920c0c3")
|
||||
version("2.0.0", sha256="833e63134101e1574de383e3d6d50fcee60ef7f9e69394d5b4c722e2a6317017")
|
||||
version("1.1.1", sha256="e40e2d5d3339b303a0056bcec0882b3040e69b38ddef4c3154a6e8ce3d83ebb8")
|
||||
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant("int64", default=True, description="Use 64-bit indices")
|
||||
variant("openmp", default=False, description="Activates OpenMP backend")
|
||||
|
||||
conflicts("+cuda", when="cuda_arch=none")
|
||||
conflicts("+openmp", when="+cuda", msg="Can't use both OpenMP and CUDA")
|
||||
|
||||
depends_on("kokkos")
|
||||
depends_on("kokkos +openmp", when="+openmp")
|
||||
for cuda_arch in CudaPackage.cuda_arch_values:
|
||||
depends_on(
|
||||
f"kokkos+cmake_lang+cuda+cuda_lambda cuda_arch={cuda_arch}",
|
||||
when=f"+cuda cuda_arch={cuda_arch}",
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define("BUILD_TESTING", self.run_tests),
|
||||
self.define_from_variant("PLSM_USE_64BIT_INDEX_TYPE", "int64"),
|
||||
]
|
||||
return args
|
@@ -14,8 +14,22 @@ class PyFastjsonschema(PythonPackage):
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("2.21.1", sha256="794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4")
|
||||
version("2.21.0", sha256="a02026bbbedc83729da3bfff215564b71902757f33f60089f1abae193daa4771")
|
||||
version("2.20.0", sha256="3d48fc5300ee96f5d116f10fe6f28d938e6008f59a6a025c2649475b87f76a23")
|
||||
version("2.19.1", sha256="e3126a94bdc4623d3de4485f8d468a12f02a67921315ddc87836d6e456dc789d")
|
||||
version("2.19.0", sha256="e25df6647e1bc4a26070b700897b07b542ec898dd4f1f6ea013e7f6a88417225")
|
||||
version("2.18.1", sha256="06dc8680d937628e993fa0cd278f196d20449a1adc087640710846b324d422ea")
|
||||
version("2.18.0", sha256="e820349dd16f806e4bd1467a138dced9def4bc7d6213a34295272a6cac95b5bd")
|
||||
version("2.17.1", sha256="f4eeb8a77cef54861dbf7424ac8ce71306f12cbb086c45131bcba2c6a4f726e3")
|
||||
version("2.17.0", sha256="1a68234b7a20ab35ce6600a35ce76a18bac630fc0c6443b3ae22e89fa21d8987")
|
||||
version("2.16.3", sha256="4a30d6315a68c253cfa8f963b9697246315aa3db89f98b97235e345dedfb0b8e")
|
||||
version("2.16.2", sha256="01e366f25d9047816fe3d288cbfc3e10541daf0af2044763f3d0ade42476da18")
|
||||
version("2.15.1", sha256="671f36d225b3493629b5e789428660109528f373cf4b8a22bac6fa2f8191c2d2")
|
||||
|
||||
depends_on("python@3.3:3.13", when="@2.21:", type=("build", "run"))
|
||||
depends_on("python@3.3:3.12", when="@2.20:", type=("build", "run"))
|
||||
depends_on("python@3.3:3.11", when="@2.16.3:", type=("build", "run"))
|
||||
depends_on("python@3.3:", when="@2.15:", type=("build", "run"))
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
||||
|
21
var/spack/repos/builtin/packages/py-linear-tree/package.py
Normal file
21
var/spack/repos/builtin/packages/py-linear-tree/package.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyLinearTree(PythonPackage):
|
||||
"""A python library to build Model Trees with Linear Models at the leaves."""
|
||||
|
||||
homepage = "https://github.com/cerlymarco/linear-tree"
|
||||
pypi = "linear-tree/linear-tree-0.3.5.tar.gz"
|
||||
git = "https://github.com/cerlymarco/linear-tree.git"
|
||||
|
||||
version("0.3.5", sha256="2db9fc976bcd693a66d8d92fdd7f97314125b3330eea4778885bfe62190d586c")
|
||||
|
||||
depends_on("python@3.8:", type=("build", "run"))
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-scikit-learn@0.24.2:", type=("build", "run"))
|
||||
depends_on("py-numpy", type=("build", "run"))
|
||||
depends_on("py-scipy", type=("build", "run"))
|
@@ -13,13 +13,18 @@ class PyLoguru(PythonPackage):
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("0.7.3", sha256="19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6")
|
||||
version("0.7.2", sha256="e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac")
|
||||
version("0.7.1", sha256="7ba2a7d81b79a412b0ded69bd921e012335e80fd39937a633570f273a343579e")
|
||||
version("0.7.0", sha256="1612053ced6ae84d7959dd7d5e431a0532642237ec21f7fd83ac73fe539e03e1")
|
||||
version("0.6.0", sha256="066bd06758d0a513e9836fd9c6b5a75bfb3fd36841f4b996bc60b547a309d41c")
|
||||
version("0.3.0", sha256="f2a0fa92f334d37a13351aa36ab18e8039649a3741836b4b6d8b8bce7e8457ac")
|
||||
version("0.2.5", sha256="68297d9f23064c2f4764bb5d0c5c767f3ed7f9fc1218244841878f5fc7c94add")
|
||||
|
||||
depends_on("python@3.5:", type=("build", "run"))
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-aiocontextvars@0.2.0:", when="^python@3.6:", type=("build", "run"))
|
||||
depends_on("py-setuptools", when="@:0.7.2", type="build")
|
||||
depends_on("py-flit-core@3", when="@0.7.3:", type="build")
|
||||
depends_on("py-aiocontextvars@0.2.0:", when="^python@:3.6", type=("build", "run"))
|
||||
depends_on("py-colorama@0.3.4:", when="platform=windows", type=("build", "run"))
|
||||
# Missing dependency required for windows
|
||||
# depends_on('py-win32-setctime@1.0.0:',
|
||||
|
@@ -14,6 +14,13 @@ class PyNbconvert(PythonPackage):
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("7.16.4", sha256="86ca91ba266b0a448dc96fa6c5b9d98affabde2867b363258703536807f9f7f4")
|
||||
version("7.16.3", sha256="a6733b78ce3d47c3f85e504998495b07e6ea9cf9bf6ec1c98dda63ec6ad19142")
|
||||
version("7.16.2", sha256="8310edd41e1c43947e4ecf16614c61469ebc024898eb808cce0999860fc9fb16")
|
||||
version("7.16.1", sha256="e79e6a074f49ba3ed29428ed86487bf51509d9aab613bd8522ac08f6d28fd7fd")
|
||||
version("7.16.0", sha256="813e6553796362489ae572e39ba1bff978536192fb518e10826b0e8cadf03ec8")
|
||||
version("7.15.0", sha256="ff3f54a1a5e1e024beb9fde8946d05b6d0bf68cd14b5f2f9dc5b545c8bc71055")
|
||||
version("7.14.2", sha256="a7f8808fd4e082431673ac538400218dd45efd076fbeb07cc6e5aa5a3a4e949e")
|
||||
version("7.14.1", sha256="20cba10e0448dc76b3bebfe1adf923663e3b98338daf77b97b42511ef5a88618")
|
||||
version("7.4.0", sha256="51b6c77b507b177b73f6729dba15676e42c4e92bcb00edc8cc982ee72e7d89d7")
|
||||
version("7.0.0", sha256="fd1e361da30e30e4c5a5ae89f7cae95ca2a4d4407389672473312249a7ba0060")
|
||||
@@ -51,6 +58,7 @@ class PyNbconvert(PythonPackage):
|
||||
|
||||
variant("serve", default=True, description="Include a webserver")
|
||||
|
||||
depends_on("python@3.8:", when="@7.7:", type=("build", "run"))
|
||||
depends_on("python@3.7:", when="@6.2.0:", type=("build", "run"))
|
||||
depends_on("py-hatchling@1.5:", when="@7.14:", type="build")
|
||||
depends_on("py-hatchling@0.25:", when="@7:", type="build")
|
||||
|
@@ -14,9 +14,13 @@ class PyPyomo(PythonPackage):
|
||||
pypi = "Pyomo/Pyomo-5.6.6.tar.gz"
|
||||
git = "https://github.com/Pyomo/pyomo.git"
|
||||
|
||||
# Maintainer accurate as of 2024-02-21
|
||||
# Maintainer accurate as of 2024-12-17
|
||||
maintainers("mrmundt")
|
||||
|
||||
version("6.8.2", sha256="40d8f7b216ad1602bb254f4296591608dd94fe2c961dc1e63ca6b84fb397bed6")
|
||||
version("6.8.1", sha256="dc3369193a915d6fa9a59382f1c02c17f6bf540584f641b9bd20d1f1a7f8ba8c")
|
||||
version("6.8.0", sha256="a204a78d8ed5fa7ad8fa94d3c8ed4f6da38b5c02a68b8fe446bc694f16c8d1ea")
|
||||
version("6.7.3", sha256="b7f0441c405af4f42f38527ae38826a5c0a4984dd7bea1fe07172789d8594770")
|
||||
version("6.7.2", sha256="53bef766854f7607ca1fcfe3f218594ab382f137a275cee3d925d2b2f96876bf")
|
||||
version("6.7.1", sha256="735b66c45937f1caa43f073d8218a4918b6de658914a699397d38d5b8c219a40")
|
||||
version("6.7.0", sha256="a245ec609ef2fd907269f0b8e0923f74d5bf868b2ec0e62bf2a30b3f253bd17b")
|
||||
@@ -76,7 +80,10 @@ class PyPyomo(PythonPackage):
|
||||
############################
|
||||
|
||||
# python_requires
|
||||
depends_on("python@3.8:3.12", when="@6.7:", type=("build", "run"))
|
||||
# Preemptively tagging 3.8:3.13 for 6.8.1 and 6.8.2; 3.8 support will
|
||||
# be removed in 6.9.0(MRM - Dec 2024)
|
||||
depends_on("python@3.8:3.13", when="@6.8.1:6.8.2", type=("build", "run"))
|
||||
depends_on("python@3.8:3.12", when="@6.7:6.8.0", type=("build", "run"))
|
||||
depends_on("python@3.7:3.11", when="@6.4:6.6", type=("build", "run"))
|
||||
depends_on("python@3.6:3.10", when="@6.3", type=("build", "run"))
|
||||
depends_on("python@3.6:3.9", when="@6.0:6.2", type=("build", "run"))
|
||||
@@ -98,9 +105,9 @@ class PyPyomo(PythonPackage):
|
||||
# when tests is requested
|
||||
depends_on("py-coverage", when="@6.1:+tests", type=("run"))
|
||||
depends_on("py-nose", when="@6.1:6.2+tests", type=("run"))
|
||||
depends_on("py-parameterized", when="@6.1:+tests", type=("run"))
|
||||
depends_on("py-pytest", when="@6.3:+tests", type=("run"))
|
||||
depends_on("py-pytest-parallel", when="@6.3:+tests", type=("run"))
|
||||
depends_on("py-parameterized", when="@6.1:+tests", type=("run"))
|
||||
depends_on("py-pybind11", when="@6.1:+tests", type=("run"))
|
||||
|
||||
# when docs is requested
|
||||
@@ -112,18 +119,19 @@ class PyPyomo(PythonPackage):
|
||||
depends_on("py-sphinxcontrib-napoleon", when="@6.1:+docs", type=("run"))
|
||||
depends_on("py-sphinx-toolbox@2.16:", when="@6.7.1:+docs", type=("run"))
|
||||
depends_on("py-sphinx-jinja2-compat@0.1.1:", when="@6.7.1:+docs", type=("run"))
|
||||
depends_on("py-enum-tools", when="@6.7.1:+docs", type=("run"))
|
||||
# Pyomo does not support NumPy2 (May 9, 2024)
|
||||
depends_on("py-numpy@1", when="@6.1:+docs", type=("run"))
|
||||
depends_on("py-enum-tools", when="@6.7.1:6.8.0+docs", type=("run"))
|
||||
depends_on("py-numpy@1", when="@6.1:6.7+docs", type=("run"))
|
||||
depends_on("py-numpy", when="@6.8:+docs", type=("run"))
|
||||
depends_on("py-scipy", when="@6.4.2:+docs", type=("run"))
|
||||
|
||||
# when optional is requested
|
||||
depends_on("py-dill", when="@6.1:+optional", type=("run"))
|
||||
depends_on("py-ipython", when="@6.1:+optional", type=("run"))
|
||||
depends_on("py-linear-tree", when="@6.8:+optional", type=("run"))
|
||||
depends_on("py-matplotlib@:3.6.0,3.6.2:", when="@6.1:+optional", type=("run"))
|
||||
depends_on("py-networkx", when="@6.1:+optional", type=("run"))
|
||||
# Pyomo does not support NumPy2 (May 9, 2024)
|
||||
depends_on("py-numpy@1", when="@6.1:+optional", type=("run"))
|
||||
depends_on("py-numpy@1", when="@6.1:6.7+optional", type=("run"))
|
||||
depends_on("py-numpy", when="@6.8:+optional", type=("run"))
|
||||
depends_on("py-openpyxl", when="@6.1:+optional", type=("run"))
|
||||
depends_on("py-pint", when="@6.1:+optional", type=("run"))
|
||||
depends_on("py-plotly", when="@6.6:+optional", type=("run"))
|
||||
|
@@ -15,6 +15,7 @@ class Qemacs(MakefilePackage):
|
||||
maintainers("Buldram")
|
||||
|
||||
version("master", branch="master")
|
||||
version("6.4.1", commit="43b5851958ee13fe0b96cf92b5cfc0aaa085d740")
|
||||
version("6.3.3", commit="e3c5bfd457614773508feefdc12dbc60073030ed")
|
||||
version("6.3.2", commit="0e90c181078f3d85d0d44d985d541184223668e1")
|
||||
version("6.3.1", commit="288eeb450e534a39adb337396aa9ffcdc629f94e")
|
||||
@@ -24,18 +25,17 @@ class Qemacs(MakefilePackage):
|
||||
|
||||
depends_on("which", type="build")
|
||||
|
||||
variant("docs", default=False, description="Build documentation")
|
||||
variant("doc", default=True, description="Install documentation")
|
||||
variant("plugins", default=False, description="Enable plugin support")
|
||||
variant("X", default=False, description="Build with X11 support")
|
||||
variant("png", default=True, when="+X", description="Build with PNG support")
|
||||
variant("xshm", default=True, when="+X", description="Build with XShm support")
|
||||
variant("xv", default=True, when="+X", description="Build with X Video support")
|
||||
|
||||
conflicts("+docs", when="platform=freebsd")
|
||||
conflicts("+plugins", when="platform=freebsd")
|
||||
conflicts("+plugins", when="platform=darwin")
|
||||
conflicts("+plugins", when="platform=windows")
|
||||
|
||||
depends_on("texi2html", type="build", when="+docs")
|
||||
depends_on("libx11", type="link", when="+X")
|
||||
depends_on("libxcb", type="link", when="+X")
|
||||
depends_on("libxau", type="link", when="+X")
|
||||
@@ -57,3 +57,17 @@ def edit(self, spec, prefix):
|
||||
"--disable-ffmpeg", # Currently broken
|
||||
"--disable-xrender", # Currently broken
|
||||
)
|
||||
|
||||
if spec.satisfies("~doc"):
|
||||
filter_file(
|
||||
"$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1", "", "Makefile", string=True
|
||||
)
|
||||
filter_file(
|
||||
"$(INSTALL) -m 644 qe.1 $(DESTDIR)$(mandir)/man1", "", "Makefile", string=True
|
||||
)
|
||||
|
||||
@run_after("install", when="+doc")
|
||||
def install_docs(self):
|
||||
doc_dir = self.prefix.share.join("qe")
|
||||
install("config.eg", doc_dir)
|
||||
install("qe-doc.html", doc_dir)
|
||||
|
198
var/spack/repos/builtin/packages/quda/package.py
Normal file
198
var/spack/repos/builtin/packages/quda/package.py
Normal file
@@ -0,0 +1,198 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Quda(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"""QUDA is a library for performing calculations in lattice QCD on GPUs."""
|
||||
|
||||
homepage = "https://lattice.github.io/quda/"
|
||||
url = "https://github.com/lattice/quda/archive/refs/tags/v1.1.0.tar.gz"
|
||||
git = "https://github.com/lattice/quda.git"
|
||||
|
||||
tags = ["hep", "lattice"]
|
||||
|
||||
maintainers("chaoos")
|
||||
|
||||
license("MIT OR BSD-3-Clause", checked_by="chaoos")
|
||||
|
||||
version("develop", branch="develop")
|
||||
|
||||
# git describe --tags --match 'v*' 18bf43ed40c75ae276e55bb8ddf2f64aa5510c37
|
||||
version(
|
||||
"1.1.0-4597-g18bf43ed4", preferred=True, commit="18bf43ed40c75ae276e55bb8ddf2f64aa5510c37"
|
||||
)
|
||||
|
||||
version("1.1.0", sha256="b4f635c993275010780ea09d8e593e0713a6ca1af1db6cc86c64518714fcc745")
|
||||
version(
|
||||
"1.0.0",
|
||||
deprecated=True,
|
||||
sha256="32b883bd4af45b76a832d8a070ab020306c94ff6590410cbe7c3eab3b630b938",
|
||||
)
|
||||
version(
|
||||
"0.9.0",
|
||||
deprecated=True,
|
||||
sha256="0a9f2e028fb40e4a09f78af51702d2de4099a9bf10fb8ce350eacb2d8327e481",
|
||||
)
|
||||
version(
|
||||
"0.8.0",
|
||||
deprecated=True,
|
||||
sha256="58d9a94b7fd38ec1f79bea7a0e9b470f0fa517cbf5fce42d5776e1c65607aeda",
|
||||
)
|
||||
|
||||
# build dependencies
|
||||
generator("ninja")
|
||||
depends_on("cmake@3.18:", type="build")
|
||||
depends_on("ninja", type="build")
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build", when="+tifr")
|
||||
depends_on("fortran", type="build", when="+bqcd")
|
||||
|
||||
variant("mpi", default=False, description="Enable MPI support")
|
||||
variant("qmp", default=False, description="Enable QMP")
|
||||
variant("qio", default=False, description="Enable QIO")
|
||||
variant("openqcd", default=False, description="Enable openQCD interface")
|
||||
variant("milc", default=False, description="Enable MILC interface")
|
||||
variant("qdp", default=False, description="Enable QDP interface")
|
||||
variant("bqcd", default=False, description="Enable BQCD interface")
|
||||
variant("cps", default=False, description="Enable CPS interface")
|
||||
variant("qdpjit", default=False, description="Enable QDPJIT interface")
|
||||
variant("tifr", default=False, description="Enable TIFR interface")
|
||||
variant("multigrid", default=False, description="Enable multigrid")
|
||||
variant("nvshmem", default=False, description="Enable NVSHMEM", when="+cuda")
|
||||
|
||||
variant("clover", default=False, description="Build clover Dirac operators")
|
||||
variant(
|
||||
"clover_hasenbusch", default=False, description="Build clover Hasenbusch twist operators"
|
||||
)
|
||||
variant("domain_wall", default=False, description="Build domain wall Dirac operators")
|
||||
variant("laplace", default=False, description="Build laplace operator")
|
||||
variant(
|
||||
"ndeg_twisted_clover",
|
||||
default=False,
|
||||
description="Build non-degenerate twisted clover Dirac operators",
|
||||
)
|
||||
variant(
|
||||
"ndeg_twisted_mass",
|
||||
default=False,
|
||||
description="Build non-degenerate twisted mass Dirac operators",
|
||||
)
|
||||
variant("staggered", default=False, description="Build staggered Dirac operators")
|
||||
variant("twisted_clover", default=False, description="Build twisted clover Dirac operators")
|
||||
variant("twisted_mass", default=False, description="Build twisted mass Dirac operators")
|
||||
variant("wilson", default=True, description="Build Wilson Dirac operators")
|
||||
|
||||
with when("+multigrid"):
|
||||
variant(
|
||||
"mg_mrhs_list",
|
||||
default=16,
|
||||
multi=True,
|
||||
description="The list of multi-rhs sizes that get compiled",
|
||||
)
|
||||
variant(
|
||||
"mg_nvec_list",
|
||||
default="6,24,32",
|
||||
multi=True,
|
||||
description="The list of null space vector sizes that get compiled",
|
||||
)
|
||||
|
||||
# dependencies
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("cuda", when="+cuda")
|
||||
depends_on("nvshmem", when="+nvshmem")
|
||||
depends_on("gdrcopy", when="+nvshmem")
|
||||
with when("+rocm"):
|
||||
depends_on("hip")
|
||||
depends_on("hipblas")
|
||||
depends_on("hipfft")
|
||||
depends_on("hiprand")
|
||||
depends_on("hipcub")
|
||||
|
||||
conflicts("+qmp +mpi", msg="Specifying both QMP and MPI might result in undefined behavior")
|
||||
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")
|
||||
conflicts("~cuda ~rocm", msg="Either CUDA or ROCm support is required")
|
||||
conflicts("cuda_arch=none", when="+cuda", msg="Please indicate a cuda_arch value")
|
||||
conflicts(
|
||||
"+nvshmem", when="~mpi ~qmp", msg="NVSHMEM requires either +mpi or +qmp to be enabled"
|
||||
)
|
||||
|
||||
# CMAKE_BUILD_TYPE
|
||||
variant(
|
||||
"build_type",
|
||||
default="STRICT",
|
||||
description="The build type to build",
|
||||
values=("STRICT", "RELEASE", "DEVEL", "DEBUG", "HOSTDEBUG", "SANITIZE"),
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
if self.spec.satisfies("+cuda"):
|
||||
target = "CUDA"
|
||||
cuda_archs = self.spec.variants["cuda_arch"].value
|
||||
arch = " ".join(f"sm_{i}" for i in cuda_archs)
|
||||
elif self.spec.satisfies("+rocm"):
|
||||
target = "HIP"
|
||||
arch = self.spec.variants["amdgpu_target"].value
|
||||
|
||||
args = [
|
||||
self.define("QUDA_BUILD_ALL_TESTS", False),
|
||||
self.define("QUDA_TARGET_TYPE", target),
|
||||
self.define("QUDA_GPU_ARCH", arch),
|
||||
self.define("QUDA_PRECISION", 14),
|
||||
self.define("QUDA_RECONSTRUCT", 7),
|
||||
self.define("QUDA_DOWNLOAD_USQCD", False),
|
||||
self.define("QUDA_DIRAC_DEFAULT_OFF", True),
|
||||
self.define_from_variant("QUDA_DIRAC_CLOVER", "clover"),
|
||||
self.define_from_variant("QUDA_DIRAC_CLOVER_HASENBUSCH", "clover_hasenbusch"),
|
||||
self.define_from_variant("QUDA_DIRAC_DOMAIN_WALL", "domain_wall"),
|
||||
self.define_from_variant("QUDA_DIRAC_LAPLACE", "laplace"),
|
||||
self.define_from_variant("QUDA_DIRAC_NDEG_TWISTED_CLOVER", "ndeg_twisted_clover"),
|
||||
self.define_from_variant("QUDA_DIRAC_NDEG_TWISTED_MASS", "ndeg_twisted_mass"),
|
||||
self.define_from_variant("QUDA_DIRAC_STAGGERED", "staggered"),
|
||||
self.define_from_variant("QUDA_DIRAC_TWISTED_CLOVER", "twisted_clover"),
|
||||
self.define_from_variant("QUDA_DIRAC_TWISTED_MASS", "twisted_mass"),
|
||||
self.define_from_variant("QUDA_DIRAC_WILSON", "wilson"),
|
||||
self.define_from_variant("QUDA_MPI", "mpi"),
|
||||
self.define_from_variant("QUDA_QMP", "qmp"),
|
||||
self.define_from_variant("QUDA_QIO", "qio"),
|
||||
self.define_from_variant("QUDA_INTERFACE_OPENQCD", "openqcd"),
|
||||
self.define_from_variant("QUDA_INTERFACE_MILC", "milc"),
|
||||
self.define_from_variant("QUDA_INTERFACE_QDP", "qdp"),
|
||||
self.define_from_variant("QUDA_INTERFACE_BQCD", "bqcd"),
|
||||
self.define_from_variant("QUDA_INTERFACE_CPS", "cps"),
|
||||
self.define_from_variant("QUDA_INTERFACE_QDPJIT", "qdpjit"),
|
||||
self.define_from_variant("QUDA_INTERFACE_TIFR", "tifr"),
|
||||
self.define_from_variant("QUDA_MULTIGRID", "multigrid"),
|
||||
self.define_from_variant("QUDA_NVSHMEM", "nvshmem"),
|
||||
]
|
||||
if self.spec.satisfies("+multigrid"):
|
||||
args.append(
|
||||
self.define(
|
||||
"QUDA_MULTIGRID_NVEC_LIST", ",".join(self.spec.variants["mg_nvec_list"].value)
|
||||
)
|
||||
)
|
||||
args.append(
|
||||
self.define(
|
||||
"QUDA_MULTIGRID_MRHS_LIST", ",".join(self.spec.variants["mg_mrhs_list"].value)
|
||||
)
|
||||
)
|
||||
|
||||
if self.spec.satisfies("+nvshmem"):
|
||||
args.append(self.define("QUDA_NVSHMEM_HOME", self.spec["nvshmem"].prefix))
|
||||
args.append(self.define("QUDA_GDRCOPY_HOME", self.spec["gdrcopy"].prefix))
|
||||
|
||||
if self.spec.satisfies("+cuda"):
|
||||
args.append(self.define("QUDA_GPU_ARCH_SUFFIX", "real")) # real or virtual
|
||||
elif self.spec.satisfies("+rocm"):
|
||||
args.append(self.define("CMAKE_C_COMPILER", self.spec["hip"].hipcc))
|
||||
args.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
|
||||
# args.append(self.define("ROCM_PATH", self.spec["hip"].prefix))
|
||||
|
||||
# required when building on a machine with no AMD GPU present
|
||||
args.append(self.define("AMDGPU_TARGETS", arch))
|
||||
|
||||
# suppress _GLIBCXX17_DEPRECATED warnings when compiling c++17
|
||||
args.append(self.define("CMAKE_CXX_FLAGS", "-Wno-deprecated-declarations"))
|
||||
return args
|
@@ -10,12 +10,15 @@ class Rclone(GoPackage):
|
||||
to and from various cloud storage providers"""
|
||||
|
||||
homepage = "https://rclone.org"
|
||||
url = "https://github.com/rclone/rclone/releases/download/v1.57.0/rclone-v1.57.0.tar.gz"
|
||||
url = "https://github.com/rclone/rclone/releases/download/v1.69.1/rclone-v1.69.1.tar.gz"
|
||||
|
||||
maintainers("alecbcs")
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("1.69.1", sha256="02ea0fa75c0895b14153a7faf7b1a1273224c4782e6deeb60a366a48786e0722")
|
||||
version("1.69.0", sha256="45e6a329af4f98e0c71233511ab8543e454eaa22adeeb73179bfdb22456a2123")
|
||||
version("1.68.2", sha256="2a16f040e824d4ba4ec9c1c395d891af7aa7bf08fd5251b8e28d017157cee925")
|
||||
version("1.68.1", sha256="c5d45b83dd008d08a0903eebf1578a11a40a77152226e22ce5e9287b9db05579")
|
||||
version("1.65.2", sha256="1305c913ac3684d02ce2bade0a23a2115c1ec03c9447d1562bb6cd9fa2573412")
|
||||
version("1.65.1", sha256="904b906cc465dd679a00487497e3891d33fca6b6e25c184400bccfb248344f39")
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
class SingularityBase(MakefilePackage):
|
||||
variant("suid", default=True, description="install SUID binary")
|
||||
variant("suid", default=False, description="install SUID binary")
|
||||
variant("network", default=True, description="install network plugins")
|
||||
|
||||
depends_on("pkgconfig", type="build")
|
||||
|
@@ -28,6 +28,7 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage):
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("1.40", sha256="0d783e6c1fff096d37c4e0fd1f3f14f63c4fdc5c1cf8ec07db2a349ffd56a1d3")
|
||||
version("1.39", sha256="42c16435dfc83f320ff727b6d446bb0d4feb361dc11796a2c5d3c0fb6532a517")
|
||||
version("1.38", sha256="a6069948458a1d86cea2b33a9735e67d7524118c32c388d75efb881a9e9d2cd9")
|
||||
version("1.37", sha256="c3b215084eb4cf318415533554c2c2714e58ed75847d7c3a8e50923215ffbbf3")
|
||||
|
@@ -18,6 +18,9 @@ class XcbUtilCursor(AutotoolsPackage, XorgPackage):
|
||||
|
||||
license("MIT")
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
version("0.1.5", sha256="0caf99b0d60970f81ce41c7ba694e5eaaf833227bb2cbcdb2f6dc9666a663c57")
|
||||
version("0.1.4", sha256="28dcfe90bcab7b3561abe0dd58eb6832aa9cc77cfe42fcdfa4ebe20d605231fb")
|
||||
version(
|
||||
"0.1.3",
|
||||
|
@@ -0,0 +1,11 @@
|
||||
--- a/extern/remap/src/earcut.hpp 2025-01-22 11:42:31.097755822 -0500
|
||||
+++ b/extern/remap/src/earcut.hpp 2025-01-22 11:44:00.022637783 -0500
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
//#include <tuple>
|
||||
-//#include <cstdint>
|
||||
+#include <cstdint>
|
||||
//#include <cstddef>
|
||||
|
||||
namespace mapbox {
|
@@ -12,16 +12,28 @@ class Xios(Package):
|
||||
"""XML-IO-SERVER library for IO management of climate models."""
|
||||
|
||||
homepage = "https://forge.ipsl.jussieu.fr/ioserver/wiki"
|
||||
|
||||
version("develop", svn="http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk")
|
||||
version(
|
||||
"2.5", revision=1860, svn="http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5"
|
||||
"2.6",
|
||||
revision=2714,
|
||||
svn="https://forge.ipsl.jussieu.fr/ioserver/svn/XIOS2/branches/xios-2.6",
|
||||
)
|
||||
version(
|
||||
"2.0", revision=1627, svn="http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.0"
|
||||
"2.5",
|
||||
revision=1860,
|
||||
svn="https://forge.ipsl.jussieu.fr/ioserver/svn/XIOS2/branches/xios-2.5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.0", revision=910, svn="http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-1.0"
|
||||
"2.0",
|
||||
revision=1627,
|
||||
svn="https://forge.ipsl.jussieu.fr/ioserver/svn/XIOS2/branches/xios-2.0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.0",
|
||||
revision=910,
|
||||
svn="http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-1.0",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant(
|
||||
@@ -37,10 +49,14 @@ class Xios(Package):
|
||||
patch("bld_extern_1.0.patch", when="@:1.0")
|
||||
|
||||
# Workaround bug #17782 in llvm, where reading a double
|
||||
# followed by a character is broken (e.g. duration '1d'):
|
||||
# followed by a character is broken (e.g. duration '1d')
|
||||
# https://bugs.llvm.org/show_bug.cgi?id=17782
|
||||
# Verified and still needed 2025-02-18
|
||||
patch("llvm_bug_17782.patch", when="@1.1: %apple-clang")
|
||||
patch("llvm_bug_17782.patch", when="@1.1: %clang")
|
||||
|
||||
patch("earcut_missing_include_2.6.patch", when="@2.6:")
|
||||
|
||||
depends_on("netcdf-c+mpi")
|
||||
depends_on("netcdf-fortran")
|
||||
depends_on("hdf5+mpi")
|
||||
@@ -131,7 +147,7 @@ def xios_fcm(self):
|
||||
%FCOMPILER {MPIFC}
|
||||
%LINKER {MPIFC}
|
||||
|
||||
%BASE_CFLAGS -ansi -w -D_GLIBCXX_USE_CXX11_ABI=0 \
|
||||
%BASE_CFLAGS -std=c++11 -w -D_GLIBCXX_USE_CXX11_ABI=0 \
|
||||
-I{BOOST_INC_DIR} -I{BLITZ_INC_DIR}
|
||||
%PROD_CFLAGS -O3 -DBOOST_DISABLE_ASSERTS
|
||||
%DEV_CFLAGS -g -O2
|
||||
@@ -202,6 +218,8 @@ def install(self, spec, prefix):
|
||||
"--%s" % spec.variants["mode"].value,
|
||||
"--arch",
|
||||
"SPACK",
|
||||
"--use_extern_boost",
|
||||
"--use_extern_blitz",
|
||||
"--netcdf_lib",
|
||||
"netcdf4_par",
|
||||
"--job",
|
||||
|
Reference in New Issue
Block a user