Compare commits
26 Commits
hs/fix/sho
...
features/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
382a5ab169 | ||
|
|
77957e682a | ||
|
|
46da7952d3 | ||
|
|
72783bcb0a | ||
|
|
f4d2ff0068 | ||
|
|
a2b7fee3fe | ||
|
|
2ebf2df421 | ||
|
|
e725aa527e | ||
|
|
7455c8d173 | ||
|
|
99e2bce99f | ||
|
|
4204d16fd3 | ||
|
|
e76677cbd5 | ||
|
|
57357a540f | ||
|
|
97e0b39b32 | ||
|
|
247da9ea7a | ||
|
|
07f89a73d1 | ||
|
|
60cfdcb6cc | ||
|
|
1c9b042d3a | ||
|
|
c424611010 | ||
|
|
35963d7d7d | ||
|
|
7e62ca864a | ||
|
|
fa9ef0ac89 | ||
|
|
55d9fe20e5 | ||
|
|
434a8d54d4 | ||
|
|
7328c64fc7 | ||
|
|
4be7b98fd2 |
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
- run: coverage xml
|
||||
|
||||
- name: "Upload coverage report to CodeCov"
|
||||
uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766
|
||||
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303
|
||||
with:
|
||||
verbose: true
|
||||
fail_ci_if_error: false
|
||||
|
||||
@@ -25,14 +25,23 @@ These settings can be overridden in ``etc/spack/config.yaml`` or
|
||||
The location where Spack will install packages and their dependencies.
|
||||
Default is ``$spack/opt/spack``.
|
||||
|
||||
---------------------------------------------------
|
||||
``install_hash_length`` and ``install_path_scheme``
|
||||
---------------------------------------------------
|
||||
---------------
|
||||
``projections``
|
||||
---------------
|
||||
|
||||
The default Spack installation path can be very long and can create problems
|
||||
for scripts with hardcoded shebangs. Additionally, when using the Intel
|
||||
compiler, and if there is also a long list of dependencies, the compiler may
|
||||
segfault. If you see the following:
|
||||
.. warning::
|
||||
|
||||
Modifying projections of the install tree is strongly discouraged.
|
||||
|
||||
By default Spack installs all packages into a unique directory relative to the install
|
||||
tree root with the following layout:
|
||||
|
||||
.. code-block::
|
||||
|
||||
{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}
|
||||
|
||||
In very rare cases, it may be necessary to reduce the length of this path. For example,
|
||||
very old versions of the Intel compiler are known to segfault when input paths are too long:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@@ -40,36 +49,25 @@ segfault. If you see the following:
|
||||
** Segmentation violation signal raised. **
|
||||
Access violation or stack overflow. Please contact Intel Support for assistance.
|
||||
|
||||
it may be because variables containing dependency specs may be too long. There
|
||||
are two parameters to help with long path names. Firstly, the
|
||||
``install_hash_length`` parameter can set the length of the hash in the
|
||||
installation path from 1 to 32. The default path uses the full 32 characters.
|
||||
Another case is Python and R packages with many runtime dependencies, which can result
|
||||
in very large ``PYTHONPATH`` and ``R_LIBS`` environment variables. This can cause the
|
||||
``execve`` system call to fail with ``E2BIG``, preventing processes from starting.
|
||||
|
||||
Secondly, it is also possible to modify the entire installation
|
||||
scheme. By default Spack uses
|
||||
``{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}``
|
||||
where the tokens that are available for use in this directive are the
|
||||
same as those understood by the :meth:`~spack.spec.Spec.format`
|
||||
method. Using this parameter it is possible to use a different package
|
||||
layout or reduce the depth of the installation paths. For example
|
||||
For this reason, Spack allows users to modify the installation layout through custom
|
||||
projections. For example
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
config:
|
||||
install_path_scheme: '{name}/{version}/{hash:7}'
|
||||
install_tree:
|
||||
root: $spack/opt/spack
|
||||
projections:
|
||||
all: "{name}/{version}/{hash:16}"
|
||||
|
||||
would install packages into sub-directories using only the package
|
||||
name, version and a hash length of 7 characters.
|
||||
would install packages into sub-directories using only the package name, version and a
|
||||
hash length of 16 characters.
|
||||
|
||||
When using either parameter to set the hash length it only affects the
|
||||
representation of the hash in the installation directory. You
|
||||
should be aware that the smaller the hash length the more likely
|
||||
naming conflicts will occur. These parameters are independent of those
|
||||
used to configure module names.
|
||||
|
||||
.. warning:: Modifying the installation hash length or path scheme after
|
||||
packages have been installed will prevent Spack from being
|
||||
able to find the old installation directories.
|
||||
Notice that reducing the hash length increases the likelihood of hash collisions.
|
||||
|
||||
--------------------
|
||||
``build_stage``
|
||||
|
||||
@@ -4,7 +4,7 @@ sphinx_design==0.6.1
|
||||
sphinx-rtd-theme==3.0.2
|
||||
python-levenshtein==0.26.1
|
||||
docutils==0.21.2
|
||||
pygments==2.18.0
|
||||
pygments==2.19.1
|
||||
urllib3==2.3.0
|
||||
pytest==8.3.4
|
||||
isort==5.13.2
|
||||
|
||||
@@ -298,7 +298,14 @@ def initconfig_hardware_entries(self):
|
||||
def std_initconfig_entries(self):
|
||||
cmake_prefix_path_env = os.environ["CMAKE_PREFIX_PATH"]
|
||||
cmake_prefix_path = cmake_prefix_path_env.replace(os.pathsep, ";")
|
||||
|
||||
complete_rpath_list = ";".join(
|
||||
[
|
||||
self.pkg.spec.prefix.lib,
|
||||
self.pkg.spec.prefix.lib64,
|
||||
*os.environ.get("SPACK_COMPILER_EXTRA_RPATHS", "").split(":"),
|
||||
*os.environ.get("SPACK_COMPILER_IMPLICIT_RPATHS", "").split(":"),
|
||||
]
|
||||
)
|
||||
return [
|
||||
"#------------------{0}".format("-" * 60),
|
||||
"# !!!! This is a generated file, edit at own risk !!!!",
|
||||
@@ -307,6 +314,8 @@ def std_initconfig_entries(self):
|
||||
"#------------------{0}\n".format("-" * 60),
|
||||
cmake_cache_string("CMAKE_PREFIX_PATH", cmake_prefix_path),
|
||||
cmake_cache_string("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "ON"),
|
||||
cmake_cache_string("CMAKE_BUILD_RPATH", complete_rpath_list),
|
||||
cmake_cache_string("CMAKE_INSTALL_RPATH", complete_rpath_list),
|
||||
self.define_cmake_cache_from_variant("CMAKE_BUILD_TYPE", "build_type"),
|
||||
]
|
||||
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
import spack.builder
|
||||
import spack.package_base
|
||||
import spack.phase_callbacks
|
||||
from spack.directives import build_system, extends
|
||||
from spack.directives import build_system, depends_on, extends
|
||||
from spack.install_test import SkipTest, test_part
|
||||
from spack.multimethod import when
|
||||
from spack.util.executable import Executable
|
||||
|
||||
from ._checks import BuilderWithDefaults, execute_build_time_tests
|
||||
@@ -28,7 +29,9 @@ class PerlPackage(spack.package_base.PackageBase):
|
||||
|
||||
build_system("perl")
|
||||
|
||||
extends("perl", when="build_system=perl")
|
||||
with when("build_system=perl"):
|
||||
extends("perl")
|
||||
depends_on("gmake", type="build")
|
||||
|
||||
@property
|
||||
@memoized
|
||||
|
||||
@@ -636,6 +636,7 @@ def generate_ir(self):
|
||||
"script": [
|
||||
"cd {env_dir}",
|
||||
"spack env activate --without-view .",
|
||||
"spack spec /$SPACK_JOB_SPEC_DAG_HASH",
|
||||
"spack ci rebuild",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Tuple
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
|
||||
import llnl.util.filesystem as fs
|
||||
from llnl.util.symlink import readlink
|
||||
@@ -17,7 +17,6 @@
|
||||
import spack.hash_types as ht
|
||||
import spack.projections
|
||||
import spack.spec
|
||||
import spack.store
|
||||
import spack.util.spack_json as sjson
|
||||
from spack.error import SpackError
|
||||
|
||||
@@ -69,10 +68,9 @@ def specs_from_metadata_dirs(root: str) -> List["spack.spec.Spec"]:
|
||||
|
||||
|
||||
class DirectoryLayout:
|
||||
"""A directory layout is used to associate unique paths with specs.
|
||||
Different installations are going to want different layouts for their
|
||||
install, and they can use this to customize the nesting structure of
|
||||
spack installs. The default layout is:
|
||||
"""A directory layout is used to associate unique paths with specs. Different installations are
|
||||
going to want different layouts for their install, and they can use this to customize the
|
||||
nesting structure of spack installs. The default layout is:
|
||||
|
||||
* <install root>/
|
||||
|
||||
@@ -82,35 +80,30 @@ class DirectoryLayout:
|
||||
|
||||
* <name>-<version>-<hash>
|
||||
|
||||
The hash here is a SHA-1 hash for the full DAG plus the build
|
||||
spec.
|
||||
The installation directory projections can be modified with the projections argument."""
|
||||
|
||||
The installation directory projections can be modified with the
|
||||
projections argument.
|
||||
"""
|
||||
|
||||
def __init__(self, root, **kwargs):
|
||||
def __init__(
|
||||
self,
|
||||
root,
|
||||
*,
|
||||
projections: Optional[Dict[str, str]] = None,
|
||||
hash_length: Optional[int] = None,
|
||||
) -> None:
|
||||
self.root = root
|
||||
self.check_upstream = True
|
||||
projections = kwargs.get("projections") or default_projections
|
||||
self.projections = dict(
|
||||
(key, projection.lower()) for key, projection in projections.items()
|
||||
)
|
||||
projections = projections or default_projections
|
||||
self.projections = {key: projection.lower() for key, projection in projections.items()}
|
||||
|
||||
# apply hash length as appropriate
|
||||
self.hash_length = kwargs.get("hash_length", None)
|
||||
self.hash_length = hash_length
|
||||
if self.hash_length is not None:
|
||||
for when_spec, projection in self.projections.items():
|
||||
if "{hash}" not in projection:
|
||||
if "{hash" in projection:
|
||||
raise InvalidDirectoryLayoutParametersError(
|
||||
"Conflicting options for installation layout hash" " length"
|
||||
)
|
||||
else:
|
||||
raise InvalidDirectoryLayoutParametersError(
|
||||
"Cannot specify hash length when the hash is not"
|
||||
" part of all install_tree projections"
|
||||
)
|
||||
raise InvalidDirectoryLayoutParametersError(
|
||||
"Conflicting options for installation layout hash length"
|
||||
if "{hash" in projection
|
||||
else "Cannot specify hash length when the hash is not part of all "
|
||||
"install_tree projections"
|
||||
)
|
||||
self.projections[when_spec] = projection.replace(
|
||||
"{hash}", "{hash:%d}" % self.hash_length
|
||||
)
|
||||
@@ -279,13 +272,6 @@ def path_for_spec(self, spec):
|
||||
|
||||
if spec.external:
|
||||
return spec.external_path
|
||||
if self.check_upstream:
|
||||
upstream, record = spack.store.STORE.db.query_by_spec_hash(spec.dag_hash())
|
||||
if upstream:
|
||||
raise SpackError(
|
||||
"Internal error: attempted to call path_for_spec on"
|
||||
" upstream-installed package."
|
||||
)
|
||||
|
||||
path = self.relative_path_for_spec(spec)
|
||||
assert not path.startswith(self.root)
|
||||
|
||||
@@ -503,7 +503,7 @@ def make_argument_parser(**kwargs):
|
||||
return parser
|
||||
|
||||
|
||||
def send_warning_to_tty(message, category, filename, lineno, file=None, line=None):
|
||||
def showwarning(message, category, filename, lineno, file=None, line=None):
|
||||
"""Redirects messages to tty.warn."""
|
||||
if category is spack.error.SpackAPIWarning:
|
||||
tty.warn(f"{filename}:{lineno}: {message}")
|
||||
@@ -513,9 +513,6 @@ def send_warning_to_tty(message, category, filename, lineno, file=None, line=Non
|
||||
|
||||
def setup_main_options(args):
|
||||
"""Configure spack globals based on the basic options."""
|
||||
# Assign a custom function to show warnings
|
||||
warnings.showwarning = send_warning_to_tty
|
||||
|
||||
# Set up environment based on args.
|
||||
tty.set_verbose(args.verbose)
|
||||
tty.set_debug(args.debug)
|
||||
@@ -906,9 +903,10 @@ def _main(argv=None):
|
||||
# main() is tricky to get right, so be careful where you put things.
|
||||
#
|
||||
# Things in this first part of `main()` should *not* require any
|
||||
# configuration. This doesn't include much -- setting up th parser,
|
||||
# configuration. This doesn't include much -- setting up the parser,
|
||||
# restoring some key environment variables, very simple CLI options, etc.
|
||||
# ------------------------------------------------------------------------
|
||||
warnings.showwarning = showwarning
|
||||
|
||||
# Create a parser with a simple positional argument first. We'll
|
||||
# lazily load the subcommand(s) we need later. This allows us to
|
||||
|
||||
@@ -106,10 +106,17 @@
|
||||
{
|
||||
"names": ["install_missing_compilers"],
|
||||
"message": "The config:install_missing_compilers option has been deprecated in "
|
||||
"Spack v0.23, and is currently ignored. It will be removed from config after "
|
||||
"Spack v0.23, and is currently ignored. It will be removed from config in "
|
||||
"Spack v1.0.",
|
||||
"error": False,
|
||||
},
|
||||
{
|
||||
"names": ["install_path_scheme"],
|
||||
"message": "The config:install_path_scheme option was deprecated in Spack v0.16 "
|
||||
"in favor of config:install_tree:projections:all. It will be removed in Spack "
|
||||
"v1.0.",
|
||||
"error": False,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
import spack.util.url as url_util
|
||||
import spack.util.web as web_util
|
||||
from spack.binary_distribution import CannotListKeys, GenerateIndexError
|
||||
from spack.directory_layout import DirectoryLayout
|
||||
from spack.paths import test_path
|
||||
from spack.spec import Spec
|
||||
|
||||
@@ -136,35 +135,28 @@ def default_config(tmp_path, config_directory, monkeypatch, install_mockery):
|
||||
@pytest.fixture(scope="function")
|
||||
def install_dir_default_layout(tmpdir):
|
||||
"""Hooks a fake install directory with a default layout"""
|
||||
scheme = os.path.join(
|
||||
"${architecture}", "${compiler.name}-${compiler.version}", "${name}-${version}-${hash}"
|
||||
)
|
||||
real_store, real_layout = spack.store.STORE, spack.store.STORE.layout
|
||||
opt_dir = tmpdir.join("opt")
|
||||
spack.store.STORE = spack.store.Store(str(opt_dir))
|
||||
spack.store.STORE.layout = DirectoryLayout(str(opt_dir), path_scheme=scheme)
|
||||
original_store, spack.store.STORE = spack.store.STORE, spack.store.Store(str(opt_dir))
|
||||
try:
|
||||
yield spack.store
|
||||
finally:
|
||||
spack.store.STORE = real_store
|
||||
spack.store.STORE.layout = real_layout
|
||||
spack.store.STORE = original_store
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def install_dir_non_default_layout(tmpdir):
|
||||
"""Hooks a fake install directory with a non-default layout"""
|
||||
scheme = os.path.join(
|
||||
"${name}", "${version}", "${architecture}-${compiler.name}-${compiler.version}-${hash}"
|
||||
)
|
||||
real_store, real_layout = spack.store.STORE, spack.store.STORE.layout
|
||||
opt_dir = tmpdir.join("opt")
|
||||
spack.store.STORE = spack.store.Store(str(opt_dir))
|
||||
spack.store.STORE.layout = DirectoryLayout(str(opt_dir), path_scheme=scheme)
|
||||
original_store, spack.store.STORE = spack.store.STORE, spack.store.Store(
|
||||
str(opt_dir),
|
||||
projections={
|
||||
"all": "{name}/{version}/{architecture}-{compiler.name}-{compiler.version}-{hash}"
|
||||
},
|
||||
)
|
||||
try:
|
||||
yield spack.store
|
||||
finally:
|
||||
spack.store.STORE = real_store
|
||||
spack.store.STORE.layout = real_layout
|
||||
spack.store.STORE = original_store
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
|
||||
@@ -312,6 +312,7 @@ def test_ci_generate_with_custom_settings(
|
||||
"spack -d ci rebuild",
|
||||
"cd ENV",
|
||||
"spack env activate --without-view .",
|
||||
"spack spec /$SPACK_JOB_SPEC_DAG_HASH",
|
||||
"spack ci rebuild",
|
||||
]
|
||||
assert ci_obj["after_script"] == ["rm -rf /some/path/spack"]
|
||||
|
||||
@@ -13,6 +13,7 @@ spack:
|
||||
- openjpeg # CMakePackage
|
||||
- r-rcpp # RPackage
|
||||
- ruby-rake # RubyPackage
|
||||
- perl-data-dumper # PerlPackage
|
||||
- arch:
|
||||
- '%gcc'
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class AbseilCpp(CMakePackage):
|
||||
depends_on("cmake@3.5:", when="@20190312:", type="build")
|
||||
depends_on("cmake@3.1:", type="build")
|
||||
|
||||
depends_on("googletest", type="build", when="@20220623:")
|
||||
depends_on("googletest~absl", type="test", when="@20220623:")
|
||||
|
||||
def cmake_args(self):
|
||||
run_tests = self.run_tests and self.spec.satisfies("@20220623:")
|
||||
|
||||
@@ -20,6 +20,7 @@ class FluxCore(AutotoolsPackage):
|
||||
license("LGPL-3.0-only")
|
||||
|
||||
version("master", branch="master")
|
||||
version("0.67.0", sha256="9406e776cbeff971881143fd1b94c42ec912e5b226401d2d3d91d766dd81de8c")
|
||||
version("0.66.0", sha256="0a25cfb1ebc033c249614eb2350c6fb57b00cdf3c584d0759c787f595c360daa")
|
||||
version("0.65.0", sha256="a60bc7ed13b8e6d09e99176123a474aad2d9792fff6eb6fd4da2a00e1d2865ab")
|
||||
version("0.64.0", sha256="0334d6191915f1b89b70cdbf14f24200f8899da31090df5f502020533b304bb3")
|
||||
@@ -96,6 +97,7 @@ class FluxCore(AutotoolsPackage):
|
||||
depends_on("py-pyyaml@3.10:", type=("build", "run"))
|
||||
depends_on("py-jsonschema@2.3:", type=("build", "run"), when="@:0.58.0")
|
||||
depends_on("py-ply", type=("build", "run"), when="@0.46.1:")
|
||||
depends_on("py-setuptools", type="build", when="@0.67.0:")
|
||||
depends_on("jansson@2.10:")
|
||||
depends_on("pkgconfig")
|
||||
depends_on("lz4")
|
||||
|
||||
@@ -56,8 +56,6 @@ class Geant4Data(BundlePackage):
|
||||
"g4incl@1.2",
|
||||
"g4ensdfstate@3.0",
|
||||
"g4channeling@1.0",
|
||||
"g4nudexlib@1.0",
|
||||
"g4urrpt@1.1",
|
||||
],
|
||||
"11.2.2:11.2": [
|
||||
"g4ndl@4.7.1",
|
||||
@@ -195,6 +193,23 @@ class Geant4Data(BundlePackage):
|
||||
for _d in _dsets:
|
||||
depends_on(_d, type=("build", "run"), when=_vers)
|
||||
|
||||
_datasets_tendl = {
|
||||
"11.0:11.3": "g4tendl@1.4",
|
||||
"10.4:10.7": "g4tendl@1.3.2",
|
||||
"10.3:10.3": "g4tendl@1.3",
|
||||
}
|
||||
|
||||
variant("tendl", default=True, when="@10.3:", description="Enable G4TENDL")
|
||||
with when("+tendl"):
|
||||
for _vers, _d in _datasets_tendl.items():
|
||||
depends_on(_d, type=("build", "run"), when="@" + _vers)
|
||||
variant("nudexlib", default=True, when="@11.3.0:11.3", description="Enable G4NUDEXLIB")
|
||||
with when("+nudexlib"):
|
||||
depends_on("g4nudexlib@1.0", type=("build", "run"))
|
||||
variant("urrpt", default=True, when="@11.3.0:11.3", description="Enable G4URRPT")
|
||||
with when("+urrpt"):
|
||||
depends_on("g4urrpt@1.1", type=("build", "run"))
|
||||
|
||||
@property
|
||||
def datadir(self):
|
||||
spec = self.spec
|
||||
|
||||
@@ -15,6 +15,8 @@ class Googletest(CMakePackage):
|
||||
maintainers("sethrj")
|
||||
|
||||
version("main", branch="main")
|
||||
version("1.15.2", sha256="7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926")
|
||||
version("1.15.0", sha256="7315acb6bf10e99f332c8a43f00d5fbb1ee6ca48c52f6b936991b216c586aaad")
|
||||
version("1.14.0", sha256="8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7")
|
||||
version("1.13.0", sha256="ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363")
|
||||
version("1.12.1", sha256="81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2")
|
||||
@@ -29,14 +31,18 @@ class Googletest(CMakePackage):
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant("absl", default=False, when="@1.12.1:", description="Build with abseil and RE2")
|
||||
depends_on("abseil-cpp", when="+absl")
|
||||
depends_on("re2", when="+absl")
|
||||
|
||||
variant("gmock", default=True, when="@1.8:", description="Build with gmock")
|
||||
variant("pthreads", default=True, description="Build multithreaded version with pthreads")
|
||||
variant("shared", default=True, description="Build shared libraries (DLLs)")
|
||||
|
||||
variant(
|
||||
"cxxstd",
|
||||
default="11",
|
||||
values=("98", "11", "14", "17"),
|
||||
default="14",
|
||||
values=("98", "11", "14", "17", "20"),
|
||||
multi=False,
|
||||
description="Use the specified C++ standard when building",
|
||||
)
|
||||
@@ -48,12 +54,13 @@ def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
|
||||
self.define_from_variant("BUILD_GMOCK", "gmock"),
|
||||
self.define_from_variant("GTEST_HAS_ABSL", "absl"),
|
||||
self.define("gtest_disable_pthreads", spec.satisfies("~pthreads")),
|
||||
]
|
||||
args.append(self.define("gtest_disable_pthreads", not spec.satisfies("+pthreads")))
|
||||
if spec.satisfies("@1.8:"):
|
||||
# New style (contains both Google Mock and Google Test)
|
||||
|
||||
if spec.satisfies("@:1.8.0"):
|
||||
args.append(self.define("BUILD_GTEST", True))
|
||||
args.append(self.define_from_variant("BUILD_GMOCK", "gmock"))
|
||||
|
||||
return args
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ class Libmesh(AutotoolsPackage):
|
||||
|
||||
version("master", branch="master", submodules=True)
|
||||
|
||||
version("1.7.6", sha256="65093cc97227193241f78647ec2f04a1852437f40d3d1c49285c6ff712cd0bc8")
|
||||
version("1.7.5", sha256="03a50cb471e7724a46623f0892cf77152f969d9ba89f8fcebd20bdc0845aab83")
|
||||
version("1.7.4", sha256="0d603aacd2761292dff61ff7ce59d9fddd8691133f0219f7d1576bd4626b77b2")
|
||||
version("1.7.3", sha256="fe0bec45a083ddd9e87dc51ab7e68039f3859e7ef0c4a87e76e562b172b6f739")
|
||||
version("1.7.1", sha256="0387d62773cf92356eb128ba92f767e56c298d78f4b97446e68bf288da1eb6b4")
|
||||
version("1.4.1", sha256="67eb7d5a9c954d891ca1386b70f138333a87a141d9c44213449ca6be69a66414")
|
||||
version("1.4.0", sha256="62d7fce89096c950d1b38908484856ea63df57754b64cde6582e7ac407c8c81d")
|
||||
|
||||
@@ -42,7 +42,7 @@ class Libspatialite(AutotoolsPackage):
|
||||
depends_on("geos@:3.9", when="@:5.0.0")
|
||||
depends_on("iconv")
|
||||
depends_on("librttopo", when="@5.0.1:")
|
||||
depends_on("libxml2")
|
||||
depends_on("libxml2+http")
|
||||
depends_on("minizip", when="@5.0.0:")
|
||||
depends_on("proj")
|
||||
depends_on("proj@:5", when="@:4")
|
||||
|
||||
@@ -56,6 +56,7 @@ class Llvm(CMakePackage, CudaPackage, LlvmDetection, CompilerPackage):
|
||||
license("Apache-2.0")
|
||||
|
||||
version("main", branch="main")
|
||||
version("19.1.6", sha256="f07fdcbb27b2b67aa95e5ddadf45406b33228481c250e65175066d36536a1ee2")
|
||||
version("19.1.5", sha256="e2204b9903cd9d7ee833a2f56a18bef40a33df4793e31cc090906b32cbd8a1f5")
|
||||
version("19.1.4", sha256="010e1fd3cabee8799bd2f8a6fbc68f28207494f315cf9da7057a2820f79fd531")
|
||||
version("19.1.3", sha256="e5106e2bef341b3f5e41340e4b6c6a58259f4021ad801acf14e88f1a84567b05")
|
||||
|
||||
@@ -15,6 +15,7 @@ class Mold(CMakePackage):
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("2.36.0", sha256="3f57fe75535500ecce7a80fa1ba33675830b7d7deb1e5ee9a737e2bc43cdb1c7")
|
||||
version("2.35.1", sha256="912b90afe7fde03e53db08d85a62c7b03a57417e54afc72c08e2fa07cab421ff")
|
||||
version("2.35.0", sha256="2703f1c88c588523815886478950bcae1ef02190dc4787e0d120a293b1a46e3b")
|
||||
version("2.34.1", sha256="a8cf638045b4a4b2697d0bcc77fd96eae93d54d57ad3021bf03b0333a727a59d")
|
||||
|
||||
@@ -36,13 +36,27 @@ class Ninja(Package):
|
||||
version("1.7.2", sha256="2edda0a5421ace3cf428309211270772dd35a91af60c96f93f90df6bc41b16d9")
|
||||
version("1.6.0", sha256="b43e88fb068fe4d92a3dfd9eb4d19755dae5c33415db2e9b7b61b4659009cde7")
|
||||
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
# ninja@1.12: needs googletest source, but 1.12 itself needs a patch to use it
|
||||
resource(
|
||||
name="googletest",
|
||||
url="https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
|
||||
sha256="81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2",
|
||||
placement="gtest",
|
||||
when="@1.12:",
|
||||
)
|
||||
patch(
|
||||
"https://github.com/ninja-build/ninja/commit/f14a949534d673f847c407644441c8f37e130ce9.patch?full_index=1",
|
||||
sha256="93f4bb3234c3af04e2454c6f0ef2eca3107edd4537a70151ea66f1a1d4c22dad",
|
||||
when="@1.12",
|
||||
)
|
||||
|
||||
variant(
|
||||
"re2c", default=not sys.platform == "win32", description="Enable buidling Ninja with re2c"
|
||||
)
|
||||
|
||||
depends_on("c", type="build") # generated
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
depends_on("python", type="build")
|
||||
depends_on("re2c@0.11.3:", type="build", when="+re2c")
|
||||
|
||||
@@ -54,7 +68,10 @@ def determine_version(cls, exe):
|
||||
return output.strip()
|
||||
|
||||
def configure(self, spec, prefix):
|
||||
python("configure.py", "--bootstrap")
|
||||
if self.run_tests and spec.satisfies("@1.12:"):
|
||||
python("configure.py", "--bootstrap", "--gtest-source-dir=gtest")
|
||||
else:
|
||||
python("configure.py", "--bootstrap")
|
||||
|
||||
@run_after("configure")
|
||||
@on_package_attributes(run_tests=True)
|
||||
|
||||
@@ -78,7 +78,10 @@ def install(self, spec, prefix):
|
||||
string=True,
|
||||
)
|
||||
|
||||
configure(*(base_args), f"CC={self.compiler.cc}")
|
||||
if self.spec.satisfies("@4.8.0:"):
|
||||
base_args += [f"CC={self.compiler.cc}"]
|
||||
|
||||
configure(*(base_args))
|
||||
|
||||
make("world.opt")
|
||||
make("install", "PREFIX={0}".format(prefix))
|
||||
|
||||
@@ -8,21 +8,66 @@
|
||||
class PyIminuit(PythonPackage):
|
||||
"""Interactive IPython-Friendly Minimizer based on SEAL Minuit2."""
|
||||
|
||||
homepage = "http://github.com/scikit-hep/iminuit"
|
||||
pypi = "iminuit/iminuit-1.2.tar.gz"
|
||||
|
||||
tags = ["hep"]
|
||||
|
||||
license("MIT AND LGPL-2.0-only", checked_by="wdconinc")
|
||||
|
||||
version("2.30.1", sha256="2815bfdeb8e7f78185f316b75e2d4b19d0f6993bdc5ff03352ed37b70a796360")
|
||||
version("2.29.1", sha256="474d10eb2f924b9320f6f7093e4c149d0a38c124d0419c12a07a3eca942de025")
|
||||
version("2.28.0", sha256="6646ae0b66a4760e02cd73711d460a6cf2375382b78ce8344141751595596aad")
|
||||
version("2.27.0", sha256="4ce830667730e76d20b10416a5851672c7fcc301dd1f48b9143cfd187b89ab8e")
|
||||
version("2.26.0", sha256="a51233fbf1c2e008aa584f9eea65b6c30ed56624e4dea5d4e53370ccd84c9b4e")
|
||||
version("2.25.2", sha256="3bf8a1b96865a60cedf29135f4feae09fa7c66237d29f68ded64e97a823a9b3e")
|
||||
version("2.24.0", sha256="25ab631c3c8e024b1bcc7c96f66338caac54a4a2324d55f1e3ba5617816e44fd")
|
||||
version("2.23.0", sha256="98f1589eb18d4882232ff1556d62e7ca19c91bbab7524ac8b405261a674452a1")
|
||||
version("2.22.0", sha256="e0ccc37bad8bc1bd3b9d3fa07d28d4c0407e25a888faa9b559be2d9afbd2d97c")
|
||||
version("2.21.3", sha256="fb313f0cc27e221b9b221bcd779b3a668fb4c77b0f90abfd5336833ecbdac016")
|
||||
version("2.20.0", sha256="a73fe6e02f35e3180fc01bc5c1794edf662ff1725c3bc2a4f433567799da7504")
|
||||
version("2.19.0", sha256="f4d1cbaccf115cdc4866968f649f2a37794a5c0de018de8156aa74556350a54c")
|
||||
version("2.18.0", sha256="7ee2c6a0bcdac581b38fae8d0f343fdee55f91f1f6a6cc9643fcfbcc6c2dc3e6")
|
||||
version("2.17.0", sha256="75f4a8a2bad21fda7b6bd42df7ca04120fb24636ebf9b566d259b26f2044b1d0")
|
||||
version("2.16.0", sha256="1024a519dbc8fd52d5fd2a3779fd485b09bc27c40556def8b6f91695423199d6")
|
||||
version("2.15.2", sha256="60ac7d2fe9405c9206675229273f401611d3f5dfa22942541646c4625b59f1ea")
|
||||
version("2.14.0", sha256="5920880d6ec0194411942ab6040a1930398be45669c9f60fff391e666c863417")
|
||||
version("2.13.0", sha256="e34785c2a2c0aea6ff86672fe81b80a04ac9d42a79ed8249630f2529a8f6a0fa")
|
||||
version("2.12.2", sha256="29142ed38cf986c08683dc9e912a484abc70962a4d36d7d71b7d9d872316be8e")
|
||||
version("2.11.2", sha256="8cae7917ca2d22c691e00792bfbbb812b84ac5c75120eb2ae879fb4ada41ee6c")
|
||||
version("2.10.0", sha256="93b33ca6d2ffd73e80b40e8a400ca3dbc70e05662f1bd390e2b6040279101485")
|
||||
version("2.9.0", sha256="656410ceffead79a52d3d727fdcd2bac78d7774239bef0efc3b7a86bae000ff3")
|
||||
version("2.8.4", sha256="4b09189f3094896cfc68596adc95b7f1d92772e1de1424e5dc4dd81def56e8b0")
|
||||
version("1.5.2", sha256="0b54f4d4fc3175471398b573d24616ddb8eb7d63808aa370cfc71fc1d636a1fd")
|
||||
version("1.3.7", sha256="9173e52cc4a0c0bda13ebfb862f9b074dc5de345b23cb15c1150863aafd8a26c")
|
||||
version("1.3.6", sha256="d79a197f305d4708a0e3e52b0a6748c1a6997360d2fbdfd09c022995a6963b5e")
|
||||
version("1.2", sha256="7651105fc3f186cfb5742f075ffebcc5088bf7797d8ed124c00977eebe0d1c64")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
# Required dependencies
|
||||
depends_on("python@3.6:", type=("build", "run"), when="@2.6.1:")
|
||||
depends_on("py-setuptools", type="build")
|
||||
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:")
|
||||
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:")
|
||||
depends_on("py-pybind11", type="build")
|
||||
depends_on("py-pybind11@2.12:", type="build", when="@2.26:")
|
||||
with when("@:2.21"):
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-numpy", type=("build", "run"), when="@1.3:1.3.6")
|
||||
depends_on("py-numpy@1.11.3:", type=("build", "run"), when="@1.3.7:")
|
||||
# https://github.com/numpy/numpy/issues/26191#issuecomment-2179127999
|
||||
depends_on("py-numpy@1.21:", type=("build", "run"), when="@2.22:")
|
||||
depends_on("py-numpy@:1", when="@:2.25", type=("build", "run"))
|
||||
depends_on("cmake", type="build", when="@2.8.4")
|
||||
depends_on("cmake@3.11:", type="build")
|
||||
depends_on("cmake@3.13:", type="build", when="@2:")
|
||||
depends_on("cmake@3.15:", type="build", when="@2.22:")
|
||||
|
||||
# Historical dependencies
|
||||
with when("@:2.27"):
|
||||
depends_on("py-typing-extensions", when="@2.21: ^python@:3.8", type=("build", "run"))
|
||||
depends_on(
|
||||
"py-typing-extensions@3.7.4:", when="@2.26: ^python@:3.8", type=("build", "run")
|
||||
)
|
||||
|
||||
@@ -22,6 +22,7 @@ class PyKeras(PythonPackage):
|
||||
maintainers("adamjstewart")
|
||||
license("Apache-2.0")
|
||||
|
||||
version("3.8.0", sha256="6289006e6f6cb2b68a563b58cf8ae5a45569449c5a791df6b2f54c1877f3f344")
|
||||
version("3.7.0", sha256="a4451a5591e75dfb414d0b84a3fd2fb9c0240cc87ebe7e397f547ce10b0e67b7")
|
||||
version("3.6.0", sha256="405727525a3522ed8f9ec0b46e0667e4c65fcf714a067322c16a00d902ded41d")
|
||||
version("3.5.0", sha256="53ae4f9472ec9d9c6941c82a3fda86969724ace3b7630a94ba0a1f17ba1065c3")
|
||||
@@ -64,6 +65,7 @@ class PyKeras(PythonPackage):
|
||||
version("2.2.1", sha256="0d3cb14260a3fa2f4a5c4c9efa72226ffac3b4c50135ba6edaf2b3d1d23b11ee")
|
||||
version("2.2.0", sha256="5b8499d157af217f1a5ee33589e774127ebc3e266c833c22cb5afbb0ed1734bf")
|
||||
|
||||
# TODO: add openvino backend (keras 3.8+)
|
||||
variant(
|
||||
"backend",
|
||||
default="tensorflow",
|
||||
@@ -85,7 +87,6 @@ class PyKeras(PythonPackage):
|
||||
depends_on("py-absl-py", when="@2.6:")
|
||||
depends_on("py-numpy")
|
||||
depends_on("py-rich", when="@3:")
|
||||
depends_on("py-namex@0.0.8:", when="@3.3.3:")
|
||||
depends_on("py-namex", when="@3:")
|
||||
depends_on("py-h5py")
|
||||
depends_on("py-optree", when="@3.1:")
|
||||
@@ -93,22 +94,21 @@ class PyKeras(PythonPackage):
|
||||
depends_on("py-packaging", when="@3.4:")
|
||||
|
||||
# requirements-common.txt
|
||||
depends_on("py-scipy")
|
||||
depends_on("py-pandas")
|
||||
depends_on("py-requests", when="@3:")
|
||||
depends_on("py-protobuf", when="@3:")
|
||||
# Many more (optional?) dependencies
|
||||
|
||||
# requirements-tensorflow-cuda.txt
|
||||
with when("backend=tensorflow"):
|
||||
depends_on("py-tensorflow@2.18", when="@3.7:")
|
||||
depends_on("py-tensorflow@2.17", when="@3.5:3.6")
|
||||
depends_on("py-tensorflow@2.16.1:2.16", when="@3.0:3.4")
|
||||
# depends_on("py-tf2onnx", when="@3.8:")
|
||||
|
||||
# requirements-jax-cuda.txt
|
||||
with when("backend=jax"):
|
||||
depends_on("py-jax@0.4.28", when="@3.6:")
|
||||
depends_on("py-jax@0.4.23", when="@3.0.5:3.5")
|
||||
depends_on("py-jax", when="@3:")
|
||||
# depends_on("py-flax", when="@3.2:")
|
||||
|
||||
# requirements-torch-cuda.txt
|
||||
with when("backend=torch"):
|
||||
@@ -126,6 +126,7 @@ class PyKeras(PythonPackage):
|
||||
depends_on("py-torchvision@0.16.2", when="@3.0.3:3.0.5")
|
||||
depends_on("py-torchvision@0.16.1", when="@3.0.1:3.0.2")
|
||||
depends_on("py-torchvision@0.16.0", when="@3.0.0")
|
||||
# depends_on("py-torch-xla", when="@3.8:")
|
||||
|
||||
# Historical dependencies
|
||||
with default_args(type="build"):
|
||||
|
||||
20
var/spack/repos/builtin/packages/py-neo4j/package.py
Normal file
20
var/spack/repos/builtin/packages/py-neo4j/package.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyNeo4j(PythonPackage):
|
||||
"""This is the neo4j bolt driver for python from the official repository"""
|
||||
|
||||
pypi = "neo4j/neo4j-5.25.0.tar.gz"
|
||||
|
||||
license("LGPL-3.0-only")
|
||||
|
||||
version("5.25.0", sha256="7c82001c45319092cc0b5df4c92894553b7ab97bd4f59655156fa9acab83aec9")
|
||||
|
||||
depends_on("py-pytz", type="run")
|
||||
depends_on("py-setuptools@68.0.0", type="build")
|
||||
depends_on("py-tomlkit@0.11.8", type="build")
|
||||
depends_on("python@3.7.0:", type=("build", "run"))
|
||||
@@ -14,24 +14,40 @@ class PySegmentationModelsPytorch(PythonPackage):
|
||||
license("MIT")
|
||||
maintainers("adamjstewart")
|
||||
|
||||
version("0.3.4", sha256="f4aee7f6add479bd3c3953e855b7055fc657dc6800bf7fc8ab733fd7f8acb163")
|
||||
version("0.3.3", sha256="b3b21ab4cd26a6b2b9e7a6ed466ace6452eb26ed3c31ae491ea2d7cbb01e384b")
|
||||
version("0.3.2", sha256="8372733e57a10cb8f6b9e18a20577fbb3fb83549b6945664dc774a9b6d3ecd13")
|
||||
version("0.3.1", sha256="d4a4817cf48872c3461bb7d22864c00f9d491719a6460adb252c035f9b0e8d51")
|
||||
version("0.3.0", sha256="8e00ed1707698d309d23f207aef15f21465e091aa0f1dc8043ec3300f5f67216")
|
||||
version("0.2.1", sha256="86744552b04c6bedf7e10f7928791894d8d9b399b9ed58ed1a3236d2bf69ead6")
|
||||
version("0.2.0", sha256="247266722c23feeef16b0862456c5ce815e5f0a77f95c2cd624a71bf00d955df")
|
||||
version("0.4.0", sha256="8833e63f0846090667be6fce05a2bbebbd1537776d3dea72916aa3db9e22e55b")
|
||||
with default_args(deprecated=True):
|
||||
version("0.3.4", sha256="f4aee7f6add479bd3c3953e855b7055fc657dc6800bf7fc8ab733fd7f8acb163")
|
||||
version("0.3.3", sha256="b3b21ab4cd26a6b2b9e7a6ed466ace6452eb26ed3c31ae491ea2d7cbb01e384b")
|
||||
version("0.3.2", sha256="8372733e57a10cb8f6b9e18a20577fbb3fb83549b6945664dc774a9b6d3ecd13")
|
||||
version("0.3.1", sha256="d4a4817cf48872c3461bb7d22864c00f9d491719a6460adb252c035f9b0e8d51")
|
||||
version("0.3.0", sha256="8e00ed1707698d309d23f207aef15f21465e091aa0f1dc8043ec3300f5f67216")
|
||||
version("0.2.1", sha256="86744552b04c6bedf7e10f7928791894d8d9b399b9ed58ed1a3236d2bf69ead6")
|
||||
version("0.2.0", sha256="247266722c23feeef16b0862456c5ce815e5f0a77f95c2cd624a71bf00d955df")
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-torchvision@0.5.0:", type=("build", "run"))
|
||||
depends_on("py-pretrainedmodels@0.7.4", type=("build", "run"))
|
||||
depends_on("py-efficientnet-pytorch@0.7.1", when="@0.3:", type=("build", "run"))
|
||||
depends_on("py-efficientnet-pytorch@0.6.3", when="@:0.2", type=("build", "run"))
|
||||
depends_on("py-timm@0.9.7", when="@0.3.4", type=("build", "run"))
|
||||
depends_on("py-timm@0.9.2", when="@0.3.3", type=("build", "run"))
|
||||
depends_on("py-timm@0.6.12", when="@0.3.2", type=("build", "run"))
|
||||
depends_on("py-timm@0.4.12", when="@:0.3.1", type=("build", "run"))
|
||||
depends_on("py-huggingface-hub@0.24.6:", when="@0.3.4:", type=("build", "run"))
|
||||
depends_on("py-tqdm", when="@0.3:", type=("build", "run"))
|
||||
depends_on("pil", when="@0.3:", type=("build", "run"))
|
||||
depends_on("py-six", when="@0.3.4:", type=("build", "run"))
|
||||
with default_args(type="build"):
|
||||
depends_on("py-setuptools@61:", when="@0.4:")
|
||||
depends_on("py-setuptools")
|
||||
|
||||
with default_args(type=("build", "run")):
|
||||
depends_on("py-efficientnet-pytorch@0.6.1:", when="@0.4:")
|
||||
depends_on("py-efficientnet-pytorch@0.7.1", when="@0.3")
|
||||
depends_on("py-efficientnet-pytorch@0.6.3", when="@:0.2")
|
||||
depends_on("py-huggingface-hub@0.24:", when="@0.4:")
|
||||
depends_on("py-huggingface-hub@0.24.6:", when="@0.3.4:0.3")
|
||||
depends_on("py-numpy@1.19.3:", when="@0.4:")
|
||||
depends_on("pil@8:", when="@0.4:")
|
||||
depends_on("pil", when="@0.3:")
|
||||
depends_on("py-pretrainedmodels@0.7.1:", when="@0.4:")
|
||||
depends_on("py-pretrainedmodels@0.7.4", when="@:0.3")
|
||||
depends_on("py-six@1.5:", when="@0.4:")
|
||||
depends_on("py-six", when="@0.3.4:")
|
||||
depends_on("py-timm@0.9:", when="@0.4:")
|
||||
depends_on("py-timm@0.9.7", when="@0.3.4")
|
||||
depends_on("py-timm@0.9.2", when="@0.3.3")
|
||||
depends_on("py-timm@0.6.12", when="@0.3.2")
|
||||
depends_on("py-timm@0.4.12", when="@:0.3.1")
|
||||
depends_on("py-torch@1.8:", when="@0.4:")
|
||||
depends_on("py-torchvision@0.9:", when="@0.4:")
|
||||
depends_on("py-torchvision@0.5:")
|
||||
depends_on("py-tqdm@4.42.1:", when="@0.4:")
|
||||
depends_on("py-tqdm", when="@0.3:")
|
||||
|
||||
@@ -14,6 +14,7 @@ class PyTimm(PythonPackage):
|
||||
license("Apache-2.0")
|
||||
maintainers("adamjstewart")
|
||||
|
||||
version("1.0.12", sha256="9da490683bd06302ec40e1892f1ccf87985f033e41f3580887d886b9aee9449a")
|
||||
version("1.0.11", sha256="a005f72b87e67ed30cdbf405a9ffd4e723360c780a43b1cefe266af8ecc9d151")
|
||||
version("0.9.7", sha256="2bfb1029e90b72e65eb9c75556169815f2e82257eaa1f6ebd623a4b4a52867a2")
|
||||
version("0.9.5", sha256="669835f0030cfb2412c464b7b563bb240d4d41a141226afbbf1b457e4f18cff1")
|
||||
@@ -32,15 +33,15 @@ class PyTimm(PythonPackage):
|
||||
with default_args(type=("build", "run")):
|
||||
# https://github.com/huggingface/pytorch-image-models/issues/1530
|
||||
# https://github.com/huggingface/pytorch-image-models/pull/1649
|
||||
depends_on("python@:3.10", when="@:0.6.12", type=("build", "run"))
|
||||
depends_on("python@:3.10", when="@:0.6.12")
|
||||
|
||||
depends_on("py-torch@1.7:", when="@0.6:", type=("build", "run"))
|
||||
depends_on("py-torch@1.4:", type=("build", "run"))
|
||||
depends_on("py-torchvision", type=("build", "run"))
|
||||
depends_on("py-pyyaml", when="@0.6:", type=("build", "run"))
|
||||
depends_on("py-huggingface-hub", when="@0.6:", type=("build", "run"))
|
||||
depends_on("py-safetensors", when="@0.9:", type=("build", "run"))
|
||||
depends_on("py-torch@1.7:", when="@0.6:")
|
||||
depends_on("py-torch@1.4:")
|
||||
depends_on("py-torchvision")
|
||||
depends_on("py-pyyaml", when="@0.6:")
|
||||
depends_on("py-huggingface-hub", when="@0.6:")
|
||||
depends_on("py-safetensors", when="@0.9:")
|
||||
|
||||
# https://github.com/rwightman/pytorch-image-models/pull/1256
|
||||
depends_on("pil@:9", when="@:0.5", type=("build", "run"))
|
||||
depends_on("py-numpy", when="@:0.5", type=("build", "run"))
|
||||
depends_on("pil@:9", when="@:0.5")
|
||||
depends_on("py-numpy", when="@:0.5")
|
||||
|
||||
@@ -142,7 +142,7 @@ class Root(CMakePackage):
|
||||
patch(
|
||||
"https://github.com/root-project/root/commit/2f00d6df258906c1f6fe848135a88b836db3077f.patch?full_index=1",
|
||||
sha256="8da36032082e65ae246c03558a4c3fd67b157d1d0c6d20adac9de263279d1db6",
|
||||
when="@6.28:6.28.12",
|
||||
when="@6.28.6:6.28.12",
|
||||
)
|
||||
patch(
|
||||
"https://github.com/root-project/root/commit/14838b35600b08278e69bc3d8d8669773bc11399.patch?full_index=1",
|
||||
@@ -452,6 +452,8 @@ class Root(CMakePackage):
|
||||
"cxxstd=20", when="@:6.28.02", msg="C++20 support requires root version at least 6.28.04"
|
||||
)
|
||||
|
||||
conflicts("%gcc@:10", when="cxxstd=20")
|
||||
|
||||
# See https://github.com/root-project/root/issues/11128
|
||||
conflicts("%clang@16:", when="@:6.26.07", msg="clang 16+ support was added in root 6.26.08")
|
||||
|
||||
|
||||
98
var/spack/repos/builtin/packages/toybox/package.py
Normal file
98
var/spack/repos/builtin/packages/toybox/package.py
Normal file
@@ -0,0 +1,98 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Toybox(MakefilePackage):
|
||||
"""All-in-one Linux command line"""
|
||||
|
||||
homepage = "https://landley.net/toybox/"
|
||||
url = "https://landley.net/toybox/downloads/toybox-0.8.11.tar.gz"
|
||||
git = "https://github.com/landley/toybox.git"
|
||||
|
||||
maintainers("Buldram")
|
||||
|
||||
license("0BSD", checked_by="Buldram")
|
||||
|
||||
version("0.8.11", sha256="15aa3f832f4ec1874db761b9950617f99e1e38144c22da39a71311093bfe67dc")
|
||||
version("0.8.10", sha256="d3afee05ca90bf425ced73f527e418fecd626c5340b5f58711a14531f8d7d108")
|
||||
version("0.8.9", sha256="06913dde3de7139b40f947bd7f23869dfc8796e9c6ff39de02719f8b7b2d47ad")
|
||||
version("0.8.8", sha256="dafd41978d40f02a61cf1be99a2b4a25812bbfb9c3157e679ee7611202d6ac58")
|
||||
version("0.8.7", sha256="b508bf336f82cb0739b77111f945931d1a143b5a53905cb753cd2607cfdd1494")
|
||||
version("0.8.6", sha256="4298c90a2b238348e4fdc9f89eb4988356c80da3f0cf78c279d2e82b9119034b")
|
||||
version("0.8.5", sha256="bfd230c187726347f7e31a1fc5841705871dfe4f3cbc6628f512b54e57360949")
|
||||
version("0.8.4", sha256="cb2a565a8d30015d08d73628795dca51a85b99b149aeabbbecd9e8dbdbd8fddc")
|
||||
version("0.8.3", sha256="eab28fd29d19d4e61ef09704e5871940e6f35fd35a3bb1285e41f204504b5c01")
|
||||
version("0.8.2", sha256="9a2760fa442e9baf1be6064ab5ba8b90f2098e1d4bc33c788960b8d73f52fed5")
|
||||
version("0.8.1", sha256="1ac41e62b809d2ab656479f7f4e20bb71c63c14473f5c7d13f25d4f7fcfefdb3")
|
||||
version("0.8.0", sha256="e3ccecd9446db909437427a026c2788f2a96ac7ebc591c95b35df77f4e923956")
|
||||
version("0.7.8", sha256="4962e16898cb3c6e2719205349c8e6749a30583618a264aa8911f9ad61d998d6")
|
||||
version("0.7.7", sha256="ee218ab21c80044c04112ada7f59320062c35909a6e5f850b1318b17988ffba0")
|
||||
version("0.7.6", sha256="e2c9643ebc2bcdec4d8f8db25d0b428dbe0928f7b730052dbbd25db47fb9db95")
|
||||
version("0.7.5", sha256="3ada450ac1eab1dfc352fee915ea6129b9a4349c1885f1394b61bd2d89a46c04")
|
||||
version("0.7.4", sha256="49d74ca897501e5c981516719870fe08581726f5c018abe35ef52c6f0de113e7")
|
||||
|
||||
conflicts("platform=darwin", when="@:0.7.8,=0.8.1")
|
||||
conflicts("platform=freebsd", when="@:0.7.8,0.8.1:0.8.8")
|
||||
|
||||
variant("userland", default=True, description="Install symlinked individual commands")
|
||||
variant("static", default=False, description="Build static binary")
|
||||
variant("ssl", default=True, description="Build with OpenSSL support")
|
||||
variant("zlib", default=True, description="Build with Zlib support")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("bash", type="build")
|
||||
depends_on("sed", type="build")
|
||||
depends_on("openssl", type="link", when="+ssl")
|
||||
depends_on("zlib", type="link", when="+zlib")
|
||||
|
||||
# CVE-2022-32298
|
||||
patch(
|
||||
"https://github.com/landley/toybox/commit/6d4847934fc0fe47a3254ce6c0396d197a780cf4.patch?full_index=1",
|
||||
sha256="2c6ffad53102db23b620fd883636daad15c70a08c72f802a1fbcf96c331280cc",
|
||||
when="@=0.8.7",
|
||||
)
|
||||
|
||||
patch(
|
||||
"https://github.com/landley/toybox/commit/78289203031afc23585035c362beec10db54958d.patch?full_index=1",
|
||||
sha256="a27a831eb80f9d46809f619b52018eb2e481758581f7a6932423b95422f23911",
|
||||
when="@=0.7.4",
|
||||
)
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("NOSTRIP", 1)
|
||||
|
||||
if not self.spec.satisfies("@=0.8.9"):
|
||||
env.set("V", 1) # Verbose
|
||||
|
||||
if self.spec.satisfies("+static"):
|
||||
env.set("LDFLAGS", "--static")
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
if spec.satisfies("platform=darwin"):
|
||||
defconfig = "macos_defconfig"
|
||||
elif spec.satisfies("platform=freebsd"):
|
||||
defconfig = "bsd_defconfig"
|
||||
else:
|
||||
defconfig = "defconfig"
|
||||
|
||||
make(defconfig, parallel=self.parallel and not spec.satisfies("@0.7.8:0.8.1"))
|
||||
|
||||
config = FileFilter(".config")
|
||||
config.filter(
|
||||
"# CONFIG_TOYBOX_LIBCRYPTO is not set",
|
||||
"CONFIG_TOYBOX_LIBCRYPTO=" + ("y" if spec.satisfies("+ssl") else "n"),
|
||||
)
|
||||
config.filter(
|
||||
"# CONFIG_TOYBOX_LIBZ is not set",
|
||||
"CONFIG_TOYBOX_LIBZ=" + ("y" if spec.satisfies("+zlib") else "n"),
|
||||
)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
if spec.satisfies("+userland"):
|
||||
make("install_flat", "PREFIX=" + prefix.bin)
|
||||
else:
|
||||
mkdir(prefix.bin)
|
||||
install("toybox", prefix.bin)
|
||||
Reference in New Issue
Block a user