Compare commits

..

3 Commits

Author SHA1 Message Date
Adrien M. BERNEDE
0301896bf1 Apply fix suggested by @becker33 to copy over relatives includes at env creation 2025-01-21 11:43:17 +01:00
Adrien M. BERNEDE
d6334f7d39 Revert "Test a change @becker33 suggested to work around issue"
This reverts commit ca65fff09a.
2025-01-21 11:42:09 +01:00
Adrien M. BERNEDE
ca65fff09a Test a change @becker33 suggested to work around issue 2025-01-15 10:40:26 +01:00
100 changed files with 405 additions and 859 deletions

View File

@@ -2125,9 +2125,10 @@ def fetch_url_to_mirror(url):
def dedupe_hardlinks_if_necessary(root, buildinfo):
"""Updates a buildinfo dict for old archives that did not dedupe hardlinks. De-duping hardlinks
is necessary when relocating files in parallel and in-place. This means we must preserve inodes
when relocating."""
"""Updates a buildinfo dict for old archives that did
not dedupe hardlinks. De-duping hardlinks is necessary
when relocating files in parallel and in-place. This
means we must preserve inodes when relocating."""
# New archives don't need this.
if buildinfo.get("hardlinks_deduped", False):
@@ -2156,46 +2157,69 @@ def dedupe_hardlinks_if_necessary(root, buildinfo):
buildinfo[key] = new_list
def relocate_package(spec: spack.spec.Spec) -> None:
"""Relocate binaries and text files in the given spec prefix, based on its buildinfo file."""
buildinfo = read_buildinfo_file(spec.prefix)
old_layout_root = str(buildinfo["buildpath"])
def relocate_package(spec):
"""
Relocate the given package
"""
workdir = str(spec.prefix)
buildinfo = read_buildinfo_file(workdir)
new_layout_root = str(spack.store.STORE.layout.root)
new_prefix = str(spec.prefix)
new_rel_prefix = str(os.path.relpath(new_prefix, new_layout_root))
new_spack_prefix = str(spack.paths.prefix)
# Warn about old style tarballs created with the --rel flag (removed in Spack v0.20)
old_sbang_install_path = None
if "sbang_install_path" in buildinfo:
old_sbang_install_path = str(buildinfo["sbang_install_path"])
old_layout_root = str(buildinfo["buildpath"])
old_spack_prefix = str(buildinfo.get("spackprefix"))
old_rel_prefix = buildinfo.get("relative_prefix")
old_prefix = os.path.join(old_layout_root, old_rel_prefix)
# Warn about old style tarballs created with the now removed --rel flag.
if buildinfo.get("relative_rpaths", False):
tty.warn(
f"Tarball for {spec} uses relative rpaths, which can cause library loading issues."
f"Tarball for {spec} uses relative rpaths, " "which can cause library loading issues."
)
# In Spack 0.19 and older prefix_to_hash was the default and externals were not dropped, so
# prefixes were not unique.
# In the past prefix_to_hash was the default and externals were not dropped, so prefixes
# were not unique.
if "hash_to_prefix" in buildinfo:
hash_to_old_prefix = buildinfo["hash_to_prefix"]
elif "prefix_to_hash" in buildinfo:
hash_to_old_prefix = {v: k for (k, v) in buildinfo["prefix_to_hash"].items()}
hash_to_old_prefix = dict((v, k) for (k, v) in buildinfo["prefix_to_hash"].items())
else:
raise NewLayoutException(
"Package tarball was created from an install prefix with a different directory layout "
"and an older buildcache create implementation. It cannot be relocated."
)
hash_to_old_prefix = dict()
prefix_to_prefix = {}
if old_rel_prefix != new_rel_prefix and not hash_to_old_prefix:
msg = "Package tarball was created from an install "
msg += "prefix with a different directory layout and an older "
msg += "buildcache create implementation. It cannot be relocated."
raise NewLayoutException(msg)
if "sbang_install_path" in buildinfo:
old_sbang_install_path = str(buildinfo["sbang_install_path"])
prefix_to_prefix[old_sbang_install_path] = spack.hooks.sbang.sbang_install_path()
# Spurious replacements (e.g. sbang) will cause issues with binaries
# For example, the new sbang can be longer than the old one.
# Hence 2 dictionaries are maintained here.
prefix_to_prefix_text = collections.OrderedDict()
prefix_to_prefix_bin = collections.OrderedDict()
# First match specific prefix paths. Possibly the *local* install prefix of some dependency is
# in an upstream, so we cannot assume the original spack store root can be mapped uniformly to
# the new spack store root.
if old_sbang_install_path:
install_path = spack.hooks.sbang.sbang_install_path()
prefix_to_prefix_text[old_sbang_install_path] = install_path
# If the spec is spliced, we need to handle the simultaneous mapping from the old install_tree
# to the new install_tree and from the build_spec to the spliced spec. Because foo.build_spec
# is foo for any non-spliced spec, we can simplify by checking for spliced-in nodes by checking
# for nodes not in the build_spec without any explicit check for whether the spec is spliced.
# An analog in this algorithm is any spec that shares a name or provides the same virtuals in
# the context of the relevant root spec. This ensures that the analog for a spec s is the spec
# that s replaced when we spliced.
# First match specific prefix paths. Possibly the *local* install prefix
# of some dependency is in an upstream, so we cannot assume the original
# spack store root can be mapped uniformly to the new spack store root.
#
# If the spec is spliced, we need to handle the simultaneous mapping
# from the old install_tree to the new install_tree and from the build_spec
# to the spliced spec.
# Because foo.build_spec is foo for any non-spliced spec, we can simplify
# by checking for spliced-in nodes by checking for nodes not in the build_spec
# without any explicit check for whether the spec is spliced.
# An analog in this algorithm is any spec that shares a name or provides the same virtuals
# in the context of the relevant root spec. This ensures that the analog for a spec s
# is the spec that s replaced when we spliced.
relocation_specs = specs_to_relocate(spec)
build_spec_ids = set(id(s) for s in spec.build_spec.traverse(deptype=dt.ALL & ~dt.BUILD))
for s in relocation_specs:
@@ -2215,48 +2239,72 @@ def relocate_package(spec: spack.spec.Spec) -> None:
lookup_dag_hash = analog.dag_hash()
if lookup_dag_hash in hash_to_old_prefix:
old_dep_prefix = hash_to_old_prefix[lookup_dag_hash]
prefix_to_prefix[old_dep_prefix] = str(s.prefix)
prefix_to_prefix_bin[old_dep_prefix] = str(s.prefix)
prefix_to_prefix_text[old_dep_prefix] = str(s.prefix)
# Only then add the generic fallback of install prefix -> install prefix.
prefix_to_prefix[old_layout_root] = str(spack.store.STORE.layout.root)
prefix_to_prefix_text[old_prefix] = new_prefix
prefix_to_prefix_bin[old_prefix] = new_prefix
prefix_to_prefix_text[old_layout_root] = new_layout_root
prefix_to_prefix_bin[old_layout_root] = new_layout_root
# Delete identity mappings from prefix_to_prefix
prefix_to_prefix = {k: v for k, v in prefix_to_prefix.items() if k != v}
# This is vestigial code for the *old* location of sbang. Previously,
# sbang was a bash script, and it lived in the spack prefix. It is
# now a POSIX script that lives in the install prefix. Old packages
# will have the old sbang location in their shebangs.
orig_sbang = "#!/bin/bash {0}/bin/sbang".format(old_spack_prefix)
new_sbang = spack.hooks.sbang.sbang_shebang_line()
prefix_to_prefix_text[orig_sbang] = new_sbang
# If there's nothing to relocate, we're done.
if not prefix_to_prefix:
return
for old, new in prefix_to_prefix.items():
tty.debug(f"Relocating: {old} => {new}.")
tty.debug("Relocating package from", "%s to %s." % (old_layout_root, new_layout_root))
# Old archives may have hardlinks repeated.
dedupe_hardlinks_if_necessary(spec.prefix, buildinfo)
dedupe_hardlinks_if_necessary(workdir, buildinfo)
# Text files containing the prefix text
textfiles = [os.path.join(spec.prefix, f) for f in buildinfo["relocate_textfiles"]]
binaries = [os.path.join(spec.prefix, f) for f in buildinfo.get("relocate_binaries")]
links = [os.path.join(spec.prefix, f) for f in buildinfo.get("relocate_links", [])]
text_names = [os.path.join(workdir, f) for f in buildinfo["relocate_textfiles"]]
platform = spack.platforms.by_name(spec.platform)
if "macho" in platform.binary_formats:
relocate.relocate_macho_binaries(binaries, prefix_to_prefix)
elif "elf" in platform.binary_formats:
relocate.relocate_elf_binaries(binaries, prefix_to_prefix)
# If we are not installing back to the same install tree do the relocation
if old_prefix != new_prefix:
files_to_relocate = [
os.path.join(workdir, filename) for filename in buildinfo.get("relocate_binaries")
]
# If the buildcache was not created with relativized rpaths
# do the relocation of path in binaries
platform = spack.platforms.by_name(spec.platform)
if "macho" in platform.binary_formats:
relocate.relocate_macho_binaries(files_to_relocate, prefix_to_prefix_bin)
elif "elf" in platform.binary_formats:
# The new ELF dynamic section relocation logic only handles absolute to
# absolute relocation.
relocate.relocate_elf_binaries(files_to_relocate, prefix_to_prefix_bin)
relocate.relocate_links(links, prefix_to_prefix)
relocate.relocate_text(textfiles, prefix_to_prefix)
changed_files = relocate.relocate_text_bin(binaries, prefix_to_prefix)
# Relocate links to the new install prefix
links = [os.path.join(workdir, f) for f in buildinfo.get("relocate_links", [])]
relocate.relocate_links(links, prefix_to_prefix_bin)
# Add ad-hoc signatures to patched macho files when on macOS.
if "macho" in platform.binary_formats and sys.platform == "darwin":
codesign = which("codesign")
if not codesign:
return
for binary in changed_files:
# preserve the original inode by running codesign on a copy
with fsys.edit_in_place_through_temporary_file(binary) as tmp_binary:
codesign("-fs-", tmp_binary)
# For all buildcaches
# relocate the install prefixes in text files including dependencies
relocate.relocate_text(text_names, prefix_to_prefix_text)
# relocate the install prefixes in binary files including dependencies
changed_files = relocate.relocate_text_bin(files_to_relocate, prefix_to_prefix_bin)
# Add ad-hoc signatures to patched macho files when on macOS.
if "macho" in platform.binary_formats and sys.platform == "darwin":
codesign = which("codesign")
if not codesign:
return
for binary in changed_files:
# preserve the original inode by running codesign on a copy
with fsys.edit_in_place_through_temporary_file(binary) as tmp_binary:
codesign("-fs-", tmp_binary)
# If we are installing back to the same location
# relocate the sbang location if the spack directory changed
else:
if old_spack_prefix != new_spack_prefix:
relocate.relocate_text(text_names, prefix_to_prefix_text)
def _extract_inner_tarball(spec, filename, extract_to, signature_required: bool, remote_checksum):

View File

@@ -44,19 +44,7 @@
from enum import Flag, auto
from itertools import chain
from multiprocessing.connection import Connection
from typing import (
Callable,
Dict,
List,
Optional,
Sequence,
Set,
TextIO,
Tuple,
Type,
Union,
overload,
)
from typing import Callable, Dict, List, Optional, Set, Tuple
import archspec.cpu
@@ -158,128 +146,48 @@ def get_effective_jobs(jobs, parallel=True, supports_jobserver=False):
class MakeExecutable(Executable):
"""Special callable executable object for make so the user can specify parallelism options
on a per-invocation basis.
"""Special callable executable object for make so the user can specify
parallelism options on a per-invocation basis. Specifying
'parallel' to the call will override whatever the package's
global setting is, so you can either default to true or false and
override particular calls. Specifying 'jobs_env' to a particular
call will name an environment variable which will be set to the
parallelism level (without affecting the normal invocation with
-j).
"""
def __init__(self, name: str, *, jobs: int, supports_jobserver: bool = True) -> None:
super().__init__(name)
def __init__(self, name, jobs, **kwargs):
supports_jobserver = kwargs.pop("supports_jobserver", True)
super().__init__(name, **kwargs)
self.supports_jobserver = supports_jobserver
self.jobs = jobs
@overload
def __call__(
self,
*args: str,
parallel: bool = ...,
jobs_env: Optional[str] = ...,
jobs_env_supports_jobserver: bool = ...,
fail_on_error: bool = ...,
ignore_errors: Union[int, Sequence[int]] = ...,
ignore_quotes: Optional[bool] = ...,
timeout: Optional[int] = ...,
env: Optional[Union[Dict[str, str], EnvironmentModifications]] = ...,
extra_env: Optional[Union[Dict[str, str], EnvironmentModifications]] = ...,
input: Optional[TextIO] = ...,
output: Union[Optional[TextIO], str] = ...,
error: Union[Optional[TextIO], str] = ...,
_dump_env: Optional[Dict[str, str]] = ...,
) -> None: ...
@overload
def __call__(
self,
*args: str,
parallel: bool = ...,
jobs_env: Optional[str] = ...,
jobs_env_supports_jobserver: bool = ...,
fail_on_error: bool = ...,
ignore_errors: Union[int, Sequence[int]] = ...,
ignore_quotes: Optional[bool] = ...,
timeout: Optional[int] = ...,
env: Optional[Union[Dict[str, str], EnvironmentModifications]] = ...,
extra_env: Optional[Union[Dict[str, str], EnvironmentModifications]] = ...,
input: Optional[TextIO] = ...,
output: Union[Type[str], Callable] = ...,
error: Union[Optional[TextIO], str, Type[str], Callable] = ...,
_dump_env: Optional[Dict[str, str]] = ...,
) -> str: ...
@overload
def __call__(
self,
*args: str,
parallel: bool = ...,
jobs_env: Optional[str] = ...,
jobs_env_supports_jobserver: bool = ...,
fail_on_error: bool = ...,
ignore_errors: Union[int, Sequence[int]] = ...,
ignore_quotes: Optional[bool] = ...,
timeout: Optional[int] = ...,
env: Optional[Union[Dict[str, str], EnvironmentModifications]] = ...,
extra_env: Optional[Union[Dict[str, str], EnvironmentModifications]] = ...,
input: Optional[TextIO] = ...,
output: Union[Optional[TextIO], str, Type[str], Callable] = ...,
error: Union[Type[str], Callable] = ...,
_dump_env: Optional[Dict[str, str]] = ...,
) -> str: ...
def __call__(
self,
*args: str,
parallel: bool = True,
jobs_env: Optional[str] = None,
jobs_env_supports_jobserver: bool = False,
**kwargs,
) -> Optional[str]:
"""Runs this "make" executable in a subprocess.
Args:
parallel: if False, parallelism is disabled
jobs_env: environment variable that will be set to the current level of parallelism
jobs_env_supports_jobserver: whether the jobs env supports a job server
For all the other **kwargs, refer to the base class.
def __call__(self, *args, **kwargs):
"""parallel, and jobs_env from kwargs are swallowed and used here;
remaining arguments are passed through to the superclass.
"""
parallel = kwargs.pop("parallel", True)
jobs_env = kwargs.pop("jobs_env", None)
jobs_env_supports_jobserver = kwargs.pop("jobs_env_supports_jobserver", False)
jobs = get_effective_jobs(
self.jobs, parallel=parallel, supports_jobserver=self.supports_jobserver
)
if jobs is not None:
args = (f"-j{jobs}",) + args
args = ("-j{0}".format(jobs),) + args
if jobs_env:
# Caller wants us to set an environment variable to control the parallelism
# Caller wants us to set an environment variable to
# control the parallelism.
jobs_env_jobs = get_effective_jobs(
self.jobs, parallel=parallel, supports_jobserver=jobs_env_supports_jobserver
)
if jobs_env_jobs is not None:
extra_env = kwargs.setdefault("extra_env", {})
extra_env.update({jobs_env: str(jobs_env_jobs)})
kwargs["extra_env"] = {jobs_env: str(jobs_env_jobs)}
return super().__call__(*args, **kwargs)
class UndeclaredDependencyError(spack.error.SpackError):
"""Raised if a dependency is invoking an executable through a module global, without
declaring a dependency on it.
"""
class DeprecatedExecutable:
def __init__(self, pkg: str, exe: str, exe_pkg: str) -> None:
self.pkg = pkg
self.exe = exe
self.exe_pkg = exe_pkg
def __call__(self, *args, **kwargs):
raise UndeclaredDependencyError(
f"{self.pkg} is using {self.exe} without declaring a dependency on {self.exe_pkg}"
)
def add_default_env(self, key: str, value: str):
self.__call__()
def clean_environment():
# Stuff in here sanitizes the build environment to eliminate
# anything the user has set that may interfere. We apply it immediately
@@ -713,9 +621,10 @@ def set_package_py_globals(pkg, context: Context = Context.BUILD):
module.std_meson_args = spack.build_systems.meson.MesonBuilder.std_args(pkg)
module.std_pip_args = spack.build_systems.python.PythonPipBuilder.std_args(pkg)
module.make = DeprecatedExecutable(pkg.name, "make", "gmake")
module.gmake = DeprecatedExecutable(pkg.name, "gmake", "gmake")
module.ninja = DeprecatedExecutable(pkg.name, "ninja", "ninja")
# TODO: make these build deps that can be installed if not found.
module.make = MakeExecutable("make", jobs)
module.gmake = MakeExecutable("gmake", jobs)
module.ninja = MakeExecutable("ninja", jobs, supports_jobserver=False)
# TODO: johnwparent: add package or builder support to define these build tools
# for now there is no entrypoint for builders to define these on their
# own

View File

@@ -27,7 +27,6 @@ class QMakePackage(spack.package_base.PackageBase):
build_system("qmake")
depends_on("qmake", type="build", when="build_system=qmake")
depends_on("gmake", type="build")
@spack.builder.builder("qmake")

View File

@@ -94,7 +94,7 @@ def list_url(cls):
if cls.cran:
return f"https://cloud.r-project.org/src/contrib/Archive/{cls.cran}/"
@lang.classproperty
def git(cls):
if cls.bioc:
return f"https://git.bioconductor.org/packages/{cls.bioc}"
@property
def git(self):
if self.bioc:
return f"https://git.bioconductor.org/packages/{self.bioc}"

View File

@@ -2634,6 +2634,29 @@ def _ensure_env_dir():
shutil.copy(envfile, target_manifest)
# Copy relative path includes that live inside the environment dir
try:
manifest = EnvironmentManifestFile(environment_dir)
except Exception as e:
msg = f"cannot initialize environment, '{environment_dir}' from manifest"
raise SpackEnvironmentError(msg) from e
else:
includes = manifest[TOP_LEVEL_KEY].get("include", [])
for include in includes:
if os.path.isabs(include):
continue
abspath = pathlib.Path(os.path.normpath(environment_dir / include))
if not abspath.is_relative_to(environment_dir):
# Warn that we are not copying relative path
msg = "Spack will not copy relative include path from outside environment"
msg += f" directory: {include}"
tty.warn(msg)
continue
orig_abspath = os.path.normpath(envfile.parent / include)
shutil.copy(orig_abspath, abspath)
class EnvironmentManifestFile(collections.abc.Mapping):
"""Manages the in-memory representation of a manifest file, and its synchronization

View File

@@ -35,6 +35,7 @@
import spack.config
import spack.directory_layout
import spack.paths
import spack.projections
import spack.relocate
import spack.schema.projections
@@ -43,6 +44,7 @@
import spack.util.spack_json as s_json
import spack.util.spack_yaml as s_yaml
from spack.error import SpackError
from spack.hooks import sbang
__all__ = ["FilesystemView", "YamlFilesystemView"]
@@ -92,6 +94,12 @@ def view_copy(
spack.relocate.relocate_text_bin(binaries=[dst], prefixes=prefix_to_projection)
else:
prefix_to_projection[spack.store.STORE.layout.root] = view._root
# This is vestigial code for the *old* location of sbang.
prefix_to_projection[f"#!/bin/bash {spack.paths.spack_root}/bin/sbang"] = (
sbang.sbang_shebang_line()
)
spack.relocate.relocate_text(files=[dst], prefixes=prefix_to_projection)
# The os module on Windows does not have a chown function.

View File

@@ -1819,6 +1819,12 @@ def _has_make_target(self, target):
Returns:
bool: True if 'target' is found, else False
"""
# Prevent altering LC_ALL for 'make' outside this function
make = copy.deepcopy(self.module.make)
# Use English locale for missing target message comparison
make.add_default_env("LC_ALL", "C")
# Check if we have a Makefile
for makefile in ["GNUmakefile", "Makefile", "makefile"]:
if os.path.exists(makefile):
@@ -1827,12 +1833,6 @@ def _has_make_target(self, target):
tty.debug("No Makefile found in the build directory")
return False
# Prevent altering LC_ALL for 'make' outside this function
make = copy.deepcopy(self.module.make)
# Use English locale for missing target message comparison
make.add_default_env("LC_ALL", "C")
# Check if 'target' is a valid target.
#
# `make -n target` performs a "dry run". It prints the commands that

View File

@@ -36,13 +36,13 @@
import spack.oci.image
import spack.paths
import spack.spec
import spack.stage
import spack.store
import spack.util.gpg
import spack.util.spack_yaml as syaml
import spack.util.url as url_util
import spack.util.web as web_util
from spack.binary_distribution import CannotListKeys, GenerateIndexError
from spack.installer import PackageInstaller
from spack.paths import test_path
from spack.spec import Spec
@@ -492,40 +492,74 @@ def mock_list_url(url, recursive=False):
assert f"Encountered problem listing packages at {url}" in capfd.readouterr().err
def test_update_sbang(tmp_path, temporary_mirror, mock_fetch, install_mockery):
"""Test relocation of the sbang shebang line in a package script"""
s = Spec("old-sbang").concretized()
PackageInstaller([s.package]).install()
old_prefix, old_sbang_shebang = s.prefix, sbang.sbang_shebang_line()
old_contents = f"""\
{old_sbang_shebang}
#!/usr/bin/env python3
@pytest.mark.usefixtures("mock_fetch", "install_mockery")
def test_update_sbang(tmpdir, temporary_mirror):
"""Test the creation and installation of buildcaches with default rpaths
into the non-default directory layout scheme, triggering an update of the
sbang.
"""
spec_str = "old-sbang"
# Concretize a package with some old-fashioned sbang lines.
old_spec = Spec(spec_str).concretized()
old_spec_hash_str = "/{0}".format(old_spec.dag_hash())
{s.prefix.bin}
"""
with open(os.path.join(s.prefix.bin, "script.sh"), encoding="utf-8") as f:
assert f.read() == old_contents
# Need a fake mirror with *function* scope.
mirror_dir = temporary_mirror
# Assume all commands will concretize old_spec the same way.
install_cmd("--no-cache", old_spec.name)
# Create a buildcache with the installed spec.
buildcache_cmd("push", "--update-index", "--unsigned", temporary_mirror, f"/{s.dag_hash()}")
buildcache_cmd("push", "-u", mirror_dir, old_spec_hash_str)
# Need to force an update of the buildcache index
buildcache_cmd("update-index", mirror_dir)
# Uninstall the original package.
uninstall_cmd("-y", old_spec_hash_str)
# Switch the store to the new install tree locations
with spack.store.use_store(str(tmp_path)):
s._prefix = None # clear the cached old prefix
new_prefix, new_sbang_shebang = s.prefix, sbang.sbang_shebang_line()
assert old_prefix != new_prefix
assert old_sbang_shebang != new_sbang_shebang
PackageInstaller([s.package], cache_only=True, unsigned=True).install()
newtree_dir = tmpdir.join("newtree")
with spack.store.use_store(str(newtree_dir)):
new_spec = Spec("old-sbang").concretized()
assert new_spec.dag_hash() == old_spec.dag_hash()
# Check that the sbang line refers to the new install tree
new_contents = f"""\
{sbang.sbang_shebang_line()}
#!/usr/bin/env python3
# Install package from buildcache
buildcache_cmd("install", "-u", "-f", new_spec.name)
{s.prefix.bin}
"""
with open(os.path.join(s.prefix.bin, "script.sh"), encoding="utf-8") as f:
assert f.read() == new_contents
# Continue blowing away caches
bindist.clear_spec_cache()
spack.stage.purge()
# test that the sbang was updated by the move
sbang_style_1_expected = """{0}
#!/usr/bin/env python
{1}
""".format(
sbang.sbang_shebang_line(), new_spec.prefix.bin
)
sbang_style_2_expected = """{0}
#!/usr/bin/env python
{1}
""".format(
sbang.sbang_shebang_line(), new_spec.prefix.bin
)
installed_script_style_1_path = new_spec.prefix.bin.join("sbang-style-1.sh")
assert (
sbang_style_1_expected
== open(str(installed_script_style_1_path), encoding="utf-8").read()
)
installed_script_style_2_path = new_spec.prefix.bin.join("sbang-style-2.sh")
assert (
sbang_style_2_expected
== open(str(installed_script_style_2_path), encoding="utf-8").read()
)
uninstall_cmd("-y", "/%s" % new_spec.dag_hash())
@pytest.mark.skipif(

View File

@@ -20,7 +20,7 @@
import spack.paths
import spack.platforms
import spack.platforms.test
from spack.build_environment import ChildError, MakeExecutable, setup_package
from spack.build_environment import ChildError, setup_package
from spack.installer import PackageInstaller
from spack.spec import Spec
from spack.util.executable import which
@@ -29,12 +29,10 @@
@pytest.fixture()
def concretize_and_setup(default_mock_concretization, monkeypatch):
def concretize_and_setup(default_mock_concretization):
def _func(spec_str):
s = default_mock_concretization(spec_str)
setup_package(s.package, False)
monkeypatch.setattr(s.package.module, "make", MakeExecutable("make", jobs=1))
monkeypatch.setattr(s.package.module, "ninja", MakeExecutable("ninja", jobs=1))
return s
return _func

View File

@@ -29,31 +29,31 @@ def make_executable(tmp_path, working_env):
def test_make_normal():
make = MakeExecutable("make", jobs=8)
make = MakeExecutable("make", 8)
assert make(output=str).strip() == "-j8"
assert make("install", output=str).strip() == "-j8 install"
def test_make_explicit():
make = MakeExecutable("make", jobs=8)
make = MakeExecutable("make", 8)
assert make(parallel=True, output=str).strip() == "-j8"
assert make("install", parallel=True, output=str).strip() == "-j8 install"
def test_make_one_job():
make = MakeExecutable("make", jobs=1)
make = MakeExecutable("make", 1)
assert make(output=str).strip() == "-j1"
assert make("install", output=str).strip() == "-j1 install"
def test_make_parallel_false():
make = MakeExecutable("make", jobs=8)
make = MakeExecutable("make", 8)
assert make(parallel=False, output=str).strip() == "-j1"
assert make("install", parallel=False, output=str).strip() == "-j1 install"
def test_make_parallel_disabled(monkeypatch):
make = MakeExecutable("make", jobs=8)
make = MakeExecutable("make", 8)
monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "true")
assert make(output=str).strip() == "-j1"
@@ -74,7 +74,7 @@ def test_make_parallel_disabled(monkeypatch):
def test_make_parallel_precedence(monkeypatch):
make = MakeExecutable("make", jobs=8)
make = MakeExecutable("make", 8)
# These should work
monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "true")
@@ -96,21 +96,21 @@ def test_make_parallel_precedence(monkeypatch):
def test_make_jobs_env():
make = MakeExecutable("make", jobs=8)
make = MakeExecutable("make", 8)
dump_env = {}
assert make(output=str, jobs_env="MAKE_PARALLELISM", _dump_env=dump_env).strip() == "-j8"
assert dump_env["MAKE_PARALLELISM"] == "8"
def test_make_jobserver(monkeypatch):
make = MakeExecutable("make", jobs=8)
make = MakeExecutable("make", 8)
monkeypatch.setenv("MAKEFLAGS", "--jobserver-auth=X,Y")
assert make(output=str).strip() == ""
assert make(parallel=False, output=str).strip() == "-j1"
def test_make_jobserver_not_supported(monkeypatch):
make = MakeExecutable("make", jobs=8, supports_jobserver=False)
make = MakeExecutable("make", 8, supports_jobserver=False)
monkeypatch.setenv("MAKEFLAGS", "--jobserver-auth=X,Y")
# Currently fallback on default job count, Maybe it should force -j1 ?
assert make(output=str).strip() == "-j8"

View File

@@ -34,7 +34,6 @@ spack:
- celeritas +geant4 +hepmc3 +openmp +root +shared +vecgeom cxxstd=20
- dd4hep +ddalign +ddcad +ddcond +dddetectors +dddigi +ddeve +ddg4 +ddrec +edm4hep +hepmc3 +lcio +utilityapps +xercesc
- delphes +pythia8
- dpmjet
- edm4hep
- fastjet
- fjcontrib
@@ -47,25 +46,11 @@ spack:
- lhapdf +python
- madgraph5amc
- opendatadetector
- pandoramonitoring
- pandorapfa
- pandorasdk
- podio +rntuple +sio
- py-awkward
- py-boost-histogram
- py-hepunits
- py-hist
- py-histbook
- py-histoprint
- py-iminuit
- py-mplhep
- py-particle
- py-uhi
- py-uproot +lz4 +xrootd +zstd
- py-vector
- pythia8 +evtgen +fastjet +hdf5 +hepmc +hepmc3 +lhapdf ~madgraph5amc +python +rivet ~root # pythia8 and root circularly depend
- rivet hepmc=3
- root +davix +dcache +examples +fftw +fits +fortran +gdml +graphviz +gsl +http +math +minuit +mlp +mysql +opengl +postgres +pythia8 +python +r +roofit +root7 +rpath ~shadow +spectrum +sqlite +ssl +tbb +threads +tmva +unuran +vc +vdt +veccore +webgui +x +xml +xrootd
- root +davix +dcache +examples +fftw +fits +fortran +gdml +graphviz +gsl +http +math +minuit +mlp +mysql +opengl ~postgres +pythia8 +python +r +roofit +root7 +rpath ~shadow +spectrum +sqlite +ssl +tbb +threads +tmva +unuran +vc +vdt +veccore +webgui +x +xml +xrootd
- sherpa +analysis ~blackhat +gzip +hepmc3 +hepmc3root +lhapdf +lhole +openloops +pythia ~python ~recola ~rivet +root +ufo
- thepeg ~rivet
- vecgeom +gdml +geant4 +root

View File

@@ -16,8 +16,3 @@ class Gmake(Package):
def do_stage(self):
mkdirp(self.stage.source_path)
def setup_dependent_package(self, module, dspec):
module.make = MakeExecutable(
"make", jobs=determine_number_of_jobs(parallel=dspec.package.parallel)
)

View File

@@ -1,14 +1,13 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.hooks.sbang import sbang_shebang_line
import spack.paths
import spack.store
from spack.package import *
class OldSbang(Package):
"""Package for testing sbang relocation"""
"""Toy package for testing the old sbang replacement problem"""
homepage = "https://www.example.com"
url = "https://www.example.com/old-sbang.tar.gz"
@@ -17,11 +16,23 @@ class OldSbang(Package):
def install(self, spec, prefix):
mkdirp(prefix.bin)
contents = f"""\
{sbang_shebang_line()}
#!/usr/bin/env python3
{prefix.bin}
"""
with open(os.path.join(self.prefix.bin, "script.sh"), "w", encoding="utf-8") as f:
f.write(contents)
sbang_style_1 = """#!/bin/bash {0}/bin/sbang
#!/usr/bin/env python
{1}
""".format(
spack.paths.prefix, prefix.bin
)
sbang_style_2 = """#!/bin/sh {0}/bin/sbang
#!/usr/bin/env python
{1}
""".format(
spack.store.STORE.unpadded_root, prefix.bin
)
with open("%s/sbang-style-1.sh" % self.prefix.bin, "w", encoding="utf-8") as f:
f.write(sbang_style_1)
with open("%s/sbang-style-2.sh" % self.prefix.bin, "w", encoding="utf-8") as f:
f.write(sbang_style_2)

View File

@@ -424,10 +424,6 @@ class Acts(CMakePackage, CudaPackage):
for _scalar in _scalar_values:
depends_on(f"detray scalar={_scalar}", when=f"scalar={_scalar}")
# ACTS enables certain options anyway based on other options
conflicts("~svg", when="+traccc")
conflicts("~json", when="+traccc")
# ACTS has been using C++17 for a while, which precludes use of old GCC
conflicts("%gcc@:7", when="@0.23:")
# When using C++20, disable gcc 9 and lower.

View File

@@ -37,7 +37,7 @@ class BigdftChess(AutotoolsPackage, CudaPackage):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("pkgconfig", type="build")
depends_on("pkg-config", type="build")
depends_on("python@3.0:", type=("build", "run"))

View File

@@ -36,7 +36,7 @@ class BigdftCore(AutotoolsPackage, CudaPackage):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("pkgconfig", type="build")
depends_on("pkg-config", type="build")
depends_on("python@3.0:", type=("build", "run"))

View File

@@ -35,7 +35,7 @@ class BigdftPsolver(AutotoolsPackage, CudaPackage):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("pkgconfig", type="build")
depends_on("pkg-config", type="build")
depends_on("python@3.0:", type=("build", "run"))

View File

@@ -28,7 +28,7 @@ class BigdftSpred(AutotoolsPackage):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("pkgconfig", type="build")
depends_on("pkg-config", type="build")
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")

View File

@@ -29,7 +29,6 @@ class Boost(Package):
license("BSL-1.0")
version("develop", branch="develop", submodules=True)
version("1.87.0", sha256="af57be25cb4c4f4b413ed692fe378affb4352ea50fbe294a11ef548f4d527d89")
version("1.86.0", sha256="1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b")
version("1.85.0", sha256="7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617")
version("1.84.0", sha256="cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454")
@@ -288,9 +287,6 @@ def libs(self):
# boost-python in 1.72.0 broken with cxxstd=98
conflicts("cxxstd=98", when="+mpi+python @1.72.0")
# boost-mpi depends on boost-python since 1.87.0
conflicts("~python", when="+mpi @1.87.0:")
# Container's Extended Allocators were not added until 1.56.0
conflicts("+container", when="@:1.55")
@@ -444,14 +440,6 @@ def libs(self):
when="@1.82.0 platform=windows",
)
# https://github.com/boostorg/context/pull/280
patch(
"https://github.com/boostorg/context/commit/d11cbccc87da5d6d41c04f3949e18d49c43e62fc.patch?full_index=1",
sha256="e2d37f9e35e8e238977de9af32604a8e1c2648d153df1d568935a20216b5c67f",
when="@1.87.0",
working_dir="libs/context",
)
def patch(self):
# Disable SSSE3 and AVX2 when using the NVIDIA compiler
if self.spec.satisfies("%nvhpc"):

View File

@@ -25,7 +25,7 @@ class Bwa(Package):
)
depends_on("c", type="build") # generated
depends_on("gmake", type="build")
depends_on("zlib-api")
depends_on("sse2neon", when="target=aarch64:")

View File

@@ -15,7 +15,6 @@ class Cepgen(CMakePackage):
license("GPL-3.0-or-later")
version("1.2.5", sha256="5016c5a9b505035f849f47bdf35ecfb8c98d45dd1e086fae64f264a30adb120d")
version("1.1.0", sha256="2a4eaed161f007269516cbfb6e90421e657ab1922d4509de0165f08dde91bf3d")
version(
"1.0.2patch1", sha256="333bba0cb1965a98dec127e00c150eab1a515cd348a90f7b1d66d5cd8d206d21"

View File

@@ -20,7 +20,7 @@ class CgsiGsoap(CMakePackage):
depends_on("c", type="build")
depends_on("pkgconfig", type="build")
depends_on("pkg-config", type="build")
depends_on("gsoap")
depends_on("voms")
depends_on("globus-common")

View File

@@ -108,9 +108,7 @@ def pgo_train(self):
# Run spack solve --fresh hdf5 with instrumented clingo.
python_runtime_env = EnvironmentModifications()
python_runtime_env.extend(
spack.user_environment.environment_modifications_for_specs(
self.spec, set_package_py_globals=False
)
spack.user_environment.environment_modifications_for_specs(self.spec)
)
python_runtime_env.unset("SPACK_ENV")
python_runtime_env.unset("SPACK_PYTHON")

View File

@@ -30,8 +30,6 @@ class Cmake(Package):
license("BSD-3-Clause")
version("master", branch="master")
version("3.31.4", sha256="a6130bfe75f5ba5c73e672e34359f7c0a1931521957e8393a5c2922c8b0f7f25")
version("3.31.3", sha256="fac45bc6d410b49b3113ab866074888d6c9e9dc81a141874446eb239ac38cb87")
version("3.31.2", sha256="42abb3f48f37dbd739cdfeb19d3712db0c5935ed5c2aef6c340f9ae9114238a2")
version("3.31.1", sha256="c4fc2a9bd0cd5f899ccb2fb81ec422e175090bc0de5d90e906dd453b53065719")
version("3.31.0", sha256="300b71db6d69dcc1ab7c5aae61cbc1aa2778a3e00cbd918bc720203e311468c3")

View File

@@ -30,10 +30,13 @@ class Dbus(AutotoolsPackage, MesonPackage):
)
# Note: odd minor versions are unstable, keep last stable version preferred
version("1.16.0", sha256="9f8ca5eb51cbe09951aec8624b86c292990ae2428b41b856e2bed17ec65c8849")
version("1.15.12", sha256="0589c9c707dd593e31f0709caefa5828e69c668c887a7c0d2e5ba445a86bae4d")
version("1.15.10", sha256="f700f2f1d0473f11e52f3f3e179f577f31b85419f9ae1972af8c3db0bcfde178")
version("1.14.10", sha256="ba1f21d2bd9d339da2d4aa8780c09df32fea87998b73da24f49ab9df1e36a50f")
version(
"1.14.10",
sha256="ba1f21d2bd9d339da2d4aa8780c09df32fea87998b73da24f49ab9df1e36a50f",
preferred=True,
)
version("1.13.6", sha256="b533693232d36d608a09f70c15440c1816319bac3055433300d88019166c1ae4")
version("1.12.8", sha256="e2dc99e7338303393b6663a98320aba6a63421bcdaaf571c8022f815e5896eb3")
version("1.11.2", sha256="5abc4c57686fa82669ad0039830788f9b03fdc4fff487f0ccf6c9d56ba2645c9")

View File

@@ -24,9 +24,6 @@ class Dcap(AutotoolsPackage):
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("openssl")
depends_on("zlib-api")
variant("plugins", default=True, description="Build plugins")
def patch(self):

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
@@ -16,43 +17,21 @@ class Dpmjet(MakefilePackage):
maintainers("wdconinc")
license("BSD-3-Clause AND Pythia6", checked_by="wdconinc")
license("BSD-3-Clause")
version("19.3.7", sha256="4ab22fa9925031a11cf3b82fff73226011da2cf6b2662f10523bc9850f85b8a5")
version("19.3.6", sha256="9453f1428eb41d59f0c951a48763b8f386eece39c4a73bdb07e759b2c5fdd4f5")
version("19.3.5", sha256="5a546ca20f86abaecda1828eb5b577aee8a532dffb2c5e7244667d5f25777909")
version("19.3.4", sha256="646f520aa67ef6355c45cde155a5dd55f7c9d661314358a7668f6ff472f5d5f9")
version("19.3.3", sha256="4f449a36b48ff551beb4303d66bac18bebc52dbcac907f84ab7716c914ad6d8a")
version("19.2.0", sha256="0f5c1af4419e1a8fa4b46cc24ae1da98abe5c119064275e1848538fe033f02cc")
version("19.1.3", sha256="f2f7f9eee0fcd1e2770382fa6e3491418607e33de2272e04b6d75ebc97640474")
depends_on("fortran", type="build")
depends_on("python@3:", when="@:19.3.5")
build_targets = ["exe"]
depends_on("python@3:")
def edit(self, spec, prefix):
# The spack prefix paths needed to point to the data files are too long
# and need to be wrapped at the maximum column for f77 source files.
columns = 72
datadir = str(join_path(prefix, "share/dpmjet/dpmdata", ""))
datini = FileFilter("src/phojet/PHO_DATINI.f")
continuation = "\n &"
old = "^ DATDir = 'dpmdata/'"
new = f" DATDir = '{datadir}'"
new_wrapped = [new[i : i + columns] for i in range(0, len(new), columns)]
datini.filter(old, continuation.join(new_wrapped))
datini.filter("LENDir = 8", f"LENDir = {len(datadir)}")
# The python components were extracted in later versions
if spec.satisfies("@:19.3.5"):
makefile = FileFilter("Makefile")
makefile.filter(r"install: \$\(pylib\)", "install:")
makefile = FileFilter("Makefile")
makefile.filter(r"install: \$\(pylib\)", "install:")
def install(self, spec, prefix):
install_tree("bin", prefix.bin)
install_tree("lib", prefix.lib)
install_tree("include", prefix.include)
install_tree("dpmdata", prefix.share.dpmjet.dpmdata)
install_tree("examples", prefix.share.dpmjet.examples)

View File

@@ -76,7 +76,6 @@ class Edm4hep(CMakePackage):
depends_on("nlohmann-json@3.10.5:", when="@:0.99.1")
depends_on("podio@1:", when="@0.99:")
depends_on("podio@0.15:", when="@:0.10.5")
depends_on("podio@:1.1", when="@:0.99.0")
for _std in _cxxstd_values:
for _v in _std:
depends_on(f"podio cxxstd={_v.value}", when=f"cxxstd={_v.value}")

View File

@@ -62,7 +62,6 @@ class EnvironmentModules(Package):
variant("X", default=True, description="Build with X functionality")
depends_on("gmake", type="build")
depends_on("util-linux", type=("build", "run"), when="@5.5:")
depends_on("less", type=("build", "run"), when="@4.1:")
with when("@main"):

View File

@@ -31,7 +31,6 @@ class Esmf(MakefilePackage, PythonExtension):
# Develop is a special name for spack and is always considered the newest version
version("develop", branch="develop")
# generate chksum with 'spack checksum esmf@x.y.z'
version("8.8.0", sha256="f89327428aeef6ad34660b5b78f30d1c55ec67efb8f7df1991fdaa6b1eb3a27c")
version("8.7.0", sha256="d7ab266e2af8c8b230721d4df59e61aa03c612a95cc39c07a2d5695746f21f56")
version("8.6.1", sha256="dc270dcba1c0b317f5c9c6a32ab334cb79468dda283d1e395d98ed2a22866364")
version("8.6.0", sha256="ed057eaddb158a3cce2afc0712b49353b7038b45b29aee86180f381457c0ebe7")

View File

@@ -64,7 +64,6 @@ class Faodel(CMakePackage):
"+program_options+exception+locale+system+chrono+log+serialization"
"+atomic+container+regex+thread+date_time"
)
depends_on("boost@:1.86", when="@:1.2108.1")
depends_on("cmake@3.8.0:", type="build")
depends_on("hdf5+mpi", when="+hdf5+mpi")
depends_on("hdf5~mpi", when="+hdf5~mpi")

View File

@@ -28,7 +28,6 @@ class Fltk(Package):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("gmake", type="build")
depends_on("libx11")

View File

@@ -72,12 +72,11 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
deprecated=True,
sha256="117f5fdb16e53d0fa8a47a1e28cccab1d8020ed4f6e50163d985dc90226aaa2c",
)
# Do NOT add older versions here.
# GASNet-EX releases over 2 years old are not supported.
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("gmake", type="build")
# Do NOT add older versions here.
# GASNet-EX releases over 2 years old are not supported.
# The optional network backends:
variant(

View File

@@ -30,7 +30,6 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
license("MIT")
maintainers("adamjstewart")
version("3.10.1", sha256="9211eac72b53f5f85d23cf6d83ee20245c6d818733405024e71f2af41e5c5f91")
version("3.10.0", sha256="af821a3bcf68cf085724c21c9b53605fd451d83af3c8854d8bf194638eb734a8")
version("3.9.3", sha256="34a037852ffe6d2163f1b8948a1aa7019ff767148aea55876c1339b22ad751f1")
version("3.9.2", sha256="bfbcc9f087f012c36151c20c79f8eac9529e1e5298fbded79cd5a1365f0b113a")

View File

@@ -96,6 +96,5 @@ def install(self, spec, prefix):
def setup_dependent_package(self, module, dspec):
module.make = MakeExecutable(
self.spec.prefix.bin.make,
jobs=determine_number_of_jobs(parallel=dspec.package.parallel),
self.spec.prefix.bin.make, determine_number_of_jobs(parallel=dspec.package.parallel)
)

View File

@@ -17,12 +17,6 @@ class Gnupg(AutotoolsPackage):
license("GPL-3.0-or-later")
version("2.5.3", sha256="23128b136aed4e5121e793d1b6c60ee50c8007a9d926c1313e524d05386b54ac")
version("2.5.2", sha256="7f404ccc6a58493fedc15faef59f3ae914831cff866a23f0bf9d66cfdd0fea29")
version("2.5.1", sha256="8a34bb318499867962c939e156666ada93ed81f01926590ac68f3ff79178375e")
version("2.5.0", sha256="2222c827d4e7087f15e7f72739d004abc1d05c6c5f0a5a12b24c6a6cc5d173fb")
version("2.4.7", sha256="7b24706e4da7e0e3b06ca068231027401f238102c41c909631349dcc3b85eb46")
version("2.4.6", sha256="95acfafda7004924a6f5c901677f15ac1bda2754511d973bb4523e8dd840e17a")
version("2.4.5", sha256="f68f7d75d06cb1635c336d34d844af97436c3f64ea14bcb7c869782f96f44277")
version("2.4.4", sha256="67ebe016ca90fa7688ce67a387ebd82c6261e95897db7b23df24ff335be85bc6")
version("2.4.3", sha256="a271ae6d732f6f4d80c258ad9ee88dd9c94c8fdc33c3e45328c4d7c126bd219d")
@@ -47,23 +41,15 @@ class Gnupg(AutotoolsPackage):
depends_on("libgpg-error@1.24:", when="@2:")
depends_on("libgpg-error@1.41:", when="@2.3:")
depends_on("libgpg-error@1.46:", when="@2.4:")
# https://github.com/gpg/gnupg/commit/d78131490edd7f7db142702b8144bc30e65dbd8d
depends_on("libgpg-error@1.50:", when="@2.5:")
# https://github.com/gpg/gnupg/commit/c3bab200d97460028d842d76484b4c08fb947fef
depends_on("libgpg-error@1.51:", when="@2.5.2:")
depends_on("libgcrypt@1.7.0:", when="@2:")
depends_on("libgcrypt@1.9.1:", when="@2.3:")
# https://github.com/gpg/gnupg/commit/f305e703d51079a17bcfc15d54f4c5f591dcff56
depends_on("libgcrypt@1.11:", when="@2.5:")
depends_on("libksba@1.3.4:", when="@2:")
depends_on("libksba@1.6.3:", when="@2.4:")
depends_on("libassuan@:2", when="@:2.4.3")
depends_on("libassuan@2.5:", when="@2.2.15:")
# https://github.com/gpg/gnupg/commit/0d20b79ab79819f6177737a61e886d4820e475e2
depends_on("libassuan@3:", when="@2.5.0:")
depends_on("libassuan@:2", when="@:2.4.3")
depends_on("pinentry", type="run", when="@2:")
depends_on("iconv", when="@2:")

View File

@@ -22,4 +22,4 @@ class Gocryptfs(GoPackage):
depends_on("c", type="build") # generated
depends_on("openssl")
depends_on("pkgconfig", type="build")
depends_on("pkg-config", type="build")

View File

@@ -45,7 +45,7 @@ class Gxsview(QMakePackage):
depends_on("vtk@9:+qt+opengl2", when="@2024.03.15:")
conflicts("%gcc@:7.2.0", msg="Requires C++17 compiler support") # need C++17 standard
conflicts("qt@6:", msg="Qt 6 support is not yet achieved")
conflicts("^qt-base@6:", msg="Qt 6 support is not yet achieved") # required for clingo
conflicts("qt-base@6:", msg="Qt 6 support is not yet achieved") # required for clingo
patch("vtk9.patch", when="^vtk@9:")
# gcc11 compilation rule for std::numeric_limits,
@@ -75,13 +75,13 @@ def qmake_args(self):
]
)
# Below to avoid undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
if self.spec.satisfies("%gcc@:8.9") or self.spec.satisfies("%fj"):
if self.spec.satisfies("%gcc@8.0:8.9") or self.spec.satisfies("%fj"):
if self.spec.satisfies("^vtk@9:"):
fic = "vtk9.pri"
else:
fic = "vtk8.pri"
with open(fic, "a") as fh:
fh.write("\nLIBS += -lstdc++fs\n")
fh.write("-lstdc++fs\n")
return args
def install(self, spec, prefix):

View File

@@ -1,77 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b48844..1d7ff86 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -202,7 +202,7 @@ else()
set( tensile_fork "ROCmSoftwarePlatform" CACHE STRING "Tensile fork to use" )
file (STRINGS "tensilelite_tag.txt" read_tensile_tag)
set( tensile_tag ${read_tensile_tag} CACHE STRING "Tensile tag to download" )
- virtualenv_install("git+https://github.com/${tensile_fork}/hipBLASLt.git@${tensile_tag}#subdirectory=tensilelite")
+ virtualenv_install("git+https://github.com/ROCm/hipBLASLt.git@modify-tensilelite-spack-6.3#subdirectory=tensilelite")
message (STATUS "using GIT Tensile fork=${tensile_fork} from branch=${tensile_tag}")
endif()
diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
index f85594b..d3a6599 100644
--- a/clients/gtest/CMakeLists.txt
+++ b/clients/gtest/CMakeLists.txt
@@ -53,6 +53,7 @@ target_include_directories( hipsparselt-test
$<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
$<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
+ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
)
message("BLIS_INCLUDE_DIR=" ${BLIS_INCLUDE_DIR})
target_link_libraries( hipsparselt-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::hipsparselt )
diff --git a/clients/samples/CMakeLists.txt b/clients/samples/CMakeLists.txt
index 6b303d5..c6d608c 100644
--- a/clients/samples/CMakeLists.txt
+++ b/clients/samples/CMakeLists.txt
@@ -50,6 +50,11 @@ foreach( exe ${sample_list_all} )
$<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
)
+ target_include_directories( ${exe}
+ SYSTEM PRIVATE
+ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
+ )
+
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# GCC or hip-clang needs specific flags to turn on f16c intrinsics
target_compile_options( ${exe} PRIVATE -mf16c )
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index aac8506..e282268 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -58,6 +58,9 @@ include(src/CMakeLists.txt)
# Create hipSPARSELt library
add_library(hipsparselt ${hipsparselt_source} ${hipsparselt_headers_public})
add_library(roc::hipsparselt ALIAS hipsparselt)
+target_include_directories( hipsparselt PRIVATE ${HIPSPARSE_INCLUDE_DIRS} )
+target_include_directories( hipsparselt PRIVATE ${MSGPACK_DIR}/include )
+
# Target compile definitions
if(NOT BUILD_CUDA)
diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
index 97ad81e..b8f03b5 100755
--- a/library/src/CMakeLists.txt
+++ b/library/src/CMakeLists.txt
@@ -65,7 +65,7 @@ if(NOT BUILD_CUDA)
if(Tensile_CPU_THREADS MATCHES "^[0-9]+$")
# only including threads argument if number
TensileCreateLibraryFiles(
- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
"${PROJECT_BINARY_DIR}/Tensile"
ARCHITECTURE ${Tensile_ARCHITECTURE}
CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
@@ -76,7 +76,7 @@ if(NOT BUILD_CUDA)
)
else()
TensileCreateLibraryFiles(
- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
"${PROJECT_BINARY_DIR}/Tensile"
ARCHITECTURE ${Tensile_ARCHITECTURE}
CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}

View File

@@ -21,7 +21,6 @@ class Hipsparselt(CMakePackage, ROCmPackage):
maintainers("srekolam", "afzpatel", "renjithravindrankannath")
license("MIT")
version("6.3.0", sha256="f67ed4900101686596add37824d0628f1e71cf6a30d827a0519b3c3657f63ac3")
version("6.2.4", sha256="7b007b346f89fac9214ad8541b3276105ce1cac14d6f95a8a504b5a5381c8184")
version("6.2.1", sha256="a23287bc759442aebaccce0306f5e3938865240e13553847356c25c54214a0d4")
version("6.2.0", sha256="a25a3ce0ed3cc616b1a4e38bfdd5e68463bb9fe791a56d1367b8a6373bb63d12")
@@ -47,10 +46,9 @@ class Hipsparselt(CMakePackage, ROCmPackage):
)
variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4", "6.3.0"]:
for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
depends_on(f"hip@{ver}", when=f"@{ver}")
depends_on(f"hipsparse@{ver}", when=f"@{ver}")
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
depends_on(f"rocm-openmp-extras@{ver}", when=f"@{ver}", type="test")
depends_on("cmake@3.5:", type="build")
@@ -63,7 +61,6 @@ class Hipsparselt(CMakePackage, ROCmPackage):
depends_on("py-joblib")
depends_on("googletest@1.10.0:", type="test")
depends_on("netlib-lapack@3.7.1:", type="test")
depends_on("rocm-smi-lib@6.3.0", when="@6.3.0")
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack.patch", when="@6.0")
# Below patch sets the proper path for clang++,lld and clang-offload-blunder inside the
@@ -71,20 +68,9 @@ class Hipsparselt(CMakePackage, ROCmPackage):
# for 6.1.0 release.
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.1.patch", when="@6.1")
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.2.patch", when="@6.2")
patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.3.patch", when="@6.3")
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
env.set("TENSILE_ROCM_ASSEMBLER_PATH", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
env.set(
"TENSILE_ROCM_OFFLOAD_BUNDLER_PATH",
f"{self.spec['llvm-amdgpu'].prefix}/bin/clang-offload-bundler",
)
env.set(
"ROCM_AGENT_ENUMERATOR_PATH",
f"{self.spec['rocminfo'].prefix}/bin/rocm_agent_enumerator",
)
env.set("ROCM_SMI_PATH", f"{self.spec['rocm-smi-lib'].prefix}/bin/rocm-smi")
def cmake_args(self):
args = [

View File

@@ -37,24 +37,6 @@ class Hpl(AutotoolsPackage):
arch = "{0}-{1}".format(platform.system(), platform.processor())
build_targets = ["arch={0}".format(arch)]
with when("@=2.3"):
depends_on("autoconf-archive", type="build") # AX_PROG_CC_MPI
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("m4", type="build")
depends_on("libtool", type="build")
@property
def force_autoreconf(self):
return self.version == Version("2.3")
@run_before("autoreconf", when="@=2.3")
def add_timer_to_libhpl(self):
# Add HPL_timer_walltime to libhpl.a
filter_file(
r"(pgesv/HPL_perm.c)$", r"\1 ../testing/timer/HPL_timer_walltime.c", "src/Makefile.am"
)
@when("@:2.2")
def autoreconf(self, spec, prefix):
# Prevent sanity check from killing the build
@@ -122,7 +104,7 @@ def configure(self, spec, prefix):
def configure_args(self):
filter_file(r"^libs10=.*", "libs10=%s" % self.spec["blas"].libs.ld_flags, "configure")
cflags, ldflags = ["-O3", "-DHPL_PROGRESS_REPORT", "-DHPL_DETAILED_TIMING"], []
cflags, ldflags = ["-O3"], []
if self.spec.satisfies("+openmp"):
cflags.append(self.compiler.openmp_flag)

View File

@@ -17,8 +17,6 @@ class Keepassxc(CMakePackage):
license("GPL-2.0-only OR GPL-3.0-only")
version("master", branch="master")
version("2.7.9", sha256="3c44e45f22c00ddac63d8bc11054b4b0ada0222ffac08d3ed70f196cb9ed46fd")
version("2.7.8", sha256="87d3101712b3c8656a24b908ad5b7e2529bc01717cb4156f53ba195fb81783a3")
version("2.7.7", sha256="58fc45ae98e4b3ffb052103014f5b97a41fefd17102c7f56073934dd3a82ee67")
version("2.7.6", sha256="a58074509fa8e90f152c6247f73e75e126303081f55eedb4ea0cbb6fa980d670")
version("2.7.1", sha256="6001ba626c35c316dbda6de35736f012a2264f95139fcb4a094b8eb49b15d3e7")

View File

@@ -502,7 +502,6 @@ def url_for_version(self, version):
"misc": {},
"ml-hdnnp": {"when": "@20210702:"},
"ml-iap": {"when": "@20210702:"},
"ml-pace": {"when": "@20210702:"},
"ml-pod": {"when": "@20221222:"},
"ml-rann": {"when": "@20210702:"},
"ml-snap": {"when": "@20210702:"},
@@ -584,6 +583,7 @@ def url_for_version(self, version):
"vtk": {"when": "@20210702:"},
"yaff": {"when": "@20210702:"},
# "mdi": {"when": "@20210702:"}, no mdi package
# "ml-pace": {"when": "@20210702:"}, no pace package
# "ml-quip": {"when": "@20210702:"}, no quip package
# "scafacos": {"when": "@20210702:"}, no scafacos package
# "user-quip": {"when": "@20190201:20210527"}, no quip package
@@ -716,7 +716,6 @@ def url_for_version(self, version):
depends_on("plumed", when="+plumed")
depends_on("eigen@3:", when="+user-smd")
depends_on("eigen@3:", when="+machdyn")
depends_on("pace", when="+ml-pace", type="build")
depends_on("py-cython", when="+mliap+python", type="build")
depends_on("py-cython", when="+ml-iap+python", type="build")
depends_on("py-pip", when="+python", type="build")

View File

@@ -20,7 +20,6 @@ class Lcio(CMakePackage):
license("BSD-3-Clause")
version("master", branch="master")
version("2.22.3", sha256="5b9715786c5e953f8854881c5d0c4a48030a5491f1701232b82e960ac7980162")
version("2.22.2", sha256="e5ad9690af85160ef52dd407fc0995451b4293f3aee415a8ea8a950de63d87a1")
version("2.22.1", sha256="4bc3d2c83af7b1c65d6736dd14ee82f41af7ce9bfc7cfe779c5f47417e8dc326")
version("2.22", sha256="95676977a0427f5ecc857e8504b13f332c2c2e5769dc00f6beecff3c73dab395")

View File

@@ -15,7 +15,6 @@ class LibgpgError(AutotoolsPackage):
license("GPL-2.0-or-later AND LGPL-2.1-or-later")
version("1.51", sha256="be0f1b2db6b93eed55369cdf79f19f72750c8c7c39fc20b577e724545427e6b2")
version("1.50", sha256="69405349e0a633e444a28c5b35ce8f14484684518a508dc48a089992fe93e20a")
version("1.49", sha256="8b79d54639dbf4abc08b5406fb2f37e669a2dec091dd024fb87dd367131c63a9")
version("1.48", sha256="89ce1ae893e122924b858de84dc4f67aae29ffa610ebf668d5aa539045663d6f")

View File

@@ -64,9 +64,6 @@ class Lmod(AutotoolsPackage):
depends_on("bc", type="build", when="@8.7.10:")
# GNU sed is required instead of bsd sed on macOS
depends_on("sed", type="build", when="platform=darwin")
variant("auto_swap", default=True, description="Auto swapping of compilers, etc.")
variant(
"redirect", default=False, description="Redirect messages to stdout (instead of stderr)"
@@ -82,21 +79,14 @@ def setup_build_environment(self, env):
env.append_path("LUA_PATH", stage_lua_path.format(version=self.version), separator=";")
def patch(self):
# The tcl scripts should use the tclsh that was discovered by the configure script.
# Touch up their #! lines so that the sed in the Makefile's install step has something to
# work on. Requires the change in the associated patch file.fg
"""The tcl scripts should use the tclsh that was discovered
by the configure script. Touch up their #! lines so that the
sed in the Makefile's install step has something to work on.
Requires the change in the associated patch file.fg"""
if self.spec.version <= Version("6.4.3"):
for tclscript in glob("src/*.tcl"):
filter_file(r"^#!.*tclsh", "#!@path_to_tclsh@", tclscript)
# The build system hard-codes gsed on macOS, but that's a homebrew thing. We just have
# plain sed from the sed dependency. See https://github.com/TACC/Lmod/issues/742.
if self.spec.satisfies("platform=darwin"):
if self.spec.satisfies("@8.5.21:"):
filter_file("SED=gsed", "SED=sed", "rt/common_funcs.sh", string=True)
if self.spec.satisfies("@8.2:"):
filter_file(r"SED\s*:?=\s*gsed", "SED := sed", "Makefile.in")
def configure_args(self):
spec = self.spec
args = []

View File

@@ -158,7 +158,6 @@ class Mfem(Package, CudaPackage, ROCmPackage):
)
depends_on("cxx", type="build") # generated
depends_on("gmake", type="build")
variant("static", default=True, description="Build static library")
variant("shared", default=False, description="Build shared library")

View File

@@ -70,7 +70,6 @@ class Mgis(CMakePackage):
depends_on("tfel@3.3.0", when="@1.1")
depends_on("tfel@3.2.1", when="@1.0.1")
depends_on("tfel@3.2.0", when="@1.0")
depends_on("tfel@rliv-5.0", when="@rliv-3.0")
depends_on("tfel@rliv-4.2", when="@rliv-2.2")
depends_on("tfel@rliv-4.1", when="@rliv-2.1")
depends_on("tfel@rliv-4.0", when="@rliv-2.0")
@@ -78,22 +77,11 @@ class Mgis(CMakePackage):
depends_on("tfel@rliv-3.3", when="@rliv-1.1")
depends_on("tfel@rliv-3.2", when="@rliv-1.0")
depends_on("tfel@master", when="@master")
depends_on(
"boost+python+numpy+exception+container", when="+python", type=("build", "link", "run")
)
depends_on("py-numpy", when="+python", type=("build", "link", "run"))
with when("@3.1:"):
depends_on("py-pybind11", when="+python", type=("build", "link", "run"))
with when("@1.0:3.0.99"):
depends_on(
"boost+python+numpy+exception+container", when="+python", type=("build", "link", "run")
)
with when("@rliv-1.0:rliv-3.0"):
depends_on(
"boost+python+numpy+exception+container", when="+python", type=("build", "link", "run")
)
extends("python", when="+python")
def patch(self):
@@ -125,13 +113,8 @@ def cmake_args(self):
args.append("-DPYTHON_LIBRARY={0}".format(python.libs[0]))
args.append("-DPYTHON_INCLUDE_DIR={0}".format(python.headers.directories[0]))
args.append("-DPython_ADDITIONAL_VERSIONS={0}".format(python.version.up_to(2)))
if "py-pybind11" in self.spec:
args.append("-Dpybind11_DIR={0}".format(self.spec["py-pybind11"].prefix))
if "boost" in self.spec:
# adding path to boost
args.append("-DBOOST_ROOT={0}".format(self.spec["boost"].prefix))
# adding path to boost
args.append("-DBOOST_ROOT={0}".format(self.spec["boost"].prefix))
if "+static" in self.spec:
args.append("-Denable-static=ON")

View File

@@ -33,7 +33,7 @@ class Ncdu(Package):
version("1.7", sha256="70dfe10b4c0843050ee17ab27b7ad4d65714682f117079b85d779f83431fb333")
depends_on("c", type="build") # generated
depends_on("gmake", type="build")
depends_on("ncurses")
depends_on("pkgconfig", type="build")

View File

@@ -97,6 +97,6 @@ def setup_dependent_package(self, module, dspec):
module.ninja = MakeExecutable(
which_string(name, path=[self.spec.prefix.bin], required=True),
jobs=determine_number_of_jobs(parallel=dspec.package.parallel),
determine_number_of_jobs(parallel=dspec.package.parallel),
supports_jobserver=True, # This fork supports jobserver
)

View File

@@ -104,6 +104,6 @@ def setup_dependent_package(self, module, dspec):
module.ninja = MakeExecutable(
which_string(name, path=[self.spec.prefix.bin], required=True),
jobs=determine_number_of_jobs(parallel=dspec.package.parallel),
determine_number_of_jobs(parallel=dspec.package.parallel),
supports_jobserver=self.spec.version == ver("kitware"),
)

View File

@@ -30,7 +30,7 @@ class Omniperf(CMakePackage):
depends_on("py-pyyaml")
depends_on("py-matplotlib")
depends_on("py-pandas@1.4.3:")
depends_on("py-numpy@1.17.5:")
depends_on("py-numpy@1.17.5")
depends_on("py-pymongo")
depends_on("py-tabulate")
depends_on("py-tqdm")

View File

@@ -50,23 +50,15 @@ class Onnx(CMakePackage):
) # py-torch@1.6:1.7
version("1.6.0_2020-02-16", commit="9fdae4c68960a2d44cd1cc871c74a6a9d469fa1f") # py-torch@1.5
version("1.6.0_2019-11-06", commit="fea8568cac61a482ed208748fdc0e1a8e47f62f5") # py-torch@1.4
version("1.6.0_2019-09-26", commit="034921bd574cc84906b7996c07873454b7dd4135") # py-torch@1.3
version("1.5.0_2019-07-25", commit="28ca699b69b5a31892619defca2391044a9a6052") # py-torch@1.2
version("1.5.0_2019-04-25", commit="22662bfd4dcc6baebf29e3b823a051676f991001") # py-torch@1.1
version("1.3.0_2018-12-04", commit="42804705bdbf179d1a98394008417e1392013547") # py-torch@1.0
version(
"1.6.0_2019-09-26", commit="034921bd574cc84906b7996c07873454b7dd4135", deprecated=True
) # py-torch@1.3
version(
"1.5.0_2019-07-25", commit="28ca699b69b5a31892619defca2391044a9a6052", deprecated=True
) # py-torch@1.2
version(
"1.5.0_2019-04-25", commit="22662bfd4dcc6baebf29e3b823a051676f991001", deprecated=True
) # py-torch@1.1
version(
"1.3.0_2018-12-04", commit="42804705bdbf179d1a98394008417e1392013547", deprecated=True
) # py-torch@1.0
version(
"1.2.2_2018-07-16", commit="b2817a682f25f960586f06caa539bbbd7a96b859", deprecated=True
"1.2.2_2018-07-16", commit="b2817a682f25f960586f06caa539bbbd7a96b859"
) # py-torch@0.4.1
version(
"1.1.0_2018-04-19", commit="7e1bed51cc508a25b22130de459830b5d5063c41", deprecated=True
"1.1.0_2018-04-19", commit="7e1bed51cc508a25b22130de459830b5d5063c41"
) # py-torch@0.4.0
depends_on("cxx", type="build")
@@ -83,10 +75,7 @@ def patch(self):
filter_file("CMAKE_CXX_STANDARD 11", f"CMAKE_CXX_STANDARD {cxxstd}", "CMakeLists.txt")
def cmake_args(self):
# https://github.com/pytorch/pytorch/blob/main/cmake/Dependencies.cmake
args = [
self.define("BUILD_SHARED_LIBS", False),
self.define("ONNXIFI_ENABLE_EXT", True),
# Try to get ONNX to use the same version of python as the spec is using
self.define("PY_VERSION", self.spec["python"].version.up_to(2)),
self.define("ONNX_BUILD_TESTS", self.run_tests),

View File

@@ -58,9 +58,8 @@ class Otf2(AutotoolsPackage):
deprecated=True,
)
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
def url_for_version(self, version):
if version < Version("2.3"):

View File

@@ -1,41 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Pace(CMakePackage):
"""interatomic Potentials in Atomic Cluster Expansion (PACE)
This library is required to build the ML-PACE module
in LAMMPS.
The library was developed at the Interdisciplinary Centre
for Advanced Materials Simulation (ICAMS), Ruhr University Bochum
See `Phys Rev Mat 6 013804 (2022)<https://doi.org/10.1103/PhysRevMaterials.6.013804>`__ and
`Phys Rev B 99 014104 (2019)<https://doi.org/10.1103/PhysRevB.99.014104>`__ for details.
"""
maintainers("hjjvandam", "rbberger")
homepage = (
"https://www.icams.de/institute/departments-groups/atomistic-modelling-and-simulation/"
)
git = "https://github.com/ICAMS/lammps-user-pace.git"
license("GPL-2.0-or-later", checked_by="hjjvandam")
version("main", branch="main")
version(
"2023.11.25.2", tag="v.2023.11.25.fix2", commit="e60e850359b918ca93a5e9329548a58d31f4b12b"
)
variant("pic", default=True, description="Build position independent code")
depends_on("yaml-cpp")
depends_on("cnpy")
def cmake_args(self):
args = [self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic")]
return args

View File

@@ -101,7 +101,7 @@ class Papi(AutotoolsPackage, ROCmPackage):
# 7.1.0 erroneously adds -ffree-form for all fortran compilers
patch("sysdetect-free-form-fix.patch", when="@7.1.0")
patch("crayftn-fixes.patch", when="@6.0.0:%cce@9:")
patch("intel-oneapi-compiler-fixes.patch", when="@6.0.0:7.0.1%oneapi")
patch("intel-oneapi-compiler-fixes.patch", when="@6.0.0:%oneapi")
patch("intel-cray-freeform.patch", when="@7.0.1")
patch("spack-hip-path.patch", when="@7.0.1")

View File

@@ -19,7 +19,6 @@ class Podio(CMakePackage):
tags = ["hep", "key4hep"]
version("master", branch="master")
version("1.2", sha256="bc97ba09ce908e55d4c5faa78d9739dde7daefd9337ae98351813b13708d0685")
version("1.1", sha256="2cb5040761f3da4383e1f126da25d68e99ecd8398e0ff12e7475a3745a7030a6")
version("1.0.1", sha256="915531a2bcf638011bb6cc19715bbc46d846ec8b985555a1afdcd6abc017e21b")
version("1.0", sha256="491f335e148708e387e90e955a6150e1fc2e01bf6b4980b65e257ab0619559a9")
@@ -72,22 +71,12 @@ class Podio(CMakePackage):
depends_on("cxx", type="build") # generated
_cxxstd_values = (conditional("17", when="@:1.2"), conditional("20", when="@0.14.1:"))
variant(
"cxxstd",
default="17",
values=_cxxstd_values,
values=("17", conditional("20", when="@0.15:")),
multi=False,
description="Use the specified C++ standard when building.",
when="@:1.1",
)
variant(
"cxxstd",
default="20",
values=_cxxstd_values,
multi=False,
description="Use the specified C++ standard when building.",
when="@1.2:",
)
variant("sio", default=False, description="Build the SIO I/O backend")
variant("rntuple", default=False, description="Build the RNTuple backend")
@@ -112,14 +101,10 @@ class Podio(CMakePackage):
depends_on("sio", type=("build", "link"), when="+sio")
depends_on("catch2@3.0.1:", type=("test"), when="@:0.16.5")
depends_on("catch2@3.1:", type=("test"), when="@0.16.6:")
depends_on("catch2@3.4:", type=("test"), when="@0.17.1: cxxstd=20")
depends_on("catch2@3.3:", type=("test"), when="@1.2: cxxstd=17")
depends_on("py-graphviz", type=("run"))
depends_on("py-tabulate", type=("run", "test"), when="@0.16.6:")
conflicts("+rntuple", when="@:0.16", msg="rntuple support requires at least podio@0.17")
conflicts("+rntuple ^root@6.32:", when="@:0.99", msg="rntuple API change requires podio@1:")
conflicts("+rntuple ^root@6.34:", when="@:1.1", msg="rntuple API change requires podio@1.2:")
# See https://github.com/AIDASoft/podio/pull/600
patch(

View File

@@ -65,8 +65,7 @@ class Postgresql(AutotoolsPackage):
variant("xml", default=False, description="Build with XML support.")
variant("icu", default=True, description="Build with ICU support.", when="@16:")
depends_on("icu4c", when="+icu")
depends_on("pkgconfig", when="+icu", type="build")
depends_on("icu4c", when="@16: +icu")
depends_on("readline", when="lineedit=readline")
depends_on("libedit", when="lineedit=libedit")
depends_on("openssl")
@@ -74,7 +73,6 @@ class Postgresql(AutotoolsPackage):
depends_on("perl+opcode", when="+perl")
depends_on("python", when="+python")
depends_on("libxml2", when="+xml")
depends_on("pkgconfig", when="+xml", type="build")
@property
def command(self):

View File

@@ -92,7 +92,6 @@ class Precice(CMakePackage):
depends_on("boost@:1.72", when="@:2.0.2")
depends_on("boost@:1.74", when="@:2.1.1")
depends_on("boost@:1.78", when="@:2.3.0")
depends_on("boost@:1.86", when="@:3.1.2")
depends_on("eigen@3.2:")
depends_on("eigen@3.4:", when="@3.2:")

View File

@@ -25,7 +25,7 @@ class Psrdada(AutotoolsPackage, CudaPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("nasm", type="build")
depends_on("pkgconfig", type="build")
depends_on("pkgconf", type="build")
depends_on("fftw@3.3:", type="build")
depends_on("python")
depends_on("cuda", type="build")

View File

@@ -28,8 +28,6 @@ class PyAsdf(PythonPackage):
with when("@3.5.0:"):
depends_on("python@3.9:", type=("build", "run"))
depends_on("py-setuptools-scm@8: +toml", type="build") # for version_file
depends_on("py-asdf-standard@1.1.0:", type=("build", "run"))
depends_on("py-importlib-metadata@4.11.4:", type=("build", "run"), when="^python@:3.11")
depends_on("py-numpy@1.22:", type=("build", "run"))

View File

@@ -1,26 +0,0 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyDaskHistogram(PythonPackage):
"""Histograms with task scheduling."""
homepage = "https://github.com/dask-contrib/dask-histogram"
pypi = "dask_histogram/dask_histogram-2024.3.0.tar.gz"
maintainers("wdconinc")
license("BSD-3-Clause", checked_by="wdconinc")
version("2024.9.1", sha256="a3e778b606db4affcc4fc8b6d34f5d99e165ea1691da57f40659032cd79f03e8")
version("2024.3.0", sha256="834d4d25f5e2c417f5e792fafaa55484c20c9f3812d175125de7ac34f994ef7b")
depends_on("py-hatchling@1.8:", type="build")
depends_on("py-hatch-vcs", type="build")
depends_on("py-boost-histogram@1.3.2:", type=("build", "run"))
depends_on("py-dask@2021.03.0:", type=("build", "run"))

View File

@@ -10,11 +10,10 @@ class PyGraphviz(PythonPackage):
"""Simple Python interface for Graphviz"""
homepage = "https://github.com/xflr6/graphviz"
pypi = "graphviz/graphviz-0.20.3.zip"
pypi = "graphviz/graphviz-0.10.1.zip"
license("MIT")
version("0.20.3", sha256="09d6bc81e6a9fa392e7ba52135a9d49f1ed62526f96499325930e87ca1b5925d")
version("0.13.2", sha256="60acbeee346e8c14555821eab57dbf68a169e6c10bce40e83c1bf44f63a62a01")
version("0.13", sha256="dc08677f37c65a4a480f00df4bd0d19a0a103c06aad95f21a37f0b7fd440de81")
version("0.12", sha256="c60e232a66e4847f9f644fbaa94730ca4f78385a1314a2cc1e7f4cb2d7461298")
@@ -25,7 +24,6 @@ class PyGraphviz(PythonPackage):
variant("dev", default=False, description="development mode")
variant("docs", default=False, description="build documentation")
depends_on("python@3.8:", type=("build", "run"), when="@0.20.3:")
depends_on("python@2.7:2.8,3.4:", type=("build", "run"), when="@:0.10.1")
depends_on("python@2.7:2.8,3.5:", type=("build", "run"), when="@0.11.0:")
depends_on("py-setuptools", type="build")

View File

@@ -13,53 +13,21 @@ class PyHist(PythonPackage):
license("BSD-3-Clause")
version("2.8.0", sha256="0a3e602dd1d2721bd7f2229f456709dde323f6f74952f13ba4e5986c3275f77b")
version("2.7.3", sha256="f9f9b56809b190bb546698789cc0d7d040934fc5141d2763c6e49d65e81dbc0b")
version("2.7.2", sha256="26b1ab810d8b10222db5d161d4acaf64aaa04fe6baaed2966d41c1dac5601d06")
version("2.7.1", sha256="ffbe314c2bd03c342b9f168dce715ad8f36281eb23172a00970882a9344fe988")
version("2.7.0", sha256="0ce40fd898ded8ef23d97c77cf1da9caf47b3caaef5fde190055d4d679a2d7a4")
version("2.6.3", sha256="dede097733d50b273af9f67386e6dcccaab77e900ae702e1a9408a856e217ce9")
version("2.6.2", sha256="55bb6366728ee48cb3fe48f20f92f0dbc560837a95961c39651699bb63af720a")
version("2.6.1", sha256="ee9034795fd2feefed923461aaccaf76f87c1f8d5414b1e704faa293ceb4fc27")
version("2.5.2", sha256="0bafb8b956cc041f1b26e8f5663fb8d3b8f7673f56336facb84d8cfdc30ae2cf")
variant("plot", default=False, description="Add support for drawing histograms")
variant("dask", default=False, description="Add support for dask histograms", when="@2.6.3:")
variant("fit", default=False, description="Add support for fitting histograms", when="@2.7.1:")
depends_on("python@3.7:", type=("build", "run"))
depends_on("python@3.8:", type=("build", "run"), when="@2.8.0:")
with when("@:2.6.1"):
depends_on("py-setuptools@45:", type="build")
depends_on("py-setuptools-scm@3.4:+toml", type="build")
with when("@2.6.2:"):
depends_on("py-hatchling", type="build")
depends_on("py-hatch-vcs", type="build")
depends_on("py-setuptools@45:", type="build")
depends_on("py-setuptools-scm@3.4:+toml", type="build")
depends_on("py-boost-histogram@1.2.0:1.2", when="@2.5.2", type=("build", "run"))
depends_on("py-boost-histogram@1.3.1:1.3", when="@2.6.1:2.7.1", type=("build", "run"))
depends_on("py-boost-histogram@1.3.1:1.4", when="@2.7.2:", type=("build", "run"))
depends_on("py-boost-histogram@1.3.1:1.5", when="@2.8.0:", type=("build", "run"))
depends_on("py-boost-histogram@1.3.1:1.3", when="@2.6.1", type=("build", "run"))
depends_on("py-histoprint@2.2.0:", type=("build", "run"))
depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@:2.7.1,2.7.3:")
depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@2.7.2 ^python@:3.11")
depends_on("py-numpy@1.26:", type=("build", "run"), when="@2.7.2 ^python@3.12:")
depends_on("py-typing-extensions@3.7:", when="@:2.6 ^python@:3.7", type=("build", "run"))
depends_on("py-typing-extensions@4:", when="@2.7: ^python@:3.11", type=("build", "run"))
depends_on("py-numpy@1.14.5:", type=("build", "run"))
depends_on("py-typing-extensions@3.7:", when="^python@:3.7", type=("build", "run"))
with when("+plot"):
depends_on("py-matplotlib@3.0:", type=("build", "run"))
depends_on("py-mplhep@0.2.16:", type=("build", "run"))
with when("@:2.7.0"):
depends_on("py-scipy@1.4:", type=("build", "run"), when="@:2.6.1,2.7.0")
depends_on("py-iminuit@2:", type=("build", "run"), when="@:2.6.1,2.7.0")
depends_on("py-scipy@1.4:", type=("build", "run"), when="@2.6.2:2.6.3 ^python@:3.10")
depends_on("py-iminuit@2:", type=("build", "run"), when="@2.6.2:2.6.3 ^python@:3.10")
with when("+dask"):
depends_on("py-dask@2022: +dataframe", type=("build", "run"), when="^python@3.8:")
depends_on("py-dask-histogram@2023.1:", type=("build", "run"), when="^python@3.8:")
with when("+fit"):
depends_on("py-scipy@1.4:", type=("build", "run"))
depends_on("py-iminuit@2:", type=("build", "run"))
depends_on("py-matplotlib@3.0:", when="+plot", type=("build", "run"))
depends_on("py-scipy@1.4:", when="+plot", type=("build", "run"))
depends_on("py-iminuit@2:", when="+plot", type=("build", "run"))
depends_on("py-mplhep@0.2.16:", when="+plot", type=("build", "run"))

View File

@@ -11,23 +11,14 @@ class PyHistoprint(PythonPackage):
homepage = "https://github.com/scikit-hep/histoprint"
pypi = "histoprint/histoprint-2.2.0.tar.gz"
tags = ["hep"]
license("MIT")
license("MIT", checked_by="wdconinc")
version("2.6.0", sha256="e1df729350455b457e97f20883537ae74522879e7c33c609df12f247cca4a21d")
version("2.5.0", sha256="9097e7396ab3a9a83c916f7e53c462ea46e4f645c1ad91604738f2d8383efd4f")
version("2.4.0", sha256="328f789d186e3bd76882d57b5aad3fa08c7870a856cc83bcdbad9f4aefbda94d")
version("2.2.0", sha256="ef8b65f7926aaa989f076857b76291175245dd974804b408483091d1e28b00f6")
depends_on("python@3.6:", type=("build", "run"))
depends_on("python@3.8:", type=("build", "run"), when="@2.6:")
with when("@2.6:"):
depends_on("py-hatchling", type="build")
depends_on("py-hatch-vcs", type="build")
with when("@:2.5"):
depends_on("py-setuptools@42:", type="build")
depends_on("py-setuptools-scm@3.4:+toml", type="build")
depends_on("py-setuptools@42:", type="build")
depends_on("py-setuptools-scm@3.4:+toml", type="build")
depends_on("py-click@7.0.0:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-uhi@0.2.1:", type=("build", "run"))

View File

@@ -13,7 +13,6 @@ class PyHydraCore(PythonPackage):
license("MIT")
version("1.3.2", sha256="8a878ed67216997c3e9d88a8e72e7b4767e81af37afb4ea3334b269a4390a824")
version("1.3.1", sha256="8dd42d551befc43dfca0c612cbd58c4f3e273dbd97a87214c1a030ba557d238b")
depends_on("py-setuptools", type="build")

View File

@@ -49,9 +49,6 @@ class PyIminuit(PythonPackage):
depends_on("python@3.7:", type=("build", "run"), when="@2.17.0:")
depends_on("python@3.8:", type=("build", "run"), when="@2.19.0:")
depends_on("python@3.9:", type=("build", "run"), when="@2.28.0:")
# Bundled pybind11@:2.92 until 2.21 fails to compile with python@3.11:
# See https://github.com/pybind/pybind11/pull/3368
depends_on("python@:3.10", type=("build", "run"), when="@:2.21")
with when("@2.22:"):
depends_on("py-scikit-build-core@0.3:+pyproject", type="build")
depends_on("py-scikit-build-core@0.5:+pyproject", type="build", when="@2.26:")

View File

@@ -61,7 +61,7 @@ class PyIpython(PythonPackage):
depends_on("py-colorama", when="platform=windows", type=("build", "run"))
depends_on("py-decorator", type=("build", "run"))
depends_on("py-exceptiongroup", when="@8.15: ^python@:3.10", type=("build", "run"))
depends_on("py-jedi@0.16:", when="@7.18,7.20:", type=("build", "run"))
depends_on("py-jedi@0.16:0.18", when="@7.18,7.20:", type=("build", "run"))
depends_on("py-jedi@0.10:", when="@7.5:7.17,7.19", type=("build", "run"))
depends_on("py-matplotlib-inline", when="@7.23:", type=("build", "run"))
depends_on("py-pexpect@4.4:", when="@7.18: platform=linux", type=("build", "run"))

View File

@@ -22,7 +22,6 @@ class PyKornia(PythonPackage):
"adamjstewart",
)
version("0.8.0", sha256="a0ffc31106e8d777a8df693572ad5ea11f7236b8bc1d452754f5e57de012ea9a")
version("0.7.4", sha256="1f8dd6268ca5a2f2ec04b13c48da4dfb90ba2cfae7e31e0cc80d37f6520fa3f1")
version("0.7.3", sha256="0eb861ea5d7e6c3891ae699a8b7103a5783af0a7c41888ca482420dd3d055306")
version("0.7.2", sha256="f834ccd51188d071ed286a6727471c94344ea2a718903cc6f0e56a92f9c66ac5")

View File

@@ -9,18 +9,15 @@ class PyLightningUqBox(PythonPackage):
"""Lighning-UQ-Box: A toolbox for uncertainty quantification in deep learning."""
homepage = "https://github.com/lightning-uq-box/lightning-uq-box"
pypi = "lightning-uq-box/lightning_uq_box-0.1.0.tar.gz"
pypi = "lightning-uq-box/lightning-uq-box-0.1.0.tar.gz"
git = "https://github.com/lightning-uq-box/lightning-uq-box.git"
license("Apache-2.0")
maintainers("nilsleh", "adamjstewart")
version("main", branch="main")
version("0.2.0", sha256="97d994ac5ecdfc5a31e8d256b827115664d615a7623a1eea024754a8d7c3187e")
version("0.1.0", sha256="ce44860db75b4fbe487a009bee91c886be2e1835edee93479a6a8633ef2152b1")
variant("tests", default=False, description="Build test dependencies")
depends_on("py-setuptools@61:", type="build")
with default_args(type=("build", "run")):
@@ -47,21 +44,3 @@ class PyLightningUqBox(PythonPackage):
depends_on("py-torchseg@0.0.1:")
depends_on("py-h5py@3.12.1:", when="@0.2:")
depends_on("py-ema-pytorch@0.7:", when="@0.2:")
with default_args(type="run"):
with when("+tests"):
depends_on("py-pytest@7.3:")
depends_on("py-pytest-cov@4:")
depends_on("py-pytest-lazy-fixture@0.6:")
depends_on("py-hydra-core@1.3.2:")
depends_on("py-omegaconf@2.3:")
depends_on("py-jsonargparse@4.28:+signatures")
depends_on("py-ruff@0.2:")
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/l/lightning-uq-box/{}-{}.tar.gz"
if version >= Version("0.2.0"):
name = "lightning_uq_box"
else:
name = "lightning-uq-box"
return url.format(name, version)

View File

@@ -14,8 +14,6 @@ class PyLlvmlite(PythonPackage):
license("BSD-2-Clause")
version("0.43.0", sha256="ae2b5b5c3ef67354824fb75517c8db5fbe93bc02cd9671f3c62271626bc041d5")
version("0.42.0", sha256="f92b09243c0cc3f457da8b983f67bd8e1295d0f5b3746c7a1861d7a99403854a")
version("0.41.1", sha256="f19f767a018e6ec89608e1f6b13348fa2fcde657151137cb64e56d48598a92db")
version("0.41.0", sha256="7d41db345d76d2dfa31871178ce0d8e9fd8aa015aa1b7d4dab84b5cb393901e0")
version("0.40.1", sha256="5cdb0d45df602099d833d50bd9e81353a5e036242d3c003c5b294fc61d1986b4")
@@ -44,8 +42,7 @@ class PyLlvmlite(PythonPackage):
depends_on("cxx", type="build") # generated
depends_on("py-setuptools", type="build")
depends_on("python@3.9:3.12", when="@0.42:", type=("build", "run"))
depends_on("python@3.8:3.11", when="@0.40:0.41", type=("build", "run"))
depends_on("python@3.8:3.11", when="@0.40:", type=("build", "run"))
depends_on("python@:3.10", when="@0.38:0.39", type=("build", "run"))
depends_on("python@:3.9", when="@0.36:0.37", type=("build", "run"))
depends_on("python@:3.8", when="@0.31:0.35", type=("build", "run"))

View File

@@ -16,8 +16,6 @@ class PyMypy(PythonPackage):
license("MIT AND PSF-2.0", checked_by="tgamblin")
version("1.14.1", sha256="7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6")
version("1.13.0", sha256="0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e")
version("1.11.2", sha256="7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79")
version("1.11.1", sha256="f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08")
version("1.10.1", sha256="1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0")
@@ -58,8 +56,10 @@ class PyMypy(PythonPackage):
version("0.740", sha256="48c8bc99380575deb39f5d3400ebb6a8a1cb5cc669bbba4d3bb30f904e0a0e7d")
version("0.670", sha256="e80fd6af34614a0e898a57f14296d0dacb584648f0339c2e000ddbf0f4cc2f8d")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
# pyproject.toml
depends_on("py-setuptools@75.1.0:", when="@1.14:", type="build")
depends_on("py-setuptools@40.6.2:", when="@0.790:", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-wheel@0.30:", when="@0.790:", type="build")

View File

@@ -16,8 +16,6 @@ class PyNumba(PythonPackage):
license("BSD-2-Clause")
version("0.60.0", sha256="5df6158e5584eece5fc83294b949fd30b9f1125df7708862205217e068aabf16")
version("0.59.1", sha256="76f69132b96028d2774ed20415e8c528a34e3299a40581bae178f0994a2f370b")
version("0.58.1", sha256="487ded0633efccd9ca3a46364b40006dbdaca0f95e99b8b83e778d1195ebcbaa")
version("0.57.0", sha256="2af6d81067a5bdc13960c6d2519dbabbf4d5d597cf75d640c5aeaefd48c6420a")
version("0.56.4", sha256="32d9fef412c81483d7efe0ceb6cf4d3310fde8b624a9cecca00f790573ac96ee")
@@ -46,15 +44,13 @@ class PyNumba(PythonPackage):
variant("tbb", default=False, description="Build with Intel Threading Building Blocks")
depends_on("python@3.9:3.12", when="@0.59:", type=("build", "run"))
depends_on("python@3.8:3.11", when="@0.57:0.58", type=("build", "run"))
depends_on("python@3.8:3.11", when="@0.57:", type=("build", "run"))
depends_on("python@3.7:3.10", when="@0.55:0.56", type=("build", "run"))
depends_on("python@3.7:3.9", when="@0.54", type=("build", "run"))
depends_on("python@3.6:3.9", when="@0.53", type=("build", "run"))
depends_on("python@3.6:3.8", when="@0.52", type=("build", "run"))
depends_on("python@3.6:3.8", when="@0.48:0.51", type=("build", "run"))
depends_on("py-numpy@2.0", when="@0.60:", type=("build", "run"))
depends_on("py-numpy@1.22:1.26", when="@0.58.1:0.59", type=("build", "run"))
depends_on("py-numpy@1.22:1.26", when="@0.58.1:", type=("build", "run"))
depends_on("py-numpy@1.21:1.25", when="@0.58.0", type=("build", "run"))
depends_on("py-numpy@1.21:1.24", when="@0.57", type=("build", "run"))
depends_on("py-numpy@1.18:1.23", when="@0.56.1:0.56.4", type=("build", "run"))
@@ -63,8 +59,6 @@ class PyNumba(PythonPackage):
depends_on("py-numpy@1.17:1.20", when="@0.54", type=("build", "run"))
depends_on("py-numpy@1.15:1.20", when="@0.48:0.53", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-llvmlite@0.43", when="@0.60", type=("build", "run"))
depends_on("py-llvmlite@0.42", when="@0.59", type=("build", "run"))
depends_on("py-llvmlite@0.41", when="@0.58", type=("build", "run"))
depends_on("py-llvmlite@0.40", when="@0.57", type=("build", "run"))
depends_on("py-llvmlite@0.39", when="@0.56", type=("build", "run"))

View File

@@ -14,10 +14,6 @@ class PyPreCommit(PythonPackage):
license("MIT")
version("4.0.1", sha256="80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2")
version("3.8.0", sha256="8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af")
version("3.7.1", sha256="8ca3ad567bc78a4972a3f1a477e94a79d4597e8140a6e0b651c5e33899c3654a")
version("3.6.2", sha256="c3ef34f463045c88658c5b99f38c1e297abdcc0ff13f98d3370055fbbfabc67e")
version("3.6.0", sha256="d30bad9abf165f7785c15a21a1f46da7d0677cb00ee7ff4c579fd38922efe15d")
version("3.5.0", sha256="5804465c675b659b0862f07907f96295d490822a450c4c40e747d0b1c6ebcb32")
version("3.3.3", sha256="a2256f489cd913d575c145132ae196fe335da32d91a8294b7afe6622335dd023")

View File

@@ -1,22 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyPytestLazyFixture(PythonPackage):
"""It helps to use fixtures in pytest.mark.parametrize."""
homepage = "https://github.com/tvorog/pytest-lazy-fixture"
pypi = "pytest-lazy-fixture/pytest-lazy-fixture-0.6.3.tar.gz"
license("MIT")
version("0.6.3", sha256="0e7d0c7f74ba33e6e80905e9bfd81f9d15ef9a790de97993e34213deb5ad10ac")
depends_on("py-setuptools", type="build")
depends_on("py-pytest@3.2.5:", type=("build", "run"))
# https://github.com/TvoroG/pytest-lazy-fixture/issues/65
depends_on("py-pytest@:7", type=("build", "run"))

View File

@@ -104,7 +104,4 @@ class PyRadicalUtils(PythonPackage):
depends_on("py-pyzmq", type=("build", "run"))
depends_on("py-regex", type=("build", "run"))
depends_on("py-setproctitle", type=("build", "run"))
with default_args(type="build"):
depends_on("py-setuptools")
# https://github.com/radical-cybertools/radical.utils/issues/403
depends_on("py-setuptools@:69.2", when="@:1.51")
depends_on("py-setuptools", type="build")

View File

@@ -11,13 +11,10 @@ class PyRichClick(PythonPackage):
from click, formatted with rich, with minimal customisation required."""
homepage = "https://github.com/ewels/rich-click"
pypi = "rich-click/rich_click-1.8.5.tar.gz"
pypi = "rich-click/rich-click-1.5.2.tar.gz"
license("MIT")
version("1.8.5", sha256="a3eebe81da1c9da3c32f3810017c79bd687ff1b3fa35bfc9d8a3338797f1d1a1")
version("1.7.4", sha256="7ce5de8e4dc0333aec946113529b3eeb349f2e5d2fafee96b9edf8ee36a01395")
version("1.6.1", sha256="f8ff96693ec6e261d1544e9f7d9a5811c5ef5d74c8adb4978430fc0dac16777e")
version("1.5.2", sha256="a57ca70242cb8b372a670eaa0b0be48f2440b66656deb4a56e6aadc1bbb79670")
depends_on("python@3.7:", type=("build", "run"))
@@ -25,12 +22,3 @@ class PyRichClick(PythonPackage):
depends_on("py-click@7:", type=("build", "run"))
depends_on("py-rich@10.7.0:", type=("build", "run"))
depends_on("py-importlib-metadata", type=("build", "run"), when="^python@:3.7")
depends_on("py-typing-extensions@4", type=("build", "run"), when="@1.8.0:")
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/r/rich-click/{0}-{1}.tar.gz"
if version >= Version("1.8.0"):
name = "rich_click"
else:
name = "rich-click"
return url.format(name, version)

View File

@@ -15,7 +15,6 @@ class PyRuff(PythonPackage):
license("MIT")
maintainers("adamjstewart")
version("0.9.1", sha256="fd2b25ecaf907d6458fa842675382c8597b3c746a2dde6717fe3415425df0c17")
version("0.8.1", sha256="3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f")
version("0.8.0", sha256="a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44")
version("0.6.5", sha256="4d32d87fab433c0cf285c3683dd4dae63be05fd7a1d65b3f5bf7cdd05a6b96fb")

View File

@@ -18,7 +18,6 @@ class PyScikitLearn(PythonPackage):
version("main", branch="main")
version("master", branch="main", deprecated=True)
version("1.6.1", sha256="b4fc2525eca2c69a59260f583c56a7557c6ccdf8deafdba6e060f94c1c59738e")
version("1.6.0", sha256="9d58481f9f7499dff4196927aedd4285a0baec8caa3790efbe205f13de37dd6e")
version("1.5.2", sha256="b4237ed7b3fdd0a4882792e68ef2545d5baa50aca3bb45aa7df468138ad8f94d")
version("1.5.1", sha256="0ea5d40c0e3951df445721927448755d3fe1d80833b0b7308ebff5d2a45e6414")

View File

@@ -17,7 +17,6 @@ class PyScipy(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
version("1.15.1", sha256="033a75ddad1463970c96a88063a1df87ccfddd526437136b6ee81ff0312ebdf6")
version("1.15.0", sha256="300742e2cc94e36a2880ebe464a1c8b4352a7b0f3e36ec3d2ac006cdbe0219ac")
version("1.14.1", sha256="5a275584e726026a5699459aa72f828a610821006228e841b94275c4a7c08417")
version("1.14.0", sha256="b5923f48cb840380f9854339176ef21763118a7300a88203ccd0bdd26e58527b")

View File

@@ -19,8 +19,6 @@ class PySetuptools(Package, PythonExtension):
# Requires railroad
skip_modules = ["setuptools._vendor", "pkg_resources._vendor"]
version("75.8.0", sha256="e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3")
version("75.3.0", sha256="f2504966861356aa38616760c0f66568e535562374995367b4e69c7143cf6bcd")
version("69.2.0", sha256="c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c")
version("69.1.1", sha256="02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56")
version("69.0.3", sha256="385eb4edd9c9d5c17540511303e39a147ce2fc04bc55289c322b9e5904fe2c05")

View File

@@ -14,7 +14,6 @@ class PyTimm(PythonPackage):
license("Apache-2.0")
maintainers("adamjstewart")
version("1.0.13", sha256="39190337cff26a15d180b660374c901ac472b69d91d8cfc5a5bb47c600fb3716")
version("1.0.12", sha256="9da490683bd06302ec40e1892f1ccf87985f033e41f3580887d886b9aee9449a")
version("1.0.11", sha256="a005f72b87e67ed30cdbf405a9ffd4e723360c780a43b1cefe266af8ecc9d151")
version("0.9.7", sha256="2bfb1029e90b72e65eb9c75556169815f2e82257eaa1f6ebd623a4b4a52867a2")

View File

@@ -107,6 +107,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
variant("ucc", default=False, description="Use UCC", when="@1.13: +distributed")
variant("gloo", default=True, description="Use Gloo", when="+distributed")
variant("tensorpipe", default=True, description="Use TensorPipe", when="@1.6: +distributed")
variant("onnx_ml", default=True, description="Enable traditional ONNX ML API", when="@1.5:")
variant(
"breakpad",
default=True,
@@ -216,16 +217,16 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
depends_on("gloo+libuv", when="@1.6: platform=darwin")
depends_on("nccl", when="+nccl+cuda")
# https://github.com/pytorch/pytorch/issues/60331
# depends_on("onnx@1.16.0", when="@2.3:")
# depends_on("onnx@1.15.0", when="@2.2")
# depends_on("onnx@1.14.1", when="@2.1")
# depends_on("onnx@1.13.1", when="@2.0")
# depends_on("onnx@1.12.0", when="@1.13:1")
# depends_on("onnx@1.11.0", when="@1.12")
# depends_on("onnx@1.10.1_2021-10-08", when="@1.11")
# depends_on("onnx@1.10.1", when="@1.10")
# depends_on("onnx@1.8.0_2020-11-03", when="@1.8:1.9")
# depends_on("onnx@1.7.0_2020-05-31", when="@1.6:1.7")
# depends_on("onnx@1.16.0", when="@2.3:+onnx_ml")
# depends_on("onnx@1.15.0", when="@2.2+onnx_ml")
# depends_on("onnx@1.14.1", when="@2.1+onnx_ml")
# depends_on("onnx@1.13.1", when="@2.0+onnx_ml")
# depends_on("onnx@1.12.0", when="@1.13:1+onnx_ml")
# depends_on("onnx@1.11.0", when="@1.12+onnx_ml")
# depends_on("onnx@1.10.1_2021-10-08", when="@1.11+onnx_ml")
# depends_on("onnx@1.10.1", when="@1.10+onnx_ml")
# depends_on("onnx@1.8.0_2020-11-03", when="@1.8:1.9+onnx_ml")
# depends_on("onnx@1.7.0_2020-05-31", when="@1.6:1.7+onnx_ml")
with when("~custom-protobuf"):
depends_on("protobuf@3.13.0", when="@1.10:")
depends_on("protobuf@3.11.4", when="@1.6:1.9")
@@ -622,6 +623,11 @@ def enable_or_disable(variant, keyword="USE", var=None):
else:
env.set("DEBUG", "OFF")
if "+onnx_ml" in self.spec:
env.set("ONNX_ML", "ON")
elif "~onnx_ml" in self.spec:
env.set("ONNX_ML", "OFF")
if not self.spec.satisfies("@main"):
env.set("PYTORCH_BUILD_VERSION", self.version)
env.set("PYTORCH_BUILD_NUMBER", 0)

View File

@@ -13,18 +13,12 @@ class PyUnfoldnd(PythonPackage):
license("MIT")
version("0.2.3", sha256="f5b5121d05dafdd70e873ac64a3ecdadfc4c0e8840a0facc86986ede664ab188")
version("0.2.2", sha256="e8fdffeb68bc1b393ddc1b1c87056e0e4616db992e95c7dbc3dc90d564599397")
# https://github.com/f-dangel/unfoldNd/pull/39
depends_on("python@:3.11", when="@0.2.2", type=("build", "run"))
with default_args(type="build"):
depends_on("py-packaging", when="@0.2.3:")
depends_on("py-setuptools@38.3:")
depends_on("py-setuptools-scm")
with default_args(type=("build", "run")):
depends_on("py-packaging", when="@0.2.3:")
depends_on("py-torch")
depends_on("py-numpy")

View File

@@ -13,8 +13,6 @@ class PyWebcolors(PythonPackage):
license("BSD-3-Clause", checked_by="wdconinc")
version("24.11.1", sha256="ecb3d768f32202af770477b8b65f318fa4f566c22948673a977b00d589dd80f6")
version("24.8.0", sha256="08b07af286a01bcd30d583a7acadf629583d1f79bfef27dd2c2c5c263817277d")
version("24.6.0", sha256="1d160d1de46b3e81e58d0a280d0c78b467dc80f47294b91b1ad8029d2cedb55b")
version("1.13", sha256="c225b674c83fa923be93d235330ce0300373d02885cef23238813b0d5668304a")
version("1.12", sha256="16d043d3a08fd6a1b1b7e3e9e62640d09790dce80d2bdd4792a175b35fe794a9")
@@ -23,6 +21,4 @@ class PyWebcolors(PythonPackage):
depends_on("python@3.5:", type=("build", "run"))
depends_on("python@3.7:", type=("build", "run"), when="@1.12:")
depends_on("python@3.8:", type=("build", "run"), when="@24.6:")
depends_on("python@3.9:", type=("build", "run"), when="@24.11:")
depends_on("py-setuptools@61:", type=("build"), when="@:24.10")
depends_on("py-pdm-backend", type=("build"), when="@24.11:")
depends_on("py-setuptools@61:", type=("build"))

View File

@@ -17,7 +17,7 @@ class PyWxpython(PythonPackage):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("wxwidgets +gui")
depends_on("wxwidgets")
# Needed for the build.py script
depends_on("py-setuptools", type="build")

View File

@@ -208,8 +208,6 @@ class Qt(Package):
depends_on("assimp@5.0.0:5", when="@5.5:+opengl")
depends_on("sqlite+column_metadata", when="+sql", type=("build", "run"))
depends_on("inputproto", when="@:5.8")
depends_on("gmake", type="build")
for plat in ["linux", "freebsd"]:
with when(f"platform={plat} +gui"):
depends_on("fontconfig")

View File

@@ -51,7 +51,6 @@ class QuantumEspresso(CMakePackage, Package):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("gmake", type="build")
resource(
name="environ",

View File

@@ -21,11 +21,10 @@ class Rocalution(CMakePackage):
url = "https://github.com/ROCm/rocALUTION/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath", "afzpatel")
maintainers("cgmb", "srekolam", "renjithravindrankannath")
libraries = ["librocalution_hip"]
license("MIT")
version("6.3.0", sha256="a7476e1ce79915cb8e01917de372ae6b15d7e51b1a25e15cde346dadf2391068")
version("6.2.4", sha256="993c55e732d0ee390746890639486649f36ae806110cf7490b9bb5d49b0663c0")
version("6.2.1", sha256="94f15add5316c81529ce84ae8bf2701e9a4df57d08eda04a2f70147d31b12632")
version("6.2.0", sha256="fd9ad0aae5524d3995343d4d7c1948e7b21f0bdf5b1203d1de58548a814a9c39")
@@ -83,7 +82,6 @@ class Rocalution(CMakePackage):
"6.2.0",
"6.2.1",
"6.2.4",
"6.3.0",
]:
depends_on(f"hip@{ver}", when=f"@{ver}")
depends_on(f"rocprim@{ver}", when=f"@{ver}")

View File

@@ -190,7 +190,6 @@ class RocmOpenmpExtras(Package):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("gmake", type="build")
variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")

View File

@@ -46,7 +46,6 @@ class Samtools(Package):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("gmake", type="build")
depends_on("zlib-api")
depends_on("ncurses")
depends_on("perl", type="run")

View File

@@ -19,7 +19,7 @@ class Seqtk(Package):
version("1.1", sha256="f01b9f9af6e443673a0105a7536a01957a4fc371826385a1f3dd1e417aa91d52")
depends_on("c", type="build") # generated
depends_on("gmake", type="build")
depends_on("zlib-api")
def install(self, spec, prefix):

View File

@@ -116,7 +116,6 @@ class Slepc(Package, CudaPackage, ROCmPackage):
# NOTE: make sure PETSc and SLEPc use the same python.
depends_on("python@2.6:2.8,3.4:", type="build")
depends_on("gmake", type="build")
# Cannot mix release and development versions of SLEPc and PETSc:
depends_on("petsc@main", when="@main")

View File

@@ -66,8 +66,6 @@ class SuiteSparse(Package):
# Support for TBB has been removed in version 5.11
variant("tbb", default=False, description="Build with Intel TBB", when="@4.5.3:5.10")
depends_on("gmake", type="build")
depends_on("blas")
depends_on("lapack")
depends_on("cuda", when="+cuda")

View File

@@ -26,7 +26,7 @@ class Tfel(CMakePackage):
constraints on each component of the strain or the stress.
"""
homepage = "https://thelfer.github.io/tfel/web/index.html"
homepage = "https://tfel.sourceforge.net"
url = "https://github.com/thelfer/tfel/archive/TFEL-4.0.tar.gz"
git = "https://github.com/thelfer/tfel.git"
maintainers("thelfer")
@@ -155,22 +155,12 @@ class Tfel(CMakePackage):
depends_on("python", when="+python_bindings", type=("build", "link", "run"))
depends_on("py-numpy", when="+python_bindings", type=("build", "link", "run"))
with when("@5.1:"):
depends_on("py-pybind11", when="+python_bindings", type=("build", "link", "run"))
with when("@2.0.4:5.0.99"):
depends_on(
"boost+python+numpy+exception+container",
when="+python_bindings",
type=("build", "link", "run"),
)
with when("@rliv1.2:rliv5.0"):
depends_on(
"boost+python+numpy+exception+container",
when="+python_bindings",
type=("build", "link", "run"),
)
# As boost+py has py runtime dependency, boost+py needs types link and run as well:
depends_on(
"boost+python+numpy+exception+container",
when="+python_bindings",
type=("build", "link", "run"),
)
extends("python", when="+python_bindings")
@@ -219,14 +209,9 @@ def cmake_args(self):
args.append("-DPython_ADDITIONAL_VERSIONS={0}".format(python.version.up_to(2)))
if "+python_bindings" in self.spec:
if "py-pybind11" in self.spec:
args.append("-Dpybind11_DIR={0}".format(self.spec["py-pybind11"].prefix))
if "boost" in self.spec:
args.append("-DBOOST_ROOT={0}".format(self.spec["boost"].prefix))
args.append("-DBoost_NO_SYSTEM_PATHS=ON")
args.append("-DBoost_NO_BOOST_CMAKE=ON")
args.append("-DBOOST_ROOT={0}".format(self.spec["boost"].prefix))
args.append("-DBoost_NO_SYSTEM_PATHS=ON")
args.append("-DBoost_NO_BOOST_CMAKE=ON")
return args

View File

@@ -22,7 +22,7 @@ class Typst(CargoPackage):
depends_on("rust@1.81.0:")
depends_on("openssl")
depends_on("pkgconfig", type="build")
depends_on("pkgconf", type="build")
@classmethod
def determine_version(cls, exe):

View File

@@ -98,11 +98,11 @@ class Upcxx(Package, CudaPackage, ROCmPackage):
deprecated=True,
sha256="01be35bef4c0cfd24e9b3d50c88866521b9cac3ad4cbb5b1fc97aea55078810f",
)
# Do NOT add older versions here.
# UPC++ releases over 2 years old are not supported.
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("gmake", type="build")
# Do NOT add older versions here.
# UPC++ releases over 2 years old are not supported.
patch("fix_configure_ldflags.patch", when="@2021.9.0:master")

View File

@@ -18,25 +18,26 @@ class Vbfnlo(AutotoolsPackage):
license("GPL-2.0-only")
# The commented out versions exist, but are not tested
version("3.0", sha256="b9df02603e4f801f866360c720191a29afdb958d0bd4369ea7d810e761503e51")
with default_args(deprecated=True):
# deprecate beta versions which are such that they are preferred over 3.0
version(
"3.0.0beta5", sha256="777a3dedb365ea9abc38848a60f30d325da3799cbad69fa308664b94a8c31a90"
)
version(
"3.0.0beta4", sha256="511e84765e9634a75766a160eae1925812dacbb3943e7e3b4dc90e2eacac8a2c"
)
version(
"3.0.0beta3", sha256="ab4cc3289051ab09ed94fa41d0eb1c5c4adcd9f39fa04e3c95a3867f256541bc"
)
version(
"3.0.0beta2", sha256="33dd0781e645a5baa664fc5aa81d43c12586bf095ef25895e86cb4192c22473b"
)
version(
"3.0.0beta1", sha256="19f0bf7e4c93b0f287d2531d6802c114a78eb46cde28ea820b2a074a5819c7ca"
)
version("2.7.1", sha256="13e33d73d8a8ef64094621f87e6f94e01712e76cc19a86298d0b52cfcb9decca")
version(
"3.0.0beta5", sha256="777a3dedb365ea9abc38848a60f30d325da3799cbad69fa308664b94a8c31a90"
)
version(
"3.0.0beta4", sha256="511e84765e9634a75766a160eae1925812dacbb3943e7e3b4dc90e2eacac8a2c"
)
# version('3.0.0beta3', sha256='ab4cc3289051ab09ed94fa41d0eb1c5c4adcd9f39fa04e3c95a3867f256541bc')
version(
"3.0.0beta2", sha256="33dd0781e645a5baa664fc5aa81d43c12586bf095ef25895e86cb4192c22473b"
)
version(
"3.0.0beta1", sha256="19f0bf7e4c93b0f287d2531d6802c114a78eb46cde28ea820b2a074a5819c7ca"
)
version(
"2.7.1",
sha256="13e33d73d8a8ef64094621f87e6f94e01712e76cc19a86298d0b52cfcb9decca",
preferred=True,
)
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
@@ -71,6 +72,6 @@ def configure_args(self):
return args
@when("@3: ~doc")
@when("@3.0.0beta3:~doc")
def patch(self):
filter_file("lib src doc", "lib src", "Makefile.am")

View File

@@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import re
from spack.package import *
@@ -52,7 +51,6 @@ class Visit(CMakePackage):
tags = ["radiuss"]
maintainers("cyrush")
license("BSD-3-Clause")
extendable = True

View File

@@ -24,11 +24,10 @@ class Vtk(CMakePackage):
license("BSD-3-Clause")
version(
"9.4.1",
sha256="c253b0c8d002aaf98871c6d0cb76afc4936c301b72358a08d5f3f72ef8bc4529",
"9.3.1",
sha256="8354ec084ea0d2dc3d23dbe4243823c4bfc270382d0ce8d658939fd50061cab8",
preferred=True,
)
version("9.3.1", sha256="8354ec084ea0d2dc3d23dbe4243823c4bfc270382d0ce8d658939fd50061cab8")
version("9.2.6", sha256="06fc8d49c4e56f498c40fcb38a563ed8d4ec31358d0101e8988f0bb4d539dd12")
version("9.2.2", sha256="1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075")
version("9.1.0", sha256="8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96")
@@ -201,8 +200,6 @@ class Vtk(CMakePackage):
depends_on("seacas+mpi", when="+mpi")
depends_on("seacas~mpi", when="~mpi")
depends_on("seacas@2021-05-12:")
with when("@9.4:"):
depends_on("seacas@2024-06-27:")
# seacas@2023-05-30 does not provide needed SEACASIoss_INCLUDE_DIRS:
# CMake Error at CMake/vtkModule.cmake:5552 (message):
@@ -305,7 +302,6 @@ def cmake_args(self):
"-DVTK_MODULE_USE_EXTERNAL_VTK_fast_float:BOOL=OFF",
"-DVTK_MODULE_USE_EXTERNAL_VTK_libharu:BOOL=OFF",
"-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl:BOOL=OFF",
"-DVTK_MODULE_USE_EXTERNAL_VTK_token:BOOL=OFF",
"-DHDF5_ROOT={0}".format(spec["hdf5"].prefix),
]
)