From be771d5d6fd6a39c8e4ce9b0f32915c4d4990393 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Mon, 22 Jul 2024 08:32:34 -0700 Subject: [PATCH 001/435] node-js: add v17.9.1, v20.15.0, v21.7.3, v22.3.0, v22.4.0 (#45007) * Adding new versions and compilation conflict for nodejs * Update failed version for gcc14 * Updating conflicts notes for correctness/clarity/format * Applying spack-ized versions of fix in https://github.com/nodejs/node/issues/52223 to adddress CI failures * Update fix-old-glibc-random-headers.patch * Update package.py * Update fix-old-glibc-random-headers.patch * Update fix-old-glibc-random-headers.patch * Adding conflict for older glibc * Fixing patch for older systems, need to undef * Removing overly strict conflicts --------- Signed-off-by: Teague Sterling --- .../fix-old-glibc-random-headers.patch | 22 +++++++++++++++++++ .../repos/builtin/packages/node-js/package.py | 18 ++++++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch diff --git a/var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch b/var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch new file mode 100644 index 00000000000000..9629a6bb0c5342 --- /dev/null +++ b/var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch @@ -0,0 +1,22 @@ +diff --git a/deps/cares/config/linux/ares_config.h b/deps/cares/config/linux/ares_config.h +index 3cb135a..88934ad 100644 +--- a/deps/cares/config/linux/ares_config.h ++++ b/deps/cares/config/linux/ares_config.h +@@ -116,7 +116,7 @@ + #define HAVE_GETNAMEINFO 1 + + /* Define to 1 if you have `getrandom` */ +-#define HAVE_GETRANDOM 1 ++#undef HAVE_GETRANDOM + + /* Define to 1 if you have `getservbyport_r` */ + #define HAVE_GETSERVBYPORT_R 1 +@@ -329,7 +329,7 @@ + #define HAVE_SYS_PARAM_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_SYS_RANDOM_H 1 ++#undef HAVE_SYS_RANDOM_H + + /* Define to 1 if you have the header file. */ + #define HAVE_SYS_SELECT_H 1 diff --git a/var/spack/repos/builtin/packages/node-js/package.py b/var/spack/repos/builtin/packages/node-js/package.py index f624f59b2fc61d..b76d72ae91bdb9 100644 --- a/var/spack/repos/builtin/packages/node-js/package.py +++ b/var/spack/repos/builtin/packages/node-js/package.py @@ -22,17 +22,22 @@ class NodeJs(Package): license("Unicode-TOU") # Current (latest features) - odd major number + version("21.7.3", sha256="ce1f61347671ef219d9c2925313d629d3fef98fc8d7f5ef38dd4656f7d0f58e7") version("19.2.0", sha256="aac9d1a366fb57d68f4639f9204d1de5d6387656959a97ed929a5ba9e62c033a") + version("17.9.1", sha256="1102f5e0aafaab8014d19c6c57142caf2ba3ef69d88d7a7f0f82798051796027") version("15.3.0", sha256="cadfa384a5f14591b84ce07a1afe529f28deb0d43366fb0ae4e78afba96bfaf2") version("13.8.0", sha256="815b5e1b18114f35da89e4d98febeaba97555d51ef593bd5175db2b05f2e8be6") version("13.5.0", sha256="4b8078d896a7550d7ed399c1b4ac9043e9f883be404d9b337185c8d8479f2db8") # LTS (recommended for most users) - even major number version( - "18.12.1", - sha256="ba8174dda00d5b90943f37c6a180a1d37c861d91e04a4cb38dc1c0c74981c186", + "22.4.0", + sha256="b62cd83c9a57a11349883f89b1727a16e66c02eb6255a4bf32714ff5d93165f5", preferred=True, ) + version("22.3.0", sha256="6326484853093ab6b8f361a267445f4a5bff469042cda11a3585497b13136b55") + version("20.15.0", sha256="01e2c034467a324a33e778c81f2808dff13d289eaa9307d3e9b06c171e4d932d") + version("18.12.1", sha256="ba8174dda00d5b90943f37c6a180a1d37c861d91e04a4cb38dc1c0c74981c186") version("16.18.1", sha256="3d24c9c3a953afee43edc44569045eda56cd45cd58b0539922d17da62736189c") version("14.21.1", sha256="76ba961536dc11e4dfd9b198c61ff3399e655eca959ae4b66d926f29bfcce9d3") version("14.16.1", sha256="5f5080427abddde7f22fd2ba77cd2b8a1f86253277a1eec54bc98a202728ce80") @@ -79,9 +84,16 @@ class NodeJs(Package): # https://github.com/spack/spack/issues/19310 conflicts( "%gcc@:4.8", - msg="fails to build with gcc 4.8 (see https://github.com/spack/spack/issues/19310", + msg="fails to build with gcc 4.8 (see https://github.com/spack/spack/issues/19310)", ) + conflicts( + "%gcc@14:", when="@:19", msg="fails to build with gcc 14+ due to implicit conversions" + ) + + # See https://github.com/nodejs/node/issues/52223 + patch("fix-old-glibc-random-headers.patch", when="^glibc@:2.24") + def setup_build_environment(self, env): # Force use of experimental Python 3 support env.set("PYTHON", self.spec["python"].command.path) From c390a4530e1673a11bd7c6e11fd46f244d98f56e Mon Sep 17 00:00:00 2001 From: Alex Leute <36964815+alex391@users.noreply.github.com> Date: Mon, 22 Jul 2024 12:17:13 -0400 Subject: [PATCH 002/435] py-colored: Added new version (#45361) --- var/spack/repos/builtin/packages/py-colored/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-colored/package.py b/var/spack/repos/builtin/packages/py-colored/package.py index e94f5d857d2e8b..4e8d1fe0347699 100644 --- a/var/spack/repos/builtin/packages/py-colored/package.py +++ b/var/spack/repos/builtin/packages/py-colored/package.py @@ -17,6 +17,8 @@ class PyColored(PythonPackage): homepage = "https://gitlab.com/dslackw/colored" pypi = "colored/colored-1.4.2.tar.gz" + version("2.2.4", sha256="595e1dd7f3b472ea5f12af21d2fec8a2ea2cf8f9d93e67180197330b26df9b61") version("1.4.2", sha256="056fac09d9e39b34296e7618897ed1b8c274f98423770c2980d829fd670955ed") - depends_on("py-setuptools", type="build") + depends_on("py-setuptools", type="build", when="@1.4.2") + depends_on("py-flit-core@3.2.0:3", type="build", when="@2.2.4:") From c4808de2ff6b6d9e73c068a67cff1f0c1db184df Mon Sep 17 00:00:00 2001 From: "Diego Alvarez S." Date: Mon, 22 Jul 2024 13:29:46 -0300 Subject: [PATCH 003/435] Add nextflow 24.04.3 (#45357) --- var/spack/repos/builtin/packages/nextflow/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py index a576aeb35473a6..4687218fc6bfbe 100644 --- a/var/spack/repos/builtin/packages/nextflow/package.py +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -14,6 +14,11 @@ class Nextflow(Package): maintainers("dialvarezs", "marcodelapierre") + version( + "24.04.3", + sha256="e258f6395a38f044eb734cba6790af98b561aa521f63e2701fe95c050986e11c", + expand=False, + ) version( "24.04.1", sha256="d1199179e31d0701d86e6c38afa9ccade93f62d545e800824be7767a130510ba", From 29302c13e957dc76d2b16ac80dce10915348a329 Mon Sep 17 00:00:00 2001 From: William Moses Date: Mon, 22 Jul 2024 12:35:40 -0400 Subject: [PATCH 004/435] Update Enzyme to 0.0.135 (#45346) --- var/spack/repos/builtin/packages/enzyme/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/enzyme/package.py b/var/spack/repos/builtin/packages/enzyme/package.py index ea57c0a86e28c7..c793e1edddb7b2 100644 --- a/var/spack/repos/builtin/packages/enzyme/package.py +++ b/var/spack/repos/builtin/packages/enzyme/package.py @@ -24,6 +24,7 @@ class Enzyme(CMakePackage): root_cmakelists_dir = "enzyme" version("main", branch="main") + version("0.0.135", sha256="49c798534faec7ba524a3ed053dd4352d690a44d3cad5a14915c9398dc9b175b") version("0.0.100", sha256="fbc53ec02adc0303ff200d7699afface2d9fbc7350664e6c6d4c527ef11c2e82") version("0.0.81", sha256="4c17d0c28f0572a3ab97a60f1e56bbc045ed5dd64c2daac53ae34371ca5e8b34") version("0.0.69", sha256="144d964187551700fdf0a4807961ceab1480d4e4cd0bb0fc7bbfab48fe053aa2") From f044194b06d393dea67d48c27973df1e68e5ba53 Mon Sep 17 00:00:00 2001 From: Martin Lang <67915889+lang-m@users.noreply.github.com> Date: Mon, 22 Jul 2024 19:54:49 +0200 Subject: [PATCH 005/435] libvdwxc: Fix configure with gcc-14 (#45093) --- .../builtin/packages/libvdwxc/fftw-detection.patch | 13 +++++++++++++ .../repos/builtin/packages/libvdwxc/package.py | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch diff --git a/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch b/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch new file mode 100644 index 00000000000000..f009188f52c03f --- /dev/null +++ b/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 494ea9f..1ca6516 100755 +--- a/configure ++++ b/configure +@@ -17006,7 +17006,7 @@ int + main () + { + +- fftw_plan *plan; ++ fftw_plan plan; + fftw_complex *a1, *a2; + fftw_execute_dft(plan, a1, a2); + diff --git a/var/spack/repos/builtin/packages/libvdwxc/package.py b/var/spack/repos/builtin/packages/libvdwxc/package.py index 53cbef94beaebd..e0e7241d9516c6 100644 --- a/var/spack/repos/builtin/packages/libvdwxc/package.py +++ b/var/spack/repos/builtin/packages/libvdwxc/package.py @@ -54,3 +54,12 @@ def configure_args(self): args += ["--without-mpi"] return args + + # misuse of fftw_plan in m4 for fftw detection (configure fails with gcc 14) + # two patches for (1) m4 macro from upstream and (2) pre-generated configure in tarball + patch( + "https://gitlab.com/libvdwxc/libvdwxc/-/commit/9340f857515c4a2e56d2aa7cf3a21c41ba8559c3.diff", + sha256="b9ad695e54a25d7ffa92f783bb0a31d3b421225f97958972e32ba42893844b80", + when="@:0.4.0", + ) + patch("fftw-detection.patch", when="@:0.4.0") From 63197fea3ecc2b2f8ccbc12c055fa860760bb574 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Mon, 22 Jul 2024 14:00:14 -0400 Subject: [PATCH 006/435] dedisp: fix preinstall: it only takes self (#45328) too many arguments here, only takes "self". --- var/spack/repos/builtin/packages/dedisp/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/dedisp/package.py b/var/spack/repos/builtin/packages/dedisp/package.py index 557fd943c4188e..7634ba306c0680 100644 --- a/var/spack/repos/builtin/packages/dedisp/package.py +++ b/var/spack/repos/builtin/packages/dedisp/package.py @@ -36,10 +36,10 @@ def edit(self, spec, prefix): makefile.filter(r"^\s*INSTALL_DIR\s*\?=.*", "INSTALL_DIR ?= " + prefix) @run_before("install") - def preinstall(self, spec, prefix): + def preinstall(self): # The $PREFIX/dedisp/include and $PREFIX/dedisp/lib directories don't seem # to be created automatically by the software's Makefile so manually create them - libdir = join_path(prefix, "lib") - incdir = join_path(prefix, "include") + libdir = join_path(self.prefix, "lib") + incdir = join_path(self.prefix, "include") mkdirp(libdir) mkdirp(incdir) From 3699df26512d1a36d16923f12097c14298dcc42b Mon Sep 17 00:00:00 2001 From: Philipp Edelmann Date: Mon, 22 Jul 2024 12:05:44 -0600 Subject: [PATCH 007/435] rayleigh: add v1.2.0 (#45333) --- var/spack/repos/builtin/packages/rayleigh/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/rayleigh/package.py b/var/spack/repos/builtin/packages/rayleigh/package.py index 0686e9d5649e4c..df8d46e6158947 100644 --- a/var/spack/repos/builtin/packages/rayleigh/package.py +++ b/var/spack/repos/builtin/packages/rayleigh/package.py @@ -19,14 +19,15 @@ class Rayleigh(MakefilePackage): maintainers("tukss") version("main", branch="main") + version("1.2.0", sha256="e90acf18d47f6066fa68fd7b16c70ad9781a00be9e97467e9a388773e21e9e09") version("1.1.0", sha256="93fbbdbde6088807638e4dcbd4d622203fd4753c1831bab2cb8eaeca5cba45c3") version("1.0.1", sha256="9c9e3b0b180f32a889f158e2ea2967f4ac2bb2124f5d264f230efb8c8f19ea36") version("1.0.0", sha256="4f2e8249256adff8c4b0bc377ceacf8a6441dcee54b7d36c784f05a454dc6dcf") version("0.9.1", sha256="ab96445fc61822fe2d2cba8729a85b36de6b541febf5759de6d614847844573f") version("0.9.0", sha256="63a80d1619cb639f3cb01ab82a441b77d736eee94469c47c50ab740fa81c08f4") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") depends_on("mpi") depends_on("fftw-api@3") From 350661f0276f84bcafc97d84fe0961a0389069f7 Mon Sep 17 00:00:00 2001 From: Alex Seaton <1802137+agseaton@users.noreply.github.com> Date: Mon, 22 Jul 2024 12:16:39 -0600 Subject: [PATCH 008/435] heyoka: add current 4.0.x and 5.0.0 releases (#45314) --- var/spack/repos/builtin/packages/heyoka/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/heyoka/package.py b/var/spack/repos/builtin/packages/heyoka/package.py index 7a35fd4f26f531..9472f184f63b53 100644 --- a/var/spack/repos/builtin/packages/heyoka/package.py +++ b/var/spack/repos/builtin/packages/heyoka/package.py @@ -18,6 +18,11 @@ class Heyoka(CMakePackage): # SPDX identifier of the project's license. license("MPL-2.0") + version("5.0.0", sha256="e9a4b5683a08706addc1b448e232f1e269d78586859fe3f4d93d4c5eee3bc8ae") + version("4.0.3", sha256="47608e785607782d896ae2347a29a143cdb7e5c602f48f5ea795cf682051dbee") + version("4.0.2", sha256="8eba8fe0626c3d48affad3055e490e5d21430a420af867d7d52c18ed6b602ae0") + version("4.0.1", sha256="25ad39a716c5d548260d505225a13b7fa86534761b6e3d3de991d9d097ec615f") + version("4.0.0", sha256="bc375271773993bd89d604a269c4931e54fb8508c8235397d47f0b60b78f3cdf") version("3.2.0", sha256="37db24fbaf0e65d740ffb20f76ac1c8ab9fbd6893dc87dfd483c965b71dbf465") version("3.1.0", sha256="7eecab47f44a9fff022cf24f226763dab8b075a9fdaa543a42f64bb2634b3ad8") version("3.0.0", sha256="03ccb6fb015ad43877781763c0f2f49bd6db64c8b9493174e589c970ef00d7f2") @@ -49,7 +54,8 @@ class Heyoka(CMakePackage): depends_on("cmake@3.18:", type="build") # Required dependencies - depends_on("llvm@13:17") + depends_on("llvm@13:17", when="@:4") + depends_on("llvm@13:18", when="@5") depends_on("boost@1.69: +serialization") depends_on("fmt@9:10") depends_on("spdlog") From 54f1af5a294b5883ece3cf8efc58d15ded357aa9 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:55:34 -0500 Subject: [PATCH 009/435] libint: Fix build for 2.6.0, add libs property (#45034) Signed-off-by: Shane Nehring --- .../repos/builtin/packages/libint/package.py | 57 ++++++++++++------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py index 151d997690afe3..cb5798b543beb1 100644 --- a/var/spack/repos/builtin/packages/libint/package.py +++ b/var/spack/repos/builtin/packages/libint/package.py @@ -227,34 +227,47 @@ def build(self, spec, prefix): # now build the library with working_dir(os.path.join(self.build_directory, "generated")): if spec.satisfies("@2.6.0"): - # see https://github.com/evaleev/libint/issues/144 - force_remove( - join_path("include", "libint2", "basis.h"), - join_path("include", "libint2", "config.h"), - ) - cmake_args = [ - "..", - f"-DCMAKE_INSTALL_PREFIX={prefix}", - "-DLIBINT2_BUILD_SHARED_AND_STATIC_LIBS=ON", - ] - if "+fortran" in spec: - cmake_args.append("-DENABLE_FORTRAN=ON") - if "+debug" in spec: - cmake_args.append("CMAKE_BUILD_TYPE=Debug") - cmake = Executable("cmake") - mkdirp("build") - with working_dir("build"): - cmake(*cmake_args) + config_args = [ + f"--prefix={prefix}", + "--enable-shared", + f"--with-boost={spec['boost'].prefix}", + f"--with-cxx-optflags={self.optflags}", + ] + config_args += self.enable_or_disable("debug", activation_value=lambda x: "opt") + config_args += self.enable_or_disable("fortran") + configure = Executable("./configure") + configure(*config_args) make() + else: + cmake_args = [ + "..", + f"-DCMAKE_INSTALL_PREFIX={prefix}", + "-DLIBINT2_BUILD_SHARED_AND_STATIC_LIBS=ON", + ] + if "+fortran" in spec: + cmake_args.append("-DENABLE_FORTRAN=ON") + if "+debug" in spec: + cmake_args.append("CMAKE_BUILD_TYPE=Debug") + cmake = Executable("cmake") + mkdirp("build") + with working_dir("build"): + cmake(*cmake_args) + make() @when("@2.6.0:") def check(self): - with working_dir(os.path.join(self.build_directory, "generated", "build")): + path = join_path(self.build_directory, "generated") + if self.spec.satisfies("@2.9.0:"): + path = join_path(path, "build") + with working_dir(path): make("check") @when("@2.6.0:") def install(self, spec, prefix): - with working_dir(os.path.join(self.build_directory, "generated", "build")): + path = join_path(self.build_directory, "generated") + if self.spec.satisfies("@2.9.0:"): + path = join_path(path, "build") + with working_dir(path): make("install") @when("@:2.6.0") @@ -269,3 +282,7 @@ def patch(self): "export/fortran/Makefile", string=True, ) + + @property + def libs(self): + return find_libraries("libint2", self.spec.prefix, shared=True, recursive=True) From c43205d6de35a5bdfece45ca4873f5818e7b9f7c Mon Sep 17 00:00:00 2001 From: Jordan Galby <67924449+Jordan474@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:16:08 +0200 Subject: [PATCH 010/435] asciidoc: Fix asciidoc@10 install (#44926) --- .../repos/builtin/packages/asciidoc/package.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/asciidoc/package.py b/var/spack/repos/builtin/packages/asciidoc/package.py index 5e31e98cd9ca06..80f8e6bd97cb4b 100644 --- a/var/spack/repos/builtin/packages/asciidoc/package.py +++ b/var/spack/repos/builtin/packages/asciidoc/package.py @@ -6,7 +6,7 @@ from spack.package import * -class Asciidoc(AutotoolsPackage): +class Asciidoc(AutotoolsPackage, PythonPackage): """A presentable text document format for writing articles, UNIX man pages and other small to medium sized documents.""" @@ -17,6 +17,12 @@ class Asciidoc(AutotoolsPackage): license("GPL-2.0-only", checked_by="tgamblin") + build_system( + conditional("autotools", when="@:9"), + conditional("python_pip", when="@10:"), + default="python_pip", + ) + version("master", branch="master") version("10.2.0", sha256="684ea53c1f5b71d6d1ac6086bbc96906b1f709ecc7ab536615b0f0c9e1baa3cc") version("9.1.0", sha256="5056c20157349f8dc74f005b6e88ccbf1078c4e26068876f13ca3d1d7d045fe7") @@ -31,6 +37,9 @@ class Asciidoc(AutotoolsPackage): depends_on("docbook-xml", type=("build", "run")) depends_on("docbook-xsl", type=("build", "run")) depends_on("python@3.5:", type=("build", "run")) - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") + with when("build_system=python_pip"): + depends_on("py-setuptools", type="build") + with when("build_system=autotools"): + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") From d001f145148ee796ebba90b206a5132a592c1eed Mon Sep 17 00:00:00 2001 From: Brad Geltz Date: Mon, 22 Jul 2024 12:23:11 -0700 Subject: [PATCH 011/435] geopm: Add v3.1 and update the needed dependencies (#44793) --- .../builtin/packages/geopm-runtime/package.py | 90 +++++++++++-------- .../builtin/packages/geopm-service/package.py | 58 +++++++----- .../repos/builtin/packages/librsvg/package.py | 1 + .../builtin/packages/py-blosc2/package.py | 1 + .../builtin/packages/py-geopmdpy/package.py | 23 +++-- .../builtin/packages/py-geopmpy/package.py | 41 +++++++++ 6 files changed, 152 insertions(+), 62 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-geopmpy/package.py diff --git a/var/spack/repos/builtin/packages/geopm-runtime/package.py b/var/spack/repos/builtin/packages/geopm-runtime/package.py index 2aa26287ebbdc7..974daed7d04737 100644 --- a/var/spack/repos/builtin/packages/geopm-runtime/package.py +++ b/var/spack/repos/builtin/packages/geopm-runtime/package.py @@ -15,13 +15,14 @@ class GeopmRuntime(AutotoolsPackage): homepage = "https://geopm.github.io" git = "https://github.com/geopm/geopm.git" - url = "https://github.com/geopm/geopm/tarball/v3.0.1" + url = "https://github.com/geopm/geopm/tarball/v3.1.0" maintainers("bgeltz", "cmcantalupo") license("BSD-3-Clause") tags = ["e4s"] version("develop", branch="dev", get_full_repo=True) + version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e") version("3.0.1", sha256="32ba1948de58815ee055470dcdea64593d1113a6cad70ce00ab0286c127f8234") depends_on("c", type="build") # generated @@ -29,7 +30,7 @@ class GeopmRuntime(AutotoolsPackage): depends_on("fortran", type="build") # generated variant("debug", default=False, description="Enable debug") - variant("docs", default=False, description="Create man pages with Sphinx") + variant("docs", default=False, when="@3.0.1", description="Create man pages with Sphinx") variant("overhead", default=False, description="Track time spent in GEOPM API calls") variant("beta", default=False, description="Enable beta features") variant("mpi", default=True, description="Enable MPI dependent components") @@ -60,30 +61,36 @@ class GeopmRuntime(AutotoolsPackage): depends_on("libtool", type="build") depends_on("file") - # Docs dependencies - depends_on("doxygen", type="build", when="+docs") - depends_on("py-sphinx", type="build", when="+docs") - depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs") - depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs") - depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs") - depends_on("py-pygments@2.13.0:", type="build", when="+docs") - - # Other Python dependencies - from scripts/setup.py - depends_on("python@3.6:3", type=("build", "run")) - depends_on("py-setuptools@53.0.0:", type="build") - depends_on("py-cffi@1.14.5:", type="run") - depends_on("py-natsort@8.2.0:", type="run") - depends_on("py-numpy@1.19.5:", type="run") - depends_on("py-pandas@1.1.5:", type="run") - depends_on("py-tables@3.7.0:", type="run") - depends_on("py-psutil@5.8.0:", type="run") - depends_on("py-pyyaml@6.0:", type="run") - depends_on("py-docutils@0.18:", type="run", when="+checkprogs") + with when("@3.0.1"): + # Docs dependencies + # Moved to python3-geopm-doc as of v3.1 + depends_on("doxygen", type="build", when="+docs") + depends_on("py-sphinx", type="build", when="+docs") + depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs") + depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs") + depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs") + depends_on("py-pygments@2.13.0:", type="build", when="+docs") + + # Other Python dependencies - from scripts/setup.py + # Moved to python3-geopmdpy as of v3.1 + depends_on("python@3.6:3", type=("build", "run")) + depends_on("py-setuptools@53.0.0:", type="build") + depends_on("py-cffi@1.14.5:", type="run") + depends_on("py-natsort@8.2.0:", type="run") + depends_on("py-numpy@1.19.5:", type="run") + depends_on("py-pandas@1.1.5:", type="run") + depends_on("py-tables@3.7.0:", type="run") + depends_on("py-psutil@5.8.0:", type="run") + depends_on("py-pyyaml@6.0:", type="run") + depends_on("py-docutils@0.18:", type="run", when="+checkprogs") # Other dependencies - for ver in ["3.0.1", "develop"]: - depends_on(f"geopm-service@{ver}", type="build", when=f"@{ver}") + for ver in ["3.0.1", "3.1.0", "develop"]: + depends_on(f"geopm-service@{ver}", type=("build", "run"), when=f"@{ver}") depends_on(f"py-geopmdpy@{ver}", type="run", when=f"@{ver}") + if ver != "3.0.1": # geopmpy integrated into autotools build until 3.1 + depends_on(f"py-geopmpy@{ver}", type="run", when=f"@{ver}") + depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build") depends_on("bash-completion") depends_on("unzip") depends_on("mpi@2.2:", when="+mpi") @@ -96,6 +103,13 @@ class GeopmRuntime(AutotoolsPackage): extends("python") + @property + def configure_directory(self): + if self.version == Version("3.0.1"): + return "." + else: + return "libgeopm" + @property def install_targets(self): target = ["install"] @@ -105,20 +119,26 @@ def install_targets(self): def autoreconf(self, spec, prefix): bash = which("bash") - if not spec.version.isdevelop(): - # Required to workaround missing VERSION files - # from GitHub generated source tarballs - with open("VERSION_OVERRIDE", "w") as fd: - fd.write(f"{spec.version}") - bash("./autogen.sh") + with working_dir(self.configure_directory): + if not spec.version.isdevelop(): + if self.version == Version("3.0.1"): + version_file = "VERSION_OVERRIDE" + else: + version_file = "VERSION" + # Required to workaround missing VERSION files + # from GitHub generated source tarballs + with open(version_file, "w") as fd: + fd.write(f"{spec.version}") + bash("./autogen.sh") def configure_args(self): - args = [ - "--with-bash-completion-dir=" - + join_path(self.spec.prefix, "share", "bash-completion", "completions"), - "--disable-geopmd-local", - f"--with-geopmd={self.spec['geopm-service'].prefix}", - ] + + with when("@3.0.1"): + args = [ + "--with-bash-completion-dir=" + + join_path(self.spec.prefix, "share", "bash-completion", "completions") + ] + args += ["--disable-geopmd-local", f"--with-geopmd={self.spec['geopm-service'].prefix}"] args += self.enable_or_disable("debug") args += self.enable_or_disable("docs") diff --git a/var/spack/repos/builtin/packages/geopm-service/package.py b/var/spack/repos/builtin/packages/geopm-service/package.py index b6e15cf0a6af8a..54aa00e6b14494 100644 --- a/var/spack/repos/builtin/packages/geopm-service/package.py +++ b/var/spack/repos/builtin/packages/geopm-service/package.py @@ -18,13 +18,14 @@ class GeopmService(AutotoolsPackage): homepage = "https://geopm.github.io" git = "https://github.com/geopm/geopm.git" - url = "https://github.com/geopm/geopm/tarball/v3.0.1" + url = "https://github.com/geopm/geopm/tarball/v3.1.0" maintainers("bgeltz", "cmcantalupo") license("BSD-3-Clause") tags = ["e4s"] version("develop", branch="dev", get_full_repo=True) + version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e") version("3.0.1", sha256="32ba1948de58815ee055470dcdea64593d1113a6cad70ce00ab0286c127f8234") depends_on("c", type="build") # generated @@ -32,7 +33,7 @@ class GeopmService(AutotoolsPackage): depends_on("fortran", type="build") # generated variant("debug", default=False, description="Enable debug") - variant("docs", default=True, description="Create man pages with Sphinx") + variant("docs", default=True, when="@3.0.1", description="Create man pages with Sphinx") variant("systemd", default=True, description="Enable use of systemd/DBus") variant("liburing", default=True, description="Enables the use of liburing for batch I/O") variant( @@ -69,24 +70,30 @@ class GeopmService(AutotoolsPackage): depends_on("libtool", type="build") depends_on("file") - # Docs dependencies - depends_on("doxygen", type="build", when="+docs") - depends_on("py-docstring-parser@0.13.0:", type="build", when="+docs") - depends_on("py-sphinx", type="build", when="+docs") - depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs") - depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs") - depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs") - depends_on("py-pygments@2.13.0:", type="build", when="+docs") - - # Other Python dependencies - from service/setup.py - depends_on("py-dasbus@1.6.0:", type=("build", "run")) - depends_on("py-cffi@1.14.5:", type="run") - depends_on("py-psutil@5.8.0:", type="run") - depends_on("py-jsonschema@3.2.0:", type="run") - depends_on("py-pyyaml@6.0:", type="run") - depends_on("py-setuptools@53.0.0:", type="build") + with when("@3.0.1"): + # Docs dependencies + # Moved to python3-geopm-doc as of v3.1 + depends_on("doxygen", type="build", when="+docs") + depends_on("py-docstring-parser@0.13.0:", type="build", when="+docs") + depends_on("py-sphinx", type="build", when="+docs") + depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs") + depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs") + depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs") + depends_on("py-pygments@2.13.0:", type="build", when="+docs") + + # Other Python dependencies - from service/setup.py + # Moved to python3-geopmdpy as of v3.1 + depends_on("py-setuptools@53.0.0:", type="build") + depends_on("py-dasbus@1.6.0:", type=("build", "run")) + depends_on("py-psutil@5.8.0:", type=("build", "run")) + depends_on("py-jsonschema@3.2.0:", type=("build", "run")) + depends_on("py-pyyaml@6.0:", type=("build", "run")) + depends_on("py-cffi@1.14.5:", type="run") # Other dependencies + for ver in ["3.1.0", "develop"]: + depends_on(f"py-geopmdpy@{ver}", type="run", when=f"@{ver}") + depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build") depends_on("bash-completion") depends_on("unzip") depends_on("systemd", when="+systemd") @@ -97,15 +104,24 @@ class GeopmService(AutotoolsPackage): extends("python") - configure_directory = "service" + @property + def configure_directory(self): + if self.version == Version("3.0.1"): + return "service" + else: + return "libgeopmd" def autoreconf(self, spec, prefix): bash = which("bash") - with working_dir("service"): + with working_dir(self.configure_directory): if not spec.version.isdevelop(): + if self.version == Version("3.0.1"): + version_file = "VERSION_OVERRIDE" + else: + version_file = "VERSION" # Required to workaround missing VERSION files # from GitHub generated source tarballs - with open("VERSION_OVERRIDE", "w") as fd: + with open(version_file, "w") as fd: fd.write(f"{spec.version}") bash("./autogen.sh") diff --git a/var/spack/repos/builtin/packages/librsvg/package.py b/var/spack/repos/builtin/packages/librsvg/package.py index 910c4eaafd93e3..71a0a90d75d641 100644 --- a/var/spack/repos/builtin/packages/librsvg/package.py +++ b/var/spack/repos/builtin/packages/librsvg/package.py @@ -52,6 +52,7 @@ class Librsvg(AutotoolsPackage): depends_on("libffi") depends_on("shared-mime-info") + depends_on("py-docutils", type="build") def url_for_version(self, version): url = "https://download.gnome.org/sources/librsvg/" diff --git a/var/spack/repos/builtin/packages/py-blosc2/package.py b/var/spack/repos/builtin/packages/py-blosc2/package.py index cd592a6559107c..30964085df71a7 100644 --- a/var/spack/repos/builtin/packages/py-blosc2/package.py +++ b/var/spack/repos/builtin/packages/py-blosc2/package.py @@ -14,6 +14,7 @@ class PyBlosc2(PythonPackage): license("BSD-3-Clause") + version("2.6.2", sha256="8ca29d9aa988b85318bd8a9b707a7a06c8d6604ae1304cae059170437ae4f53a") version("2.2.8", sha256="59065aac5e9b01b0e9f3825d8e7f69f64b59bbfab148a47c54e4115f62a97474") version("2.0.0", sha256="f19b0b3674f6c825b490f00d8264b0c540c2cdc11ec7e81178d38b83c57790a1") diff --git a/var/spack/repos/builtin/packages/py-geopmdpy/package.py b/var/spack/repos/builtin/packages/py-geopmdpy/package.py index 0aa9483603a1e8..a67981826d4fa7 100644 --- a/var/spack/repos/builtin/packages/py-geopmdpy/package.py +++ b/var/spack/repos/builtin/packages/py-geopmdpy/package.py @@ -12,13 +12,14 @@ class PyGeopmdpy(PythonPackage): homepage = "https://geopm.github.io" git = "https://github.com/geopm/geopm.git" - url = "https://github.com/geopm/geopm/tarball/v3.0.1" + url = "https://github.com/geopm/geopm/tarball/v3.1.0" maintainers("bgeltz", "cmcantalupo") license("BSD-3-Clause") tags = ["e4s"] - version("develop", branch="dev") + version("develop", branch="dev", get_full_repo=True) + version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e") version("3.0.1", sha256="32ba1948de58815ee055470dcdea64593d1113a6cad70ce00ab0286c127f8234") depends_on("c", type="build") # generated @@ -31,13 +32,23 @@ class PyGeopmdpy(PythonPackage): depends_on("py-jsonschema@3.2.0:", type="run") depends_on("py-pyyaml@6.0:", type="run") depends_on("py-setuptools@53.0.0:", type="build") + depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build") + depends_on("py-build@0.9.0:", when="@3.1:", type="build") - build_directory = "service" + @property + def build_directory(self): + if self.version == Version("3.0.1"): + return "service" + else: + return "geopmdpy" + + def setup_build_environment(self, env): + if not self.spec.version.isdevelop(): + env.set("SETUPTOOLS_SCM_PRETEND_VERSION", self.version) @run_before("install") def populate_version(self): - # @develop builds will have a version of 0.0.0 - if not self.spec.version.isdevelop(): - with working_dir(join_path("service", "geopmdpy")): + if self.version == Version("3.0.1"): + with working_dir(join_path(self.build_directory, "geopmdpy")): with open("version.py", "w") as fd: fd.write(f"__version__ = '{self.spec.version}'") diff --git a/var/spack/repos/builtin/packages/py-geopmpy/package.py b/var/spack/repos/builtin/packages/py-geopmpy/package.py new file mode 100644 index 00000000000000..7a7e13f7343b18 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-geopmpy/package.py @@ -0,0 +1,41 @@ +# 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 PyGeopmpy(PythonPackage): + """The Global Extensible Open Power Manager (GEOPM) Service provides a + user interface for accessing hardware telemetry and settings securely.""" + + homepage = "https://geopm.github.io" + git = "https://github.com/geopm/geopm.git" + url = "https://github.com/geopm/geopm/tarball/v3.1.0" + + maintainers("bgeltz", "cmcantalupo") + license("BSD-3-Clause") + tags = ["e4s"] + + version("develop", branch="dev", get_full_repo=True) + version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e") + + depends_on("python@3.6:3", type=("build", "run")) + depends_on("py-setuptools@53.0.0:", type="build") + depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build") + depends_on("py-build@0.9.0:", when="@3.1:", type="build") + depends_on("py-cffi@1.14.5:", type="run") + depends_on("py-natsort@8.2.0:", type="run") + depends_on("py-numpy@1.19.5:", type="run") + depends_on("py-pandas@1.1.5:", type="run") + depends_on("py-tables@3.7.0:", type="run") + depends_on("py-psutil@5.8.0:", type="run") + depends_on("py-pyyaml@6.0:", type="run") + depends_on("py-docutils@0.18:", type="run") + + build_directory = "geopmpy" + + def setup_build_environment(self, env): + if not self.spec.version.isdevelop(): + env.set("SETUPTOOLS_SCM_PRETEND_VERSION", self.version) From d124338ecb0433c2dc82276c2526f359c70db1e1 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Mon, 22 Jul 2024 12:24:42 -0700 Subject: [PATCH 012/435] libgudev: new package (#44639) --- .../builtin/packages/libgudev/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libgudev/package.py diff --git a/var/spack/repos/builtin/packages/libgudev/package.py b/var/spack/repos/builtin/packages/libgudev/package.py new file mode 100644 index 00000000000000..fa2642319299ef --- /dev/null +++ b/var/spack/repos/builtin/packages/libgudev/package.py @@ -0,0 +1,22 @@ +# 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 Libgudev(MesonPackage): + """Provides GObject bindings for libudev.""" + + homepage = "https://gitlab.gnome.org/GNOME/libgudev/" + url = "https://download.gnome.org/sources/libgudev/238/libgudev-238.tar.xz" + + maintainers("teaguesterling") + + license("LGPL2.1", checked_by="teaguesterling") + + version("238", sha256="61266ab1afc9d73dbc60a8b2af73e99d2fdff47d99544d085760e4fa667b5dd1") + + with default_args(type=("build", "link", "run")): + depends_on("glib@2.38:") + depends_on("systemd@251:") # For libuvdev From c1f979cd5421a5674cffcd0fdc88e097affebfb6 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Mon, 22 Jul 2024 12:27:45 -0700 Subject: [PATCH 013/435] libwnck: new package (#44641) --- .../repos/builtin/packages/libwnck/package.py | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libwnck/package.py diff --git a/var/spack/repos/builtin/packages/libwnck/package.py b/var/spack/repos/builtin/packages/libwnck/package.py new file mode 100644 index 00000000000000..40f139cb6e9693 --- /dev/null +++ b/var/spack/repos/builtin/packages/libwnck/package.py @@ -0,0 +1,76 @@ +# 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 Libwnck(MesonPackage, AutotoolsPackage): + """Window Navigator Construction Kit""" + + homepage = "https://gitlab.gnome.org/GNOME/libwnck" + url = "https://download.gnome.org/sources/libwnck/3.4/libwnck-3.4.9.tar.xz" + list_url = "https://download.gnome.org/sources/libwnck/" + list_depth = 2 + + def url_for_version(self, version): + base = "https://download.gnome.org/sources/libwnck" + dirname = version.up_to(1) if version >= Version("40") else version.up_to(2) + filename = f"libwnck-{version.up_to(3)}.tar.xz" + return f"{base}/{dirname}/{filename}" + + license("GPLv2", checked_by="teaguesterling") + + version("43.0", sha256="905bcdb85847d6b8f8861e56b30cd6dc61eae67ecef4cd994a9f925a26a2c1fe") + version("40.1", sha256="03134fa114ef3fbe34075aa83678f58aa2debe9fcef4ea23c0779e28601d6611") + version("3.36.0", sha256="bc508150b3ed5d22354b0e6774ad4eee465381ebc0ace45eb0e2d3a4186c925f") + version("3.24.1", sha256="afa6dc283582ffec15c3374790bcbcb5fb422bd38356d72deeef35bf7f9a1f04") + version("3.20.1", sha256="1cb03716bc477058dfdf3ebfa4f534de3b13b1aa067fcd064d0b7813291cba72") + version("3.14.1", sha256="bb643c9c423c8aa79c59973ce27ce91d3b180d1e9907902278fb79391f52befa") + version("3.4.9", sha256="96e6353f2701a1ea565ece54d791a7bebef1832d96126f7377c54bb3516682c4") + + variant("cairo", default=True, description="Build with cairo support") + variant("install_tools", default=True, description="Install WNCK tools") + variant("xres", default=True, description="Build with xres support") + variant("introspection", default=True, description="Build with gobject-introspection support") + variant( + "startup_notification", default=True, description="Build with startup-notification support" + ) + variant("gtk_doc", default=False, description="Build documentation") + + build_system( + conditional("meson", when="@3.31:"), + conditional("autotools", when="@:3.24"), + default="meson", + ) + + with default_args(type="build"): + depends_on("pkgconfig@0.9.0:") + depends_on("gettext", when="@3.31:") + depends_on("intltool@0.40.6:", when="@:3.24") + depends_on("cmake", when="build_system=meson") + depends_on("gtk-doc@1.9:", when="+gtk_doc") + + with default_args(type=("build", "link", "run")): + depends_on("glib@2") + depends_on("gdk-pixbuf") + depends_on("gtkplus@3.22:") + + depends_on("cairo+X+gobject", when="+cairo") + depends_on("libxres", when="+xres") + depends_on("gobject-introspection", when="+introspection") + depends_on("startup-notification", when="+startup_notification") + + def configure_args(self): + args = [] + + args += self.enable_or_disable("introspection") + args += self.enable_or_disable("install_tools") + args += self.enable_or_disable("startup_notification") + args += self.enable_or_disable("gtk_doc") + + return args + + def setup_dependent_build_environment(self, env, dep_spec): + if self.spec.satisfies("+introspection") and dep_spec.satisfies("+introspection"): + env.append_path("XDG_DATA_DIRS", self.prefix.share) From ab1580a37f5a64c683943a022f110584aff773f6 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Mon, 22 Jul 2024 12:57:39 -0700 Subject: [PATCH 014/435] linux-pam: add v1.5.1, v1.5.3, v1.6.0, v1.6.1 and additional variants (#45344) * package/linux-pam: dependencies * Adding variants to linux-pam * Updating linux-pam variants * Fixing variants for linux-pam after testing * clean up flag handling * clean up terrible tabs * cant use default_args for compiler dependencies * Change selinux to off by default --------- Signed-off-by: Teague Sterling --- .../builtin/packages/linux-pam/package.py | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/linux-pam/package.py b/var/spack/repos/builtin/packages/linux-pam/package.py index 9184feecd2c571..484e9e2cb9a5d2 100644 --- a/var/spack/repos/builtin/packages/linux-pam/package.py +++ b/var/spack/repos/builtin/packages/linux-pam/package.py @@ -14,20 +14,56 @@ class LinuxPam(AutotoolsPackage): license("BSD-3-Clause") - version("1.5.1", sha256="201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc") + version("1.6.1", sha256="f8923c740159052d719dbfc2a2f81942d68dd34fcaf61c706a02c9b80feeef8e") + version("1.6.0", sha256="fff4a34e5bbee77e2e8f1992f27631e2329bcbf8a0563ddeb5c3389b4e3169ad") + version("1.5.3", sha256="7ac4b50feee004a9fa88f1dfd2d2fa738a82896763050cd773b3c54b0a818283") version("1.5.2", sha256="e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d") + version("1.5.1", sha256="201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc") version("1.5.0", sha256="02d39854b508fae9dc713f7733bbcdadbe17b50de965aedddd65bcb6cc7852c8") version("1.4.0", sha256="cd6d928c51e64139be3bdb38692c68183a509b83d4f2c221024ccd4bcddfd034") version("1.3.1", sha256="eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db") - depends_on("c", type="build") # generated + variant("unix", default=True, description="Build pam_unix model") + variant("selinux", default=False, description="Build with selinux support") + variant("nls", default=False, description="Build with natural language support") + variant("xauth", default=False, description="Build with xauth support") + variant("openssl", default=False, description="Build with openssl support") + variant("lastlog", default=False, description="Build pam_lastlog model") + variant("regenerate-docu", default=False, description="Regenerate docs") depends_on("libtirpc") depends_on("libxcrypt") + depends_on("xauth", when="+xauth") + depends_on("c", type="build") + + with default_args(type="build"): + depends_on("m4") + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("gettext", when="+nls") + with when("+regenerate-docu"): + depends_on("bison") + depends_on("flex") + depends_on("yacc") + + def flag_handler(self, name, flags): + if name == "ldflags" and self.spec.satisfies("+nls"): + flags += ["-lintl"] # Addresses https://github.com/spack/spack/issues/44637 + return (flags, None, None) def configure_args(self): - return [ - "--disable-nls", - "--disable-regenerate-docu", - f"--includedir={self.prefix.include.security}", - ] + args = [f"--includedir={self.prefix.include.security}"] + + args += self.enable_or_disable("nls") + args += self.enable_or_disable("openssl") + args += self.enable_or_disable("unix") + args += self.enable_or_disable("lastlog") + args += self.enable_or_disable("selinux") + args += self.enable_or_disable("regenerate-docu") + + if self.spec.satisfies("+xauth"): + xauth = self.spec["xauth"] + args.append(f"--with-xauth={xauth.prefix.bin.xauth}") + + return args From b2a14b456e53aa2b9dc443a78787a16b4a75e1c4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 22 Jul 2024 22:04:09 +0200 Subject: [PATCH 015/435] py-numpy: add v2.0.1 (#45354) --- var/spack/repos/builtin/packages/py-numpy/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index a7e247c6be1c2d..02fc694df90743 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -22,6 +22,7 @@ class PyNumpy(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + version("2.0.1", sha256="485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3") version("2.0.0", sha256="cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864") version("1.26.4", sha256="2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010") version("1.26.3", sha256="697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4") @@ -74,9 +75,8 @@ class PyNumpy(PythonPackage): version("1.17.4", sha256="f58913e9227400f1395c7b800503ebfdb0772f1c33ff8cb4d6451c06cabdf316") version("1.17.3", sha256="a0678793096205a4d784bd99f32803ba8100f639cf3b932dc63b21621390ea7e") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") # Based on PyPI wheel availability with default_args(type=("build", "link", "run")): From 4917e3f664cc5120c16fd45919e9ca1fe8ce9c39 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 22 Jul 2024 14:22:46 -0600 Subject: [PATCH 016/435] votca: add v2024.1 (#45341) --- var/spack/repos/builtin/packages/votca/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/votca/package.py b/var/spack/repos/builtin/packages/votca/package.py index 5952239472b041..c6788fbc60fea2 100644 --- a/var/spack/repos/builtin/packages/votca/package.py +++ b/var/spack/repos/builtin/packages/votca/package.py @@ -20,6 +20,7 @@ class Votca(CMakePackage): maintainers("junghans") version("master", branch="master") + version("2024.1", sha256="68669a7d09020f780d2633eb865c6c53e5fb38d155f80c9670ebf9d10d10bee6") version("2024", sha256="7f342e857f4a6ba6d25937f63830afa3c32cbd906255c8d78aa6c500cfd418c8") version("2023", sha256="6150a38c77379d05592a56ae4392a00c4636d02198bb06108a3dc739a45115f8") version("2022.1", sha256="358119b2645fe60f88ca621aed508c49fb61f88d29d3e3fa24b5b831ed4a66ec") From 3c0ffa86526e66cd123712f9dc57e1ff364b70bb Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:31:38 -0700 Subject: [PATCH 017/435] uftrace: new test API, add 0.16 with libtraceevent, fix build (#45364) Co-authored-by: Bernhard Kaindl --- .../builtin/packages/capstone/package.py | 7 ++- .../builtin/packages/libtraceevent/package.py | 50 +++++++++++++++++++ .../repos/builtin/packages/uftrace/package.py | 48 ++++++++---------- 3 files changed, 75 insertions(+), 30 deletions(-) create mode 100644 var/spack/repos/builtin/packages/libtraceevent/package.py diff --git a/var/spack/repos/builtin/packages/capstone/package.py b/var/spack/repos/builtin/packages/capstone/package.py index a41258027d4538..d64ea3d4712c4a 100644 --- a/var/spack/repos/builtin/packages/capstone/package.py +++ b/var/spack/repos/builtin/packages/capstone/package.py @@ -21,5 +21,8 @@ class Capstone(CMakePackage): version("4.0.2", sha256="7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a") version("4.0.1", sha256="79bbea8dbe466bd7d051e037db5961fdb34f67c9fac5c3471dd105cfb1e05dc7") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") + + def cmake_args(self): + return ["-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE"] diff --git a/var/spack/repos/builtin/packages/libtraceevent/package.py b/var/spack/repos/builtin/packages/libtraceevent/package.py new file mode 100644 index 00000000000000..4f3e736e636e3a --- /dev/null +++ b/var/spack/repos/builtin/packages/libtraceevent/package.py @@ -0,0 +1,50 @@ +# 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 Libtraceevent(MakefilePackage): + """Library to parse raw trace event formats.""" + + homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git" + url = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-1.8.2.tar.gz" + git = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git" + + maintainers("Jordan474") + + license("LGPL-2.1-or-later AND GPL-2.0-or-later") + + version("1.8.2", sha256="919f0c024c7b5059eace52d854d4df00ae7e361a4033e1b4d6fe01d97064a1b9") + + variant("doc", default=False, description="Build documentation") + + depends_on("c", type="build") + depends_on("asciidoc", when="+doc", type="build") + depends_on("xmlto", when="+doc", type="build") + + def patch(self): + set_executable("Documentation/install-docs.sh.in") + + @property + def common_targets(self): + return [ + "prefix=" + self.prefix, + "pkgconfig_dir=" + join_path(self.prefix.lib, "pkgconfig"), + ] + + @property + def build_targets(self): + result = self.common_targets + ["all"] + if "+doc" in self.spec: + result.append("doc") + return result + + @property + def install_targets(self): + result = self.common_targets + ["install"] + if "+doc" in self.spec: + result.append("doc-install") + return result diff --git a/var/spack/repos/builtin/packages/uftrace/package.py b/var/spack/repos/builtin/packages/uftrace/package.py index 074232a9e34d6a..1913f8ea222ff5 100644 --- a/var/spack/repos/builtin/packages/uftrace/package.py +++ b/var/spack/repos/builtin/packages/uftrace/package.py @@ -13,7 +13,7 @@ class Uftrace(AutotoolsPackage): """Dynamic function graph tracer for Linux which demangles C, C++ and Rust calls""" homepage = "https://uftrace.github.io/slide/" - url = "https://github.com/namhyung/uftrace/archive/v0.11.tar.gz" + url = "https://github.com/namhyung/uftrace/archive/v0.16.tar.gz" git = "https://github.com/namhyung/uftrace.git" executables = ["^uftrace$"] maintainers("bernhardkaindl") @@ -23,11 +23,10 @@ class Uftrace(AutotoolsPackage): # The build process uses 'git describe --tags' to get the package version version("master", branch="master", get_full_repo=True) - version("0.11", sha256="101dbb13cb3320ee76525ec26426f2aa1de4e3ee5af74f79cb403ae4d2c6c871") - version("0.10", sha256="b8b56d540ea95c3eafe56440d6a998e0a140d53ca2584916b6ca82702795bbd9") + version("0.16", sha256="dd0549f610d186b6f25fa2334a5e82b6ddc232ec6ca088dbb41b3fe66961d6bb") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") # full demangler support with libstdc++ variant("doc", default=False, description="Build uftrace's documentation") variant("python2", default=False, description="Build uftrace with python2 support") variant("python3", default=True, description="Build uftrace with python3 support") @@ -38,16 +37,12 @@ class Uftrace(AutotoolsPackage): depends_on("lsof", type="test") depends_on("pkgconfig", type="build") depends_on("libunwind") + depends_on("libtraceevent") depends_on("ncurses") depends_on("python@2.7:", when="+python2") depends_on("python@3.5:", when="+python3") depends_on("lua-luajit") - # Fix the version string if building below another git repo. Submitted upstream: - @when("@:0.11") - def patch(self): - filter_file("shell git", "shell test -e .git && git", "Makefile") - def check(self): make("test", *["V=1", "-j{0}".format(max(int(make_jobs), 20))]) # In certain cases, tests using TCP/IP can hang. Ensure that spack can continue: @@ -59,26 +54,23 @@ def install(self, spec, prefix): def installcheck(self): pass - def test(self): + def test_uftrace(self): """Perform stand-alone/smoke tests using the installed package.""" uftrace = self.prefix.bin.uftrace - self.run_test( - uftrace, - ["-A", ".", "-R", ".", "-P", "main", uftrace, "-V"], - [ - r"dwarf", - r"luajit", - r"tui", - r"sched", - r"dynamic", - r"main\(2, ", - r" getopt_long\(2, ", - r" .*printf.*\(", - r"} = 0; /\* main \*/", - ], - installed=True, - purpose="test: testing the installation", - ) + options = (["-A", ".", "-R", ".", "-P", "main", uftrace, "-V"],) + expected = [ + r"dwarf", + r"luajit", + r"tui", + r"sched", + r"dynamic", + r"main\(2, ", + r" getopt_long\(2, ", + r" .*printf.*\(", + r"} = 0; /\* main \*/", + ] + out = uftrace(*options, output=str.split, error=str.split) + check_outputs(expected, out) @classmethod def determine_version(cls, exe): From 6decd6aaa15e1f47df0f409f3d28feaaafb72127 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:11:18 +0200 Subject: [PATCH 018/435] py-mne-bids: add new package (#45374) --- .../builtin/packages/py-mne-bids/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-mne-bids/package.py diff --git a/var/spack/repos/builtin/packages/py-mne-bids/package.py b/var/spack/repos/builtin/packages/py-mne-bids/package.py new file mode 100644 index 00000000000000..453101527221db --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mne-bids/package.py @@ -0,0 +1,29 @@ +# 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 PyMneBids(PythonPackage): + """MNE-BIDS: Organizing MEG, EEG, and iEEG data according to the BIDS + specification and facilitating their analysis with MNE-Python.""" + + homepage = "https://mne.tools/mne-bids" + pypi = "mne_bids/mne_bids-0.15.0.tar.gz" + git = "https://github.com/mne-tools/mne-bids" + + license("BSD-3-Clause") + + version("0.15.0", sha256="8a3ac7fb586ba2be70eb687c67ae060b42693078c56232180b27161124c22f72") + + variant("full", default=False, description="Enable full functionality.") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + + depends_on("py-mne@1.5:", type=("build", "run")) + depends_on("py-numpy@1.21.2:", type=("build", "run")) + depends_on("py-scipy@1.7.1:", type=("build", "run")) From d66d16902754f77f8327fcaf3d8c4d25b3223421 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 23 Jul 2024 10:31:22 +0200 Subject: [PATCH 019/435] Remove `# generated` comments from many packages, add some missing `depends_on("cxx")` (#45395) --- var/spack/repos/builtin/packages/asio/package.py | 2 +- var/spack/repos/builtin/packages/dla-future/package.py | 4 ++-- var/spack/repos/builtin/packages/fmt/package.py | 2 ++ var/spack/repos/builtin/packages/gperftools/package.py | 4 ++-- var/spack/repos/builtin/packages/hpx-kokkos/package.py | 2 +- var/spack/repos/builtin/packages/hpx/package.py | 2 +- var/spack/repos/builtin/packages/mimalloc/package.py | 4 ++-- var/spack/repos/builtin/packages/mold/package.py | 4 ++-- var/spack/repos/builtin/packages/pika-algorithms/package.py | 2 +- var/spack/repos/builtin/packages/pika/package.py | 2 +- var/spack/repos/builtin/packages/stdexec/package.py | 2 +- var/spack/repos/builtin/packages/tracy-client/package.py | 4 ++-- var/spack/repos/builtin/packages/tracy/package.py | 4 ++-- var/spack/repos/builtin/packages/ut/package.py | 2 +- var/spack/repos/builtin/packages/whip/package.py | 2 ++ 15 files changed, 23 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/asio/package.py b/var/spack/repos/builtin/packages/asio/package.py index b2c67c5da1ab1d..27d1acb3e79a4c 100644 --- a/var/spack/repos/builtin/packages/asio/package.py +++ b/var/spack/repos/builtin/packages/asio/package.py @@ -62,7 +62,7 @@ class Asio(AutotoolsPackage): version("1.16.1", sha256="e40bbd531530f08318b7c7d7e84e457176d8eae6f5ad2e3714dc27b9131ecd35") version("1.16.0", sha256="c87410ea62de6245aa239b9ed2057edf01d7f66acc3f5e50add9a29343c87512") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") depends_on("autoconf", type="build") depends_on("automake", type="build") diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index 566158e5ebc4cc..935f726c6998f4 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -27,8 +27,8 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): version("0.1.0", sha256="f7ffcde22edabb3dc24a624e2888f98829ee526da384cd752b2b271c731ca9b1") version("master", branch="master") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") variant("shared", default=True, description="Build shared libraries.") diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py index 7c612c6a227c0e..2de67ecb770fbb 100644 --- a/var/spack/repos/builtin/packages/fmt/package.py +++ b/var/spack/repos/builtin/packages/fmt/package.py @@ -46,6 +46,8 @@ class Fmt(CMakePackage): version("3.0.0", sha256="1b050b66fa31b74f1d75a14f15e99e728ab79572f176a53b2f8ad7c201c30ceb") version("master", branch="master") + depends_on("cxx", type="build") + variant( "cxxstd", default="11", diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py index 36f00de88b86cc..f6630aedebd679 100644 --- a/var/spack/repos/builtin/packages/gperftools/package.py +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -34,8 +34,8 @@ class Gperftools(AutotoolsPackage, CMakePackage): version("2.4", sha256="982a37226eb42f40714e26b8076815d5ea677a422fb52ff8bfca3704d9c30a2d") version("2.3", sha256="093452ad45d639093c144b4ec732a3417e8ee1f3744f2b0f8d45c996223385ce") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") variant("sized_delete", default=False, description="Build sized delete operator") variant( diff --git a/var/spack/repos/builtin/packages/hpx-kokkos/package.py b/var/spack/repos/builtin/packages/hpx-kokkos/package.py index b5efd783529c8a..f2ea7b1d61a53d 100644 --- a/var/spack/repos/builtin/packages/hpx-kokkos/package.py +++ b/var/spack/repos/builtin/packages/hpx-kokkos/package.py @@ -24,7 +24,7 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage): version("0.2.0", sha256="289b711cea26afe80be002fc521234c9194cd0e8f69863f3b08b654674dbe5d5") version("0.1.0", sha256="24edb817d0969f4aea1b68eab4984c2ea9a58f4760a9b8395e20f85b178f0850") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") cxxstds = ("14", "17", "20") variant( diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py index 1314392bab57b6..910d20b6b5e2f3 100644 --- a/var/spack/repos/builtin/packages/hpx/package.py +++ b/var/spack/repos/builtin/packages/hpx/package.py @@ -41,7 +41,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage): version("1.2.0", sha256="20942314bd90064d9775f63b0e58a8ea146af5260a4c84d0854f9f968077c170") version("1.1.0", sha256="1f28bbe58d8f0da600d60c3a74a644d75ac777b20a018a5c1c6030a470e8a1c9") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") generator("ninja") diff --git a/var/spack/repos/builtin/packages/mimalloc/package.py b/var/spack/repos/builtin/packages/mimalloc/package.py index 9f1cae74f7d969..7d5cd800622ff5 100644 --- a/var/spack/repos/builtin/packages/mimalloc/package.py +++ b/var/spack/repos/builtin/packages/mimalloc/package.py @@ -32,8 +32,8 @@ class Mimalloc(CMakePackage): version("1.7.7", sha256="0f6663be1e1764851bf9563fcf7a6b3330e23b933eb4737dd07e3289b87895fe") version("1.7.6", sha256="d74f86ada2329016068bc5a243268f1f555edd620b6a7d6ce89295e7d6cf18da") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("cmake@3.0:", type="build") diff --git a/var/spack/repos/builtin/packages/mold/package.py b/var/spack/repos/builtin/packages/mold/package.py index fc6397ace6ab7f..eae4005216816b 100644 --- a/var/spack/repos/builtin/packages/mold/package.py +++ b/var/spack/repos/builtin/packages/mold/package.py @@ -29,8 +29,8 @@ class Mold(CMakePackage): version("1.11.0", sha256="99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f") version("1.7.1", sha256="fa2558664db79a1e20f09162578632fa856b3cde966fbcb23084c352b827dfa9") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("blake3", when="@2.2:") depends_on("mimalloc") diff --git a/var/spack/repos/builtin/packages/pika-algorithms/package.py b/var/spack/repos/builtin/packages/pika-algorithms/package.py index c639fc8d757104..b96ab2c764743a 100644 --- a/var/spack/repos/builtin/packages/pika-algorithms/package.py +++ b/var/spack/repos/builtin/packages/pika-algorithms/package.py @@ -24,7 +24,7 @@ class PikaAlgorithms(CMakePackage): version("0.1.0", sha256="64da008897dfa7373155595c46d2ce6b97a8a3cb5bea33ae7f2d1ff359f0d9b6") version("main", branch="main") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") generator("ninja") diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index 34dbc1a2083d24..e20d181fe7b6e1 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -51,7 +51,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): version("0.1.0", sha256="aa0ae2396cd264d821a73c4c7ecb118729bb3de042920c9248909d33755e7327") version("main", branch="main") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") generator("ninja") diff --git a/var/spack/repos/builtin/packages/stdexec/package.py b/var/spack/repos/builtin/packages/stdexec/package.py index 0639c5a1c63844..95b6707b1c51eb 100644 --- a/var/spack/repos/builtin/packages/stdexec/package.py +++ b/var/spack/repos/builtin/packages/stdexec/package.py @@ -19,7 +19,7 @@ class Stdexec(CMakePackage): version("23.03", sha256="2c9dfb6e56a190543049d2300ccccd1b626f4bb82af5b607869c626886fadd15") version("main", branch="main") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") depends_on("cmake@3.23.1:", type="build") diff --git a/var/spack/repos/builtin/packages/tracy-client/package.py b/var/spack/repos/builtin/packages/tracy-client/package.py index 718be651cd14e5..a1c0854166d3cd 100644 --- a/var/spack/repos/builtin/packages/tracy-client/package.py +++ b/var/spack/repos/builtin/packages/tracy-client/package.py @@ -22,8 +22,8 @@ class TracyClient(CMakePackage): version("0.8.2", sha256="4784eddd89c17a5fa030d408392992b3da3c503c872800e9d3746d985cfcc92a") version("0.8.1", sha256="004992012b2dc879a9f6d143cbf94d7ea30e88135db3ef08951605d214892891") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") variant("shared", default=True, description="Build the client library as a shared library") diff --git a/var/spack/repos/builtin/packages/tracy/package.py b/var/spack/repos/builtin/packages/tracy/package.py index 901fd75fcb7317..e9102607c853b9 100644 --- a/var/spack/repos/builtin/packages/tracy/package.py +++ b/var/spack/repos/builtin/packages/tracy/package.py @@ -22,8 +22,8 @@ class Tracy(MakefilePackage): version("0.8.2", sha256="4784eddd89c17a5fa030d408392992b3da3c503c872800e9d3746d985cfcc92a") version("0.8.1", sha256="004992012b2dc879a9f6d143cbf94d7ea30e88135db3ef08951605d214892891") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("capstone") depends_on("dbus") diff --git a/var/spack/repos/builtin/packages/ut/package.py b/var/spack/repos/builtin/packages/ut/package.py index 583ae7dd660200..fc4add539ccfc8 100644 --- a/var/spack/repos/builtin/packages/ut/package.py +++ b/var/spack/repos/builtin/packages/ut/package.py @@ -22,7 +22,7 @@ class Ut(CMakePackage): version("2.0.0", sha256="8b5b11197d1308dfc1fe20efd6a656e0c833dbec2807e2292967f6e2f7c0420f") version("1.1.9", sha256="1a666513157905aa0e53a13fac602b5673dcafb04a869100a85cd3f000c2ed0d") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") generator("ninja") diff --git a/var/spack/repos/builtin/packages/whip/package.py b/var/spack/repos/builtin/packages/whip/package.py index 18cfc76a6dd506..f6b826a7fa23a1 100644 --- a/var/spack/repos/builtin/packages/whip/package.py +++ b/var/spack/repos/builtin/packages/whip/package.py @@ -22,6 +22,8 @@ class Whip(CMakePackage, CudaPackage, ROCmPackage): version("0.2.0", sha256="d8fec662526accbd1624922fdf01a077d6f312cf253382660e4a2f65e28e8686") version("0.1.0", sha256="5d557794f4afc8332fc660948a342f69e22bc9e5d575ffb3e3944cf526db5ec9") + depends_on("cxx", type="build") + depends_on("cmake@3.22:", type="build") # Exactly one of +cuda and +rocm need to be set From 13ba1b96c3a6edb9bffa9634e226e4a06dda84f2 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 23 Jul 2024 16:46:45 +0200 Subject: [PATCH 020/435] fmt: add 11.0.2 (#45396) --- var/spack/repos/builtin/packages/fmt/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py index 2de67ecb770fbb..f9aa83dcbec154 100644 --- a/var/spack/repos/builtin/packages/fmt/package.py +++ b/var/spack/repos/builtin/packages/fmt/package.py @@ -18,6 +18,7 @@ class Fmt(CMakePackage): license("MIT") + version("11.0.2", sha256="40fc58bebcf38c759e11a7bd8fdc163507d2423ef5058bba7f26280c5b9c5465") version("11.0.1", sha256="62ca45531814109b5d6cef0cf2fd17db92c32a30dd23012976e768c685534814") version("11.0.0", sha256="583ce480ef07fad76ef86e1e2a639fc231c3daa86c4aa6bcba524ce908f30699") version("10.2.1", sha256="312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9") From fc0955b125c37aa3a05882ec1ac849903ca4f569 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 23 Jul 2024 16:54:12 +0200 Subject: [PATCH 021/435] Update and clean up hdf-eos2 package.py to fix build errors with Intel oneAPI (#45399) --- .../repos/builtin/packages/hdf-eos2/package.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf-eos2/package.py b/var/spack/repos/builtin/packages/hdf-eos2/package.py index 0f2fdb0d6a91fa..1b41abbf6509dc 100644 --- a/var/spack/repos/builtin/packages/hdf-eos2/package.py +++ b/var/spack/repos/builtin/packages/hdf-eos2/package.py @@ -120,9 +120,11 @@ def fix_configure(self): filter_file("CC=./\\$SZIP_CC", "", "configure") def flag_handler(self, name, flags): - if self.spec.compiler.name == "apple-clang": - if name == "cflags": + if name == "cflags": + flags.append(self.compiler.cc_pic_flag) + if self.spec.compiler.name in ["apple-clang", "oneapi"]: flags.append("-Wno-error=implicit-function-declaration") + flags.append("-Wno-error=implicit-int") return flags, None, None @@ -160,15 +162,4 @@ def configure_args(self): if "zlib" in self.spec: extra_args.append("--with-zlib={0}".format(self.spec["zlib-api"].prefix)) - # https://forum.hdfgroup.org/t/help-building-hdf4-with-clang-error-implicit-declaration-of-function-test-mgr-szip-is-invalid-in-c99/7680 - # -fPIC: https://github.com/spack/spack/issues/43792 - if self.spec.satisfies("%apple-clang"): - extra_args.append( - "CFLAGS=-Wno-error=implicit-function-declaration {0}".format( - self.compiler.cc_pic_flag - ) - ) - else: - extra_args.append("CFLAGS={0}".format(self.compiler.cc_pic_flag)) - return extra_args From 0d326f83b672ac7efd9cd01c4d16679c2acdf0c3 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 23 Jul 2024 11:48:52 -0400 Subject: [PATCH 022/435] GoPackage: default `-modcacherw` to ensure stage cleanup (#45350) --- lib/spack/spack/build_systems/go.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_systems/go.py b/lib/spack/spack/build_systems/go.py index 95472642f68695..a22d3922e82c16 100644 --- a/lib/spack/spack/build_systems/go.py +++ b/lib/spack/spack/build_systems/go.py @@ -72,7 +72,7 @@ def build_directory(self): def build_args(self): """Arguments for ``go build``.""" # Pass ldflags -s = --strip-all and -w = --no-warnings by default - return ["-ldflags", "-s -w", "-o", f"{self.pkg.name}"] + return ["-modcacherw", "-ldflags", "-s -w", "-o", f"{self.pkg.name}"] @property def check_args(self): From 66ed8ebbd9154eba42917a6f22923009089d1ebe Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 23 Jul 2024 11:49:05 -0400 Subject: [PATCH 023/435] gh: convert to GoPackage (#45351) * gh: convert to GoPackage * gh: fix style --- var/spack/repos/builtin/packages/gh/package.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/gh/package.py b/var/spack/repos/builtin/packages/gh/package.py index ca768b4eb02553..90f40c6313812b 100644 --- a/var/spack/repos/builtin/packages/gh/package.py +++ b/var/spack/repos/builtin/packages/gh/package.py @@ -6,7 +6,7 @@ from spack.package import * -class Gh(Package): +class Gh(GoPackage): """GitHub's official command line tool.""" homepage = "https://github.com/cli/cli" @@ -43,14 +43,10 @@ class Gh(Package): depends_on("go@1.21:", type="build", when="@2.33.0:") depends_on("go@1.22:", type="build", when="@2.47.0:") - phases = ["build", "install"] - def setup_build_environment(self, env): - # Point GOPATH at the top of the staging dir for the build step. - env.prepend_path("GOPATH", self.stage.path) - - def build(self, spec, prefix): - make() - - def install(self, spec, prefix): - make("install", "prefix=" + prefix) +class GoBuilder(spack.build_systems.go.GoBuilder): + @property + def build_args(self): + args = super().build_args + args.extend(["-trimpath", "./cmd/gh"]) + return args From 7bb892f7b392d33cf77cc66bbdbd12b09be5a8f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:52:42 -0400 Subject: [PATCH 024/435] build(deps): bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#45381) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/5927c834f5b4fdf503fca6f4c7eccda82949e1ee...49b3bc8e6bdd4a60e6116a5414239cba5943d3cf) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 799d3b981188bc..23db7791aeda95 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -93,7 +93,7 @@ jobs: path: dockerfiles - name: Set up QEMU - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf - name: Set up Docker Buildx uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 From 03e5dddf246b3f53200e9e9df610d44d3739f026 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:53:04 -0400 Subject: [PATCH 025/435] build(deps): bump docker/build-push-action from 6.4.1 to 6.5.0 (#45380) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.4.1 to 6.5.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/1ca370b3a9802c92e886402e0dd88098a2533b12...5176d81f87c23d6fc96624dfdbcd9f3830bbe445) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 23db7791aeda95..7b8fdeb2c27f82 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -113,7 +113,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & Deploy ${{ matrix.dockerfile[0] }} - uses: docker/build-push-action@1ca370b3a9802c92e886402e0dd88098a2533b12 + uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 with: context: dockerfiles/${{ matrix.dockerfile[0] }} platforms: ${{ matrix.dockerfile[1] }} From b65d9f1524fb178d17160769f29b974643d0e338 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:53:18 -0400 Subject: [PATCH 026/435] build(deps): bump docker/setup-buildx-action from 3.4.0 to 3.5.0 (#45379) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/4fd812986e6c8c2a69e18311145f9371337f27d4...aa33708b10e362ff993539393ff100fa93ed6a27) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 7b8fdeb2c27f82..1fe2c8427a7a89 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -96,7 +96,7 @@ jobs: uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf - name: Set up Docker Buildx - uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 + uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 - name: Log in to GitHub Container Registry uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 From 8c6177c47f2bb8b698eba0ac22400603e6396ff7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:53:43 -0400 Subject: [PATCH 027/435] build(deps): bump sphinx from 7.4.6 to 7.4.7 in /lib/spack/docs (#45376) Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.6 to 7.4.7. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.6...v7.4.7) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 7785508b15b58e..300ffbdbb4feff 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -1,4 +1,4 @@ -sphinx==7.4.6 +sphinx==7.4.7 sphinxcontrib-programoutput==0.17 sphinx_design==0.6.0 sphinx-rtd-theme==2.0.0 From 6ea944bf1740f2ba9bfb178701519eaa33458829 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:53:55 -0400 Subject: [PATCH 028/435] build(deps): bump pytest from 8.2.2 to 8.3.1 in /lib/spack/docs (#45377) Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.2 to 8.3.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 300ffbdbb4feff..90cae4526b5f4c 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -6,7 +6,7 @@ python-levenshtein==0.25.1 docutils==0.20.1 pygments==2.18.0 urllib3==2.2.2 -pytest==8.2.2 +pytest==8.3.1 isort==5.13.2 black==24.4.2 flake8==7.1.0 From 0fb44529bbf6b14fec804e8b4658cfd6cf4ceb14 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:52:52 -0700 Subject: [PATCH 029/435] e4s rocm external ci stack: upgrade to v6.1.2 (#45356) * e4s rocm external ci stack: upgrade to v6.1.2 * magma: add rocm-core 6.1.2 --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 2 +- .../stacks/e4s-rocm-external/spack.yaml | 150 +++++++++--------- .../repos/builtin/packages/magma/package.py | 1 + 3 files changed, 77 insertions(+), 76 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index d0fdbfdaffbed9..f81a45a0b58073 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -376,7 +376,7 @@ e4s-neoverse_v1-build: e4s-rocm-external-generate: extends: [ ".e4s-rocm-external", ".generate-x86_64"] - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.1.1:2024.06.23 + image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.1.2:2024.07.22 e4s-rocm-external-build: extends: [ ".e4s-rocm-external", ".build" ] diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index d63720dcfa75bf..4ed973ac03e3d9 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -27,186 +27,186 @@ spack: comgr: buildable: false externals: - - spec: comgr@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: comgr@6.1.2 + prefix: /opt/rocm-6.1.2/ hip-rocclr: buildable: false externals: - - spec: hip-rocclr@6.1.1 - prefix: /opt/rocm-6.1.1/hip + - spec: hip-rocclr@6.1.2 + prefix: /opt/rocm-6.1.2/hip hipblas: buildable: false externals: - - spec: hipblas@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: hipblas@6.1.2 + prefix: /opt/rocm-6.1.2/ hipcub: buildable: false externals: - - spec: hipcub@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: hipcub@6.1.2 + prefix: /opt/rocm-6.1.2/ hipfft: buildable: false externals: - - spec: hipfft@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: hipfft@6.1.2 + prefix: /opt/rocm-6.1.2/ hipsparse: buildable: false externals: - - spec: hipsparse@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: hipsparse@6.1.2 + prefix: /opt/rocm-6.1.2/ miopen-hip: buildable: false externals: - - spec: miopen-hip@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: miopen-hip@6.1.2 + prefix: /opt/rocm-6.1.2/ miopengemm: buildable: false externals: - - spec: miopengemm@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: miopengemm@6.1.2 + prefix: /opt/rocm-6.1.2/ rccl: buildable: false externals: - - spec: rccl@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rccl@6.1.2 + prefix: /opt/rocm-6.1.2/ rocblas: buildable: false externals: - - spec: rocblas@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocblas@6.1.2 + prefix: /opt/rocm-6.1.2/ rocfft: buildable: false externals: - - spec: rocfft@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocfft@6.1.2 + prefix: /opt/rocm-6.1.2/ rocm-clang-ocl: buildable: false externals: - - spec: rocm-clang-ocl@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocm-clang-ocl@6.1.2 + prefix: /opt/rocm-6.1.2/ rocm-cmake: buildable: false externals: - - spec: rocm-cmake@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocm-cmake@6.1.2 + prefix: /opt/rocm-6.1.2/ rocm-dbgapi: buildable: false externals: - - spec: rocm-dbgapi@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocm-dbgapi@6.1.2 + prefix: /opt/rocm-6.1.2/ rocm-debug-agent: buildable: false externals: - - spec: rocm-debug-agent@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocm-debug-agent@6.1.2 + prefix: /opt/rocm-6.1.2/ rocm-device-libs: buildable: false externals: - - spec: rocm-device-libs@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocm-device-libs@6.1.2 + prefix: /opt/rocm-6.1.2/ rocm-gdb: buildable: false externals: - - spec: rocm-gdb@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocm-gdb@6.1.2 + prefix: /opt/rocm-6.1.2/ rocm-opencl: buildable: false externals: - - spec: rocm-opencl@6.1.1 - prefix: /opt/rocm-6.1.1/opencl + - spec: rocm-opencl@6.1.2 + prefix: /opt/rocm-6.1.2/opencl rocm-smi-lib: buildable: false externals: - - spec: rocm-smi-lib@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: rocm-smi-lib@6.1.2 + prefix: /opt/rocm-6.1.2/ hip: buildable: false externals: - - spec: hip@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: hip@6.1.2 + prefix: /opt/rocm-6.1.2 extra_attributes: compilers: - c: /opt/rocm-6.1.1/llvm/bin/clang++ - c++: /opt/rocm-6.1.1/llvm/bin/clang++ - hip: /opt/rocm-6.1.1/hip/bin/hipcc + c: /opt/rocm-6.1.2/llvm/bin/clang++ + c++: /opt/rocm-6.1.2/llvm/bin/clang++ + hip: /opt/rocm-6.1.2/hip/bin/hipcc hipify-clang: buildable: false externals: - - spec: hipify-clang@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: hipify-clang@6.1.2 + prefix: /opt/rocm-6.1.2 llvm-amdgpu: buildable: false externals: - - spec: llvm-amdgpu@6.1.1 - prefix: /opt/rocm-6.1.1/llvm + - spec: llvm-amdgpu@6.1.2 + prefix: /opt/rocm-6.1.2/llvm extra_attributes: compilers: - c: /opt/rocm-6.1.1/llvm/bin/clang++ - cxx: /opt/rocm-6.1.1/llvm/bin/clang++ + c: /opt/rocm-6.1.2/llvm/bin/clang++ + cxx: /opt/rocm-6.1.2/llvm/bin/clang++ hsakmt-roct: buildable: false externals: - - spec: hsakmt-roct@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: hsakmt-roct@6.1.2 + prefix: /opt/rocm-6.1.2/ hsa-rocr-dev: buildable: false externals: - - spec: hsa-rocr-dev@6.1.1 - prefix: /opt/rocm-6.1.1/ + - spec: hsa-rocr-dev@6.1.2 + prefix: /opt/rocm-6.1.2/ extra_atributes: compilers: - c: /opt/rocm-6.1.1/llvm/bin/clang++ - cxx: /opt/rocm-6.1.1/llvm/bin/clang++ + c: /opt/rocm-6.1.2/llvm/bin/clang++ + cxx: /opt/rocm-6.1.2/llvm/bin/clang++ roctracer-dev-api: buildable: false externals: - - spec: roctracer-dev-api@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: roctracer-dev-api@6.1.2 + prefix: /opt/rocm-6.1.2 roctracer-dev: buildable: false externals: - spec: roctracer-dev@4.5.3 - prefix: /opt/rocm-6.1.1 + prefix: /opt/rocm-6.1.2 rocprim: buildable: false externals: - - spec: rocprim@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: rocprim@6.1.2 + prefix: /opt/rocm-6.1.2 rocrand: buildable: false externals: - - spec: rocrand@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: rocrand@6.1.2 + prefix: /opt/rocm-6.1.2 hipsolver: buildable: false externals: - - spec: hipsolver@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: hipsolver@6.1.2 + prefix: /opt/rocm-6.1.2 rocsolver: buildable: false externals: - - spec: rocsolver@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: rocsolver@6.1.2 + prefix: /opt/rocm-6.1.2 rocsparse: buildable: false externals: - - spec: rocsparse@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: rocsparse@6.1.2 + prefix: /opt/rocm-6.1.2 rocthrust: buildable: false externals: - - spec: rocthrust@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: rocthrust@6.1.2 + prefix: /opt/rocm-6.1.2 rocprofiler-dev: buildable: false externals: - - spec: rocprofiler-dev@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: rocprofiler-dev@6.1.2 + prefix: /opt/rocm-6.1.2 rocm-core: buildable: false externals: - - spec: rocm-core@6.1.1 - prefix: /opt/rocm-6.1.1 + - spec: rocm-core@6.1.2 + prefix: /opt/rocm-6.1.2 specs: # ROCM NOARCH @@ -300,7 +300,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.1.1:2024.06.23 + image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.1.2:2024.07.22 cdash: build-group: E4S ROCm External diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py index 2fae3b495563e0..79b1a09d67477f 100644 --- a/var/spack/repos/builtin/packages/magma/package.py +++ b/var/spack/repos/builtin/packages/magma/package.py @@ -65,6 +65,7 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage): "6.0.2", "6.1.0", "6.1.1", + "6.1.2", ]: depends_on(f"rocm-core@{ver}", when=f"@2.8.0: +rocm ^hip@{ver}") depends_on("python", when="@master", type="build") From b3d82dc3a8fda9344f47e395accaeaf4bffbd561 Mon Sep 17 00:00:00 2001 From: Karol Krizka Date: Tue, 23 Jul 2024 20:12:54 +0100 Subject: [PATCH 030/435] ROOT should add_include_path virtual glu for consistency. (#45057) --- var/spack/repos/builtin/packages/root/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index 0d78bd79fb6755..d797a4c33a45c3 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -771,7 +771,7 @@ def add_include_path(dep_name): add_include_path("xproto") if "+opengl" in spec and "platform=darwin" not in spec: add_include_path("glew") - add_include_path("mesa-glu") + add_include_path("glu") if "platform=darwin" in spec: # Newer deployment targets cause fatal errors in rootcling, so # override with an empty value even though it may lead to link From 8d33c2e7c04795f39e1bdb93e24c28823e627b2e Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Tue, 23 Jul 2024 14:47:04 -0700 Subject: [PATCH 031/435] generate-ninja: new package (#45391) Signed-off-by: Teague Sterling --- .../packages/generate-ninja/package.py | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 var/spack/repos/builtin/packages/generate-ninja/package.py diff --git a/var/spack/repos/builtin/packages/generate-ninja/package.py b/var/spack/repos/builtin/packages/generate-ninja/package.py new file mode 100644 index 00000000000000..408152abc0a37d --- /dev/null +++ b/var/spack/repos/builtin/packages/generate-ninja/package.py @@ -0,0 +1,50 @@ +# 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 GenerateNinja(Package): + """ + A meta-build system that generates build files for Ninja. + This is a fork of the Google GN package with some minor features and bug fixes + """ + + homepage = "https://github.com/o-lim/generate-ninja" + url = "https://github.com/o-lim/generate-ninja/archive/refs/tags/v0.4.1.tar.gz" + + license("BSD", checked_by="teaguesterling") + + version("0.4.1", sha256="1b2bec9dd18602a4af9dc8782ca809e44305f1435d43c55f35ec9eec50ca7e9a") + version("0.4.0", sha256="3575ed41eec49fe756dbd2c402f70cd80ba2952cc59ce2091d0a82b7bd3ce8a0") + version("0.3.2", sha256="82e949c3970d77b28c9df7cf3f3df409798b65848e05ff415009e7e2118460a8") + version("0.3.1", sha256="ed0112b434b80c322fcc9203646eaef17c306a804bf2ff5e5df91677c4e58678") + version("0.3.0", sha256="e6091d34cfc6bc625bfad4bbdc001e10ed951651d0ae98785b509bdfadad6822") + version("0.2.2", sha256="3146bdef1db9dfdc2d48bb5ee5e8e4ef9642ebea7cf39c432681685db8a11c86") + version("0.2.1", sha256="bf27ddde69bd0791ce86bd3ab9ead51dcfb00d3f202168057b721fdc39d417c5") + version("0.2.0", sha256="6cfd6f4a2f6d656e8d5f64d7f03a575a569b2c0f662d1d828ee790c9d9c2be25") + version("0.1.0", sha256="eb94e0bb170416010d3efa296fce63e7fec19f1e3e9b5988b2418166ec068896") + + depends_on("ninja") + depends_on("python", type="build") + depends_on("llvm+clang", type="build") + + def setup_build_environment(self, env): + env.set("DEPLOY", "1") + env.set("CC", self.spec["llvm"].home.bin.clang) + env.set("CXX", self.spec["llvm"].home.bin.join("clang++")) + + phases = ["configure", "build", "install"] + # build_targets = ["bootstrap", "gn"] + out_dir = "out" + + def configure(self, spec, prefix): + python("build/gen.py") + + def build(self, spec, prefix): + ninja("-C", self.out_dir) + + def install(self, spec, prefix): + mkdir(prefix.bin) + install(join_path(self.out_dir, "gn"), prefix.bin.gn) From 52f149266f34cf9ffb004556212626af7478cd9d Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Tue, 23 Jul 2024 18:38:52 -0500 Subject: [PATCH 032/435] ruby: add v3.3.4 (#45334) * Ruby Add 3.3.4 * Update package.py * Update package.py --- var/spack/repos/builtin/packages/ruby/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index b3c575e40dc074..298c7e2882f2aa 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -24,6 +24,7 @@ class Ruby(AutotoolsPackage, NMakePackage): license("Ruby AND BSD-2-Clause AND MIT", checked_by="tgamblin") + version("3.3.4", sha256="fe6a30f97d54e029768f2ddf4923699c416cdbc3a6e96db3e2d5716c7db96a34") version("3.3.2", sha256="3be1d100ebf2a0ce60c2cd8d22cd9db4d64b3e04a1943be2c4ff7b520f2bcb5b") version("3.3.0", sha256="96518814d9832bece92a85415a819d4893b307db5921ae1f0f751a9a89a56b7d") version("3.1.0", sha256="50a0504c6edcb4d61ce6b8cfdbddaa95707195fab0ecd7b5e92654b2a9412854") From 15a3ac05127306d147d903df3086c3a494828fef Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 23 Jul 2024 19:50:21 -0400 Subject: [PATCH 033/435] py-arrow: add v1.3.0 (switch to flit-core) (#45123) --- var/spack/repos/builtin/packages/py-arrow/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-arrow/package.py b/var/spack/repos/builtin/packages/py-arrow/package.py index d37264f82569b0..c6ba2131f1ec14 100644 --- a/var/spack/repos/builtin/packages/py-arrow/package.py +++ b/var/spack/repos/builtin/packages/py-arrow/package.py @@ -19,6 +19,7 @@ class PyArrow(PythonPackage): license("Apache-2.0") + version("1.3.0", sha256="d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85") version("1.2.3", sha256="3934b30ca1b9f292376d9db15b19446088d12ec58629bc3f0da28fd55fb633a1") version("1.2.2", sha256="05caf1fd3d9a11a1135b2b6f09887421153b94558e5ef4d090b567b47173ac2b") version("1.2.1", sha256="c2dde3c382d9f7e6922ce636bf0b318a7a853df40ecb383b29192e6c5cc82840") @@ -26,9 +27,12 @@ class PyArrow(PythonPackage): version("0.14.7", sha256="67f8be7c0cf420424bc62d8d7dc40b44e4bb2f7b515f9cc2954fb36e35797656") version("0.14.1", sha256="2d30837085011ef0b90ff75aa0a28f5c7d063e96b7e76b6cbc7e690310256685") + depends_on("python@3.8:", type=("build", "run"), when="@1.3:") depends_on("python@3.6:", type=("build", "run"), when="@1.2.1:") depends_on("python@2.7:2.8,3.5:", type=("build", "run"), when="@:0.16.0") - depends_on("py-setuptools", type="build") + depends_on("py-setuptools", type="build", when="@:1.2") + depends_on("py-flit-core@3.2:3", type="build", when="@1.3:") depends_on("py-python-dateutil", type=("build", "run")) - depends_on("py-typing-extensions", type=("build", "run"), when="@1.2.1: ^python@:3.7") + depends_on("py-typing-extensions", type=("build", "run"), when="@1.2.1:1.2 ^python@:3.7") depends_on("py-python-dateutil@2.7.0:", type=("build", "run"), when="@1.2.1:") + depends_on("py-types-python-dateutil@2.8.10:", type=("build", "run"), when="@1.3:") From 1b5dc396e3591011098814a460171f3834e95757 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:32:06 -0700 Subject: [PATCH 034/435] uftrace: change to executable declaration (#45403) --- var/spack/repos/builtin/packages/uftrace/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/uftrace/package.py b/var/spack/repos/builtin/packages/uftrace/package.py index 1913f8ea222ff5..bf478b5455f3b6 100644 --- a/var/spack/repos/builtin/packages/uftrace/package.py +++ b/var/spack/repos/builtin/packages/uftrace/package.py @@ -56,7 +56,7 @@ def installcheck(self): def test_uftrace(self): """Perform stand-alone/smoke tests using the installed package.""" - uftrace = self.prefix.bin.uftrace + uftrace = which(self.prefix.bin.uftrace) options = (["-A", ".", "-R", ".", "-P", "main", uftrace, "-V"],) expected = [ r"dwarf", From e529a454eb2a84388b3bab6154cf47ac1ecb6ef6 Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:16:15 -0400 Subject: [PATCH 035/435] CI: add ML ROCm stack (#45302) * add ML ROCm stack * add suggested changes * remove py-torch and py-tensorflow-estimator * add TF_ROCM_AMDGPU_TARGETS env variable and remove packages from pipeline * remove py-jax and py-xgboost --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 23 +++++ .../stacks/ml-linux-x86_64-rocm/spack.yaml | 93 +++++++++++++++++++ .../builtin/packages/py-tensorflow/package.py | 1 + 3 files changed, 117 insertions(+) create mode 100644 share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index f81a45a0b58073..ce201d402de43c 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -726,6 +726,29 @@ ml-linux-x86_64-cuda-build: - artifacts: True job: ml-linux-x86_64-cuda-generate +######################################## +# Machine Learning - Linux x86_64 (ROCm) +######################################## +.ml-linux-x86_64-rocm: + extends: [ ".linux_x86_64_v3" ] + variables: + SPACK_CI_STACK_NAME: ml-linux-x86_64-rocm + +ml-linux-x86_64-rocm-generate: + extends: [ ".generate-x86_64", .ml-linux-x86_64-rocm, ".tags-x86_64_v4" ] + image: ghcr.io/spack/ubuntu-22.04:v2024-05-07 + +ml-linux-x86_64-rocm-build: + extends: [ ".build", ".ml-linux-x86_64-rocm" ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: ml-linux-x86_64-rocm-generate + strategy: depend + needs: + - artifacts: True + job: ml-linux-x86_64-rocm-generate + ######################################### # Machine Learning - Darwin aarch64 (MPS) ######################################### diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml new file mode 100644 index 00000000000000..7a236b136df636 --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml @@ -0,0 +1,93 @@ +spack: + view: false + packages: + all: + require: + - target=x86_64_v3 + - ~cuda + - +rocm + - amdgpu_target=gfx90a + gl: + require: "osmesa" + mpi: + require: openmpi + + specs: + # Horovod + # - py-horovod + + # Hugging Face + - py-transformers + + # JAX + # Does not yet support Spack-installed ROCm + # - py-jax + # - py-jaxlib + + # Keras + - py-keras backend=tensorflow + # - py-keras backend=jax + # - py-keras backend=torch + - py-keras-applications + - py-keras-preprocessing + - py-keras2onnx + + # PyTorch + # Does not yet support Spack-installed ROCm + # - py-botorch + # - py-efficientnet-pytorch + # - py-gpytorch + # - py-kornia + # - py-lightning + # - py-pytorch-gradual-warmup-lr + # - py-pytorch-lightning + # - py-segmentation-models-pytorch + # - py-timm + # - py-torch + # - py-torch-cluster + # - py-torch-geometric + # - py-torch-nvidia-apex + # - py-torch-scatter + # - py-torch-sparse + # - py-torch-spline-conv + # - py-torchaudio + # - py-torchdata + # - py-torchfile + # - py-torchgeo + # - py-torchmetrics + # - py-torchtext + # - py-torchvision + # - py-vector-quantize-pytorch + + # scikit-learn + - py-scikit-learn + - py-scikit-learn-extra + + # TensorBoard + - py-tensorboard + - py-tensorboard-data-server + - py-tensorboard-plugin-wit + - py-tensorboardx + + # TensorFlow + - py-tensorflow + - py-tensorflow-datasets + # version 2.16 is not available + # - py-tensorflow-estimator + - py-tensorflow-hub + - py-tensorflow-metadata + - py-tensorflow-probability + + # XGBoost + # Does not yet support Spack-installed ROCm + # - py-xgboost + + ci: + pipeline-gen: + - build-job: + image: + name: ghcr.io/spack/ubuntu-22.04:v2024-05-07 + entrypoint: [''] + + cdash: + build-group: Machine Learning diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index fd152cb89b73d9..1d86e81fd0cfef 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -562,6 +562,7 @@ def setup_build_environment(self, env): for pkg_dep in rocm_dependencies: pkg_dep_cap = pkg_dep.upper().replace("-", "_") env.set(f"{pkg_dep_cap}_PATH", spec[pkg_dep].prefix) + env.set("TF_ROCM_AMDGPU_TARGETS", ",".join(self.spec.variants["amdgpu_target"].value)) else: env.set("TF_NEED_ROCM", "0") From 39455768b256f8b93c17d4fde18efdd099d18eee Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:16:54 -0500 Subject: [PATCH 036/435] hybpiper: change package type, add version 2.1.8 (#45262) Signed-off-by: Shane Nehring --- .../builtin/packages/hybpiper/package.py | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hybpiper/package.py b/var/spack/repos/builtin/packages/hybpiper/package.py index db890c6f73b4b0..d1b6e1a96b9bde 100644 --- a/var/spack/repos/builtin/packages/hybpiper/package.py +++ b/var/spack/repos/builtin/packages/hybpiper/package.py @@ -7,7 +7,7 @@ from spack.package import * -class Hybpiper(Package): +class Hybpiper(PythonPackage, Package): """HybPiper was designed for targeted sequence capture, in which DNA sequencing libraries are enriched for gene regions of interest, especially for phylogenetics. HybPiper is a suite of Python scripts @@ -17,24 +17,51 @@ class Hybpiper(Package): homepage = "https://github.com/mossmatters/HybPiper" url = "https://github.com/mossmatters/HybPiper/archive/v1.2.0.tar.gz" git = "https://github.com/mossmatters/HybPiper/HybPiper.git" + maintainers("snehring") license("GPL-3.0-or-later") + version("2.1.8", sha256="ff358a560d6dbbec4fdac67457451cb4e6ca21b8661044c43902aa013d805e47") version("1.3.1", sha256="7ca07a9390d1ca52c72721774fa220546f18d3fa3b58500f68f3b2d89dbc0ecf") version("1.2.0", sha256="34c7b324e9bcacb6ccfe87dc50615d6f93866433b61a59291707efa858b6df57") + build_system( + conditional("python_pip", when="@2.1:"), + conditional("generic", when="@:1.3.1"), + default="python_pip", + ) + depends_on("python@2.7:", type=("build", "run")) + depends_on("python@3.9:", type=("build", "run"), when="@2.1:") + depends_on("py-biopython", type=("build", "run")) + depends_on("py-biopython@1.80:", type=("build", "run"), when="@2.1:") + depends_on("py-matplotlib", type=("build", "run"), when="@2.1:") + depends_on("py-pandas", type=("build", "run"), when="@2.1:") + depends_on("py-pebble", type=("build", "run"), when="@2.1:") + depends_on("py-progressbar2", type=("build", "run"), when="@2.1:") + depends_on("py-psutil", type=("build", "run"), when="@2.1:") + depends_on("py-scipy", type=("build", "run"), when="@2.1:") + depends_on("py-seaborn", type=("build", "run"), when="@2.1:") + depends_on("exonerate") + depends_on("exonerate@2.4:", when="@2.1:") + depends_on("bbmap", when="@2.1:") depends_on("blast-plus") - depends_on("spades") - depends_on("parallel") + depends_on("blast-plus@2.9.0:", when="@2.1:") depends_on("bwa") + depends_on("diamond", when="@2.1:") + depends_on("mafft", when="@2.1:") + depends_on("parallel") depends_on("samtools") + depends_on("samtools@1.14", when="@2.1:") + depends_on("spades") + depends_on("spades@3.15.4:", when="@2.1:") def setup_run_environment(self, env): env.set("HYBPIPER_HOME", self.prefix) + @when("@:1.3.1") def install(self, spec, prefix): mkdirp(prefix.bin) install("*.py", prefix.bin) From a841ddd00c1600662f3f42646d61dd0b34dfb7e4 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 24 Jul 2024 10:11:32 -0500 Subject: [PATCH 037/435] `spack pkg grep`: don't warn when grepping for quoted strings (#45412) The `Executable` class emits a warning when you pass quoted arguments to it: ``` > spack pkg grep '"namespace"' ==> Warning: Quotes in command arguments can confuse scripts like configure. The following arguments may cause problems when executed: "namespace" Quotes aren't needed because spack doesn't use a shell. Consider removing them. If multiple levels of quotation are required, use `ignore_quotes=True`. ``` This is to warn new package authors who aren't used to calling build commands in python. It's not useful for `spack pkg grep`, where we really are passing args on the command line, and if we pass a quoted string, we probably meant to. - [x] make `ignore_quotes` an instance variable, not just an argument to ``__call__` - [x] set `ignore_quotes` to `True` in `spack pkg grep` Signed-off-by: Todd Gamblin --- lib/spack/spack/cmd/pkg.py | 4 +++- lib/spack/spack/util/executable.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index e4e616db563f13..b21313cbc498fb 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -169,7 +169,9 @@ def pkg_hash(args): def get_grep(required=False): """Get a grep command to use with ``spack pkg grep``.""" - return exe.which(os.environ.get("SPACK_GREP") or "grep", required=required) + grep = exe.which(os.environ.get("SPACK_GREP") or "grep", required=required) + grep.ignore_quotes = True # allow `spack pkg grep '"quoted string"'` without warning + return grep def pkg_grep(args, unknown_args): diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index afb8bcaa3909e5..b4974fc9b575ae 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -31,6 +31,7 @@ def __init__(self, name): self.default_envmod = EnvironmentModifications() self.returncode = None + self.ignore_quotes = False if not self.exe: raise ProcessError("Cannot construct executable for '%s'" % name) @@ -188,7 +189,7 @@ def process_cmd_output(out, err): fail_on_error = kwargs.pop("fail_on_error", True) ignore_errors = kwargs.pop("ignore_errors", ()) - ignore_quotes = kwargs.pop("ignore_quotes", False) + ignore_quotes = kwargs.pop("ignore_quotes", self.ignore_quotes) timeout = kwargs.pop("timeout", None) # If they just want to ignore one error code, make it a tuple. From 53b8f91c02b776190036b24146c6103d1dfc0dcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:40:12 -0400 Subject: [PATCH 038/435] build(deps): bump docker/login-action from 3.2.0 to 3.3.0 (#45378) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/0d4c9c5ea7693da7b068278f7b52bda2a190a446...9780b0c442fbb1117ed29e0efdff1e18412f7567) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 1fe2c8427a7a89..9ef6318b38faeb 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -99,7 +99,7 @@ jobs: uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 - name: Log in to GitHub Container Registry - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: registry: ghcr.io username: ${{ github.actor }} @@ -107,7 +107,7 @@ jobs: - name: Log in to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} From e5364ea832abb7ed79f4cbdc7addf8afe6bb353f Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:28:30 -0400 Subject: [PATCH 039/435] Netlib-lapack package: search for correct library names on Windows (#45417) Library names on Windows are not typically prefixed with lib; the default `.libs` implementation accounts for this, but `netlib-lapack` has a custom implementation of `.libs` that did not account for this. --- .../builtin/packages/netlib-lapack/package.py | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 1686a0a76a424e..20d9a0664f5c27 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -148,15 +148,22 @@ def patch(self): if self.spec.satisfies("platform=windows @0:3.9.1"): force_remove("LAPACKE/include/lapacke_mangling.h") + def xplatform_lib_name(self, lib): + return ( + "lib" + lib + if not lib.startswith("lib") and not self.spec.satisfies("platform=windows") + else lib + ) + @property def blas_libs(self): - shared = True if "+shared" in self.spec else False + shared = "+shared" in self.spec query_parameters = self.spec.last_query.extra_parameters query2libraries = { - tuple(): ["libblas"], - ("c", "fortran"): ["libcblas", "libblas"], - ("c",): ["libcblas"], - ("fortran",): ["libblas"], + tuple(): [self.xplatform_lib_name("blas")], + ("c", "fortran"): [self.xplatform_lib_name("cblas"), self.xplatform_lib_name("blas")], + ("c",): [self.xplatform_lib_name("cblas")], + ("fortran",): [self.xplatform_lib_name("blas")], } key = tuple(sorted(query_parameters)) libraries = query2libraries[key] @@ -167,10 +174,13 @@ def lapack_libs(self): shared = True if "+shared" in self.spec else False query_parameters = self.spec.last_query.extra_parameters query2libraries = { - tuple(): ["liblapack"], - ("c", "fortran"): ["liblapacke", "liblapack"], - ("c",): ["liblapacke"], - ("fortran",): ["liblapack"], + tuple(): [self.xplatform_lib_name("lapack")], + ("c", "fortran"): [ + self.xplatform_lib_name("lapacke"), + self.xplatform_lib_name("lapack"), + ], + ("c",): [self.xplatform_lib_name("lapacke")], + ("fortran",): [self.xplatform_lib_name("lapack")], } key = tuple(sorted(query_parameters)) libraries = query2libraries[key] From f3acf201c4908f5fd44242676b98ed84ca4b91fd Mon Sep 17 00:00:00 2001 From: Teo Date: Wed, 24 Jul 2024 19:22:51 -0400 Subject: [PATCH 040/435] halide: add v18.0.0 (#45401) * Added Halide 18 * Fix style+other stuff * Accept compiler deps * 17.0.2 too * reorder versions --- .../repos/builtin/packages/halide/package.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/halide/package.py b/var/spack/repos/builtin/packages/halide/package.py index 2a4f1448ec2ddf..e8446550e06754 100644 --- a/var/spack/repos/builtin/packages/halide/package.py +++ b/var/spack/repos/builtin/packages/halide/package.py @@ -17,14 +17,15 @@ class Halide(CMakePackage, PythonExtension): maintainers("wraith1995") version("main", branch="main") + version("18.0.0", sha256="1176b42a3e2374ab38555d9316c78e39b157044b5a8e765c748bf3afd2edb351") + version("17.0.2", sha256="5f3a43ba27b47d3dcbcee963faabf1d633d4151031e60b6ff7cc62472e5677a0") + version("17.0.1", sha256="beb18331d9e4b6f69943bcc75fb9d923a250ae689f09f6940a01636243289727") + version("17.0.0", sha256="7e5a526b4074887b528d25b0265ddfa92c0a6d8bfdfbbba536313ecddf352da3") + version("16.0.0", sha256="a0cccee762681ea697124b8172dd65595856d0fa5bd4d1af7933046b4a085b04") version("15.0.0", sha256="6680424f80c5731a85d977c06327096afe5af31da3667e91d4d36a25fabdda15") version("14.0.0", sha256="f9fc9765217cbd10e3a3e3883a60fc8f2dbbeaac634b45c789577a8a87999a01") - version("16.0.0", sha256="a0cccee762681ea697124b8172dd65595856d0fa5bd4d1af7933046b4a085b04") - version("17.0.0", sha256="7e5a526b4074887b528d25b0265ddfa92c0a6d8bfdfbbba536313ecddf352da3") - version("17.0.1", sha256="beb18331d9e4b6f69943bcc75fb9d923a250ae689f09f6940a01636243289727") - - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") variant( "build_type", default="Release", @@ -68,6 +69,8 @@ class Halide(CMakePackage, PythonExtension): depends_on("llvm@15.0.0:15", type=("link", "run"), when="@15.0.0:15") depends_on("llvm@16.0.0:16", type=("link", "run"), when="@16.0.0:16") depends_on("llvm@17.0.0:17", type=("link", "run"), when="@17.0.0:17") + depends_on("llvm@17.0.0:18", type=("link", "run"), when="@18.0.0:18") + for v in _values: depends_on( "llvm targets={0}".format(v), type=("link", "run"), when="targets={0}".format(v) @@ -79,7 +82,8 @@ class Halide(CMakePackage, PythonExtension): depends_on("python@3.8:", type=("build", "link", "run"), when="+python") # See https://github.com/halide/Halide/blob/main/requirements.txt - depends_on("py-pybind11@2.6.2", type="build", when="+python") + depends_on("py-pybind11@2.6.2", type="build", when="@14.0.0:17+python") + depends_on("py-pybind11@2.10.4", type="build", when="@18.0.0:+python") depends_on("py-setuptools@43:", type="build", when="+python") depends_on("py-scikit-build", type="build", when="+python") depends_on("py-wheel", type="build", when="+python") From ff144df54906a659a53e4de3b1d47a4194b6962d Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:57:12 -0700 Subject: [PATCH 041/435] strumpack: make standalone test for +mpi more robust (#44943) * strumpack: make standalone test for +mpi more robust * Comment about which MPI launcher being attempted --- .../builtin/packages/strumpack/package.py | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/strumpack/package.py b/var/spack/repos/builtin/packages/strumpack/package.py index eb20c3812ffacd..5f729961516bf6 100644 --- a/var/spack/repos/builtin/packages/strumpack/package.py +++ b/var/spack/repos/builtin/packages/strumpack/package.py @@ -3,8 +3,13 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + +import llnl.util.tty as tty + from spack.package import * from spack.util.environment import set_env +from spack.util.executable import ProcessError class Strumpack(CMakePackage, CudaPackage, ROCmPackage): @@ -205,7 +210,7 @@ def cache_test_sources(self): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources([self.test_data_dir, self.test_src_dir]) - def _test_example(self, test_prog, test_cmd, test_args): + def _test_example(self, test_prog, test_cmd, pre_args=[]): test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) cmake_filename = join_path(test_dir, "CMakeLists.txt") with open(cmake_filename, "w") as mkfile: @@ -218,9 +223,7 @@ def _test_example(self, test_prog, test_cmd, test_args): ) with working_dir(test_dir): - opts = self.builder.std_cmake_args - opts += self.cmake_args() - opts += ["."] + opts = self.builder.std_cmake_args + self.cmake_args() + ["."] cmake = self.spec["cmake"].command cmake(*opts) @@ -229,29 +232,32 @@ def _test_example(self, test_prog, test_cmd, test_args): with set_env(OMP_NUM_THREADS="1"): exe = which(test_cmd) + test_args = pre_args + [join_path("..", self.test_data_dir, "pde900.mtx")] exe(*test_args) def test_sparse_seq(self): """Run sequential test_sparse""" - if "+mpi" in self.spec: - raise SkipTest("Package must be installed with '~mpi'") test_exe = "test_sparse_seq" - exe_arg = [join_path("..", self.test_data_dir, "pde900.mtx")] - self._test_example(test_exe, test_exe, exe_arg) + self._test_example(test_exe, test_exe) def test_sparse_mpi(self): """Run parallel test_sparse""" if "+mpi" not in self.spec: raise SkipTest("Package must be installed with '+mpi'") test_exe_mpi = "test_sparse_mpi" - test_args = ["-n", "1", test_exe_mpi, join_path("..", self.test_data_dir, "pde900.mtx")] - mpiexe_list = ["srun", "mpirun", "mpiexec"] + mpi_args = ["-n", "1", test_exe_mpi] + + mpi_bin = self.spec["mpi"].prefix.bin + mpiexe_list = ["srun", mpi_bin.mpirun, mpi_bin.mpiexec] for exe in mpiexe_list: + tty.info(f"Attempting to build and launch with {os.path.basename(exe)}") try: - self._test_example(test_exe_mpi, exe, test_args) + args = ["--immediate=30"] + mpi_args if exe == "srun" else mpi_args + self._test_example(test_exe_mpi, exe, args) return - except Exception: - pass + except (Exception, ProcessError) as err: + tty.info(f"Skipping {exe}: {str(err)}") + assert False, "No MPI executable was found" def check(self): From c6cc97953b5d4861f3269bcd804311e75af42d50 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:09:57 -0700 Subject: [PATCH 042/435] sz: new test API (#45363) * sz: new test API * fix typo; check installed executable; conform to subpart naming convention * skip tests early if not installed; remove unnecessary "_sz" from test part names --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/sz/package.py | 136 ++++++++---------- 1 file changed, 59 insertions(+), 77 deletions(-) diff --git a/var/spack/repos/builtin/packages/sz/package.py b/var/spack/repos/builtin/packages/sz/package.py index 22c08a12817b7e..b73cad5aa2397c 100644 --- a/var/spack/repos/builtin/packages/sz/package.py +++ b/var/spack/repos/builtin/packages/sz/package.py @@ -97,87 +97,69 @@ def setup_run_environment(self, env): if "+hdf5" in self.spec: env.prepend_path("HDF5_PLUGIN_PATH", self.prefix.lib64) - def _test_2d_float(self): - """This test performs simple 2D compression/decompression (float)""" + def test_2d_float(self): + """Run simple 2D compression/decompression""" test_data_dir = self.test_suite.current_test_data_dir - filename = "testfloat_8_8_128.dat" - orifile = test_data_dir.join(filename) - - exe = "sz" - reason = "testing 2D compression of {0}".format(exe) - options = ["-z", "-f", "-i", orifile, "-M", "REL", "-R", "1E-3", "-2", "8", "1024"] - - self.run_test( - exe, - options, - [], - installed=True, - purpose=reason, - skip_missing=True, - work_dir=test_data_dir, - ) - - filename = "testfloat_8_8_128.dat.sz" - decfile = test_data_dir.join(filename) - - reason = "testing 2D decompression of {0}".format(exe) - options = ["-x", "-f", "-i", orifile, "-s", decfile, "-2", "8", "1024", "-a"] - - self.run_test( - exe, - options, - [], - installed=True, - purpose=reason, - skip_missing=True, - work_dir=test_data_dir, - ) - - def _test_3d_float(self): - """This test performs simple 3D compression/decompression (float)""" - + exe = which(self.prefix.bin.sz) + if exe is None: + raise SkipTest(f"sz is not installed for version {self.version}") + + with working_dir(test_data_dir): + filename = "testfloat_8_8_128.dat" + orifile = test_data_dir.join(filename) + with test_part( + self, "test_2d_float_compression", purpose="testing 2D compression of sz" + ): + options = ["-z", "-f", "-i", orifile, "-M", "REL", "-R", "1E-3", "-2", "8", "1024"] + exe(*options) + + filename = "testfloat_8_8_128.dat.sz" + decfile = test_data_dir.join(filename) + + with test_part( + self, "test_2d_float_decompression", purpose="testing 2D decompression of sz" + ): + options = ["-x", "-f", "-i", orifile, "-s", decfile, "-2", "8", "1024", "-a"] + exe(*options) + + def test_3d_float(self): + """Run simple 3D compression/decompression""" test_data_dir = self.test_suite.current_test_data_dir - filename = "testfloat_8_8_128.dat" - orifile = test_data_dir.join(filename) - - exe = "sz" - reason = "testing 3D compression of {0}".format(exe) - options = ["-z", "-f", "-i", orifile, "-M", "REL", "-R", "1E-3", "-3", "8", "8", "128"] - - self.run_test( - exe, - options, - [], - installed=True, - purpose=reason, - skip_missing=True, - work_dir=test_data_dir, - ) - - filename = "testfloat_8_8_128.dat.sz" - decfile = test_data_dir.join(filename) - - reason = "testing 3D decompression of {0}".format(exe) - options = ["-x", "-f", "-i", orifile, "-s", decfile, "-3", "8", "8", "128", "-a"] - - self.run_test( - exe, - options, - [], - installed=True, - purpose=reason, - skip_missing=True, - work_dir=test_data_dir, - ) - - def test(self): - """Perform smoke tests on the installed package""" - # run 2D compression and decompression (float) - self._test_2d_float() - # run 3D compression and decompression (float) - self._test_3d_float() + exe = which(self.prefix.bin.sz) + if exe is None: + raise SkipTest(f"sz is not installed for version {self.version}") + + with working_dir(test_data_dir): + filename = "testfloat_8_8_128.dat" + orifile = test_data_dir.join(filename) + with test_part( + self, "test_3d_float_compression", purpose="testing 3D compression of sz" + ): + options = [ + "-z", + "-f", + "-i", + orifile, + "-M", + "REL", + "-R", + "1E-3", + "-3", + "8", + "8", + "128", + ] + exe(*options) + + filename = "testfloat_8_8_128.dat.sz" + decfile = test_data_dir.join(filename) + with test_part( + self, "test_3d_float_decompression", purpose="testing 3D decompression of sz" + ): + options = ["-x", "-f", "-i", orifile, "-s", decfile, "-3", "8", "8", "128", "-a"] + exe(*options) class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): From 2b763ff2dba30221d9d7d18b2d3e3a401b760f1c Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Thu, 25 Jul 2024 02:22:48 -0400 Subject: [PATCH 043/435] py-tensorflow: alter gcc conflict, fix build (#45330) --- .../builtin/packages/py-tensorflow/package.py | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 1d86e81fd0cfef..4c34b1ffeaa714 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import glob import os import sys import tempfile @@ -381,7 +382,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): # https://www.tensorflow.org/install/source#tested_build_configurations # https://github.com/tensorflow/tensorflow/issues/70199 - conflicts("%gcc", when="@2.17:") + # (-mavx512fp16 exists in gcc@12:) + conflicts("%gcc@:11", when="@2.17:") conflicts("%gcc@:9.3.0", when="@2.9:") conflicts("%gcc@:7.3.0") @@ -709,6 +711,14 @@ def configure(self, spec, prefix): def post_configure_fixes(self): spec = self.spec + if spec.satisfies("@2.17:"): + filter_file( + "patchelf", + spec["patchelf"].prefix.bin.patchelf, + "tensorflow/tools/pip_package/build_pip_package.py", + string=True, + ) + # make sure xla is actually turned off if spec.satisfies("~xla"): filter_file( @@ -849,14 +859,27 @@ def build(self, spec, prefix): bazel(*args) - build_pip_package = Executable("bazel-bin/tensorflow/tools/pip_package/build_pip_package") - buildpath = join_path(self.stage.source_path, "spack-build") - build_pip_package("--src", buildpath) + if self.spec.satisfies("@:2.16"): + build_pip_package = Executable( + "bazel-bin/tensorflow/tools/pip_package/build_pip_package" + ) + buildpath = join_path(self.stage.source_path, "spack-build") + build_pip_package("--src", buildpath) def install(self, spec, prefix): tmp_path = env["TEST_TMPDIR"] - buildpath = join_path(self.stage.source_path, "spack-build") - with working_dir(buildpath): - args = std_pip_args + ["--prefix=" + prefix, "."] - pip(*args) + if self.spec.satisfies("@2.17:"): + buildpath = join_path( + self.stage.source_path, "bazel-bin/tensorflow/tools/pip_package/wheel_house/" + ) + with working_dir(buildpath): + wheel = glob.glob("*.whl")[0] + args = std_pip_args + ["--prefix=" + prefix, wheel] + pip(*args) + else: + buildpath = join_path(self.stage.source_path, "spack-build") + with working_dir(buildpath): + args = std_pip_args + ["--prefix=" + prefix, "."] + pip(*args) + remove_linked_tree(tmp_path) From ea42d18506e94ec9a71459ed4f0ae53fb4128f95 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 25 Jul 2024 15:57:18 +0200 Subject: [PATCH 044/435] libgcrypt: add patch for avx512 support (#45432) --- .../libgcrypt/conditional_avx512.patch | 33 +++++++++++++++++++ .../builtin/packages/libgcrypt/package.py | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch diff --git a/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch b/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch new file mode 100644 index 00000000000000..9bd196ff607390 --- /dev/null +++ b/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch @@ -0,0 +1,33 @@ +From b42116d6067a5233f72e5598032d4b396bb8eaac Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Thu, 4 Jul 2024 11:17:03 +0900 +Subject: [PATCH] cipher:blake2: Fix for use_avx512. + +* cipher/blake2.c (blake2s_init_ctx): Conditional with USE_AVX512. + +-- + +GnuPG-bug-id: 7184 +Reported-by: Aaron Howland +Fixing-commit: 909daa700e4b45d75469df298ee564b8fc2f4b72 +Signed-off-by: NIIBE Yutaka +--- + cipher/blake2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cipher/blake2.c b/cipher/blake2.c +index 451e71f6..1a04fbd8 100644 +--- a/cipher/blake2.c ++++ b/cipher/blake2.c +@@ -830,7 +830,7 @@ static gcry_err_code_t blake2s_init_ctx(void *ctx, unsigned int flags, + #ifdef USE_AVX + c->use_avx = !!(features & HWF_INTEL_AVX); + #endif +-#ifdef USE_AVX ++#ifdef USE_AVX512 + c->use_avx512 = !!(features & HWF_INTEL_AVX512); + #endif + +-- +2.30.2 + diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py index 3c5bcfdd5d4004..44080a58b763e5 100644 --- a/var/spack/repos/builtin/packages/libgcrypt/package.py +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -56,6 +56,9 @@ def flag_handler(self, name, flags): # https://dev.gnupg.org/T6442 patch("rndgetentropy_no_getrandom.patch", when="@=1.10.2 platform=darwin") + # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=b42116d6067a5233f72e5598032d4b396bb8eaac + patch("conditional_avx512.patch", when="@1.11.0") + def check(self): # Without this hack, `make check` fails on macOS when SIP is enabled # https://bugs.gnupg.org/gnupg/issue2056 From 934e34fbd6736887258049942e2a86b50e6de464 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:39:56 -0400 Subject: [PATCH 045/435] CMake package: add versions 3.30.0 and 3.30.1 (#45418) --- var/spack/repos/builtin/packages/cmake/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index b8b3c424c8f422..bdc249af157d0a 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -29,6 +29,8 @@ class Cmake(Package): license("BSD-3-Clause") version("master", branch="master") + version("3.30.1", sha256="df9b3c53e3ce84c3c1b7c253e5ceff7d8d1f084ff0673d048f260e04ccb346e1") + version("3.30.0", sha256="157e5be6055c154c34f580795fe5832f260246506d32954a971300ed7899f579") version("3.29.6", sha256="1391313003b83d48e2ab115a8b525a557f78d8c1544618b48d1d90184a10f0af") version("3.29.5", sha256="dd63da7d763c0db455ca232f2c443f5234fe0b11f8bd6958a81d29cc987dfd6e") version("3.29.4", sha256="b1b48d7100bdff0b46e8c8f6a3c86476dbe872c8df39c42b8d104298b3d56a2c") From 4240748ceac4eafd2e1b34dd98a93db41cbf5796 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Thu, 25 Jul 2024 12:56:35 -0700 Subject: [PATCH 046/435] wasi-sdk-prebuilt: new package (#45394) * wasi-sdk-prebuilt: new package * move url_for_version to be first method --------- Signed-off-by: Teague Sterling --- .../packages/wasi-sdk-prebuilt/package.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py diff --git a/var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py b/var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py new file mode 100644 index 00000000000000..e81f26cbf86e97 --- /dev/null +++ b/var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.package import * + + +class WasiSdkPrebuilt(Package): + """ + A group of standard API specifications for software compiled to the W3C WebAssembly standard + """ + + homepage = "https://wasi.dev/" + url = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz" + + maintainers("teaguesterling") + + license("APACHE-2.0", checked_by="teaguesterling") + + version("22.0", sha256="fa46b8f1b5170b0fecc0daf467c39f44a6d326b80ced383ec4586a50bc38d7b8") + version("21.0", sha256="f2fe0723b337c484556b19d64c0f6c6044827014bfcd403d00951c65a86cfa26") + version("20.0", sha256="7030139d495a19fbeccb9449150c2b1531e15d8fb74419872a719a7580aad0f9") + version("19.0", sha256="d900abc826eec1955b9afd250e7cc2496338abbf6c440d86a313c06e42083fa1") + version("17.0", sha256="8778a476af7898a51db9b78395687cc9c8b69702850da77a763711e832614dac") + version("16.0", sha256="10df3418485e60b9283c1132102f8d3ca34b4fbe8c4649e30282ee84fe42d788") + version("15.0", sha256="9b1f2c900a034a44e59b74843cd79b4f189342598e554029367ef0a2ac286703") + version("14.0", sha256="8c8ebb7f71dcccbb8b1ab384499a53913b0b6d1b7b3281c3d70165e0f002e821") + + provides("wasi-sdk") + + def url_for_version(self, version): + base = "https://github.com/WebAssembly/wasi-sdk/releases/download" + major = version.up_to(1) + full = version.up_to(2) + return f"{base}/wasi-sdk-{major}/wasi-sdk-{full}-linux.tar.gz" + + def install(self, spec, prefix): + install_tree("share/wasi-sysroot", prefix) From 235831a035acb2648c59084132a56d3d902c88cf Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 25 Jul 2024 23:03:09 +0200 Subject: [PATCH 047/435] damask 3.0.0 and 3.0.0-beta2 (#45405) --- .../repos/builtin/packages/damask-grid/package.py | 9 +++++++-- .../repos/builtin/packages/damask-mesh/package.py | 9 +++++++-- var/spack/repos/builtin/packages/damask/package.py | 10 ++++++++++ var/spack/repos/builtin/packages/py-damask/package.py | 4 ++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/damask-grid/package.py b/var/spack/repos/builtin/packages/damask-grid/package.py index db73d936b1cb0e..bf9dd8b5f20890 100644 --- a/var/spack/repos/builtin/packages/damask-grid/package.py +++ b/var/spack/repos/builtin/packages/damask-grid/package.py @@ -17,6 +17,10 @@ class DamaskGrid(CMakePackage): license("AGPL-3.0-or-later") + version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f") + version( + "3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a" + ) version( "3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c" ) @@ -39,8 +43,9 @@ class DamaskGrid(CMakePackage): depends_on("c", type="build") # generated depends_on("fortran", type="build") # generated - depends_on("petsc@3.20.3:3.21", when="@3.0.0-beta") - depends_on("petsc@3.20.2:3.21", when="@3.0.0-alpha8") + depends_on("petsc@3.21", when="@3.0.0-beta2:") + depends_on("petsc@3.20.3:3.20", when="@3.0.0-beta") + depends_on("petsc@3.20.2:3.20", when="@3.0.0-alpha8") depends_on("petsc@3.17.1:3.18", when="@3.0.0-alpha7") depends_on("petsc@3.16.5:3.16", when="@3.0.0-alpha6") depends_on("petsc@3.14.0:3.14,3.15.1:3.16", when="@3.0.0-alpha5") diff --git a/var/spack/repos/builtin/packages/damask-mesh/package.py b/var/spack/repos/builtin/packages/damask-mesh/package.py index b30ed5a0533439..5839e5d1f4235c 100644 --- a/var/spack/repos/builtin/packages/damask-mesh/package.py +++ b/var/spack/repos/builtin/packages/damask-mesh/package.py @@ -17,6 +17,10 @@ class DamaskMesh(CMakePackage): license("AGPL-3.0-or-later") + version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f") + version( + "3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a" + ) version( "3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c" ) @@ -39,8 +43,9 @@ class DamaskMesh(CMakePackage): depends_on("c", type="build") # generated depends_on("fortran", type="build") # generated - depends_on("petsc@3.20.3:3.21", when="@3.0.0-beta") - depends_on("petsc@3.20.2:3.21", when="@3.0.0-alpha8") + depends_on("petsc@3.21", when="@3.0.0-beta2:") + depends_on("petsc@3.20.3:3.20", when="@3.0.0-beta") + depends_on("petsc@3.20.2:3.20", when="@3.0.0-alpha8") depends_on("petsc@3.17.1:3.18", when="@3.0.0-alpha7") depends_on("petsc@3.16.5:3.16", when="@3.0.0-alpha6") depends_on("petsc@3.14.0:3.14,3.15.1:3.16", when="@3.0.0-alpha5") diff --git a/var/spack/repos/builtin/packages/damask/package.py b/var/spack/repos/builtin/packages/damask/package.py index c7a0e632a64dc8..ae9a62ef06c6f0 100644 --- a/var/spack/repos/builtin/packages/damask/package.py +++ b/var/spack/repos/builtin/packages/damask/package.py @@ -28,6 +28,8 @@ class Damask(BundlePackage): maintainers("MarDiehl") + version("3.0.0") + version("3.0.0-beta2") version("3.0.0-beta") version("3.0.0-alpha8") version("3.0.0-alpha7") @@ -35,6 +37,14 @@ class Damask(BundlePackage): version("3.0.0-alpha5") version("3.0.0-alpha4") + depends_on("damask-grid@3.0.0", when="@3.0.0", type="run") + depends_on("damask-mesh@3.0.0", when="@3.0.0", type="run") + depends_on("py-damask@3.0.0", when="@3.0.0", type="run") + + depends_on("damask-grid@3.0.0-beta2", when="@3.0.0-beta2", type="run") + depends_on("damask-mesh@3.0.0-beta2", when="@3.0.0-beta2", type="run") + depends_on("py-damask@3.0.0-beta2", when="@3.0.0-beta2", type="run") + depends_on("damask-grid@3.0.0-beta", when="@3.0.0-beta", type="run") depends_on("damask-mesh@3.0.0-beta", when="@3.0.0-beta", type="run") depends_on("py-damask@3.0.0-beta", when="@3.0.0-beta", type="run") diff --git a/var/spack/repos/builtin/packages/py-damask/package.py b/var/spack/repos/builtin/packages/py-damask/package.py index 1f8106b15d5cb8..18534b1a937e53 100644 --- a/var/spack/repos/builtin/packages/py-damask/package.py +++ b/var/spack/repos/builtin/packages/py-damask/package.py @@ -17,6 +17,10 @@ class PyDamask(PythonPackage): license("AGPL-3.0-or-later") + version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f") + version( + "3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a" + ) version( "3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c" ) From 0f9434fca4db198409e76276e3463ae752052920 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Thu, 25 Jul 2024 16:14:37 -0600 Subject: [PATCH 048/435] openmpi: add v5.0.4 and v5.0.5 (#45305) * Open MPI: add release 5.0.4 * OpenMPI: add release 5.0.5 needed quick turnaround owing to https://github.com/open-mpi/ompi/issues/12693 --------- Signed-off-by: Howard Pritchard --- var/spack/repos/builtin/packages/openmpi/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index ee5f1517e874f3..02fa6434d597f2 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -44,10 +44,16 @@ class Openmpi(AutotoolsPackage, CudaPackage): # Current version( - "5.0.3", sha256="990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b" - ) # libmpi.so.40.40.3 + "5.0.5", sha256="6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776" + ) # libmpi.so.40.40.5 # Still supported + version( + "5.0.4", sha256="64526852cdd88b2d30e022087c16ab3e03806c451b10cd691d5c1ac887d8ef9d" + ) # libmpi.so.40.40.4 + version( + "5.0.3", sha256="990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b" + ) # libmpi.so.40.40.3 version( "5.0.2", sha256="ee46ad8eeee2c3ff70772160bff877cbf38c330a0bc3b3ddc811648b3396698f" ) # libmpi.so.40.40.2 From f371b6f06cb69bc9ec58cae0c8214eca81303f0d Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:47:44 -0700 Subject: [PATCH 049/435] umpire: old to new test API and refactor (#44957) * umpire: old to new test format * umpire: old to new test method and refactor * indentation * black reformat * last minute syntax * docstring and checks * black format * change test name * method call correction * Resolve problem with stand-alone tests (or examples) not loading library (Fixes #44960) --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/umpire/package.py | 88 +++++++++++-------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/var/spack/repos/builtin/packages/umpire/package.py b/var/spack/repos/builtin/packages/umpire/package.py index 75d638dddc9b14..6348d943d3c934 100644 --- a/var/spack/repos/builtin/packages/umpire/package.py +++ b/var/spack/repos/builtin/packages/umpire/package.py @@ -6,8 +6,6 @@ import os import socket -import llnl.util.tty as tty - from spack.package import * from .blt import llnl_link_helpers @@ -462,37 +460,57 @@ def initconfig_package_entries(self): def cmake_args(self): return [] - def test(self): + def setup_run_environment(self, env): + for library in ["lib", "lib64"]: + lib_path = join_path(self.prefix, library) + if os.path.exists(lib_path): + env.append_path("LD_LIBRARY_PATH", lib_path) + + def run_example(self, exe, expected): """Perform stand-alone checks on the installed package.""" - if self.spec.satisfies("@:1") or not os.path.isdir(self.prefix.bin): - tty.info("Skipping: checks not installed in bin for v{0}".format(self.version)) - return - - # Run a subset of examples PROVIDED installed - # tutorials with readily checkable outputs. - checks = { - "malloc": ["99 should be 99"], - "recipe_dynamic_pool_heuristic": ["in the pool", "releas"], - "recipe_no_introspection": ["has allocated", "used"], - "strategy_example": ["Available allocators", "HOST"], - "tut_copy": ["Copied source data"], - "tut_introspection": ["Allocator used is HOST", "size of the allocation"], - "tut_memset": ["Set data from HOST"], - "tut_move": ["Moved source data", "HOST"], - "tut_reallocate": ["Reallocated data"], - "vector_allocator": [""], - } - - for exe in checks: - expected = checks[exe] - reason = "test: checking output from {0}".format(exe) - self.run_test( - exe, - [], - expected, - 0, - installed=False, - purpose=reason, - skip_missing=True, - work_dir=self.prefix.bin, - ) + + exe_run = which(join_path(self.prefix.bin, exe)) + if exe_run is None: + raise SkipTest(f"{exe} is not installed for version {self.version}") + out = exe_run(output=str.split, error=str.split) + check_outputs(expected, out) + + def test_malloc(self): + """Run Malloc""" + self.run_example("malloc", ["99 should be 99"]) + + def test_recipe_dynamic_pool_heuristic(self): + """Multiple use allocator test""" + self.run_example("recipe_dynamic_pool_heuristic", ["in the pool", "releas"]) + + def test_recipe_no_introspection(self): + """Test without introspection""" + self.run_example("recipe_no_introspection", ["has allocated", "used"]) + + def test_strategy_example(self): + """Memory allocation strategy test""" + self.run_example("strategy_example", ["Available allocators", "HOST"]) + + def test_tut_copy(self): + """Copy data test""" + self.run_example("tut_copy", ["Copied source data"]) + + def test_tut_introspection(self): + """Keep track of pointer allocation test""" + self.run_example("tut_introspection", ["Allocator used is HOST", "size of the allocation"]) + + def test_tut_memset(self): + """Set entire block of memory to one value test""" + self.run_example("tut_memset", ["Set data from HOST"]) + + def test_tut_move(self): + """Move memory test""" + self.run_example("tut_move", ["Moved source data", "HOST"]) + + def test_tut_reallocate(self): + """Reallocate memory test""" + self.run_example("tut_reallocate", ["Reallocated data"]) + + def test_vector_allocator(self): + """Allocate vector memory test""" + self.run_example("vector_allocator", [""]) From 564155fd1ac886377124f8b0651c01bf5574398f Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:51:34 -0700 Subject: [PATCH 050/435] povray: new test API (#45174) * povray: new test API * capture output and test name change * povray: add v3.7.0.10, deprecate 3.7.0.8 --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/povray/package.py | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/povray/package.py b/var/spack/repos/builtin/packages/povray/package.py index 51a8832e2b6bf2..e2ce62d7d1643e 100644 --- a/var/spack/repos/builtin/packages/povray/package.py +++ b/var/spack/repos/builtin/packages/povray/package.py @@ -23,16 +23,19 @@ class Povray(AutotoolsPackage): realistic reflections, shading, perspective and other effects. """ - # Add a proper url for your package's homepage here. homepage = "http://povray.org/download/" url = "https://github.com/POV-Ray/povray/archive/v3.7.0.8.tar.gz" git = "https://github.com/POV-Ray/povray.git" - # maintainers('payerle' ) - license("AGPL-3.0-or-later") - version("3.7.0.8", sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4") + version("3.7.0.10", sha256="7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff") + # The following version no longer builds + version( + "3.7.0.8", + sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4", + deprecated=True, + ) depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated @@ -105,8 +108,8 @@ def configure_args(self): # We generate a generic using process owner and fqdn of build host. fqdn = socket.getfqdn() uname = getpass.getuser() - compiled_by = "Installed by spack <{0}@{1}>".format(uname, fqdn) - extra_args.append("COMPILED_BY={0}".format(compiled_by)) + compiled_by = f"Installed by spack <{uname}@{fqdn}>" + extra_args.append(f"COMPILED_BY={compiled_by}") extra_args.append("--disable-silent-rules") # Verbose make output extra_args += self.enable_or_disable("debug") @@ -115,32 +118,32 @@ def configure_args(self): extra_args += self.enable_or_disable("static") if "+boost" in self.spec: - extra_args.append("--with-boost={0}".format(self.spec["boost"].prefix)) + extra_args.append(f"--with-boost={self.spec['boost'].prefix}") else: extra_args.append("--without-boost") if "+jpeg" in self.spec: - extra_args.append("--with-libjpeg={0}".format(self.spec["jpeg"].prefix)) + extra_args.append(f"--with-libjpeg={self.spec['jpeg'].prefix}") else: extra_args.append("--without-libjpeg") if "+libpng" in self.spec: - extra_args.append("--with-libpng={0}".format(self.spec["libpng"].prefix)) + extra_args.append(f"--with-libpng={self.spec['libpng'].prefix}") else: extra_args.append("--without-libpng") if "+libtiff" in self.spec: - extra_args.append("--with-libtiff={0}".format(self.spec["libtiff"].prefix)) + extra_args.append(f"--with-libtiff={self.spec['libtiff'].prefix}") else: extra_args.append("--without-libtiff") if "+mkl" in self.spec: - extra_args.append("--with-libmkl={0}".format(self.spec["mkl"].prefix)) + extra_args.append(f"--with-libmkl={self.spec['mkl'].prefix}") else: extra_args.append("--without-libmkl") if "+openexr" in self.spec: - extra_args.append("--with-openexr={0}".format(self.spec["openexr"].prefix)) + extra_args.append(f"--with-openexr={self.spec['openexr'].prefix}") else: extra_args.append("--without-openexr") @@ -151,12 +154,11 @@ def configure_args(self): return extra_args - def test(self): + def test_render_sample(self): + """Render sample file""" povs = find(self.prefix.share, "biscuit.pov")[0] copy(povs, ".") - self.run_test( - "povray", - options=["biscuit.pov"], - purpose="test: render sample file", - expected=["POV-Ray finished"], - ) + exe = which("povray") + out = exe("biscuit.pov", output=str.split, error=str.split) + expected = "POV-Ray finished" + assert expected in out From 1e6bef079d1ee3b83c2ea04710dd1009feb3e529 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:39:24 -0700 Subject: [PATCH 051/435] kokkos: new test API (#45010) * kokkos: new test API * kokkos: added import llnl.util.lang as lang because earlier versions couldn't be installed without it --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/kokkos/package.py | 56 ++++--------------- 1 file changed, 10 insertions(+), 46 deletions(-) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 8b7efad300facd..f6fa1f6cb13cc1 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os.path -from llnl.util import lang, tty +import llnl.util.lang as lang from spack.package import * @@ -378,20 +378,6 @@ def cmake_args(self): test_script_relative_path = join_path("scripts", "spack_test") - # TODO: Replace this method and its 'get' use for cmake path with - # join_path(self.spec['cmake'].prefix.bin, 'cmake') once stand-alone - # tests can access build dependencies through self.spec['cmake']. - def cmake_bin(self, set=True): - """(Hack) Set/get cmake dependency path.""" - filepath = join_path(self.install_test_root, "cmake_bin_path.txt") - if set: - with open(filepath, "w") as out_file: - cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake") - out_file.write("{0}\n".format(cmake_bin)) - elif os.path.isfile(filepath): - with open(filepath, "r") as in_file: - return in_file.read().strip() - @run_after("install") def setup_build_tests(self): # Skip if unsupported version @@ -410,41 +396,19 @@ def setup_build_tests(self): ] cmake(*cmake_args) self.cache_extra_test_sources(cmake_out_path) - self.cmake_bin(set=True) - - def build_tests(self, cmake_path): - """Build test.""" - cmake_bin = self.cmake_bin(set=False) - - if not cmake_bin: - tty.msg("Skipping kokkos test: cmake_bin_path.txt not found") - return - - cmake_args = [cmake_path, "-DEXECUTABLE_OUTPUT_PATH=" + cmake_path] - - if not self.run_test(cmake_bin, options=cmake_args, purpose="Generate the Makefile"): - tty.warn("Skipping kokkos test: failed to generate Makefile") - return - if not self.run_test("make", purpose="Build test software"): - tty.warn("Skipping kokkos test: failed to build test") - - def run_tests(self, cmake_path): - """Run test.""" - if not self.run_test( - "make", options=[cmake_path, "test"], purpose="Checking ability to execute." - ): - tty.warn("Failed to run kokkos test") - - def test(self): - # Skip if unsupported version + def test_run(self): + """Test if kokkos builds and runs""" cmake_path = join_path( self.test_suite.current_test_cache_dir, self.test_script_relative_path, "out" ) if not os.path.exists(cmake_path): - tty.warn("Skipping smoke tests: {0} is missing".format(cmake_path)) - return + raise SkipTest(f"{cmake_path} is missing") + + cmake = self.spec["cmake"].command + cmake(cmake_path, "-DEXECUTABLE_OUTPUT_PATH=" + cmake_path) - self.build_tests(cmake_path) - self.run_tests(cmake_path) + make = which("make") + make() + make(cmake_path, "test") From 690bcf5d47259577da1924873117d453773544da Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 26 Jul 2024 09:20:21 -0400 Subject: [PATCH 052/435] intel-oneapi-compilers: update description with current compilers (#45348) * intel-oneapi-compilers: update description with current compilers * Update var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py Co-authored-by: Robert Cohn * intel-oneapi-compilers: break docstring line --------- Co-authored-by: Robert Cohn --- .../repos/builtin/packages/intel-oneapi-compilers/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index f0fece125b44c0..1853f00fb18318 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -234,7 +234,8 @@ @IntelOneApiPackage.update_description class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): - """Intel oneAPI Compilers. Includes: icc, icpc, ifort, icx, icpx, and ifx.""" + """Intel oneAPI Compilers. Includes: icx, icpx, ifx, and ifort. + Releases before 2024.0 include icc/icpc""" maintainers("rscohn2") From f99a5ef2e7afd001d3ee6ca1bbb662c2f61903b8 Mon Sep 17 00:00:00 2001 From: Sreenivasa Murthy Kolam Date: Fri, 26 Jul 2024 19:14:06 +0530 Subject: [PATCH 053/435] Fix build failure when kokkos +rocm is enabled. (#44459) * fix kokkos +rocm build failure * address review comments * address review comments . revert the previous changes * address review comments. Add rocthrust for 4.3 version onwards --- var/spack/repos/builtin/packages/kokkos/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index f6fa1f6cb13cc1..18ef8b9f01ac94 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -202,6 +202,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): variant(dev, default=dflt, description=desc) conflicts("+cuda", when="+rocm", msg="CUDA and ROCm are not compatible in Kokkos.") depends_on("intel-oneapi-dpl", when="+sycl") + depends_on("rocthrust", when="@4.3: +rocm") for opt, (dflt, desc) in options_variants.items(): variant(opt, default=dflt, description=desc, when=("+cuda" if "cuda" in opt else None)) @@ -354,6 +355,7 @@ def cmake_args(self): if "+rocm" in self.spec: options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)) + options.append(self.define("Kokkos_ENABLE_ROCTHRUST", True)) elif "+wrapper" in self.spec: options.append( self.define("CMAKE_CXX_COMPILER", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx) From b47c31509d9c18c19561348dd289032faf415a72 Mon Sep 17 00:00:00 2001 From: Walter de Jong Date: Fri, 26 Jul 2024 17:51:30 +0200 Subject: [PATCH 054/435] apptainer: add v1.3.2, v1.3.3 (#45398) * upgrade apptainer: security fix apptainer 1.3.1 has a high severity security issue: CVE-2024-3727 Upgrade to 1.3.2 or preferably 1.3.3 * added comment for 1.3.1 --------- Co-authored-by: Walter de Jong --- var/spack/repos/builtin/packages/apptainer/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/apptainer/package.py b/var/spack/repos/builtin/packages/apptainer/package.py index 45a05af31ac3b3..dff6da799c1fa2 100644 --- a/var/spack/repos/builtin/packages/apptainer/package.py +++ b/var/spack/repos/builtin/packages/apptainer/package.py @@ -36,7 +36,10 @@ class Apptainer(SingularityBase): ) version("main", branch="main") - version("1.3.1", sha256="6956c689c4a8f148789c5c34b33c15ad8f3460b4cee3f48022119fd872eacee9") + version("1.3.3", sha256="94a274ab4898cdb131f4e3867c4e15f7e16bc2823303d2afcbafee0242f0838d") + version("1.3.2", sha256="483910727e1a15843b93d9f2db1fc87e27804de9c74da13cc32cd4bd0d35e079") + # version "1.3.1" has security vulnerability CVE-2024-3727 + # see also https://github.com/advisories/GHSA-6wvf-f2vw-3425 version("1.2.5", sha256="606b67ef97683e1420401718687d258b1034fdf2edae72eeacd0828dffbfc2c2") version("1.1.9", sha256="c615777539154288542cf393d3fd44c04ccb3260bc6330dc324d4e4ebe902bfa") version("1.1.7", sha256="e6d3956a26c3965703402e17f153ba07f59bf710068806462b314d2d04e825e7") From 3180b28d76d951eea44de1af6b6c8812b35962ab Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 26 Jul 2024 21:04:58 +0200 Subject: [PATCH 055/435] py-mne: add v1.7.1 (#45400) * py-mne: add v1.7.1 * fix style --- .../repos/builtin/packages/py-mne/package.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-mne/package.py b/var/spack/repos/builtin/packages/py-mne/package.py index 53edb8c9a5e31d..942680c8d778bc 100644 --- a/var/spack/repos/builtin/packages/py-mne/package.py +++ b/var/spack/repos/builtin/packages/py-mne/package.py @@ -17,6 +17,7 @@ class PyMne(PythonPackage): license("BSD-3-Clause") + version("1.7.1", sha256="a87bbc998b792532d2c87add8b0f7bbf28a4d8cf5db1bdfb6d6e260791754498") version("1.6.1", sha256="e4f5683d01cef675eddad788bdb6b44cc015dff0fb1ddfca3c4105edfb757ef8") version("1.4.2", sha256="dd2bf35a90d951bef15ff3a651045b0373eff26018a821667109c727d55c7d63") version("1.4.0", sha256="7834f5b79c2c9885ca601bbddd8db3c2b2f37c34443fc0caf0447751f6c37a2a") @@ -30,10 +31,10 @@ class PyMne(PythonPackage): variant("full", default=False, when="@:0.23", description="Enable full functionality.") variant("hdf5", default=False, when="@1:", description="Enable hdf5 functionality.") + depends_on("python@3.9:", when="@1.7:", type=("build", "run")) depends_on("python@3.8:", when="@1.4:", type=("build", "run")) - depends_on("py-setuptools@45:", when="@1.4:", type="build") - depends_on("py-setuptools", type="build") - depends_on("py-setuptools-scm@6.2:", when="@1.4:", type="build") + depends_on("py-hatchling", when="@1.7:", type="build") + depends_on("py-hatch-vcs", when="@1.7:", type="build") # requirements_base.txt with versions specified in README.rst (marked with *) depends_on("py-numpy@1.21.2:", when="@1.6.1:", type=("build", "run")) @@ -55,16 +56,20 @@ class PyMne(PythonPackage): depends_on("py-decorator", when="@1:", type=("build", "run")) depends_on("py-packaging", when="@1:", type=("build", "run")) depends_on("py-jinja2", when="@1:", type=("build", "run")) - depends_on( - "py-importlib-resources@5.10.2:", when="@1.6.1: ^python@:3.9", type=("build", "run") - ) - depends_on("py-importlib-resources@5.10.2:", when="@1.4: ^python@:3.8", type=("build", "run")) depends_on("py-lazy-loader@0.3:", when="@1.6.1:", type=("build", "run")) with when("+hdf5"): depends_on("py-h5io", type=("build", "run")) depends_on("py-pymatreader", type=("build", "run")) + # Historical dependencies + depends_on("py-setuptools@45:", when="@1.4:1.6", type="build") + depends_on("py-setuptools", when="@:1.6", type="build") + depends_on("py-setuptools-scm@6.2:", when="@1.4:1.6", type="build") + depends_on( + "py-importlib-resources@5.10.2:", when="@1.4:1.6 ^python@:3.9", type=("build", "run") + ) + with when("+full"): # requirements.txt with versions specified in README.rst (marked with *) depends_on("py-matplotlib@3.0.3:", type=("build", "run")) # * From 057b41507462f2aa9a151d59c8ebea96f271cee2 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:07:06 -0700 Subject: [PATCH 056/435] pinentry: old to new test API (#45011) * pinentry: New API * move code around * added back version check * Complete check_version refactor * Honor original handling of guis (i.e., don't try if not there) --------- Co-authored-by: Tamara Dahlgren --- .../builtin/packages/pinentry/package.py | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/pinentry/package.py b/var/spack/repos/builtin/packages/pinentry/package.py index 81b166f3a32f2e..d4d987676633c2 100644 --- a/var/spack/repos/builtin/packages/pinentry/package.py +++ b/var/spack/repos/builtin/packages/pinentry/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack.package import * @@ -95,17 +94,24 @@ def configure_args(self): args.append("--enable-pinentry-" + gui) else: args.append("--disable-pinentry-" + gui) - return args - def test(self): - kwargs = { - "exe": self.prefix.bin.pinentry, - "options": ["--version"], - "expected": [str(self.version)], - } - self.run_test(**kwargs) + def check_version(self, exe_name): + """Version check""" + exe = which(join_path(self.prefix.bin, exe_name)) + out = exe("--version", output=str.split, error=str.split) + assert str(self.version) in out + + def test_pinentry(self): + """Confirm pinentry version""" + self.check_version("pinentry") + + def test_guis(self): + """Check gui versions""" for gui in self.supported_guis: - if "gui=" + gui in self.spec: - kwargs["exe"] = self.prefix.bin.pinentry + "-" + gui - self.run_test(**kwargs) + if f"gui={gui}" not in self.spec: + continue + + exe_name = f"pinentry-{gui}" + with test_part(self, f"test_guis_{gui}", purpose=f"Check {exe_name} version"): + self.check_version(exe_name) From c294b9d3b9e18d0976eee2d5594a4dc4926242d1 Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Mon, 29 Jul 2024 17:02:48 +1000 Subject: [PATCH 057/435] meson: add v1.4.2, v1.5.1 (#45384) Also deprecate old and superseded versions --- .../repos/builtin/packages/meson/package.py | 162 +++++++++++++----- 1 file changed, 120 insertions(+), 42 deletions(-) diff --git a/var/spack/repos/builtin/packages/meson/package.py b/var/spack/repos/builtin/packages/meson/package.py index b2ffaef99fd105..afad0e56721836 100644 --- a/var/spack/repos/builtin/packages/meson/package.py +++ b/var/spack/repos/builtin/packages/meson/package.py @@ -18,52 +18,130 @@ class Meson(PythonPackage): license("Apache-2.0") + version("1.5.1", sha256="55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390") + version("1.4.2", sha256="11d1336fe35e1ade57510a846a31d7dc2e3b6ac1e2491c2831bce5a2a192ba0d") version("1.3.2", sha256="683082fb3c5cddf203b21d29bdf4c227e2f7964da5324a15e1a5f7db94322b4b") version("1.2.2", sha256="1caa0ef6082e311bdca9836e7907f548b8c3f041a42ed41f0ff916b83ac7dddd") - version("1.2.1", sha256="e1f3b32b636cc86496261bd89e63f00f206754697c7069788b62beed5e042713") - version("1.2.0", sha256="603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790") version("1.1.1", sha256="1c3b9e1a3a36b51adb5de498d582fd5cbf6763fadbcf151de9f2a762e02bd2e6") - version("1.1.0", sha256="f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc") version("1.0.2", sha256="1f1239c3091668643f7d2086663d6afd8cc87fbab84fe7462bc18b9ba6d65de8") - version("1.0.1", sha256="4ab3a5c0060dc22bdefb04507efc6c38acb910e91bcd467a38e1fa211e5a6cfe") - version("1.0.0", sha256="a2ada84d43c7e57400daee80a880a1f5003d062b2cb6c9be1747b0db38f2eb8d") - version("0.64.1", sha256="1d12a4bc1cf3ab18946d12cf0b6452e5254ada1ad50aacc97f87e2cccd7da315") - version("0.64.0", sha256="6477993d781b6efea93091616a6d6a0766c0e026076dbeb11249bf1c9b49a347") - version("0.63.3", sha256="7c516c2099b762203e8a0a22412aa465b7396e6f9b1ab728bad6e6db44dc2659") - version("0.63.2", sha256="023a3f7c74e68991154c3205a6975705861eedbf8130e013d15faa1df1af216e") - version("0.63.1", sha256="f355829f0e8c714423f03a06604c04c216d4cbe3586f3154cb2181076b19207a") - version("0.62.2", sha256="97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6") - version("0.62.1", sha256="9fb52e66dbc613479a5f70e46cc2e8faf5aa65e09313f2c71fa63b8afd018107") - version("0.62.0", sha256="72ac3bab701dfd597604de29cc74baaa1cc0ad8ca26ae23d5288de26abfe1c80") - version("0.61.4", sha256="c9cc34bcb15c19cfd5ee0d7b07111152701f602db2b59ef6b63d3628e0bbe719") - version("0.61.2", sha256="33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8") - version("0.60.3", sha256="6c191a9b4049e0c9a2a7d1275ab635b91f6ffec1912d75df4c5ec6acf35f74fe") - version("0.60.0", sha256="5672a560fc4094c88ca5b8be0487e099fe84357e5045f5aecf1113084800e6fd") - version("0.59.2", sha256="e6d5ccd503d41f938f6cfc4dc9e7326ffe28acabe091b1ff0c6535bdf09732dd") - version("0.59.1", sha256="f256eb15329a6064f8cc1f23b29de1fa8d21e324f939041e1a4efe77cf1362ef") - version("0.59.0", sha256="fdbbe8ea8a47f9e21cf4f578f85be8ec3d9c030df3d8cb17df1ae59d8683813a") - version("0.58.2", sha256="58115604dea9c1f70811578df3c210f4d67cf795d21a4418f6e9bb35406953f5") - version("0.58.1", sha256="78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4") - version("0.58.0", sha256="991b882bfe4d37acc23c064a29ca209458764a580d52f044f3d50055a132bed4") - version("0.57.2", sha256="cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096") - version("0.57.1", sha256="0c043c9b5350e9087cd4f6becf6c0d10b1d618ca3f919e0dcca2cdf342360d5d") - version("0.57.0", sha256="fd26a27c1a509240c668ebd29d280649d9239cf8684ead51d5cb499d1e1188bd") - version("0.56.2", sha256="aaae961c3413033789248ffe6762589e80b6cf487c334d0b808e31a32c48f35f") - version("0.56.0", sha256="a9ca7adf66dc69fbb7e583f7c7aef16b9fe56ec2874a3d58747e69a3affdf300") - version("0.55.3", sha256="2b276df50c5b13ccdbfb14d3333141e9e7985aca31b60400b3f3e0be2ee6897e") - version("0.55.2", sha256="56244896e56c2b619f819d047b6de412ecc5250975ee8717f1e329113d178e06") - version("0.55.1", sha256="c7ebf2fff5934a974c7edd1aebb5fc9c3e1da5ae3184a29581fde917638eea39") - version("0.55.0", sha256="9034c943c8cf4d734c0e18e5ba038dd762fcdcc614c45b41703305da8382e90c") - version("0.54.3", sha256="c25caff342b5368bfe33fab6108f454fcf12e2f2cef70817205872ddef669e8b") - version("0.54.2", sha256="85cafdc70ae7d1d9d506e7356b917c649c4df2077bd6a0382db37648aa4ecbdb") - version("0.54.1", sha256="854e8b94ab36e5aece813d2b2aee8a639bd52201dfea50890722ac9128e2f59e") - version("0.54.0", sha256="95efdbaa7cb3e915ab9a7b26b1412475398fdc3e834842a780f1646c7764f2d9") - version("0.53.2", sha256="eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888") - version("0.49.1", sha256="a944e7f25a2bc8e4ba3502ab5835d8a8b8f2530415c9d6fcffb53e0abaea2ced") - version("0.49.0", sha256="11bc959e7173e714e4a4e85dd2bd9d0149b0a51c8ba82d5f44cc63735f603c74") - version("0.42.0", sha256="6c318a2da3859326a37f8a380e3c50e97aaabff6990067218dffffea674ed76f") - version("0.41.2", sha256="2daf448d3f2479d60e30617451f09bf02d26304dd1bd12ee1de936a53e42c7a4") - version("0.41.1", sha256="a48901f02ffeb9ff5cf5361d71b1fca202f9cd72998043ad011fc5de0294cf8b") + + with default_args(deprecated=True): + version("1.2.1", sha256="e1f3b32b636cc86496261bd89e63f00f206754697c7069788b62beed5e042713") + version("1.2.0", sha256="603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790") + version("1.1.0", sha256="f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc") + version("1.0.1", sha256="4ab3a5c0060dc22bdefb04507efc6c38acb910e91bcd467a38e1fa211e5a6cfe") + version("1.0.0", sha256="a2ada84d43c7e57400daee80a880a1f5003d062b2cb6c9be1747b0db38f2eb8d") + version( + "0.64.1", sha256="1d12a4bc1cf3ab18946d12cf0b6452e5254ada1ad50aacc97f87e2cccd7da315" + ) + version( + "0.64.0", sha256="6477993d781b6efea93091616a6d6a0766c0e026076dbeb11249bf1c9b49a347" + ) + version( + "0.63.3", sha256="7c516c2099b762203e8a0a22412aa465b7396e6f9b1ab728bad6e6db44dc2659" + ) + version( + "0.63.2", sha256="023a3f7c74e68991154c3205a6975705861eedbf8130e013d15faa1df1af216e" + ) + version( + "0.63.1", sha256="f355829f0e8c714423f03a06604c04c216d4cbe3586f3154cb2181076b19207a" + ) + version( + "0.62.2", sha256="97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6" + ) + version( + "0.62.1", sha256="9fb52e66dbc613479a5f70e46cc2e8faf5aa65e09313f2c71fa63b8afd018107" + ) + version( + "0.62.0", sha256="72ac3bab701dfd597604de29cc74baaa1cc0ad8ca26ae23d5288de26abfe1c80" + ) + version( + "0.61.4", sha256="c9cc34bcb15c19cfd5ee0d7b07111152701f602db2b59ef6b63d3628e0bbe719" + ) + version( + "0.61.2", sha256="33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8" + ) + version( + "0.60.3", sha256="6c191a9b4049e0c9a2a7d1275ab635b91f6ffec1912d75df4c5ec6acf35f74fe" + ) + version( + "0.60.0", sha256="5672a560fc4094c88ca5b8be0487e099fe84357e5045f5aecf1113084800e6fd" + ) + version( + "0.59.2", sha256="e6d5ccd503d41f938f6cfc4dc9e7326ffe28acabe091b1ff0c6535bdf09732dd" + ) + version( + "0.59.1", sha256="f256eb15329a6064f8cc1f23b29de1fa8d21e324f939041e1a4efe77cf1362ef" + ) + version( + "0.59.0", sha256="fdbbe8ea8a47f9e21cf4f578f85be8ec3d9c030df3d8cb17df1ae59d8683813a" + ) + version( + "0.58.2", sha256="58115604dea9c1f70811578df3c210f4d67cf795d21a4418f6e9bb35406953f5" + ) + version( + "0.58.1", sha256="78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4" + ) + version( + "0.58.0", sha256="991b882bfe4d37acc23c064a29ca209458764a580d52f044f3d50055a132bed4" + ) + version( + "0.57.2", sha256="cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096" + ) + version( + "0.57.1", sha256="0c043c9b5350e9087cd4f6becf6c0d10b1d618ca3f919e0dcca2cdf342360d5d" + ) + version( + "0.57.0", sha256="fd26a27c1a509240c668ebd29d280649d9239cf8684ead51d5cb499d1e1188bd" + ) + version( + "0.56.2", sha256="aaae961c3413033789248ffe6762589e80b6cf487c334d0b808e31a32c48f35f" + ) + version( + "0.56.0", sha256="a9ca7adf66dc69fbb7e583f7c7aef16b9fe56ec2874a3d58747e69a3affdf300" + ) + version( + "0.55.3", sha256="2b276df50c5b13ccdbfb14d3333141e9e7985aca31b60400b3f3e0be2ee6897e" + ) + version( + "0.55.2", sha256="56244896e56c2b619f819d047b6de412ecc5250975ee8717f1e329113d178e06" + ) + version( + "0.55.1", sha256="c7ebf2fff5934a974c7edd1aebb5fc9c3e1da5ae3184a29581fde917638eea39" + ) + version( + "0.55.0", sha256="9034c943c8cf4d734c0e18e5ba038dd762fcdcc614c45b41703305da8382e90c" + ) + version( + "0.54.3", sha256="c25caff342b5368bfe33fab6108f454fcf12e2f2cef70817205872ddef669e8b" + ) + version( + "0.54.2", sha256="85cafdc70ae7d1d9d506e7356b917c649c4df2077bd6a0382db37648aa4ecbdb" + ) + version( + "0.54.1", sha256="854e8b94ab36e5aece813d2b2aee8a639bd52201dfea50890722ac9128e2f59e" + ) + version( + "0.54.0", sha256="95efdbaa7cb3e915ab9a7b26b1412475398fdc3e834842a780f1646c7764f2d9" + ) + version( + "0.53.2", sha256="eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888" + ) + version( + "0.49.1", sha256="a944e7f25a2bc8e4ba3502ab5835d8a8b8f2530415c9d6fcffb53e0abaea2ced" + ) + version( + "0.49.0", sha256="11bc959e7173e714e4a4e85dd2bd9d0149b0a51c8ba82d5f44cc63735f603c74" + ) + version( + "0.42.0", sha256="6c318a2da3859326a37f8a380e3c50e97aaabff6990067218dffffea674ed76f" + ) + version( + "0.41.2", sha256="2daf448d3f2479d60e30617451f09bf02d26304dd1bd12ee1de936a53e42c7a4" + ) + version( + "0.41.1", sha256="a48901f02ffeb9ff5cf5361d71b1fca202f9cd72998043ad011fc5de0294cf8b" + ) depends_on("python@3.7:", when="@0.62.0:", type=("build", "run")) depends_on("python@3.6:", when="@0.57.0:", type=("build", "run")) From 4a35dec206bf7283a2d69e21d3a95202934e8172 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 28 Jul 2024 16:13:49 -0700 Subject: [PATCH 058/435] wasi-sdk: add default provider This was missed in #45394 because we don't run unit tests for package PRs, and `test_all_virtual_packages_have_default_providers`, which would've caught it, is a unit test, not an audit. - [x] add a default provider for `wasi-sdk` in `etc/spack/defaults/packages.yaml` (which we require for all virtuals) - [x] rework `test_all_virtual_packages_have_default_providers` as an audit called `_ensure_all_virtual_packages_have_default_providers` Signed-off-by: Todd Gamblin --- etc/spack/defaults/packages.yaml | 1 + lib/spack/spack/audit.py | 16 ++++++++++++++++ lib/spack/spack/test/repo.py | 13 ------------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 581b01e1f6153d..25a707e4ddf331 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -61,6 +61,7 @@ packages: tbb: [intel-tbb] unwind: [libunwind] uuid: [util-linux-uuid, libuuid] + wasi-sdk: [wasi-sdk-prebuilt] xxd: [xxd-standalone, vim] yacc: [bison, byacc] ziglang: [zig] diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py index faef15393d952b..c5e12017e256af 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -351,6 +351,22 @@ def _wrongly_named_spec(error_cls): return errors +@config_packages +def _ensure_all_virtual_packages_have_default_providers(error_cls): + """All virtual packages must have a default provider explicitly set.""" + configuration = spack.config.create() + defaults = configuration.get("packages", scope="defaults") + default_providers = defaults["all"]["providers"] + virtuals = spack.repo.PATH.provider_index.providers + default_providers_filename = configuration.scopes["defaults"].get_section_filename("packages") + + return [ + error_cls(f"'{virtual}' must have a default provider in {default_providers_filename}", []) + for virtual in virtuals + if virtual not in default_providers + ] + + def _make_config_error(config_data, summary, error_cls): s = io.StringIO() s.write("Occurring in the following file:\n") diff --git a/lib/spack/spack/test/repo.py b/lib/spack/spack/test/repo.py index e08d14828976a3..a013078a82b7b0 100644 --- a/lib/spack/spack/test/repo.py +++ b/lib/spack/spack/test/repo.py @@ -131,19 +131,6 @@ def test_relative_import_spack_packages_as_python_modules(mock_packages): assert issubclass(Mpileaks, spack.package_base.PackageBase) -def test_all_virtual_packages_have_default_providers(): - """All virtual packages must have a default provider explicitly set.""" - configuration = spack.config.create() - defaults = configuration.get("packages", scope="defaults") - default_providers = defaults["all"]["providers"] - providers = spack.repo.PATH.provider_index.providers - default_providers_filename = configuration.scopes["defaults"].get_section_filename("packages") - for provider in providers: - assert provider in default_providers, ( - "all providers must have a default in %s" % default_providers_filename - ) - - def test_get_all_mock_packages(mock_packages): """Get the mock packages once each too.""" for name in mock_packages.all_package_names(): From d63ead25acb3fd294df462e0a9d6ea3882df3927 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 29 Jul 2024 00:01:38 -0700 Subject: [PATCH 059/435] add spack audit configs to ci Signed-off-by: Todd Gamblin --- .github/workflows/audit.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index e412205abc80be..bba48f4bed7bce 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -44,6 +44,7 @@ jobs: run: | . share/spack/setup-env.sh coverage run $(which spack) audit packages + coverage run $(which spack) audit configs coverage run $(which spack) -d audit externals coverage combine coverage xml @@ -52,6 +53,7 @@ jobs: run: | . share/spack/setup-env.sh spack -d audit packages + spack -d audit configs spack -d audit externals - name: Package audits (without coverage) if: ${{ runner.os == 'Windows' }} @@ -59,6 +61,8 @@ jobs: . share/spack/setup-env.sh spack -d audit packages ./share/spack/qa/validate_last_exit.ps1 + spack -d audit configs + ./share/spack/qa/validate_last_exit.ps1 spack -d audit externals ./share/spack/qa/validate_last_exit.ps1 - uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 From 40d41455dbe2426307731342ce92c3aeb64d80e7 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Mon, 29 Jul 2024 05:33:09 -0700 Subject: [PATCH 060/435] perl-bio-ensembl: new package (#44506) * Adding perl-bio-ensembl package * Fixing checksums * Update package.py --- .../packages/perl-bio-ensembl/package.py | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-bio-ensembl/package.py diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py new file mode 100644 index 00000000000000..763c75e91de9ce --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py @@ -0,0 +1,46 @@ +# 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 PerlBioEnsembl(Package): + """The Ensembl Core Perl API and SQL schema""" + + homepage = "https://useast.ensembl.org/info/docs/api/index.html" + url = "https://github.com/Ensembl/ensembl/archive/release/111.zip" + + def url_for_version(self, version): + return f"https://github.com/Ensembl/ensembl/archive/release/{version.up_to(1)}.zip" + + maintainers("teaguesterling") + + license("APACHE-2.0", checked_by="teaguesterling") + + version("112", sha256="8a6b46840df71c4332d2de6027596ed4417a26111800d7ff0636199363568235") + version("111", sha256="346c47c75a6fa8dcfd9f9d22e9f1e0ccc35b2fb99f75980a0c74d892e4ab2b6d") + version("110", sha256="fdf725cad1a980ddf900f1af1a72bf1de355f15e408664930ed84aeccfefad15") + + extends("perl") + + variant("sql", default=False, description="Install SQL files") + variant("misc_scripts", default=False, description="Install misc Ensembl scripts") + + depends_on("perl-dbi") + depends_on("perl-dbd-mysql@:4") + depends_on("perl-http-tiny") + depends_on("perl-io-compress") + depends_on("perl-uri") + depends_on("perl-config-inifiles") + depends_on("perl-gzip-faster") + depends_on("perl-list-moreutils") + + def install(self, spec, prefix): + install_tree("modules", prefix.lib.perl5) + mkdirp(prefix.share.ensembl) + for extra in ["sql", "misc_scripts"]: + if spec.satisfies(f"+{extra}"): + extra = extra.replace("_", "-") + target = join_path(prefix.share.ensembl, extra) + install_tree(extra, target) From 14a3b13900cdf26e9dc986c873f671afadfba517 Mon Sep 17 00:00:00 2001 From: RichardBuntLinaro <133871029+RichardBuntLinaro@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:31:14 +0100 Subject: [PATCH 061/435] linaro-forge: added 24.0.3 version (#45430) --- var/spack/repos/builtin/packages/linaro-forge/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/linaro-forge/package.py b/var/spack/repos/builtin/packages/linaro-forge/package.py index fce54dd3c95f3c..1c04a468faf06f 100644 --- a/var/spack/repos/builtin/packages/linaro-forge/package.py +++ b/var/spack/repos/builtin/packages/linaro-forge/package.py @@ -23,6 +23,9 @@ class LinaroForge(Package): maintainers("kenche-linaro") if platform.machine() in ["aarch64", "arm64"]: + version( + "24.0.3", sha256="5030c5c23824963f82e94ed606e47cce802393fa4cb7757966818baa7012aa21" + ) version( "24.0.2", sha256="8346eb0375910498a83baff6833256c8221c2c06737670687bcf9f1497d9ede9" ) @@ -88,6 +91,9 @@ class LinaroForge(Package): "21.1.3", sha256="eecbc5686d60994c5468b2d7cd37bebe5d9ac0ba37bd1f98fbfc69b071db541e" ) elif platform.machine() == "x86_64": + version( + "24.0.3", sha256="1796559fb86220d5e17777215d3820f4b04aba271782276b81601d5065284526" + ) version( "24.0.2", sha256="e2ad12273d568560e948a9bcdd49b830a2309f247b146bf36579053f99ec59a3" ) From 66d3fddedf73c0d07ca244be36f11b157e6f1a5e Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Mon, 29 Jul 2024 18:23:00 -0400 Subject: [PATCH 062/435] Remove maintainership from packages I have no stake in (#45435) --- var/spack/repos/builtin/packages/cpr/package.py | 4 +--- var/spack/repos/builtin/packages/gnds/package.py | 4 +--- var/spack/repos/builtin/packages/py-qrcode/package.py | 2 -- var/spack/repos/builtin/packages/qt-base/package.py | 2 +- var/spack/repos/builtin/packages/qt/package.py | 1 - var/spack/repos/builtin/packages/testu01/package.py | 2 -- var/spack/repos/builtin/packages/torque/package.py | 2 -- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 8 files changed, 4 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/cpr/package.py b/var/spack/repos/builtin/packages/cpr/package.py index 9c5e7d82c6e35b..4c962b729e1d90 100644 --- a/var/spack/repos/builtin/packages/cpr/package.py +++ b/var/spack/repos/builtin/packages/cpr/package.py @@ -12,14 +12,12 @@ class Cpr(CMakePackage): homepage = "https://docs.libcpr.org/" url = "https://github.com/libcpr/cpr/archive/refs/tags/1.10.4.tar.gz" - maintainers("sethrj") - license("MIT") version("1.10.4", sha256="88462d059cd3df22c4d39ae04483ed50dfd2c808b3effddb65ac3b9aa60b542d") version("1.9.2", sha256="3bfbffb22c51f322780d10d3ca8f79424190d7ac4b5ad6ad896de08dbd06bf31") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") depends_on("curl") depends_on("git", type="build") diff --git a/var/spack/repos/builtin/packages/gnds/package.py b/var/spack/repos/builtin/packages/gnds/package.py index 2ffbc670472ebd..41322d15641858 100644 --- a/var/spack/repos/builtin/packages/gnds/package.py +++ b/var/spack/repos/builtin/packages/gnds/package.py @@ -15,11 +15,9 @@ class Gnds(CMakePackage): homepage = "https://code.ornl.gov/RNSD/gnds" url = "https://code.ornl.gov/RNSD/gnds/-/archive/v0.0.1/gnds-v0.0.1.tar.gz" - maintainers("sethrj") - version("0.0.1", sha256="4c8faaa01a3e6fb08ec3e8e126a76f75b5442509a46b993e325ec79dd9f04879") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") variant("shared", default=True, description="Build shared libraries") diff --git a/var/spack/repos/builtin/packages/py-qrcode/package.py b/var/spack/repos/builtin/packages/py-qrcode/package.py index 3fc90ef8056bea..f825b75f8775de 100644 --- a/var/spack/repos/builtin/packages/py-qrcode/package.py +++ b/var/spack/repos/builtin/packages/py-qrcode/package.py @@ -12,8 +12,6 @@ class PyQrcode(PythonPackage): homepage = "https://github.com/lincolnloop/python-qrcode" pypi = "qrcode/qrcode-7.3.1.tar.gz" - maintainers("sethrj") - license("BSD-3-Clause") version("7.3.1", sha256="375a6ff240ca9bd41adc070428b5dfc1dcfbb0f2507f1ac848f6cded38956578") diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py index b21ad2fe16d64b..e9b3885e1d70ff 100644 --- a/var/spack/repos/builtin/packages/qt-base/package.py +++ b/var/spack/repos/builtin/packages/qt-base/package.py @@ -31,7 +31,7 @@ def get_list_url(qualname): _list_url = "https://github.com/qt/{}/tags" return _list_url.format(qualname.lower()) - maintainers("wdconinc", "sethrj") + maintainers("wdconinc") # Default dependencies for all qt-* components generator("ninja") diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index aed8175a63b8ef..cc5fd528fef5f7 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -27,7 +27,6 @@ class Qt(Package): url = "https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz" list_url = "https://download.qt.io/archive/qt/" list_depth = 3 - maintainers("sethrj") phases = ["configure", "build", "install"] diff --git a/var/spack/repos/builtin/packages/testu01/package.py b/var/spack/repos/builtin/packages/testu01/package.py index be693dd6529496..b49fd5d16fdf1a 100644 --- a/var/spack/repos/builtin/packages/testu01/package.py +++ b/var/spack/repos/builtin/packages/testu01/package.py @@ -16,8 +16,6 @@ class Testu01(AutotoolsPackage): homepage = "http://simul.iro.umontreal.ca/testu01/tu01.html" git = "https://github.com/umontreal-simul/TestU01-2009/" - maintainers("sethrj") - version( "1.2.3", sha256="bc1d1dd2aea7ed3b3d28eaad2c8ee55913f11ce67aec8fe4f643c1c0d2ed1cac", diff --git a/var/spack/repos/builtin/packages/torque/package.py b/var/spack/repos/builtin/packages/torque/package.py index 541eff259672e6..19f3f5fa717f68 100644 --- a/var/spack/repos/builtin/packages/torque/package.py +++ b/var/spack/repos/builtin/packages/torque/package.py @@ -14,8 +14,6 @@ class Torque(Package): homepage = "https://github.com/abarbu/torque" has_code = False - maintainers("sethrj") - version("3.0.4") version("3.0.2") diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index ce7ce27fb746e2..0b8ebd6064dedc 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -35,7 +35,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): url = "https://github.com/trilinos/Trilinos/archive/refs/tags/trilinos-release-12-12-1.tar.gz" git = "https://github.com/trilinos/Trilinos.git" - maintainers("keitat", "sethrj", "kuberry", "jwillenbring", "psakievich") + maintainers("keitat", "kuberry", "jwillenbring", "psakievich") tags = ["e4s"] From 171a2e0e315fe9dec519ad6286279ad3830813c5 Mon Sep 17 00:00:00 2001 From: Teo Date: Mon, 29 Jul 2024 21:58:14 -0400 Subject: [PATCH 063/435] add new maintainer (#45436) --- var/spack/repos/builtin/packages/halide/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/halide/package.py b/var/spack/repos/builtin/packages/halide/package.py index e8446550e06754..565ec5d16be7c7 100644 --- a/var/spack/repos/builtin/packages/halide/package.py +++ b/var/spack/repos/builtin/packages/halide/package.py @@ -15,7 +15,7 @@ class Halide(CMakePackage, PythonExtension): license("MIT") - maintainers("wraith1995") + maintainers("wraith1995", "alexreinking") version("main", branch="main") version("18.0.0", sha256="1176b42a3e2374ab38555d9316c78e39b157044b5a8e765c748bf3afd2edb351") version("17.0.2", sha256="5f3a43ba27b47d3dcbcee963faabf1d633d4151031e60b6ff7cc62472e5677a0") From a78968970969961dcd9797761e05b23e45b68aa9 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 29 Jul 2024 19:58:43 -0600 Subject: [PATCH 064/435] py-furo: add new versions (#45439) --- var/spack/repos/builtin/packages/py-furo/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-furo/package.py b/var/spack/repos/builtin/packages/py-furo/package.py index 09c36a1b2d9ab5..681268df93839a 100644 --- a/var/spack/repos/builtin/packages/py-furo/package.py +++ b/var/spack/repos/builtin/packages/py-furo/package.py @@ -14,6 +14,10 @@ class PyFuro(PythonPackage): license("MIT") + version("2024.7.18", sha256="37b08c5fccc95d46d8712c8be97acd46043963895edde05b0f4f135d58325c83") + version("2024.5.6", sha256="81f205a6605ebccbb883350432b4831c0196dd3d1bc92f61e1f459045b3d2b0b") + version("2024.4.27", sha256="15a9b65269038def2cefafb86c71c6616e3969b8f07ba231f588c10c4aee6d88") + version("2024.1.29", sha256="4d6b2fe3f10a6e36eb9cc24c1e7beb38d7a23fc7b3c382867503b7fcac8a1e02") version("2023.9.10", sha256="5707530a476d2a63b8cad83b4f961f3739a69f4b058bcf38a03a39fa537195b2") version("2023.5.20", sha256="40e09fa17c6f4b22419d122e933089226dcdb59747b5b6c79363089827dea16f") @@ -21,5 +25,5 @@ class PyFuro(PythonPackage): depends_on("py-beautifulsoup4", type=("build", "run")) depends_on("py-sphinx@6:7", type=("build", "run")) - depends_on("py-sphinx-basic-ng", type=("build", "run")) + depends_on("py-sphinx-basic-ng@1.0.0b2:", type=("build", "run")) depends_on("py-pygments@2.7:", type=("build", "run")) From 1bd17876ed62a5be2f8145f30159139fb5eb8ddd Mon Sep 17 00:00:00 2001 From: jmlapre <110123055+jmlapre@users.noreply.github.com> Date: Tue, 30 Jul 2024 01:23:11 -0400 Subject: [PATCH 065/435] trilinos: add v16.0.0 (#45402) --- var/spack/repos/builtin/packages/trilinos/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0b8ebd6064dedc..c8afd096648c20 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -43,6 +43,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version("develop", branch="develop") + version("16.0.0", sha256="46bfc40419ed2aa2db38c144fb8e61d4aa8170eaa654a88d833ba6b92903f309") version("15.1.1", sha256="2108d633d2208ed261d09b2d6b2fbae7a9cdc455dd963c9c94412d38d8aaefe4") version("15.0.0", sha256="5651f1f967217a807f2c418a73b7e649532824dbf2742fa517951d6cc11518fb") version("14.4.0", sha256="8e7d881cf6677aa062f7bfea8baa1e52e8956aa575d6a4f90f2b6f032632d4c6") @@ -406,6 +407,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): # External Kokkos depends_on("kokkos@4.3.01", when="@master: +kokkos") + depends_on("kokkos@4.3.01", when="@16.0.0 +kokkos") depends_on("kokkos@4.2.01", when="@15.1.0:15.1.1 +kokkos") depends_on("kokkos@4.1.00", when="@14.4.0:15.0.0 +kokkos") From 622ad1ddd777b28f2462d8075c69d651c565f4f9 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Tue, 30 Jul 2024 03:17:29 -0700 Subject: [PATCH 066/435] perl-bio-ensembl-funcgen: new package (#44508) * Adding the perl-bio-ensembl-funcgen package * Update package.py * Update package.py --- .../perl-bio-ensembl-funcgen/package.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py new file mode 100644 index 00000000000000..bede5949f67252 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py @@ -0,0 +1,37 @@ +# 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 PerlBioEnsemblFuncgen(Package): + """Ensembl Funcgen Perl API and SQL schema.""" + + homepage = "http://ensembl.org/info/docs/api/funcgen/index.html" + url = "https://github.com/Ensembl/ensembl-funcgen/archive/release/111.zip" + + maintainers("teaguesterling") + + license("APACHE-2.0", checked_by="teaguesterling") + + version("112", sha256="d7398921779a6865b5e2f0269d51d268f9b8cd96e4ca3577c88e6f34593e683d") + version("111", sha256="67b1b7d6efde9e8be7b4ef73c54c0b5e7e3eadcd590a94bc980984514ef746d0") + version("110", sha256="c9e85a423a8c8653741aed799aea9762fa1dfb301f50dc11d291925e81d7aeee") + + extends("perl") + + depends_on("perl-role-tiny", type=("build", "run")) + depends_on("perl-bio-ensembl") + + variant("sql", default=False, description="Install SQL files") + variant("scripts", default=False, description="Install scripts") + variant("templates", default=False, description="Install templates") + + def install(self, spec, prefix): + install_tree("modules", prefix.lib.perl5) + mkdirp(prefix.share.ensembl.variation) + for extra in ["sql", "scripts", "templates"]: + if spec.satisfies(f"+{extra}"): + target = join_path(prefix.share.ensembl, extra) + install_tree(extra, target) From e563f84ae298fab6f137d59b7e50dbeac1df8d45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 07:57:15 -0700 Subject: [PATCH 067/435] build(deps): bump docker/setup-buildx-action from 3.5.0 to 3.6.1 (#45495) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.5.0 to 3.6.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/aa33708b10e362ff993539393ff100fa93ed6a27...988b5a0280414f521da01fcc63a27aeeb4b104db) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 9ef6318b38faeb..cc70e41ad22768 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -96,7 +96,7 @@ jobs: uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf - name: Set up Docker Buildx - uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 + uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db - name: Log in to GitHub Container Registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 From 65a15c61458a9700940ff25210cfe2192856e4ac Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Tue, 30 Jul 2024 11:38:07 -0600 Subject: [PATCH 068/435] Mac OS UUID virtual: platform-specific virtuals not correctly prioritized (#43002) `apple-libuuid` includes types that aren't available in other `uuid` providers; this cause issues in consuming packages (e.g., py-matplotlib) that use SDKs like CarbonCore.framework when they attempt to use `util-linux-uuid` as a `uuid` provider on Mac OS. Tweak `util-linux-uuid` to indicate that it does not provide `uuid` on Mac OS. --- var/spack/repos/builtin/packages/libuuid/package.py | 5 ++++- var/spack/repos/builtin/packages/ossp-uuid/package.py | 5 ++++- var/spack/repos/builtin/packages/util-linux-uuid/package.py | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/libuuid/package.py b/var/spack/repos/builtin/packages/libuuid/package.py index 0cc3f48ff604a7..1a0a2ebfcdc2ae 100644 --- a/var/spack/repos/builtin/packages/libuuid/package.py +++ b/var/spack/repos/builtin/packages/libuuid/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + from spack.package import * @@ -20,6 +22,7 @@ class Libuuid(AutotoolsPackage, SourceforgePackage): depends_on("c", type="build") # generated - provides("uuid") + if sys.platform not in ["darwin", "win32"]: + provides("uuid") conflicts("%gcc@14:") diff --git a/var/spack/repos/builtin/packages/ossp-uuid/package.py b/var/spack/repos/builtin/packages/ossp-uuid/package.py index 24029387f52186..1db80850dd70db 100644 --- a/var/spack/repos/builtin/packages/ossp-uuid/package.py +++ b/var/spack/repos/builtin/packages/ossp-uuid/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + from spack.package import * @@ -22,7 +24,8 @@ class OsspUuid(AutotoolsPackage): depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated - provides("uuid") + if sys.platform not in ["darwin", "win32"]: + provides("uuid") @property def libs(self): diff --git a/var/spack/repos/builtin/packages/util-linux-uuid/package.py b/var/spack/repos/builtin/packages/util-linux-uuid/package.py index 4b8171e5ba4fab..554158491b030c 100644 --- a/var/spack/repos/builtin/packages/util-linux-uuid/package.py +++ b/var/spack/repos/builtin/packages/util-linux-uuid/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + from spack.package import * @@ -29,7 +31,8 @@ class UtilLinuxUuid(AutotoolsPackage): depends_on("pkgconfig", type="build") - provides("uuid") + if sys.platform not in ["darwin", "win32"]: + provides("uuid") def url_for_version(self, version): url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz" From c753446353b02d57c3d9011293848b11198d2e7e Mon Sep 17 00:00:00 2001 From: arezaii Date: Tue, 30 Jul 2024 19:24:56 -0600 Subject: [PATCH 069/435] Chapel package: updates post release (#45304) * Fix +rocm variant, to ensure correct dependencies on ROCm packages and use of AMD LLVM * Add a +pshm variant for comm=gasnet to enable fast shared-memory comms between co-locales * Add logic to ensure we get the native CXI libfabric network provider on Cray EX * Expand dependency type for package modules to encompass runtime dependencies * Factor logic for setting (LD_)LIBRARY_PATH and PKG_CONFIG_PATH of runtime dependencies * Workaround issue #44746 that causes a transitive dependency on lua to break SLURM * Disable nonfunctional checkChplDoc test * Annotate some variants as conditional, to improve spack info output and reduce confusion --------- Co-authored-by: Dan Bonachea --- .../repos/builtin/packages/chapel/package.py | 166 ++++++++++++------ 1 file changed, 112 insertions(+), 54 deletions(-) diff --git a/var/spack/repos/builtin/packages/chapel/package.py b/var/spack/repos/builtin/packages/chapel/package.py index 3d530d7a99ee79..773b4366c803c7 100644 --- a/var/spack/repos/builtin/packages/chapel/package.py +++ b/var/spack/repos/builtin/packages/chapel/package.py @@ -6,6 +6,7 @@ import os import subprocess +import spack.platforms.cray from spack.package import * from spack.util.environment import is_system_path, set_env @@ -58,7 +59,6 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated patch("fix_spack_cc_wrapper_in_cray_prgenv.patch", when="@2.0.0:") @@ -178,6 +178,14 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): values=("ibv", "ofi", "udp", "smp", "unset"), multi=False, sticky=True, # never allow the concretizer to choose this + when="comm=gasnet", + ) + + variant( + "pshm", + default=False, + description="Build Chapel with fast shared-memory comms between co-locales", + when="comm=gasnet", ) # Chapel depends on GASNet whenever comm=gasnet. @@ -190,6 +198,7 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): default="bundled", values=("bundled", "spack"), multi=False, + when="comm=gasnet", ) variant( @@ -199,6 +208,7 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): "supplied CHPL_GASNET_SEGMENT", values=("everything", "fast", "large", "unset"), multi=False, + when="comm=gasnet", ) variant( @@ -281,9 +291,25 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): variant( "libfabric", default="unset", - description="When building with ofi support, specify libfabric option", + description="Control the libfabric version used for multi-locale communication", + values=("bundled", "spack", "unset"), + multi=False, + when="comm=ofi", + ) + + variant( + "libfabric", + default="unset", + description="Control the libfabric version used for multi-locale communication", values=("bundled", "spack", "unset"), multi=False, + when="comm=gasnet comm_substrate=ofi", + ) + + requires( + "^libfabric" + (" fabrics=cxi" if spack.platforms.cray.slingshot_network() else ""), + when="libfabric=spack", + msg="libfabric requires cxi fabric provider on HPE-Cray EX machines", ) variant( @@ -361,7 +387,7 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): ), default=True, ) - depends_on(dep, when="+{0}".format(variant_name)) + depends_on(dep, when="+{0}".format(variant_name), type=("build", "link", "run", "test")) # TODO: for CHPL_X_CC and CHPL_X_CXX, can we capture an arbitrary path, possibly # with arguments? @@ -410,7 +436,14 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): conflicts("platform=windows") # Support for windows is through WSL only conflicts("+rocm", when="+cuda", msg="Chapel must be built with either CUDA or ROCm, not both") - conflicts("+rocm", when="@:2.0.0", msg="ROCm support in spack requires Chapel 2.0.0 or later") + conflicts( + "+rocm", when="@:1.99.99", msg="ROCm support in spack requires Chapel 2.0.0 or later" + ) + # Chapel restricts the allowable ROCm versions + with when("+rocm"): + depends_on("hsa-rocr-dev@4:5.4") + depends_on("hip@4:5.4") + depends_on("llvm-amdgpu@4:5.4") conflicts( "comm_substrate=unset", @@ -418,9 +451,19 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): msg="comm=gasnet requires you to also set comm_substrate= to the appropriate network", ) + conflicts( + "gasnet_segment=everything", + when="+pshm", + msg="gasnet_segment=everything does not support +pshm", + ) + + # comm_substrate=udp gasnet_segment=unset defaults to everything, + # which is incompatible with +pshm + requires("gasnet_segment=fast", when="+pshm comm_substrate=udp") + conflicts( "^python@3.12:", - when="@:2.1.0", + when="@:2.0.99", msg="Chapel versions prior to 2.1.0 may produce SyntaxWarnings with Python >= 3.12", ) @@ -447,20 +490,18 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): depends_on("doxygen@1.8.17:", when="+chpldoc") # TODO: keep up to date with util/chplenv/chpl_llvm.py - with when("llvm=spack"): + with when("llvm=spack ~rocm"): depends_on("llvm@11:17", when="@:2.0.1") depends_on("llvm@11:18", when="@2.1.0:") # Based on docs https://chapel-lang.org/docs/technotes/gpu.html#requirements - depends_on("llvm@16:", when="llvm=spack ^cuda@12:") + depends_on("llvm@16:", when="llvm=spack +cuda ^cuda@12:") requires( "^llvm targets=all", msg="llvm=spack +cuda requires LLVM support the nvptx target", when="llvm=spack +cuda", ) - depends_on("cuda@11:", when="+cuda", type=("build", "link", "run", "test")) - # This is because certain systems have binutils installed as a system package # but do not include the headers. Spack incorrectly supplies those external # packages as proper dependencies for LLVM, but then LLVM will fail to build @@ -469,11 +510,17 @@ class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage): depends_on("m4") - depends_on("gmp", when="gmp=spack", type=("build", "link", "run", "test")) - depends_on("hwloc", when="hwloc=spack", type=("build", "link", "run", "test")) - depends_on("libfabric", when="libfabric=spack", type=("build", "link", "run", "test")) - depends_on("libunwind", when="unwind=spack", type=("build", "link", "run", "test")) - depends_on("jemalloc", when="host_jemalloc=spack", type=("build", "link", "run", "test")) + # Runtime dependencies: + # Note here "run" is run of the Chapel compiler built by this package, + # but many of these are ALSO run-time dependencies of the executable + # application built by that Chapel compiler from user-provided sources. + with default_args(type=("build", "link", "run", "test")): + depends_on("cuda@11:", when="+cuda") + depends_on("gmp", when="gmp=spack") + depends_on("hwloc", when="hwloc=spack") + depends_on("libfabric", when="libfabric=spack") + depends_on("libunwind", when="unwind=spack") + depends_on("jemalloc", when="host_jemalloc=spack") depends_on("gasnet conduits=none", when="gasnet=spack") depends_on("gasnet@2024.5.0: conduits=none", when="@2.1.0: gasnet=spack") @@ -523,13 +570,25 @@ def setup_chpl_compilers(self, env): # Undo spack compiler wrappers: # the C/C++ compilers must work post-install - if self.spec.satisfies("+cuda") or self.spec.satisfies("+rocm"): + if self.spec.satisfies("+rocm"): + env.set("CHPL_TARGET_COMPILER", "llvm") + env.set( + "CHPL_LLVM_CONFIG", + join_path(self.spec["llvm-amdgpu"].prefix, "bin", "llvm-config"), + ) + real_cc = join_path(self.spec["llvm-amdgpu"].prefix, "bin", "clang") + real_cxx = join_path(self.spec["llvm-amdgpu"].prefix, "bin", "clang++") + + # +rocm appears to also require a matching LLVM host compiler to guarantee linkage + env.set("CHPL_HOST_COMPILER", "llvm") + env.set("CHPL_HOST_CC", real_cc) + env.set("CHPL_HOST_CXX", real_cxx) + + elif self.spec.satisfies("llvm=spack"): env.set("CHPL_TARGET_COMPILER", "llvm") + env.set("CHPL_LLVM_CONFIG", join_path(self.spec["llvm"].prefix, "bin", "llvm-config")) real_cc = join_path(self.spec["llvm"].prefix, "bin", "clang") real_cxx = join_path(self.spec["llvm"].prefix, "bin", "clang++") - elif is_CrayEX() and os.environ.get("CRAYPE_DIR"): - real_cc = join_path(os.environ["CRAYPE_DIR"], "bin", "cc") - real_cxx = join_path(os.environ["CRAYPE_DIR"], "bin", "CC") else: real_cc = self.compiler.cc real_cxx = self.compiler.cxx @@ -539,6 +598,9 @@ def setup_chpl_compilers(self, env): def setup_chpl_comm(self, env, spec): env.set("CHPL_COMM", spec.variants["comm"].value) + if self.spec.satisfies("+pshm"): + env.set("CHPL_GASNET_MORE_CFG_OPTIONS", "--enable-pshm") + @run_before("configure", when="gasnet=spack") def setup_gasnet(self): dst = join_path(self.stage.source_path, "third-party", "gasnet", "gasnet-src") @@ -546,12 +608,6 @@ def setup_gasnet(self): os.rmdir(dst) symlink(self.spec["gasnet"].prefix.src, dst) - def setup_chpl_llvm(self, env): - if self.spec.variants["llvm"].value == "spack": - env.set( - "CHPL_LLVM_CONFIG", "{0}/{1}".format(self.spec["llvm"].prefix, "bin/llvm-config") - ) - def setup_if_not_unset(self, env, var, value): if value != "unset": if value == "spack": @@ -562,12 +618,18 @@ def prepend_cpath_include(self, env, prefix): if not is_system_path(prefix): env.prepend_path("CPATH", prefix.include) + def set_lib_path(self, env, prefix): + if not is_system_path(prefix): + env.prepend_path("LD_LIBRARY_PATH", prefix.lib) + env.prepend_path("LIBRARY_PATH", prefix.lib) + if prefix.lib.pkgconfig is not None: + env.prepend_path("PKG_CONFIG_PATH", prefix.lib.pkgconfig) + def setup_env_vars(self, env): # variants that appear unused by Spack typically correspond directly to # a CHPL_ variable which will be used by the Chapel build system for v in self.spec.variants.keys(): self.setup_if_not_unset(env, "CHPL_" + v.upper(), self.spec.variants[v].value) - self.setup_chpl_llvm(env) self.setup_chpl_compilers(env) self.setup_chpl_platform(env) @@ -578,47 +640,51 @@ def setup_env_vars(self, env): if self.spec.satisfies("+developer"): env.set("CHPL_DEVELOPER", "true") + if not self.spec.satisfies("llvm=none"): + # workaround Spack issue #44746: + # Chapel does not directly utilize lua, but many of its + # launchers depend on system installs of batch schedulers + # (notably Slurm on Cray EX) which depend on a system Lua. + # LLVM includes lua as a dependency, but a barebones lua + # install lacks many packages provided by a system Lua, + # which are often required by system services like Slurm. + # Disable the incomplete Spack lua package directory to + # allow the system one to function. + env.unset("LUA_PATH") + env.unset("LUA_CPATH") + if self.spec.variants["gmp"].value == "spack": # TODO: why must we add to CPATH to find gmp.h # TODO: why must we add to LIBRARY_PATH to find lgmp self.prepend_cpath_include(env, self.spec["gmp"].prefix) - env.prepend_path("LIBRARY_PATH", self.spec["gmp"].prefix.lib) - # Need this for the test env, where it does not appear automatic: - env.prepend_path("PKG_CONFIG_PATH", self.spec["gmp"].prefix.lib.pkgconfig) + self.set_lib_path(env, self.spec["gmp"].prefix) if self.spec.variants["hwloc"].value == "spack": - env.prepend_path("LD_LIBRARY_PATH", self.spec["hwloc"].prefix.lib) + self.set_lib_path(env, self.spec["hwloc"].prefix) # Need this for the test env, where it does not appear automatic: - env.prepend_path("PKG_CONFIG_PATH", self.spec["hwloc"].prefix.lib.pkgconfig) env.prepend_path("PKG_CONFIG_PATH", self.spec["libpciaccess"].prefix.lib.pkgconfig) + # TODO: unwind builds but resulting binaries fail to run, producing linker errors if self.spec.variants["unwind"].value == "spack": # chapel package would not build without cpath, missing libunwind.h self.prepend_cpath_include(env, self.spec["libunwind"].prefix) env.prepend_path("LD_LIBRARY_PATH", self.spec["libunwind"].prefix.lib) if self.spec.satisfies("+yaml"): - env.prepend_path("PKG_CONFIG_PATH", self.spec["libyaml"].prefix.lib.pkgconfig) self.prepend_cpath_include(env, self.spec["libyaml"].prefix) # could not compile test/library/packages/Yaml/writeAndParse.chpl without this - env.prepend_path("LIBRARY_PATH", self.spec["libyaml"].prefix.lib) + self.set_lib_path(env, self.spec["libyaml"].prefix) if self.spec.satisfies("+zmq"): self.prepend_cpath_include(env, self.spec["libzmq"].prefix) # could not compile test/library/packages/ZMQ/hello.chpl without this - env.prepend_path("LIBRARY_PATH", self.spec["libzmq"].prefix.lib) - env.prepend_path("LD_LIBRARY_PATH", self.spec["libzmq"].prefix.lib) - # could not compile test/library/packages/ZMQ/hello.chpl without this - env.prepend_path("LIBRARY_PATH", self.spec["libzmq"].prefix.lib) - env.prepend_path("PKG_CONFIG_PATH", self.spec["libzmq"].prefix.lib.pkgconfig) + self.set_lib_path(env, self.spec["libzmq"].prefix) env.prepend_path("PKG_CONFIG_PATH", self.spec["libsodium"].prefix.lib.pkgconfig) if self.spec.satisfies("+curl"): self.prepend_cpath_include(env, self.spec["curl"].prefix) # could not compile test/library/packages/Curl/check-http.chpl without this - env.prepend_path("LIBRARY_PATH", self.spec["curl"].prefix.lib) - env.prepend_path("LD_LIBRARY_PATH", self.spec["curl"].prefix.lib) - env.prepend_path("PKG_CONFIG_PATH", self.spec["curl"].prefix.lib.pkgconfig) + self.set_lib_path(env, self.spec["curl"].prefix) if self.spec.satisfies("+cuda"): # TODO: why must we add to LD_LIBRARY_PATH to find libcudart? @@ -629,18 +695,11 @@ def setup_env_vars(self, env): if self.spec.satisfies("+rocm"): env.set("CHPL_LOCALE_MODEL", "gpu") env.set("CHPL_GPU", "amd") - env.set("CHPL_HOST_COMPILER", "llvm") env.set("CHPL_GPU_ARCH", self.spec.variants["amdgpu_target"].value[0]) - env.set( - "CHPL_LLVM_CONFIG", - "{0}/{1}".format(self.spec["llvm-amdgpu"].prefix, "bin/llvm-config"), - ) self.prepend_cpath_include(env, self.spec["hip"].prefix) env.set("CHPL_ROCM_PATH", self.spec["llvm-amdgpu"].prefix) - env.prepend_path("LIBRARY_PATH", self.spec["hip"].prefix.lib) - env.prepend_path("LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib) - env.prepend_path("LD_LIBRARY_PATH", self.spec["hip"].prefix.lib) - env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib) + self.set_lib_path(env, self.spec["hip"].prefix) + self.set_lib_path(env, self.spec["hsa-rocr-dev"].prefix) self.setup_chpl_comm(env, self.spec) def setup_build_environment(self, env): @@ -735,11 +794,9 @@ def test_chpldoc(self): if not self.spec.satisfies("+chpldoc"): print("Skipping chpldoc test as chpldoc variant is not set") return - with working_dir(self.test_suite.current_test_cache_dir): - with set_env(CHPL_HOME=self.test_suite.current_test_cache_dir): - with test_part(self, "test_chpldoc", purpose="test chpldoc"): - res = subprocess.run(["util/test/checkChplDoc"]) - assert res.returncode == 0 + else: + # TODO: Need to update checkChplDoc to work in the spack testing environment + pass # TODO: In order to run these tests, there's a lot of infrastructure to copy # from the Chapel test suite and there are conflicts with CHPL_HOME needing @@ -799,6 +856,7 @@ def copy_test_files(self): "util/test", "util/chplenv", "util/config", + "util/printchplenv", # "test/library/packages/Curl", # "test/library/packages/URL/", # "test/library/packages/ProtobufProtocolSupport/", From 9a10538f6d48789e05ffed4934f766798ba879b7 Mon Sep 17 00:00:00 2001 From: Christopher Christofi <77968333+ChristopherChristofi@users.noreply.github.com> Date: Wed, 31 Jul 2024 09:27:34 +0100 Subject: [PATCH 070/435] openslide: add new version 4.0.0 (#42158) * openslide: add new version 4.0.0 * openslide: update dependency organization --- .../builtin/packages/openslide/package.py | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/openslide/package.py b/var/spack/repos/builtin/packages/openslide/package.py index c94e2e39f67082..8133a6eea29e6a 100644 --- a/var/spack/repos/builtin/packages/openslide/package.py +++ b/var/spack/repos/builtin/packages/openslide/package.py @@ -6,24 +6,43 @@ from spack.package import * -class Openslide(AutotoolsPackage): +class Openslide(AutotoolsPackage, MesonPackage): """OpenSlide reads whole slide image files.""" homepage = "https://openslide.org/" url = "https://github.com/openslide/openslide/releases/download/v3.4.1/openslide-3.4.1.tar.xz" + maintainers("ChristopherChristofi") + license("LGPL-2.1-only") + version("4.0.0", sha256="cc227c44316abb65fb28f1c967706eb7254f91dbfab31e9ae6a48db6cf4ae562") version("3.4.1", sha256="9938034dba7f48fadc90a2cdf8cfe94c5613b04098d1348a5ff19da95b990564") - depends_on("c", type="build") # generated + build_system( + conditional("meson", when="@4:"), conditional("autotools", when="@3.4.1"), default="meson" + ) + depends_on("c", type="build") depends_on("pkgconfig", type="build") - depends_on("openjpeg") + + with when("build_system=meson"): + depends_on("meson@0.53:", type="build") + + depends_on("cairo+pdf@1.2:") + depends_on("gdk-pixbuf") depends_on("jpeg") - depends_on("libtiff") + depends_on("libpng") + depends_on("libtiff@4.0:") depends_on("libxml2") - depends_on("sqlite@3.6:") - depends_on("glib") - depends_on("cairo+pdf") - depends_on("gdk-pixbuf") + depends_on("openjpeg@1,2.1:") + depends_on("zlib-api") + + with when("@4:"): + depends_on("libdicom") + depends_on("glib@2.56:") + depends_on("sqlite@3.14:") + + with when("@3.4.1"): + depends_on("glib@2.16:") + depends_on("sqlite@3.6:") From 4a088f717ecdb049f436658c3981bcb950e9d803 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 31 Jul 2024 10:52:55 +0200 Subject: [PATCH 071/435] pika: add v0.26.1 (#45515) --- var/spack/repos/builtin/packages/pika/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index e20d181fe7b6e1..d63db3e2934386 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -19,6 +19,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): license("BSL-1.0") + version("0.26.1", sha256="d7cc842238754019abdb536e22325e9a57186cd2ac8cc9c7140a5385f9d730f6") version("0.26.0", sha256="bbec5472c71006c1f55e7946c8dc517dae76c41cacb36fa98195312c74a1bb9a") version("0.25.0", sha256="6646e12f88049116d84ce0caeedaa039a13caaa0431964caea4660b739767b2e") version("0.24.0", sha256="3b97c684107f892a633f598d94bcbd1e238d940e88e1c336f205e81b99326cc3") From c30c5df340284508b31ac45977e7d825d6dd9b23 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Wed, 31 Jul 2024 10:48:21 -0400 Subject: [PATCH 072/435] libxcb: xcb-proto is a build dependency (#45523) --- var/spack/repos/builtin/packages/libxcb/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index bc22cc20289e83..fefdebd20ca845 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -38,12 +38,12 @@ class Libxcb(AutotoolsPackage, XorgPackage): depends_on("libxdmcp") # libxcb 1.X requires xcb-proto >= 1.X - depends_on("xcb-proto") - depends_on("xcb-proto@1.17:", when="@1.17") - depends_on("xcb-proto@1.16:", when="@1.16") - depends_on("xcb-proto@1.15:", when="@1.15") - depends_on("xcb-proto@1.14:", when="@1.14") - depends_on("xcb-proto@1.13:", when="@1.13") + depends_on("xcb-proto", type="build") + depends_on("xcb-proto@1.17:", when="@1.17", type="build") + depends_on("xcb-proto@1.16:", when="@1.16", type="build") + depends_on("xcb-proto@1.15:", when="@1.15", type="build") + depends_on("xcb-proto@1.14:", when="@1.14", type="build") + depends_on("xcb-proto@1.13:", when="@1.13", type="build") depends_on("python", type="build") depends_on("pkgconfig", type="build") From 12abc233d09e08688262f6021378a19ddd0f8f4c Mon Sep 17 00:00:00 2001 From: ron minnich Date: Wed, 31 Jul 2024 10:08:48 -0700 Subject: [PATCH 073/435] mpigraph: new package (LLNL mpigraph) (#45121) Signed-off-by: Ron Minnich --- .../builtin/packages/mpigraph/package.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mpigraph/package.py diff --git a/var/spack/repos/builtin/packages/mpigraph/package.py b/var/spack/repos/builtin/packages/mpigraph/package.py new file mode 100644 index 00000000000000..485c07240aea05 --- /dev/null +++ b/var/spack/repos/builtin/packages/mpigraph/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os + +from spack.package import * + + +class Mpigraph(Package): + """LLNL mpigraph""" + + homepage = "https://github.com/LLNL/mpiGraph" + git = "https://github.com/LLNL/mpiGraph.git" + + version("main", branch="main") + + depends_on("mpi") + maintainers("adammoody", "onewayforever", "rminnich") + license("BSD-3-Clause", checked_by="rminnich") + + version("0.0.1") + + depends_on("mpi") + + def install(self, spec, prefix): + mkdirp(prefix.bin) + make() + install("mpiGraph", os.path.join(prefix.bin, "mpiGraph")) From 62d2e8d1f480fa5a85806a0657017946c5114b55 Mon Sep 17 00:00:00 2001 From: Felix Thaler Date: Wed, 31 Jul 2024 19:14:18 +0200 Subject: [PATCH 074/435] libvterm: Fix download: Use download from launchpad.net (#45094) --- var/spack/repos/builtin/packages/libvterm/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/libvterm/package.py b/var/spack/repos/builtin/packages/libvterm/package.py index 0277e2e8c809a6..6d6ff9e4446965 100644 --- a/var/spack/repos/builtin/packages/libvterm/package.py +++ b/var/spack/repos/builtin/packages/libvterm/package.py @@ -11,26 +11,26 @@ class Libvterm(MakefilePackage): """An abstract library implementation of a terminal emulator""" homepage = "http://www.leonerd.org.uk/code/libvterm/" - url = "http://www.leonerd.org.uk/code/libvterm/libvterm-0.1.3.tar.gz" license("MIT") + maintainers("fthaler") + version("0.3.3", sha256="09156f43dd2128bd347cbeebe50d9a571d32c64e0cf18d211197946aff7226e0") version("0.3.1", sha256="25a8ad9c15485368dfd0a8a9dca1aec8fea5c27da3fa74ec518d5d3787f0c397") version("0.3", sha256="61eb0d6628c52bdf02900dfd4468aa86a1a7125228bab8a67328981887483358") version("0.2", sha256="4c5150655438cfb8c57e7bd133041140857eb04defd0e544521c0e469258e105") version("0.1.4", sha256="bc70349e95559c667672fc8c55b9527d9db9ada0fb80a3beda533418d782d3dd") version("0.1.3", sha256="e41724466a4658e0f095e8fc5aeae26026c0726dce98ee71d6920d06f7d78e2b") - version( - "0.0.0", - sha256="6344eca01c02e2270348b79e033c1e0957028dbcd76bc784e8106bea9ec3029d", - url="http://www.leonerd.org.uk/code/libvterm/libvterm-0+bzr726.tar.gz", - ) depends_on("c", type="build") # generated depends_on("libtool", type="build") + def url_for_version(self, version): + url = "https://launchpad.net/libvterm/trunk/v{0}/+download/libvterm-{1}.tar.gz" + return url.format(version.up_to(2), version) + def setup_build_environment(self, env): env.set("LIBTOOL", self.spec["libtool"].prefix.bin.join("libtool")) From 89bc483c87300d7edcd93809037e44b385626c4a Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Wed, 31 Jul 2024 11:16:49 -0700 Subject: [PATCH 075/435] py-cffi: add v1.16.0 (#45386) Signed-off-by: Teague Sterling --- var/spack/repos/builtin/packages/py-cffi/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py index 932fcaaa1659a8..677823af8e98a4 100644 --- a/var/spack/repos/builtin/packages/py-cffi/package.py +++ b/var/spack/repos/builtin/packages/py-cffi/package.py @@ -16,6 +16,7 @@ class PyCffi(PythonPackage): license("MIT") + version("1.16.0", sha256="bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0") version("1.15.1", sha256="d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9") version("1.15.0", sha256="920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954") version("1.14.6", sha256="c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd") From c71c7735fddbcece03dd45291ac5a2286b34d7ee Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 31 Jul 2024 13:48:06 -0500 Subject: [PATCH 076/435] py-globus-sdk: add through v3.42; pypi now uses underscores (#45349) --- .../builtin/packages/py-globus-sdk/package.py | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-globus-sdk/package.py b/var/spack/repos/builtin/packages/py-globus-sdk/package.py index 33458b22d81bb5..dbc275e30a8ce6 100644 --- a/var/spack/repos/builtin/packages/py-globus-sdk/package.py +++ b/var/spack/repos/builtin/packages/py-globus-sdk/package.py @@ -13,12 +13,29 @@ class PyGlobusSdk(PythonPackage): """ homepage = "https://github.com/globus/globus-sdk-python" - pypi = "globus-sdk/globus-sdk-3.0.2.tar.gz" + pypi = "globus_sdk/globus_sdk-3.0.2.tar.gz" maintainers("hategan", "climbfuji") - license("Apache-2.0") - + license("Apache-2.0", checked_by="wdconinc") + + version("3.42.0", sha256="7f239acf26cd98c72568b07cc69d7e8d84511004881435c83129bf37c9495f43") + version("3.41.0", sha256="a097829e7516735675c1535bd17a8d9137636678bdbf50e95b3e7af8b32638ef") + version("3.40.0", sha256="6394f01c35b2b3275622f4f7c194eaf6750cb6c1e82cb2448dac2eb4ec394d75") + version("3.39.0", sha256="10af5291ba261e817665d5951948206232ecebccdc2aa8adc0528f0031ab80c3") + version("3.38.0", sha256="b83faacc103e3d3d3ac2ae33fd73a20a09d4d566cfa0cb03716b3fd8f51adcff") + version("3.37.0", sha256="87cd4cc191bca5912138c1f992589c735e13436208db10f2de5831efbebc83a7") + version("3.36.0", sha256="7693954a9ee3d69d09a0914c934ebcf4b4f47f016baa5c33612a03e367ee65a3") + version("3.35.0", sha256="9da40d5f251f98d89297c2a92abd9f24bfa3c041dfd0e957579884ef0c882cf2") + version("3.34.0", sha256="4db2ff439de9bd650bc2ba2d7c00614bd3dee34bd9b79da708951b8148236a36") + version("3.33.0", sha256="38b048590cf7bbd01c5ac82346401c3f42c3f105c81421d61bcb771aa788f481") + version("3.32.0", sha256="fe9df4ca2f2d16bbf40098df482e1713070946c70e2d6ec6a687c7086c1b559c") + version("3.31.0", sha256="5f077a8e532828a137a54f2858e63695af16d02577de058278da4ec873556cc1") + version("3.30.0", sha256="29d25f83d3b250d28a3a4bca8d046601a4bbb725330f409e6401295fa6bfb0ce") + version("3.29.0", sha256="a5f3c2da86ac6e7165841c9364ae80893f2ae667add5af5cd2237fc3fa14a1be") + version("3.28.0", sha256="249423dda76f162bb0d5515509135b68d6a779ad0cf2cd02a8204b2c7903e365") + version("3.27.0", sha256="1e9afac3bcce7dd69199c6e85372b0d6cadcc0906b27129d88db7e41dc32f195") + version("3.26.0", sha256="5a2bca267635c62e0f7c60fce10c47c7fd0fa8923c3363d44871c4abca8a68d1") version("3.25.0", sha256="d9be275d4ec18054db04732f75649c4227800c79b31fbcfb3f4f31eccfa5f4f7") version("3.10.1", sha256="c20fec55fc7e099f4d0c8224a36e194604577539445c5985cb465b23779baee8") version("3.10.0", sha256="7a7e7cd5cfbc40c6dc75bdb92b050c4191f992b5f7081cd08895bf119fd97bbf") @@ -28,9 +45,18 @@ class PyGlobusSdk(PythonPackage): version("3.0.2", sha256="765b577b37edac70c513179607f1c09de7b287baa855165c9dd68de076d67f16") depends_on("python@3.6:", type=("build", "run")) + depends_on("python@3.7:", type=("build", "run"), when="@3.17:") + depends_on("python@3.8:", type=("build", "run"), when="@3.42:") depends_on("py-setuptools", type="build") depends_on("py-requests@2.19.1:2", type=("build", "run")) depends_on("py-pyjwt@2.0.0:2+crypto", type=("build", "run")) depends_on("py-cryptography@3.3.1:3.3,3.4.1:", when="@3.7:", type=("build", "run")) depends_on("py-cryptography@2:3.3,3.4.1:3.6", when="@:3.0", type=("build", "run")) - depends_on("py-typing-extensions@4:", when="@3.25:", type=("build", "run")) + depends_on("py-typing-extensions@4:", when="@3.25: ^python@:3.9", type=("build", "run")) + depends_on("py-importlib-resources@5.12.0:", when="@3.41: ^python@:3.8", type=("build", "run")) + + def url_for_version(self, version): + if version <= Version("3.39"): + return super().url_for_version(version).replace("_", "-") + else: + return super().url_for_version(version) From 04f0af0a28e1f6ff0ef0b50e28ecf9d19fe544e6 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 31 Jul 2024 13:51:38 -0500 Subject: [PATCH 077/435] acts,dd4hep: restrict to podio@0 to prevent failures with podio@1 (#44825) * dd4hep: restrict to podio@0 to prevent failures with podio@1 * acts: restrict to podio@0 to prevent failures with podio@1 * dd4hep: close when range for podio * acts: close when range for podio * acts: fix when range for podio * acts: close when range for podio * acts,dd4hep: ensure main/master still depends on podio --- var/spack/repos/builtin/packages/acts/package.py | 2 ++ var/spack/repos/builtin/packages/dd4hep/package.py | 1 + 2 files changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index 735b4b8736fc67..d4f79be031ca1a 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -353,7 +353,9 @@ class Acts(CMakePackage, CudaPackage): depends_on("nlohmann-json @3.9.1:", when="@0.14: +json") depends_on("podio @0.6:", when="@25: +edm4hep") depends_on("podio @0.16:", when="@30.3: +edm4hep") + depends_on("podio @:0", when="@:35 +edm4hep") depends_on("podio @0.16:", when="+podio") + depends_on("podio @:0", when="@:35 +podio") depends_on("pythia8", when="+pythia8") depends_on("python", when="+python") depends_on("python@3.8:", when="+python @19.11:19") diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py index c6c45d9cfc838a..e7deeba0d95514 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -123,6 +123,7 @@ class Dd4hep(CMakePackage): depends_on("podio@:0.16.03", when="@:1.23 +edm4hep") depends_on("podio@0.16:", when="@1.24: +edm4hep") depends_on("podio@0.16.3:", when="@1.26: +edm4hep") + depends_on("podio@:0", when="@:1.29 +edm4hep") depends_on("py-pytest", type=("build", "test")) # See https://github.com/AIDASoft/DD4hep/pull/771 and https://github.com/AIDASoft/DD4hep/pull/876 From 69d216a88ea454149b6e987741c14a6173e6e285 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 31 Jul 2024 21:03:26 +0200 Subject: [PATCH 078/435] py-edflib-python: new package (#45371) --- .../packages/py-edflib-python/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-edflib-python/package.py diff --git a/var/spack/repos/builtin/packages/py-edflib-python/package.py b/var/spack/repos/builtin/packages/py-edflib-python/package.py new file mode 100644 index 00000000000000..cb540ec79bafb4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-edflib-python/package.py @@ -0,0 +1,23 @@ +# 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 PyEdflibPython(PythonPackage): + """Library to read/write EDF+/BDF+ files written in pure Python by the same + author as the original EDFlib.""" + + homepage = "https://www.teuniz.net/edflib_python/" + pypi = "EDFlib-Python/EDFlib-Python-1.0.8.tar.gz" + git = "https://gitlab.com/Teuniz/EDFlib-Python" + + license("BSD-3-Clause") + + version("1.0.8", sha256="42de3b7980809f37fcc44e3cddc837a3237b69b937a81335dd1f9ffaaf3f2e19") + + depends_on("py-setuptools@42:", type="build") + + depends_on("py-numpy@1.17:", type=("build", "run")) From 88782fb05acb7917ee2662dc748b5e7da4001ec2 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 31 Jul 2024 21:04:44 +0200 Subject: [PATCH 079/435] py-eeglabio: new package (#45372) --- .../builtin/packages/py-eeglabio/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-eeglabio/package.py diff --git a/var/spack/repos/builtin/packages/py-eeglabio/package.py b/var/spack/repos/builtin/packages/py-eeglabio/package.py new file mode 100644 index 00000000000000..3a31cf77b3c25e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-eeglabio/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyEeglabio(PythonPackage): + """I/O support for EEGLAB files in Python.""" + + homepage = "https://github.com/jackz314/eeglabio" + pypi = "eeglabio/eeglabio-0.0.2.post4.tar.gz" + + license("BSD-3-Clause") + + version( + "0.0.2.post4", sha256="64ccaca0ec1b0aa78ca6569ed3581ea601dec51ae6a3b2971e9dc82f54d95f39" + ) + + depends_on("python@3.7:", type=("build", "run")) + depends_on("py-setuptools", type="build") + + depends_on("py-numpy", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) From f1140055d0a2ca7b054847a5fd487a776da65fd5 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 31 Jul 2024 21:06:15 +0200 Subject: [PATCH 080/435] py-pymatreader: Add v0.0.32 (#45366) --- var/spack/repos/builtin/packages/py-pymatreader/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pymatreader/package.py b/var/spack/repos/builtin/packages/py-pymatreader/package.py index dd8984964410e1..19973fb46b5a71 100644 --- a/var/spack/repos/builtin/packages/py-pymatreader/package.py +++ b/var/spack/repos/builtin/packages/py-pymatreader/package.py @@ -14,6 +14,7 @@ class PyPymatreader(PythonPackage): license("BSD-2-Clause") + version("0.0.32", sha256="34a5b4812635c98d3e5776fc21cd7f85b045784539363674d178dfb1158a617f") version("0.0.30", sha256="c8187b6ee77a9b1ec0d8ccae9b22c9031d01104a412737cc4a71e6d993a1a12b") depends_on("py-setuptools", type="build") @@ -22,4 +23,6 @@ class PyPymatreader(PythonPackage): depends_on("py-scipy@:1.6,1.7.1:", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) depends_on("py-xmltodict", type=("build", "run")) - depends_on("py-future", type=("build", "run")) + + # Historical dependencies + depends_on("py-future", type=("build", "run"), when="@:0.0.30") From 5541a184d54b39533f93e61c26e507ae75aa4934 Mon Sep 17 00:00:00 2001 From: Vlad Savelyev Date: Wed, 31 Jul 2024 21:16:21 +0200 Subject: [PATCH 081/435] py-multiqc: add v1.23 (#45325) --- .../builtin/packages/py-multiqc/package.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-multiqc/package.py b/var/spack/repos/builtin/packages/py-multiqc/package.py index eb4d18e969907a..0325b941f0c82f 100644 --- a/var/spack/repos/builtin/packages/py-multiqc/package.py +++ b/var/spack/repos/builtin/packages/py-multiqc/package.py @@ -15,13 +15,11 @@ class PyMultiqc(PythonPackage): pypi = "multiqc/multiqc-1.0.tar.gz" license("GPL-3.0-only", checked_by="A_N_Other") + maintainers("ewels", "vladsavelyev") - version("1.21", sha256="63bc87e251dbf788dcc8a45e58482ea09b26d05957bf50c77c684d5f0972a495") - version("1.15", sha256="ce5359a12226cf4ce372c6fdad142cfe2ae7501ffa97ac7aab544ced4db5ea3c") - version("1.14", sha256="dcbba405f0c9521ed2bbd7e8f7a9200643047311c9619878b81d167300149362") - version("1.13", sha256="0564fb0f894e6ca0822a0f860941b3ed2c33dce407395ac0c2103775d45cbfa0") + version("1.23", sha256="4e84664000fec69a0952a0457a8d780dcc1ce9e36d14680dbdba5610b9766265") - # dependency defintions move from setup.py to pyproject.toml as of @1.21: + # dependency defintions move from setup.py to pyproject.toml as of @1.23: # build deps depends_on("py-setuptools", type="build") @@ -34,7 +32,6 @@ class PyMultiqc(PythonPackage): depends_on("py-jinja2@2.9:", type=("build", "run"), when="@:1.13") depends_on("py-kaleido", type=("build", "run"), when="@1.20:") depends_on("py-markdown", type=("build", "run"), when="@1.3:") - depends_on("py-matplotlib@2.1.1:", type=("build", "run"), when="@1.13:") depends_on("py-numpy", type=("build", "run")) depends_on("py-packaging", type=("build", "run"), when="@1.16:") depends_on("py-requests", type=("build", "run"), when="@1.3:") @@ -49,10 +46,5 @@ class PyMultiqc(PythonPackage): depends_on("py-coloredlogs", type=("build", "run"), when="@1.13:") depends_on("py-spectra@0.0.10:", type=("build", "run"), when="@1.4:") depends_on("py-spectra", type=("build", "run"), when="@1.18:") - - # retired run deps - depends_on("py-future@0.14.1:", type=("build", "run"), when="@1.13:1.19") - depends_on("py-lzstring", type=("build", "run"), when="@:1.16") - depends_on("py-networkx@2.5.1:", type=("build", "run"), when="@1.13:1.20") - depends_on("py-networkx@:1", type=("build", "run"), when="@1.3") - depends_on("py-simplejson", type=("build", "run"), when="@:1.15") + depends_on("py-typeguard", type=("build", "run"), when="@1.23:") + depends_on("py-tqdm", type=("build", "run"), when="@1.23:") From ad26dcfbfc833984d670a9088d9f70a4f894a9a6 Mon Sep 17 00:00:00 2001 From: Ian Lumsden Date: Wed, 31 Jul 2024 12:36:51 -0700 Subject: [PATCH 082/435] flux-core,flux-sched: fix environments with external flux (#44775) --- var/spack/repos/builtin/packages/flux-core/package.py | 6 ++++++ var/spack/repos/builtin/packages/flux-sched/package.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py index 3d0e128ee43146..016ca57c8b64dc 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -181,6 +181,12 @@ def setup_build_environment(self, env): env.append_path("LUA_PATH", "./?.lua", separator=";") def setup_run_environment(self, env): + # If this package is external, we expect the external provider to set things + # like LUA paths. So, we early return. If the package is not external, + # properly set these environment variables to make sure the user environment + # is configured correctly + if self.spec.external: + return env.prepend_path( "LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";" ) diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py index 3f97fb0d769d55..d75024e041c338 100644 --- a/var/spack/repos/builtin/packages/flux-sched/package.py +++ b/var/spack/repos/builtin/packages/flux-sched/package.py @@ -166,6 +166,12 @@ def lua_lib_dir(self): return os.path.join("lib", "lua", str(self.lua_version)) def setup_run_environment(self, env): + # If this package is external, we expect the external provider to set + # things like LUA paths. So, we early return. If the package is not + # external, properly set these environment variables to make sure the + # user environment is configured correctly + if self.spec.external: + return env.prepend_path( "LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";" ) From 87494d29419c4dbaecba024420ad54d8a9f2bae5 Mon Sep 17 00:00:00 2001 From: Vincent Michaud-Rioux Date: Wed, 31 Jul 2024 16:55:02 -0400 Subject: [PATCH 083/435] py-pennylane: Add 0.36 and 0.37 with deps (#45134) --- .../repos/builtin/packages/py-autoray/package.py | 3 +++ .../py-pennylane-lightning-kokkos/package.py | 7 +++++-- .../packages/py-pennylane-lightning/package.py | 4 +++- .../repos/builtin/packages/py-pennylane/package.py | 13 +++++++++---- .../repos/builtin/packages/py-rustworkx/package.py | 9 +++++++++ 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-autoray/package.py b/var/spack/repos/builtin/packages/py-autoray/package.py index 316596abe3b3c5..b413f91e2823e6 100644 --- a/var/spack/repos/builtin/packages/py-autoray/package.py +++ b/var/spack/repos/builtin/packages/py-autoray/package.py @@ -15,6 +15,9 @@ class PyAutoray(PythonPackage): license("Apache-2.0") + version("0.6.12", sha256="721328aa06fc3577155d988052614a7b4bd6e4d01b340695344031ee4abd2a1e") + version("0.6.11", sha256="23e6dc013913de318952580cfbf054920ebd5eacd060fc48edebb678307b4b0d") + version("0.6.10", sha256="afff46ed3a001daad1bed917aecda75a8f0d36c0c8823eed877db4e8d55a8b20") version("0.6.9", sha256="9f41759f6a286bc280c4f6aece436da1c87ce75eb00efe7dc7319860c43654fa") version("0.6.8", sha256="8e31832597cb2075e5f9f65894fafff9d726d9287718415d3c8b008e592f0197") version("0.6.7", sha256="8945cfdf3aa8a35f9fe1abc03d84925db61f58bbd386623206dd8e9ba1d9e377") diff --git a/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py b/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py index 9f5b20a915facb..aee29c340b91eb 100644 --- a/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py +++ b/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py @@ -18,6 +18,8 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC version("main", branch="main") version("master", branch="master") + version("0.37.0", sha256="3f70e3e3b7e4d0f6a679919c0c83e451e129666b021bb529dd02eb915d0666a0") + version("0.36.0", sha256="c5fb24bdaf2ebdeaf614bfb3a8bcc07ee83c2c7251a3893399bb0c189d2d1d01") version("0.35.1", sha256="d39a2749d08ef2ba336ed2d6f77b3bd5f6d1b25292263a41b97943ae7538b7da") version("0.35.0", sha256="1a16fd3dbf03788e4f8dd510bbb668e7a7073ca62be4d9414e2c32e0166e8bda") version("0.34.0", sha256="398c3a1d4450a9f3e146204c22329da9adc3f83a1685ae69187f3b25f47824c0") @@ -32,7 +34,8 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC depends_on("kokkos@:3.7.2", when="@:0.30", type=("run", "build")) depends_on("kokkos@4:4.1", when="@0.31", type=("run", "build")) - depends_on("kokkos@4:4.2", when="@0.32:", type=("run", "build")) + depends_on("kokkos@4:4.2", when="@0.32:0.36", type=("run", "build")) + depends_on("kokkos@4.3:", when="@0.37:", type=("run", "build")) # kokkos backends backends = { @@ -86,7 +89,7 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC # but the introduction of `StatePrep` demands `pennylane>=0.32` depends_on("py-pennylane@0.32:", type=("build", "run"), when="@0.32") depends_on("py-pennylane-lightning~kokkos", type=("build", "run"), when="@:0.31") - for v in range(33, 36): + for v in range(33, 38): depends_on(f"py-pennylane@0.{v}:", type="run", when=f"@0.{v}") depends_on(f"py-pennylane-lightning@0.{v}", type=("build", "run"), when=f"@0.{v}") diff --git a/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py b/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py index fb8d29715c73e8..030125cebd6eb4 100644 --- a/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py @@ -12,13 +12,15 @@ class PyPennylaneLightning(CMakePackage, PythonExtension): homepage = "https://docs.pennylane.ai/projects/lightning" git = "https://github.com/PennyLaneAI/pennylane-lightning.git" - url = "https://github.com/PennyLaneAI/pennylane-lightning/archive/refs/tags/v0.35.1.tar.gz" + url = "https://github.com/PennyLaneAI/pennylane-lightning/archive/refs/tags/v0.37.0.tar.gz" maintainers("mlxd", "AmintorDusko", "vincentmr") license("Apache-2.0") version("master", branch="master") + version("0.37.0", sha256="3f70e3e3b7e4d0f6a679919c0c83e451e129666b021bb529dd02eb915d0666a0") + version("0.36.0", sha256="c5fb24bdaf2ebdeaf614bfb3a8bcc07ee83c2c7251a3893399bb0c189d2d1d01") version("0.35.1", sha256="d39a2749d08ef2ba336ed2d6f77b3bd5f6d1b25292263a41b97943ae7538b7da") version("0.35.0", sha256="1a16fd3dbf03788e4f8dd510bbb668e7a7073ca62be4d9414e2c32e0166e8bda") version("0.34.0", sha256="398c3a1d4450a9f3e146204c22329da9adc3f83a1685ae69187f3b25f47824c0") diff --git a/var/spack/repos/builtin/packages/py-pennylane/package.py b/var/spack/repos/builtin/packages/py-pennylane/package.py index 3bf4b82c8c0ce4..9d8620e322014d 100644 --- a/var/spack/repos/builtin/packages/py-pennylane/package.py +++ b/var/spack/repos/builtin/packages/py-pennylane/package.py @@ -12,13 +12,15 @@ class PyPennylane(PythonPackage): homepage = "https://docs.pennylane.ai/" git = "https://github.com/PennyLaneAI/pennylane.git" - url = "https://github.com/PennyLaneAI/pennylane/archive/refs/tags/v0.35.1.tar.gz" + url = "https://github.com/PennyLaneAI/pennylane/archive/refs/tags/v0.37.0.tar.gz" maintainers("mlxd", "AmintorDusko", "marcodelapierre", "vincentmr") license("Apache-2.0") version("master", branch="master") + version("0.37.0", sha256="3e5eaab9da28ac43099e5850fde0c5763bc4e37271804463fc35dab8b08e2f15") + version("0.36.0", sha256="10ae174b8fd47de12c1174fd5236c26b50ff40e679b658b3446660e063fb64e1") version("0.35.1", sha256="5a234d0605012f3d0201fdcfd2bfe84205a09c8ac42801fe7123eddddec71366") version("0.35.0", sha256="3b99185661e8a0d0f7bc2dcc9cfa51dde20e99708c3c7d858c4732f0eb774716") version("0.34.0", sha256="f76f544212c028a8f882ce7f66639e7f7c4c9213277bde0454c7f3a7d9d46538") @@ -35,27 +37,30 @@ class PyPennylane(PythonPackage): depends_on("py-setuptools", type="build") depends_on("py-setuptools", type=("build", "run"), when="@0.33") - depends_on("py-numpy", type=("build", "run")) depends_on("py-numpy@:1.23", type=("build", "run"), when="@:0.32.0") + depends_on("py-numpy@:1.26", type=("build", "run"), when="@0.33.0:") depends_on("py-scipy", type=("build", "run")) depends_on("py-scipy@:1.10.0", type=("build", "run"), when="@:0.31") depends_on("py-networkx", type=("build", "run")) depends_on("py-rustworkx", type=("build", "run"), when="@0.30.0:") depends_on("py-retworkx", type=("build", "run"), when="@0.28.0:0.29.1") - depends_on("py-autograd@:1.5", type=("build", "run")) + depends_on("py-autograd@:1.5", type=("build", "run"), when="@:0.32.0") + depends_on("py-autograd", type=("build", "run"), when="@0.33.0:") depends_on("py-toml", type=("build", "run")) depends_on("py-appdirs", type=("build", "run")) depends_on("py-semantic-version@2.7:", type=("build", "run")) depends_on("py-autoray@0.3.1:", type=("build", "run"), when="@:0.32.0") depends_on("py-autoray@0.6.1:", type=("build", "run"), when="@0.33.0:") + depends_on("py-autoray@0.6.11:", type=("build", "run"), when="@0.37.0:") depends_on("py-cachetools", type=("build", "run")) depends_on( "py-pennylane-lightning@0.28.0:0.29.0", type=("build", "run"), when="@0.28.0:0.29.1" ) - for v in range(30, 36): + for v in range(30, 38): depends_on(f"py-pennylane-lightning@0.{v}:", type=("build", "run"), when=f"@0.{v}:") depends_on("py-requests", type=("build", "run")) depends_on("py-typing-extensions", type=("build", "run"), when="@0.32.0:") + depends_on("py-packaging", type=("build", "run"), when="@0.37.0:") # The following packages are required by the `pl-device-test binary` depends_on("py-pytest", type="test") diff --git a/var/spack/repos/builtin/packages/py-rustworkx/package.py b/var/spack/repos/builtin/packages/py-rustworkx/package.py index 314e7a153a9d03..0e9c7515fc5031 100644 --- a/var/spack/repos/builtin/packages/py-rustworkx/package.py +++ b/var/spack/repos/builtin/packages/py-rustworkx/package.py @@ -20,7 +20,16 @@ class PyRustworkx(PythonPackage): license("Apache-2.0") + version("0.15.1", sha256="0e0cc86599f979285b2ab9c357276f3272f3fcb3b2df5651a6bf9704c570d4c1") + version("0.15.0", sha256="41a50586c48367c80eebc26809105c0c47db47b1d12a5078efa94d8d1f3850a4") + version("0.14.2", sha256="bd649322c0649b71fa18cc70a9af027b549560415fa860d6894736029c277b13") + version("0.14.1", sha256="62104ecb0b3d4c2cfdb8b45dc38646bd45760c43fabc70ded9112712d01ea1c9") + version("0.14.0", sha256="d630e3dd2984bb3dfa1cc9af5d960c3b970a5c0512551d8340996e9e61e2ca44") + version("0.13.2", sha256="0276cf0b989211859e8797b67d4c16ed6ac9eb32edb67e0a47e70d7d71e80574") + version("0.13.1", sha256="e76c67896030c9edd9823c2937ac6bfa1ce58bae580a8214596b687b6011a487") + version("0.13.0", sha256="9d42059f57a9794c9cbe1c9fc3bca3b72ab00f9d8f24a0efb5ac3829c7f7d6b8") version("0.12.1", sha256="13a19a2f64dff086b3bffffb294c4630100ecbc13634b4995d9d36a481ae130e") + version("0.12.0", sha256="0b871e1463a6677d0fd2fc00adfb774283045d38740bd1b7ea5a1a729de06aa1") depends_on("python@3.7:", type=("build", "run")) depends_on("py-setuptools", type="build") From c1f2b3685487a60ac32a3ef75cc946d3252fbeb0 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Thu, 1 Aug 2024 02:06:05 +0200 Subject: [PATCH 084/435] py-edfio: add v0.4.3 and py-poetry-dynamic-versioning: add v1.4.0, fix url (#45369) --- .../builtin/packages/py-edfio/package.py | 24 +++++++++++++++++++ .../py-poetry-dynamic-versioning/package.py | 11 ++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/py-edfio/package.py diff --git a/var/spack/repos/builtin/packages/py-edfio/package.py b/var/spack/repos/builtin/packages/py-edfio/package.py new file mode 100644 index 00000000000000..6fcf40459ffbef --- /dev/null +++ b/var/spack/repos/builtin/packages/py-edfio/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyEdfio(PythonPackage): + """Read and write EDF/EDF+ files.""" + + homepage = "https://github.com/the-siesta-group/edfio" + pypi = "edfio/edfio-0.4.3.tar.gz" + git = "https://github.com/the-siesta-group/edfio" + + license("Apache-2.0") + + version("0.4.3", sha256="9250e67af190379bb3432356b23c441a99682e97159ea58d4507b0827175b487") + + depends_on("python@3.9:3", type=("build", "run")) + depends_on("py-poetry-core@1:", type="build") + depends_on("py-poetry-dynamic-versioning@1", type="build") + + depends_on("py-numpy@1.22.0:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py b/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py index 1386413016a2e2..c2baa0b5cbf8fb 100644 --- a/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py +++ b/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py @@ -10,10 +10,11 @@ class PyPoetryDynamicVersioning(PythonPackage): """Plugin for Poetry to enable dynamic versioning based on VCS tags.""" homepage = "https://github.com/mtkennerly/poetry-dynamic-versioning" - pypi = "poetry-dynamic-versioning/poetry-dynamic-versioning-0.19.0.tar.gz" + pypi = "poetry_dynamic_versioning/poetry_dynamic_versioning-1.4.0.tar.gz" license("MIT") + version("1.4.0", sha256="725178bd50a22f2dd4035de7f965151e14ecf8f7f19996b9e536f4c5559669a7") version("0.19.0", sha256="a11a7eba6e7be167c55a1dddec78f52b61a1832275c95519ad119c7a89a7f821") depends_on("python@3.7:3", type=("build", "run")) @@ -22,3 +23,11 @@ class PyPoetryDynamicVersioning(PythonPackage): depends_on("py-dunamai@1.12:1", type=("build", "run")) depends_on("py-tomlkit@0.4:", type=("build", "run")) depends_on("py-jinja2@2.11.1:3", type=("build", "run")) + + def url_for_version(self, version): + url = "https://files.pythonhosted.org/packages/source/p/{0}/{0}-{1}.tar.gz" + if version >= Version("1"): + letter = "poetry_dynamic_versioning" + else: + letter = "poetry-dynamic-versioning" + return url.format(letter, version) From b3b9f4d4b75e7036c5c16ce657b83e6aa662db27 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Thu, 1 Aug 2024 02:07:11 +0200 Subject: [PATCH 085/435] py-pybv: new package (#45370) --- .../repos/builtin/packages/py-pybv/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pybv/package.py diff --git a/var/spack/repos/builtin/packages/py-pybv/package.py b/var/spack/repos/builtin/packages/py-pybv/package.py new file mode 100644 index 00000000000000..97caab42ec9be3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pybv/package.py @@ -0,0 +1,23 @@ +# 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 PyPybv(PythonPackage): + """A lightweight I/O utility for the BrainVision data format.""" + + homepage = "https://github.com/bids-standard/pybv" + pypi = "pybv/pybv-0.7.5.tar.gz" + git = "https://github.com/bids-standard/pybv" + + license("BSD-3-Clause") + + version("0.7.5", sha256="57bb09305c1255b11dd5c6a75d0e6b3c81675cf0469d6a757b148ac332ac05d5") + + depends_on("python@3.7:3", type=("build", "run")) + depends_on("py-setuptools@46.4:", type="build") + + depends_on("py-numpy@1.18.1:", type=("build", "run")) From e4ee59741ecbec9570ab32b7d47707c576bea979 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Wed, 31 Jul 2024 17:23:31 -0700 Subject: [PATCH 086/435] grib-util: Add 1.5.0 (#45310) --- var/spack/repos/builtin/packages/grib-util/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/grib-util/package.py b/var/spack/repos/builtin/packages/grib-util/package.py index 17b6cd32cb7bfc..f6deb62ea47110 100644 --- a/var/spack/repos/builtin/packages/grib-util/package.py +++ b/var/spack/repos/builtin/packages/grib-util/package.py @@ -18,6 +18,7 @@ class GribUtil(CMakePackage): maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett") version("develop", branch="develop") + version("1.5.0", tag="v1.5.0", commit="b84e877a62efe6695546a4b7a02e7adb6e1ece25") version("1.4.0", tag="v1.4.0", commit="eeacc9ec93dfe6379f576191883c84a4a1202cc8") version("1.3.0", commit="9d3c68a") version("1.2.4", sha256="f021d6df3186890b0b1781616dabf953581d71db63e7c2913360336985ccaec7") @@ -36,7 +37,8 @@ class GribUtil(CMakePackage): requires("^w3emc precision=4,d", when="^w3emc@2.10:") depends_on("w3nco", when="@:1.2.3") depends_on("g2") - depends_on("g2@3.4.9:", when="@1.4:") + depends_on("g2@3.4.9:", when="@1.4") + depends_on("g2@3.5:", when="@1.5:") depends_on("g2c@1.8: +utils", when="+tests") depends_on("bacio") depends_on("ip") From aa171a6cc9fd0905aaf30314809c5743b3a50456 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Wed, 31 Jul 2024 21:06:00 -0400 Subject: [PATCH 087/435] omegah: Update c/c++ language deps (#45303) Signed-off-by: Cameron Smith --- var/spack/repos/builtin/packages/omega-h/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/omega-h/package.py b/var/spack/repos/builtin/packages/omega-h/package.py index 0209d3565f1f6e..63a1d45ff62516 100644 --- a/var/spack/repos/builtin/packages/omega-h/package.py +++ b/var/spack/repos/builtin/packages/omega-h/package.py @@ -47,8 +47,6 @@ class OmegaH(CMakePackage, CudaPackage): version("9.13.14", sha256="f617dfd024c9cc323e56800ca23df3386bfa37e1b9bd378847d1f5d32d2b8e5d") version("9.13.13", sha256="753702edf4bda9ae57ea21f09ca071e341604a468d8c86468c9aebba049f581c") - depends_on("cxx", type="build") # generated - variant("shared", default=True, description="Build shared libraries") variant("mpi", default=True, description="Activates MPI support") variant("zlib", default=True, description="Activates ZLib support") @@ -61,6 +59,9 @@ class OmegaH(CMakePackage, CudaPackage): variant("gmsh", default=False, description="Use Gmsh C++ API") variant("kokkos", default=False, description="Use Kokkos") + depends_on("cxx", type="build") + depends_on("c", type="build", when="+mpi") + depends_on("gmsh", when="+examples") depends_on("gmsh@4.4.1:", when="+gmsh") depends_on("mpi", when="+mpi") From bd952a552f18a974e21f1dbfc57907cf2199e255 Mon Sep 17 00:00:00 2001 From: Melven Roehrig-Zoellner Date: Wed, 5 Jun 2024 23:05:35 +0200 Subject: [PATCH 088/435] py-anybadge: new package --- .../builtin/packages/py-anybadge/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-anybadge/package.py diff --git a/var/spack/repos/builtin/packages/py-anybadge/package.py b/var/spack/repos/builtin/packages/py-anybadge/package.py new file mode 100644 index 00000000000000..d69572cb422631 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-anybadge/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 PyAnybadge(PythonPackage): + """Python project for generating badges for your projects""" + + homepage = "https://github.com/jongracecox/anybadge" + pypi = "anybadge/anybadge-1.14.0.tar.gz" + + version("1.14.0", sha256="47f06e0a6320d3e5eac55c712dc0bab71b9ed85353c591d448653c5a0740783f") + + depends_on("py-setuptools", type="build") + depends_on("py-packaging", type="run") From d8184b37a3e529142519f2c76793672fcf623e67 Mon Sep 17 00:00:00 2001 From: Melven Roehrig-Zoellner Date: Wed, 5 Jun 2024 23:53:10 +0200 Subject: [PATCH 089/435] py-pylint-gitlab: new package --- .../packages/py-pylint-gitlab/package.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pylint-gitlab/package.py diff --git a/var/spack/repos/builtin/packages/py-pylint-gitlab/package.py b/var/spack/repos/builtin/packages/py-pylint-gitlab/package.py new file mode 100644 index 00000000000000..1af4498832a647 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pylint-gitlab/package.py @@ -0,0 +1,34 @@ +# Copyright 2013-2023 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 PyPylintGitlab(PythonPackage): + """This project provides pylint formatters for a nice integration with GitLab CI.""" + + homepage = "https://gitlab.com/smueller18/pylint-gitlab" + pypi = "pylint-gitlab/pylint-gitlab-2.0.0.tar.gz" + + git = "https://gitlab.com/smueller18/pylint-gitlab.git" + + # Unfortunately, this just installs from git. + # The setup needs the file "Pipfile.lock" which is only + # available in git, not in a tarball. + version("2.0.0", tag="2.0.0") + + depends_on("py-setuptools", type="build") + depends_on("py-pylint", type=("build", "run")) + depends_on("py-jinja2", type=("build", "run")) + depends_on("py-anybadge", type=("build", "run")) + depends_on("py-importlib-metadata", type=("build", "run")) + depends_on("py-typing-extensions", type=("build", "run")) + depends_on("py-wrapt", type=("build", "run")) + depends_on("py-tomli", type=("build", "run")) + depends_on("py-dill", type=("build", "run")) + + def setup_build_environment(self, env): + env.set("CI_COMMIT_TAG", self.spec.version.string) From c5d1c9ae6191c03fd07192d33135069fb26eb222 Mon Sep 17 00:00:00 2001 From: Melven Roehrig-Zoellner Date: Fri, 7 Jun 2024 11:18:19 +0200 Subject: [PATCH 090/435] t8code: fix build with gcc14 --- var/spack/repos/builtin/packages/t8code/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/t8code/package.py b/var/spack/repos/builtin/packages/t8code/package.py index 50cb91b6da83f6..dce76b118d56f7 100644 --- a/var/spack/repos/builtin/packages/t8code/package.py +++ b/var/spack/repos/builtin/packages/t8code/package.py @@ -68,9 +68,14 @@ def configure_args(self): # vtk paths need to be passed to configure command args.append(f"CPPFLAGS=-I{include_dir}") - args.append(f"LDFLAGS=-L{lib_dir}") + if "%gcc@14:" in spec: + args.append(f"LDFLAGS=-L{lib_dir} -lm") + else: + args.append(f"LDFLAGS=-L{lib_dir}") # Chosen vtk version number is needed for t8code to find the right version args.append(f"--with-vtk_version_number={vtk_ver}") + elif "%gcc@14:" in spec: + args.append("LDFLAGS=-lm") if "+petsc" in spec: args.append(f"--with-petsc={spec['petsc'].prefix}") From c1f22ca5cbbd70ed90036d90171ecec6496b4f20 Mon Sep 17 00:00:00 2001 From: Melven Roehrig-Zoellner Date: Thu, 1 Aug 2024 03:44:11 +0200 Subject: [PATCH 091/435] tixi: add python variant (sets PYTHONPATH and LD_LIBRARY_PATH) (#44592) --- .../repos/builtin/packages/tixi/package.py | 43 ++++++++++++++++--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/tixi/package.py b/var/spack/repos/builtin/packages/tixi/package.py index 8540ef640c0cb5..41872d8ca1d54d 100644 --- a/var/spack/repos/builtin/packages/tixi/package.py +++ b/var/spack/repos/builtin/packages/tixi/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + from spack.package import * @@ -14,6 +16,8 @@ class Tixi(CMakePackage): url = "https://github.com/DLR-SC/tixi/archive/v3.0.3.tar.gz" git = "https://github.com/DLR-SC/tixi.git" + maintainers("melven", "joergbrech") + license("Apache-2.0") version("3.3.0", sha256="988d79ccd53c815d382cff0c244c0bb8e393986377dfb45385792766adf6f6a9") @@ -30,17 +34,42 @@ class Tixi(CMakePackage): "shared", default=True, description="Enables the build of shared libraries", when="@3.0.3:" ) variant("fortran", default=True, description="Enable Fortran bindings", when="@3.1.1:") + variant("python", default=True, description="Add python bindings to PYTHONPATH") - depends_on("python", type="build") + depends_on("python", when="~python", type="build") + depends_on("python", when="+python", type=("build", "run")) + conflicts("~shared", when="+python") depends_on("expat") depends_on("curl") depends_on("libxml2") depends_on("libxslt") + @property + def libs(self): + # different library names for tixi@2 and tixi@3 + libname = "libtixi3" if "@3" in self.spec else "libTIXI" + shared = "~shared" not in self.spec + return find_libraries(libname, root=self.prefix, shared=shared, recursive=True) + def cmake_args(self): - args = [] - if self.spec.satisfies("+shared"): - args.append("-DBUILD_SHARED_LIBS=ON") - if self.spec.satisfies("+fortran"): - args.append("-DTIXI_ENABLE_FORTRAN=ON") - return args + return [ + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + self.define_from_variant("TIXI_ENABLE_FORTRAN", "fortran"), + ] + + def setup_run_environment(self, env): + """Allow to import tixi3wrapper in python""" + + if "+python" in self.spec: + # add tixi3wrapper.py to the PYTHONPATH + if "@3" in self.spec: + env.prepend_path("PYTHONPATH", self.spec.prefix.share.tixi3.python) + else: + env.prepend_path("PYTHONPATH", self.spec.prefix.share.tixi.python) + + # allow ctypes to find the tixi library + libs = ":".join(self.spec["tixi"].libs.directories) + if sys.platform == "darwin": + env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", libs) + else: + env.prepend_path("LD_LIBRARY_PATH", libs) From d485650369f3befe1d7e1885f13bf81d6a5d6353 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Wed, 31 Jul 2024 18:47:33 -0700 Subject: [PATCH 092/435] py-build: new package (#45478) Signed-off-by: Teague Sterling --- var/spack/repos/builtin/packages/py-build/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-build/package.py b/var/spack/repos/builtin/packages/py-build/package.py index 6d67ad3c077888..85a738316ce7a5 100644 --- a/var/spack/repos/builtin/packages/py-build/package.py +++ b/var/spack/repos/builtin/packages/py-build/package.py @@ -14,6 +14,9 @@ class PyBuild(PythonPackage): license("MIT") + version("1.2.1", sha256="526263f4870c26f26c433545579475377b2b7588b6f1eac76a001e873ae3e19d") + version("1.1.1", sha256="8eea65bb45b1aac2e734ba2cc8dad3a6d97d97901a395bd0ed3e7b46953d2a31") + version("1.1.0", sha256="f8da3eebb19668bb338b6eb256b1896ef4e87a5398bbdda97ee29ec474569f16") version("1.0.3", sha256="538aab1b64f9828977f84bc63ae570b060a8ed1be419e7870b8b4fc5e6ea553b") version("1.0.0", sha256="49a60f212df4d9925727c2118e1cbe3abf30b393eff7d0e7287d2170eb36844d") version("0.10.0", sha256="d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269") From e77fbfe8f834187c4983a46bf3f7d4d85a875fd2 Mon Sep 17 00:00:00 2001 From: Christopher Christofi <77968333+ChristopherChristofi@users.noreply.github.com> Date: Thu, 1 Aug 2024 02:50:48 +0100 Subject: [PATCH 093/435] py-jaxtyping: new package (#45482) --- .../builtin/packages/py-jaxtyping/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-jaxtyping/package.py diff --git a/var/spack/repos/builtin/packages/py-jaxtyping/package.py b/var/spack/repos/builtin/packages/py-jaxtyping/package.py new file mode 100644 index 00000000000000..fb703a3eaa0315 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jaxtyping/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyJaxtyping(PythonPackage): + """Type annotations and runtime checking for shape and dtype of JAX arrays, and PyTrees.""" + + homepage = "https://docs.kidger.site/jaxtyping/" + pypi = "jaxtyping/jaxtyping-0.2.33.tar.gz" + + license("Apache-2.0") + + version("0.2.33", sha256="9a9cfccae4fe05114b9fb27a5ea5440be4971a5a075bbd0526f6dd7d2730f83e") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-typeguard@2.13.3", type=("build", "run")) From ea0da49acb84e4483de4b946c6775f2a4c8a5427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lacroix?= Date: Thu, 1 Aug 2024 03:59:00 +0200 Subject: [PATCH 094/435] OpenFOAM-org: Add missing dependency on readline for @:9 (#44482) The setSet tool (removed in version 10) has an optional dependency on readline. The build script will use the system readline if not provided by Spack. --- var/spack/repos/builtin/packages/openfoam-org/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py index 78140182e7859b..ad9c89deadf570 100644 --- a/var/spack/repos/builtin/packages/openfoam-org/package.py +++ b/var/spack/repos/builtin/packages/openfoam-org/package.py @@ -106,6 +106,8 @@ class OpenfoamOrg(Package): depends_on("zlib-api") depends_on("flex") depends_on("cmake", type="build") + # The setSet tool (removed in version 10) depends on readline + depends_on("readline", when="@:9") # Require scotch with ptscotch - corresponds to standard OpenFOAM setup depends_on("scotch~metis+mpi~int64", when="+scotch~int64") From 84ad509621f9de734ac148b75025b61dbba057a5 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 31 Jul 2024 21:17:56 -0500 Subject: [PATCH 095/435] py-onnxruntime: add v1.17.3 (#44500) --- var/spack/repos/builtin/packages/py-onnxruntime/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-onnxruntime/package.py b/var/spack/repos/builtin/packages/py-onnxruntime/package.py index aa633a4a393613..14d1f54715ddd8 100644 --- a/var/spack/repos/builtin/packages/py-onnxruntime/package.py +++ b/var/spack/repos/builtin/packages/py-onnxruntime/package.py @@ -22,6 +22,7 @@ class PyOnnxruntime(CMakePackage, PythonExtension): license("MIT") + version("1.17.3", tag="v1.17.3", commit="56b660f36940a919295e6f1e18ad3a9a93a10bf7") version("1.17.1", tag="v1.17.1", commit="8f5c79cb63f09ef1302e85081093a3fe4da1bc7d") version("1.10.0", tag="v1.10.0", commit="0d9030e79888d1d5828730b254fedc53c7b640c1") version("1.7.2", tag="v1.7.2", commit="5bc92dff16b0ddd5063b717fb8522ca2ad023cb0") @@ -58,7 +59,7 @@ class PyOnnxruntime(CMakePackage, PythonExtension): depends_on("protobuf@:3.19", when="@:1.11") depends_on("py-cerberus", type=("build", "run")) depends_on("py-onnx", type=("build", "run")) - depends_on("py-onnx@:1.15.0", type=("build", "run"), when="@:1.17.1") + depends_on("py-onnx@:1.15.0", type=("build", "run"), when="@:1.17") depends_on("zlib-api") depends_on("libpng") depends_on("cuda", when="+cuda") From 5f86ee5d9390c0b6ef8150fde970a2b87c728d2a Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Wed, 31 Jul 2024 20:18:46 -0700 Subject: [PATCH 096/435] scala: add v2.12.13 -> v2.12.19, v2.13.10, 2.13.14 (#45477) Signed-off-by: Teague Sterling --- var/spack/repos/builtin/packages/scala/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/scala/package.py b/var/spack/repos/builtin/packages/scala/package.py index 4bb3cce92e117c..c3457c20a7beb7 100644 --- a/var/spack/repos/builtin/packages/scala/package.py +++ b/var/spack/repos/builtin/packages/scala/package.py @@ -19,7 +19,12 @@ class Scala(Package): license("Apache-2.0") + version("2.13.14", sha256="5af0637545f674686697f1ac7c9046bda6db638b07e23d6cf8932fc56bdb84c1") + version("2.13.10", sha256="b01461599cd0786042c64b533790f45e51babb91c52dc465d846838e97019cc4") version("2.13.1", sha256="6918ccc494e34810a7254ad2c4e6f0e1183784c22e7b4801b7dbc8d1994a04db") + version("2.12.19", sha256="d1876659c9298b6664f91aa7ef4b2c5baca6356ff47a9a598070045058968fb2") + version("2.12.16", sha256="2be383c1140e5e8dc84707fae81734f42b666766f91e55bbb04e444af8f3467f") + version("2.12.13", sha256="8c5dd265a5daa3e7791517a2266a82eb707179954ae1889b9a53477aba46a49c") version("2.12.10", sha256="3b12bda3300fedd91f64fc7f9165fd45c58328b1b760af24ca6ffe92e3b0656a") version("2.12.6", sha256="1ac7444c5a85ed1ea45db4a268ee9ea43adf80e7f5724222863afb5492883416") version("2.12.5", sha256="b261ffe9a495b12e9dda2ed37331e579547e4d1b8b5810161b6c3b39ac806aa1") From 20e6b60fce2c21962148a158a5db8164183334c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabolcs=20Horv=C3=A1t?= Date: Thu, 1 Aug 2024 06:34:20 +0300 Subject: [PATCH 097/435] py-igraph: add 0.11.6 (#45132) --- var/spack/repos/builtin/packages/py-igraph/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-igraph/package.py b/var/spack/repos/builtin/packages/py-igraph/package.py index 5468e008c5d89b..36708d10ee9264 100644 --- a/var/spack/repos/builtin/packages/py-igraph/package.py +++ b/var/spack/repos/builtin/packages/py-igraph/package.py @@ -15,6 +15,7 @@ class PyIgraph(PythonPackage): license("GPL-2.0-or-later") + version("0.11.6", sha256="837f233256c3319f2a35a6a80d94eafe47b43791ef4c6f9e9871061341ac8e28") version("0.10.6", sha256="76f7aad294514412f835366a7d9a9c1e7a34c3e6ef0a6c3a1a835234323228e8") depends_on("c", type="build") # generated @@ -25,10 +26,11 @@ class PyIgraph(PythonPackage): depends_on("cmake", type="build") depends_on("igraph+shared@0.10.6", when="@0.10.6") + depends_on("igraph+shared@0.10.13", when="@0.11.6") depends_on("pkgconfig", type="build") depends_on("py-setuptools", type="build") depends_on("py-texttable@1.6.2:", type=("build", "run")) - depends_on("py-matplotlib@3.5", type="run", when="+matplotlib") + depends_on("py-matplotlib@3.5:", type="run", when="+matplotlib") def setup_build_environment(self, env): env.set("IGRAPH_USE_PKG_CONFIG", "1") From 9f04c45dea8d13e6796d603937edcb62c3264d68 Mon Sep 17 00:00:00 2001 From: Claudia Comito <39374113+ClaudiaComito@users.noreply.github.com> Date: Thu, 1 Aug 2024 05:38:30 +0200 Subject: [PATCH 098/435] py-heat: add v1.4.2 (#45317) --- var/spack/repos/builtin/packages/py-heat/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-heat/package.py b/var/spack/repos/builtin/packages/py-heat/package.py index f14a4c02099177..babfb05e9dc854 100644 --- a/var/spack/repos/builtin/packages/py-heat/package.py +++ b/var/spack/repos/builtin/packages/py-heat/package.py @@ -18,6 +18,7 @@ class PyHeat(PythonPackage): license("MIT") + version("1.4.2", sha256="d6714428a9c5204c1c44a2b246f228effaddc688f812277f229f4acdbcfeb7c5") version("1.4.1", sha256="ecd871717c372a6983f643c0178dda44bc017d6b32b9258dbf3775af95f580ce") version("1.4.0", sha256="6836fa10f9ce62ea61cf1bdc3283d7ad0c305836cc5a08c4edfd30695708e788") version("1.3.1", sha256="8997ddc56a1d3078b44a1e2933adc0a7fbf678bd19bade3ae015bc0e13d40d3b") @@ -50,7 +51,7 @@ class PyHeat(PythonPackage): depends_on("python@3.8:3.11", type=("build", "run")) depends_on("py-mpi4py@3:", type=("build", "run")) depends_on("py-numpy@1.22:1", type=("build", "run")) - depends_on("py-torch@1.11:2.2.2", type=("build", "run")) + depends_on("py-torch@1.11:2.3.2", type=("build", "run")) depends_on("py-scipy@1.10:", type=("build", "run")) depends_on("pil@6:", type=("build", "run")) depends_on("py-torchvision@0.12:", type=("build", "run")) From b86e42a5aa3bc838ded0604fd70e3392768f632d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 1 Aug 2024 08:40:29 +0200 Subject: [PATCH 099/435] py-sphinx: add v8.0 (#45520) --- .../repos/builtin/packages/py-sphinx/package.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py index 450f56fa2221fa..d1a65ac9dade5b 100644 --- a/var/spack/repos/builtin/packages/py-sphinx/package.py +++ b/var/spack/repos/builtin/packages/py-sphinx/package.py @@ -16,6 +16,12 @@ class PySphinx(PythonPackage): license("BSD-2-Clause") + version("8.0.2", sha256="0cce1ddcc4fd3532cf1dd283bc7d886758362c5c1de6598696579ce96d8ffa5b") + version("8.0.1", sha256="7f762c18cfc1d4493e42f4a06a204c1ca55806c53f80a059e208e88d0668d661") + version("8.0.0", sha256="22551dc8fda6038a422bf1de59d91b31837b66afe45a3f30b2d8cc5aa9337343") + + version("7.4.7", sha256="242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe") + version("7.4.6", sha256="116918d455c493fff3178edea12b4fe1c1e4894680fd81e7b7431ea21d47ca52") version("7.4.5", sha256="a4abe5385bf856df094c1e6cadf24a2351b12057be3670b99a12c05a01d209f5") version("7.4.4", sha256="43c911f997a4530b6cffd4ff8d5516591f6c60d178591f4406f0dd02282e3f64") version("7.4.3", sha256="bd846bcb09fd2b6e94ce3e1ad50f4618bccf03cc7c17d0f3fa87393c0bd9178b") @@ -98,6 +104,7 @@ class PySphinx(PythonPackage): depends_on("py-flit-core@3.7:", when="@5.2:", type="build") with default_args(type=("build", "run")): + depends_on("python@3.10:", when="@8:") depends_on("python@3.9:", when="@7.2:") depends_on("python@3.8:", when="@6:") depends_on("py-sphinxcontrib-applehelp", when="@2:") @@ -144,9 +151,6 @@ class PySphinx(PythonPackage): depends_on("py-packaging@23:", when="@7.4:") depends_on("py-packaging@21:", when="@5.2:") depends_on("py-packaging", when="@1.7:") - depends_on("py-importlib-metadata@6:", when="@7.4: ^python@:3.9") - depends_on("py-importlib-metadata@4.8:", when="@5.2: ^python@:3.9") - depends_on("py-importlib-metadata@4.4:", when="@4.4: ^python@:3.9") depends_on("py-tomli@2:", when="@7.3.1: ^python@:3.10") depends_on("py-colorama@0.4.6:", when="@7.4: platform=windows") depends_on("py-colorama@0.4.5:", when="@5.2: platform=windows") @@ -156,6 +160,9 @@ class PySphinx(PythonPackage): depends_on("py-setuptools", when="@4.4:5.1", type="build") with default_args(type=("build", "run")): + depends_on("py-importlib-metadata@6:", when="@7.4: ^python@:3.9") + depends_on("py-importlib-metadata@4.8:", when="@5.2: ^python@:3.9") + depends_on("py-importlib-metadata@4.4:", when="@4.4: ^python@:3.9") depends_on("py-setuptools", when="@:4.3") depends_on("py-sphinxcontrib-websupport", when="@1.6:1") depends_on("py-six@1.5:", when="@:1") From 475fe9977a8eb4716e86f131c7d954b0904f31ca Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:53:41 +0200 Subject: [PATCH 100/435] py-rsatoolbox: add v0.1.5 (#45484) --- .../builtin/packages/py-rsatoolbox/package.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-rsatoolbox/package.py b/var/spack/repos/builtin/packages/py-rsatoolbox/package.py index 9c84fb749f05fc..ce3c54c7d0edff 100644 --- a/var/spack/repos/builtin/packages/py-rsatoolbox/package.py +++ b/var/spack/repos/builtin/packages/py-rsatoolbox/package.py @@ -16,21 +16,23 @@ class PyRsatoolbox(PythonPackage): license("MIT") version("main", branch="main") + version("0.1.5", sha256="439839fb20e2efa0c7c975ad305df8995a509ed3426ad0384ebfff20663fd58b") version("0.1.2", sha256="2d091cbaa33373bf9da4df5ca8d127f0e427431a3db726076090ab2d54fe1213") version("0.1.0", sha256="245f909d31909ba896b765fa51ea019510dd690c6bb8d04b178a9c76ec36dce9") version("0.0.5", sha256="7ede9309755a6173c26f08fd36fa436a11993c7ae0fa9fce05f38be7af0dc6eb") version("0.0.4", sha256="84153fa4c686c95f3e83f2cb668b97b82b53dc2a565856db80aa5f8c96d09359") version("0.0.3", sha256="9bf6e16d9feadc081f9daaaaab7ef38fc1cd64dd8ef0ccd9f74adb5fe6166649") - depends_on("python@:3.10", when="@:0.1.2", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@0.1.5:") + depends_on("python@:3.10", type=("build", "run"), when="@:0.1.2") - # version restriction from pyproject.toml cannot be concretized at the - # moment but package also builds with older versions + depends_on("py-setuptools@68:", type="build", when="@0.1.5:") depends_on("py-setuptools", type="build") - depends_on("py-setuptools-scm+toml@7.0", when="@0.0.5:", type="build") - # version restriction: same as for py-setuptools - depends_on("py-cython", when="@0.0.5:", type="build") - depends_on("py-twine@4.0.1:4.0", when="@0.0.5:", type="build") + depends_on("py-setuptools-scm+toml@8.0:", type="build", when="@0.1.5:") + depends_on("py-setuptools-scm+toml@7.0", type="build", when="@0.0.5:0.1.4") + depends_on("py-cython@3", type="build", when="@0.0.5:") + depends_on("py-twine@4.0.1:", type="build", when="@0.1.5:") + depends_on("py-twine@4.0.1:4.0", type="build", when="@0.0.5:0.1.4") depends_on("py-numpy@1.21.2:", type=("build", "run")) depends_on("py-scipy", type=("build", "run")) @@ -41,10 +43,11 @@ class PyRsatoolbox(PythonPackage): depends_on("py-h5py", type=("build", "run")) depends_on("py-tqdm", type=("build", "run")) depends_on("py-joblib", type=("build", "run")) + depends_on("py-importlib-resources@5.12:", type=("build", "run"), when="^python@:3.8") # old dependcies - depends_on("py-coverage", when="@:0.1.1", type=("build", "run")) - depends_on("py-petname@2.2", when="@0.0.4", type=("build", "run")) + depends_on("py-coverage", type=("build", "run"), when="@:0.1.1") + depends_on("py-petname@2.2", type=("build", "run"), when="@0.0.4") @when("@:0.0.3") def patch(self): From dd460a0eb0e5a89e1a8e6e617d5c29fc76e9da32 Mon Sep 17 00:00:00 2001 From: rfbgo <109985755+rfbgo@users.noreply.github.com> Date: Thu, 1 Aug 2024 03:47:45 -0600 Subject: [PATCH 101/435] py-torch-nvidia-apex: add v22.03 -> v24.04.01 (#45176) --- .../repos/builtin/packages/py-torch-nvidia-apex/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py b/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py index 385fc7d0c4f7af..d1591b578c09df 100644 --- a/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py +++ b/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py @@ -17,6 +17,12 @@ class PyTorchNvidiaApex(PythonPackage, CudaPackage): license("BSD-3-Clause") version("master", branch="master") + version("24.04.01", tag="24.04.01") + version("23.08", tag="23.08") + version("23.07", tag="23.07") + version("23.06", tag="23.06") + version("23.05", tag="23.05") + version("22.03", tag="22.03") version("2020-10-19", commit="8a1ed9e8d35dfad26fb973996319965e4224dcdd") depends_on("cxx", type="build") # generated From 64a69796e20393cbba43298cdca0ee0b18fc4d22 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Thu, 1 Aug 2024 17:56:04 +0200 Subject: [PATCH 102/435] lcio: add v2.22.1 (#45517) * lcio: add latest version 2.22.1 * lcio: update sio dependency to match actual requirements --- var/spack/repos/builtin/packages/lcio/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/lcio/package.py b/var/spack/repos/builtin/packages/lcio/package.py index 6aca54b81dd21c..cd6b34540e1bbd 100644 --- a/var/spack/repos/builtin/packages/lcio/package.py +++ b/var/spack/repos/builtin/packages/lcio/package.py @@ -21,6 +21,7 @@ class Lcio(CMakePackage): license("BSD-3-Clause") version("master", branch="master") + version("2.22.1", sha256="4bc3d2c83af7b1c65d6736dd14ee82f41af7ce9bfc7cfe779c5f47417e8dc326") version("2.22", sha256="95676977a0427f5ecc857e8504b13f332c2c2e5769dc00f6beecff3c73dab395") version("2.21", sha256="a9f0a9922ab2ef17c6f1b8f7187bfc341f27567745a43c0480c103b617dfcea6") version("2.20.2", sha256="b37cee344c28ccddc590e5317721b375ef19f4392ae067bc86583107acaf2374") @@ -66,6 +67,7 @@ class Lcio(CMakePackage): depends_on("sio@0.0.2:", when="@2.14:") depends_on("sio@0.1:", when="@2.16:") + depends_on("sio@0.2:", when="@2.21:") depends_on("root@6.04:", when="+rootdict") depends_on("root@6.04: cxxstd=11", when="+rootdict cxxstd=11") From bce710eec1e130934cc4004714137159fef0032f Mon Sep 17 00:00:00 2001 From: Christopher Christofi <77968333+ChristopherChristofi@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:09:00 +0100 Subject: [PATCH 103/435] py-flax: add v0.8.5 (#45480) --- var/spack/repos/builtin/packages/py-flax/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-flax/package.py b/var/spack/repos/builtin/packages/py-flax/package.py index f1bbc9678edb11..108ddfcc654b4b 100644 --- a/var/spack/repos/builtin/packages/py-flax/package.py +++ b/var/spack/repos/builtin/packages/py-flax/package.py @@ -14,6 +14,7 @@ class PyFlax(PythonPackage): license("Apache-2.0") + version("0.8.5", sha256="4a9cb7950ece54b0addaa73d77eba24e46138dbe783d01987be79d20ccb2b09b") version("0.8.1", sha256="ce3d99e9b4c0d2e4d9fc28bc56cced8ba953adfd695aabd24f096b4c8a7e2f92") version("0.7.3", sha256="e9dbc7eb6c80d31277f97b626c07978d2a84f1bb635cf05957a02a3a496493e6") @@ -23,8 +24,11 @@ class PyFlax(PythonPackage): with default_args(type=("build", "run")): depends_on("python@3.9:", when="@0.8:") + depends_on("py-numpy@1.26.0:", when="@0.8: ^python@3.12:") + depends_on("py-numpy@1.23.2:", when="@0.8: ^python@3.11:") depends_on("py-numpy@1.22:", when="@0.8:") depends_on("py-numpy@1.12:") + depends_on("py-jax@0.4.27:", when="@0.8.5:") depends_on("py-jax@0.4.19:", when="@0.8:") depends_on("py-jax@0.4.2:") depends_on("py-msgpack") From 2dbbcf3ca5dc5a6413c6733846c22a9860910174 Mon Sep 17 00:00:00 2001 From: Stephen Hudson Date: Thu, 1 Aug 2024 11:39:10 -0500 Subject: [PATCH 104/435] py-libensemble: add v1.4.0, v1.4.1 (#45463) * libEnsemble: add v1.4.0 * libEnsemble: add v1.4.1 --- var/spack/repos/builtin/packages/py-libensemble/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-libensemble/package.py b/var/spack/repos/builtin/packages/py-libensemble/package.py index 2d5994001dc254..5f16432252fb5a 100644 --- a/var/spack/repos/builtin/packages/py-libensemble/package.py +++ b/var/spack/repos/builtin/packages/py-libensemble/package.py @@ -12,7 +12,7 @@ class PyLibensemble(PythonPackage): """Library for managing ensemble-like collections of computations.""" homepage = "https://libensemble.readthedocs.io" - pypi = "libensemble/libensemble-1.3.0.tar.gz" + pypi = "libensemble/libensemble-1.4.1.tar.gz" git = "https://github.com/Libensemble/libensemble.git" maintainers("shuds13", "jlnav") @@ -21,6 +21,8 @@ class PyLibensemble(PythonPackage): license("BSD-3-Clause") version("develop", branch="develop") + version("1.4.1", sha256="fd39d5c4010f9cb1728af1666d0f10d0da7dd43c12e411badcbc53aab42ab183") + version("1.4.0", sha256="0d9f76175dcd5ca7a5e0076a8e64ea59b504055779100d259114468630e82fa2") version("1.3.0", sha256="4a2f47de9ab57c577f3de5dd849ec1b621effde7206a54b2aa29aaf309c87532") version("1.2.2", sha256="936e34ed4e8129a9980187b21d586472b6362403889a739595d6b631335a8678") version("1.2.1", sha256="b80e77548a1e2a71483352b3b00e22b47191e45ca5741324c2b0f20b05579a3d") From e669fcafd090448ca56322772ed47082e8cd0a50 Mon Sep 17 00:00:00 2001 From: James Taliaferro <44253038+taliaferro@users.noreply.github.com> Date: Thu, 1 Aug 2024 09:40:28 -0700 Subject: [PATCH 105/435] kakoune: add v2024.05.18 (#45460) * update Kakoune, explicitly make install dirs first * blacken --- var/spack/repos/builtin/packages/kakoune/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/kakoune/package.py b/var/spack/repos/builtin/packages/kakoune/package.py index b9aa23e04c8496..a55761fcb6470d 100644 --- a/var/spack/repos/builtin/packages/kakoune/package.py +++ b/var/spack/repos/builtin/packages/kakoune/package.py @@ -18,6 +18,9 @@ class Kakoune(MakefilePackage): license("Unlicense") + version( + "2024.05.18", sha256="dae8ac2e61d21d9bcd10145aa70b421234309a7b0bc57fad91bc34dbae0cb9fa" + ) version( "2024.05.09", sha256="2190bddfd3af590c0593c38537088976547506f47bd6eb6c0e22350dbd16a229" ) @@ -40,4 +43,4 @@ class Kakoune(MakefilePackage): @property def install_targets(self): - return ["-e", f"PREFIX={prefix}", "install"] + return ["-e", f"PREFIX={prefix}", "installdirs", "install"] From 453e8c71ac08145c0b0b143c7db9a25cd2481783 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Thu, 1 Aug 2024 10:33:13 -0700 Subject: [PATCH 106/435] ip: add v5.1.0 (#45331) * ip: add v5.1.0 * [@spackbot] updating style on behalf of AlexanderRichert-NOAA * Update package.py * Update package.py --- var/spack/repos/builtin/packages/ip/package.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/ip/package.py b/var/spack/repos/builtin/packages/ip/package.py index 8e309ae3a7316d..5a55f37b81fedc 100644 --- a/var/spack/repos/builtin/packages/ip/package.py +++ b/var/spack/repos/builtin/packages/ip/package.py @@ -18,6 +18,7 @@ class Ip(CMakePackage): maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA") version("develop", branch="develop") + version("5.1.0", sha256="5279f11f4c12db68ece74cec392b7a2a6b5166bc505877289f34cc3149779619") version("5.0.0", sha256="54b2987bd4f94adc1f7595d2a384e646019c22d163bcd30840a916a6abd7df71") version("4.4.0", sha256="858d9201ce0bc4d16b83581ef94a4a0262f498ed1ea1b0535de2e575da7a8b8c") version("4.3.0", sha256="799308a868dea889d2527d96a0405af7b376869581410fe4cff681205e9212b4") @@ -32,8 +33,8 @@ class Ip(CMakePackage): preferred=True, ) - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("openmp", description="Enable OpenMP threading", default=True) variant("pic", default=True, description="Build with position-independent-code") @@ -68,6 +69,7 @@ class Ip(CMakePackage): depends_on("sp precision=4", when="@4.1:4 precision=4") depends_on("sp precision=d", when="@4.1:4 precision=d") depends_on("sp precision=8", when="@4.1:4 precision=8") + depends_on("lapack", when="@5.1:") def cmake_args(self): args = [ @@ -91,6 +93,16 @@ def cmake_args(self): if self.spec.satisfies("@5:"): args.append(self.define_from_variant("BUILD_DEPRECATED", "deprecated")) + if self.spec.satisfies("@5.1:"): + # Use the LAPACK provider set by Spack even if the compiler supports native BLAS + bla_vendors = {"openblas": "OpenBLAS"} + lapack_provider = self.spec["lapack"].name + if lapack_provider in bla_vendors.keys(): + bla_vendor = bla_vendors[lapack_provider] + else: + bla_vendor = "All" + args.append(self.define("BLA_VENDOR", bla_vendor)) + return args def setup_run_environment(self, env): From 37e56ea24d9bd2710ccd2d0eda23cbd15c85853e Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Thu, 1 Aug 2024 10:52:20 -0700 Subject: [PATCH 107/435] py-pyrsistent: add v0.14.0 (#45387) * py-pyrsistent: add v0.1.4.0 & conflict Signed-off-by: Teague Sterling * Update package.py --------- Signed-off-by: Teague Sterling --- var/spack/repos/builtin/packages/py-pyrsistent/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-pyrsistent/package.py b/var/spack/repos/builtin/packages/py-pyrsistent/package.py index fc85e14944bb8b..f305f5f5dab063 100644 --- a/var/spack/repos/builtin/packages/py-pyrsistent/package.py +++ b/var/spack/repos/builtin/packages/py-pyrsistent/package.py @@ -21,6 +21,7 @@ class PyPyrsistent(PythonPackage): version("0.18.0", sha256="773c781216f8c2900b42a7b638d5b517bb134ae1acbebe4d1e8f1f41ea60eb4b") version("0.16.0", sha256="28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3") version("0.15.7", sha256="cdc7b5e3ed77bed61270a47d35434a30617b9becdf2478af76ad2c6ade307280") + version("0.14.0", sha256="297714c609506494650eea704d70cbe1b156259a578a98b97864ab9a8cbad39f") depends_on("c", type="build") # generated @@ -28,3 +29,5 @@ class PyPyrsistent(PythonPackage): depends_on("py-setuptools@42:", when="@0.18.0:", type="build") depends_on("py-setuptools", type="build") depends_on("py-six", when="@:0.17", type=("build", "run")) + + conflicts("python@3.10:", when="@0.14") From bfba3c9d5c71a8bb03658ff44782e82f16d34e4e Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Thu, 1 Aug 2024 11:04:37 -0700 Subject: [PATCH 108/435] py-attrs: add v17.4.0 (#45385) Signed-off-by: Teague Sterling --- var/spack/repos/builtin/packages/py-attrs/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-attrs/package.py b/var/spack/repos/builtin/packages/py-attrs/package.py index 60530d5c58e5e1..ade9b43b635263 100644 --- a/var/spack/repos/builtin/packages/py-attrs/package.py +++ b/var/spack/repos/builtin/packages/py-attrs/package.py @@ -27,6 +27,7 @@ class PyAttrs(PythonPackage): version("19.2.0", sha256="f913492e1663d3c36f502e5e9ba6cd13cf19d7fab50aa13239e420fef95e1396") version("19.1.0", sha256="f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399") version("18.1.0", sha256="e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b") + version("17.4.0", sha256="1c7960ccfd6a005cd9f7ba884e6316b5e430a3f1a6c37c5f87d8b43f83b54ec9") version("16.3.0", sha256="80203177723e36f3bbe15aa8553da6e80d47bfe53647220ccaa9ad7a5e473ccc") depends_on("py-hatchling", when="@23.1:", type="build") From ffcb4ee4878bb4f76a9c754f952c56fb6635c77d Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:27:17 -0400 Subject: [PATCH 109/435] Windows msvsc: Report accurate platform toolset version for VS2022 (#45525) VC toolset versions 144 and 143 are both associated with the platform toolset 143; this deviates from prior version choices made by the MSVC devs; add a special case to report platform toolset version as 143 when VC toolset version is >= 143 (this will need revisiting for later releases). --- lib/spack/spack/compilers/msvc.py | 45 ++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/compilers/msvc.py b/lib/spack/spack/compilers/msvc.py index 9914e5242a624e..f6e86f831a875c 100644 --- a/lib/spack/spack/compilers/msvc.py +++ b/lib/spack/spack/compilers/msvc.py @@ -231,24 +231,55 @@ def msvc_version(self): @property def short_msvc_version(self): + """This is the shorthand VCToolset version of form + MSVC """ - This is the shorthand VCToolset version of form - MSVC *NOT* the full version, for that see + return "MSVC" + self.vc_toolset_ver + + @property + def vc_toolset_ver(self): + """ + The toolset version is the version of the combined set of cl and link + This typically relates directly to VS version i.e. VS 2022 is v143 + VS 19 is v142, etc. + This value is defined by the first three digits of the major + minor + version of the VS toolset (143 for 14.3x.bbbbb). Traditionally the + minor version has remained a static two digit number for a VS release + series, however, as of VS22, this is no longer true, both + 14.4x.bbbbb and 14.3x.bbbbb are considered valid VS22 VC toolset + versions due to a change in toolset minor version sentiment. + + This is *NOT* the full version, for that see Msvc.msvc_version or MSVC.platform_toolset_ver for the raw platform toolset version + """ - ver = self.platform_toolset_ver - return "MSVC" + ver + ver = self.msvc_version[:2].joined.string[:3] + return ver @property def platform_toolset_ver(self): """ This is the platform toolset version of current MSVC compiler - i.e. 142. + i.e. 142. The platform toolset is the targeted MSVC library/compiler + versions by compilation (this is different from the VC Toolset) + + This is different from the VC toolset version as established - by `short_msvc_version` + by `short_msvc_version`, but typically are represented by the same + three digit value """ - return self.msvc_version[:2].joined.string[:3] + # Typically VS toolset version and platform toolset versions match + # VS22 introduces the first divergence of VS toolset version + # (144 for "recent" releases) and platform toolset version (143) + # so it needs additional handling until MS releases v144 + # (assuming v144 is also for VS22) + # or adds better support for detection + # TODO: (johnwparent) Update this logic for the next platform toolset + # or VC toolset version update + toolset_ver = self.vc_toolset_ver + vs22_toolset = Version(toolset_ver) > Version("142") + return toolset_ver if not vs22_toolset else "143" def _compiler_version(self, compiler): """Returns version object for given compiler""" From de98e3d6e58000b1e75b8f0bf6f0f1d485d0c490 Mon Sep 17 00:00:00 2001 From: "Auriane R." <48684432+aurianer@users.noreply.github.com> Date: Fri, 2 Aug 2024 01:21:37 +0200 Subject: [PATCH 110/435] Update if ... in spec with satisfies in a* dirs (#44822) --- .../repos/builtin/packages/abacus/package.py | 2 +- .../repos/builtin/packages/abinit/package.py | 38 ++++++++-------- .../repos/builtin/packages/accfft/package.py | 2 +- .../repos/builtin/packages/acts/package.py | 2 +- .../repos/builtin/packages/adios/package.py | 4 +- .../repos/builtin/packages/adios2/package.py | 20 ++++----- .../repos/builtin/packages/adol-c/package.py | 14 +++--- .../repos/builtin/packages/alpaka/package.py | 24 +++++----- .../repos/builtin/packages/amdfftw/package.py | 10 ++--- .../repos/builtin/packages/amg2013/package.py | 6 +-- .../repos/builtin/packages/amgx/package.py | 6 +-- .../repos/builtin/packages/amp/package.py | 6 +-- .../repos/builtin/packages/amrex/package.py | 12 ++--- .../repos/builtin/packages/amrvis/package.py | 2 +- .../repos/builtin/packages/ams/package.py | 18 ++++---- .../repos/builtin/packages/aocc/package.py | 2 +- .../packages/aocl-compression/package.py | 16 +++---- .../builtin/packages/aocl-sparse/package.py | 2 +- .../repos/builtin/packages/apcomp/package.py | 10 ++--- .../repos/builtin/packages/apex/package.py | 18 ++++---- .../builtin/packages/apr-util/package.py | 10 ++--- .../repos/builtin/packages/arbor/package.py | 2 +- .../repos/builtin/packages/arborx/package.py | 6 +-- .../builtin/packages/argobots/package.py | 12 ++--- .../builtin/packages/arpack-ng/package.py | 4 +- .../builtin/packages/arrayfire/package.py | 2 +- .../repos/builtin/packages/ascent/package.py | 44 +++++++++---------- .../repos/builtin/packages/athena/package.py | 36 +++++++-------- .../repos/builtin/packages/atlas/package.py | 6 +-- .../builtin/packages/augustus/package.py | 16 +++---- .../builtin/packages/autoconf/package.py | 4 +- .../repos/builtin/packages/autogen/package.py | 2 +- .../builtin/packages/automake/package.py | 4 +- .../repos/builtin/packages/axom/package.py | 26 +++++------ 34 files changed, 194 insertions(+), 194 deletions(-) diff --git a/var/spack/repos/builtin/packages/abacus/package.py b/var/spack/repos/builtin/packages/abacus/package.py index 7ba2ee206ab2c0..c44cfb0676d9a7 100644 --- a/var/spack/repos/builtin/packages/abacus/package.py +++ b/var/spack/repos/builtin/packages/abacus/package.py @@ -46,7 +46,7 @@ class Abacus(MakefilePackage): build_directory = "source" def edit(self, spec, prefix): - if "+openmp" in spec: + if spec.satisfies("+openmp"): inc_var = "_openmp-" system_var = "ELPA_LIB = -L${ELPA_LIB_DIR} -lelpa_openmp -Wl, -rpath=${ELPA_LIB_DIR}" else: diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 67abe078f6d280..4f8238ed1beff4 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -146,12 +146,12 @@ def configure_args(self): options += self.with_or_without("libxml2") oapp = options.append - if "@:8" in spec: + if spec.satisfies("@:8"): oapp(f"--enable-optim={self.spec.variants['optimization-flavor'].value}") else: oapp(f"--with-optim-flavor={self.spec.variants['optimization-flavor'].value}") - if "+wannier90" in spec: + if spec.satisfies("+wannier90"): if spec.satisfies("@:8"): oapp(f"--with-wannier90-libs=-L{spec['wannier90'].prefix.lib} -lwannier -lm") oapp(f"--with-wannier90-incs=-I{spec['wannier90'].prefix.modules}") @@ -174,16 +174,16 @@ def configure_args(self): ] ) else: - if "@:9.8" in spec: + if spec.satisfies("@:9.8"): oapp(f"--with-fftw={spec['fftw-api'].prefix}") oapp(f"--with-hdf5={spec['hdf5'].prefix}") - if "@:8" in spec: + if spec.satisfies("@:8"): oapp("--with-dft-flavor=atompaw+libxc") else: "--without-wannier90", - if "+mpi" in spec: + if spec.satisfies("+mpi"): oapp(f"CC={spec['mpi'].mpicc}") oapp(f"CXX={spec['mpi'].mpicxx}") oapp(f"FC={spec['mpi'].mpifc}") @@ -192,18 +192,18 @@ def configure_args(self): # MPI version: # let the configure script auto-detect MPI support from mpi_prefix - if "@:8" in spec: + if spec.satisfies("@:8"): oapp("--enable-mpi=yes") else: oapp("--with-mpi") else: - if "@:8" in spec: + if spec.satisfies("@:8"): oapp("--enable-mpi=no") else: oapp("--without-mpi") # Activate OpenMP in Abinit Fortran code. - if "+openmp" in spec: + if spec.satisfies("+openmp"): oapp("--enable-openmp=yes") else: oapp("--enable-openmp=no") @@ -213,19 +213,19 @@ def configure_args(self): is_using_intel_libraries = spec["lapack"].name in INTEL_MATH_LIBRARIES if is_using_intel_libraries: linalg_flavor = "mkl" - elif "@9:" in spec and "^openblas" in spec: + if spec.satisfies("@9:") and spec.satisfies("^openblas"): linalg_flavor = "openblas" - elif "@9:" in spec and "^fujitsu-ssl2" in spec: + if spec.satisfies("@9:") and spec.satisfies("^fujitsu-ssl2"): linalg_flavor = "openblas" else: linalg_flavor = "custom" - if "+scalapack" in spec: + if spec.satisfies("+scalapack"): linalg = spec["scalapack"].libs + linalg - if "@:8" in spec: + if spec.satisfies("@:8"): linalg_flavor = f"scalapack+{linalg_flavor}" - if "@:8" in spec: + if spec.satisfies("@:8"): oapp(f"--with-linalg-libs={linalg.ld_flags}") else: oapp(f"LINALG_LIBS={linalg.ld_flags}") @@ -235,14 +235,14 @@ def configure_args(self): if is_using_intel_libraries: fftflavor = "dfti" else: - if "+openmp" in spec: + if spec.satisfies("+openmp"): fftflavor, fftlibs = "fftw3-threads", "-lfftw3_omp -lfftw3 -lfftw3f" else: fftflavor, fftlibs = "fftw3", "-lfftw3 -lfftw3f" oapp(f"--with-fft-flavor={fftflavor}") - if "@:8" in spec: + if spec.satisfies("@:8"): if is_using_intel_libraries: oapp(f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}") oapp(f"--with-fft-libs={spec['fftw-api'].libs.ld_flags}") @@ -271,7 +271,7 @@ def configure_args(self): # LibXC library libxc = spec["libxc:fortran"] - if "@:8" in spec: + if spec.satisfies("@:8"): options.extend( [ f"--with-libxc-incs={libxc.headers.cpp_flags}", @@ -285,7 +285,7 @@ def configure_args(self): hdf5 = spec["hdf5:hl"] netcdfc = spec["netcdf-c"] netcdff = spec["netcdf-fortran:shared"] - if "@:8" in spec: + if spec.satisfies("@:8"): oapp("--with-trio-flavor=netcdf") # Since version 8, Abinit started to use netcdf4 + hdf5 and we have # to link with the high level HDF5 library @@ -318,7 +318,7 @@ def check(self): # the tests directly execute abinit. thus failing with MPI # TODO: run tests in tests/ via the builtin runtests.py # requires Python with numpy, pyyaml, pandas - if "~mpi" in self.spec: + if self.spec.satisfies("~mpi"): make("tests_in") # Abinit assumes the *old* behavior of HDF5 where the library flags to link @@ -333,5 +333,5 @@ def patch(self): def install(self, spec, prefix): make("install") - if "+install-tests" in spec: + if spec.satisfies("+install-tests"): install_tree("tests", spec.prefix.tests) diff --git a/var/spack/repos/builtin/packages/accfft/package.py b/var/spack/repos/builtin/packages/accfft/package.py index b38e074119b3d4..45ffad796c7b8c 100644 --- a/var/spack/repos/builtin/packages/accfft/package.py +++ b/var/spack/repos/builtin/packages/accfft/package.py @@ -42,7 +42,7 @@ def cmake_args(self): self.define("BUILD_SHARED", str(spec.satisfies("+shared")).lower()), ] - if "+cuda" in spec: + if spec.satisfies("+cuda"): cuda_arch = [x for x in spec.variants["cuda_arch"].value if x] if cuda_arch: args.append(f"-DCUDA_NVCC_FLAGS={' '.join(self.cuda_flags(cuda_arch))}") diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index d4f79be031ca1a..fcd2c9e57696eb 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -493,7 +493,7 @@ def plugin_cmake_variant(plugin_name, spack_variant): if spec.satisfies("@14: +vecmem"): args.append("-DACTS_USE_SYSTEM_VECMEM=ON") - if "+cuda" in spec: + if spec.satisfies("+cuda"): cuda_arch = spec.variants["cuda_arch"].value if cuda_arch != "none": args.append(f"-DCUDA_FLAGS=-arch=sm_{cuda_arch[0]}") diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py index 88536258c713ad..0b77cfd327333b 100644 --- a/var/spack/repos/builtin/packages/adios/package.py +++ b/var/spack/repos/builtin/packages/adios/package.py @@ -144,14 +144,14 @@ def configure_args(self): extra_args += self.enable_or_disable("shared") extra_args += self.enable_or_disable("fortran") - if "+mpi" in spec: + if spec.satisfies("+mpi"): env["MPICC"] = spec["mpi"].mpicc env["MPICXX"] = spec["mpi"].mpicxx extra_args += self.with_or_without("mpi", activation_value="prefix") extra_args += self.with_or_without("infiniband") - if "+zlib" in spec: + if spec.satisfies("+zlib"): extra_args.append(f"--with-zlib={spec['zlib-api'].prefix}") else: extra_args.append("--without-zlib") diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 7a263b5a1c9d2d..c70a7b166006bc 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -292,7 +292,7 @@ def cmake_args(self): self.define("ADIOS2_USE_MGARD", False), ] - if "+sst" in spec: + if spec.satisfies("+sst"): args.extend( [ # Broken dependency package @@ -305,15 +305,15 @@ def cmake_args(self): ] ) - if "%fj" in spec: + if spec.satisfies("%fj"): args.extend(["-DCMAKE_Fortran_SUBMODULE_EXT=.smod", "-DCMAKE_Fortran_SUBMODULE_SEP=."]) # hip support - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append(self.builder.define_cuda_architectures(self)) # hip support - if "+rocm" in spec: + if spec.satisfies("+rocm"): args.append(self.builder.define_hip_architectures(self)) return args @@ -323,18 +323,18 @@ def libs(self): spec = self.spec libs_to_seek = set() - if "@2.6:" in spec: + if spec.satisfies("@2.6:"): libs_to_seek.add("libadios2_core") libs_to_seek.add("libadios2_c") libs_to_seek.add("libadios2_cxx11") - if "+fortran" in spec: + if spec.satisfies("+fortran"): libs_to_seek.add("libadios2_fortran") - if "+mpi" in spec: + if spec.satisfies("+mpi"): libs_to_seek.add("libadios2_core_mpi") libs_to_seek.add("libadios2_c_mpi") libs_to_seek.add("libadios2_cxx11_mpi") - if "+fortran" in spec: + if spec.satisfies("+fortran"): libs_to_seek.add("libadios2_fortran_mpi") if "@2.7: +shared+hdf5" in spec and "@1.12:" in spec["hdf5"]: @@ -342,7 +342,7 @@ def libs(self): else: libs_to_seek.add("libadios2") - if "+fortran" in spec: + if spec.satisfies("+fortran"): libs_to_seek.add("libadios2_fortran") return find_libraries( @@ -391,7 +391,7 @@ def test_examples(self): std_cmake_args = [] - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): mpi_exec = join_path(self.spec["mpi"].prefix, "bin", "mpiexec") std_cmake_args.append(f"-DMPIEXEC_EXECUTABLE={mpi_exec}") diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index 44567d936b93bd..a7eff71ad55282 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -87,12 +87,12 @@ def configure_args(self): configure_args = [] - if "+boost" in spec: + if spec.satisfies("+boost"): configure_args.append(f"--with-boost={spec['boost'].prefix}") else: configure_args.append("--with-boost=no") - if "+openmp" in spec: + if spec.satisfies("+openmp"): configure_args.append(f"--with-openmp-flag={self.compiler.openmp_flag}") configure_args.extend( @@ -107,14 +107,14 @@ def configure_args(self): # We can simply use the bundled examples to check # whether Adol-C works as expected - if "+examples" in spec: + if spec.satisfies("+examples"): configure_args.extend( [ "--enable-docexa", # Documented examples "--enable-addexa", # Additional examples ] ) - if "+openmp" in spec: + if spec.satisfies("+openmp"): configure_args.append("--enable-parexa") # Parallel examples return configure_args @@ -130,11 +130,11 @@ def install_additional_files(self): install(config_h, join_path(prefix.include, "adolc")) # Install documentation to {prefix}/share - if "+doc" in spec: + if spec.satisfies("+doc"): install_tree(join_path("ADOL-C", "doc"), join_path(prefix.share, "doc")) # Install examples to {prefix}/share - if "+examples" in spec: + if spec.satisfies("+examples"): install_tree(join_path("ADOL-C", "examples"), join_path(prefix.share, "examples")) # Run some examples that don't require user input @@ -148,7 +148,7 @@ def install_additional_files(self): ): Executable("./checkpointing/checkpointing")() - if "+openmp" in spec: + if spec.satisfies("+openmp"): with working_dir( join_path(source_directory, "ADOL-C", "examples", "additional_examples") ): diff --git a/var/spack/repos/builtin/packages/alpaka/package.py b/var/spack/repos/builtin/packages/alpaka/package.py index e8e06fd4a9990e..29a5b2ccf900c5 100644 --- a/var/spack/repos/builtin/packages/alpaka/package.py +++ b/var/spack/repos/builtin/packages/alpaka/package.py @@ -79,30 +79,30 @@ class Alpaka(CMakePackage, CudaPackage): def cmake_args(self): spec = self.spec args = [] - if "backend=serial" in spec: + if spec.satisfies("backend=serial"): args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE", True)) - if "backend=threads" in self.spec: + if self.spec.satisfies("backend=threads"): args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE", True)) - if "backend=fiber" in spec: + if spec.satisfies("backend=fiber"): args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE", True)) - if "backend=tbb" in spec: + if spec.satisfies("backend=tbb"): args.append(self.define("ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE", True)) - if "backend=omp2_gridblock" in spec: + if spec.satisfies("backend=omp2_gridblock"): args.append(self.define("ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE", True)) - if "backend=omp2_blockthread" in spec: + if spec.satisfies("backend=omp2_blockthread"): args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE", True)) - if "backend=omp5" in spec: + if spec.satisfies("backend=omp5"): args.append(self.define("ALPAKA_ACC_ANY_BT_OMP5_ENABLE", True)) - if "backend=oacc" in spec: + if spec.satisfies("backend=oacc"): args.append(self.define("ALPAKA_ACC_ANY_BT_OACC_ENABLE", True)) - if "backend=cuda" in spec: + if spec.satisfies("backend=cuda"): args.append(self.define("ALPAKA_ACC_GPU_CUDA_ENABLE", True)) - if "backend=cuda_only" in spec: + if spec.satisfies("backend=cuda_only"): args.append(self.define("ALPAKA_ACC_GPU_CUDA_ENABLE", True)) args.append(self.define("ALPAKA_ACC_GPU_CUDA_ONLY_MODE", True)) - if "backend=hip" in spec: + if spec.satisfies("backend=hip"): args.append(self.define("ALPAKA_ACC_GPU_HIP_ENABLE", True)) - if "backend=hip_only" in spec: + if spec.satisfies("backend=hip_only"): args.append(self.define("ALPAKA_ACC_GPU_HIP_ENABLE", True)) args.append(self.define("ALPAKA_ACC_GPU_HIP_ONLY_MODE", True)) diff --git a/var/spack/repos/builtin/packages/amdfftw/package.py b/var/spack/repos/builtin/packages/amdfftw/package.py index 3d5891c46e161b..6ac400a013e408 100644 --- a/var/spack/repos/builtin/packages/amdfftw/package.py +++ b/var/spack/repos/builtin/packages/amdfftw/package.py @@ -165,11 +165,11 @@ def configure(self, spec, prefix): # Dynamic dispatcher builds a single portable optimized library # that can execute on different x86 CPU architectures. # It is supported for GCC compiler and Linux based systems only. - if "+amd-dynamic-dispatcher" in spec: + if spec.satisfies("+amd-dynamic-dispatcher"): options.append("--enable-dynamic-dispatcher") # Check if compiler is AOCC - if "%aocc" in spec: + if spec.satisfies("%aocc"): options.append("CC={0}".format(os.path.basename(spack_cc))) options.append("FC={0}".format(os.path.basename(spack_fc))) options.append("F77={0}".format(os.path.basename(spack_fc))) @@ -186,10 +186,10 @@ def configure(self, spec, prefix): "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" ) - if "+debug" in spec: + if spec.satisfies("+debug"): options.append("--enable-debug") - if "+mpi" in spec: + if spec.satisfies("+mpi"): options.append("--enable-mpi") options.append("--enable-amd-mpifft") else: @@ -223,7 +223,7 @@ def configure(self, spec, prefix): simd_features = ["sse2", "avx", "avx2", "avx512"] # "avx512" is supported from amdfftw 4.0 version onwards - if "@2.2:3.2" in self.spec: + if self.spec.satisfies("@2.2:3.2"): simd_features.remove("avx512") simd_options = [] diff --git a/var/spack/repos/builtin/packages/amg2013/package.py b/var/spack/repos/builtin/packages/amg2013/package.py index adbe89e12f135d..b09a82400f5af4 100644 --- a/var/spack/repos/builtin/packages/amg2013/package.py +++ b/var/spack/repos/builtin/packages/amg2013/package.py @@ -39,15 +39,15 @@ def build_targets(self): include_cflags = ["-DTIMER_USE_MPI"] include_lflags = ["-lm"] - if "+openmp" in self.spec: + if self.spec.satisfies("+openmp"): include_cflags.append("-DHYPRE_USING_OPENMP") include_cflags.append(self.compiler.openmp_flag) include_lflags.append(self.compiler.openmp_flag) - if "+optflags" in self.spec: + if self.spec.satisfies("+optflags"): include_cflags.append("-DHYPRE_USING_PERSISTENT_COMM") include_cflags.append("-DHYPRE_HOPSCOTCH") - if "+int64" in self.spec: + if self.spec.satisfies("+int64"): include_cflags.append("-DHYPRE_BIGINT") targets.append(f"INCLUDE_CFLAGS={' '.join(include_cflags)}") diff --git a/var/spack/repos/builtin/packages/amgx/package.py b/var/spack/repos/builtin/packages/amgx/package.py index 332cc3cd9ed850..cf71a11353ce3e 100644 --- a/var/spack/repos/builtin/packages/amgx/package.py +++ b/var/spack/repos/builtin/packages/amgx/package.py @@ -45,7 +45,7 @@ def cmake_args(self): args = [] args.append("-DCMAKE_NO_MPI={0}".format("1" if "+mpi" not in self.spec else "0")) - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): args.append("-DWITH_CUDA=ON") cuda_arch = self.spec.variants["cuda_arch"].value if cuda_arch != "none": @@ -53,10 +53,10 @@ def cmake_args(self): else: args.append("-DWITH_CUDA=OFF") - if "+mkl" in self.spec: + if self.spec.satisfies("+mkl"): args.append("-DMKL_ROOT_DIR={0}".format(self.spec["mkl"].prefix)) - if "+magma" in self.spec: + if self.spec.satisfies("+magma"): args.append("-DMAGMA_ROOT_DIR={0}".format(self.spec["magma"].prefix)) return args diff --git a/var/spack/repos/builtin/packages/amp/package.py b/var/spack/repos/builtin/packages/amp/package.py index 340b473bac03c1..1ef74a1aef6363 100644 --- a/var/spack/repos/builtin/packages/amp/package.py +++ b/var/spack/repos/builtin/packages/amp/package.py @@ -70,7 +70,7 @@ def cmake_args(self): self.define("USE_MPI", "0"), ] - if "+mpi" in spec: + if spec.satisfies("+mpi"): options.extend( [ self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc), @@ -101,7 +101,7 @@ def cmake_args(self): ] ) - if "+zlib" in spec: + if spec.satisfies("+zlib"): tpl_list.append("ZLIB") options.append(self.define("TPL_ZLIB_INSTALL_DIR", spec["zlib-api"].prefix)) @@ -119,7 +119,7 @@ def cmake_args(self): tpl_list.append(vname.upper()) options.append(self.define(f"TPL_{vname.upper()}_INSTALL_DIR", spec[vname].prefix)) - if "+netcdf" in spec: + if spec.satisfies("+netcdf"): tpl_list.append("NETCDF") options.append(self.define("TPL_NETCDF_INSTALL_DIR", spec["netcdf-c"].prefix)) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index 62813b5681906a..564fc84955934b 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -292,20 +292,20 @@ def cmake_args(self): if self.spec.satisfies("%fj"): args.append("-DCMAKE_Fortran_MODDIR_FLAG=-M") - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): args.append("-DAMReX_GPU_BACKEND=CUDA") args.append("-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON") args.append("-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON") cuda_arch = self.spec.variants["cuda_arch"].value args.append("-DAMReX_CUDA_ARCH=" + self.get_cuda_arch_string(cuda_arch)) - if "+rocm" in self.spec: + if self.spec.satisfies("+rocm"): args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc)) args.append("-DAMReX_GPU_BACKEND=HIP") targets = self.spec.variants["amdgpu_target"].value args.append("-DAMReX_AMD_ARCH=" + ";".join(str(x) for x in targets)) - if "+sycl" in self.spec: + if self.spec.satisfies("+sycl"): args.append("-DAMReX_GPU_BACKEND=SYCL") # SYCL GPU backend only supported with Intel's oneAPI or DPC++ compilers sycl_compatible_compilers = ["icpx"] @@ -344,7 +344,7 @@ def cmake_args(self): if self.spec.satisfies("%fj"): args.append("-DCMAKE_Fortran_MODDIR_FLAG=-M") - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): cuda_arch = self.spec.variants["cuda_arch"].value args.append("-DCUDA_ARCH=" + self.get_cuda_arch_string(cuda_arch)) @@ -365,11 +365,11 @@ def test_run_install_test(self): args = ["-S{0}".format(join_path(".", "cache", "amrex", "Tests", "SpackSmokeTest"))] args.append("-DAMReX_ROOT=" + self.prefix) - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): args.append("-DMPI_C_COMPILER=" + self.spec["mpi"].mpicc) args.append("-DMPI_CXX_COMPILER=" + self.spec["mpi"].mpicxx) - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): args.append("-DCMAKE_CUDA_COMPILER=" + join_path(self.spec["cuda"].prefix.bin, "nvcc")) args.extend(self.cmake_args()) diff --git a/var/spack/repos/builtin/packages/amrvis/package.py b/var/spack/repos/builtin/packages/amrvis/package.py index 8732d860015f7e..e05668483d1844 100644 --- a/var/spack/repos/builtin/packages/amrvis/package.py +++ b/var/spack/repos/builtin/packages/amrvis/package.py @@ -148,7 +148,7 @@ def setup_build_environment(self, env): # We don't want an AMREX_HOME the user may have set already env.unset("AMREX_HOME") # Help force Amrvis to not pick up random system compilers - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): env.set("MPI_HOME", self.spec["mpi"].prefix) env.set("CC", self.spec["mpi"].mpicc) env.set("CXX", self.spec["mpi"].mpicxx) diff --git a/var/spack/repos/builtin/packages/ams/package.py b/var/spack/repos/builtin/packages/ams/package.py index b59d6e00c3bc97..4f62c16454cc00 100644 --- a/var/spack/repos/builtin/packages/ams/package.py +++ b/var/spack/repos/builtin/packages/ams/package.py @@ -114,31 +114,31 @@ def cmake_args(self): ) ) - if "+verbose" in spec: + if spec.satisfies("+verbose"): args.append("-DWITH_AMS_DEBUG=On") - if "+hdf5" in spec: + if spec.satisfies("+hdf5"): args.append("-DWITH_HDF5=On") args.append("-DHDF5_Dir={0}".format(spec["hdf5"].prefix)) - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("-DWITH_CUDA=On") cuda_arch = spec.variants["cuda_arch"].value[0] args.append("-DAMS_CUDA_ARCH={0}".format(cuda_arch)) - if "+caliper" in spec: + if spec.satisfies("+caliper"): args.append("-DWITH_CALIPER=On") args.append("-DCALIPER_DIR={0}/share/cmake/caliper".format(spec["caliper"].prefix)) else: args.append("-DWITH_CALIPER=Off") - if "+faiss" in spec: + if spec.satisfies("+faiss"): args.append("-DWITH_FAISS=On") args.append("-DFAISS_DIR={0}".format(spec["faiss"].prefix)) else: args.append("-DWITH_FAISS=Off") - if "+torch" in spec: + if spec.satisfies("+torch"): args.append("-DWITH_TORCH=On") args.append( "-DTorch_DIR={0}/lib/python{1}/site-packages" @@ -147,15 +147,15 @@ def cmake_args(self): ) ) - if "+redis" in spec: + if spec.satisfies("+redis"): args.append("-DWITH_REDIS=On") args.append("-DREDIS_PLUS_PLUS_DIR={0}".format(spec["redis-plus-plus"].prefix)) - if "+rabbitmq" in spec: + if spec.satisfies("+rabbitmq"): args.append("-DWITH_RMQ=On") args.append("-Damqpcpp_DIR={0}/cmake".format(spec["amqp-cpp"].prefix)) - if "+examples" in spec: + if spec.satisfies("+examples"): args.append("-DWITH_EXAMPLES=On") args.append("-DMFEM_DIR={0}".format(spec["mfem"].prefix)) diff --git a/var/spack/repos/builtin/packages/aocc/package.py b/var/spack/repos/builtin/packages/aocc/package.py index db3d1d3755bbdb..09ca523fff43fe 100644 --- a/var/spack/repos/builtin/packages/aocc/package.py +++ b/var/spack/repos/builtin/packages/aocc/package.py @@ -80,7 +80,7 @@ class Aocc(Package, CompilerPackage): @run_before("install") def license_reminder(self): - if "+license-agreed" in self.spec: + if self.spec.satisfies("+license-agreed"): tty.msg( "Reminder: by setting +license-agreed you are confirming you agree to the terms " "of the {0} EULA (found at {1})".format(self.spec.name, self.license_url) diff --git a/var/spack/repos/builtin/packages/aocl-compression/package.py b/var/spack/repos/builtin/packages/aocl-compression/package.py index 70ce6a6fdfcac9..b40854b23f7320 100644 --- a/var/spack/repos/builtin/packages/aocl-compression/package.py +++ b/var/spack/repos/builtin/packages/aocl-compression/package.py @@ -92,21 +92,21 @@ def cmake_args(self): "-DLZ4_FRAME_FORMAT_SUPPORT=ON", "-DAOCL_LZ4HC_DISABLE_PATTERN_ANALYSIS=ON", ] - if "~shared" in spec: + if spec.satisfies("~shared"): args.append("-DBUILD_STATIC_LIBS=ON") - if "~zlib" in spec: + if spec.satisfies("~zlib"): args.append("-DAOCL_EXCLUDE_ZLIB=ON") - if "~bzip2" in spec: + if spec.satisfies("~bzip2"): args.append("-DAOCL_EXCLUDE_BZIP2=ON") - if "~snappy" in spec: + if spec.satisfies("~snappy"): args.append("-DAOCL_EXCLUDE_SNAPPY=ON") - if "~zstd" in spec: + if spec.satisfies("~zstd"): args.append("-DAOCL_EXCLUDE_ZSTD=ON") - if "~lzma" in spec: + if spec.satisfies("~lzma"): args.append("-DAOCL_EXCLUDE_LZMA=ON") - if "~lz4" in spec: + if spec.satisfies("~lz4"): args.append("-DAOCL_EXCLUDE_LZ4=ON") - if "~lz4hc" in spec: + if spec.satisfies("~lz4hc"): args.append("-DAOCL_EXCLUDE_LZ4HC=ON") return args diff --git a/var/spack/repos/builtin/packages/aocl-sparse/package.py b/var/spack/repos/builtin/packages/aocl-sparse/package.py index 84ac6781422687..7d37966e25788c 100644 --- a/var/spack/repos/builtin/packages/aocl-sparse/package.py +++ b/var/spack/repos/builtin/packages/aocl-sparse/package.py @@ -121,7 +121,7 @@ def cmake_args(self): "-DAOCL_LIBFLAME_INCLUDE_DIR={0}".format(self.spec["amdlibflame"].prefix.include) ) - if "@4.2:" in self.spec: + if self.spec.satisfies("@4.2:"): args.append(f"-DAOCL_UTILS_LIB={self.spec['aocl-utils'].libs}") args.append( "-DAOCL_UTILS_INCLUDE_DIR={0}".format(self.spec["aocl-utils"].prefix.include) diff --git a/var/spack/repos/builtin/packages/apcomp/package.py b/var/spack/repos/builtin/packages/apcomp/package.py index dd2abe442c603a..90c86f00968365 100644 --- a/var/spack/repos/builtin/packages/apcomp/package.py +++ b/var/spack/repos/builtin/packages/apcomp/package.py @@ -99,7 +99,7 @@ def create_host_config(self, spec, prefix): # Find and record what CMake is used ############################################## - if "+cmake" in spec: + if spec.satisfies("+cmake"): cmake_exe = spec["cmake"].command.path else: cmake_exe = which("cmake") @@ -133,17 +133,17 @@ def create_host_config(self, spec, prefix): cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler)) # shared vs static libs - if "+shared" in spec: + if spec.satisfies("+shared"): cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON")) else: cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF")) - if "+openmp" in spec: + if spec.satisfies("+openmp"): cfg.write(cmake_cache_entry("ENABLE_OPENMP", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_OPENMP", "OFF")) - if "+mpi" in spec: + if spec.satisfies("+mpi"): mpicc_path = spec["mpi"].mpicc mpicxx_path = spec["mpi"].mpicxx # if we are using compiler wrappers on cray systems @@ -156,7 +156,7 @@ def create_host_config(self, spec, prefix): cfg.write(cmake_cache_entry("ENABLE_MPI", "ON")) cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path)) cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path)) - if "+blt_find_mpi" in spec: + if spec.satisfies("+blt_find_mpi"): cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF")) diff --git a/var/spack/repos/builtin/packages/apex/package.py b/var/spack/repos/builtin/packages/apex/package.py index 0660ccbc6c7ead..24aa59a10f3ace 100644 --- a/var/spack/repos/builtin/packages/apex/package.py +++ b/var/spack/repos/builtin/packages/apex/package.py @@ -146,7 +146,7 @@ def cmake_args(self): # CMake variables were updated in version 2.3.0, to make prefix = "APEX_WITH" test_prefix = "APEX_" - if "@2.2.0" in spec: + if spec.satisfies("@2.2.0"): prefix = "USE" test_prefix = "" @@ -167,29 +167,29 @@ def cmake_args(self): args.append(self.define_from_variant(test_prefix + "BUILD_TESTS", "tests")) args.append(self.define_from_variant(test_prefix + "BUILD_EXAMPLES", "examples")) - if "+activeharmony" in spec: + if spec.satisfies("+activeharmony"): args.append("-DACTIVEHARMONY_ROOT={0}".format(spec["activeharmony"].prefix)) - if "+binutils" in spec: + if spec.satisfies("+binutils"): args.append("-DBFD_ROOT={0}".format(spec["binutils"].prefix)) - if "+binutils ^binutils+nls" in spec: + if spec.satisfies("+binutils ^binutils+nls"): if "intl" in self.spec["gettext"].libs.names: args.append("-DCMAKE_SHARED_LINKER_FLAGS=-lintl") - if "+otf2" in spec: + if spec.satisfies("+otf2"): args.append("-DOTF2_ROOT={0}".format(spec["otf2"].prefix)) - if "+papi" in spec: + if spec.satisfies("+papi"): args.append("-DPAPI_ROOT={0}".format(spec["papi"].prefix)) - if "+gperftools" in spec: + if spec.satisfies("+gperftools"): args.append("-DGPERFTOOLS_ROOT={0}".format(spec["gperftools"].prefix)) - if "+jemalloc" in spec: + if spec.satisfies("+jemalloc"): args.append("-DJEMALLOC_ROOT={0}".format(spec["jemalloc"].prefix)) - if "+hip" in spec: + if spec.satisfies("+hip"): args.append("-DROCM_ROOT={0}".format(spec["hip"].prefix)) args.append("-DROCTRACER_ROOT={0}".format(spec["roctracer-dev"].prefix)) args.append("-DROCTX_ROOT={0}".format(spec["roctracer-dev"].prefix)) diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index bcc127be85638d..4fba7209e46650 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -58,22 +58,22 @@ def configure_args(self): "--without-oracle", ] - if "+crypto" in spec: + if spec.satisfies("+crypto"): args.extend(["--with-crypto", f"--with-openssl={spec['openssl'].prefix}"]) else: args.append("--without-crypto") - if "+gdbm" in spec: + if spec.satisfies("+gdbm"): args.append(f"--with-gdbm={spec['gdbm'].prefix}") else: args.append("--without-gdbm") - if "+pgsql" in spec: + if spec.satisfies("+pgsql"): args.append(f"--with-pgsql={spec['postgresql'].prefix}") else: args.append("--without-pgsql") - if "+sqlite" in spec: + if spec.satisfies("+sqlite"): if spec.satisfies("^sqlite@3.0:3"): args.extend([f"--with-sqlite3={spec['sqlite'].prefix}", "--without-sqlite2"]) elif spec.satisfies("^sqlite@2.0:2"): @@ -81,7 +81,7 @@ def configure_args(self): else: args.extend(["--without-sqlite2", "--without-sqlite3"]) - if "+odbc" in spec: + if spec.satisfies("+odbc"): args.append(f"--with-odbc={spec['unixodbc'].prefix}") else: args.append("--without-odbc") diff --git a/var/spack/repos/builtin/packages/arbor/package.py b/var/spack/repos/builtin/packages/arbor/package.py index c172ee9590f811..832078c7bd9501 100644 --- a/var/spack/repos/builtin/packages/arbor/package.py +++ b/var/spack/repos/builtin/packages/arbor/package.py @@ -117,7 +117,7 @@ def cmake_args(self): self.define_from_variant("ARB_VECTORIZE", "vectorize"), ] - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): args.append("-DARB_GPU=cuda") args.append(self.define_from_variant("ARB_USE_GPU_RNG", "gpu_rng")) diff --git a/var/spack/repos/builtin/packages/arborx/package.py b/var/spack/repos/builtin/packages/arborx/package.py index 86615c0b37396b..b49328a32fdfc6 100644 --- a/var/spack/repos/builtin/packages/arborx/package.py +++ b/var/spack/repos/builtin/packages/arborx/package.py @@ -115,10 +115,10 @@ def cmake_args(self): self.define_from_variant("ARBORX_ENABLE_MPI", "mpi"), ] - if "+cuda" in spec: + if spec.satisfies("+cuda"): # Only Kokkos allows '+cuda' for now options.append("-DCMAKE_CXX_COMPILER=%s" % spec["kokkos"].kokkos_cxx) - if "+rocm" in spec: + if spec.satisfies("+rocm"): options.append("-DCMAKE_CXX_COMPILER=%s" % spec["hip"].hipcc) return options @@ -152,7 +152,7 @@ def test_run_ctest(self): ), self.define("ArborX_ROOT", self.spec["arborx".prefix]), ] - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): cmake_args.append(self.define("MPI_HOME", self.spec["mpi"].prefix)) cmake = which(self.spec["cmake"].prefix.bin.cmake) make = which("make") diff --git a/var/spack/repos/builtin/packages/argobots/package.py b/var/spack/repos/builtin/packages/argobots/package.py index 95af52ede50270..b91ab5d565d491 100644 --- a/var/spack/repos/builtin/packages/argobots/package.py +++ b/var/spack/repos/builtin/packages/argobots/package.py @@ -53,20 +53,20 @@ class Argobots(AutotoolsPackage): def configure_args(self): args = [] - if "+perf" in self.spec: + if self.spec.satisfies("+perf"): args.append("--enable-perf-opt") - if "+valgrind" in self.spec: + if self.spec.satisfies("+valgrind"): args.append("--enable-valgrind") else: args.append("--disable-valgrind") - if "+debug" in self.spec: + if self.spec.satisfies("+debug"): args.append("--enable-debug=yes") else: args.append("--disable-debug") - if "+stackunwind" in self.spec: + if self.spec.satisfies("+stackunwind"): args.append("--enable-stack-unwind") args.append("--with-libunwind={0}".format(self.spec["libunwind"].prefix)) @@ -74,10 +74,10 @@ def configure_args(self): if stackguard != "none": args.append("--enable-stack-overflow-check={0}".format(stackguard)) - if "+tool" in self.spec: + if self.spec.satisfies("+tool"): args.append("--enable-tool") - if "+affinity" in self.spec: + if self.spec.satisfies("+affinity"): args.append("--enable-affinity") return args diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index 4036f6f8a660be..06435b9248b038 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -110,7 +110,7 @@ def libs(self): # query_parameters = self.spec.last_query.extra_parameters libraries = ["libarpack"] - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): libraries = ["libparpack"] + libraries return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) @@ -160,7 +160,7 @@ def configure_args(self): + self.enable_or_disable("shared") ) - if "+mpi" in spec: + if spec.satisfies("+mpi"): options.append(f"F77={spec['mpi'].mpif77}") return options diff --git a/var/spack/repos/builtin/packages/arrayfire/package.py b/var/spack/repos/builtin/packages/arrayfire/package.py index d934ae78a0718b..2e67af18d1060d 100644 --- a/var/spack/repos/builtin/packages/arrayfire/package.py +++ b/var/spack/repos/builtin/packages/arrayfire/package.py @@ -80,7 +80,7 @@ def cmake_args(self): ] ) - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): arch_list = [ "{}.{}".format(arch[:-1], arch[-1]) for arch in self.spec.variants["cuda_arch"].value diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py index 32fd20a20a515f..4bc1c8922e39af 100644 --- a/var/spack/repos/builtin/packages/ascent/package.py +++ b/var/spack/repos/builtin/packages/ascent/package.py @@ -396,7 +396,7 @@ def hostconfig(self): ####################### c_compiler = env["SPACK_CC"] cpp_compiler = env["SPACK_CXX"] - if "+fortran" in spec: + if spec.satisfies("+fortran"): f_compiler = env["SPACK_FC"] else: f_compiler = None @@ -414,7 +414,7 @@ def hostconfig(self): # Find and record what CMake is used ############################################## - if "+cmake" in spec: + if spec.satisfies("+cmake"): cmake_exe = spec["cmake"].command.path else: cmake_exe = which("cmake") @@ -449,14 +449,14 @@ def hostconfig(self): cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler)) cfg.write("# fortran compiler used by spack\n") - if "+fortran" in spec: + if spec.satisfies("+fortran"): cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON")) cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER", f_compiler)) else: cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF")) # shared vs static libs - if "+shared" in spec: + if spec.satisfies("+shared"): cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON")) else: cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF")) @@ -481,7 +481,7 @@ def hostconfig(self): ####################### # Unit Tests ####################### - if "+test" in spec: + if spec.satisfies("+test"): cfg.write(cmake_cache_entry("ENABLE_TESTS", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_TESTS", "OFF")) @@ -534,7 +534,7 @@ def hostconfig(self): # Serial ####################### - if "+serial" in spec: + if spec.satisfies("+serial"): cfg.write(cmake_cache_entry("ENABLE_SERIAL", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_SERIAL", "OFF")) @@ -545,7 +545,7 @@ def hostconfig(self): cfg.write("# MPI Support\n") - if "+mpi" in spec: + if spec.satisfies("+mpi"): mpicc_path = spec["mpi"].mpicc mpicxx_path = spec["mpi"].mpicxx mpifc_path = spec["mpi"].mpifc if "+fortran" in spec else None @@ -560,7 +560,7 @@ def hostconfig(self): cfg.write(cmake_cache_entry("ENABLE_MPI", "ON")) cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path)) cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path)) - if "+fortran" in spec: + if spec.satisfies("+fortran"): cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER", mpifc_path)) mpiexe_bin = join_path(spec["mpi"].prefix.bin, "mpiexec") if os.path.isfile(mpiexe_bin): @@ -571,14 +571,14 @@ def hostconfig(self): else: cfg.write(cmake_cache_entry("MPIEXEC", mpiexe_bin)) - if "+blt_find_mpi" in spec: + if spec.satisfies("+blt_find_mpi"): cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF")) ################################### # BABELFLOW (also depends on mpi) ################################### - if "+babelflow" in spec: + if spec.satisfies("+babelflow"): cfg.write(cmake_cache_entry("ENABLE_BABELFLOW", "ON")) cfg.write(cmake_cache_entry("BabelFlow_DIR", spec["babelflow"].prefix)) cfg.write(cmake_cache_entry("PMT_DIR", spec["parallelmergetree"].prefix)) @@ -591,12 +591,12 @@ def hostconfig(self): cfg.write("# CUDA Support\n") - if "+cuda" in spec: + if spec.satisfies("+cuda"): cfg.write(cmake_cache_entry("ENABLE_CUDA", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_CUDA", "OFF")) - if "+openmp" in spec: + if spec.satisfies("+openmp"): cfg.write(cmake_cache_entry("ENABLE_OPENMP", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_OPENMP", "OFF")) @@ -606,7 +606,7 @@ def hostconfig(self): ####################### cfg.write("# vtk-h support \n") - if "+vtkh" in spec: + if spec.satisfies("+vtkh"): cfg.write("# vtk-h\n") if self.spec.satisfies("@0.8.1:"): cfg.write(cmake_cache_entry("ENABLE_VTKH", "ON")) @@ -616,7 +616,7 @@ def hostconfig(self): cfg.write("# vtk-m from spack\n") cfg.write(cmake_cache_entry("VTKM_DIR", spec["vtk-m"].prefix)) - if "+cuda" in spec: + if spec.satisfies("+cuda"): cfg.write(cmake_cache_entry("VTKm_ENABLE_CUDA", "ON")) cfg.write(cmake_cache_entry("CMAKE_CUDA_HOST_COMPILER", env["SPACK_CXX"])) else: @@ -632,7 +632,7 @@ def hostconfig(self): ####################### # RAJA ####################### - if "+raja" in spec: + if spec.satisfies("+raja"): cfg.write("# RAJA from spack \n") cfg.write(cmake_cache_entry("RAJA_DIR", spec["raja"].prefix)) else: @@ -641,7 +641,7 @@ def hostconfig(self): ####################### # Umpire ####################### - if "+umpire" in spec: + if spec.satisfies("+umpire"): cfg.write("# umpire from spack \n") cfg.write(cmake_cache_entry("UMPIRE_DIR", spec["umpire"].prefix)) else: @@ -659,7 +659,7 @@ def hostconfig(self): ####################### # MFEM ####################### - if "+mfem" in spec: + if spec.satisfies("+mfem"): cfg.write("# mfem from spack \n") cfg.write(cmake_cache_entry("MFEM_DIR", spec["mfem"].prefix)) else: @@ -668,7 +668,7 @@ def hostconfig(self): ####################### # OCCA ####################### - if "+occa" in spec: + if spec.satisfies("+occa"): cfg.write("# occa from spack \n") cfg.write(cmake_cache_entry("OCCA_DIR", spec["occa"].prefix)) else: @@ -677,7 +677,7 @@ def hostconfig(self): ####################### # Devil Ray ####################### - if "+dray" in spec: + if spec.satisfies("+dray"): cfg.write("# devil ray\n") if self.spec.satisfies("@0.8.1:"): cfg.write(cmake_cache_entry("ENABLE_DRAY", "ON")) @@ -698,7 +698,7 @@ def hostconfig(self): ####################### cfg.write("# adios2 support\n") - if "+adios2" in spec: + if spec.satisfies("+adios2"): cfg.write(cmake_cache_entry("ADIOS2_DIR", spec["adios2"].prefix)) else: cfg.write("# adios2 not built by spack \n") @@ -708,7 +708,7 @@ def hostconfig(self): ####################### cfg.write("# Fides support\n") - if "+fides" in spec: + if spec.satisfies("+fides"): cfg.write(cmake_cache_entry("FIDES_DIR", spec["fides"].prefix)) else: cfg.write("# fides not built by spack \n") @@ -717,7 +717,7 @@ def hostconfig(self): # Caliper ####################### cfg.write("# caliper from spack \n") - if "+caliper" in spec: + if spec.satisfies("+caliper"): cfg.write(cmake_cache_entry("CALIPER_DIR", spec["caliper"].prefix)) cfg.write(cmake_cache_entry("ADIAK_DIR", spec["adiak"].prefix)) else: diff --git a/var/spack/repos/builtin/packages/athena/package.py b/var/spack/repos/builtin/packages/athena/package.py index a49982a0b405a4..dad789c8da8427 100644 --- a/var/spack/repos/builtin/packages/athena/package.py +++ b/var/spack/repos/builtin/packages/athena/package.py @@ -185,7 +185,7 @@ def setup_build_environment(self, env): env.set("OPT", "-O3") - if "+mpi" in spec: + if spec.satisfies("+mpi"): env.set("CC", spec["mpi"].mpicc) env.set("LDR", spec["mpi"].mpicc) env.set("MPILIB", spec["mpi"].libs.ld_flags) @@ -194,7 +194,7 @@ def setup_build_environment(self, env): env.set("CC", spack_cc) env.set("LDR", spack_cc) - if "+fft" in spec: + if spec.satisfies("+fft"): env.set("FFTWLIB", spec["fftw"].libs.ld_flags) env.set("FFTWINC", spec["fftw"].headers.include_flags) @@ -202,82 +202,82 @@ def configure_args(self): spec = self.spec args = [] - if "+conduction" in spec: + if spec.satisfies("+conduction"): args.append("--enable-conduction") else: args.append("--disable-conduction") - if "+resistivity" in spec: + if spec.satisfies("+resistivity"): args.append("--enable-resistivity") else: args.append("--disable-resistivity") - if "+special_relativity" in spec: + if spec.satisfies("+special_relativity"): args.append("--enable-special-relativity") else: args.append("--disable-special-relativity") - if "+viscosity" in spec: + if spec.satisfies("+viscosity"): args.append("--enable-viscosity") else: args.append("--disable-viscosity") - if "+single" in spec: + if spec.satisfies("+single"): args.append("--enable-single") else: args.append("--disable-single") - if "+ghost" in spec: + if spec.satisfies("+ghost"): args.append("--enable-ghost") else: args.append("--disable-ghost") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append("--enable-mpi") else: args.append("--disable-mpi") - if "+h_correction" in spec: + if spec.satisfies("+h_correction"): args.append("--enable-h-correction") else: args.append("--disable-h-correction") - if "+fft" in spec: + if spec.satisfies("+fft"): args.append("--enable-fft") else: args.append("--disable-fft") - if "+shearing_box" in spec: + if spec.satisfies("+shearing_box"): args.append("--enable-shearing-box") else: args.append("--disable-shearing-box") - if "+fargo" in spec: + if spec.satisfies("+fargo"): args.append("--enable-fargo") else: args.append("--disable-fargo") - if "+sts" in spec: + if spec.satisfies("+sts"): args.append("--enable-sts") else: args.append("--disable-sts") - if "+smr" in spec: + if spec.satisfies("+smr"): args.append("--enable-smr") else: args.append("--disable-smr") - if "+fofc" in spec: + if spec.satisfies("+fofc"): args.append("--enable-fofc") else: args.append("--disable-fofc") - if "+rotating_frame" in spec: + if spec.satisfies("+rotating_frame"): args.append("--enable-rotating_frame") else: args.append("--disable-rotating_frame") - if "+l1_inflow" in spec: + if spec.satisfies("+l1_inflow"): args.append("--enable-l1_inflow") else: args.append("--disable-l1_inflow") diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index 026cf000d68b0f..741e5b554c8a4f 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -100,7 +100,7 @@ def install(self, spec, prefix): # https://github.com/macports/macports-ports/blob/master/math/atlas/Portfile # https://github.com/Homebrew/homebrew-science/pull/3571 options = [] - if "+shared" in spec: + if spec.satisfies("+shared"): options.extend(["--shared"]) # TODO: for non GNU add '-Fa', 'alg', '-fPIC' ? @@ -129,7 +129,7 @@ def install(self, spec, prefix): make("check") make("ptcheck") make("time") - if "+shared" in spec: + if spec.satisfies("+shared"): with working_dir("lib"): make("shared_all") @@ -143,7 +143,7 @@ def libs(self): # serial BLAS), and all ATLAS symbols needed to support them. Whereas # libtatlas.[so,dylib,dll ] is parallel (multithreaded) version. is_threaded = self.spec.satisfies("threads=pthreads") - if "+shared" in self.spec: + if self.spec.satisfies("+shared"): to_find = ["libtatlas"] if is_threaded else ["libsatlas"] shared = True else: diff --git a/var/spack/repos/builtin/packages/augustus/package.py b/var/spack/repos/builtin/packages/augustus/package.py index 6a28651cee4d00..bfba305f623cd7 100644 --- a/var/spack/repos/builtin/packages/augustus/package.py +++ b/var/spack/repos/builtin/packages/augustus/package.py @@ -69,7 +69,7 @@ class Augustus(MakefilePackage): def edit(self, spec, prefix): # Set compile commands for each compiler and # Fix for using 'boost' on Spack. (only after ver.3.3.1-tag1) - if "@3.3.1-tag1:3.4.0" in spec: + if spec.satisfies("@3.3.1-tag1:3.4.0"): with working_dir(join_path("auxprogs", "utrrnaseq", "Debug")): filter_file("g++", spack_cxx, "makefile", string=True) filter_file( @@ -108,22 +108,22 @@ def edit(self, spec, prefix): makefile = FileFilter("Makefile") makefile.filter("BAMTOOLS = .*", f"BAMTOOLS = {bamtools}") makefile.filter("INCLUDES = *", "INCLUDES = -I$(BAMTOOLS)/include/bamtools ") - if "bamtools@2.5:" in spec: + if spec.satisfies("bamtools@2.5:"): makefile.filter( "LIBS = -lbamtools -lz", "LIBS = $(BAMTOOLS)/lib64" "/libbamtools.a -lz" ) - if "bamtools@:2.4" in spec: + if spec.satisfies("bamtools@:2.4"): makefile.filter( "LIBS = -lbamtools -lz", "LIBS = $(BAMTOOLS)/lib/bamtools" "/libbamtools.a -lz" ) with working_dir(join_path("auxprogs", "bam2hints")): makefile = FileFilter("Makefile") makefile.filter("/usr/include/bamtools", f"{bamtools}/include/bamtools") - if "bamtools@2.5:" in spec: + if spec.satisfies("bamtools@2.5:"): makefile.filter( "LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib64/libbamtools.a -lz" ) - if "bamtools@:2.4" in spec: + if spec.satisfies("bamtools@:2.4"): makefile.filter( "LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib/bamtools/libbamtools.a -lz" ) @@ -151,7 +151,7 @@ def edit(self, spec, prefix): with working_dir("src"): makefile = FileFilter("Makefile") makefile.filter(r"/usr/include/mysql\+\+", f"{mysqlpp}/include/mysql++") - if "^mariadb-c-client" in spec: + if spec.satisfies("^mariadb-c-client"): makefile.filter("/usr/include/mysql", f"{mysql}/include/mariadb") else: makefile.filter("/usr/include/mysql", f"{mysql}/include/mysql") @@ -180,10 +180,10 @@ def setup_build_environment(self, env): htslib = self.spec["htslib"].prefix bamtools = self.spec["bamtools"].prefix - if "@3.4.0" in self.spec: + if self.spec.satisfies("@3.4.0"): env.set("HTSLIBDIR", htslib) - if "@3.5.0:" in self.spec: + if self.spec.satisfies("@3.5.0:"): env.set("HTSLIB_INSTALL_DIR", htslib) env.set("BAMTOOLS_INSTALL_DIR", bamtools) diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index 94489a1194b159..939f394b9e6903 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -84,7 +84,7 @@ def patch(self): # We save and restore the modification timestamp of the file to prevent # regeneration of the respective man page: with keep_modification_time(patched_file): - if "@2.70:" in self.spec: + if self.spec.satisfies("@2.70:"): shebang_string = "^#! @PERL@" else: shebang_string = "^#! @PERL@ -w" @@ -104,7 +104,7 @@ def filter_sbang(self): # target will try to rebuild the binaries (filter_file updates the # timestamps) - if "@2.70:" in self.spec: + if self.spec.satisfies("@2.70:"): shebang_string = "#! {0}" else: shebang_string = "#! {0} -w" diff --git a/var/spack/repos/builtin/packages/autogen/package.py b/var/spack/repos/builtin/packages/autogen/package.py index 215e3793452d29..2266205e226d51 100644 --- a/var/spack/repos/builtin/packages/autogen/package.py +++ b/var/spack/repos/builtin/packages/autogen/package.py @@ -39,7 +39,7 @@ def configure_args(self): "--disable-nls" ] - if "+xml" in spec: + if spec.satisfies("+xml"): args.append(f"--with-libxml2={spec['libxml2'].prefix}") else: args.append("--without-libxml2") diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py index 3e5d07085a9c2d..4d5943de06bf55 100644 --- a/var/spack/repos/builtin/packages/automake/package.py +++ b/var/spack/repos/builtin/packages/automake/package.py @@ -45,10 +45,10 @@ def determine_version(cls, exe): def patch(self): # The full perl shebang might be too long files_to_be_patched_fmt = "bin/{0}.in" - if "@:1.15.1" in self.spec: + if self.spec.satisfies("@:1.15.1"): files_to_be_patched_fmt = "t/wrap/{0}.in" - if "@1.16.3:" in self.spec: + if self.spec.satisfies("@1.16.3:"): shebang_string = "^#!@PERL@" else: shebang_string = "^#!@PERL@ -w" diff --git a/var/spack/repos/builtin/packages/axom/package.py b/var/spack/repos/builtin/packages/axom/package.py index 9e658373d3ff29..c3ebe66c9dc837 100644 --- a/var/spack/repos/builtin/packages/axom/package.py +++ b/var/spack/repos/builtin/packages/axom/package.py @@ -243,11 +243,11 @@ def cache_name(self): # Are we on a LLNL system then strip node number hostname = hostname.rstrip("1234567890") special_case = "" - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): special_case += "_cuda" - if "~fortran" in self.spec: + if self.spec.satisfies("~fortran"): special_case += "_nofortran" - if "+rocm" in self.spec: + if self.spec.satisfies("+rocm"): special_case += "_hip" return "{0}-{1}-{2}@{3}{4}.cmake".format( hostname, @@ -261,7 +261,7 @@ def initconfig_compiler_entries(self): spec = self.spec entries = super().initconfig_compiler_entries() - if "+fortran" in spec: + if spec.satisfies("+fortran"): entries.append(cmake_cache_option("ENABLE_FORTRAN", True)) if self.is_fortran_compiler("gfortran") and "clang" in self.compiler.cxx: libdir = pjoin(os.path.dirname(os.path.dirname(self.compiler.cxx)), "lib") @@ -282,7 +282,7 @@ def initconfig_compiler_entries(self): entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", "")) # Add optimization flag workaround for Debug builds with cray compiler or newer HIP - if "+rocm" in spec: + if spec.satisfies("+rocm"): entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g -DNDEBUG")) return entries @@ -291,7 +291,7 @@ def initconfig_hardware_entries(self): spec = self.spec entries = super().initconfig_hardware_entries() - if "+cuda" in spec: + if spec.satisfies("+cuda"): entries.append(cmake_cache_option("ENABLE_CUDA", True)) entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True)) @@ -304,7 +304,7 @@ def initconfig_hardware_entries(self): if spec.satisfies("^blt@:0.5.1"): # This is handled internally by BLT now - if "+cpp14" in spec: + if spec.satisfies("+cpp14"): cudaflags += " -std=c++14" else: cudaflags += " -std=c++11" @@ -313,7 +313,7 @@ def initconfig_hardware_entries(self): entries.append("# nvcc does not like gtest's 'pthreads' flag\n") entries.append(cmake_cache_option("gtest_disable_pthreads", True)) - if "+rocm" in spec: + if spec.satisfies("+rocm"): entries.append("#------------------{0}\n".format("-" * 60)) entries.append("# Axom ROCm specifics\n") entries.append("#------------------{0}\n\n".format("-" * 60)) @@ -385,7 +385,7 @@ def initconfig_hardware_entries(self): entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", linker_flags, description)) - if "+shared" in spec: + if spec.satisfies("+shared"): linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," + libdir entries.append( cmake_cache_string("CMAKE_SHARED_LINKER_FLAGS", linker_flags, description) @@ -440,7 +440,7 @@ def initconfig_mpi_entries(self): spec = self.spec entries = super().initconfig_mpi_entries() - if "+mpi" in spec: + if spec.satisfies("+mpi"): entries.append(cmake_cache_option("ENABLE_MPI", True)) if spec["mpi"].name == "spectrum-mpi": entries.append(cmake_cache_string("BLT_MPI_COMMAND_APPEND", "mpibind")) @@ -496,7 +496,7 @@ def initconfig_package_entries(self): else: entries.append("# %s not built\n" % dep.upper()) - if "+profiling" in spec: + if spec.satisfies("+profiling"): dep_dir = get_spec_path(spec, "adiak", path_replacements) entries.append(cmake_cache_path("ADIAK_DIR", dep_dir)) @@ -508,7 +508,7 @@ def initconfig_package_entries(self): entries.append(cmake_cache_path("CAMP_DIR", dep_dir)) # SCR does not export it's targets so we need to pull in its dependencies - if "+scr" in spec: + if spec.satisfies("+scr"): dep_dir = get_spec_path(spec, "scr", path_replacements) entries.append(cmake_cache_path("SCR_DIR", dep_dir)) @@ -541,7 +541,7 @@ def initconfig_package_entries(self): entries.append("#------------------{0}\n".format("-" * 60)) # Add common prefix to path replacement list - if "+devtools" in spec: + if spec.satisfies("+devtools"): # Grab common devtools root and strip the trailing slash path1 = os.path.realpath(spec["cppcheck"].prefix) path2 = os.path.realpath(spec["doxygen"].prefix) From 65b530e7ece99a3827d131f789e2864e538ca3cf Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Fri, 2 Aug 2024 01:55:58 +0200 Subject: [PATCH 111/435] detray: add versions 0.70.0 through 0.72.1 (#45541) * detray: add versions 0.69.1 through 0.72.1 This commit adds four new versions of the detray package. * Remove v0.69.0 --- var/spack/repos/builtin/packages/detray/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/detray/package.py b/var/spack/repos/builtin/packages/detray/package.py index 85d0c57531195d..6927166ba2c940 100644 --- a/var/spack/repos/builtin/packages/detray/package.py +++ b/var/spack/repos/builtin/packages/detray/package.py @@ -20,6 +20,9 @@ class Detray(CMakePackage): license("MPL-2.0", checked_by="stephenswat") + version("0.72.1", sha256="6cc8d34bc0d801338e9ab142c4a9884d19d9c02555dbb56972fab86b98d0f75b") + version("0.71.0", sha256="2be2b3dac6f77aa8cea033eba841378dc3703ff93c99e4d05ea03df685e6d508") + version("0.70.0", sha256="14fa1d478d44d5d987caea6f4b365bce870aa8e140c21b802c527afa3a5db869") version("0.69.1", sha256="7100ec86a47458a35f5943cd6c7da07c68b8c1c2f62d36d13b8bb50568d0abe5") version("0.68.0", sha256="6d57835f22ced9243fbcc29b84ea4c01878a46bfa5910e320c933e9bf8e96612") version("0.67.0", sha256="87b1b29f333c955ea6160f9dda89628490d85a9e5186c2f35f57b322bbe27e18") From 96ddbd5e17a200dd3f78e6d4f6aff287d96d9e31 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 1 Aug 2024 17:20:43 -0700 Subject: [PATCH 112/435] format: allow spaces in format specifiers (#45487) * format: allow spaces in format specifiers Key-value pair format specifiers can now contain spaces in the key. This allows us to add spaces to format strings that are *only* present when the attribute formatted is not ``None``. Instead of writing: ``` {arch=architecture} ``` and special casing `arch=` like a sigil in `Spec.format()`, we can now write: ``` { arch=architecture} ``` And the space is *only* printed when `architecture` is not `None`. This allows us to remove the special case in `Spec.format()` for `arch=`. Previously the only `key=` prefix allowed in format specifiers was `arch=`, but this PR removes that requirement, and the `key=` part of a key-value specifier can be any name. It does *not* have to correspond to the formatted attribute. - [x] modify `SPEC_FORMAT_RE` to allow arbitrary keys in key-value pairs. - [x] remove special case for `arch=` from `Spec.format()`. - [x] modify format strings using `{arch=architecture}` to use `{ arch=architecture}` - [x] add more tests for formatting This PR saves other more complex attributes like compiler flags and their spacing for later. Signed-off-by: Todd Gamblin --- lib/spack/spack/ci.py | 2 +- lib/spack/spack/cmd/__init__.py | 2 +- lib/spack/spack/spec.py | 93 +++++++++++++++----------- lib/spack/spack/test/spec_semantics.py | 38 +++++++++-- 4 files changed, 88 insertions(+), 47 deletions(-) diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 528fa4506356fa..db8e8f1a3510ce 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -71,7 +71,7 @@ # TODO: Remove this in Spack 0.23 SHARED_PR_MIRROR_URL = "s3://spack-binaries-prs/shared_pr_mirror" JOB_NAME_FORMAT = ( - "{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{arch=architecture}" + "{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{ arch=architecture}" ) IS_WINDOWS = sys.platform == "win32" spack_gpg = spack.main.SpackCommand("gpg") diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index 00e30a551df7e5..48f8b5b9c1b9f8 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -237,7 +237,7 @@ def ensure_single_spec_or_die(spec, matching_specs): if len(matching_specs) <= 1: return - format_string = "{name}{@version}{%compiler.name}{@compiler.version}{arch=architecture}" + format_string = "{name}{@version}{%compiler.name}{@compiler.version}{ arch=architecture}" args = ["%s matches multiple packages." % spec, "Matching packages:"] args += [ colorize(" @K{%s} " % s.dag_hash(7)) + s.cformat(format_string) for s in matching_specs diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index d35163c638ad87..d3ec7d715710d1 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -129,7 +129,7 @@ r"|" # or # OPTION 2: an actual format string r"{" # non-escaped open brace { - r"([%@/]|arch=)?" # optional sigil (to print sigil in color) + r"([%@/]|[\w ][\w -]*=)?" # optional sigil (or identifier or space) to print sigil in color r"(?:\^([^}\.]+)\.)?" # optional ^depname. (to get attr from dependency) # after the sigil or depname, we can have a hash expression or another attribute r"(?:" # one of @@ -163,14 +163,14 @@ DEFAULT_FORMAT = ( "{name}{@versions}" "{%compiler.name}{@compiler.versions}{compiler_flags}" - "{variants}{arch=architecture}{/abstract_hash}" + "{variants}{ arch=architecture}{/abstract_hash}" ) #: Display format, which eliminates extra `@=` in the output, for readability. DISPLAY_FORMAT = ( "{name}{@version}" "{%compiler.name}{@compiler.version}{compiler_flags}" - "{variants}{arch=architecture}{/abstract_hash}" + "{variants}{ arch=architecture}{/abstract_hash}" ) #: Regular expression to pull spec contents out of clearsigned signature @@ -1894,14 +1894,14 @@ def short_spec(self): """Returns a version of the spec with the dependencies hashed instead of completely enumerated.""" spec_format = "{name}{@version}{%compiler.name}{@compiler.version}" - spec_format += "{variants}{arch=architecture}{/hash:7}" + spec_format += "{variants}{ arch=architecture}{/hash:7}" return self.format(spec_format) @property def cshort_spec(self): """Returns an auto-colorized version of ``self.short_spec``.""" spec_format = "{name}{@version}{%compiler.name}{@compiler.version}" - spec_format += "{variants}{arch=architecture}{/hash:7}" + spec_format += "{variants}{ arch=architecture}{/hash:7}" return self.cformat(spec_format) @property @@ -4387,13 +4387,14 @@ def deps(): yield deps def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = False) -> str: - r"""Prints out particular pieces of a spec, depending on what is - in the format string. + r"""Prints out attributes of a spec according to a format string. - Using the ``{attribute}`` syntax, any field of the spec can be - selected. Those attributes can be recursive. For example, - ``s.format({compiler.version})`` will print the version of the - compiler. + Using an ``{attribute}`` format specifier, any field of the spec can be + selected. Those attributes can be recursive. For example, + ``s.format({compiler.version})`` will print the version of the compiler. + + If the attribute in a format specifier evaluates to ``None``, then the format + specifier will evaluate to the empty string, ``""``. Commonly used attributes of the Spec for format strings include:: @@ -4409,6 +4410,7 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa architecture.os architecture.target prefix + namespace Some additional special-case properties can be added:: @@ -4417,40 +4419,51 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa spack_install The spack install directory The ``^`` sigil can be used to access dependencies by name. - ``s.format({^mpi.name})`` will print the name of the MPI - implementation in the spec. + ``s.format({^mpi.name})`` will print the name of the MPI implementation in the + spec. - The ``@``, ``%``, ``arch=``, and ``/`` sigils - can be used to include the sigil with the printed - string. These sigils may only be used with the appropriate - attributes, listed below:: + The ``@``, ``%``, and ``/`` sigils can be used to include the sigil with the + printed string. These sigils may only be used with the appropriate attributes, + listed below:: @ ``{@version}``, ``{@compiler.version}`` % ``{%compiler}``, ``{%compiler.name}`` - arch= ``{arch=architecture}`` / ``{/hash}``, ``{/hash:7}``, etc - The ``@`` sigil may also be used for any other property named - ``version``. Sigils printed with the attribute string are only - printed if the attribute string is non-empty, and are colored - according to the color of the attribute. - - Sigils are not used for printing variants. Variants listed by - name naturally print with their sigil. For example, - ``spec.format('{variants.debug}')`` would print either - ``+debug`` or ``~debug`` depending on the name of the - variant. Non-boolean variants print as ``name=value``. To - print variant names or values independently, use + The ``@`` sigil may also be used for any other property named ``version``. + Sigils printed with the attribute string are only printed if the attribute + string is non-empty, and are colored according to the color of the attribute. + + Variants listed by name naturally print with their sigil. For example, + ``spec.format('{variants.debug}')`` prints either ``+debug`` or ``~debug`` + depending on the name of the variant. Non-boolean variants print as + ``name=value``. To print variant names or values independently, use ``spec.format('{variants..name}')`` or ``spec.format('{variants..value}')``. - Spec format strings use ``\`` as the escape character. Use - ``\{`` and ``\}`` for literal braces, and ``\\`` for the - literal ``\`` character. + There are a few attributes on specs that can be specified as key-value pairs + that are *not* variants, e.g.: ``os``, ``arch``, ``architecture``, ``target``, + ``namespace``, etc. You can format these with an optional ``key=`` prefix, e.g. + ``{namespace=namespace}`` or ``{arch=architecture}``, etc. The ``key=`` prefix + will be colorized along with the value. + + When formatting specs, key-value pairs are separated from preceding parts of the + spec by whitespace. To avoid printing extra whitespace when the formatted + attribute is not set, you can add whitespace to the key *inside* the braces of + the format string, e.g.: + + { namespace=namespace} + + This evaluates to `` namespace=builtin`` if ``namespace`` is set to ``builtin``, + and to ``""`` if ``namespace`` is ``None``. + + Spec format strings use ``\`` as the escape character. Use ``\{`` and ``\}`` for + literal braces, and ``\\`` for the literal ``\`` character. Args: format_string: string containing the format to be expanded color: True for colorized result; False for no color; None for auto color. + """ ensure_modern_format_string(format_string) @@ -4504,10 +4517,6 @@ def format_attribute(match_object: Match) -> str: raise SpecFormatSigilError(sig, "compilers", attribute) elif sig == "/" and attribute != "abstract_hash": raise SpecFormatSigilError(sig, "DAG hashes", attribute) - elif sig == "arch=": - if attribute not in ("architecture", "arch"): - raise SpecFormatSigilError(sig, "the architecture", attribute) - sig = " arch=" # include space as separator # Iterate over components using getattr to get next element for idx, part in enumerate(parts): @@ -4552,15 +4561,19 @@ def format_attribute(match_object: Match) -> str: # Set color codes for various attributes color = None - if "variants" in parts: - color = VARIANT_COLOR - elif "architecture" in parts: + if "architecture" in parts: color = ARCHITECTURE_COLOR + elif "variants" in parts or sig.endswith("="): + color = VARIANT_COLOR elif "compiler" in parts or "compiler_flags" in parts: color = COMPILER_COLOR elif "version" in parts or "versions" in parts: color = VERSION_COLOR + # return empty string if the value of the attribute is None. + if current is None: + return "" + # return colored output return safe_color(sig, str(current), color) @@ -5523,7 +5536,7 @@ def __init__(self, spec): class AmbiguousHashError(spack.error.SpecError): def __init__(self, msg, *specs): spec_fmt = "{namespace}.{name}{@version}{%compiler}{compiler_flags}" - spec_fmt += "{variants}{arch=architecture}{/hash:7}" + spec_fmt += "{variants}{ arch=architecture}{/hash:7}" specs_str = "\n " + "\n ".join(spec.format(spec_fmt) for spec in specs) super().__init__(msg + specs_str) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index b21f0e7ac9d7d4..faca9fad9abc7a 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -656,6 +656,7 @@ def test_spec_formatting(self, default_mock_concretization): ("{@VERSIONS}", "@", "versions", lambda spec: spec), ("{%compiler}", "%", "compiler", lambda spec: spec), ("{arch=architecture}", "arch=", "architecture", lambda spec: spec), + ("{namespace=namespace}", "namespace=", "namespace", lambda spec: spec), ("{compiler.name}", "", "name", lambda spec: spec.compiler), ("{compiler.version}", "", "version", lambda spec: spec.compiler), ("{%compiler.name}", "%", "name", lambda spec: spec.compiler), @@ -706,13 +707,40 @@ def check_prop(check_spec, fmt_str, prop, getter): @pytest.mark.parametrize( "fmt_str", [ - "{@name}", - "{@version.concrete}", - "{%compiler.version}", - "{/hashd}", - "{arch=architecture.os}", + "{name}", + "{version}", + "{@version}", + "{%compiler}", + "{namespace}", + "{ namespace=namespace}", + "{ namespace =namespace}", + "{ name space =namespace}", + "{arch}", + "{architecture}", + "{arch=architecture}", + "{ arch=architecture}", + "{ arch =architecture}", ], ) + def test_spec_format_null_attributes(self, fmt_str): + """Ensure that attributes format to empty strings when their values are null.""" + spec = spack.spec.Spec() + assert spec.format(fmt_str) == "" + + def test_spec_formatting_spaces_in_key(self, default_mock_concretization): + spec = default_mock_concretization("multivalue-variant cflags=-O2") + + # test that spaces are preserved, if they come after some other text, otherwise + # they are trimmed. + # TODO: should we be trimming whitespace from formats? Probably not. + assert spec.format("x{ arch=architecture}") == f"x arch={spec.architecture}" + assert spec.format("x{ namespace=namespace}") == f"x namespace={spec.namespace}" + assert spec.format("x{ name space =namespace}") == f"x name space ={spec.namespace}" + assert spec.format("x{ os =os}") == f"x os ={spec.os}" + + @pytest.mark.parametrize( + "fmt_str", ["{@name}", "{@version.concrete}", "{%compiler.version}", "{/hashd}"] + ) def test_spec_formatting_sigil_mismatches(self, default_mock_concretization, fmt_str): spec = default_mock_concretization("multivalue-variant cflags=-O2") From 10a4de8e04e0c4422d35935b979f23a99ad45bdf Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Fri, 2 Aug 2024 02:26:42 +0200 Subject: [PATCH 113/435] edm4hep: Add v0.99 release and deprecate older versions (#45516) * edm4hep: Add v0.99 and deprecated older versions * edm4hep: Fix nlohmann-json dependency version * Keep 0.10.5 undeprecated --- .../repos/builtin/packages/edm4hep/package.py | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/edm4hep/package.py b/var/spack/repos/builtin/packages/edm4hep/package.py index a908c0dd4d7b6a..b795086353535e 100644 --- a/var/spack/repos/builtin/packages/edm4hep/package.py +++ b/var/spack/repos/builtin/packages/edm4hep/package.py @@ -21,16 +21,33 @@ class Edm4hep(CMakePackage): license("Apache-2.0") version("main", branch="main") + version("0.99", sha256="3636e8c14474237029bf1a8be11c53b57ad3ed438fd70a7e9b87c5d08f1f2ea6") version("0.10.5", sha256="003c8e0c8e1d1844592d43d41384f4320586fbfa51d4d728ae0870b9c4f78d81") version( "0.10.4", sha256="76d51947525bc8a27b62f567033255da2e632d42d07a32ff578887948d56bd6f", deprecated=True, ) - version("0.10.3", sha256="0ba5e4e90376f750f9531831909160e3d7b9c2d1f020d7556f0d3977b7eaafcc") - version("0.10.2", sha256="c22c5c2f0fd1d09da9b734c1fa7ee546675fd2b047406db6ab8266e7657486d2") - version("0.10.1", sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed") - version("0.10", sha256="a95c917c19793cfad6b0959854a653c5ce698c965598cabd649d544da07712c0") + version( + "0.10.3", + sha256="0ba5e4e90376f750f9531831909160e3d7b9c2d1f020d7556f0d3977b7eaafcc", + deprecated=True, + ) + version( + "0.10.2", + sha256="c22c5c2f0fd1d09da9b734c1fa7ee546675fd2b047406db6ab8266e7657486d2", + deprecated=True, + ) + version( + "0.10.1", + sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed", + deprecated=True, + ) + version( + "0.10", + sha256="a95c917c19793cfad6b0959854a653c5ce698c965598cabd649d544da07712c0", + deprecated=True, + ) depends_on("cxx", type="build") # generated @@ -48,8 +65,9 @@ class Edm4hep(CMakePackage): depends_on("python", type="build") depends_on("root@6.08:") - depends_on("nlohmann-json@3.10:") - depends_on("podio@0.15:") + depends_on("nlohmann-json@3.10.5:") + depends_on("podio@1:", when="@0.99:") + depends_on("podio@0.15:", when="@:0.10.5") for _std in _cxxstd_values: depends_on("podio cxxstd=" + _std, when="cxxstd=" + _std) From e2d8b581db7e555d3eaa11a6f4ba4ee0f5ca2d4c Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Thu, 1 Aug 2024 17:37:35 -0700 Subject: [PATCH 114/435] py-glean-parser: new package (#45390) Signed-off-by: Teague Sterling Co-authored-by: Bernhard Kaindl --- .../packages/py-glean-parser/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-glean-parser/package.py diff --git a/var/spack/repos/builtin/packages/py-glean-parser/package.py b/var/spack/repos/builtin/packages/py-glean-parser/package.py new file mode 100644 index 00000000000000..515398f61cc817 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-glean-parser/package.py @@ -0,0 +1,26 @@ +# 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 PyGleanParser(PythonPackage): + """Parser tools for Mozilla's Glean telemetry.""" + + homepage = "https://mozilla.github.io/glean_parser/" + pypi = "glean_parser/glean_parser-14.3.0.tar.gz" + + license("MPL-2.0", checked_by="teaguesterling") + + version("14.3.0", sha256="b48d643029fb824b0b76adb2b4a00e88a49de4ec479ac9c5add52c511e9be481") + version("14.0.1", sha256="3e9e5f99ad8592300e364b70d6247b21c445774a73a2ad274677fb58a0065809") + + depends_on("py-appdirs@1.4:") + depends_on("py-click@7:") + depends_on("py-diskcache@4:") + depends_on("py-jinja2@2.10.1:") + depends_on("py-jsonschema@3.0.2:") + depends_on("py-pyyaml@5.3.1:") + depends_on("py-pytest-runner", type="build") + depends_on("py-setuptools-scm@7:", type="build") From e110e3c3af215c5e6ef0b5150e69287104c6daf6 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Thu, 1 Aug 2024 17:43:10 -0700 Subject: [PATCH 115/435] py-zstandard: new package (#45388) Signed-off-by: Teague Sterling Co-authored-by: Bernhard Kaindl --- .../builtin/packages/py-zstandard/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-zstandard/package.py diff --git a/var/spack/repos/builtin/packages/py-zstandard/package.py b/var/spack/repos/builtin/packages/py-zstandard/package.py new file mode 100644 index 00000000000000..36d1bbe3ce545a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-zstandard/package.py @@ -0,0 +1,20 @@ +# 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 PyZstandard(PythonPackage): + """Python bindings to the Zstandard (zstd) compression library.""" + + homepage = "https://github.com/indygreg/python-zstandard" + pypi = "zstandard/zstandard-0.22.0.tar.gz" + + license("BSD", checked_by="teaguesterling") + + version("0.22.0", sha256="8226a33c542bcb54cd6bd0a366067b610b41713b64c9abec1bc4533d69f51e70") + + depends_on("py-cffi@1.16.0:") + depends_on("py-setuptools@:68", type="build") + depends_on("zstd") From 5736d1e2067d2877b203e70172bb544f485673f6 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Thu, 1 Aug 2024 19:21:28 -0600 Subject: [PATCH 116/435] `py-xarray`: Update and ensure dask compatibility (#45537) * Add 2024.7 and new +viz variant as per pyproject.toml * Ensure dask/xarray versions are compatible --- .../builtin/packages/py-xarray/package.py | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-xarray/package.py b/var/spack/repos/builtin/packages/py-xarray/package.py index e8cdc8dec62f74..598fa653ff6776 100644 --- a/var/spack/repos/builtin/packages/py-xarray/package.py +++ b/var/spack/repos/builtin/packages/py-xarray/package.py @@ -25,6 +25,7 @@ class PyXarray(PythonPackage): license("Apache-2.0") + version("2024.7.0", sha256="4cae512d121a8522d41e66d942fb06c526bc1fd32c2c181d5fe62fe65b671638") version("2023.7.0", sha256="dace2fdbf1b7ff185d9c1226a24bf83c2ae52f3253dbfe80e17d1162600d055c") version("2022.3.0", sha256="398344bf7d170477aaceff70210e11ebd69af6b156fe13978054d25c48729440") version("0.18.2", sha256="5d2e72a228286fcf60f66e16876bd27629a1a70bf64822c565f16515c4d10284") @@ -38,6 +39,7 @@ class PyXarray(PythonPackage): variant("io", default=False, description="Build io backends") variant("parallel", default=False, description="Build parallel backend") + variant("viz", default=False, when="@2024.7.0:", description="Buid viz backends") # pyproject.toml depends_on("py-setuptools", when="@:0.15", type="build") @@ -64,6 +66,7 @@ class PyXarray(PythonPackage): depends_on("py-numpy@1.17:", when="@0.18:", type=("build", "run")) depends_on("py-numpy@1.18:", when="@0.20:", type=("build", "run")) depends_on("py-numpy@1.21:", when="@2023.7.0:", type=("build", "run")) + depends_on("py-numpy@1.23:", when="@2024.7.0:", type=("build", "run")) depends_on("py-pandas@0.15.0:", when="@0.9.1", type=("build", "run")) depends_on("py-pandas@0.19.2:", when="@0.11:0.13", type=("build", "run")) @@ -72,9 +75,11 @@ class PyXarray(PythonPackage): depends_on("py-pandas@1:", when="@0.18:", type=("build", "run")) depends_on("py-pandas@1.1:", when="@0.20:", type=("build", "run")) depends_on("py-pandas@1.4:", when="@2023.7.0:", type=("build", "run")) + depends_on("py-pandas@2.0:", when="@2024.7.0:", type=("build", "run")) depends_on("py-packaging@20:", when="@0.21:", type=("build", "run")) depends_on("py-packaging@21.3:", when="@2023.7.0:", type=("build", "run")) + depends_on("py-packaging@23.1:", when="@2024.7.0:", type=("build", "run")) depends_on("py-netcdf4", when="+io", type=("build", "run")) depends_on("py-h5netcdf", when="+io", type=("build", "run")) @@ -86,8 +91,22 @@ class PyXarray(PythonPackage): depends_on("py-rasterio", when="@:2022.3.0 +io", type=("build", "run")) depends_on("py-cfgrib", when="@:2022.3.0 +io", type=("build", "run")) depends_on("py-pooch", when="+io", type=("build", "run")) + + depends_on( + "py-dask@:2021 +array+dataframe+distributed+diagnostics+delayed", + when="@:2022.05.0 +parallel", + type=("build", "run"), + ) + + # xarray uses inline_array starting in v2022.06.0 which only exists + # since dask 2021.01.0 depends_on( - "py-dask+array+dataframe+distributed+diagnostics+delayed", - when="+parallel", + # +delayed is :2021.3.0 + "py-dask@2022: +array+dataframe+distributed+diagnostics", + when="@2022.06.0: +parallel", type=("build", "run"), ) + + depends_on("py-matplotlib", when="@2024.7.0: +viz", type=("build", "run")) + depends_on("py-seaborn", when="@2024.7.0: +viz", type=("build", "run")) + depends_on("py-nc-time-axis", when="@2024.7.0: +viz", type=("build", "run")) From c7a437573b707486b49a7211cee9c8769fa7c98a Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:51:33 -0400 Subject: [PATCH 117/435] py-tensorflow: change url for 2.16.1-rocm-enhanced (#45539) * change url for 2.16.1-rocm-enhanced * fix typo --- var/spack/repos/builtin/packages/py-tensorflow/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 4c34b1ffeaa714..5e7b2986b435a9 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -51,8 +51,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): version("2.16.1", sha256="c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d") version( "2.16.1-rocm-enhanced", - sha256="6765e85675734b8fe17bca3c0669aec2f9ee97699b413780bcf3c6f00661ce72", - url="https://github.com/ROCm/tensorflow-upstream/archive/refs/tags/r2.16-rocm-enhanced.tar.gz", + sha256="e1b63b1b5d5b014194ed33113c7fa7f26ecb8d36333282b8c550e795e0eb31c6", + url="https://github.com/ROCm/tensorflow-upstream/archive/refs/tags/v2.16.1-rocm-enhanced.tar.gz", ) version("2.15.1", sha256="f36416d831f06fe866e149c7cd752da410a11178b01ff5620e9f265511ed57cf") version("2.15.0", sha256="9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220") From a8d2ea68f54ed9cd941f40c8b283fbb6ce9ebf94 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Fri, 2 Aug 2024 04:20:22 +0200 Subject: [PATCH 118/435] gaudi: add versions 38.2 and 38.3 and limit the version of fmt (#45466) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/gaudi/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/gaudi/package.py b/var/spack/repos/builtin/packages/gaudi/package.py index 13a6d67a01b9b4..e3f928409e3b1d 100644 --- a/var/spack/repos/builtin/packages/gaudi/package.py +++ b/var/spack/repos/builtin/packages/gaudi/package.py @@ -17,6 +17,8 @@ class Gaudi(CMakePackage): tags = ["hep"] version("master", branch="master") + version("38.3", sha256="47e8c65ea446656d2dae54a32205525e08257778cf80f9f029cd244d6650486e") + version("38.2", sha256="08759b1398336987ad991602e37079f0744e8d8e4e3d5df2d253b8dedf925068") version("38.1", sha256="79d42833edcebc2099f91badb6f72708640c05f678cc4521a86e857f112486dc") version("38.0", sha256="52f2733fa0af760c079b3438bb9c7e36b28ea704f78b0085458e1918c11e1653") version("37.2", sha256="9b866caab46e182de98b59eddbde80d6fa0e670fe4a35906f1518b04bd99b2d2") @@ -87,6 +89,7 @@ class Gaudi(CMakePackage): depends_on("cppgsl") depends_on("fmt") depends_on("fmt@:8", when="@:36.9") + depends_on("fmt@:10", when="@:39.0") depends_on("intel-tbb@:2020.3", when="@:37.0") depends_on("tbb", when="@37.1:") depends_on("uuid") From b2ef64369f232de827edaed9d87cdea41c01229d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Thu, 1 Aug 2024 21:33:41 -0500 Subject: [PATCH 119/435] perl: add v5.40.0 (#45287) Co-authored-by: Bernhard Kaindl --- .../repos/builtin/packages/perl/package.py | 33 ++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index cb5f76f98cfd18..2246a6ea9a8707 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -34,32 +34,13 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package # see https://www.cpan.org/src/README.html for # explanation of version numbering scheme - # Maintenance releases (even numbers, preferred) - version( - "5.38.2", - sha256="a0a31534451eb7b83c7d6594a497543a54d488bc90ca00f5e34762577f40655e", - preferred=True, - ) - version( - "5.38.0", - sha256="213ef58089d2f2c972ea353517dc60ec3656f050dcc027666e118b508423e517", - preferred=True, - ) - version( - "5.36.3", - sha256="f2a1ad88116391a176262dd42dfc52ef22afb40f4c0e9810f15d561e6f1c726a", - preferred=True, - ) - version( - "5.36.1", - sha256="68203665d8ece02988fc77dc92fccbb297a83a4bb4b8d07558442f978da54cc1", - preferred=True, - ) - version( - "5.36.0", - sha256="e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a", - preferred=True, - ) + # Maintenance releases (even numbers) + version("5.40.0", sha256="c740348f357396327a9795d3e8323bafd0fe8a5c7835fc1cbaba0cc8dfe7161f") + version("5.38.2", sha256="a0a31534451eb7b83c7d6594a497543a54d488bc90ca00f5e34762577f40655e") + version("5.38.0", sha256="213ef58089d2f2c972ea353517dc60ec3656f050dcc027666e118b508423e517") + version("5.36.3", sha256="f2a1ad88116391a176262dd42dfc52ef22afb40f4c0e9810f15d561e6f1c726a") + version("5.36.1", sha256="68203665d8ece02988fc77dc92fccbb297a83a4bb4b8d07558442f978da54cc1") + version("5.36.0", sha256="e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a") # End of life releases (deprecated) version( From 445b6dfcf805414a87ce9a75ee31e294cfbc2a31 Mon Sep 17 00:00:00 2001 From: "Diego Alvarez S." Date: Thu, 1 Aug 2024 23:39:03 -0300 Subject: [PATCH 120/435] Add blast+ v2.15.0, v2.16.0 (#45425) --- var/spack/repos/builtin/packages/blast-plus/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/blast-plus/package.py b/var/spack/repos/builtin/packages/blast-plus/package.py index 2ab6ca28c718f6..cb5a3589bd5994 100644 --- a/var/spack/repos/builtin/packages/blast-plus/package.py +++ b/var/spack/repos/builtin/packages/blast-plus/package.py @@ -14,6 +14,8 @@ class BlastPlus(AutotoolsPackage): maintainers("weijianwen") + version("2.16.0", sha256="17c93cf009721023e5aecf5753f9c6a255d157561638b91b3ad7276fd6950c2b") + version("2.15.0", sha256="6918c370524c8d44e028bf491e8f245a895e07c66c77b261ce3b38d6058216e0") version("2.14.1", sha256="712c2dbdf0fb13cc1c2d4f4ef5dd1ce4b06c3b57e96dfea8f23e6e99f5b1650e") version("2.13.0", sha256="89553714d133daf28c477f83d333794b3c62e4148408c072a1b4620e5ec4feb2") version("2.12.0", sha256="fda3c9c9d488cad6c1880a98a236d842bcf3610e3e702af61f7a48cf0a714b88") From a3c3f4c3d13f0c7138d2c4c074dbe34ca3c28178 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Fri, 2 Aug 2024 04:40:15 +0200 Subject: [PATCH 121/435] root: Add patch to fix TUri (#45428) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/root/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index d797a4c33a45c3..bf037c87004c95 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -139,6 +139,13 @@ class Root(CMakePackage): when="@6.30:6.30.04", ) + # Fix TUri to be PCRE2 compatible + patch( + "https://github.com/root-project/root/pull/15988.patch?full_index=1", + sha256="9de4aa66f791dc3a1b9521995552b2d28b57be88a96a2e9e369977e32da26eb0", + when="@6.32.0:6.32.02", + ) + if sys.platform == "darwin": # Resolve non-standard use of uint, _cf_ # https://sft.its.cern.ch/jira/browse/ROOT-7886. From b781ce5b0f4ead6f5371cbae662c8189e29ad87b Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Thu, 1 Aug 2024 23:03:27 -0400 Subject: [PATCH 122/435] libspng: add maintainer, fix dependencies, args (#45410) * libspng: add maintainer, fix dependencies, args * Update var/spack/repos/builtin/packages/libspng/package.py Co-authored-by: Alec Scott * Fix syntax error * Update var/spack/repos/builtin/packages/libspng/package.py --------- Co-authored-by: Alec Scott --- var/spack/repos/builtin/packages/libspng/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libspng/package.py b/var/spack/repos/builtin/packages/libspng/package.py index 4849cb93dbe72d..b22165f58fcab4 100644 --- a/var/spack/repos/builtin/packages/libspng/package.py +++ b/var/spack/repos/builtin/packages/libspng/package.py @@ -14,10 +14,19 @@ class Libspng(CMakePackage): homepage = "https://github.com/randy408/libspng" url = "https://github.com/randy408/libspng/archive/refs/tags/v0.7.2.tar.gz" + maintainers("sethrj") + license("BSD-2-Clause") version("0.7.4", sha256="47ec02be6c0a6323044600a9221b049f63e1953faf816903e7383d4dc4234487") version("0.7.2", sha256="4acf25571d31f540d0b7ee004f5461d68158e0a13182505376805da99f4ccc4e") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("zlib") + + def cmake_args(self): + target = self.spec.target + return [ + self.define("BUILD_EXAMPLES", False), + self.define("ENABLE_OPT", target.vendor != "generic"), + ] From e8c8e7b8a8bd1f285b77236515a070107f0ef0bf Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:25:30 -0700 Subject: [PATCH 123/435] e4s oneapi ci: try enabling some disabled specs (#45355) --- .../stacks/e4s-oneapi/spack.yaml | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 504d1a4618e46e..0fe9aa55fc0f79 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -67,14 +67,16 @@ spack: specs: # CPU - - aml - adios + - alquimia + - aml - amrex - arborx - argobots - axom - bolt - boost + - bricks ~cuda - butterflypack - cabana - caliper @@ -82,15 +84,20 @@ spack: - charliecloud - conduit - datatransferkit + - dealii - drishti + - dxt-explorer + - ecp-data-vis-sdk ~cuda ~rocm +adios2 ~ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +ascent: fides: fides/xgc/XGCCommon.cxx:233:10: error: no member named 'iota' in namespace 'std'; +visit: visit_vtk/lightweight/vtkSkewLookupTable.C:32:10: error: cannot initialize return object of type 'unsigned char *' with an rvalue of type 'const unsigned char *' - exaworks - flecsi - flit - flux-core - fortrilinos - gasnet + - geopm-service - ginkgo - globalarrays + - glvis ^llvm - gmp - gotcha - gptune ~mpispawn @@ -106,7 +113,6 @@ spack: - kokkos-kernels +openmp - laghos - lammps - # - lbann # 2024.2 internal compiler error - legion - libnrm - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp @@ -116,6 +122,7 @@ spack: - mercury - metall - mfem + - mgard +serial +openmp +timing +unstructured ~cuda - mpark-variant - mpifileutils ~xattr - nccmp @@ -125,12 +132,13 @@ spack: - omega-h - openfoam - openmpi + - openpmd-api - papi - papyrus - parsec ~cuda + - pdt - petsc - phist - # - plasma # 2024.2 internal compiler error - plumed - precice - pruners-ninja @@ -152,12 +160,15 @@ spack: - sundials - superlu - superlu-dist + - swig@4.0.2-fortran - sz3 - tasmanian + - tau +mpi +python +syscall - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap - umpire + - upcxx - variorum - wannier90 - xyce +mpi +shared +pymi +pymi_static_tpls @@ -170,31 +181,21 @@ spack: - hdf5 - libcatalyst - parallel-netcdf - # - paraview # paraview: VTK/ThirdParty/cgns/vtkcgns/src/adfh/ADFH.c:2002:23: error: incompatible function pointer types passing 'herr_t (hid_t, const char *, const H5L_info1_t *, void *)' (aka 'int (long, const char *, const H5L_info1_t *, void *)') to parameter of type 'H5L_iterate2_t' (aka 'int (*)(long, const char *,const H5L_info2_t *, void *)') [-Wincompatible-function-pointer-types] + - paraview - py-cinemasci - sz - unifyfs - veloc - # - visit # silo: https://github.com/spack/spack/issues/39538 - - vtk-m ~openmp # https://github.com/spack/spack/issues/31830 + # - visit # visit: +visit: visit_vtk/lightweight/vtkSkewLookupTable.C:32:10: error: cannot initialize return object of type 'unsigned char *' with an rvalue of type 'const unsigned char *' + - vtk-m ~openmp - zfp # -- - # - alquimia # pflotran: https://github.com/spack/spack/issues/39474 - # - bricks ~cuda # bricks: /opt/intel/oneapi/compiler/2024.0/bin/sycl-post-link: error while loading shared libraries: libonnxruntime.1.12.22.721.so: cannot open shared object file: No such file or directory - # - cp2k +mpi # dbcsr - # - dealii # dealii: https://github.com/spack/spack/issues/39482 - # - dxt-explorer # r: https://github.com/spack/spack/issues/40257 - # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # embree: CMake Error at CMakeLists.txt:215 (MESSAGE): Unsupported compiler: IntelLLVM; qt: qtbase/src/corelib/global/qendian.h:333:54: error: incomplete type 'std::numeric_limits' used in nested name specifier - # - geopm # geopm issue: https://github.com/spack/spack/issues/38795 - # - glvis ^llvm # glvis: https://github.com/spack/spack/issues/42839 - # - hpctoolkit # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc - # - mgard +serial +openmp +timing +unstructured ~cuda # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing] - # - openpmd-api # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing] - # - pdt # pdt: pdbType.cc:193:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] - # - quantum-espresso # quantum-espresso@7.2 /i3fqdx5: warning: :0:0: loop not unroll-and-jammed: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering - # - swig@4.0.2-fortran # ? - # - tau +mpi +python +syscall # pdt: pdbType.cc:193:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] - # - upcxx # upcxx: /opt/intel/oneapi/mpi/2021.10.0//libfabric/bin/fi_info: error while loading shared libraries: libfabric.so.1: cannot open shared object file: No such file or directory + # - cp2k +mpi # dbcsr: dbcsr_api.F(973): #error: incomplete macro call DBCSR_ABORT. + # - geopm-runtime # libelf: configure: error: installation or configuration problem: C compiler cannot create executables. + # - hpctoolkit # dyninst@13.0.0%gcc: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy' + # - lbann # 2024.2 internal compiler error + # - plasma # 2024.2 internal compiler error + # - quantum-espresso # quantum-espresso: external/mbd/src/mbd_c_api.F90(392): error #6645: The name of the module procedure conflicts with a name in the encompassing scoping unit. [F_C_STRING] # PYTHON PACKAGES - opencv +python3 @@ -232,8 +233,8 @@ spack: - upcxx +level_zero # -- # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc - # - slate +sycl # blaspp: CMake Error at CMakeLists.txt:313 (find_package): ... set MKL_FOUND to FALSE so package "MKL" is considered to be NOT FOUND. - # - warpx compute=sycl # warpx: spack-build-wzp6vvo/_deps/fetchedamrex-src/Src/Base/AMReX_RandomEngine.H:18:10: fatal error: 'oneapi/mkl/rng/device.hpp' file not found + # - slate +sycl # slate: ifx: error #10426: option '-fopenmp-targets' requires '-fiopenmp' + # - warpx compute=sycl # warpx: fetchedamrex-src/Src/Base/AMReX_RandomEngine.H:18:10: fatal error: 'oneapi/mkl/rng/device.hpp' file not found ci: From 53815b725a19c273198a09a3709dd52a3312c502 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:45:44 +0200 Subject: [PATCH 124/435] groff: Add missing depends_on("m4") (#45552) --- var/spack/repos/builtin/packages/groff/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/groff/package.py b/var/spack/repos/builtin/packages/groff/package.py index 252bfe7e576ebc..47a216b5190475 100644 --- a/var/spack/repos/builtin/packages/groff/package.py +++ b/var/spack/repos/builtin/packages/groff/package.py @@ -44,6 +44,7 @@ class Groff(AutotoolsPackage, GNUMirrorPackage): conflicts("+uchardet", when="@:1.22.3") + depends_on("m4", type="build") depends_on("gawk", type="build") depends_on("gmake", type="build") depends_on("sed", type="build") From 4e087349a469aee354493b851bb46c2aeec28a68 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 2 Aug 2024 03:04:56 -0500 Subject: [PATCH 125/435] py-particle: add v0.23.1, v0.24.0 (#45528) * py-particle: add v0.23.1, v0.24.0 * [@spackbot] updating style on behalf of wdconinc --------- Co-authored-by: wdconinc --- var/spack/repos/builtin/packages/py-particle/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-particle/package.py b/var/spack/repos/builtin/packages/py-particle/package.py index ab4aedaa66ec52..b2be054548b933 100644 --- a/var/spack/repos/builtin/packages/py-particle/package.py +++ b/var/spack/repos/builtin/packages/py-particle/package.py @@ -22,6 +22,8 @@ class PyParticle(PythonPackage): license("BSD-3-Clause") version("master", branch="master") + version("0.24.0", sha256="8ab4b5dd4547ba2dae8354955a435210892a575dff46f323cac6cf40600b976a") + version("0.23.1", sha256="eee28b0e846bfea4dfd70e9ec5ffe3244613db08b6b6a9b773f55a4310752fab") version("0.23.0", sha256="d810f8fc27deb8e7fd64174017d9607d50522249c0973a0008e580f93db11750") version("0.22.1", sha256="dcb45025cf7cff901e2c94922d150e1103245c46f2671eae4193c5fa767cc56c") version("0.22.0", sha256="567bb3017cb7526f9c9ef4399e9ba5acbdb5b9ce93eb18e4da6479d3181c93a5") @@ -41,13 +43,15 @@ class PyParticle(PythonPackage): depends_on("python@2.7:2.8,3.5:", when="@:0.19", type=("build", "run")) depends_on("python@3.6:", when="@0.20:", type=("build", "run")) depends_on("python@3.7:", when="@0.21:", type=("build", "run")) + depends_on("python@3.8:", when="@0.24:", type=("build", "run")) depends_on("py-setuptools", when="@:0.20", type="build") depends_on("py-setuptools-scm@3.4:+toml", when="@:0.20", type="build") depends_on("py-hatchling", when="@0.21:", type="build") depends_on("py-hatch-vcs", when="@0.21:", type="build") depends_on("py-importlib-resources@2:", when="@0.16: ^python@:3.8", type=("build", "run")) - depends_on("py-typing-extensions", when="@0.16: ^python@:3.7", type=("build", "run")) - depends_on("py-deprecated", when="@0.22.0:", type=("build", "run")) + depends_on("py-typing-extensions@4.5:", when="@0.23.1: ^python@:3.12", type=("build", "run")) + depends_on("py-typing-extensions", when="@0.16:0.23.0 ^python@:3.7", type=("build", "run")) + depends_on("py-deprecated", when="@0.22.0:0.23.0", type=("build", "run")) depends_on("py-attrs@19.2.0:", type=("build", "run")) depends_on("py-hepunits@1.2.0:", when="@:0.12", type=("build", "run")) From 53bc782278ecb709bdac16ccd64d9f7293d2f6ef Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 2 Aug 2024 10:11:24 +0200 Subject: [PATCH 126/435] pthreadpool: use same flags as PyTorch (#45521) --- .../repos/builtin/packages/pthreadpool/package.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/pthreadpool/package.py b/var/spack/repos/builtin/packages/pthreadpool/package.py index 3a60f89d0835be..2754fef9b7c6b7 100644 --- a/var/spack/repos/builtin/packages/pthreadpool/package.py +++ b/var/spack/repos/builtin/packages/pthreadpool/package.py @@ -15,7 +15,7 @@ class Pthreadpool(CMakePackage): license("BSD-2-Clause") version("master", branch="master") - version("2023-08-29", commit="4fe0e1e183925bf8cfa6aae24237e724a96479b8") # py-torch@2.2 + version("2023-08-29", commit="4fe0e1e183925bf8cfa6aae24237e724a96479b8") # py-torch@2.2: version("2021-04-13", commit="a134dd5d4cee80cce15db81a72e7f929d71dd413") # py-torch@1.9:2.1 version("2020-10-05", commit="fa75e65a58a5c70c09c30d17a1fe1c1dff1093ae") # py-torch@1.8 version("2020-06-15", commit="029c88620802e1361ccf41d1970bd5b07fd6b7bb") # py-torch@1.6:1.7 @@ -23,8 +23,8 @@ class Pthreadpool(CMakePackage): version("2018-10-08", commit="13da0b4c21d17f94150713366420baaf1b5a46f4") # py-torch@1.0:1.4 version("2018-02-25", commit="2b06b31f6a315162348e1f3c24325eedaf6cc559") # py-torch@:0.4 - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") generator("ninja") depends_on("cmake@3.5:", type="build") @@ -54,7 +54,6 @@ class Pthreadpool(CMakePackage): def cmake_args(self): return [ - self.define("BUILD_SHARED_LIBS", True), self.define("FXDIV_SOURCE_DIR", join_path(self.stage.source_path, "deps", "fxdiv")), self.define( "GOOGLETEST_SOURCE_DIR", join_path(self.stage.source_path, "deps", "googletest") @@ -63,6 +62,9 @@ def cmake_args(self): "GOOGLEBENCHMARK_SOURCE_DIR", join_path(self.stage.source_path, "deps", "googlebenchmark"), ), - self.define("PTHREADPOOL_BUILD_TESTS", self.run_tests), - self.define("PTHREADPOOL_BUILD_BENCHMARKS", self.run_tests), + # https://github.com/pytorch/pytorch/blob/main/cmake/Dependencies.cmake + self.define("PTHREADPOOL_BUILD_TESTS", False), + self.define("PTHREADPOOL_BUILD_BENCHMARKS", False), + self.define("PTHREADPOOL_LIBRARY_TYPE", "static"), + self.define("PTHREADPOOL_ALLOW_DEPRECATED_API", True), ] From 4c60deb9921ff2cbbfa6771f4f63ff812a8a5840 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 2 Aug 2024 03:24:00 -0500 Subject: [PATCH 127/435] xrootd: add github as secondary url to avoid SSL issues (#45512) --- var/spack/repos/builtin/packages/xrootd/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py index c40619922ecfeb..1f374ffeffc67b 100644 --- a/var/spack/repos/builtin/packages/xrootd/package.py +++ b/var/spack/repos/builtin/packages/xrootd/package.py @@ -12,7 +12,10 @@ class Xrootd(CMakePackage): tolerant access to data repositories of many kinds.""" homepage = "https://xrootd.slac.stanford.edu" - url = "https://xrootd.slac.stanford.edu/download/v5.5.1/xrootd-5.5.1.tar.gz" + urls = [ + "https://xrootd.slac.stanford.edu/download/v5.7.0/xrootd-5.7.0.tar.gz", + "https://github.com/xrootd/xrootd/releases/download/v5.7.0/xrootd-5.7.0.tar.gz", + ] list_url = "https://xrootd.slac.stanford.edu/dload.html" git = "https://github.com/xrootd/xrootd.git" From 9ef1d609e20c1938f3a12ee66e405f114417555a Mon Sep 17 00:00:00 2001 From: jgraciahlrs Date: Fri, 2 Aug 2024 10:28:25 +0200 Subject: [PATCH 128/435] py-markupsafe: add depends_on("python@3.7:", when="@2.0:") (#45503) As per PyPI, recent versions of py-markupsafe (>=2) require Python >=3.7. --- var/spack/repos/builtin/packages/py-markupsafe/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py index b4f411d18b4854..59a1099651e655 100644 --- a/var/spack/repos/builtin/packages/py-markupsafe/package.py +++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py @@ -32,3 +32,4 @@ class PyMarkupsafe(PythonPackage): depends_on("c", type="build") # generated depends_on("py-setuptools", type="build") + depends_on("python@3.7:", when="@2.0:") From 2626bff96dff441376a55cd5bdb690524bd9d749 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 2 Aug 2024 10:33:37 +0200 Subject: [PATCH 129/435] py-numpy: "@1.23:" add conflict for "%gcc@:6.4" (#45468) --- var/spack/repos/builtin/packages/py-numpy/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 02fc694df90743..83554f5561888f 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -161,6 +161,7 @@ class PyNumpy(PythonPackage): # meson.build # https://docs.scipy.org/doc/scipy/dev/toolchain.html#compilers conflicts("%gcc@:8.3", when="@1.26:", msg="NumPy requires GCC >= 8.4") + conflicts("%gcc@:6.4", when="@1.23:", msg="NumPy requires GCC >= 6.5") conflicts("%gcc@:4.7", msg="NumPy requires GCC >= 4.8") conflicts( "%msvc@:19.19", From 4af09dd5065b021b80a97799db31cd933e8f4ac5 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:10:53 -0700 Subject: [PATCH 130/435] ip2: remove 'generated' tags (which are correct) (#45447) --- var/spack/repos/builtin/packages/ip2/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/ip2/package.py b/var/spack/repos/builtin/packages/ip2/package.py index 7b7bd68ed4e5c6..ed228022d4b20d 100644 --- a/var/spack/repos/builtin/packages/ip2/package.py +++ b/var/spack/repos/builtin/packages/ip2/package.py @@ -25,8 +25,8 @@ class Ip2(CMakePackage): deprecated=True, ) - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") depends_on("sp") requires("^sp precision=4,8,d", when="^sp@2.4:") From 091786411bde435aae0c71f1a03e1b205e64e0f2 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:11:26 -0700 Subject: [PATCH 131/435] grib-util: remove 'generated' tags (which are correct) (#45445) --- var/spack/repos/builtin/packages/grib-util/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/grib-util/package.py b/var/spack/repos/builtin/packages/grib-util/package.py index f6deb62ea47110..b8e2aaee371310 100644 --- a/var/spack/repos/builtin/packages/grib-util/package.py +++ b/var/spack/repos/builtin/packages/grib-util/package.py @@ -24,8 +24,8 @@ class GribUtil(CMakePackage): version("1.2.4", sha256="f021d6df3186890b0b1781616dabf953581d71db63e7c2913360336985ccaec7") version("1.2.3", sha256="b17b08e12360bb8ad01298e615f1b4198e304b0443b6db35fe990a817e648ad5") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("openmp", default=False, description="Use OpenMP multithreading") variant("tests", default=False, description="Enable this variant when installing with --test") From 3e6d9cdc067098d0781fc947aea1468517f1d187 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:12:29 -0700 Subject: [PATCH 132/435] g2tmpl: remove 'generated' tags (which are correct) (#45443) --- var/spack/repos/builtin/packages/g2tmpl/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/g2tmpl/package.py b/var/spack/repos/builtin/packages/g2tmpl/package.py index 312c68b3d83208..7813d9624e2427 100644 --- a/var/spack/repos/builtin/packages/g2tmpl/package.py +++ b/var/spack/repos/builtin/packages/g2tmpl/package.py @@ -24,8 +24,8 @@ class G2tmpl(CMakePackage): version("1.10.1", sha256="0be425e5128fabb89915a92261aa75c27a46a3e115e00c686fc311321e5d1e2a") version("1.10.0", sha256="dcc0e40b8952f91d518c59df7af64e099131c17d85d910075bfa474c8822649d") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("shared", default=False, description="Build shared library") From dddc056a29c51e49c3bb9b63e428ad58c20d48b6 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:13:03 -0700 Subject: [PATCH 133/435] prod-util: remove 'generated' tags (which are correct) (#45452) --- var/spack/repos/builtin/packages/prod-util/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/prod-util/package.py b/var/spack/repos/builtin/packages/prod-util/package.py index 45781b303c11ac..e7c5b37485713b 100644 --- a/var/spack/repos/builtin/packages/prod-util/package.py +++ b/var/spack/repos/builtin/packages/prod-util/package.py @@ -27,8 +27,8 @@ class ProdUtil(CMakePackage): deprecated=True, ) - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") depends_on("w3nco", when="@1") depends_on("w3emc", when="@2:") From 93799ec641d7af892f11c3b6dad78d5f0ac216f9 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:13:33 -0700 Subject: [PATCH 134/435] w3nco: remove 'generated' tags (which are correct) (#45457) --- var/spack/repos/builtin/packages/w3nco/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/w3nco/package.py b/var/spack/repos/builtin/packages/w3nco/package.py index c8de32376eb16a..ef757778ff23ec 100644 --- a/var/spack/repos/builtin/packages/w3nco/package.py +++ b/var/spack/repos/builtin/packages/w3nco/package.py @@ -20,8 +20,8 @@ class W3nco(CMakePackage): version("2.4.1", sha256="48b06e0ea21d3d0fd5d5c4e7eb50b081402567c1bff6c4abf4fd4f3669070139") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") def flag_handler(self, name, flags): if name == "cflags": From f276a8da759e1169b212a3ea88143dc3f6697154 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:16:05 -0700 Subject: [PATCH 135/435] w3emc: add @2.12.0, conflict on +shared~pic (#45456) --- var/spack/repos/builtin/packages/w3emc/package.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/w3emc/package.py b/var/spack/repos/builtin/packages/w3emc/package.py index ecbd078f8100b7..9388a7da7e200d 100644 --- a/var/spack/repos/builtin/packages/w3emc/package.py +++ b/var/spack/repos/builtin/packages/w3emc/package.py @@ -19,6 +19,7 @@ class W3emc(CMakePackage): maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett") version("develop", branch="develop") + version("2.12.0", sha256="77c0732541ade1deb381f5a208547ccc36e65efa91c8f7021b299b20a6ae0d27") version("2.11.0", sha256="53a03d03421c5da699b026ca220512ed494a531b83284693f66d2579d570c43b") version("2.10.0", sha256="366b55a0425fc3e729ecb9f3b236250349399fe4c8e19f325500463043fd2f18") version("2.9.3", sha256="9ca1b08dd13dfbad4a955257ae0cf38d2e300ccd8d983606212bc982370a29bc") @@ -27,8 +28,8 @@ class W3emc(CMakePackage): version("2.9.0", sha256="994f59635ab91e34e96cab5fbaf8de54389d09461c7bac33b3104a1187e6c98a") version("2.7.3", sha256="eace811a1365f69b85fdf2bcd93a9d963ba72de5a7111e6fa7c0e6578b69bfbc") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("pic", default=True, description="Build with position-independent-code") variant("bufr", default=False, description="Build with BUFR routines", when="@2.10:") @@ -45,10 +46,17 @@ class W3emc(CMakePackage): "extradeps", default=False, description="Build w3emc with subprograms which call unknown dependencies", - when="@2.10:", + when="@2.10:2.11", + ) + variant( + "build_deprecated", + default=False, + description="Build deprecated subroutines", + when="@2.12:", ) conflicts("+shared +extradeps", msg="Shared library cannot be built with unknown dependencies") + conflicts("+shared ~pic", msg="Shared library requires PIC") depends_on("bufr", when="@2.10: +bufr") depends_on("bacio", when="@2.9.2:") @@ -82,6 +90,7 @@ def cmake_args(self): self.define("BUILD_8", self.spec.satisfies("precision=8")), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("BUILD_WITH_EXTRA_DEPS", "extradeps"), + self.define_from_variant("BUILD_DEPRECATED", "build_deprecated"), ] return args From 90b85239d558af03c46a08a41329d218c31da67c Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:16:45 -0700 Subject: [PATCH 136/435] wrf-io: remove 'generated' tags (which are correct) (#45458) --- var/spack/repos/builtin/packages/wrf-io/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/wrf-io/package.py b/var/spack/repos/builtin/packages/wrf-io/package.py index 1d8353fa559601..b63725927b2669 100644 --- a/var/spack/repos/builtin/packages/wrf-io/package.py +++ b/var/spack/repos/builtin/packages/wrf-io/package.py @@ -22,8 +22,8 @@ class WrfIo(CMakePackage): version("develop", branch="develop") version("1.2.0", sha256="000cf5294a2c68460085258186e1f36c86d3d0d9c433aa969a0f92736b745617") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("openmp", default=False, description="Enable multithreading with OpenMP") From 251190a0c4c4ae1172c94359a17a36b86721642f Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:19:41 -0700 Subject: [PATCH 137/435] sigio: add unit testing with pfunit (#45454) --- var/spack/repos/builtin/packages/sigio/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/sigio/package.py b/var/spack/repos/builtin/packages/sigio/package.py index 681b46b7626431..6e1a39353f25e4 100644 --- a/var/spack/repos/builtin/packages/sigio/package.py +++ b/var/spack/repos/builtin/packages/sigio/package.py @@ -21,7 +21,11 @@ class Sigio(CMakePackage): version("develop", branch="develop") version("2.3.2", sha256="333f3cf3a97f97103cbafcafc2ad89b24faa55b1332a98adc1637855e8a5b613") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") + + def cmake_args(self): + args = [self.define("ENABLE_TESTS", self.run_tests)] + return args def setup_run_environment(self, env): lib = find_libraries("libsigio", root=self.prefix, shared=False, recursive=True) @@ -35,3 +39,7 @@ def flag_handler(self, name, flags): if name == "fflags": flags.append("-Free") return (None, None, flags) + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From 2e85c8330117d7aa1897737e66ebe0d0c988b301 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:20:44 -0700 Subject: [PATCH 138/435] sfcio: add unit testing with pfunit (#45453) --- var/spack/repos/builtin/packages/sfcio/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/sfcio/package.py b/var/spack/repos/builtin/packages/sfcio/package.py index fc0141a966a550..bec48d809bb2cb 100644 --- a/var/spack/repos/builtin/packages/sfcio/package.py +++ b/var/spack/repos/builtin/packages/sfcio/package.py @@ -21,7 +21,13 @@ class Sfcio(CMakePackage): version("develop", branch="develop") version("1.4.1", sha256="d9f900cf18ec1a839b4128c069b1336317ffc682086283443354896746b89c59") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") + + depends_on("pfunit", type="test") + + def cmake_args(self): + args = [self.define("ENABLE_TESTS", self.run_tests)] + return args def setup_run_environment(self, env): lib = find_libraries("libsfcio", root=self.prefix, shared=False, recursive=True) @@ -35,3 +41,7 @@ def flag_handler(self, name, flags): if name == "fflags": flags.append("-Free") return (None, None, flags) + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From 7791a30bc25d2cc2955a906d1aa9213b42e26098 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:21:35 -0700 Subject: [PATCH 139/435] nemsiogfs: add running the unit tests (#45451) --- var/spack/repos/builtin/packages/nemsiogfs/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/nemsiogfs/package.py b/var/spack/repos/builtin/packages/nemsiogfs/package.py index 40b27022b7c5b5..e38f5a0adf2a33 100644 --- a/var/spack/repos/builtin/packages/nemsiogfs/package.py +++ b/var/spack/repos/builtin/packages/nemsiogfs/package.py @@ -21,6 +21,10 @@ class Nemsiogfs(CMakePackage): version("develop", branch="develop") version("2.5.3", sha256="bf84206b08c8779787bef33e4aba18404df05f8b2fdd20fc40b3af608ae4b9af") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") depends_on("nemsio") + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From 9f795de60bccf0960fdf949772bf6e7c5194850a Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:22:20 -0700 Subject: [PATCH 140/435] nemsio: add check to run the unit tests (#45450) --- var/spack/repos/builtin/packages/nemsio/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/nemsio/package.py b/var/spack/repos/builtin/packages/nemsio/package.py index f6fe0827accecc..0677376d154ebc 100644 --- a/var/spack/repos/builtin/packages/nemsio/package.py +++ b/var/spack/repos/builtin/packages/nemsio/package.py @@ -28,7 +28,7 @@ class Nemsio(CMakePackage): version("2.5.3", sha256="3fe8a781fc96197803d369cafe0138f3a5cbbca9816a7f8fd57567a1719a4d49") version("2.5.2", sha256="c59e9379969690de8d030cbf4bbbbe3726faf13c304f3b88b0f6aec1496d2c08") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") depends_on("bacio") depends_on("mpi", when="+mpi") @@ -46,3 +46,7 @@ def cmake_args(self): args.append(self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc)) return args + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From e5a8d7be49e6065795ccd4d23f2a4cdd15f1b4a3 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:24:54 -0700 Subject: [PATCH 141/435] gfsio: add testing with pfunit (#45444) --- var/spack/repos/builtin/packages/gfsio/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gfsio/package.py b/var/spack/repos/builtin/packages/gfsio/package.py index f78b623269dceb..1a9ff4d22e2a70 100644 --- a/var/spack/repos/builtin/packages/gfsio/package.py +++ b/var/spack/repos/builtin/packages/gfsio/package.py @@ -21,7 +21,13 @@ class Gfsio(CMakePackage): version("develop", branch="develop") version("1.4.1", sha256="eab106302f520600decc4f9665d7c6a55e7b4901fab6d9ef40f29702b89b69b1") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") + + depends_on("pfunit", type="test") + + def cmake_args(self): + args = [self.define("ENABLE_TESTS", self.run_tests)] + return args def setup_run_environment(self, env): lib = find_libraries("libgfsio", root=self.prefix, shared=False, recursive=True) @@ -35,3 +41,7 @@ def flag_handler(self, name, flags): if name == "fflags": flags.append("-Free") return (None, None, flags) + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From 835bd2557e2292dee1e978e6bb85ddb5dec5cde7 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:25:31 -0700 Subject: [PATCH 142/435] g2c: remove the 'generated' tag (which is correct) (#45442) --- var/spack/repos/builtin/packages/g2c/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/g2c/package.py b/var/spack/repos/builtin/packages/g2c/package.py index 28ce23efd1230c..1ddc6fe37a7313 100644 --- a/var/spack/repos/builtin/packages/g2c/package.py +++ b/var/spack/repos/builtin/packages/g2c/package.py @@ -24,7 +24,7 @@ class G2c(CMakePackage): version("1.6.4", sha256="5129a772572a358296b05fbe846bd390c6a501254588c6a223623649aefacb9d") version("1.6.2", sha256="b5384b48e108293d7f764cdad458ac8ce436f26be330b02c69c2a75bb7eb9a2c") - depends_on("c", type="build") # generated + depends_on("c", type="build") variant("aec", default=True, description="Use AEC library") variant("png", default=True, description="Use PNG library") From 81fb1a9b8f5d92d80e8b0853c12b033240ba6436 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:33:37 -0700 Subject: [PATCH 143/435] bacio: remove an old maintainer and 'generated' tags (#45440) --- var/spack/repos/builtin/packages/bacio/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/bacio/package.py b/var/spack/repos/builtin/packages/bacio/package.py index 1bf0e9f842e030..676dab9849498d 100644 --- a/var/spack/repos/builtin/packages/bacio/package.py +++ b/var/spack/repos/builtin/packages/bacio/package.py @@ -7,7 +7,7 @@ class Bacio(CMakePackage): - """The bacio ibrary performs binary I/O for the NCEP models, processing + """The bacio library performs binary I/O for the NCEP models, processing unformatted byte-addressable data records, and transforming the little endian files and big endian files.""" @@ -15,15 +15,15 @@ class Bacio(CMakePackage): url = "https://github.com/NOAA-EMC/NCEPLIBS-bacio/archive/refs/tags/v2.4.1.tar.gz" git = "https://github.com/NOAA-EMC/NCEPLIBS-bacio" - maintainers("t-brown", "edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA") + maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA") version("develop", branch="develop") version("2.6.0", sha256="03fef581e1bd3710fb8d2f2659a6c3e01a0437c1350ba53958d2ff1ffef47bcb") version("2.5.0", sha256="540a0ed73941d70dbf5d7b21d5d0a441e76fad2bfe37dfdfea0db3e98fc0fbfb") version("2.4.1", sha256="7b9b6ba0a288f438bfba6a08b6e47f8133f7dba472a74ac56a5454e2260a7200") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("pic", default=True, description="Build with position-independent-code") variant("shared", default=False, description="Build shared library", when="@2.6.0:") From 7c5771ed11459af785f62866f193eac0b9bbf55e Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 2 Aug 2024 02:36:01 -0700 Subject: [PATCH 144/435] ncio: add check function to run unit tests (#45448) --- var/spack/repos/builtin/packages/ncio/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ncio/package.py b/var/spack/repos/builtin/packages/ncio/package.py index 2af462841b51d9..d710a81923fb6b 100644 --- a/var/spack/repos/builtin/packages/ncio/package.py +++ b/var/spack/repos/builtin/packages/ncio/package.py @@ -24,7 +24,7 @@ class Ncio(CMakePackage): version("1.1.0", sha256="9de05cf3b8b1291010197737666cede3d621605806379b528d2146c4f02d08f6") version("1.0.0", sha256="2e2630b26513bf7b0665619c6c3475fe171a9d8b930e9242f5546ddf54749bd4") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") depends_on("mpi") depends_on("netcdf-fortran") @@ -34,3 +34,7 @@ def setup_run_environment(self, env): env.set("NCIO_LIB", lib[0]) env.set("NCIO_INC", join_path(self.prefix, "include")) env.set("NCIO_LIBDIR", lib[0]) + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From ff30da7385600931faebf9e20f7ab2dc0e283d0f Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Fri, 2 Aug 2024 06:29:36 -0700 Subject: [PATCH 145/435] py-glean-sdk: new package (#45389) Signed-off-by: Teague Sterling Co-authored-by: Bernhard Kaindl --- .../builtin/packages/py-glean-sdk/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-glean-sdk/package.py diff --git a/var/spack/repos/builtin/packages/py-glean-sdk/package.py b/var/spack/repos/builtin/packages/py-glean-sdk/package.py new file mode 100644 index 00000000000000..1c18c1a738aba2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-glean-sdk/package.py @@ -0,0 +1,23 @@ +# 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 PyGleanSdk(PythonPackage): + """Mozilla's Glean Telemetry SDK""" + + homepage = "https://mozilla.github.io/glean/book/index.html" + url = "https://github.com/mozilla/glean/archive/refs/tags/v60.4.0.tar.gz" + + license("MPL-2.0", checked_by="teaguesterling") + + version("60.4.0", sha256="24bc608e06580962ce029cc4c09a51af75e4a29b3d889232b298f87208acbf62") + version("60.0.1", sha256="160d054b27b8ef221cfd143b531d120ed0ee6a3d0e858eb80560f56dcfb12f35") + + depends_on("python@3.8:") + depends_on("py-semver@2.13.0:") + depends_on("py-glean-parser@14.0", when="@:60.3") + depends_on("py-glean-parser@14.3:", when="@60.4:") + depends_on("py-maturin@1") From 8538b0c01dd2c29bbb7d5ca6db59bbc549c4c20d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 2 Aug 2024 09:33:17 -0500 Subject: [PATCH 146/435] xmlto: hotfix upstream patch removed by fedora (#45551) --- var/spack/repos/builtin/packages/xmlto/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/xmlto/package.py b/var/spack/repos/builtin/packages/xmlto/package.py index 6b87b226c6c62b..dec27de960b72d 100644 --- a/var/spack/repos/builtin/packages/xmlto/package.py +++ b/var/spack/repos/builtin/packages/xmlto/package.py @@ -30,10 +30,10 @@ class Xmlto(AutotoolsPackage): depends_on("docbook-xml", type="run") patch( - "https://src.fedoraproject.org/rpms/xmlto/raw/rawhide/f/xmlto-c99-1.patch", + "https://src.fedoraproject.org/rpms/xmlto/raw/571fc033c0ff5d6cf448e2ca20d8ae8ac61a7cb8/f/xmlto-c99-1.patch", sha256="056c8bebc25d8d1488cc6a3724e2bcafc0e5e0df5c50080559cdef99bd377839", ) patch( - "https://src.fedoraproject.org/rpms/xmlto/raw/rawhide/f/xmlto-c99-2.patch", + "https://src.fedoraproject.org/rpms/xmlto/raw/571fc033c0ff5d6cf448e2ca20d8ae8ac61a7cb8/f/xmlto-c99-2.patch", sha256="50e39b1810bbf22a1d67944086c5681bcd58b8c325dfb251d56ac15d088fc17a", ) From a2cbc46dbc1a7ba3799d44c04c57060e80cd2180 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 2 Aug 2024 13:19:06 -0500 Subject: [PATCH 147/435] openblas: fix AttributeError when threads=openmp (#45338) --- var/spack/repos/builtin/packages/openblas/package.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 74961d16aaee93..ae9f2e6070385d 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -570,17 +570,19 @@ def check_install(self): # Openblas may pass its own test but still fail to compile Lapack # symbols. To make sure we get working Blas and Lapack, do a small # test. - source_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.c") - blessed_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.output") + source_file = join_path(os.path.dirname(self.pkg.module.__file__), "test_cblas_dgemm.c") + blessed_file = join_path( + os.path.dirname(self.pkg.module.__file__), "test_cblas_dgemm.output" + ) include_flags = spec["openblas"].headers.cpp_flags link_flags = spec["openblas"].libs.ld_flags - if self.compiler.name == "intel": + if self.pkg.compiler.name == "intel": link_flags += " -lifcore" if self.spec.satisfies("threads=pthreads"): link_flags += " -lpthread" if spec.satisfies("threads=openmp"): - link_flags += " -lpthread " + self.compiler.openmp_flag + link_flags += " -lpthread " + self.pkg.compiler.openmp_flag output = compile_c_and_execute(source_file, [include_flags], link_flags.split()) compare_output_file(output, blessed_file) From 425bba2f1ace61fc7a4b3a7100bd3997debfef44 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 2 Aug 2024 13:38:14 -0500 Subject: [PATCH 148/435] Allow spec queries by `namespace` (#45416) * Allow spec queries by `namespace` Spack specs have "namespaces" that indicate what package repository they come from, but there has not been a way to use the spec syntax to match one. You can say things like this: ```console spack find builtin.zlib spack find myrepo.zlib ``` But, because namespaces are written as a dot-separated prefix on the name, you can't say "find me all specs in namespace myrepo". The syntax doesn't allow it. This PR allows you to specify anonymous specs with namespaces on the CLI. Specifically you can do queries like this: ```console spack find namespace=builtin spack find namespace=myrepo ``` You can use this anywhere else you use spec syntax, e.g. in a config file to separate installations based on what repo they came from: ```yaml spack: config: install_tree: root: $spack/opt/spack projections: namespace=myrepo: "myrepo_special_path/{name}-{hash}" namespace=builtin: "builtin/{name}-{hash}" ``` This PR adds a special `namespace_if_anonymous` attribute to specs, which returns the `namespace` if the spec has no name, otherwise it returns `None`. This allows us to print the namespace for anonymous specs but to continue hiding it for most views, as we've done so far. This is implemented as a special case, but it's one that already exists, along with `platform`, `os`, `target`, etc. This also reserves existing special case names for variants so that users cannot define them in their package files. This change is potentially breaking, but I do not think it will be common. There are no builtin packages with a variant called `namespace`, and defining `os`, `target`, or `platform` as a variant would've likely caused other problems if they were already being used. Signed-off-by: Todd Gamblin --- lib/spack/spack/directives.py | 12 ++- lib/spack/spack/parser.py | 63 ++++++++----- lib/spack/spack/spec.py | 43 ++++----- lib/spack/spack/test/spec_semantics.py | 27 +++++- lib/spack/spack/test/spec_syntax.py | 94 +++++++++---------- .../builtin/packages/babelstream/package.py | 4 +- 6 files changed, 136 insertions(+), 107 deletions(-) diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 18462fb72670b6..d3d0d7ec48de2a 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -81,7 +81,17 @@ class OpenMpi(Package): ] #: These are variant names used by Spack internally; packages can't use them -reserved_names = ["patches", "dev_path"] +reserved_names = [ + "arch", + "architecture", + "dev_path", + "namespace", + "operating_system", + "os", + "patches", + "platform", + "target", +] #: Names of possible directives. This list is mostly populated using the @directive decorator. #: Some directives leverage others and in that case are not automatically added. diff --git a/lib/spack/spack/parser.py b/lib/spack/spack/parser.py index 29e335d65e7ad1..097af992832a0c 100644 --- a/lib/spack/spack/parser.py +++ b/lib/spack/spack/parser.py @@ -328,19 +328,26 @@ def next_spec( if not self.ctx.next_token: return initial_spec + def add_dependency(dep, **edge_properties): + """wrapper around root_spec._add_dependency""" + try: + root_spec._add_dependency(dep, **edge_properties) + except spack.error.SpecError as e: + raise SpecParsingError(str(e), self.ctx.current_token, self.literal_str) from e + initial_spec = initial_spec or spack.spec.Spec() - root_spec = SpecNodeParser(self.ctx).parse(initial_spec) + root_spec = SpecNodeParser(self.ctx, self.literal_str).parse(initial_spec) while True: if self.ctx.accept(TokenType.START_EDGE_PROPERTIES): edge_properties = EdgeAttributeParser(self.ctx, self.literal_str).parse() edge_properties.setdefault("depflag", 0) edge_properties.setdefault("virtuals", ()) dependency = self._parse_node(root_spec) - root_spec._add_dependency(dependency, **edge_properties) + add_dependency(dependency, **edge_properties) elif self.ctx.accept(TokenType.DEPENDENCY): dependency = self._parse_node(root_spec) - root_spec._add_dependency(dependency, depflag=0, virtuals=()) + add_dependency(dependency, depflag=0, virtuals=()) else: break @@ -348,7 +355,7 @@ def next_spec( return root_spec def _parse_node(self, root_spec): - dependency = SpecNodeParser(self.ctx).parse() + dependency = SpecNodeParser(self.ctx, self.literal_str).parse() if dependency is None: msg = ( "the dependency sigil and any optional edge attributes must be followed by a " @@ -367,10 +374,11 @@ def all_specs(self) -> List["spack.spec.Spec"]: class SpecNodeParser: """Parse a single spec node from a stream of tokens""" - __slots__ = "ctx", "has_compiler", "has_version" + __slots__ = "ctx", "has_compiler", "has_version", "literal_str" - def __init__(self, ctx): + def __init__(self, ctx, literal_str): self.ctx = ctx + self.literal_str = literal_str self.has_compiler = False self.has_version = False @@ -388,7 +396,8 @@ def parse( if not self.ctx.next_token or self.ctx.expect(TokenType.DEPENDENCY): return initial_spec - initial_spec = initial_spec or spack.spec.Spec() + if initial_spec is None: + initial_spec = spack.spec.Spec() # If we start with a package name we have a named spec, we cannot # accept another package name afterwards in a node @@ -405,12 +414,21 @@ def parse( elif self.ctx.accept(TokenType.FILENAME): return FileParser(self.ctx).parse(initial_spec) + def raise_parsing_error(string: str, cause: Optional[Exception] = None): + """Raise a spec parsing error with token context.""" + raise SpecParsingError(string, self.ctx.current_token, self.literal_str) from cause + + def add_flag(name: str, value: str, propagate: bool): + """Wrapper around ``Spec._add_flag()`` that adds parser context to errors raised.""" + try: + initial_spec._add_flag(name, value, propagate) + except Exception as e: + raise_parsing_error(str(e), e) + while True: if self.ctx.accept(TokenType.COMPILER): if self.has_compiler: - raise spack.spec.DuplicateCompilerSpecError( - f"{initial_spec} cannot have multiple compilers" - ) + raise_parsing_error("Spec cannot have multiple compilers") compiler_name = self.ctx.current_token.value[1:] initial_spec.compiler = spack.spec.CompilerSpec(compiler_name.strip(), ":") @@ -418,9 +436,7 @@ def parse( elif self.ctx.accept(TokenType.COMPILER_AND_VERSION): if self.has_compiler: - raise spack.spec.DuplicateCompilerSpecError( - f"{initial_spec} cannot have multiple compilers" - ) + raise_parsing_error("Spec cannot have multiple compilers") compiler_name, compiler_version = self.ctx.current_token.value[1:].split("@") initial_spec.compiler = spack.spec.CompilerSpec( @@ -434,9 +450,8 @@ def parse( or self.ctx.accept(TokenType.VERSION) ): if self.has_version: - raise spack.spec.MultipleVersionError( - f"{initial_spec} cannot have multiple versions" - ) + raise_parsing_error("Spec cannot have multiple versions") + initial_spec.versions = spack.version.VersionList( [spack.version.from_string(self.ctx.current_token.value[1:])] ) @@ -445,29 +460,25 @@ def parse( elif self.ctx.accept(TokenType.BOOL_VARIANT): variant_value = self.ctx.current_token.value[0] == "+" - initial_spec._add_flag( - self.ctx.current_token.value[1:].strip(), variant_value, propagate=False - ) + add_flag(self.ctx.current_token.value[1:].strip(), variant_value, propagate=False) elif self.ctx.accept(TokenType.PROPAGATED_BOOL_VARIANT): variant_value = self.ctx.current_token.value[0:2] == "++" - initial_spec._add_flag( - self.ctx.current_token.value[2:].strip(), variant_value, propagate=True - ) + add_flag(self.ctx.current_token.value[2:].strip(), variant_value, propagate=True) elif self.ctx.accept(TokenType.KEY_VALUE_PAIR): match = SPLIT_KVP.match(self.ctx.current_token.value) assert match, "SPLIT_KVP and KEY_VALUE_PAIR do not agree." - name, delim, value = match.groups() - initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=False) + name, _, value = match.groups() + add_flag(name, strip_quotes_and_unescape(value), propagate=False) elif self.ctx.accept(TokenType.PROPAGATED_KEY_VALUE_PAIR): match = SPLIT_KVP.match(self.ctx.current_token.value) assert match, "SPLIT_KVP and PROPAGATED_KEY_VALUE_PAIR do not agree." - name, delim, value = match.groups() - initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=True) + name, _, value = match.groups() + add_flag(name, strip_quotes_and_unescape(value), propagate=True) elif self.ctx.expect(TokenType.DAG_HASH): if initial_spec.abstract_hash: diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index d3ec7d715710d1..413cb22f5f4792 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -99,7 +99,7 @@ "CompilerSpec", "Spec", "SpecParseError", - "ArchitecturePropagationError", + "UnsupportedPropagationError", "DuplicateDependencyError", "DuplicateCompilerSpecError", "UnsupportedCompilerError", @@ -163,14 +163,14 @@ DEFAULT_FORMAT = ( "{name}{@versions}" "{%compiler.name}{@compiler.versions}{compiler_flags}" - "{variants}{ arch=architecture}{/abstract_hash}" + "{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}" ) #: Display format, which eliminates extra `@=` in the output, for readability. DISPLAY_FORMAT = ( "{name}{@version}" "{%compiler.name}{@compiler.version}{compiler_flags}" - "{variants}{ arch=architecture}{/abstract_hash}" + "{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}" ) #: Regular expression to pull spec contents out of clearsigned signature @@ -1640,19 +1640,9 @@ def _add_flag(self, name, value, propagate): Known flags currently include "arch" """ - # If the == syntax is used to propagate the spec architecture - # This is an error - architecture_names = [ - "arch", - "architecture", - "platform", - "os", - "operating_system", - "target", - ] - if propagate and name in architecture_names: - raise ArchitecturePropagationError( - "Unable to propagate the architecture failed." " Use a '=' instead." + if propagate and name in spack.directives.reserved_names: + raise UnsupportedPropagationError( + f"Propagation with '==' is not supported for '{name}'." ) valid_flags = FlagMap.valid_compiler_flags() @@ -1666,6 +1656,8 @@ def _add_flag(self, name, value, propagate): self._set_architecture(os=value) elif name == "target": self._set_architecture(target=value) + elif name == "namespace": + self.namespace = value elif name in valid_flags: assert self.compiler_flags is not None flags_and_propagation = spack.compiler.tokenize_flags(value, propagate) @@ -1685,9 +1677,7 @@ def _set_architecture(self, **kwargs): """Called by the parser to set the architecture.""" arch_attrs = ["platform", "os", "target"] if self.architecture and self.architecture.concrete: - raise DuplicateArchitectureError( - "Spec for '%s' cannot have two architectures." % self.name - ) + raise DuplicateArchitectureError("Spec cannot have two architectures.") if not self.architecture: new_vals = tuple(kwargs.get(arg, None) for arg in arch_attrs) @@ -1696,10 +1686,7 @@ def _set_architecture(self, **kwargs): new_attrvals = [(a, v) for a, v in kwargs.items() if a in arch_attrs] for new_attr, new_value in new_attrvals: if getattr(self.architecture, new_attr): - raise DuplicateArchitectureError( - "Spec for '%s' cannot have two '%s' specified " - "for its architecture" % (self.name, new_attr) - ) + raise DuplicateArchitectureError(f"Cannot specify '{new_attr}' twice") else: setattr(self.architecture, new_attr, new_value) @@ -4386,6 +4373,10 @@ def deps(): yield deps + @property + def namespace_if_anonymous(self): + return self.namespace if not self.name else None + def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = False) -> str: r"""Prints out attributes of a spec according to a format string. @@ -5403,10 +5394,8 @@ def long_message(self): ) -class ArchitecturePropagationError(spack.error.SpecError): - """Raised when the double equal symbols are used to assign - the spec's architecture. - """ +class UnsupportedPropagationError(spack.error.SpecError): + """Raised when propagation (==) is used with reserved variant names.""" class DuplicateDependencyError(spack.error.SpecError): diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index faca9fad9abc7a..0f9d1b3f051b83 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -197,6 +197,9 @@ class TestSpecSemantics: 'multivalue-variant foo="baz"', 'multivalue-variant foo="bar,baz,barbaz"', ), + # Namespace (special case, but like variants + ("builtin.libelf", "namespace=builtin", "builtin.libelf"), + ("libelf", "namespace=builtin", "builtin.libelf"), # Flags ("mpich ", 'mpich cppflags="-O3"', 'mpich cppflags="-O3"'), ( @@ -317,6 +320,7 @@ def test_concrete_specs_which_satisfies_abstract(self, lhs, rhs, default_mock_co ("libelf debug=True", "libelf debug=False"), ('libelf cppflags="-O3"', 'libelf cppflags="-O2"'), ("libelf platform=test target=be os=be", "libelf target=fe os=fe"), + ("namespace=builtin.mock", "namespace=builtin"), ], ) def test_constraining_abstract_specs_with_empty_intersection(self, lhs, rhs): @@ -406,6 +410,25 @@ def test_indirect_unsatisfied_single_valued_variant(self): spec.concretize() assert "pkg-a@1.0" not in spec + def test_satisfied_namespace(self): + spec = Spec("zlib").concretized() + assert spec.satisfies("namespace=builtin.mock") + assert not spec.satisfies("namespace=builtin") + + @pytest.mark.parametrize( + "spec_string", + [ + "tcl namespace==foobar", + "tcl arch==foobar", + "tcl os==foobar", + "tcl patches==foobar", + "tcl dev_path==foobar", + ], + ) + def test_propagate_reserved_variant_names(self, spec_string): + with pytest.raises(spack.parser.SpecParsingError, match="Propagation"): + Spec(spec_string) + def test_unsatisfiable_multi_value_variant(self, default_mock_concretization): # Semantics for a multi-valued variant is different # Depending on whether the spec is concrete or not @@ -768,11 +791,11 @@ def test_spec_formatting_bad_formats(self, default_mock_concretization, fmt_str) def test_combination_of_wildcard_or_none(self): # Test that using 'none' and another value raises - with pytest.raises(spack.variant.InvalidVariantValueCombinationError): + with pytest.raises(spack.parser.SpecParsingError, match="cannot be combined"): Spec("multivalue-variant foo=none,bar") # Test that using wildcard and another value raises - with pytest.raises(spack.variant.InvalidVariantValueCombinationError): + with pytest.raises(spack.parser.SpecParsingError, match="cannot be combined"): Spec("multivalue-variant foo=*,bar") def test_errors_in_variant_directive(self): diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index e17ed724a4feca..3401575767dc82 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -952,64 +952,60 @@ def test_disambiguate_hash_by_spec(spec1, spec2, constraint, mock_packages, monk @pytest.mark.parametrize( - "text,exc_cls", + "text,match_string", [ # Duplicate variants - ("x@1.2+debug+debug", spack.variant.DuplicateVariantError), - ("x ^y@1.2+debug debug=true", spack.variant.DuplicateVariantError), - ("x ^y@1.2 debug=false debug=true", spack.variant.DuplicateVariantError), - ("x ^y@1.2 debug=false ~debug", spack.variant.DuplicateVariantError), + ("x@1.2+debug+debug", "variant"), + ("x ^y@1.2+debug debug=true", "variant"), + ("x ^y@1.2 debug=false debug=true", "variant"), + ("x ^y@1.2 debug=false ~debug", "variant"), # Multiple versions - ("x@1.2@2.3", spack.spec.MultipleVersionError), - ("x@1.2:2.3@1.4", spack.spec.MultipleVersionError), - ("x@1.2@2.3:2.4", spack.spec.MultipleVersionError), - ("x@1.2@2.3,2.4", spack.spec.MultipleVersionError), - ("x@1.2 +foo~bar @2.3", spack.spec.MultipleVersionError), - ("x@1.2%y@1.2@2.3:2.4", spack.spec.MultipleVersionError), + ("x@1.2@2.3", "version"), + ("x@1.2:2.3@1.4", "version"), + ("x@1.2@2.3:2.4", "version"), + ("x@1.2@2.3,2.4", "version"), + ("x@1.2 +foo~bar @2.3", "version"), + ("x@1.2%y@1.2@2.3:2.4", "version"), # Duplicate dependency - ("x ^y@1 ^y@2", spack.spec.DuplicateDependencyError), + ("x ^y@1 ^y@2", "Cannot depend on incompatible specs"), # Duplicate compiler - ("x%intel%intel", spack.spec.DuplicateCompilerSpecError), - ("x%intel%gcc", spack.spec.DuplicateCompilerSpecError), - ("x%gcc%intel", spack.spec.DuplicateCompilerSpecError), - ("x ^y%intel%intel", spack.spec.DuplicateCompilerSpecError), - ("x ^y%intel%gcc", spack.spec.DuplicateCompilerSpecError), - ("x ^y%gcc%intel", spack.spec.DuplicateCompilerSpecError), + ("x%intel%intel", "compiler"), + ("x%intel%gcc", "compiler"), + ("x%gcc%intel", "compiler"), + ("x ^y%intel%intel", "compiler"), + ("x ^y%intel%gcc", "compiler"), + ("x ^y%gcc%intel", "compiler"), # Duplicate Architectures - ( - "x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", - spack.spec.DuplicateArchitectureError, - ), - ( - "x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", - spack.spec.DuplicateArchitectureError, - ), - ( - "x arch=linux-rhel7-ppc64le arch=linux-rhel7-x86_64", - spack.spec.DuplicateArchitectureError, - ), - ( - "y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", - spack.spec.DuplicateArchitectureError, - ), - ( - "y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", - spack.spec.DuplicateArchitectureError, - ), - ("x os=fe os=fe", spack.spec.DuplicateArchitectureError), - ("x os=fe os=be", spack.spec.DuplicateArchitectureError), - ("x target=fe target=fe", spack.spec.DuplicateArchitectureError), - ("x target=fe target=be", spack.spec.DuplicateArchitectureError), - ("x platform=test platform=test", spack.spec.DuplicateArchitectureError), - ("x os=fe platform=test target=fe os=fe", spack.spec.DuplicateArchitectureError), - ("x target=be platform=test os=be os=fe", spack.spec.DuplicateArchitectureError), - ("^[@foo] zlib", spack.parser.SpecParsingError), + ("x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", "two architectures"), + ("x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", "two architectures"), + ("x arch=linux-rhel7-ppc64le arch=linux-rhel7-x86_64", "two architectures"), + ("y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", "two architectures"), + ("y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", "two architectures"), + ("x os=fe os=fe", "'os'"), + ("x os=fe os=be", "'os'"), + ("x target=fe target=fe", "'target'"), + ("x target=fe target=be", "'target'"), + ("x platform=test platform=test", "'platform'"), + # TODO: these two seem wrong: need to change how arch is initialized (should fail on os) + ("x os=fe platform=test target=fe os=fe", "'platform'"), + ("x target=be platform=test os=be os=fe", "'platform'"), + # Dependencies + ("^[@foo] zlib", "edge attributes"), # TODO: Remove this as soon as use variants are added and we can parse custom attributes - ("^[foo=bar] zlib", spack.parser.SpecParsingError), + ("^[foo=bar] zlib", "edge attributes"), + # Propagating reserved names generates a parse error + ("x namespace==foo.bar.baz", "Propagation"), + ("x arch==linux-rhel9-x86_64", "Propagation"), + ("x architecture==linux-rhel9-x86_64", "Propagation"), + ("x os==rhel9", "Propagation"), + ("x operating_system==rhel9", "Propagation"), + ("x target==x86_64", "Propagation"), + ("x dev_path==/foo/bar/baz", "Propagation"), + ("x patches==abcde12345,12345abcde", "Propagation"), ], ) -def test_error_conditions(text, exc_cls): - with pytest.raises(exc_cls): +def test_error_conditions(text, match_string): + with pytest.raises(spack.parser.SpecParsingError, match=match_string): SpecParser(text).next_spec() diff --git a/var/spack/repos/builtin/packages/babelstream/package.py b/var/spack/repos/builtin/packages/babelstream/package.py index f7e6d6fbd5db4c..8ac554fd9bd06c 100644 --- a/var/spack/repos/builtin/packages/babelstream/package.py +++ b/var/spack/repos/builtin/packages/babelstream/package.py @@ -56,7 +56,7 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage): # ACC conflict variant("cpu_arch", values=str, default="none", description="Enable CPU Target for ACC") - variant("target", values=str, default="none", description="Enable CPU Target for ACC") + variant("acc_target", values=str, default="none", description="Enable CPU Target for ACC") # STD conflicts conflicts("+stddata", when="%gcc@:10.1.0", msg="STD-data requires newer version of GCC") @@ -77,7 +77,7 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage): conflicts( "offload=none", when="+raja", - msg="RAJA requires architecture to be specfied by target=[CPU,NVIDIA]", + msg="RAJA requires architecture to be specfied by acc_target=[CPU,NVIDIA]", ) # download raja from https://github.com/LLNL/RAJA From 3ee6507dd64d9b73406e057286c84d7650c4ba88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:01:25 -0600 Subject: [PATCH 149/435] build(deps): bump mypy from 1.11.0 to 1.11.1 in /lib/spack/docs (#45530) Bumps [mypy](https://github.com/python/mypy) from 1.11.0 to 1.11.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11...v1.11.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 90cae4526b5f4c..ceb606d0c4d2d6 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -10,4 +10,4 @@ pytest==8.3.1 isort==5.13.2 black==24.4.2 flake8==7.1.0 -mypy==1.11.0 +mypy==1.11.1 From 5aa3d9c39c8cf63ad6968d5727e2ea737efb1842 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 00:09:47 -0600 Subject: [PATCH 150/435] build(deps): bump actions/upload-artifact from 4.3.4 to 4.3.5 (#45559) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.3.5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/0b2256b8c012f0828dc542b3febcab082c67f72b...89ef406dd8d7e03cfd12d9e0a4a378f454709029) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index cc70e41ad22768..cd5998f1f89822 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -87,7 +87,7 @@ jobs: fi - name: Upload Dockerfile - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b + uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 with: name: dockerfiles_${{ matrix.dockerfile[0] }} path: dockerfiles @@ -126,7 +126,7 @@ jobs: needs: deploy-images steps: - name: Merge Artifacts - uses: actions/upload-artifact/merge@0b2256b8c012f0828dc542b3febcab082c67f72b + uses: actions/upload-artifact/merge@89ef406dd8d7e03cfd12d9e0a4a378f454709029 with: name: dockerfiles pattern: dockerfiles_* From cee266046b42644a385c8fa8d73ecfe08e5cd4ea Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Sat, 3 Aug 2024 02:13:31 -0700 Subject: [PATCH 151/435] sp: remove 'generated' tag (#45455) --- var/spack/repos/builtin/packages/sp/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/sp/package.py b/var/spack/repos/builtin/packages/sp/package.py index ad490236b8c2a2..5b3b7b4840719b 100644 --- a/var/spack/repos/builtin/packages/sp/package.py +++ b/var/spack/repos/builtin/packages/sp/package.py @@ -22,7 +22,7 @@ class Sp(CMakePackage): version("2.4.0", sha256="dbb4280e622d2683b68a28f8e3837744adf9bbbb1e7940856e8f4597f481c708") version("2.3.3", sha256="c0d465209e599de3c0193e65671e290e9f422f659f1da928505489a3edeab99f") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") variant("shared", default=False, description="Build shared library", when="@2.4:") variant("openmp", default=False, description="Use OpenMP threading") From 705d58005d04370d1482d3a6f71389d860767902 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 3 Aug 2024 11:16:42 +0200 Subject: [PATCH 152/435] py-jax / JAX: add v0.4.31 (#45519) --- .../repos/builtin/packages/py-jax/package.py | 12 ++++++++-- .../builtin/packages/py-jaxlib/package.py | 23 ++++++++++++------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-jax/package.py b/var/spack/repos/builtin/packages/py-jax/package.py index e97c0966ba374e..499b9065733dd3 100644 --- a/var/spack/repos/builtin/packages/py-jax/package.py +++ b/var/spack/repos/builtin/packages/py-jax/package.py @@ -24,6 +24,7 @@ class PyJax(PythonPackage): license("Apache-2.0") maintainers("adamjstewart", "jonas-eschle") + version("0.4.31", sha256="fd2d470643a0073d822737f0788f71391656af7e62cc5b2e7995ee390ceac287") version("0.4.30", sha256="94d74b5b2db0d80672b61d83f1f63ebf99d2ab7398ec12b2ca0c9d1e97afe577") version("0.4.29", sha256="12904571eaefddcdc8c3b8d4936482b783d5a216e99ef5adcd3522fdfb4fc186") version("0.4.28", sha256="dcf0a44aff2e1713f0a2b369281cd5b79d8c18fc1018905c4125897cb06b37e9") @@ -57,25 +58,27 @@ class PyJax(PythonPackage): with default_args(type=("build", "run")): # setup.py + depends_on("python@3.10:", when="@0.4.31:") depends_on("python@3.9:", when="@0.4.14:") - depends_on("py-ml-dtypes@0.4:", when="@0.4.29") depends_on("py-ml-dtypes@0.2:", when="@0.4.14:") depends_on("py-ml-dtypes@0.1:", when="@0.4.9:") depends_on("py-ml-dtypes@0.0.3:", when="@0.4.7:") + depends_on("py-numpy@1.24:", when="@0.4.31:") depends_on("py-numpy@1.22:", when="@0.4.14:") depends_on("py-numpy@1.21:", when="@0.4.7:") depends_on("py-numpy@1.20:", when="@0.3:") # https://github.com/google/jax/issues/19246 depends_on("py-numpy@:1", when="@:0.4.25") depends_on("py-opt-einsum") + depends_on("py-scipy@1.10:", when="@0.4.31:") depends_on("py-scipy@1.9:", when="@0.4.19:") depends_on("py-scipy@1.7:", when="@0.4.7:") depends_on("py-scipy@1.5:", when="@0.3:") - depends_on("py-importlib-metadata@4.6:", when="@0.4.11: ^python@:3.9") # jax/_src/lib/__init__.py # https://github.com/google/jax/commit/8be057de1f50756fe7522f7e98b2f30fad56f7e4 for v in [ + "0.4.31", "0.4.30", "0.4.29", "0.4.28", @@ -108,6 +111,7 @@ class PyJax(PythonPackage): depends_on(f"py-jaxlib@:{v}", when=f"@{v}") # See _minimum_jaxlib_version in jax/version.py + depends_on("py-jaxlib@0.4.30:", when="@0.4.31:") depends_on("py-jaxlib@0.4.27:", when="@0.4.28:") depends_on("py-jaxlib@0.4.23:", when="@0.4.27:") depends_on("py-jaxlib@0.4.20:", when="@0.4.25:") @@ -119,3 +123,7 @@ class PyJax(PythonPackage): depends_on("py-jaxlib@0.4.4:", when="@0.4.5:") depends_on("py-jaxlib@0.4.2:", when="@0.4.3:") depends_on("py-jaxlib@0.4.1:", when="@0.4.2:") + + # Historical dependencies + depends_on("py-ml-dtypes@0.4:", when="@0.4.29") + depends_on("py-importlib-metadata@4.6:", when="@0.4.11:0.4.30 ^python@:3.9") diff --git a/var/spack/repos/builtin/packages/py-jaxlib/package.py b/var/spack/repos/builtin/packages/py-jaxlib/package.py index aac511a8723ef6..ff67dd46048d12 100644 --- a/var/spack/repos/builtin/packages/py-jaxlib/package.py +++ b/var/spack/repos/builtin/packages/py-jaxlib/package.py @@ -20,6 +20,7 @@ class PyJaxlib(PythonPackage, CudaPackage): license("Apache-2.0") maintainers("adamjstewart", "jonas-eschle") + version("0.4.31", sha256="022ea1347f9b21cbea31410b3d650d976ea4452a48ea7317a5f91c238031bf94") version("0.4.30", sha256="0ef9635c734d9bbb44fcc87df4f1c3ccce1cfcfd243572c80d36fcdf826fe1e6") version("0.4.29", sha256="3a8005f4f62d35a5aad7e3dbd596890b47c81cc6e34fcfe3dcb93b3ca7cb1246") version("0.4.28", sha256="4dd11577d4ba5a095fbc35258ddd4e4c020829ed6e6afd498c9e38ccbcdfe20b") @@ -39,18 +40,19 @@ class PyJaxlib(PythonPackage, CudaPackage): version("0.4.4", sha256="881f402c7983b56b185e182d5315dd64c9f5320be96213d0415996ece1826806") version("0.4.3", sha256="2104735dc22be2b105e5517bd5bc6ae97f40e8e9e54928cac1585c6112a3d910") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") variant("cuda", default=True, description="Build with CUDA enabled") variant("nccl", default=True, description="Build with NCCL enabled", when="+cuda") - # docs/installation.md + # docs/installation.md (Compatible with) with when("+cuda"): depends_on("cuda@12.1:", when="@0.4.26:") depends_on("cuda@11.8:", when="@0.4.11:") depends_on("cuda@11.4:", when="@0.4.0:0.4.7") - depends_on("cudnn@9", when="@0.4.29:") + depends_on("cudnn@9.1:9", when="@0.4.31:") + depends_on("cudnn@9", when="@0.4.29:0.4.30") depends_on("cudnn@8.9:8", when="@0.4.26:0.4.28") depends_on("cudnn@8.8:8", when="@0.4.11:0.4.25") depends_on("cudnn@8.2:8", when="@0.4:0.4.7") @@ -74,24 +76,29 @@ class PyJaxlib(PythonPackage, CudaPackage): with default_args(type=("build", "run")): # Based on PyPI wheels - depends_on("python@3.9:3.12", when="@0.4.17:") + depends_on("python@3.10:3.12", when="@0.4.31:") + depends_on("python@3.9:3.12", when="@0.4.17:0.4.30") depends_on("python@3.9:3.11", when="@0.4.14:0.4.16") depends_on("python@3.8:3.11", when="@0.4.6:0.4.13") # jaxlib/setup.py + depends_on("py-scipy@1.10:", when="@0.4.31:") depends_on("py-scipy@1.9:", when="@0.4.19:") depends_on("py-scipy@1.7:", when="@0.4.7:") depends_on("py-scipy@1.5:") + depends_on("py-numpy@1.24:", when="@0.4.31:") depends_on("py-numpy@1.22:", when="@0.4.14:") depends_on("py-numpy@1.21:", when="@0.4.7:") depends_on("py-numpy@1.20:", when="@0.3:") - # https://github.com/google/jax/issues/19246 - depends_on("py-numpy@:1", when="@:0.4.25") - depends_on("py-ml-dtypes@0.4:", when="@0.4.29") depends_on("py-ml-dtypes@0.2:", when="@0.4.14:") depends_on("py-ml-dtypes@0.1:", when="@0.4.9:") depends_on("py-ml-dtypes@0.0.3:", when="@0.4.7:") + # Historical dependencies + # https://github.com/google/jax/issues/19246 + depends_on("py-numpy@:1", when="@:0.4.25") + depends_on("py-ml-dtypes@0.4:", when="@0.4.29") + conflicts( "cuda_arch=none", when="+cuda", From 678084fed86166a6a4b7fc6e527de14da2f4435a Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Sat, 3 Aug 2024 03:56:58 -0700 Subject: [PATCH 153/435] bufr: add 12.1.0 (#45459) --- .../repos/builtin/packages/bufr/package.py | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/bufr/package.py b/var/spack/repos/builtin/packages/bufr/package.py index 76cd7909ae5565..be3431fe6a1b11 100644 --- a/var/spack/repos/builtin/packages/bufr/package.py +++ b/var/spack/repos/builtin/packages/bufr/package.py @@ -17,12 +17,13 @@ class Bufr(CMakePackage): """ homepage = "https://noaa-emc.github.io/NCEPLIBS-bufr" - url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/bufr_v11.5.0.tar.gz" + url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/v12.1.0.tar.gz" git = "https://github.com/NOAA-EMC/NCEPLIBS-bufr" maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit") version("develop", branch="develop") + version("12.1.0", sha256="b5eae61b50d4132b2933b6e6dfc607e5392727cdc4f46ec7a94a19109d91dcf3") version("12.0.1", sha256="525f26238dba6511a453fc71cecc05f59e4800a603de2abbbbfb8cbb5adf5708") version("12.0.0", sha256="d01c02ea8e100e51fd150ff1c4a1192ca54538474acb1b7f7a36e8aeab76ee75") version("11.7.1", sha256="6533ce6eaa6b02c0cb5424cfbc086ab120ccebac3894980a4daafd4dfadd71f8") @@ -31,8 +32,8 @@ class Bufr(CMakePackage): version("11.5.0", sha256="d154839e29ef1fe82e58cf20232e9f8a4f0610f0e8b6a394b7ca052e58f97f43") version("11.4.0", sha256="946482405e675b99e8e0c221d137768f246076f5e9ba92eed6cae47fb68b7a26") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") # Patch to not add "-c" to ranlib flags when using llvm-ranlib on Apple systems patch("cmakelists-apple-llvm-ranlib.patch", when="@11.5.0:11.6.0") @@ -41,8 +42,10 @@ class Bufr(CMakePackage): # Patch to identify Python version correctly patch("python-version.patch", when="@11.5:12.0.0 +python") - variant("python", default=False, description="Enable Python interface?") + variant("python", default=False, description="Enable Python interface") variant("shared", default=True, description="Build shared libraries", when="@11.5:") + variant("test_files", default="none", description="Path to test files") + variant("utils", default=True, description="Build utilities", when="@12.1:") extends("python", when="+python") @@ -52,6 +55,8 @@ class Bufr(CMakePackage): depends_on("py-pip", type="build", when="+python") depends_on("py-wheel", type="build", when="+python") + conflicts("%oneapi@:2024.1", msg="Requires oneapi 2024.2 or later") + def url_for_version(self, version): pre = "bufr_" if version < Version("12.0.1") else "" return ( @@ -68,8 +73,13 @@ def cmake_args(self): self.define_from_variant("ENABLE_PYTHON", "python"), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define("BUILD_TESTS", self.run_tests), + self.define("BUILD_TESTING", self.run_tests), + self.define_from_variant("BUILD_UTILS", "utils"), ] + if not self.spec.satisfies("test_files=none"): + args.append(self.define_from_variant("TEST_FILE_DIR", "test_files")) + return args def flag_handler(self, name, flags): @@ -119,6 +129,5 @@ def setup_run_environment(self, env): self._setup_bufr_environment(env, suffix) def check(self): - if self.spec.satisfies("~python"): - with working_dir(self.builder.build_directory): - make("test") + with working_dir(self.builder.build_directory): + make("test") From 0135c808a0da9e444c3f4650f8edcf83e243945e Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Sat, 3 Aug 2024 04:00:15 -0700 Subject: [PATCH 154/435] landsfcutil: add testing with pfunit (#45449) --- .../repos/builtin/packages/landsfcutil/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/landsfcutil/package.py b/var/spack/repos/builtin/packages/landsfcutil/package.py index 88386714056f1f..979031b33504b8 100644 --- a/var/spack/repos/builtin/packages/landsfcutil/package.py +++ b/var/spack/repos/builtin/packages/landsfcutil/package.py @@ -21,7 +21,13 @@ class Landsfcutil(CMakePackage): version("develop", branch="develop") version("2.4.1", sha256="831c5005a480eabe9a8542b4deec838c2650f6966863ea2711cc0cc5db51ca14") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") + + depends_on("pfunit", type="test") + + def cmake_args(self): + args = [self.define("ENABLE_TESTS", self.run_tests)] + return args def setup_run_environment(self, env): for suffix in ("4", "d"): @@ -37,3 +43,7 @@ def flag_handler(self, name, flags): if name == "fflags": flags.append("-Free") return (None, None, flags) + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From a1090029f36aef54495294426619be55eaf715fb Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Sat, 3 Aug 2024 04:01:18 -0700 Subject: [PATCH 155/435] g2: add variants for recent releases (#45441) --- .../repos/builtin/packages/g2/package.py | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/g2/package.py b/var/spack/repos/builtin/packages/g2/package.py index ce746bf705ab3f..d53f7a8cf294dc 100644 --- a/var/spack/repos/builtin/packages/g2/package.py +++ b/var/spack/repos/builtin/packages/g2/package.py @@ -27,8 +27,8 @@ class G2(CMakePackage): version("3.4.5", sha256="c18e991c56964953d778632e2d74da13c4e78da35e8d04cb742a2ca4f52737b6") version("3.4.3", sha256="679ea99b225f08b168cbf10f4b29f529b5b011232f298a5442ce037ea84de17c") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("pic", default=True, description="Build with position-independent-code") variant( @@ -40,22 +40,43 @@ class G2(CMakePackage): when="@3.4.6:", ) variant("w3emc", default=True, description="Enable GRIB1 through w3emc", when="@3.4.6:") + variant("shared", default="False", description="Build shared library", when="@3.4.7:") + variant("openmp", default=False, description="Use OpenMP multithreading", when="@develop") + variant("utils", default=False, description="Build grib utilities", when="@develop") + variant( + "g2c_compare", + default=False, + description="Enable copygb2 tests using g2c_compare", + when="@develop", + ) depends_on("jasper@:2.0.32", when="@:3.4.7") depends_on("jasper") depends_on("libpng") + depends_on("zlib-api", when="@develop") depends_on("bacio", when="@3.4.6:") + depends_on("ip", when="@develop") + requires("^ip precision=d", when="^ip@4.1:") + depends_on("sp", when="^ip@:4") + requires("^sp precision=d", when="^ip@:4 ^sp@2.4:") + depends_on("g2c@1.8: +utils", when="+g2c_compare") with when("+w3emc"): depends_on("w3emc") depends_on("w3emc precision=4", when="precision=4") depends_on("w3emc precision=d", when="precision=d") + depends_on("w3emc +extradeps", when="+utils") + depends_on("w3emc precision=4,d", when="+utils") def cmake_args(self): args = [ + self.define_from_variant("OPENMP", "openmp"), self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), self.define_from_variant("BUILD_WITH_W3EMC", "w3emc"), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define("BUILD_4", self.spec.satisfies("precision=4")), self.define("BUILD_D", self.spec.satisfies("precision=d")), + self.define_from_variant("G2C_COMPARE", "g2c_compare"), + self.define_from_variant("BUILD_UTILS", "utils"), ] return args @@ -65,7 +86,12 @@ def setup_run_environment(self, env): self.spec.variants["precision"].value if self.spec.satisfies("@3.4.6:") else ("4", "d") ) for suffix in precisions: - lib = find_libraries("libg2_" + suffix, root=self.prefix, shared=False, recursive=True) + lib = find_libraries( + "libg2_" + suffix, + root=self.prefix, + shared=self.spec.satisfies("+shared"), + recursive=True, + ) env.set("G2_LIB" + suffix, lib[0]) env.set("G2_INC" + suffix, join_path(self.prefix, "include_" + suffix)) From c5ae5ba4dba5e326f7f71b44124a3be4b1ef2572 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Sat, 3 Aug 2024 04:29:48 -0700 Subject: [PATCH 156/435] xfce4: new packages (#44646) --- .../repos/builtin/packages/exo/package.py | 54 +++++++++++++ .../repos/builtin/packages/garcon/package.py | 51 +++++++++++++ .../builtin/packages/libxfce4ui/package.py | 66 ++++++++++++++++ .../builtin/packages/libxfce4util/package.py | 56 ++++++++++++++ .../builtin/packages/thunar-volman/package.py | 38 ++++++++++ .../repos/builtin/packages/thunar/package.py | 76 +++++++++++++++++++ .../repos/builtin/packages/tumbler/package.py | 72 ++++++++++++++++++ .../packages/xfce4-appfinder/package.py | 36 +++++++++ .../builtin/packages/xfce4-core/package.py | 46 +++++++++++ .../xfce4-panel/fix-libxfce4util-gir.patch | 14 ++++ .../builtin/packages/xfce4-panel/package.py | 57 ++++++++++++++ .../builtin/packages/xfce4-session/package.py | 65 ++++++++++++++++ .../packages/xfce4-settings/package.py | 59 ++++++++++++++ .../repos/builtin/packages/xfconf/package.py | 33 ++++++++ .../builtin/packages/xfdesktop/package.py | 53 +++++++++++++ .../repos/builtin/packages/xfwm4/package.py | 45 +++++++++++ 16 files changed, 821 insertions(+) create mode 100644 var/spack/repos/builtin/packages/exo/package.py create mode 100644 var/spack/repos/builtin/packages/garcon/package.py create mode 100644 var/spack/repos/builtin/packages/libxfce4ui/package.py create mode 100644 var/spack/repos/builtin/packages/libxfce4util/package.py create mode 100644 var/spack/repos/builtin/packages/thunar-volman/package.py create mode 100644 var/spack/repos/builtin/packages/thunar/package.py create mode 100644 var/spack/repos/builtin/packages/tumbler/package.py create mode 100644 var/spack/repos/builtin/packages/xfce4-appfinder/package.py create mode 100644 var/spack/repos/builtin/packages/xfce4-core/package.py create mode 100644 var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch create mode 100644 var/spack/repos/builtin/packages/xfce4-panel/package.py create mode 100644 var/spack/repos/builtin/packages/xfce4-session/package.py create mode 100644 var/spack/repos/builtin/packages/xfce4-settings/package.py create mode 100644 var/spack/repos/builtin/packages/xfconf/package.py create mode 100644 var/spack/repos/builtin/packages/xfdesktop/package.py create mode 100644 var/spack/repos/builtin/packages/xfwm4/package.py diff --git a/var/spack/repos/builtin/packages/exo/package.py b/var/spack/repos/builtin/packages/exo/package.py new file mode 100644 index 00000000000000..6dc79dc9435486 --- /dev/null +++ b/var/spack/repos/builtin/packages/exo/package.py @@ -0,0 +1,54 @@ +# 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 Exo(AutotoolsPackage): + """Helper applications for XFCE4""" + + homepage = "https://docs.xfce.org/xfce/exo/start" + url = "https://archive.xfce.org/xfce/4.16/src/exo-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="4f2c61d045a888cdb64297fd0ae20cc23da9b97ffb82562ed12806ed21da7d55") + version("4.16.0", sha256="1975b00eed9a8aa1f899eab2efaea593731c19138b83fdff2f13bdca5275bacc") + + variant("introspection", default=True, description="Build with gobject-introspection support") + + # Base requirements + with default_args(type=("build", "run")): + depends_on("libxfce4util") + depends_on("libxfce4ui") + depends_on("glib@2:") + depends_on("gtkplus@3:") + depends_on("perl-uri") + + with when("+introspection"): + depends_on("libxfce4util+introspection") + depends_on("libxfce4ui+introspection") + depends_on("gobject-introspection") + + depends_on("intltool@0.51.0:", type="build") + with default_args(type=("build", "link", "run")): + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + depends_on("gobject-introspection@1.66:", when="+introspection") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") + depends_on("gobject-introspection@1.60:", when="+introspection") + + def configure_args(self): + args = [] + args += self.enable_or_disable("introspection") + return args diff --git a/var/spack/repos/builtin/packages/garcon/package.py b/var/spack/repos/builtin/packages/garcon/package.py new file mode 100644 index 00000000000000..57d76cee6b3251 --- /dev/null +++ b/var/spack/repos/builtin/packages/garcon/package.py @@ -0,0 +1,51 @@ +# 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 Garcon(AutotoolsPackage): + """Menu library for XFCE4""" + + homepage = "https://docs.xfce.org/xfce/garcon/start" + url = "https://archive.xfce.org/xfce/4.16/src/garcon-0.8.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("LGPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="54633487566a8b8502b71c11a7f719efe27c069bd5773cc95f11ff4ea8f11a14") + version("0.8.0", sha256="4811d89ee5bc48dbdeffd69fc3eec6c112bbf01fde98a9e848335b374a4aa1bb") + + variant("introspection", default=True, description="Build with gobject-introspection support") + + # Base requirements + depends_on("intltool@0.51.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("libxfce4util") + depends_on("xfconf") + depends_on("libxfce4ui") + depends_on("glib@2:") + depends_on("gtkplus@3:") + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + depends_on("gobject-introspection@1.66:", when="+introspection") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") + depends_on("gobject-introspection@1.60:", when="+introspection") + + def configure_args(self): + args = [] + args += self.enable_or_disable("introspection") + return args + + def setup_dependent_build_environment(self, env, dep_spec): + if self.spec.satisfies("+introspection") and dep_spec.satisfies("+introspection"): + env.append_path("XDG_DATA_DIRS", self.prefix.share) diff --git a/var/spack/repos/builtin/packages/libxfce4ui/package.py b/var/spack/repos/builtin/packages/libxfce4ui/package.py new file mode 100644 index 00000000000000..0ac4b5500dc8d0 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxfce4ui/package.py @@ -0,0 +1,66 @@ +# 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 Libxfce4ui(AutotoolsPackage): + """Widget sharing library for XFCE4""" + + homepage = "https://docs.xfce.org/xfce/libxfce4ui/start" + url = "https://archive.xfce.org/xfce/4.16/src/libxfce4ui-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("LGPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="532247c4387c17bb9ef94a73147039b8d013c3131c95cdbd2fa85fbcc848d06b") + version("4.16.0", sha256="8b06c9e94f4be88a9d87c47592411b6cbc32073e7af9cbd64c7b2924ec90ceaa") + + variant("glibtop", default=True, description="Build with glibtop support") + variant("introspection", default=True, description="Build with gobject-introspection support") + variant("vala", default=True, description="Build with vala support") + variant("notification", default=True, description="Build with startup-notification support") + + depends_on("intltool@0.35.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("libxfce4util") + depends_on("xfconf") + depends_on("glib@2:") + depends_on("gtkplus@3:") + depends_on("libgtop@2", when="+glibtop") + depends_on("startup-notification", when="+notification") + with when("+introspection"): + depends_on("gobject-introspection") + depends_on("libxfce4util+introspection") + with when("+vala"): + depends_on("vala") + depends_on("libxfce4util+vala") + with when("@4.18:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + depends_on("gobject-introspection@1.66:", when="+introspection") + with when("@4.16:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") + depends_on("gobject-introspection@1.60:", when="+introspection") + + def configure_args(self): + args = [] + + args += self.enable_or_disable("glibtop") + args += self.enable_or_disable("introspection") + args += self.enable_or_disable("vala") + args += self.enable_or_disable("notification") + + return args + + def setup_dependent_build_environment(self, env, dependent_spec): + env.prepend_path("XDG_DATA_DIRS", self.prefix.share) + + def setup_dependent_run_environment(self, env, dependent_spec): + env.prepend_path("XDG_DATA_DIRS", self.prefix.share) diff --git a/var/spack/repos/builtin/packages/libxfce4util/package.py b/var/spack/repos/builtin/packages/libxfce4util/package.py new file mode 100644 index 00000000000000..705720ff72c71f --- /dev/null +++ b/var/spack/repos/builtin/packages/libxfce4util/package.py @@ -0,0 +1,56 @@ +# 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 Libxfce4util(AutotoolsPackage): + """Libxfce4util common non-GTK+ utilities among the Xfce applications.""" + + homepage = "https://docs.xfce.org/xfce/libxfce4util/start" + url = "https://archive.xfce.org/xfce/4.16/src/libxfce4util-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("LGPLv2", checked_by="teague") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="1157ca717fd3dd1da7724a6432a4fb24af9cd922f738e971fd1fd36dfaeac3c9") + version("4.16.0", sha256="60598d745d1fc81ff5ad3cecc3a8d1b85990dd22023e7743f55abd87d8b55b83") + + variant("introspection", default=True, description="Build with gobject-introspection support") + variant("vala", default=True, description="Build with vala support") + + with default_args(type="build"): + depends_on("intltool@0.35.0:", when="@4.16:") + depends_on("gettext", when="@4.18:") + + with default_args(type=("run", "link", "build")): + depends_on("pkgconfig@0.9.0:") + depends_on("glib@2") + depends_on("gobject-introspection", when="+introspection") + depends_on("vala", when="+vala") + with when("@4.18:"): + depends_on("glib@2.66:") + depends_on("gobject-introspection@1.66:", when="+introspection") + with when("@4.16"): + depends_on("glib@2.50:") + depends_on("gobject-introspection@1.60:", when="+introspection") + + def configure_args(self): + args = [] + + args += self.enable_or_disable("introspection") + args += self.enable_or_disable("vala") + + return args + + def setup_dependent_build_environment(self, env, dependent_spec): + env.prepend_path("XDG_DATA_DIRS", self.prefix.share) + + def setup_dependent_run_environment(self, env, dependent_spec): + env.prepend_path("XDG_DATA_DIRS", self.prefix.share) diff --git a/var/spack/repos/builtin/packages/thunar-volman/package.py b/var/spack/repos/builtin/packages/thunar-volman/package.py new file mode 100644 index 00000000000000..a1943bb91da8fe --- /dev/null +++ b/var/spack/repos/builtin/packages/thunar-volman/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack.package import * + + +class ThunarVolman(AutotoolsPackage): + """Thunar extension which enables automatic management of removable drives and media.""" + + homepage = "https://docs.xfce.org/xfce/thunar/thunar-volman" + url = "https://archive.xfce.org/xfce/4.18/src/thunar-volman-4.18.0.tar.bz2" + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") + + version("4.18.0", sha256="93b75c7ffbe246a21f4190295acc148e184be8df397e431b258d0d676e87fc65") + + extends("thunar") + + # Base requirements + depends_on("intltool@0.39.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("libxfce4util") + depends_on("xfconf") + depends_on("libxfce4ui") + depends_on("exo") + depends_on("libgudev") + depends_on("glib@2:") + depends_on("gtkplus@3:") + depends_on("dbus-glib") + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + depends_on("libgudev@145:") diff --git a/var/spack/repos/builtin/packages/thunar/package.py b/var/spack/repos/builtin/packages/thunar/package.py new file mode 100644 index 00000000000000..9d1e4bd5178d74 --- /dev/null +++ b/var/spack/repos/builtin/packages/thunar/package.py @@ -0,0 +1,76 @@ +# 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 Thunar(AutotoolsPackage): + """Thunar File Manager""" + + homepage = "https://docs.xfce.org/xfce/thunar/start" + url = "https://archive.xfce.org/xfce/4.16/src/thunar-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="d1f4b080c97b9e390eff199aaaac7562fb20f031686f8d5ee5207e953bfc2feb") + version("4.16.0", sha256="6277c448116a91ebfa564972645d8d79ef69864992a02bb164b7b13f98fdfd9b") + + variant("introspection", default=True, description="Build with gobject-introspection support") + variant("notifications", default=True, description="Build with startup-notification support") + variant("jpeg", default=True, description="Build with libjpeg support") + variant("exif", default=True, description="Build with libexif support") + variant("gdbus", default=True, description="Build with gdbus support") + variant("gio-unix", default=True, description="Build with gio-unix support") + variant("libnotify", default=True, description="Build with libnotify support") + variant("freetype", default=True, description="Build with freetype support") + + extendable = True + + # Base requirements + depends_on("intltool@0.39.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("libxfce4util") + depends_on("xfconf") + depends_on("libxfce4ui") + depends_on("exo") + depends_on("libpng") + depends_on("glib@2:") + depends_on("gtkplus@3:") + depends_on("libexif", when="+exif") + depends_on("dbus-glib", when="+gdbus") + depends_on("libnotify", when="+libnotify") + depends_on("libjpeg", when="+jpeg") + depends_on("freetype", when="+freetype") + depends_on("startup-notification", when="+notifications") + with when("+introspection"): + depends_on("libxfce4util+introspection") + depends_on("libxfce4ui+introspection") + depends_on("gobject-introspection") + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + depends_on("gobject-introspection@1.66:", when="+introspection") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") + depends_on("gobject-introspection@1.60:", when="+introspection") + + def setup_build_environment(self, env): + if self.spec.satisfies("@4.18"): + # Fails to check in xcfe4 include subdirectory for the libxfce4kbd-private-3 tree + env.append_flags("CPPFLAGS", f"-I{self.spec['libxfce4ui'].home.include.xfce4}") + + def configure_args(self): + args = [] + args += self.enable_or_disable("introspection") + args += self.enable_or_disable("notifications") + args += self.enable_or_disable("exif") + args += self.enable_or_disable("gio-unix") + args += ["--with-custom-thunarx-dirs-enabled"] + return args diff --git a/var/spack/repos/builtin/packages/tumbler/package.py b/var/spack/repos/builtin/packages/tumbler/package.py new file mode 100644 index 00000000000000..66fa45706a126a --- /dev/null +++ b/var/spack/repos/builtin/packages/tumbler/package.py @@ -0,0 +1,72 @@ +# 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 Tumbler(AutotoolsPackage): + """Tumbler is a D-Bus service for applications to request thumbnails for XFCE4""" + + homepage = "https://docs.xfce.org/xfce/tumbler/start" + url = "https://archive.xfce.org/xfce/4.16/src/tumbler-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="4087f3af4ef31271d3f315421a2f1fe67e4fda7ad60bbab1f073627914dfcf00") + version("4.16.0", sha256="9b0b7fed0c64041733d490b1b307297984629d0dd85369749617a8766850af66") + + variant("desktop-thumbnailer", default=True, description="Build with .desktop file support") + variant("cover-thumbnailer", default=True, description="Build with cover support") + variant("pixbuf-thumbnailer", default=True, description="Build with pixbuf support") + variant("font-thumbnailer", default=True, description="Build with font support") + variant("jpeg-thumbnailer", default=True, description="Build with jpeg thumbnail support") + variant("ffmpeg-thumbnailer", default=True, description="Build with ffmpg video support") + # variant("gstreamer", default=True, description="Build with gstreamer video support") + variant("poppler-thumbnailer", default=True, description="Build with pdf support") + # variant("libgsf", default=True, description="Build with odf support") + # variant("libopenraw-gnome", default=True, description="Build with raw image support") + + conflicts("%gcc@13:", when="@:4.18", msg="GCC 13+ fails on implicit pointer casting") + + # Base requirements + with default_args(type="build"): + depends_on("intltool@0.35.0:") + depends_on("gettext") + depends_on("pkgconfig", type=("build", "link")) + with default_args(type=("build", "link", "run")): + depends_on("libxfce4util") + depends_on("glib@2:") + depends_on("dbus-glib") + depends_on("gdk-pixbuf") + depends_on("libpng") + depends_on("gtkplus@3:") + depends_on("freetype", when="+font-thumbnailer") + depends_on("libjpeg", when="+jpeg-thumbnailer") + depends_on("ffmpeg", when="+ffmpeg-thumbnailer") + depends_on("poppler+glib", when="+poppler-thumbnailer") + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") + + def configure_args(self): + args = [] + + args += self.enable_or_disable("desktop-thumbnailer") + args += self.enable_or_disable("cover-thumbnailer") + args += self.enable_or_disable("pixbuf-thumbnailer") + args += self.enable_or_disable("font-thumbnailer") + args += self.enable_or_disable("jpeg-thumbnailer") + args += self.enable_or_disable("ffmpeg-thumbnailer") + args += self.enable_or_disable("poppler-thumbnailer") + + return args diff --git a/var/spack/repos/builtin/packages/xfce4-appfinder/package.py b/var/spack/repos/builtin/packages/xfce4-appfinder/package.py new file mode 100644 index 00000000000000..c7c48fdfa5f4e0 --- /dev/null +++ b/var/spack/repos/builtin/packages/xfce4-appfinder/package.py @@ -0,0 +1,36 @@ +# 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 Xfce4Appfinder(AutotoolsPackage): + """Program to find and launch installed applications for XFCE4""" + + homepage = "https://docs.xfce.org/xfce/xfce4-appfinder/start" + url = "https://archive.xfce.org/xfce/4.16/src/xfce4-appfinder-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="962a98d7b327d2073ed4cd0f78bce7945ed51b97d52fd60196e8b02ef819c18c") + version("4.16.0", sha256="37b92aaaeeec8220ed23163cf89321168d3b49e0c48b4c10f12dc4a21fdf0954") + + # Base requirements + with default_args(type=("build", "link", "run")): + depends_on("libxfce4ui") + depends_on("garcon") + depends_on("glib@2:") + + depends_on("intltool@0.35.0:", type="build") + with default_args(type=("build", "link", "run")): + with when("@4.18.0:"): + depends_on("glib@2.66:") + with when("@4.16.0:"): + depends_on("glib@2.50:") diff --git a/var/spack/repos/builtin/packages/xfce4-core/package.py b/var/spack/repos/builtin/packages/xfce4-core/package.py new file mode 100644 index 00000000000000..406fdcaaa62642 --- /dev/null +++ b/var/spack/repos/builtin/packages/xfce4-core/package.py @@ -0,0 +1,46 @@ +# 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 Xfce4Core(BundlePackage): + """Core libraries and applications for the Xfce4 desktop environment""" + + homepage = "https://docs.xfce.org/start" + + maintainers("teaguesterling") + + version("4.18") + version("4.16") + + with when("@4.18"): + depends_on("libxfce4util@4.18") + depends_on("xfconf@4.18") + depends_on("libxfce4ui@4.18") + depends_on("garcon@4.18.0") + depends_on("exo@4.18") + depends_on("thunar@4.18") + depends_on("xfce4-session@4.18") + depends_on("xfce4-panel@4.18") + depends_on("xfce4-settings@4.18") + depends_on("xfdesktop@4.18") + depends_on("xfwm4@4.18") + depends_on("xfce4-appfinder@4.18") + depends_on("tumbler@4.18") + with when("@4.16"): + depends_on("libxfce4util@4.16") + depends_on("xfconf@4.16") + depends_on("libxfce4ui@4.16") + depends_on("garcon@0.8.0") + depends_on("exo@4.16") + depends_on("thunar@4.16") + depends_on("xfce4-session@4.16") + depends_on("xfce4-panel@4.16") + depends_on("xfce4-settings@4.16") + depends_on("xfdesktop@4.16") + depends_on("xfwm4@4.16") + depends_on("xfce4-appfinder@4.16") + depends_on("tumbler@4.16") diff --git a/var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch b/var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch new file mode 100644 index 00000000000000..7716dd8d4a7a50 --- /dev/null +++ b/var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch @@ -0,0 +1,14 @@ +diff --git a/libxfce4panel/Makefile.in b/libxfce4panel/Makefile.in +index 41642e1..c7d7b51 100644 +--- a/libxfce4panel/Makefile.in ++++ b/libxfce4panel/Makefile.in +@@ -861,7 +861,7 @@ INTROSPECTION_COMPILER_ARGS = \ + --includedir=. + + @HAVE_INTROSPECTION_TRUE@introspection_sources = $(libxfce4panel_2_0_la_SOURCES) +-@HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gtk-3.0 Libxfce4util-1.0 ++@HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gtk-3.0 libxfce4util-1.0 + @HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_CFLAGS = $(AM_CPPFLAGS) + @HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_LIBS = libxfce4panel-2.0.la + @HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_FILES = $(introspection_sources) + diff --git a/var/spack/repos/builtin/packages/xfce4-panel/package.py b/var/spack/repos/builtin/packages/xfce4-panel/package.py new file mode 100644 index 00000000000000..b406173fc48b8b --- /dev/null +++ b/var/spack/repos/builtin/packages/xfce4-panel/package.py @@ -0,0 +1,57 @@ +# 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 Xfce4Panel(AutotoolsPackage): + """Panel manager for Xfce4""" + + homepage = "https://docs.xfce.org/xfce/xfce4-panel/start" + url = "https://archive.xfce.org/xfce/4.16/src/xfce4-panel-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2 OR LGPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="be80023fd546587831bab25ded15ae4c9e346289a75744b6ba4cf4ee53794710") + version("4.16.0", sha256="5e979aeeb37d306d72858b1bc67448222ea7a68de01409055b846cd31f3cc53d") + + variant("introspection", default=True, description="Build with gobject-introspection support") + variant("notification", default=True, description="Build with startup-notification support") + + patch("fix-libxfce4util-gir.patch", when="@4.16.0") # Capitalization difference causes error + + # Base requirements + depends_on("intltool@0.51.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("libxfce4ui") + depends_on("libxfce4util") + depends_on("exo") + depends_on("garcon") + depends_on("libwnck@3:") + depends_on("glib@2:") + depends_on("gtkplus@3:") + depends_on("startup-notification", when="+notification") + with when("+introspection"): + depends_on("libxfce4ui+introspection") + depends_on("gobject-introspection") + depends_on("gobject-introspection") + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + depends_on("gobject-introspection@1.66:", when="+introspection") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") + depends_on("gobject-introspection@1.60:", when="+introspection") + + def configure_args(self): + args = [] + args += self.enable_or_disable("introspection") + return args diff --git a/var/spack/repos/builtin/packages/xfce4-session/package.py b/var/spack/repos/builtin/packages/xfce4-session/package.py new file mode 100644 index 00000000000000..850af1c059cccd --- /dev/null +++ b/var/spack/repos/builtin/packages/xfce4-session/package.py @@ -0,0 +1,65 @@ +# 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 Xfce4Session(AutotoolsPackage): + """Session manager for Xfce4""" + + homepage = "https://docs.xfce.org/xfce/xfce4-session/start" + url = "https://archive.xfce.org/xfce/4.16/src/xfce4-session-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="38badb500b272012f494543a60a9c0563c381647cc95bed73b68aec0b0b89a7f") + version("4.16.0", sha256="22f273f212481d71e0b5618c62710cd85f69aea74f5ea5c0093f7918b07d17b7") + + variant( + "icon-themes", + description="Default icon themes to include", + default="hicolor", + values=["hicolor", "adwaita"], + multi=True, + ) + + with default_args(type=("build", "link", "run")): + depends_on("libxfce4ui") + depends_on("libwnck@3.10:") + depends_on("dbus-glib") + depends_on("iceauth") + depends_on("perl-xml-parser") + + depends_on("intltool@0.39.0:", type="build") + with default_args(type=("build", "link", "run")): + with when("@4.18.0:"): + depends_on("glib@2.66:") + with when("@4.16.0:"): + depends_on("glib@2.50:") + + with default_args(type="run"): + depends_on("adwaita-icon-theme", when="icon-themes=adwaita") + depends_on("hicolor-icon-theme", when="icon-themes=hicolor") + + def configure_args(self): + args = [] + args += [f"--with-xsession-prefix={self.home}"] + return args + + def setup_run_enviornment(self, env): + self.add_xdg_dirs(env) + + def setup_dependent_run_environment(self, env, dep_spec): + self.add_xdg_dirs(env) + + def add_xdg_dirs(self, env): + # Xfce4-session needs $prefix/etc/xdg in it XDG_CONFIG_DIRS + env.append_path("XDG_CONFIG_DIRS", self.home.etc.xdg) + env.append_path("XDG_CONFIG_DIRS", self.prefix.etc.xdg) diff --git a/var/spack/repos/builtin/packages/xfce4-settings/package.py b/var/spack/repos/builtin/packages/xfce4-settings/package.py new file mode 100644 index 00000000000000..1d9b7cfb794ed8 --- /dev/null +++ b/var/spack/repos/builtin/packages/xfce4-settings/package.py @@ -0,0 +1,59 @@ +# 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 Xfce4Settings(AutotoolsPackage): + """Daemon, manager, and editor to centralize the configuration management for XFCE4""" + + homepage = "https://docs.xfce.org/xfce/xfce4-settings/start" + url = "https://archive.xfce.org/xfce/4.16/src/xfce4-settings-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") + + version("4.18.0", sha256="ed3f75837cb33cd694610fc87cd569c4782b7ac4e099143a3dbe8fff1f1c6a9d") + version("4.16.0", sha256="67a1404fc754c675c6431e22a8fe0e5d79644fdfadbfe25a4523d68e1442ddc2") + + variant("introspection", default=True, description="Build with gobject-introspection support") + variant("libxcursor", default=True, description="Build with Xcursor support") + variant("libnotify", default=True, description="Build with libnotify support") + + # Base requirements + with default_args(type=("build", "link", "run")): + depends_on("xfconf") + depends_on("libxfce4ui") + depends_on("garcon") + depends_on("exo") + depends_on("dbus-glib") + depends_on("libxi") + depends_on("libxrandr") + depends_on("libxcursor", when="+libxcursor") + depends_on("libnotify", when="+libnotify") + with when("+introspection"): + depends_on("libxfce4util+introspection") + depends_on("libxfce4ui+introspection") + depends_on("gobject-introspection") + + depends_on("intltool@0.39.0:", type="build") + with default_args(type=("build", "link", "run")): + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gobject-introspection@1.66:", when="+introspection") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gobject-introspection@1.60:", when="+introspection") + + def configure_args(self): + args = [] + args += self.enable_or_disable("libxcursor") + args += self.enable_or_disable("libnotify") + args += self.enable_or_disable("introspection") + return args diff --git a/var/spack/repos/builtin/packages/xfconf/package.py b/var/spack/repos/builtin/packages/xfconf/package.py new file mode 100644 index 00000000000000..ffd975c11fad1d --- /dev/null +++ b/var/spack/repos/builtin/packages/xfconf/package.py @@ -0,0 +1,33 @@ +# 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 Xfconf(AutotoolsPackage): + """xfconf - Configuration Storage System for XFCE4""" + + homepage = "https://docs.xfce.org/xfce/xfconf/start" + url = "https://archive.xfce.org/xfce/4.16/src/xfconf-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("LGPLv2.1", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="2e8c50160bf800a807aea094fc9dad81f9f361f42db56607508ed5b4855d2906") + version("4.16.0", sha256="652a119007c67d9ba6c0bc7a740c923d33f32d03dc76dfc7ba682584e72a5425") + + depends_on("intltool@0.35.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("libxfce4util") + depends_on("dbus-glib") + with when("@4.18"): + depends_on("glib@2.66:") + depends_on("gettext") # Undocumented + with when("@4.16"): + depends_on("glib@2.50:") diff --git a/var/spack/repos/builtin/packages/xfdesktop/package.py b/var/spack/repos/builtin/packages/xfdesktop/package.py new file mode 100644 index 00000000000000..58daf8ac721ffb --- /dev/null +++ b/var/spack/repos/builtin/packages/xfdesktop/package.py @@ -0,0 +1,53 @@ +# 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 Xfdesktop(AutotoolsPackage): + """Xfdesktop is a desktop manager for the Xfce Desktop Environment.""" + + homepage = "https://docs.xfce.org/xfce/xfdesktop/start" + url = "https://archive.xfce.org/xfce/4.16/src/xfdesktop-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="661783e7e6605459926d80bca46d25ce2197c221456457a863ea9d0252120d14") + version("4.16.0", sha256="934ba5affecff21e62d9fac1dd50c50cd94b3a807fefa5f5bff59f3d6f155bae") + + variant("libnotify", default=True, description="Build with libnotify support") + variant("thunarx", default=False, description="Build with thunarx support") # TODO + + # Base requirements + depends_on("intltool@0.35.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("xfconf") + depends_on("libxfce4ui") + depends_on("libwnck") + depends_on("exo") + depends_on("garcon") + depends_on("glib@2:") + depends_on("gtkplus@3:") + + depends_on("libnotify", when="+libnotify") + + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") + + def configure_args(self): + args = [] + + args += self.enable_or_disable("libnotify") + + return args diff --git a/var/spack/repos/builtin/packages/xfwm4/package.py b/var/spack/repos/builtin/packages/xfwm4/package.py new file mode 100644 index 00000000000000..c97354369e502a --- /dev/null +++ b/var/spack/repos/builtin/packages/xfwm4/package.py @@ -0,0 +1,45 @@ +# 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 Xfwm4(AutotoolsPackage): + """xfwm4 is the window manager for Xfce""" + + homepage = "https://docs.xfce.org/xfce/xfwm4/start" + url = "https://archive.xfce.org/xfce/4.16/src/xfwm4-4.16.0.tar.bz2" + list_url = "https://archive.xfce.org/xfce/" + list_depth = 2 + + maintainers("teaguesterling") + + license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit + + version("4.18.0", sha256="92cd1b889bb25cb4bc06c1c6736c238d96e79c1e706b9f77fad0a89d6e5fc13f") + version("4.16.0", sha256="1e22eae1bbb66cebfd1753b0a5606e76ecbf6b09ce4cdfd732d093c936f1feb3") + + variant("notification", default=True, description="Build with startup-notification support") + + # Base requirements + depends_on("intltool@0.35.0:", type="build") + with default_args(type=("build", "link", "run")): + depends_on("libxfce4util") + depends_on("xfconf") + depends_on("libxfce4ui") + depends_on("dbus-glib") + depends_on("libwnck") + depends_on("libxinerama") # Undocumented + depends_on("glib@2:") + depends_on("gtkplus@3:") + depends_on("startup-notification", when="+notification") + + with when("@4.18.0:"): + depends_on("glib@2.66:") + depends_on("gtkplus@3.24:") + with when("@4.16.0:"): + depends_on("glib@2.50:") + depends_on("gtkplus@3.22:") From 72e3f10d5b93d83027c003c7757591d0e8cc8325 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 3 Aug 2024 15:43:54 -0500 Subject: [PATCH 157/435] ffmpeg: update patch hashes for addition of the X-Git-Tag (#45574) --- var/spack/repos/builtin/packages/ffmpeg/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/ffmpeg/package.py b/var/spack/repos/builtin/packages/ffmpeg/package.py index 19ee7f2eb4dfb4..c9b944106a5d29 100644 --- a/var/spack/repos/builtin/packages/ffmpeg/package.py +++ b/var/spack/repos/builtin/packages/ffmpeg/package.py @@ -135,7 +135,7 @@ class Ffmpeg(AutotoolsPackage): # Solve build failure against vulkan headers 1.3.279 patch( "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/fef22c87ada4", - sha256="856bdc2b6e2a7066cf683a235193b9025d4d73dd7686eda2fbcf83e7e65f8bf9", + sha256="5726e8e999e3fc7a5ae4c4c846c9151246e5846c54dc3b8ff8326ee31c59631a", when="@6.1.1", ) @@ -162,12 +162,12 @@ class Ffmpeg(AutotoolsPackage): # fix incompatibility with texinfo@7, especially @7.1: patch( "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/f01fdedb69e4accb1d1555106d8f682ff1f1ddc7", - sha256="416751f41cfbf086c28b4bbf01ace4c08e5651e59911dca6240292bb1b5c6b53", + sha256="673813d13f5c37b75ff5bcb56790ccd6b16962fdb9bddcbbeeead979d47d31b3", when="@6.0", ) patch( "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/f01fdedb69e4accb1d1555106d8f682ff1f1ddc7", - sha256="416751f41cfbf086c28b4bbf01ace4c08e5651e59911dca6240292bb1b5c6b53", + sha256="673813d13f5c37b75ff5bcb56790ccd6b16962fdb9bddcbbeeead979d47d31b3", when="@5:5.1.3", ) From e983f4a8586209abbad203b6ef446b3ee4aa7a90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:46:19 -0500 Subject: [PATCH 158/435] build(deps): bump sphinx-design from 0.6.0 to 0.6.1 in /lib/spack/docs (#45562) Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.6.0 to 0.6.1. - [Release notes](https://github.com/executablebooks/sphinx-design/releases) - [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md) - [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.6.0...v0.6.1) --- updated-dependencies: - dependency-name: sphinx-design dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index ceb606d0c4d2d6..09fee9728f9c2a 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -1,6 +1,6 @@ sphinx==7.4.7 sphinxcontrib-programoutput==0.17 -sphinx_design==0.6.0 +sphinx_design==0.6.1 sphinx-rtd-theme==2.0.0 python-levenshtein==0.25.1 docutils==0.20.1 From 1090895e7293c2c3f111340f55aec43f28abb8b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:48:50 -0500 Subject: [PATCH 159/435] build(deps): bump black from 24.4.2 to 24.8.0 in /lib/spack/docs (#45563) Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 09fee9728f9c2a..d060771aac9178 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -8,6 +8,6 @@ pygments==2.18.0 urllib3==2.2.2 pytest==8.3.1 isort==5.13.2 -black==24.4.2 +black==24.8.0 flake8==7.1.0 mypy==1.11.1 From 29b9fe1f0b516d3c066ae5e60efa47925a7cc0cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:49:33 -0500 Subject: [PATCH 160/435] build(deps): bump black in /.github/workflows/requirements/style (#45561) Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/requirements/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements/style/requirements.txt b/.github/workflows/requirements/style/requirements.txt index a6ff4bdc849704..11ad278e95f94e 100644 --- a/.github/workflows/requirements/style/requirements.txt +++ b/.github/workflows/requirements/style/requirements.txt @@ -1,4 +1,4 @@ -black==24.4.2 +black==24.8.0 clingo==5.7.1 flake8==7.1.0 isort==5.13.2 From f3bd82037411d4e10e7d7d15b011e3ca9fee750f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 4 Aug 2024 05:44:52 +0000 Subject: [PATCH 161/435] build(deps): bump pytest from 8.3.1 to 8.3.2 in /lib/spack/docs (#45461) Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.1 to 8.3.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.1...8.3.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index d060771aac9178..e94eb7607adef6 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -6,7 +6,7 @@ python-levenshtein==0.25.1 docutils==0.20.1 pygments==2.18.0 urllib3==2.2.2 -pytest==8.3.1 +pytest==8.3.2 isort==5.13.2 black==24.8.0 flake8==7.1.0 From c8695f2ba67d7a74f240ca909ae480f411ffaf0d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 4 Aug 2024 06:08:04 -0500 Subject: [PATCH 162/435] py-mypy: add v1.9.0, v1.10.1, v1.11.1 (#45542) --- var/spack/repos/builtin/packages/py-mypy/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-mypy/package.py b/var/spack/repos/builtin/packages/py-mypy/package.py index 7a6f438f7236bf..f00d50faac66b8 100644 --- a/var/spack/repos/builtin/packages/py-mypy/package.py +++ b/var/spack/repos/builtin/packages/py-mypy/package.py @@ -17,6 +17,9 @@ class PyMypy(PythonPackage): license("MIT AND PSF-2.0", checked_by="tgamblin") + version("1.11.1", sha256="f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08") + version("1.10.1", sha256="1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0") + version("1.9.0", sha256="3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974") version("1.8.0", sha256="6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07") version("1.7.1", sha256="fcb6d9afb1b6208b4c712af0dafdc650f518836065df0d4fb1d800f5d6773db2") version("1.7.0", sha256="1e280b5697202efa698372d2f39e9a6713a0395a756b1c6bd48995f8d72690dc") @@ -66,6 +69,7 @@ class PyMypy(PythonPackage): # setup.py depends_on("python@3.8:", when="@1.5:", type=("build", "run")) depends_on("python@3.7:", when="@0.981:", type=("build", "run")) + depends_on("py-typing-extensions@4.6:", when="@1.11:", type=("build", "run")) depends_on("py-typing-extensions@4.1:", when="@1.5:", type=("build", "run")) depends_on("py-typing-extensions@3.10:", when="@0.930:", type=("build", "run")) depends_on("py-typing-extensions@3.7.4:", when="@0.700:", type=("build", "run")) From 530639e15fb792911f7900127989b0f294928fb3 Mon Sep 17 00:00:00 2001 From: "Auriane R." <48684432+aurianer@users.noreply.github.com> Date: Sun, 4 Aug 2024 19:59:13 +0200 Subject: [PATCH 163/435] Use satisfies instead of if ... in spec in b* and c* directories (#45555) --- .../builtin/packages/babelstream/package.py | 16 ++-- .../repos/builtin/packages/bart/package.py | 4 +- .../builtin/packages/barvinok/package.py | 2 +- .../builtin/packages/bcftools/package.py | 2 +- .../repos/builtin/packages/beatnik/package.py | 2 +- .../builtin/packages/berkeleygw/package.py | 28 +++---- .../builtin/packages/bigdft-atlab/package.py | 8 +- .../builtin/packages/bigdft-chess/package.py | 14 ++-- .../builtin/packages/bigdft-core/package.py | 12 +-- .../builtin/packages/bigdft-futile/package.py | 8 +- .../packages/bigdft-libabinit/package.py | 2 +- .../packages/bigdft-psolver/package.py | 10 +-- .../builtin/packages/bigdft-spred/package.py | 8 +- .../builtin/packages/binutils/package.py | 2 +- .../builtin/packages/bitgroomingz/package.py | 2 +- .../repos/builtin/packages/blaspp/package.py | 6 +- .../builtin/packages/blast-plus/package.py | 24 +++--- .../repos/builtin/packages/blis/package.py | 6 +- .../repos/builtin/packages/bml/package.py | 2 +- .../repos/builtin/packages/bohrium/package.py | 16 ++-- .../builtin/packages/boinc-client/package.py | 2 +- .../builtin/packages/bookleaf-cpp/package.py | 8 +- .../repos/builtin/packages/boost/package.py | 36 ++++----- .../repos/builtin/packages/botan/package.py | 2 +- .../repos/builtin/packages/bowtie/package.py | 2 +- .../repos/builtin/packages/bricks/package.py | 2 +- .../builtin/packages/butterflypack/package.py | 2 +- .../repos/builtin/packages/bzip2/package.py | 8 +- .../repos/builtin/packages/c-blosc/package.py | 2 +- .../repos/builtin/packages/cabana/package.py | 2 +- .../repos/builtin/packages/caffe/package.py | 2 +- .../repos/builtin/packages/cairo/package.py | 2 +- .../repos/builtin/packages/caliper/package.py | 20 ++--- .../builtin/packages/camellia/package.py | 2 +- .../repos/builtin/packages/camp/package.py | 4 +- .../repos/builtin/packages/camx/package.py | 4 +- .../repos/builtin/packages/cantera/package.py | 8 +- .../builtin/packages/capnproto/package.py | 4 +- .../builtin/packages/cardioid/package.py | 4 +- .../repos/builtin/packages/care/package.py | 4 +- .../repos/builtin/packages/castep/package.py | 4 +- .../repos/builtin/packages/ccs-qcd/package.py | 4 +- .../repos/builtin/packages/cdhit/package.py | 4 +- .../repos/builtin/packages/cdo/package.py | 8 +- .../builtin/packages/ceres-solver/package.py | 6 +- .../repos/builtin/packages/cfitsio/package.py | 4 +- .../repos/builtin/packages/cgal/package.py | 2 +- .../repos/builtin/packages/cgm/package.py | 8 +- .../repos/builtin/packages/cgns/package.py | 6 +- .../repos/builtin/packages/chai/package.py | 12 +-- .../builtin/packages/chameleon/package.py | 8 +- .../builtin/packages/channelflow/package.py | 2 +- .../builtin/packages/charliecloud/package.py | 4 +- .../repos/builtin/packages/charmpp/package.py | 32 ++++---- .../builtin/packages/chatterbug/package.py | 4 +- .../repos/builtin/packages/chombo/package.py | 6 +- .../repos/builtin/packages/citcoms/package.py | 8 +- .../repos/builtin/packages/clamr/package.py | 8 +- .../repos/builtin/packages/clapack/package.py | 2 +- .../packages/clingo-bootstrap/package.py | 2 +- .../repos/builtin/packages/clingo/package.py | 4 +- .../repos/builtin/packages/cln/package.py | 2 +- .../packages/cloverleaf-ref/package.py | 4 +- .../builtin/packages/cloverleaf/package.py | 28 +++---- .../builtin/packages/cloverleaf3d/package.py | 18 ++--- .../repos/builtin/packages/cmake/package.py | 4 +- .../repos/builtin/packages/cmdstan/package.py | 8 +- .../repos/builtin/packages/cntk/package.py | 12 +-- .../repos/builtin/packages/codes/package.py | 2 +- .../repos/builtin/packages/coevp/package.py | 6 +- .../repos/builtin/packages/cohmm/package.py | 4 +- .../repos/builtin/packages/comd/package.py | 10 +-- .../builtin/packages/compadre/package.py | 6 +- .../repos/builtin/packages/conduit/package.py | 44 +++++------ .../builtin/packages/conquest/package.py | 4 +- .../builtin/packages/converge/package.py | 14 ++-- .../builtin/packages/coreutils/package.py | 2 +- .../repos/builtin/packages/cosma/package.py | 8 +- .../repos/builtin/packages/cosmomc/package.py | 10 +-- .../repos/builtin/packages/cosp2/package.py | 4 +- .../repos/builtin/packages/costa/package.py | 6 +- .../repos/builtin/packages/cp2k/package.py | 76 +++++++++---------- .../repos/builtin/packages/cpio/package.py | 4 +- .../builtin/packages/cray-libsci/package.py | 6 +- .../builtin/packages/cray-mpich/package.py | 4 +- .../builtin/packages/crtm-fix/package.py | 6 +- .../repos/builtin/packages/cudnn/package.py | 4 +- .../repos/builtin/packages/curl/package.py | 12 +-- 88 files changed, 370 insertions(+), 370 deletions(-) diff --git a/var/spack/repos/builtin/packages/babelstream/package.py b/var/spack/repos/builtin/packages/babelstream/package.py index 8ac554fd9bd06c..b1f518de1f4f8a 100644 --- a/var/spack/repos/builtin/packages/babelstream/package.py +++ b/var/spack/repos/builtin/packages/babelstream/package.py @@ -253,7 +253,7 @@ def cmake_args(self): # SYCL # =================================== - if "+sycl" in self.spec: + if self.spec.satisfies("+sycl"): args.append("-DSYCL_COMPILER=" + self.spec.variants["implementation"].value.upper()) if self.spec.variants["implementation"].value.upper() != "ONEAPI-DPCPP": args.append( @@ -266,7 +266,7 @@ def cmake_args(self): # SYCL 2020 # =================================== - if "+sycl2020" in self.spec: + if self.spec.satisfies("+sycl2020"): if self.spec.satisfies("%oneapi"): # -fsycl flag is required for setting up sycl/sycl.hpp seems like # it doesn't get it from the CMake file @@ -288,7 +288,7 @@ def cmake_args(self): # HIP(ROCM) # =================================== - if "+rocm" in self.spec: + if self.spec.satisfies("+rocm"): hip_comp = self.spec["rocm"].prefix + "/bin/hipcc" args.append("-DCMAKE_CXX_COMPILER=" + hip_comp) args.append( @@ -303,14 +303,14 @@ def cmake_args(self): # TBB # =================================== - if "+tbb" in self.spec: + if self.spec.satisfies("+tbb"): args.append("-DONE_TBB_DIR=" + self.spec["tbb"].prefix + "/tbb/latest/") args.append("-DPARTITIONER=" + self.spec.variants["partitioner"].value.upper()) # =================================== # OpenCL (ocl) # =================================== - if "+ocl" in self.spec: + if self.spec.satisfies("+ocl"): if "backend" in self.spec.variants: if "cuda" in self.spec.variants["backend"].value: cuda_dir = self.spec["cuda"].prefix @@ -333,7 +333,7 @@ def cmake_args(self): # =================================== # RAJA # =================================== - if "+raja" in self.spec: + if self.spec.satisfies("+raja"): args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx) args.append("-DRAJA_IN_TREE=" + self.spec.variants["dir"].value) if "offload" in self.spec.variants: @@ -360,7 +360,7 @@ def cmake_args(self): # =================================== # THRUST # =================================== - if "+thrust" in self.spec: + if self.spec.satisfies("+thrust"): if "cuda" in self.spec.variants["implementation"].value: args.append("-DTHRUST_IMPL=" + self.spec.variants["implementation"].value.upper()) args.append("-SDK_DIR=" + self.spec["thrust"].prefix + "/include") @@ -385,7 +385,7 @@ def cmake_args(self): # =================================== # kokkos implementation is versatile and it could use cuda or omp architectures as backend # The usage should be spack install babelstream +kokkos +cuda [or +omp] - if "+kokkos" in self.spec: + if self.spec.satisfies("+kokkos"): args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx) args.append("-DKOKKOS_IN_TREE=" + self.spec.variants["dir"].value) # args.append("-DKOKKOS_IN_PACKAGE=" + self.spec["kokkos"].prefix) diff --git a/var/spack/repos/builtin/packages/bart/package.py b/var/spack/repos/builtin/packages/bart/package.py index 5bb8a2c6d240f6..03895d2444263b 100644 --- a/var/spack/repos/builtin/packages/bart/package.py +++ b/var/spack/repos/builtin/packages/bart/package.py @@ -62,7 +62,7 @@ def edit(self, spec, prefix): if "^netlib-lapack+lapacke" not in spec: env["NOLAPACKE"] = "1" - if "+cuda" in spec: + if spec.satisfies("+cuda"): cuda_arch = self.spec.variants["cuda_arch"].value env["CUDA"] = "1" env["CUDA_BASE"] = spec["cuda"].prefix @@ -79,7 +79,7 @@ def install(self, spec, prefix): install("python/cfl.py", python_platlib) install("python/wslsupport.py", python_platlib) - if "^python@3:" in spec: + if spec.satisfies("^python@3:"): install("python/bartview3.py", join_path(prefix.bin, "bartview")) filter_file(r"#!/usr/bin/python3", "#!/usr/bin/env python", prefix.bin.bartview) else: diff --git a/var/spack/repos/builtin/packages/barvinok/package.py b/var/spack/repos/builtin/packages/barvinok/package.py index 867025f02cdf02..3be94ae1445b9e 100644 --- a/var/spack/repos/builtin/packages/barvinok/package.py +++ b/var/spack/repos/builtin/packages/barvinok/package.py @@ -33,6 +33,6 @@ def configure_args(self): spec = self.spec args = ["--with-gmp-prefix={0}".format(self.spec["gmp"].prefix)] - if "+pet" in spec: + if spec.satisfies("+pet"): args.append("--with-pet=bundled") return args diff --git a/var/spack/repos/builtin/packages/bcftools/package.py b/var/spack/repos/builtin/packages/bcftools/package.py index 05cf578bf9603b..44b8dedc26108b 100644 --- a/var/spack/repos/builtin/packages/bcftools/package.py +++ b/var/spack/repos/builtin/packages/bcftools/package.py @@ -100,7 +100,7 @@ def set_make_options(self): options.append("prefix={0}".format(self.prefix)) options.append("HTSDIR={0}".format(self.spec["htslib"].prefix)) - if "+libgsl" in self.spec: + if self.spec.satisfies("+libgsl"): options.append("USE_GPL=1") return options diff --git a/var/spack/repos/builtin/packages/beatnik/package.py b/var/spack/repos/builtin/packages/beatnik/package.py index 2000a7a80a843e..ac817cca25359d 100644 --- a/var/spack/repos/builtin/packages/beatnik/package.py +++ b/var/spack/repos/builtin/packages/beatnik/package.py @@ -84,7 +84,7 @@ def cmake_args(self): # Use hipcc as the c compiler if we are compiling for rocm. Doing it this way # keeps the wrapper insted of changeing CMAKE_CXX_COMPILER keeps the spack wrapper # and the rpaths it sets for us from the underlying spec. - if "+rocm" in self.spec: + if self.spec.satisfies("+rocm"): env["SPACK_CXX"] = self.spec["hip"].hipcc # If we're building with cray mpich, we need to make sure we get the GTL library for diff --git a/var/spack/repos/builtin/packages/berkeleygw/package.py b/var/spack/repos/builtin/packages/berkeleygw/package.py index a6003995bdc80f..2c7f433c182390 100644 --- a/var/spack/repos/builtin/packages/berkeleygw/package.py +++ b/var/spack/repos/builtin/packages/berkeleygw/package.py @@ -122,7 +122,7 @@ def edit(self, spec, prefix): tar("-x", "-f", self.stage.archive_file, "--strip-components=1") # get generic arch.mk template - if "+mpi" in spec: + if spec.satisfies("+mpi"): copy(join_path(self.stage.source_path, "config", "generic.mpi.linux.mk"), "arch.mk") else: copy(join_path(self.stage.source_path, "config", "generic.serial.linux.mk"), "arch.mk") @@ -189,27 +189,27 @@ def build(self, spec, prefix): buildopts = [] paraflags = [] - if "+mpi" in spec: + if spec.satisfies("+mpi"): paraflags.append("-DMPI") # We need to copy fflags in case we append to it (#34019): fflags = spec.compiler_flags["fflags"][:] - if "+openmp" in spec: + if spec.satisfies("+openmp"): paraflags.append("-DOMP") fflags.append(self.compiler.openmp_flag) - if "+mpi" in spec: + if spec.satisfies("+mpi"): buildopts.append("C_PARAFLAG=-DPARA") buildopts.append("PARAFLAG=%s" % " ".join(paraflags)) debugflag = "" - if "+debug" in spec: + if spec.satisfies("+debug"): debugflag += "-DDEBUG " - if "+verbose" in spec: + if spec.satisfies("+verbose"): debugflag += "-DVERBOSE " buildopts.append("DEBUGFLAG=%s" % debugflag) - if "+mpi" in spec: + if spec.satisfies("+mpi"): buildopts.append("LINK=%s" % spec["mpi"].mpifc) buildopts.append("C_LINK=%s" % spec["mpi"].mpicxx) else: @@ -228,7 +228,7 @@ def build(self, spec, prefix): buildopts.append("LAPACKLIB=%s" % spec["lapack"].libs.ld_flags) - if "+mpi" in spec: + if spec.satisfies("+mpi"): mathflags.append("-DUSESCALAPACK") buildopts.append("SCALAPACKLIB=%s" % spec["scalapack"].libs.ld_flags) @@ -236,7 +236,7 @@ def build(self, spec, prefix): buildopts.append("COMPFLAG=-DINTEL") buildopts.append("MOD_OPT=-module ") buildopts.append("FCPP=cpp -C -P -ffreestanding") - if "+mpi" in spec: + if spec.satisfies("+mpi"): buildopts.append("F90free=%s -free" % spec["mpi"].mpifc) buildopts.append("C_COMP=%s" % spec["mpi"].mpicc) buildopts.append("CC_COMP=%s" % spec["mpi"].mpicxx) @@ -262,7 +262,7 @@ def build(self, spec, prefix): buildopts.append( "FCPP=%s -C -nostdinc -std=c11" % join_path(self.compiler.prefix, "bin", "cpp") ) - if "+mpi" in spec: + if spec.satisfies("+mpi"): buildopts.append("F90free=%s %s" % (spec["mpi"].mpifc, f90_flags)) buildopts.append("C_COMP=%s %s" % (spec["mpi"].mpicc, c_flags)) buildopts.append("CC_COMP=%s %s" % (spec["mpi"].mpicxx, cxx_flags)) @@ -278,7 +278,7 @@ def build(self, spec, prefix): buildopts.append("COMPFLAG=") buildopts.append("MOD_OPT=-module ") buildopts.append("FCPP=cpp -C -nostdinc") - if "+mpi" in spec: + if spec.satisfies("+mpi"): buildopts.append("F90free=%s %s" % (spec["mpi"].mpifc, f90_flags)) buildopts.append("C_COMP=%s %s" % (spec["mpi"].mpicc, c_flags)) buildopts.append("CC_COMP=%s %s" % (spec["mpi"].mpicxx, cxx_flags)) @@ -293,16 +293,16 @@ def build(self, spec, prefix): "BerkeleyGW with compiler %s" % spec.compiler ) - if "+hdf5" in spec: + if spec.satisfies("+hdf5"): mathflags.append("-DHDF5") buildopts.append("HDF5INCLUDE=%s" % spec["hdf5"].prefix.include) buildopts.append("HDF5LIB=%s" % spec["hdf5:hl,fortran"].libs.ld_flags) - if "+elpa" in spec: + if spec.satisfies("+elpa"): mathflags.append("-DUSEELPA") elpa = spec["elpa"] - if "+openmp" in spec: + if spec.satisfies("+openmp"): elpa_suffix = "_openmp" else: elpa_suffix = "" diff --git a/var/spack/repos/builtin/packages/bigdft-atlab/package.py b/var/spack/repos/builtin/packages/bigdft-atlab/package.py index 08792adde4fc09..77c9236b22b5b7 100644 --- a/var/spack/repos/builtin/packages/bigdft-atlab/package.py +++ b/var/spack/repos/builtin/packages/bigdft-atlab/package.py @@ -51,7 +51,7 @@ def configure_args(self): cflags = [] cxxflags = [] - if "+openmp" in spec: + if spec.satisfies("+openmp"): fcflags.append(self.compiler.openmp_flag) if spec.satisfies("+shared"): @@ -74,7 +74,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append(f"CC={spec['mpi'].mpicc}") args.append(f"CXX={spec['mpi'].mpicxx}") args.append(f"FC={spec['mpi'].mpifc}") @@ -83,12 +83,12 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") - if "+openbabel" in spec: + if spec.satisfies("+openbabel"): args.append("--enable-openbabel") args.append(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}") args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}") diff --git a/var/spack/repos/builtin/packages/bigdft-chess/package.py b/var/spack/repos/builtin/packages/bigdft-chess/package.py index 54664c8f73ad19..319ce8e4327cd5 100644 --- a/var/spack/repos/builtin/packages/bigdft-chess/package.py +++ b/var/spack/repos/builtin/packages/bigdft-chess/package.py @@ -60,11 +60,11 @@ def configure_args(self): pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}") openmp_flag = [] - if "+openmp" in spec: + if spec.satisfies("+openmp"): openmp_flag.append(self.compiler.openmp_flag) linalg = [] - if "+scalapack" in spec: + if spec.satisfies("+scalapack"): linalg.append(spec["scalapack"].libs.ld_flags) linalg.append(spec["lapack"].libs.ld_flags) linalg.append(spec["blas"].libs.ld_flags) @@ -83,7 +83,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append(f"CC={spec['mpi'].mpicc}") args.append(f"CXX={spec['mpi'].mpicxx}") args.append(f"FC={spec['mpi'].mpifc}") @@ -92,22 +92,22 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") args.append(f"--with-atlab-libs={spec['bigdft-atlab'].prefix.lib}") - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("--enable-cuda-gpu") args.append(f"--with-cuda-path={spec['cuda'].prefix}") args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}") - if "+minpack" in spec: + if spec.satisfies("+minpack"): args.append("--with-minpack") - if "+ntpoly" in spec: + if spec.satisfies("+ntpoly"): args.append("--enable-ntpoly") return args diff --git a/var/spack/repos/builtin/packages/bigdft-core/package.py b/var/spack/repos/builtin/packages/bigdft-core/package.py index 5b9b61aa368eba..0da285fb0b91f6 100644 --- a/var/spack/repos/builtin/packages/bigdft-core/package.py +++ b/var/spack/repos/builtin/packages/bigdft-core/package.py @@ -64,11 +64,11 @@ def configure_args(self): pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}") openmp_flag = [] - if "+openmp" in spec: + if spec.satisfies("+openmp"): openmp_flag.append(self.compiler.openmp_flag) linalg = [] - if "+scalapack" in spec: + if spec.satisfies("+scalapack"): linalg.append(spec["scalapack"].libs.ld_flags) linalg.append(spec["lapack"].libs.ld_flags) linalg.append(spec["blas"].libs.ld_flags) @@ -96,7 +96,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append(f"CC={spec['mpi'].mpicc}") args.append(f"CXX={spec['mpi'].mpicxx}") args.append(f"FC={spec['mpi'].mpifc}") @@ -105,19 +105,19 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("--enable-opencl") args.append(f"--with-ocl-path={spec['cuda'].prefix}") args.append("--enable-cuda-gpu") args.append(f"--with-cuda-path={spec['cuda'].prefix}") args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}") - if "+openbabel" in spec: + if spec.satisfies("+openbabel"): args.append("--enable-openbabel") args.append(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}") args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}") diff --git a/var/spack/repos/builtin/packages/bigdft-futile/package.py b/var/spack/repos/builtin/packages/bigdft-futile/package.py index ca65dc29a9cf54..431a42b57befef 100644 --- a/var/spack/repos/builtin/packages/bigdft-futile/package.py +++ b/var/spack/repos/builtin/packages/bigdft-futile/package.py @@ -58,7 +58,7 @@ def configure_args(self): pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}") openmp_flag = [] - if "+openmp" in spec: + if spec.satisfies("+openmp"): openmp_flag.append(self.compiler.openmp_flag) args = [ @@ -71,12 +71,12 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append(f"CC={spec['mpi'].mpicc}") args.append(f"CXX={spec['mpi'].mpicxx}") args.append(f"FC={spec['mpi'].mpifc}") @@ -85,7 +85,7 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("--enable-opencl") args.append(f"--with-ocl-path={spec['cuda'].prefix}") args.append("--enable-cuda-gpu") diff --git a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py index 451e72065655ac..f1696615bafca2 100644 --- a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py +++ b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py @@ -66,7 +66,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.extend( [ f"CC={spec['mpi'].mpicc}", diff --git a/var/spack/repos/builtin/packages/bigdft-psolver/package.py b/var/spack/repos/builtin/packages/bigdft-psolver/package.py index 7557b28b45becc..62a1cf48aef271 100644 --- a/var/spack/repos/builtin/packages/bigdft-psolver/package.py +++ b/var/spack/repos/builtin/packages/bigdft-psolver/package.py @@ -59,11 +59,11 @@ def configure_args(self): pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}") openmp_flag = [] - if "+openmp" in spec: + if spec.satisfies("+openmp"): openmp_flag.append(self.compiler.openmp_flag) linalg = [] - if "+scalapack" in spec: + if spec.satisfies("+scalapack"): linalg.append(spec["scalapack"].libs.ld_flags) linalg.append(spec["lapack"].libs.ld_flags) linalg.append(spec["blas"].libs.ld_flags) @@ -81,7 +81,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append(f"CC={spec['mpi'].mpicc}") args.append(f"CXX={spec['mpi'].mpicxx}") args.append(f"FC={spec['mpi'].mpifc}") @@ -90,14 +90,14 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") args.append(f"--with-atlab-libs={spec['bigdft-atlab'].prefix.lib}") - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("--enable-cuda-gpu") args.append(f"--with-cuda-path={spec['cuda'].prefix}") args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}") diff --git a/var/spack/repos/builtin/packages/bigdft-spred/package.py b/var/spack/repos/builtin/packages/bigdft-spred/package.py index f468e67a9217ed..566508aeb00dc9 100644 --- a/var/spack/repos/builtin/packages/bigdft-spred/package.py +++ b/var/spack/repos/builtin/packages/bigdft-spred/package.py @@ -57,11 +57,11 @@ def configure_args(self): pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}") openmp_flag = [] - if "+openmp" in spec: + if spec.satisfies("+openmp"): openmp_flag.append(self.compiler.openmp_flag) linalg = [] - if "+scalapack" in spec: + if spec.satisfies("+scalapack"): linalg.append(spec["scalapack"].libs.ld_flags) linalg.append(spec["lapack"].libs.ld_flags) linalg.append(spec["blas"].libs.ld_flags) @@ -82,7 +82,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append(f"CC={spec['mpi'].mpicc}") args.append(f"CXX={spec['mpi'].mpicxx}") args.append(f"FC={spec['mpi'].mpifc}") @@ -91,7 +91,7 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 637ccca6c2d203..85ef788279ebaa 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -286,7 +286,7 @@ def configure_args(self): args += self.enable_or_disable("lto") args += self.enable_or_disable("nls") args += self.enable_or_disable("plugins") - if "+pgo" in self.spec: + if self.spec.satisfies("+pgo"): args.append("--enable-pgo-build=lto") else: args.append("--disable-pgo-build") diff --git a/var/spack/repos/builtin/packages/bitgroomingz/package.py b/var/spack/repos/builtin/packages/bitgroomingz/package.py index 57727803d57e88..85430a1579bf19 100644 --- a/var/spack/repos/builtin/packages/bitgroomingz/package.py +++ b/var/spack/repos/builtin/packages/bitgroomingz/package.py @@ -25,7 +25,7 @@ class Bitgroomingz(CMakePackage): def cmake_args(self): args = [] - if "+shared" in self.spec: + if self.spec.satisfies("+shared"): args.append("-DBUILD_SHARED_LIBS=ON") else: args.append("-DBUILD_SHARED_LIBS=OFF") diff --git a/var/spack/repos/builtin/packages/blaspp/package.py b/var/spack/repos/builtin/packages/blaspp/package.py index b6ba591ed6cf5f..e58d274483cc1d 100644 --- a/var/spack/repos/builtin/packages/blaspp/package.py +++ b/var/spack/repos/builtin/packages/blaspp/package.py @@ -91,11 +91,11 @@ def cmake_args(self): backend_config = "-Duse_cuda=%s" % ("+cuda" in spec) if self.version >= Version("2021.04.01"): backend = "none" - if "+cuda" in spec: + if spec.satisfies("+cuda"): backend = "cuda" - if "+rocm" in spec: + if spec.satisfies("+rocm"): backend = "hip" - if "+sycl" in spec: + if spec.satisfies("+sycl"): backend = "sycl" backend_config = "-Dgpu_backend=%s" % backend diff --git a/var/spack/repos/builtin/packages/blast-plus/package.py b/var/spack/repos/builtin/packages/blast-plus/package.py index cb5a3589bd5994..ffc98650cd5106 100644 --- a/var/spack/repos/builtin/packages/blast-plus/package.py +++ b/var/spack/repos/builtin/packages/blast-plus/package.py @@ -94,7 +94,7 @@ def configure_args(self): if spec.target.family != "aarch64": config_args.append("--with-64") - if "+static" in spec: + if spec.satisfies("+static"): config_args.append("--with-static") # FIXME # args << "--with-static-exe" unless OS.linux? @@ -102,17 +102,17 @@ def configure_args(self): else: config_args.extend(["--with-dll", "--without-static", "--without-static-exe"]) - if "+jpeg" in spec: + if spec.satisfies("+jpeg"): config_args.append("--with-jpeg={0}".format(self.spec["jpeg"].prefix)) else: config_args.append("--without-jpeg") - if "+png" in spec: + if spec.satisfies("+png"): config_args.append("--with-png={0}".format(self.spec["libpng"].prefix)) else: config_args.append("--without-png") - if "+freetype" in spec: + if spec.satisfies("+freetype"): config_args.append("--with-freetype={0}".format(self.spec["freetype"].prefix)) else: config_args.append("--without-freetype") @@ -126,42 +126,42 @@ def configure_args(self): # else: # config_args.append('--without-hdf5') - if "+zlib" in spec: + if spec.satisfies("+zlib"): config_args.append("--with-z={0}".format(self.spec["zlib-api"].prefix)) else: config_args.append("--without-z") - if "+bzip2" in spec: + if spec.satisfies("+bzip2"): config_args.append("--with-bz2={0}".format(self.spec["bzip2"].prefix)) else: config_args.append("--without-bz2") - if "+lzo" in spec: + if spec.satisfies("+lzo"): config_args.append("--with-lzo={0}".format(self.spec["lzo"].prefix)) else: config_args.append("--without-lzo") - if "+gnutls" in spec: + if spec.satisfies("+gnutls"): config_args.append("--with-gnutls={0}".format(self.spec["gnutls"].prefix)) else: config_args.append("--without-gnutls") - if "+openssl" in spec: + if spec.satisfies("+openssl"): config_args.append("--with-openssl={0}".format(self.spec["openssl"].prefix)) else: config_args.append("--without-openssl") - if "+pcre" in spec: + if spec.satisfies("+pcre"): config_args.append("--with-pcre={0}".format(self.spec["pcre"].prefix)) else: config_args.append("--without-pcre") - if "+python" in spec: + if spec.satisfies("+python"): config_args.append("--with-python={0}".format(self.spec["python"].home)) else: config_args.append("--without-python") - if "+perl" in spec: + if spec.satisfies("+perl"): config_args.append("--with-perl={0}".format(self.spec["perl"].prefix)) else: config_args.append("--without-python") diff --git a/var/spack/repos/builtin/packages/blis/package.py b/var/spack/repos/builtin/packages/blis/package.py index e298ca6a69c666..56524abfd7528a 100644 --- a/var/spack/repos/builtin/packages/blis/package.py +++ b/var/spack/repos/builtin/packages/blis/package.py @@ -55,17 +55,17 @@ def configure_args(self): spec = self.spec config_args = ["--enable-threading={0}".format(spec.variants["threads"].value)] - if "+ilp64" in spec: + if spec.satisfies("+ilp64"): config_args.append("--blas-int-size=64") else: config_args.append("--blas-int-size=32") - if "+cblas" in spec: + if spec.satisfies("+cblas"): config_args.append("--enable-cblas") else: config_args.append("--disable-cblas") - if "+blas" in spec: + if spec.satisfies("+blas"): config_args.append("--enable-blas") else: config_args.append("--disable-blas") diff --git a/var/spack/repos/builtin/packages/bml/package.py b/var/spack/repos/builtin/packages/bml/package.py index a2f7eecb0d4e90..5eb36f7063628d 100644 --- a/var/spack/repos/builtin/packages/bml/package.py +++ b/var/spack/repos/builtin/packages/bml/package.py @@ -49,7 +49,7 @@ class Bml(CMakePackage): def cmake_args(self): args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")] spec = self.spec - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append("-DBML_MPI=True") args.append("-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc) args.append("-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx) diff --git a/var/spack/repos/builtin/packages/bohrium/package.py b/var/spack/repos/builtin/packages/bohrium/package.py index c9f01ae431423d..a49e30b439eed2 100644 --- a/var/spack/repos/builtin/packages/bohrium/package.py +++ b/var/spack/repos/builtin/packages/bohrium/package.py @@ -148,7 +148,7 @@ def cmake_args(self): # args += ["-DVE_OPENCL=" + str("+opencl" in spec), "-DVE_CUDA=" + str("+cuda" in spec)] - if "+openmp" in spec: + if spec.satisfies("+openmp"): args += [ "-DVE_OPENMP=ON", "-DOPENMP_FOUND=True", @@ -160,7 +160,7 @@ def cmake_args(self): # # Extension methods # - if "+blas" in spec: + if spec.satisfies("+blas"): args += [ "-DEXT_BLAS=ON", "-DCBLAS_FOUND=True", @@ -170,7 +170,7 @@ def cmake_args(self): else: args += ["-DEXT_BLAS=OFF", "-DDCBLAS_FOUND=False"] - if "+lapack" in spec: + if spec.satisfies("+lapack"): args += [ "-DEXT_LAPACK=ON", "-DLAPACKE_FOUND=True", @@ -180,7 +180,7 @@ def cmake_args(self): else: args += ["-DEXT_LAPACK=OFF", "-DLAPACKE_FOUND=False"] - if "+opencv" in spec: + if spec.satisfies("+opencv"): args += [ "-DEXT_OPENCV=ON", "-DOpenCV_FOUND=True", @@ -234,11 +234,11 @@ def check_install(self): # Collect the stacks which should be available: stacks = ["default"] - if "+openmp" in spec: + if spec.satisfies("+openmp"): stacks.append("openmp") - if "+cuda" in spec: + if spec.satisfies("+cuda"): stacks.append("cuda") - if "+opencl" in spec: + if spec.satisfies("+opencl"): stacks.append("opencl") # C++ compiler and compiler flags @@ -268,7 +268,7 @@ def check_install(self): compare_output(cpp_output, "Success!\n") # Python test (if +python) - if "+python" in spec: + if spec.satisfies("+python"): file_pyadd = join_path(os.path.dirname(self.module.__file__), "pyadd.py") py_output = python(file_pyadd, output=str, env=test_env) compare_output(py_output, "Success!\n") diff --git a/var/spack/repos/builtin/packages/boinc-client/package.py b/var/spack/repos/builtin/packages/boinc-client/package.py index 5e120eeccf2776..b58a1ef7c13a9e 100644 --- a/var/spack/repos/builtin/packages/boinc-client/package.py +++ b/var/spack/repos/builtin/packages/boinc-client/package.py @@ -60,7 +60,7 @@ def configure_args(self): args.append("--disable-server") args.append("--enable-client") - if "+manager" in spec: + if spec.satisfies("+manager"): args.append("--enable-manager") else: args.append("--disable-manager") diff --git a/var/spack/repos/builtin/packages/bookleaf-cpp/package.py b/var/spack/repos/builtin/packages/bookleaf-cpp/package.py index b9d9df610c8ebc..54611870df977f 100644 --- a/var/spack/repos/builtin/packages/bookleaf-cpp/package.py +++ b/var/spack/repos/builtin/packages/bookleaf-cpp/package.py @@ -39,16 +39,16 @@ def cmake_args(self): spec = self.spec cmake_args = [] - if "+typhon" in spec: + if spec.satisfies("+typhon"): cmake_args.append("-DENABLE_TYPHON=ON") - if "+parmetis" in spec: + if spec.satisfies("+parmetis"): cmake_args.append("-DENABLE_PARMETIS=ON") - if "+silo" in spec: + if spec.satisfies("+silo"): cmake_args.append("-DENABLE_SILO=ON") - if "+caliper" in spec: + if spec.satisfies("+caliper"): cmake_args.append("-DENABLE_CALIPER=ON") return cmake_args diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 0447cee7bd413c..d0da3cdb7da00c 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -507,10 +507,10 @@ def determine_bootstrap_options(self, spec, with_libs, options): options.append("--with-toolset=%s" % boost_toolset_id) options.append("--with-libraries=%s" % ",".join(with_libs)) - if "+python" in spec: + if spec.satisfies("+python"): options.append("--with-python=%s" % spec["python"].command.path) - if "+icu" in spec: + if spec.satisfies("+icu"): options.append("--with-icu") else: options.append("--without-icu") @@ -522,7 +522,7 @@ def determine_bootstrap_options(self, spec, with_libs, options): # Skip this on Windows since we don't have a cl.exe wrapper in spack f.write("using {0} : : {1} ;\n".format(boost_toolset_id, spack_cxx)) - if "+mpi" in spec: + if spec.satisfies("+mpi"): # Use the correct mpi compiler. If the compiler options are # empty or undefined, Boost will attempt to figure out the # correct options by running "${mpicxx} -show" or something @@ -532,21 +532,21 @@ def determine_bootstrap_options(self, spec, with_libs, options): mpi_line = "using mpi : %s" % spec["mpi"].mpicxx f.write(mpi_line + " ;\n") - if "+python" in spec: + if spec.satisfies("+python"): f.write(self.bjam_python_line(spec)) def determine_b2_options(self, spec, options): - if "+debug" in spec: + if spec.satisfies("+debug"): options.append("variant=debug") else: options.append("variant=release") - if "+icu" in spec: + if spec.satisfies("+icu"): options.extend(["-s", "ICU_PATH=%s" % spec["icu4c"].prefix]) else: options.append("--disable-icu") - if "+iostreams" in spec: + if spec.satisfies("+iostreams"): options.extend( [ "-s", @@ -568,17 +568,17 @@ def determine_b2_options(self, spec, options): ] ) # At least with older Xcode, _lzma_cputhreads is missing (#33998) - if "platform=darwin" in self.spec: + if self.spec.satisfies("platform=darwin"): options.extend(["-s", "NO_LZMA=1"]) link_types = ["static"] - if "+shared" in spec: + if spec.satisfies("+shared"): link_types.append("shared") threading_opts = [] - if "+multithreaded" in spec: + if spec.satisfies("+multithreaded"): threading_opts.append("multi") - if "+singlethreaded" in spec: + if spec.satisfies("+singlethreaded"): threading_opts.append("single") if not threading_opts: raise RuntimeError( @@ -589,9 +589,9 @@ def determine_b2_options(self, spec, options): if "+context" in spec and "context-impl" in spec.variants: options.extend(["context-impl=%s" % spec.variants["context-impl"].value]) - if "+taggedlayout" in spec: + if spec.satisfies("+taggedlayout"): layout = "tagged" - elif "+versionedlayout" in spec: + elif spec.satisfies("+versionedlayout"): layout = "versioned" else: if len(threading_opts) > 1: @@ -623,7 +623,7 @@ def determine_b2_options(self, spec, options): if flag: cxxflags.append(flag) - if "+pic" in self.spec: + if self.spec.satisfies("+pic"): cxxflags.append(self.compiler.cxx_pic_flag) # clang is not officially supported for pre-compiled headers @@ -632,7 +632,7 @@ def determine_b2_options(self, spec, options): # https://svn.boost.org/trac/boost/ticket/12496 if spec.satisfies("%apple-clang") or spec.satisfies("%clang") or spec.satisfies("%fj"): options.extend(["pch=off"]) - if "+clanglibcpp" in spec: + if spec.satisfies("+clanglibcpp"): cxxflags.append("-stdlib=libc++") options.extend(["toolset=clang", 'linkflags="-stdlib=libc++"']) elif spec.satisfies("%xl") or spec.satisfies("%xl_r"): @@ -696,7 +696,7 @@ def install(self, spec, prefix): with_libs.remove("random") if not spec.satisfies("@1.39.0:") and "exception" in with_libs: with_libs.remove("exception") - if "+graph" in spec and "+mpi" in spec: + if spec.satisfies("+graph") and spec.satisfies("+mpi"): with_libs.append("graph_parallel") if not with_libs: @@ -753,7 +753,7 @@ def install(self, spec, prefix): threading_opts = self.determine_b2_options(spec, b2_options) # Create headers if building from a git checkout - if "@develop" in spec: + if spec.satisfies("@develop"): b2("headers", *b2_options) b2("--clean", *b2_options) @@ -766,7 +766,7 @@ def install(self, spec, prefix): else: b2("install", *b2_options) - if "+multithreaded" in spec and "~taggedlayout" in spec: + if spec.satisfies("+multithreaded") and spec.satisfies("~taggedlayout"): self.add_buildopt_symlinks(prefix) # The shared libraries are not installed correctly diff --git a/var/spack/repos/builtin/packages/botan/package.py b/var/spack/repos/builtin/packages/botan/package.py index 9a16a46547abd4..c9dd90fbf0d2ac 100644 --- a/var/spack/repos/builtin/packages/botan/package.py +++ b/var/spack/repos/builtin/packages/botan/package.py @@ -60,7 +60,7 @@ def edit(self, spec, prefix): def configure_args(self): spec = self.spec args = ["--prefix={0}".format(self.prefix)] - if "+doc" in spec: + if spec.satisfies("+doc"): args.append("--with-documentation") else: args.append("--without-documentation") diff --git a/var/spack/repos/builtin/packages/bowtie/package.py b/var/spack/repos/builtin/packages/bowtie/package.py index cabf35d67dc5f0..593ae4adefef43 100644 --- a/var/spack/repos/builtin/packages/bowtie/package.py +++ b/var/spack/repos/builtin/packages/bowtie/package.py @@ -74,7 +74,7 @@ def edit(self, spec, prefix): makefile.filter("CXX = .*", "CPP = " + env["CXX"]) def build(self, spec, prefix): - if "+tbb" in spec: + if spec.satisfies("+tbb"): make() else: make("NO_TBB=1") diff --git a/var/spack/repos/builtin/packages/bricks/package.py b/var/spack/repos/builtin/packages/bricks/package.py index adef4b41c25eb3..64962089bebb2a 100644 --- a/var/spack/repos/builtin/packages/bricks/package.py +++ b/var/spack/repos/builtin/packages/bricks/package.py @@ -47,7 +47,7 @@ class Bricks(CMakePackage): def cmake_args(self): """CMake arguments for configure stage""" args = [self.define_from_variant("BRICK_USE_OPENCL", "cuda")] - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): args.append(f"-DOCL_ROOT:STRING={self.spec['opencl-clhpp'].prefix}") return args diff --git a/var/spack/repos/builtin/packages/butterflypack/package.py b/var/spack/repos/builtin/packages/butterflypack/package.py index 3d2e8db6b3b4f9..7fc6cbd77b9648 100644 --- a/var/spack/repos/builtin/packages/butterflypack/package.py +++ b/var/spack/repos/builtin/packages/butterflypack/package.py @@ -79,7 +79,7 @@ def cmake_args(self): self.define_from_variant("BUILD_SHARED_LIBS", "shared"), ] args.append("-Denable_openmp=%s" % ("ON" if "+openmp" in spec else "OFF")) - if "%cce" in spec: + if spec.satisfies("%cce"): # Assume the proper Cray CCE module (cce) is loaded: craylibs_var = "CRAYLIBS_" + str(spec.target.family).upper() craylibs_path = env.get(craylibs_var, None) diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 1a60cd030c6ea6..7bcb0bfc34244a 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -65,9 +65,9 @@ def libs(self): def flag_handler(self, name, flags): if name == "cflags": - if "+pic" in self.spec: + if self.spec.satisfies("+pic"): flags.append(self.compiler.cc_pic_flag) - if "+debug" in self.spec: + if self.spec.satisfies("+debug"): flags.append("-g") return (flags, None, None) @@ -123,7 +123,7 @@ def patch(self): def install(self, spec, prefix): # Build the dynamic library first - if "+shared" in spec: + if spec.satisfies("+shared"): make("-f", "Makefile-libbz2_so") # Build the static library and everything else @@ -145,7 +145,7 @@ def install(self, spec, prefix): make() make("install", "PREFIX={0}".format(prefix)) - if "+shared" in spec: + if spec.satisfies("+shared"): install("bzip2-shared", join_path(prefix.bin, "bzip2")) v1, v2, v3 = (self.spec.version.up_to(i) for i in (1, 2, 3)) diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py index fe16bcb62078a5..28919db0661c46 100644 --- a/var/spack/repos/builtin/packages/c-blosc/package.py +++ b/var/spack/repos/builtin/packages/c-blosc/package.py @@ -54,7 +54,7 @@ def libs(self): def cmake_args(self): args = [] - if "+avx2" in self.spec: + if self.spec.satisfies("+avx2"): args.append("-DDEACTIVATE_AVX2=OFF") else: args.append("-DDEACTIVATE_AVX2=ON") diff --git a/var/spack/repos/builtin/packages/cabana/package.py b/var/spack/repos/builtin/packages/cabana/package.py index 556d2ae2cf6744..f2d90bbf20e56a 100644 --- a/var/spack/repos/builtin/packages/cabana/package.py +++ b/var/spack/repos/builtin/packages/cabana/package.py @@ -144,7 +144,7 @@ def cmake_args(self): options.append(self.define(cbn_disable, "ON")) # Use hipcc for HIP. - if "+rocm" in self.spec: + if self.spec.satisfies("+rocm"): options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)) return options diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py index fc0b3db426ca3c..ee8a65d94d9fd7 100644 --- a/var/spack/repos/builtin/packages/caffe/package.py +++ b/var/spack/repos/builtin/packages/caffe/package.py @@ -92,7 +92,7 @@ def cmake_args(self): ] ) - if "+cuda" in spec: + if spec.satisfies("+cuda"): if spec.variants["cuda_arch"].value[0] != "none": cuda_arch = spec.variants["cuda_arch"].value args.append(self.define("CUDA_ARCH_NAME", "Manual")) diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index 6d220d2027c77f..52af9c58bfd4c7 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -83,7 +83,7 @@ def autoreconf(self, spec, prefix): def configure_args(self): args = ["--disable-trace", "--enable-tee"] # can cause problems with libiberty - if "+X" in self.spec: + if self.spec.satisfies("+X"): args.extend(["--enable-xlib", "--enable-xcb"]) else: args.extend(["--disable-xlib", "--disable-xcb"]) diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py index 904e808de11790..af82c89b901310 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -159,40 +159,40 @@ def cmake_args(self): self.define_from_variant("WITH_KOKKOS", "kokkos"), ] - if "+papi" in spec: + if spec.satisfies("+papi"): args.append("-DPAPI_PREFIX=%s" % spec["papi"].prefix) - if "+libdw" in spec: + if spec.satisfies("+libdw"): args.append("-DLIBDW_PREFIX=%s" % spec["elfutils"].prefix) - if "+libpfm" in spec: + if spec.satisfies("+libpfm"): args.append("-DLIBPFM_INSTALL=%s" % spec["libpfm4"].prefix) - if "+sosflow" in spec: + if spec.satisfies("+sosflow"): args.append("-DSOS_PREFIX=%s" % spec["sosflow"].prefix) - if "+variorum" in spec: + if spec.satisfies("+variorum"): args.append("-DVARIORUM_PREFIX=%s" % spec["variorum"].prefix) # -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5 callpath_flag = "LIBUNWIND" if spec.satisfies("@2.5:") else "CALLPATH" - if "+libunwind" in spec: + if spec.satisfies("+libunwind"): args.append("-DLIBUNWIND_PREFIX=%s" % spec["unwind"].prefix) args.append("-DWITH_%s=On" % callpath_flag) else: args.append("-DWITH_%s=Off" % callpath_flag) - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append("-DMPI_C_COMPILER=%s" % spec["mpi"].mpicc) args.append("-DMPI_CXX_COMPILER=%s" % spec["mpi"].mpicxx) - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("-DCUDA_TOOLKIT_ROOT_DIR=%s" % spec["cuda"].prefix) # technically only works with cuda 10.2+, otherwise cupti is in # ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI args.append("-DCUPTI_PREFIX=%s" % spec["cuda"].prefix) - if "+vtune" in spec: + if spec.satisfies("+vtune"): itt_dir = join_path(spec["intel-oneapi-vtune"].prefix, "vtune", "latest") args.append("-DITT_PREFIX=%s" % itt_dir) - if "+rocm" in spec: + if spec.satisfies("+rocm"): args.append("-DCMAKE_CXX_COMPILER={0}".format(spec["hip"].hipcc)) args.append("-DROCM_PREFIX=%s" % spec["hsa-rocr-dev"].prefix) diff --git a/var/spack/repos/builtin/packages/camellia/package.py b/var/spack/repos/builtin/packages/camellia/package.py index 1ae82413474d10..2e0c0fbb02d76e 100644 --- a/var/spack/repos/builtin/packages/camellia/package.py +++ b/var/spack/repos/builtin/packages/camellia/package.py @@ -49,7 +49,7 @@ def cmake_args(self): "-DBUILD_FOR_INSTALL:BOOL=ON", ] - if "+moab" in spec: + if spec.satisfies("+moab"): options.extend(["-DENABLE_MOAB:BOOL=ON", "-DMOAB_PATH:PATH=%s" % spec["moab"].prefix]) else: options.append("-DENABLE_MOAB:BOOL=OFF") diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py index 324a075ecb59a5..6e1d44188d32e6 100644 --- a/var/spack/repos/builtin/packages/camp/package.py +++ b/var/spack/repos/builtin/packages/camp/package.py @@ -75,7 +75,7 @@ def cmake_args(self): options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix)) options.append(self.define_from_variant("ENABLE_CUDA", "cuda")) - if "+cuda" in spec: + if spec.satisfies("+cuda"): options.append("-DCUDA_TOOLKIT_ROOT_DIR={0}".format(spec["cuda"].prefix)) if not spec.satisfies("cuda_arch=none"): @@ -86,7 +86,7 @@ def cmake_args(self): options.append("-DCMAKE_CUDA_FLAGS:STRING={0}".format(flag)) options.append(self.define_from_variant("ENABLE_HIP", "rocm")) - if "+rocm" in spec: + if spec.satisfies("+rocm"): options.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)) archs = self.spec.variants["amdgpu_target"].value diff --git a/var/spack/repos/builtin/packages/camx/package.py b/var/spack/repos/builtin/packages/camx/package.py index 92b995dd736df5..08249b3e8ebd56 100644 --- a/var/spack/repos/builtin/packages/camx/package.py +++ b/var/spack/repos/builtin/packages/camx/package.py @@ -92,7 +92,7 @@ def edit(self, spec, prefix): ) makefile.filter("OPENMPI MVAPICH", "OPENMPI MVAPICH IntelMPI", string=True) - if "+mpi" in spec: + if spec.satisfies("+mpi"): # Substitute CC, FC. makefile.filter("CC = .*", "CC = " + spec["mpi"].mpicc) makefile.filter("FC = .*", "FC = " + spec["mpi"].mpifc) @@ -122,7 +122,7 @@ def build_targets(self): compiler = os.path.basename(env["FC"]) + omp args = ["COMPILER={0}".format(compiler)] # Set MPI. - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): mpi = self.spec["mpi"] args += ["MPI={0}".format(mpi.name), "MPI_INST={0}".format(mpi.prefix)] return args diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py index 94a8c4c1fbbd36..2be36b1d91c217 100644 --- a/var/spack/repos/builtin/packages/cantera/package.py +++ b/var/spack/repos/builtin/packages/cantera/package.py @@ -118,7 +118,7 @@ def build_args(self, spec, prefix): ) # Sundials support - if "+sundials" in spec: + if spec.satisfies("+sundials"): if spec.satisfies("@2.3.0:"): args.append("system_sundials=y") else: @@ -137,7 +137,7 @@ def build_args(self, spec, prefix): ) # Python module - if "+python" in spec: + if spec.satisfies("+python"): args.extend(["python_package=full", "python_cmd={0}".format(python.path)]) if spec["python"].satisfies("@3:"): args.extend(["python3_package=y", "python3_cmd={0}".format(python.path)]) @@ -148,7 +148,7 @@ def build_args(self, spec, prefix): args.append("python3_package=n") # Matlab toolbox - if "+matlab" in spec: + if spec.satisfies("+matlab"): args.extend(["matlab_toolbox=y", "matlab_path={0}".format(spec["matlab"].prefix)]) else: args.append("matlab_toolbox=n") @@ -156,7 +156,7 @@ def build_args(self, spec, prefix): return args def build_test(self): - if "+python" in self.spec: + if self.spec.satisfies("+python"): # Tests will always fail if Python dependencies aren't built # In addition, 3 of the tests fail when run in parallel scons("test", parallel=False) diff --git a/var/spack/repos/builtin/packages/capnproto/package.py b/var/spack/repos/builtin/packages/capnproto/package.py index f590f876c2d341..dfa56ac9f12990 100644 --- a/var/spack/repos/builtin/packages/capnproto/package.py +++ b/var/spack/repos/builtin/packages/capnproto/package.py @@ -53,12 +53,12 @@ class Capnproto(AutotoolsPackage): def configure_args(self): args = [] - if "+tls" in self.spec: + if self.spec.satisfies("+tls"): args.append("--with-openssl") else: args.append("--without-openssl") - if "+zlib" in self.spec: + if self.spec.satisfies("+zlib"): args.append("--with-zlib") else: args.append("--without-zlib") diff --git a/var/spack/repos/builtin/packages/cardioid/package.py b/var/spack/repos/builtin/packages/cardioid/package.py index de91899e2b2b08..0f0bc8b31dab9f 100644 --- a/var/spack/repos/builtin/packages/cardioid/package.py +++ b/var/spack/repos/builtin/packages/cardioid/package.py @@ -48,12 +48,12 @@ def cmake_args(self): "-DCMAKE_CXX_COMPILER:STRING=" + spec["mpi"].mpicxx, ] - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): args.append("-DENABLE_CUDA:BOOL=ON") args.append("-DCUDA_TOOLKIT_ROOT:PATH=" + spec["cuda"].prefix) else: args.append("-DENABLE_CUDA:BOOL=OFF") - if "+mfem" in self.spec: + if self.spec.satisfies("+mfem"): args.append("-DMFEM_DIR:PATH=" + spec["mfem"].prefix) return args diff --git a/var/spack/repos/builtin/packages/care/package.py b/var/spack/repos/builtin/packages/care/package.py index 68583088d6c6ea..34fdc7d3a0d25a 100644 --- a/var/spack/repos/builtin/packages/care/package.py +++ b/var/spack/repos/builtin/packages/care/package.py @@ -123,7 +123,7 @@ def cmake_args(self): options = [] options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix)) - if "+cuda" in spec: + if spec.satisfies("+cuda"): options.extend( [ "-DENABLE_CUDA=ON", @@ -143,7 +143,7 @@ def cmake_args(self): else: options.append("-DENABLE_CUDA=OFF") - if "+rocm" in spec: + if spec.satisfies("+rocm"): options.extend(["-DENABLE_HIP=ON", "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)]) archs = self.spec.variants["amdgpu_target"].value diff --git a/var/spack/repos/builtin/packages/castep/package.py b/var/spack/repos/builtin/packages/castep/package.py index 66689fb48c32e8..50249351734f86 100644 --- a/var/spack/repos/builtin/packages/castep/package.py +++ b/var/spack/repos/builtin/packages/castep/package.py @@ -59,13 +59,13 @@ def build_targets(self): spec = self.spec targetlist = [f"PWD={self.stage.source_path}"] - if "+mpi" in spec: + if spec.satisfies("+mpi"): targetlist.append("COMMS_ARCH=mpi") targetlist.append(f"FFTLIBDIR={spec['fftw-api'].prefix.lib}") targetlist.append(f"MATHLIBDIR={spec['blas'].prefix.lib}") - if "^mkl" in spec: + if spec.satisfies("^mkl"): targetlist.append("FFT=mkl") if self.spec.satisfies("@20:"): targetlist.append("MATHLIBS=mkl") diff --git a/var/spack/repos/builtin/packages/ccs-qcd/package.py b/var/spack/repos/builtin/packages/ccs-qcd/package.py index 1c437a63594b7b..49125e30499ee5 100644 --- a/var/spack/repos/builtin/packages/ccs-qcd/package.py +++ b/var/spack/repos/builtin/packages/ccs-qcd/package.py @@ -69,7 +69,7 @@ def edit(self, spec, prefix): chgopt, join_path(self.stage.source_path, "src", "make.gfortran.inc"), ) - if "%fj" in spec: + if spec.satisfies("%fj"): filter_file( "mpifrtpx", spec["mpi"].mpifc, @@ -95,7 +95,7 @@ def edit(self, spec, prefix): def build(self, spec, prefix): ccs_class = "CLASS=" + spec.variants["class"].value with working_dir("src"): - if "%fj" in spec: + if spec.satisfies("%fj"): make("MAKE_INC=make.fx10.inc", ccs_class) else: make("MAKE_INC=make.gfortran.inc", ccs_class) diff --git a/var/spack/repos/builtin/packages/cdhit/package.py b/var/spack/repos/builtin/packages/cdhit/package.py index 15923d966fabe0..1816717dc2b8cc 100644 --- a/var/spack/repos/builtin/packages/cdhit/package.py +++ b/var/spack/repos/builtin/packages/cdhit/package.py @@ -38,9 +38,9 @@ def patch(self): def build(self, spec, prefix): mkdirp(prefix.bin) make_args = [] - if "~openmp" in spec: + if spec.satisfies("~openmp"): make_args.append("openmp=no") - if "~zlib" in spec: + if spec.satisfies("~zlib"): make_args.append("zlib=no") make(*make_args) diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py index af1b14fc4814b1..2d617d33f8164d 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -218,7 +218,7 @@ def yes_or_prefix(spec_name): prefix = self.spec[spec_name].prefix return "yes" if is_system_path(prefix) else prefix - if "+netcdf" in self.spec: + if self.spec.satisfies("+netcdf"): config_args.append("--with-netcdf=" + yes_or_prefix("netcdf-c")) # We need to make sure that the libtool script of libcdi - the # internal library of CDO - finds the correct version of hdf5. @@ -251,12 +251,12 @@ def yes_or_prefix(spec_name): if self.spec.satisfies("@1.9:"): config_args.append("--without-eccodes") - if "+external-grib1" in self.spec: + if self.spec.satisfies("+external-grib1"): config_args.append("--disable-cgribex") else: config_args.append("--enable-cgribex") - if "+szip" in self.spec: + if self.spec.satisfies("+szip"): config_args.append("--with-szlib=" + yes_or_prefix("szip")) else: config_args.append("--without-szlib") @@ -267,7 +267,7 @@ def yes_or_prefix(spec_name): "udunits2", activation_value=lambda x: yes_or_prefix("udunits") ) - if "+libxml2" in self.spec: + if self.spec.satisfies("+libxml2"): libxml2_spec = self.spec["libxml2"] if is_system_path(libxml2_spec.prefix): config_args.append("--with-libxml2=yes") diff --git a/var/spack/repos/builtin/packages/ceres-solver/package.py b/var/spack/repos/builtin/packages/ceres-solver/package.py index b70deaab6afd75..7c7af49a4b5cf8 100644 --- a/var/spack/repos/builtin/packages/ceres-solver/package.py +++ b/var/spack/repos/builtin/packages/ceres-solver/package.py @@ -52,17 +52,17 @@ def cmake_args(self): ] ) - if "+suitesparse" in self.spec: + if self.spec.satisfies("+suitesparse"): args.append("-DSUITESPARSE=ON") else: args.append("-DSUITESPARSE=OFF") - if "+shared" in self.spec: + if self.spec.satisfies("+shared"): args.append("-DBUILD_SHARED_LIBS=ON") else: args.append("-DBUILD_SHARED_LIBS=OFF") - if "+examples" in self.spec: + if self.spec.satisfies("+examples"): args.append("-DBUILD_EXAMPLES=ON") else: args.append("-DBUILD_EXAMPLES=OFF") diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py index 46422d4be02492..c8bc0ba5b71da1 100644 --- a/var/spack/repos/builtin/packages/cfitsio/package.py +++ b/var/spack/repos/builtin/packages/cfitsio/package.py @@ -48,7 +48,7 @@ def url_for_version(self, version): def configure_args(self): spec = self.spec extra_args = [] - if "+bzip2" in spec: + if spec.satisfies("+bzip2"): extra_args.append(f"--with-bzip2={spec['bzip2'].prefix}"), return extra_args @@ -57,7 +57,7 @@ def build_targets(self): targets = ["all"] # Build shared if variant is set. - if "+shared" in self.spec: + if self.spec.satisfies("+shared"): targets += ["shared"] return targets diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py index daa2a48f06dfdd..18170077580437 100644 --- a/var/spack/repos/builtin/packages/cgal/package.py +++ b/var/spack/repos/builtin/packages/cgal/package.py @@ -104,7 +104,7 @@ def setup_build_environment(self, env): env.set("BOOST_INCLUDEDIR", spec["boost"].headers.directories[0]) env.set("BOOST_LIBRARYDIR", spec["boost"].libs.directories[0]) - if "+eigen" in spec: + if spec.satisfies("+eigen"): env.set("EIGEN3_INC_DIR", spec["eigen"].headers.directories[0]) def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/cgm/package.py b/var/spack/repos/builtin/packages/cgm/package.py index 1d81247db3e985..d3cfeff80465f1 100644 --- a/var/spack/repos/builtin/packages/cgm/package.py +++ b/var/spack/repos/builtin/packages/cgm/package.py @@ -33,7 +33,7 @@ def configure_args(self): spec = self.spec args = [] - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.extend( [ "--with-mpi", @@ -44,15 +44,15 @@ def configure_args(self): else: args.append("--without-mpi") - if "+oce" in spec: + if spec.satisfies("+oce"): args.append("--with-occ={0}".format(spec["oce"].prefix)) else: args.append("--without-occ") - if "+debug" in spec: + if spec.satisfies("+debug"): args.append("--enable-debug") - if "+shared" in spec: + if spec.satisfies("+shared"): args.append("--enable-shared") return args diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py index d6abd25088bd2c..6ffdb0071771b1 100644 --- a/var/spack/repos/builtin/packages/cgns/package.py +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -110,10 +110,10 @@ def cmake_args(self): "-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx, ] ) - if "+fortran" in spec: + if spec.satisfies("+fortran"): options.append(self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)) - if "+hdf5" in spec: + if spec.satisfies("+hdf5"): options.extend( [ "-DCGNS_ENABLE_HDF5:BOOL=ON", @@ -122,7 +122,7 @@ def cmake_args(self): "-DHDF5_LIBRARY_DIR:PATH=%s" % spec["hdf5"].prefix.lib, ] ) - if "+mpi" in spec: + if spec.satisfies("+mpi"): options.extend(["-DHDF5_NEED_MPI:BOOL=ON", "-DHDF5_ENABLE_PARALLEL:BOOL=ON"]) else: options.extend(["-DCGNS_ENABLE_HDF5=OFF"]) diff --git a/var/spack/repos/builtin/packages/chai/package.py b/var/spack/repos/builtin/packages/chai/package.py index 877b42fe4a5f74..2d408dbc0a2b59 100644 --- a/var/spack/repos/builtin/packages/chai/package.py +++ b/var/spack/repos/builtin/packages/chai/package.py @@ -209,7 +209,7 @@ def initconfig_compiler_entries(self): # Default entries are already defined in CachedCMakePackage, inherit them: entries = super().initconfig_compiler_entries() - if "+rocm" in spec: + if spec.satisfies("+rocm"): entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) llnl_link_helpers(entries, spec, compiler) @@ -224,16 +224,16 @@ def initconfig_hardware_entries(self): entries.append("# Package custom hardware settings") entries.append("#------------------{0}\n".format("-" * 30)) - if "+cuda" in spec: + if spec.satisfies("+cuda"): entries.append(cmake_cache_option("ENABLE_CUDA", True)) - if "+separable_compilation" in spec: + if spec.satisfies("+separable_compilation"): entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True)) entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True)) else: entries.append(cmake_cache_option("ENABLE_CUDA", False)) - if "+rocm" in spec: + if spec.satisfies("+rocm"): entries.append(cmake_cache_option("ENABLE_HIP", True)) else: entries.append(cmake_cache_option("ENABLE_HIP", False)) @@ -260,7 +260,7 @@ def initconfig_package_entries(self): entries.append("#------------------{0}\n".format("-" * 60)) entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix)) - if "+raja" in spec: + if spec.satisfies("+raja"): entries.append(cmake_cache_option("{}ENABLE_RAJA_PLUGIN".format(option_prefix), True)) entries.append(cmake_cache_path("RAJA_DIR", spec["raja"].prefix)) entries.append(cmake_cache_path("umpire_DIR", spec["umpire"].prefix)) @@ -278,7 +278,7 @@ def initconfig_package_entries(self): entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec)) entries.append(cmake_cache_option("ENABLE_EXAMPLES", "+examples" in spec)) entries.append(cmake_cache_option("ENABLE_DOCS", False)) - if "tests=benchmarks" in spec: + if spec.satisfies("tests=benchmarks"): # BLT requires ENABLE_TESTS=True to enable benchmarks entries.append(cmake_cache_option("ENABLE_BENCHMARKS", True)) entries.append(cmake_cache_option("ENABLE_TESTS", True)) diff --git a/var/spack/repos/builtin/packages/chameleon/package.py b/var/spack/repos/builtin/packages/chameleon/package.py index 8a600cdb8d9449..a6af23d186a62d 100644 --- a/var/spack/repos/builtin/packages/chameleon/package.py +++ b/var/spack/repos/builtin/packages/chameleon/package.py @@ -114,14 +114,14 @@ def cmake_args(self): ) if spec.satisfies("~simgrid"): - if "^intel-mkl" in spec or "^intel-parallel-studio+mkl" in spec: - if "threads=none" in spec: + if spec.satisfies("^intel-mkl") or spec.satisfies("^intel-parallel-studio+mkl"): + if spec.satisfies("threads=none"): args.extend([self.define("BLA_VENDOR", "Intel10_64lp_seq")]) else: args.extend([self.define("BLA_VENDOR", "Intel10_64lp")]) - elif "^netlib-lapack" in spec: + elif spec.satisfies("^netlib-lapack"): args.extend([self.define("BLA_VENDOR", "Generic")]) - elif "^openblas" in spec: + elif spec.satisfies("^openblas"): args.extend([self.define("BLA_VENDOR", "OpenBLAS")]) return args diff --git a/var/spack/repos/builtin/packages/channelflow/package.py b/var/spack/repos/builtin/packages/channelflow/package.py index bd8352c7102ad5..ca802875cde95c 100644 --- a/var/spack/repos/builtin/packages/channelflow/package.py +++ b/var/spack/repos/builtin/packages/channelflow/package.py @@ -76,7 +76,7 @@ def cmake_args(self): args.append("-DWITH_NETCDF:STRING={0}".format(netcdf_str[spec.variants["netcdf"].value])) # Set an MPI compiler for parallel builds - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.append("-DCMAKE_CXX_COMPILER:PATH={0}".format(spec["mpi"].mpicxx)) return args diff --git a/var/spack/repos/builtin/packages/charliecloud/package.py b/var/spack/repos/builtin/packages/charliecloud/package.py index 0bc1f030c5d993..98035a27515f41 100644 --- a/var/spack/repos/builtin/packages/charliecloud/package.py +++ b/var/spack/repos/builtin/packages/charliecloud/package.py @@ -161,14 +161,14 @@ def configure_args(self): py_path = self.spec["python"].command.path args.append("--with-python={0}".format(py_path)) - if "+docs" in self.spec: + if self.spec.satisfies("+docs"): sphinx_bin = "{0}".format(self.spec["py-sphinx"].prefix.bin) args.append("--enable-html") args.append("--with-sphinx-build={0}".format(sphinx_bin.join("sphinx-build"))) else: args.append("--disable-html") - if "+squashfuse" in self.spec: + if self.spec.satisfies("+squashfuse"): squashfuse_prefix = "{0}".format(self.spec["squashfuse"].prefix) args.append("--with-libsquashfuse={0}".format(squashfuse_prefix)) diff --git a/var/spack/repos/builtin/packages/charmpp/package.py b/var/spack/repos/builtin/packages/charmpp/package.py index 5d0e230d68607f..abed322050703d 100644 --- a/var/spack/repos/builtin/packages/charmpp/package.py +++ b/var/spack/repos/builtin/packages/charmpp/package.py @@ -277,7 +277,7 @@ def charmarch(self): def install(self, spec, prefix): if not ("backend=mpi" in self.spec) or not ("backend=netlrts" in self.spec): - if "+pthreads" in self.spec: + if self.spec.satisfies("+pthreads"): raise InstallError( "The pthreads option is only\ available on the Netlrts and MPI \ @@ -289,7 +289,7 @@ def install(self, spec, prefix): or ("backend=ofi" in self.spec) or ("backend=gni" in self.spec) ): - if "pmi=none" in self.spec: + if self.spec.satisfies("pmi=none"): raise InstallError( "The UCX/OFI/GNI backends need \ PMI to run. Please add pmi=... \ @@ -302,7 +302,7 @@ def install(self, spec, prefix): or ("pmi=slurmpmi" in self.spec) or ("pmi=slurmpmi2" in self.spec) ): - if "^openmpi" in self.spec: + if self.spec.satisfies("^openmpi"): raise InstallError( "To use any process management \ interface other than PMIx, \ @@ -324,15 +324,15 @@ def install(self, spec, prefix): options.append("-j%d" % make_jobs) options.append("--destination=%s" % builddir) - if "pmi=slurmpmi" in spec: + if spec.satisfies("pmi=slurmpmi"): options.append("slurmpmi") - if "pmi=slurmpmi2" in spec: + if spec.satisfies("pmi=slurmpmi2"): options.append("slurmpmi2") - if "pmi=pmix" in spec: + if spec.satisfies("pmi=pmix"): options.append("ompipmix") options.extend(["--basedir=%s" % spec["openmpi"].prefix]) - if "backend=mpi" in spec: + if spec.satisfies("backend=mpi"): # in intelmpi /include and /lib fails so --basedir # cannot be used options.extend( @@ -342,9 +342,9 @@ def install(self, spec, prefix): ["--libdir={0}".format(libdir) for libdir in spec["mpi"].libs.directories] ) - if "backend=ucx" in spec: + if spec.satisfies("backend=ucx"): options.extend(["--basedir=%s" % spec["ucx"].prefix]) - if "+papi" in spec: + if spec.satisfies("+papi"): options.extend(["papi", "--basedir=%s" % spec["papi"].prefix]) if "+smp" in spec and "backend=multicore" not in spec: # The 'multicore' backend always uses SMP, so we don't have to @@ -352,7 +352,7 @@ def install(self, spec, prefix): # of Charm++ v7.0.0 it is actually a build error to append 'smp' # with the 'multicore' backend. options.append("smp") - if "+tcp" in spec: + if spec.satisfies("+tcp"): if "backend=netlrts" not in spec: # This is a Charm++ limitation; it would lead to a # build error @@ -360,18 +360,18 @@ def install(self, spec, prefix): "The +tcp variant requires " "the backend=netlrts communication mechanism" ) options.append("tcp") - if "+omp" in spec: + if spec.satisfies("+omp"): options.append("omp") - if "+pthreads" in spec: + if spec.satisfies("+pthreads"): options.append("pthreads") - if "+cuda" in spec: + if spec.satisfies("+cuda"): options.append("cuda") - if "+shared" in spec: + if spec.satisfies("+shared"): options.append("--build-shared") - if "+production" in spec: + if spec.satisfies("+production"): options.append("--with-production") - if "+tracing" in spec: + if spec.satisfies("+tracing"): options.append("--enable-tracing") # Call "make" via the build script diff --git a/var/spack/repos/builtin/packages/chatterbug/package.py b/var/spack/repos/builtin/packages/chatterbug/package.py index b7fff4fc1c2314..d8d7c0351ecd9a 100644 --- a/var/spack/repos/builtin/packages/chatterbug/package.py +++ b/var/spack/repos/builtin/packages/chatterbug/package.py @@ -39,13 +39,13 @@ def build_targets(self): return targets def build(self, spec, prefix): - if "+scorep" in spec: + if spec.satisfies("+scorep"): make("WITH_OTF2=YES") else: make() def install(self, spec, prefix): - if "+scorep" in spec: + if spec.satisfies("+scorep"): make("WITH_OTF2=YES", "PREFIX=" + spec.prefix, "install") else: make("PREFIX=" + spec.prefix, "install") diff --git a/var/spack/repos/builtin/packages/chombo/package.py b/var/spack/repos/builtin/packages/chombo/package.py index 73a03560b242b7..0f50baf3d5e990 100644 --- a/var/spack/repos/builtin/packages/chombo/package.py +++ b/var/spack/repos/builtin/packages/chombo/package.py @@ -84,7 +84,7 @@ def edit(self, spec, prefix): # Compilers and Compiler flags defs_file.filter(r"^#\s*CXX\s*=.*", "CXX = %s" % spack_cxx) defs_file.filter(r"^#\s*FC\s*=.*", "FC = %s" % spack_fc) - if "+mpi" in spec: + if spec.satisfies("+mpi"): defs_file.filter(r"^#\s*MPICXX\s*=.*", "MPICXX = %s" % self.spec["mpi"].mpicxx) # Conditionally determined settings @@ -92,7 +92,7 @@ def edit(self, spec, prefix): defs_file.filter(r"^#\s*DIM\s*=.*", "DIM = %s" % spec.variants["dims"].value) # HDF5 settings - if "+hdf5" in spec: + if spec.satisfies("+hdf5"): defs_file.filter(r"^#\s*USE_HDF5\s*=.*", "USE_HDF5 = TRUE") defs_file.filter( r"^#\s*HDFINCFLAGS\s*=.*", "HDFINCFLAGS = -I%s" % spec["hdf5"].prefix.include @@ -100,7 +100,7 @@ def edit(self, spec, prefix): defs_file.filter( r"^#\s*HDFLIBFLAGS\s*=.*", "HDFLIBFLAGS = %s" % spec["hdf5"].libs.ld_flags ) - if "+mpi" in spec: + if spec.satisfies("+mpi"): defs_file.filter( r"^#\s*HDFMPIINCFLAGS\s*=.*", "HDFMPIINCFLAGS = -I%s" % spec["hdf5"].prefix.include, diff --git a/var/spack/repos/builtin/packages/citcoms/package.py b/var/spack/repos/builtin/packages/citcoms/package.py index ae71db7661a662..c697d05a02f992 100644 --- a/var/spack/repos/builtin/packages/citcoms/package.py +++ b/var/spack/repos/builtin/packages/citcoms/package.py @@ -43,7 +43,7 @@ class Citcoms(AutotoolsPackage): depends_on("hdf5+mpi", when="+hdf5") def setup_build_environment(self, env): - if "+ggrd" in self.spec: + if self.spec.satisfies("+ggrd"): env.set("HC_HOME", self.spec["hc"].prefix) def configure_args(self): @@ -54,17 +54,17 @@ def configure_args(self): args.append("--without-pyre") args.append("--without-exchanger") - if "+ggrd" in self.spec: + if self.spec.satisfies("+ggrd"): args.append("--with-ggrd") else: args.append("--without-ggrd") - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): args.append("--with-cuda") else: args.append("--without-cuda") - if "+hdf5" in self.spec: + if self.spec.satisfies("+hdf5"): args.extend( [ "--with-hdf5", diff --git a/var/spack/repos/builtin/packages/clamr/package.py b/var/spack/repos/builtin/packages/clamr/package.py index b879eeeef3b397..84ae3108a4210d 100644 --- a/var/spack/repos/builtin/packages/clamr/package.py +++ b/var/spack/repos/builtin/packages/clamr/package.py @@ -44,16 +44,16 @@ class Clamr(CMakePackage): def cmake_args(self): spec = self.spec cmake_args = [] - if "graphics=none" in spec: + if spec.satisfies("graphics=none"): cmake_args.append("-DGRAPHICS_TYPE=None") - elif "graphics=mpe" in spec: + elif spec.satisfies("graphics=mpe"): cmake_args.append("-DGRAPHICS_TYPE=MPE") else: cmake_args.append("-DGRAPHICS_TYPE=OpenGL") - if "precision=full" in spec: + if spec.satisfies("precision=full"): cmake_args.append("-DPRECISION_TYPE=full_precision") - elif "precision=single" in spec: + elif spec.satisfies("precision=single"): cmake_args.append("-DPRECISION_TYPE=minimum_precision") else: cmake_args.append("-DPRECISION_TYPE=mixed_precision") diff --git a/var/spack/repos/builtin/packages/clapack/package.py b/var/spack/repos/builtin/packages/clapack/package.py index 84f5500161e17c..2f774f8d94d1c9 100644 --- a/var/spack/repos/builtin/packages/clapack/package.py +++ b/var/spack/repos/builtin/packages/clapack/package.py @@ -30,7 +30,7 @@ class Clapack(MakefilePackage): def edit(self, spec, prefix): copy("make.inc.example", "make.inc") - if "+external-blas" in spec: + if spec.satisfies("+external-blas"): make_inc = FileFilter("make.inc") make_inc.filter(r"^BLASLIB.*", "BLASLIB = ../../libcblaswr.a -lcblas -latlas") makefile = FileFilter("Makefile") diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py index 1b56df15901a55..67bab58d7a950c 100644 --- a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py @@ -136,7 +136,7 @@ def pgo_train(self): cmake.add_default_envmod(use_mods) def setup_build_environment(self, env): - if "%apple-clang" in self.spec: + if self.spec.satisfies("%apple-clang"): env.append_flags("CFLAGS", "-mmacosx-version-min=10.13") env.append_flags("CXXFLAGS", "-mmacosx-version-min=10.13") env.append_flags("LDFLAGS", "-mmacosx-version-min=10.13") diff --git a/var/spack/repos/builtin/packages/clingo/package.py b/var/spack/repos/builtin/packages/clingo/package.py index 784533c0120d63..10fdb2359135c4 100644 --- a/var/spack/repos/builtin/packages/clingo/package.py +++ b/var/spack/repos/builtin/packages/clingo/package.py @@ -98,7 +98,7 @@ def cmake_args(self): args = [self.define("CLINGO_BUILD_WITH_LUA", False)] - if "+python" in self.spec: + if self.spec.satisfies("+python"): suffix = python( "-c", "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))", output=str ).strip() @@ -116,7 +116,7 @@ def cmake_args(self): # Use LTO also for non-Intel compilers please. This can be removed when they # bump cmake_minimum_required to VERSION 3.9. - if "+ipo" in self.spec: + if self.spec.satisfies("+ipo"): args.append(self.define("CMAKE_POLICY_DEFAULT_CMP0069", "NEW")) return args diff --git a/var/spack/repos/builtin/packages/cln/package.py b/var/spack/repos/builtin/packages/cln/package.py index f5a61e1148ef19..404742e9dc89a6 100644 --- a/var/spack/repos/builtin/packages/cln/package.py +++ b/var/spack/repos/builtin/packages/cln/package.py @@ -76,7 +76,7 @@ def configure_args(self): configure_args = [] - if "+gmp" in spec: + if spec.satisfies("+gmp"): configure_args.append("--with-gmp={0}".format(spec["gmp"].prefix)) else: configure_args.append("--without-gmp") diff --git a/var/spack/repos/builtin/packages/cloverleaf-ref/package.py b/var/spack/repos/builtin/packages/cloverleaf-ref/package.py index a2b7ce586882cc..025a6b5d0f65ef 100644 --- a/var/spack/repos/builtin/packages/cloverleaf-ref/package.py +++ b/var/spack/repos/builtin/packages/cloverleaf-ref/package.py @@ -45,9 +45,9 @@ def build_targets(self): targets.append("MPI_COMPILER={0}".format(self.spec["mpi"].mpifc)) targets.append("C_MPI_COMPILER={0}".format(self.spec["mpi"].mpicc)) - if "+debug" in self.spec: + if self.spec.satisfies("+debug"): targets.append("DEBUG=1") - if "+ieee" in self.spec: + if self.spec.satisfies("+ieee"): targets.append("IEEE=1") # Work around for bug in Makefiles for versions 1.3 and 1.1 (mis-defined as -openmp) diff --git a/var/spack/repos/builtin/packages/cloverleaf/package.py b/var/spack/repos/builtin/packages/cloverleaf/package.py index 2fa6a9a2c744b1..a561b1039e0a5e 100644 --- a/var/spack/repos/builtin/packages/cloverleaf/package.py +++ b/var/spack/repos/builtin/packages/cloverleaf/package.py @@ -58,15 +58,15 @@ def patch_for_reference_module(self): def type_of_build(self): build = "ref" - if "build=cuda" in self.spec: + if self.spec.satisfies("build=cuda"): build = "CUDA" - elif "build=mpi_only" in self.spec: + elif self.spec.satisfies("build=mpi_only"): build = "MPI" - elif "build=openacc_cray" in self.spec: + elif self.spec.satisfies("build=openacc_cray"): build = "OpenACC_CRAY" - elif "build=openmp_only" in self.spec: + elif self.spec.satisfies("build=openmp_only"): build = "OpenMP" - elif "build=serial" in self.spec: + elif self.spec.satisfies("build=serial"): build = "Serial" return build @@ -75,42 +75,42 @@ def type_of_build(self): def build_targets(self): targets = ["--directory=CloverLeaf_{0}".format(self.type_of_build)] - if "mpi" in self.spec: + if self.spec.satisfies("^mpi"): targets.append("MPI_COMPILER={0}".format(self.spec["mpi"].mpifc)) targets.append("C_MPI_COMPILER={0}".format(self.spec["mpi"].mpicc)) else: targets.append("MPI_COMPILER=f90") targets.append("C_MPI_COMPILER=cc") - if "%gcc" in self.spec: + if self.spec.satisfies("%gcc"): targets.append("COMPILER=GNU") targets.append("FLAGS_GNU=") targets.append("CFLAGS_GNU=") - elif "%cce" in self.spec: + elif self.spec.satisfies("%cce"): targets.append("COMPILER=CRAY") targets.append("FLAGS_CRAY=") targets.append("CFLAGS_CRAY=") - elif "%intel" in self.spec: + elif self.spec.satisfies("%intel"): targets.append("COMPILER=INTEL") targets.append("FLAGS_INTEL=") targets.append("CFLAGS_INTEL=") - elif "%aocc" in self.spec: + elif self.spec.satisfies("%aocc"): targets.append("COMPILER=AOCC") - elif "%pgi" in self.spec: + elif self.spec.satisfies("%pgi"): targets.append("COMPILER=PGI") targets.append("FLAGS_PGI=") targets.append("CFLAGS_PGI=") - elif "%xl" in self.spec: + elif self.spec.satisfies("%xl"): targets.append("COMPILER=XLF") targets.append("FLAGS_XLF=") targets.append("CFLAGS_XLF=") # Explicit mention of else clause is not working as expected # So, not mentioning them - if "+debug" in self.spec: + if self.spec.satisfies("+debug"): targets.append("DEBUG=1") - if "+ieee" in self.spec: + if self.spec.satisfies("+ieee"): targets.append("IEEE=1") return targets diff --git a/var/spack/repos/builtin/packages/cloverleaf3d/package.py b/var/spack/repos/builtin/packages/cloverleaf3d/package.py index 9b7ba8a2c751a5..8e8f8de0fd8eb6 100644 --- a/var/spack/repos/builtin/packages/cloverleaf3d/package.py +++ b/var/spack/repos/builtin/packages/cloverleaf3d/package.py @@ -39,9 +39,9 @@ class Cloverleaf3d(MakefilePackage): def type_of_build(self): build = "ref" - if "+opencl" in self.spec: + if self.spec.satisfies("+opencl"): build = "OpenCL" - elif "+openacc" in self.spec: + elif self.spec.satisfies("+openacc"): build = "OpenACC" return build @@ -54,33 +54,33 @@ def build_targets(self): "--directory=CloverLeaf3D_{0}".format(self.type_of_build), ] - if "%gcc" in self.spec: + if self.spec.satisfies("%gcc"): targets.append("COMPILER=GNU") targets.append("FLAGS_GNU=-O3 -funroll-loops") targets.append("CFLAGS_GNU=-O3 -funroll-loops") targets.append("OMP_GNU=-fopenmp") - elif "%cce" in self.spec: + elif self.spec.satisfies("%cce"): targets.append("COMPILER=CRAY") targets.append("FLAGS_CRAY=") targets.append("CFLAGS_CRAY=") - elif "%intel" in self.spec: + elif self.spec.satisfies("%intel"): targets.append("COMPILER=INTEL") targets.append("FLAGS_INTEL=") targets.append("CFLAGS_INTEL=") - elif "%pgi" in self.spec: + elif self.spec.satisfies("%pgi"): targets.append("COMPILER=PGI") targets.append("FLAGS_PGI=") targets.append("CFLAGS_PGI=") - elif "%xl" in self.spec: + elif self.spec.satisfies("%xl"): targets.append("COMPILER=XLF") targets.append("FLAGS_XLF=") targets.append("CFLAGS_XLF=") - elif "%arm" in self.spec: + elif self.spec.satisfies("%arm"): targets.append("COMPILER=ARM") targets.append("FLAGS_ARM=-O3 -funroll-loops") targets.append("CFLAGS_ARM=-O3 -funroll-loops") targets.append("OMP_ARM=-fopenmp") - elif "%nvhpc" in self.spec: + elif self.spec.satisfies("%nvhpc"): targets.append("COMPILER=NVHPC") targets.append("FLAGS_NVHPC=-O3 -fast") targets.append("CFLAGS_NVHPC=-O3 -fast") diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index bdc249af157d0a..7d8d32bbc5615a 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -297,7 +297,7 @@ def bootstrap_args(self): if jobs is not None: args.append("--parallel={0}".format(jobs)) - if "+ownlibs" in spec: + if spec.satisfies("+ownlibs"): # Build and link to the CMake-provided third-party libraries args.append("--no-system-libs") else: @@ -312,7 +312,7 @@ def bootstrap_args(self): args.append("--system-curl") args.append("--no-qt-gui") - if "+doc" in spec: + if spec.satisfies("+doc"): args.append("--sphinx-html") args.append("--sphinx-man") diff --git a/var/spack/repos/builtin/packages/cmdstan/package.py b/var/spack/repos/builtin/packages/cmdstan/package.py index db56241565961b..23ab6b990d6b66 100644 --- a/var/spack/repos/builtin/packages/cmdstan/package.py +++ b/var/spack/repos/builtin/packages/cmdstan/package.py @@ -37,7 +37,7 @@ def edit(self, spec, prefix): else: cxx_type = spec.compiler.name - if "+mpi" in spec: + if spec.satisfies("+mpi"): cxx = spec["mpi"].mpicxx else: cxx = spack_cxx @@ -53,13 +53,13 @@ def edit(self, spec, prefix): "TBB_CXX_TYPE={0}\n".format(cxx_type), ] - if "+threads" in spec: + if spec.satisfies("+threads"): make_options.append("STAN_THREADS=true\n") - if "+opencl" in spec: + if spec.satisfies("+opencl"): make_options.append("STAN_OPENCL=true\n") - if "+mpi" in spec: + if spec.satisfies("+mpi"): make_options.append("STAN_MPI=true\n") filepath = join_path(self.stage.source_path, "make", "local") diff --git a/var/spack/repos/builtin/packages/cntk/package.py b/var/spack/repos/builtin/packages/cntk/package.py index 8d243e7d42f972..0af3911b28ee56 100644 --- a/var/spack/repos/builtin/packages/cntk/package.py +++ b/var/spack/repos/builtin/packages/cntk/package.py @@ -82,29 +82,29 @@ def install(self, spec, prefix): args.append("--with-boost=" + spec["boost"].prefix) args.append("--with-protobuf=" + spec["protobuf"].prefix) - if "+debug" in spec: + if spec.satisfies("+debug"): args.append("--with-buildtype=debug") else: args.append("--with-buildtype=release") - if "+1bitsgd" in spec: + if spec.satisfies("+1bitsgd"): args.append("--1bitsgd=yes") args.append("--with-1bitsgd={0}/include".format(spec["cntk1bitsgd"].prefix)) - if "+asgd" in spec: + if spec.satisfies("+asgd"): args.append("--asgd=yes") args.append("--with-multiverso={0}".format(spec["multiverso"].prefix)) else: args.append("--asgd=no") - if "+opencv" in spec: + if spec.satisfies("+opencv"): args.append("--with-opencv=" + spec["opencv"].prefix) - if "+kaldi" in spec: + if spec.satisfies("+kaldi"): args.append("--with-kaldi=" + spec["kaldi"].prefix) args.append("--with-openfst=" + spec["openfst"].prefix) - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("--cuda=yes") args.append("--with-cuda={0}".format(spec["cuda"].prefix)) args.append("--with-cub={0}".format(spec["cub"].prefix.include)) diff --git a/var/spack/repos/builtin/packages/codes/package.py b/var/spack/repos/builtin/packages/codes/package.py index 1614166e288975..455ad130be095d 100644 --- a/var/spack/repos/builtin/packages/codes/package.py +++ b/var/spack/repos/builtin/packages/codes/package.py @@ -45,7 +45,7 @@ def configure_args(self): "PKG_CONFIG_PATH=%s/pkgconfig" % spec["ross"].prefix.lib, ] - if "+dumpi" in spec: + if spec.satisfies("+dumpi"): config_args.extend(["--with-dumpi=%s" % spec["sst-dumpi"].prefix]) return config_args diff --git a/var/spack/repos/builtin/packages/coevp/package.py b/var/spack/repos/builtin/packages/coevp/package.py index b0a695e14f257e..c44e42e6aefb5e 100644 --- a/var/spack/repos/builtin/packages/coevp/package.py +++ b/var/spack/repos/builtin/packages/coevp/package.py @@ -42,11 +42,11 @@ class Coevp(MakefilePackage): @property def build_targets(self): targets = [] - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): targets.append("COEVP_MPI=yes") else: targets.append("COEVP_MPI=no") - if "+flann" in self.spec: + if self.spec.satisfies("+flann"): targets.append("FLANN=yes") targets.append("FLANN_TARGET=") targets.append( @@ -55,7 +55,7 @@ def build_targets(self): else: targets.append("FLANN=no") targets.append("REDIS=no") - if "+silo" in self.spec: + if self.spec.satisfies("+silo"): targets.append("SILO=yes") targets.append("SILO_TARGET=") targets.append("SILO_LOC={0}".format(self.spec["silo"].prefix)) diff --git a/var/spack/repos/builtin/packages/cohmm/package.py b/var/spack/repos/builtin/packages/cohmm/package.py index 49bec4f075441d..6cf71a9eb3e1b0 100644 --- a/var/spack/repos/builtin/packages/cohmm/package.py +++ b/var/spack/repos/builtin/packages/cohmm/package.py @@ -28,9 +28,9 @@ class Cohmm(MakefilePackage): depends_on("gnuplot", when="+gnuplot") def edit(self, spec, prefix): - if "+openmp" in spec: + if spec.satisfies("+openmp"): filter_file("DO_OPENMP = O.*", "DO_OPENMP = ON", "Makefile") - if "+gnuplot" in spec: + if spec.satisfies("+gnuplot"): filter_file("DO_GNUPLOT = O.*", "DO_GNUPLOT = ON", "Makefile") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/comd/package.py b/var/spack/repos/builtin/packages/comd/package.py index af109ac1f44b94..5d2e050a13b0c8 100644 --- a/var/spack/repos/builtin/packages/comd/package.py +++ b/var/spack/repos/builtin/packages/comd/package.py @@ -50,11 +50,11 @@ def build_targets(self): comd_variant = "CoMD" cc = spack_cc - if "+openmp" in self.spec: + if self.spec.satisfies("+openmp"): targets.append("--directory=src-openmp") comd_variant += "-openmp" cflags += " -fopenmp " - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): comd_variant += "-mpi" targets.append("CC = {0}".format(self.spec["mpi"].mpicc)) else: @@ -62,17 +62,17 @@ def build_targets(self): else: targets.append("--directory=src-mpi") - if "~mpi" in self.spec: + if self.spec.satisfies("~mpi"): comd_variant += "-serial" targets.append("CC = {0}".format(cc)) else: comd_variant += "-mpi" targets.append("CC = {0}".format(self.spec["mpi"].mpicc)) - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): cflags += "-DDO_MPI" targets.append("INCLUDES = {0}".format(self.spec["mpi"].prefix.include)) - if "+precision" in self.spec: + if self.spec.satisfies("+precision"): cflags += " -DDOUBLE " else: cflags += " -DSINGLE " diff --git a/var/spack/repos/builtin/packages/compadre/package.py b/var/spack/repos/builtin/packages/compadre/package.py index 801f0d8b865096..19c99e217bd5f0 100644 --- a/var/spack/repos/builtin/packages/compadre/package.py +++ b/var/spack/repos/builtin/packages/compadre/package.py @@ -59,14 +59,14 @@ def cmake_args(self): ] ) - if "+mpi" in spec: + if spec.satisfies("+mpi"): options.append("-DCompadre_USE_MPI:BOOL=ON") - if "~tests" in spec: + if spec.satisfies("~tests"): options.append("-DCompadre_EXAMPLES:BOOL=OFF") options.append("-DCompadre_TESTS:BOOL=OFF") - if "+shared" in spec: + if spec.satisfies("+shared"): options.append("-DBUILD_SHARED_LIBS:BOOL=ON") else: options.append("-DBUILD_SHARED_LIBS:BOOL=OFF") diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index ebf372fefac447..f2d88358ead086 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -313,7 +313,7 @@ def hostconfig(self): ####################### c_compiler = env["SPACK_CC"] cpp_compiler = env["SPACK_CXX"] - if "+fortran" in spec: + if spec.satisfies("+fortran"): f_compiler = env["SPACK_FC"] else: f_compiler = None @@ -364,13 +364,13 @@ def hostconfig(self): cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler)) cfg.write("# fortran compiler used by spack\n") - if "+fortran" in spec: + if spec.satisfies("+fortran"): cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON")) cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER", f_compiler)) else: cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF")) - if "+shared" in spec: + if spec.satisfies("+shared"): cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON")) else: cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF")) @@ -405,12 +405,12 @@ def hostconfig(self): ####################### # Examples/Utilities ####################### - if "+examples" in spec: + if spec.satisfies("+examples"): cfg.write(cmake_cache_entry("ENABLE_EXAMPLES", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_EXAMPLES", "OFF")) - if "+utilities" in spec: + if spec.satisfies("+utilities"): cfg.write(cmake_cache_entry("ENABLE_UTILS", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_UTILS", "OFF")) @@ -418,7 +418,7 @@ def hostconfig(self): ####################### # Unit Tests ####################### - if "+test" in spec: + if spec.satisfies("+test"): cfg.write(cmake_cache_entry("ENABLE_TESTS", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_TESTS", "OFF")) @@ -434,7 +434,7 @@ def hostconfig(self): flags = "${BLT_EXE_LINKER_FLAGS} -lstdc++ " + rpaths cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags)) - if "+shared" in spec: + if spec.satisfies("+shared"): flags = "${CMAKE_SHARED_LINKER_FLAGS} " + rpaths cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", flags)) @@ -444,7 +444,7 @@ def hostconfig(self): cfg.write("# Python Support\n") - if "+python" in spec: + if spec.satisfies("+python"): cfg.write("# Enable python module builds\n") cfg.write(cmake_cache_entry("ENABLE_PYTHON", "ON")) cfg.write("# python from spack \n") @@ -458,14 +458,14 @@ def hostconfig(self): else: cfg.write(cmake_cache_entry("ENABLE_PYTHON", "OFF")) - if "+doc" in spec: - if "+python" in spec: + if spec.satisfies("+doc"): + if spec.satisfies("+python"): cfg.write(cmake_cache_entry("ENABLE_DOCS", "ON")) cfg.write("# sphinx from spack \n") sphinx_build_exe = join_path(spec["py-sphinx"].prefix.bin, "sphinx-build") cfg.write(cmake_cache_entry("SPHINX_EXECUTABLE", sphinx_build_exe)) - if "+doxygen" in spec: + if spec.satisfies("+doxygen"): cfg.write("# doxygen from uberenv\n") doxygen_exe = spec["doxygen"].command.path cfg.write(cmake_cache_entry("DOXYGEN_EXECUTABLE", doxygen_exe)) @@ -478,7 +478,7 @@ def hostconfig(self): cfg.write("# MPI Support\n") - if "+mpi" in spec: + if spec.satisfies("+mpi"): mpicc_path = spec["mpi"].mpicc mpicxx_path = spec["mpi"].mpicxx mpifc_path = spec["mpi"].mpifc if "+fortran" in spec else None @@ -493,11 +493,11 @@ def hostconfig(self): cfg.write(cmake_cache_entry("ENABLE_MPI", "ON")) cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path)) cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path)) - if "+blt_find_mpi" in spec: + if spec.satisfies("+blt_find_mpi"): cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON")) else: cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF")) - if "+fortran" in spec: + if spec.satisfies("+fortran"): cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER", mpifc_path)) mpiexe_bin = join_path(spec["mpi"].prefix.bin, "mpiexec") @@ -515,7 +515,7 @@ def hostconfig(self): # ZFP ####################### cfg.write("# zfp from spack \n") - if "+zfp" in spec: + if spec.satisfies("+zfp"): cfg.write(cmake_cache_entry("ZFP_DIR", spec["zfp"].prefix)) else: cfg.write("# zfp not built by spack \n") @@ -524,7 +524,7 @@ def hostconfig(self): # Caliper ####################### cfg.write("# caliper from spack \n") - if "+caliper" in spec: + if spec.satisfies("+caliper"): cfg.write(cmake_cache_entry("CALIPER_DIR", spec["caliper"].prefix)) cfg.write(cmake_cache_entry("ADIAK_DIR", spec["adiak"].prefix)) else: @@ -542,9 +542,9 @@ def hostconfig(self): cfg.write("# hdf5 from spack \n") - if "+hdf5" in spec: + if spec.satisfies("+hdf5"): cfg.write(cmake_cache_entry("HDF5_DIR", spec["hdf5"].prefix)) - if "zlib-api" in spec: + if spec.satisfies("^zlib-api"): # HDF5 depends on zlib cfg.write(cmake_cache_entry("ZLIB_DIR", spec["zlib-api"].prefix)) else: @@ -556,7 +556,7 @@ def hostconfig(self): cfg.write("# h5z-zfp from spack \n") - if "+hdf5+zfp" in spec: + if spec.satisfies("+hdf5+zfp"): cfg.write(cmake_cache_entry("H5ZZFP_DIR", spec["h5z-zfp"].prefix)) else: cfg.write("# h5z-zfp not built by spack \n") @@ -567,7 +567,7 @@ def hostconfig(self): cfg.write("# silo from spack \n") - if "+silo" in spec: + if spec.satisfies("+silo"): cfg.write(cmake_cache_entry("SILO_DIR", spec["silo"].prefix)) else: cfg.write("# silo not built by spack \n") @@ -578,7 +578,7 @@ def hostconfig(self): cfg.write("# ADIOS from spack \n") - if "+adios" in spec: + if spec.satisfies("+adios"): cfg.write(cmake_cache_entry("ADIOS_DIR", spec["adios"].prefix)) else: cfg.write("# adios not built by spack \n") @@ -589,7 +589,7 @@ def hostconfig(self): cfg.write("# parmetis from spack \n") - if "+parmetis" in spec: + if spec.satisfies("+parmetis"): cfg.write(cmake_cache_entry("METIS_DIR", spec["metis"].prefix)) cfg.write(cmake_cache_entry("PARMETIS_DIR", spec["parmetis"].prefix)) else: diff --git a/var/spack/repos/builtin/packages/conquest/package.py b/var/spack/repos/builtin/packages/conquest/package.py index 56ed26c11b96ed..b3f1816a246981 100644 --- a/var/spack/repos/builtin/packages/conquest/package.py +++ b/var/spack/repos/builtin/packages/conquest/package.py @@ -66,7 +66,7 @@ def edit(self, spec, prefix): fflags = "-O3 -fallow-argument-mismatch" ldflags = "" - if "+openmp" in self.spec: + if self.spec.satisfies("+openmp"): fflags += " " + self.compiler.openmp_flag ldflags += " " + self.compiler.openmp_flag @@ -94,7 +94,7 @@ def edit(self, spec, prefix): defs_file.filter(".*FFT_LIB=.*", f"FFT_LIB={fftw_ld}") defs_file.filter(".*XC_LIB=.*", f"XC_LIB={libxc_ld} -lxcf90 -lxc") - if "+openmp" in self.spec: + if self.spec.satisfies("+openmp"): defs_file.filter("OMP_DUMMY = DUMMY", "OMP_DUMMY = ") if self.spec.variants["mult_kern"].value != "default": diff --git a/var/spack/repos/builtin/packages/converge/package.py b/var/spack/repos/builtin/packages/converge/package.py index 62834b7ec449a0..f056d234379cb2 100644 --- a/var/spack/repos/builtin/packages/converge/package.py +++ b/var/spack/repos/builtin/packages/converge/package.py @@ -146,29 +146,29 @@ def install(self, spec, prefix): # The CONVERGE tarball comes with binaries for several MPI libraries. # Only install the binary that matches the MPI we are building with. with working_dir("l_x86_64/bin"): - if "~mpi" in spec: + if spec.satisfies("~mpi"): converge = glob.glob("converge-*-serial*") post_convert = glob.glob("post_convert_serial*") - elif "hp-mpi" in spec: + elif spec.satisfies("^hp-mpi"): converge = glob.glob("converge-*-hpmpi*") # No HP-MPI version of post_convert post_convert = glob.glob("post_convert_serial*") - elif "intel-mpi" in spec or "intel-parallel-studio+mpi" in spec: + elif spec.satisfies("intel-mpi") or spec.satisfies("intel-parallel-studio+mpi"): converge = glob.glob("converge-*-intel*") # No Intel MPI version of post_convert post_convert = glob.glob("post_convert_serial*") - elif "mpich" in spec: + elif spec.satisfies("^mpich"): converge = glob.glob("converge-*-mpich*") post_convert = glob.glob("post_convert_mpich*") - elif "mvapich2" in spec: + elif spec.satisfies("^mvapich2"): converge = glob.glob("converge-*-mvapich*") # MVAPICH2 hasn't been supported since CONVERGE # came with a single serial post_convert post_convert = glob.glob("post_convert") - elif "openmpi" in spec: + elif spec.satisfies("^openmpi"): converge = glob.glob("converge-*-o*mpi*") post_convert = glob.glob("post_convert_o*mpi*") - elif "platform-mpi" in spec: + elif spec.satisfies("^platform-mpi"): converge = glob.glob("converge-*-pmpi*") post_convert = glob.glob("post_convert_pmpi*") else: diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py index aaf868e1c3534c..e1b5f1c0d256ae 100644 --- a/var/spack/repos/builtin/packages/coreutils/package.py +++ b/var/spack/repos/builtin/packages/coreutils/package.py @@ -60,7 +60,7 @@ def configure_args(self): spec = self.spec configure_args = [] if spec.satisfies("platform=darwin"): - if "+gprefix" in self.spec: + if self.spec.satisfies("+gprefix"): configure_args.append("--program-prefix=g") configure_args.append("--without-gmp") configure_args.append("gl_cv_func_ftello_works=yes") diff --git a/var/spack/repos/builtin/packages/cosma/package.py b/var/spack/repos/builtin/packages/cosma/package.py index 3bc12ac1b8e2b8..6e62f716cf4d82 100644 --- a/var/spack/repos/builtin/packages/cosma/package.py +++ b/var/spack/repos/builtin/packages/cosma/package.py @@ -83,7 +83,7 @@ class Cosma(CMakePackage): patch("fj-ssl2.patch", when="^fujitsu-ssl2") def setup_build_environment(self, env): - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): env.set("CUDA_PATH", self.spec["cuda"].prefix) def cosma_blas_cmake_arg(self): @@ -112,11 +112,11 @@ def cosma_blas_cmake_arg(self): def cosma_scalapack_cmake_arg(self): spec = self.spec - if "~scalapack" in spec: + if spec.satisfies("~scalapack"): return "OFF" - elif "^intel-mkl" in spec or "^intel-oneapi-mkl" in spec: + elif spec.satisfies("^intel-mkl") or spec.satisfies("^intel-oneapi-mkl"): return "MKL" - elif "^cray-libsci" in spec: + elif spec.satisfies("^cray-libsci"): return "CRAY_LIBSCI" return "CUSTOM" diff --git a/var/spack/repos/builtin/packages/cosmomc/package.py b/var/spack/repos/builtin/packages/cosmomc/package.py index 6bb14da1c4c7e7..93749619afb2fc 100644 --- a/var/spack/repos/builtin/packages/cosmomc/package.py +++ b/var/spack/repos/builtin/packages/cosmomc/package.py @@ -66,7 +66,7 @@ def install(self, spec, prefix): os.remove(clikdir) except OSError: pass - if "+planck" in spec: + if spec.satisfies("+planck"): os.symlink(join_path(os.environ["CLIK_DATA"], "plc_2.0"), clikdir) else: os.environ.pop("CLIK_DATA", "") @@ -93,7 +93,7 @@ def install(self, spec, prefix): raise InstallError("Only GCC and Intel compilers are supported") # Configure MPI - if "+mpi" in spec: + if spec.satisfies("+mpi"): wantmpi = "BUILD=MPI" mpif90 = "MPIF90C=%s" % spec["mpi"].mpifc else: @@ -138,7 +138,7 @@ def install(self, spec, prefix): "test_planck.ini", "tests", ] - if "+python" in spec: + if spec.satisfies("+python"): entries += ["python"] for entry in entries: if os.path.isfile(entry): @@ -171,7 +171,7 @@ def check_install(self): exe = spec["cosmomc"].command.path args = [] - if "+mpi" in spec: + if spec.satisfies("+mpi"): # Add mpirun prefix args = ["-np", "1", exe] exe = join_path(spec["mpi"].prefix.bin, "mpiexec") @@ -181,6 +181,6 @@ def check_install(self): os.symlink(join_path(prefix.share, "cosmomc", entry), entry) inifile = join_path(prefix.share, "cosmomc", "test.ini") cosmomc(*(args + [inifile])) - if "+planck" in spec: + if spec.satisfies("+planck"): inifile = join_path(prefix.share, "cosmomc", "test_planck.ini") cosmomc(*(args + [inifile])) diff --git a/var/spack/repos/builtin/packages/cosp2/package.py b/var/spack/repos/builtin/packages/cosp2/package.py index d66a22f09c3d4e..a5a78a27b0a695 100644 --- a/var/spack/repos/builtin/packages/cosp2/package.py +++ b/var/spack/repos/builtin/packages/cosp2/package.py @@ -33,14 +33,14 @@ class Cosp2(MakefilePackage): def edit(self, spec, prefix): cc = spack_cc - if "+mpi" in spec: + if spec.satisfies("+mpi"): cc = spec["mpi"].mpicc with working_dir(self.build_directory): makefile = FileFilter("Makefile.vanilla") makefile.filter(r"^CC\s*=.*", "CC = {0}".format(cc)) - if "+double" in spec: + if spec.satisfies("+double"): filter_file("DOUBLE_PRECISION = O.*", "DOUBLE_PRECISION = OFF", "Makefile.vanilla") copy("Makefile.vanilla", "Makefile") diff --git a/var/spack/repos/builtin/packages/costa/package.py b/var/spack/repos/builtin/packages/costa/package.py index 3070e78a42effd..427c8468013dfe 100644 --- a/var/spack/repos/builtin/packages/costa/package.py +++ b/var/spack/repos/builtin/packages/costa/package.py @@ -57,11 +57,11 @@ def setup_build_environment(self, env): def costa_scalapack_cmake_arg(self): spec = self.spec - if "~scalapack" in spec: + if spec.satisfies("~scalapack"): return "OFF" - elif "^intel-mkl" in spec or "^intel-oneapi-mkl" in spec: + elif spec.satisfies("^intel-mkl") or spec.satisfies("^intel-oneapi-mkl"): return "MKL" - elif "^cray-libsci" in spec: + elif spec.satisfies("^cray-libsci"): return "CRAY_LIBSCI" return "CUSTOM" diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 014b2243122e79..8c7dae2b7cf074 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -409,10 +409,10 @@ def edit(self, pkg, spec, prefix): # CP2K requires MPI 3 starting at version 2023.1 # and __MPI_VERSION is not supported anymore. - if "@:2022.2" in spec: - if "^mpi@3:" in spec: + if spec.satisfies("@:2022.2"): + if spec.satisfies("^mpi@3:"): cppflags.append("-D__MPI_VERSION=3") - elif "^mpi@2:" in spec: + elif spec.satisfies("^mpi@2:"): cppflags.append("-D__MPI_VERSION=2") cflags = optimization_flags[spec.compiler.name][:] @@ -430,23 +430,23 @@ def edit(self, pkg, spec, prefix): # C99-style for-loops with inline definition of iterating variable. cflags.append(pkg.compiler.c99_flag) - if "%intel" in spec: + if spec.satisfies("%intel"): cflags.append("-fp-model precise") cxxflags.append("-fp-model precise") fcflags += ["-fp-model precise", "-heap-arrays 64", "-g", "-traceback"] - elif "%gcc" in spec: + elif spec.satisfies("%gcc"): fcflags += [ "-ffree-form", "-ffree-line-length-none", "-ggdb", # make sure we get proper Fortran backtraces ] - elif "%aocc" in spec: + elif spec.satisfies("%aocc"): fcflags += ["-ffree-form", "-Mbackslash"] - elif "%pgi" in spec or "%nvhpc" in spec: + elif spec.satisfies("%pgi") or spec.satisfies("%nvhpc"): fcflags += ["-Mfreeform", "-Mextend"] - elif "%cce" in spec: + elif spec.satisfies("%cce"): fcflags += ["-emf", "-ffree", "-hflex_mp=strict"] - elif "%xl" in spec: + elif spec.satisfies("%xl"): fcflags += ["-qpreprocess", "-qstrict", "-q64"] ldflags += ["-Wl,--allow-multiple-definition"] @@ -457,31 +457,31 @@ def edit(self, pkg, spec, prefix): if spec.satisfies("@7.1%gcc@13:"): fcflags.append("-fallow-argument-mismatch") - if "+openmp" in spec: + if spec.satisfies("+openmp"): cflags.append(pkg.compiler.openmp_flag) cxxflags.append(pkg.compiler.openmp_flag) fcflags.append(pkg.compiler.openmp_flag) ldflags.append(pkg.compiler.openmp_flag) nvflags.append('-Xcompiler="{0}"'.format(pkg.compiler.openmp_flag)) - elif "%cce" in spec: # Cray enables OpenMP by default + elif spec.satisfies("%cce"): # Cray enables OpenMP by default cflags += ["-hnoomp"] cxxflags += ["-hnoomp"] fcflags += ["-hnoomp"] ldflags += ["-hnoomp"] - if "@7:" in spec: # recent versions of CP2K use C++14 CUDA code + if spec.satisfies("@7:"): # recent versions of CP2K use C++14 CUDA code cxxflags.append(pkg.compiler.cxx14_flag) nvflags.append(pkg.compiler.cxx14_flag) ldflags.append(fftw.libs.search_flags) - if "superlu-dist@4.3" in spec: + if spec.satisfies("^superlu-dist@4.3"): ldflags.insert(0, "-Wl,--allow-multiple-definition") - if "+libint" in spec: + if spec.satisfies("+libint"): cppflags += ["-D__LIBINT"] - if "@:6.9" in spec: + if spec.satisfies("@:6.9"): cppflags += ["-D__LIBINT_MAX_AM=6", "-D__LIBDERIV_MAX_AM1=5"] # libint-1.x.y has to be linked statically to work around @@ -499,10 +499,10 @@ def edit(self, pkg, spec, prefix): fcflags += pkgconf("--cflags", "libint2", output=str).split() libs += pkgconf("--libs", "libint2", output=str).split() - if "+libxc" in spec: + if spec.satisfies("+libxc"): cppflags += ["-D__LIBXC"] - if "@:6.9" in spec: + if spec.satisfies("@:6.9"): libxc = spec["libxc:fortran,static"] cppflags += [libxc.headers.cpp_flags] ldflags.append(libxc.libs.search_flags) @@ -514,7 +514,7 @@ def edit(self, pkg, spec, prefix): # requiring `-lxc` to be present in addition to `-lxcf03` libs += pkgconf("--libs", "libxcf03", "libxc", output=str).split() - if "+pexsi" in spec: + if spec.satisfies("+pexsi"): cppflags.append("-D__LIBPEXSI") fcflags.append("-I" + join_path(spec["pexsi"].prefix, "fortran")) libs.extend( @@ -530,7 +530,7 @@ def edit(self, pkg, spec, prefix): ] ) - if "+elpa" in spec: + if spec.satisfies("+elpa"): elpa = spec["elpa"] elpa_suffix = "_openmp" if "+openmp" in elpa else "" elpa_incdir = elpa.headers.directories[0] @@ -538,7 +538,7 @@ def edit(self, pkg, spec, prefix): fcflags += ["-I{0}".format(join_path(elpa_incdir, "modules"))] # Currently AOCC support only static libraries of ELPA - if "%aocc" in spec: + if spec.satisfies("%aocc"): libs.append( join_path( elpa.prefix.lib, ("libelpa{elpa_suffix}.a".format(elpa_suffix=elpa_suffix)) @@ -578,19 +578,19 @@ def edit(self, pkg, spec, prefix): fcflags += ["-I{0}".format(sirius.prefix.include.sirius)] libs += list(sirius.libs) - if "+plumed" in spec: + if spec.satisfies("+plumed"): dflags.extend(["-D__PLUMED2"]) cppflags.extend(["-D__PLUMED2"]) libs.extend([join_path(spec["plumed"].prefix.lib, "libplumed.{0}".format(dso_suffix))]) - if "+libvori" in spec: + if spec.satisfies("+libvori"): cppflags += ["-D__LIBVORI"] libvori = spec["libvori"].libs ldflags += [libvori.search_flags] libs += libvori libs += ["-lstdc++"] - if "+spglib" in spec: + if spec.satisfies("+spglib"): cppflags += ["-D__SPGLIB"] spglib = spec["spglib"].libs ldflags += [spglib.search_flags] @@ -601,7 +601,7 @@ def edit(self, pkg, spec, prefix): fc = spack_fc if "~mpi" in spec else spec["mpi"].mpifc # Intel - if "%intel" in spec: + if spec.satisfies("%intel"): cppflags.extend(["-D__INTEL", "-D__HAS_ISO_C_BINDING", "-D__USE_CP2K_TRACE"]) fcflags.extend(["-diag-disable 8290,8291,10010,10212,11060", "-free", "-fpp"]) @@ -619,14 +619,14 @@ def edit(self, pkg, spec, prefix): elif spec["blas"].name == "accelerate": cppflags += ["-D__ACCELERATE"] - if "+cosma" in spec: + if spec.satisfies("+cosma"): # add before ScaLAPACK to override the p?gemm symbols cosma = spec["cosma"].libs ldflags.append(cosma.search_flags) libs.extend(cosma) # MPI - if "+mpi" in spec: + if spec.satisfies("+mpi"): cppflags.extend(["-D__parallel", "-D__SCALAPACK"]) if spec["mpi"].name == "intel-oneapi-mpi": @@ -655,10 +655,10 @@ def edit(self, pkg, spec, prefix): libs.extend(mpi) libs.extend(pkg.compiler.stdcxx_libs) - if "+mpi_f08" in spec: + if spec.satisfies("+mpi_f08"): cppflags.append("-D__MPI_F08") - if "wannier90" in spec: + if spec.satisfies("^wannier90"): cppflags.append("-D__WANNIER90") wannier = join_path(spec["wannier90"].libs.directories[0], "libwannier.a") libs.append(wannier) @@ -710,7 +710,7 @@ def edit(self, pkg, spec, prefix): if cuda_arch == "35" and spec.satisfies("+cuda_arch_35_k20x"): gpuver = "K20X" - if "@2022: +rocm" in spec: + if spec.satisfies("@2022: +rocm"): libs += [ "-L{}".format(spec["rocm"].libs.directories[0]), "-L{}/stubs".format(spec["rocm"].libs.directories[0]), @@ -726,7 +726,7 @@ def edit(self, pkg, spec, prefix): cppflags += ["-D__DBCSR_ACC"] gpuver = GPU_MAP[spec.variants["amdgpu_target"].value[0]] - if "smm=libsmm" in spec: + if spec.satisfies("smm=libsmm"): lib_dir = join_path("lib", self.makefile_architecture, self.makefile_version) mkdirp(lib_dir) try: @@ -744,7 +744,7 @@ def edit(self, pkg, spec, prefix): cppflags.extend(["-D__HAS_smm_dnn", "-D__HAS_smm_vec"]) libs.append("-lsmm") - elif "smm=libxsmm" in spec: + elif spec.satisfies("smm=libxsmm"): cppflags += ["-D__LIBXSMM"] cppflags += pkgconf("--cflags-only-other", "libxsmmf", output=str).split() fcflags += pkgconf("--cflags-only-I", "libxsmmf", output=str).split() @@ -757,7 +757,7 @@ def edit(self, pkg, spec, prefix): nvflags.extend(cppflags) with open(self.makefile, "w") as mkf: - if "+plumed" in spec: + if spec.satisfies("+plumed"): mkf.write( "# include Plumed.inc as recommended by" "PLUMED to include libraries and flags" @@ -769,7 +769,7 @@ def edit(self, pkg, spec, prefix): "FC = {0}\n" "CC = {1}\n" "CXX = {2}\n" "LD = {3}\n".format(fc, cc, cxx, fc) ) - if "%intel" in spec: + if spec.satisfies("%intel"): intel_bin_dir = ancestor(pkg.compiler.cc) # CPP is a commented command in Intel arch of CP2K # This is the hack through which cp2k developers avoid doing : @@ -783,7 +783,7 @@ def edit(self, pkg, spec, prefix): mkf.write("CPP = # {0} -E\n".format(spack_cc)) mkf.write("AR = ar -qs\n") # r = qs is a GNU extension - if "+cuda" in spec: + if spec.satisfies("+cuda"): mkf.write( "{0} = {1}\n".format( acc_compiler_var, join_path(spec["cuda"].prefix, "bin", "nvcc") @@ -799,13 +799,13 @@ def fflags(var, lst): mkf.write(fflags("CPPFLAGS", cppflags)) mkf.write(fflags("CFLAGS", cflags)) mkf.write(fflags("CXXFLAGS", cxxflags)) - if "+cuda" in spec: + if spec.satisfies("+cuda"): mkf.write(fflags(acc_flags_var, nvflags)) mkf.write(fflags("FCFLAGS", fcflags)) mkf.write(fflags("LDFLAGS", ldflags)) mkf.write(fflags("LIBS", libs)) - if "%intel" in spec: + if spec.satisfies("%intel"): mkf.write(fflags("LDFLAGS_C", ldflags + ["-nofor-main"])) mkf.write("# CP2K-specific flags\n\n") @@ -921,7 +921,7 @@ def cmake_args(self): spec = self.spec args = [] - if "+cuda" in spec: + if spec.satisfies("+cuda"): if (len(spec.variants["cuda_arch"].value) > 1) or spec.satisfies("cuda_arch=none"): raise InstallError("CP2K supports only one cuda_arch at a time.") else: @@ -931,7 +931,7 @@ def cmake_args(self): self.define("CP2K_WITH_GPU", gpu_ver), ] - if "+rocm" in spec: + if spec.satisfies("+rocm"): if len(spec.variants["amdgpu_target"].value) > 1: raise InstallError("CP2K supports only one amdgpu_target at a time.") else: diff --git a/var/spack/repos/builtin/packages/cpio/package.py b/var/spack/repos/builtin/packages/cpio/package.py index 5b743a829849be..be381e52c5e46d 100644 --- a/var/spack/repos/builtin/packages/cpio/package.py +++ b/var/spack/repos/builtin/packages/cpio/package.py @@ -42,10 +42,10 @@ def flag_handler(self, name, flags): spec = self.spec if name == "cflags": - if "%intel@:17" in spec: + if spec.satisfies("%intel@:17"): flags.append("-no-gcc") - elif "%clang" in spec or "%fj" in spec: + elif spec.satisfies("%clang") or spec.satisfies("%fj"): flags.append("--rtlib=compiler-rt") return (flags, None, None) diff --git a/var/spack/repos/builtin/packages/cray-libsci/package.py b/var/spack/repos/builtin/packages/cray-libsci/package.py index 438cad5b356131..4d063172049c6b 100644 --- a/var/spack/repos/builtin/packages/cray-libsci/package.py +++ b/var/spack/repos/builtin/packages/cray-libsci/package.py @@ -64,11 +64,11 @@ def blas_libs(self): compiler = self.spec.compiler.name lib = [] - if "+openmp" in self.spec and "+mpi" in self.spec: + if self.spec.satisfies("+openmp") and self.spec.satisfies("+mpi"): lib = ["libsci_{0}_mpi_mp", "libsci_{0}_mp"] - elif "+openmp" in self.spec: + elif self.spec.satisfies("+openmp"): lib = ["libsci_{0}_mp"] - elif "+mpi" in self.spec: + elif self.spec.satisfies("+mpi"): lib = ["libsci_{0}_mpi", "libsci_{0}"] else: lib = ["libsci_{0}"] diff --git a/var/spack/repos/builtin/packages/cray-mpich/package.py b/var/spack/repos/builtin/packages/cray-mpich/package.py index 4b422bf38e2b97..3458caa225bce2 100644 --- a/var/spack/repos/builtin/packages/cray-mpich/package.py +++ b/var/spack/repos/builtin/packages/cray-mpich/package.py @@ -65,7 +65,7 @@ def external_prefix(self): return os.path.dirname(os.path.normpath(libdir)) def setup_run_environment(self, env): - if "+wrappers" in self.spec: + if self.spec.satisfies("+wrappers"): env.set("MPICC", join_path(self.prefix.bin, "mpicc")) env.set("MPICXX", join_path(self.prefix.bin, "mpicxx")) env.set("MPIF77", join_path(self.prefix.bin, "mpif77")) @@ -86,7 +86,7 @@ def setup_dependent_build_environment(self, env, dependent_spec): def setup_dependent_package(self, module, dependent_spec): spec = self.spec - if "+wrappers" in spec: + if spec.satisfies("+wrappers"): spec.mpicc = join_path(self.prefix.bin, "mpicc") spec.mpicxx = join_path(self.prefix.bin, "mpicxx") spec.mpifc = join_path(self.prefix.bin, "mpif90") diff --git a/var/spack/repos/builtin/packages/crtm-fix/package.py b/var/spack/repos/builtin/packages/crtm-fix/package.py index ca8cb421c0fe45..6dd0242c3a2016 100644 --- a/var/spack/repos/builtin/packages/crtm-fix/package.py +++ b/var/spack/repos/builtin/packages/crtm-fix/package.py @@ -42,12 +42,12 @@ def install(self, spec, prefix): mkdir(self.prefix.fix) endian_dirs = [] - if "+big_endian" in spec: + if spec.satisfies("+big_endian"): endian_dirs.append("Big_Endian") - elif "+little_endian" in spec: + elif spec.satisfies("+little_endian"): endian_dirs.append("Little_Endian") - if "+netcdf" in spec: + if spec.satisfies("+netcdf"): endian_dirs.extend(["netcdf", "netCDF"]) fix_files = [] diff --git a/var/spack/repos/builtin/packages/cudnn/package.py b/var/spack/repos/builtin/packages/cudnn/package.py index 38dc8c88a3a0e0..2d1a7b3b95ede5 100644 --- a/var/spack/repos/builtin/packages/cudnn/package.py +++ b/var/spack/repos/builtin/packages/cudnn/package.py @@ -386,13 +386,13 @@ def setup_run_environment(self, env): # Package is not compiled, and does not work unless LD_LIBRARY_PATH is set env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib) - if "target=ppc64le: platform=linux" in self.spec: + if self.spec.satisfies("target=ppc64le: platform=linux"): env.set("cuDNN_ROOT", os.path.join(self.prefix, "targets", "ppc64le-linux")) def install(self, spec, prefix): install_tree(".", prefix) - if "target=ppc64le: platform=linux" in spec: + if spec.satisfies("target=ppc64le: platform=linux"): target_lib = os.path.join(prefix, "targets", "ppc64le-linux", "lib") if os.path.isdir(target_lib) and not os.path.isdir(prefix.lib): symlink(target_lib, prefix.lib) diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index fa8316e9286a9c..c3d46c6634694e 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -281,21 +281,21 @@ def nmake_args(self): args.append("mode=%s" % mode) args.append("WITH_ZLIB=%s" % mode) args.append("ZLIB_PATH=%s" % self.spec["zlib-api"].prefix) - if "+libssh" in self.spec: + if self.spec.satisfies("+libssh"): args.append("WITH_SSH=%s" % mode) - if "+libssh2" in self.spec: + if self.spec.satisfies("+libssh2"): args.append("WITH_SSH2=%s" % mode) args.append("SSH2_PATH=%s" % self.spec["libssh2"].prefix) - if "+nghttp2" in self.spec: + if self.spec.satisfies("+nghttp2"): args.append("WITH_NGHTTP2=%s" % mode) args.append("NGHTTP2=%s" % self.spec["nghttp2"].prefix) - if "tls=openssl" in self.spec: + if self.spec.satisfies("tls=openssl"): args.append("WITH_SSL=%s" % mode) args.append("SSL_PATH=%s" % self.spec["openssl"].prefix) - elif "tls=mbedtls" in self.spec: + elif self.spec.satisfies("tls=mbedtls"): args.append("WITH_MBEDTLS=%s" % mode) args.append("MBEDTLS_PATH=%s" % self.spec["mbedtls"].prefix) - elif "tls=sspi" in self.spec: + elif self.spec.satisfies("tls=sspi"): args.append("ENABLE_SSPI=%s" % mode) # The trailing path seperator is REQUIRED for cURL to install From d3bf1e04fca844abb7c1eeac38dda4e126c81b67 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 5 Aug 2024 03:45:57 -0500 Subject: [PATCH 164/435] py-vector: add through v1.4.1 (switch to hatchling) (#45527) --- .../builtin/packages/py-vector/package.py | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-vector/package.py b/var/spack/repos/builtin/packages/py-vector/package.py index 7a5ec7749de26d..9834b452349346 100644 --- a/var/spack/repos/builtin/packages/py-vector/package.py +++ b/var/spack/repos/builtin/packages/py-vector/package.py @@ -12,16 +12,34 @@ class PyVector(PythonPackage): homepage = "https://github.com/scikit-hep/vector" pypi = "vector/vector-0.8.4.tar.gz" + maintainers("wdconinc") + + tags = ["hep"] + license("BSD-3-Clause") + version("1.4.1", sha256="15aef8911560db1ea3ffa9dbd5414d0ec575a504a2c3f23ea45170a18994466e") + version("1.3.1", sha256="1a94210c21a5d38d36d0fa36c1afb92c2857ba1d09c824b0d4b8615d51f4f2e5") + version("1.2.0", sha256="23b7ac5bdab273b4f9306167fd86666a3777a52804d0282a556d989130cb57a4") + version("1.1.1", sha256="6957451e59ce508f618335519c53f30ceb88b7053d65f3d166459fd708ed38b5") + version("1.0.0", sha256="4fada4fddaa5c1bd69a5ba296ffd948cccb575ad7abe53d14960f56fe32dd4c1") + version("0.11.0", sha256="fded30643588226f6f8b7ecd1242048ad423d29d4cd77d8000eea277479a0396") + version("0.10.0", sha256="b785678f449de32476f427911248391ddcc7c3582a522a88cbbd50c92dcae490") + version("0.9.0", sha256="67ba72edfecb5523b6f6e25156ddfc691f7588dd5dcd924838e6e3904d038778") version("0.8.5", sha256="2c7c8b228168b89da5d30d50dbd05452348920559ebe0eb94cfdafa15cdc8378") version("0.8.4", sha256="ef97bfec0263766edbb74c290401f89921f8d11ae9e4a0ffd904ae40674f1239") depends_on("python@3.6:", type=("build", "run")) - depends_on("py-setuptools@42:", type="build") - depends_on("py-setuptools-scm@3.4: +toml", type="build") - depends_on("py-wheel", type="build") + depends_on("python@3.7:", type=("build", "run"), when="@0.10:") + depends_on("python@3.8:", type=("build", "run"), when="@1.1:") + with when("@0.9:"): + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + with when("@:0.8"): + depends_on("py-setuptools@42:", type="build") + depends_on("py-setuptools-scm@3.4: +toml", type="build") + depends_on("py-wheel", type="build") depends_on("py-numpy@1.13.3:", type=("build", "run")) depends_on("py-packaging@19.0:", type=("build", "run")) - depends_on("py-importlib-metadata@0.22:", type=("build", "run"), when="^python@:3.7") - depends_on("py-typing-extensions", type=("build", "run"), when="^python@:3.7") + depends_on("py-importlib-metadata@0.22:", type=("build", "run"), when="@:1.0 ^python@:3.7") + depends_on("py-typing-extensions", type=("build", "run"), when="@:1.0 ^python@:3.7") From 0257b2db4bb2539c103fe324435bb9e14eaa0644 Mon Sep 17 00:00:00 2001 From: jgraciahlrs Date: Mon, 5 Aug 2024 15:47:38 +0200 Subject: [PATCH 165/435] libxcb: Set well-known locale for build (#45502) * libxcb: Set well-known locale for build Builds might fail if no valid locale is set. See https://www.linuxfromscratch.org/blfs/view/git/x/libxcb.html * libxcb: fix style * libxcb: change locale from en_US.UTF-8 to C.UTF-8 * libxcb: fix style * Update var/spack/repos/builtin/packages/libxcb/package.py Co-authored-by: Wouter Deconinck * [@spackbot] updating style on behalf of jgraciahlrs --------- Co-authored-by: Wouter Deconinck Co-authored-by: jgraciahlrs --- var/spack/repos/builtin/packages/libxcb/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index fefdebd20ca845..2d5959cc8c0901 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -60,3 +60,13 @@ def configure_args(self): def patch(self): filter_file("typedef struct xcb_auth_info_t {", "typedef struct {", "src/xcb.h") + + # libxcb fails to build with non-UTF-8 locales, see: + # https://www.linuxfromscratch.org/blfs/view/git/x/libxcb.html + # https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/53 (merged in 1.17.0) + # https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/60 + # If a newer release can be verified to build with LC_ALL=en_US.ISO-8859-1, + # then we can limit the following function, e.g. + # when("@:1.17") + def setup_build_environment(self, env): + env.set("LC_ALL", "C.UTF-8") From 35d84a6456ecb1ac1ea62dba8cbe5cc85612d6f5 Mon Sep 17 00:00:00 2001 From: SXS Bot <31972027+sxs-bot@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:18:25 -0400 Subject: [PATCH 166/435] spectre: add v2024.08.03 (#45575) Co-authored-by: sxs-bot --- var/spack/repos/builtin/packages/spectre/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/spectre/package.py b/var/spack/repos/builtin/packages/spectre/package.py index 166292d8243483..c6bc7f76595886 100644 --- a/var/spack/repos/builtin/packages/spectre/package.py +++ b/var/spack/repos/builtin/packages/spectre/package.py @@ -31,6 +31,9 @@ class Spectre(CMakePackage): license("MIT") version("develop", branch="develop") + version( + "2024.08.03", sha256="18582b625b121c16cd9a1ec421c4ac6cb77bb252622a205b038306e75a466138" + ) version( "2024.06.18", sha256="75ca22f3f9d59887b4ae40397fffc0ada9f218cbb23013e86e14deabb30490f7" ) From 0a2b63b0324f1e606c626459215703b63dc11962 Mon Sep 17 00:00:00 2001 From: Pranav Sivaraman Date: Mon, 5 Aug 2024 09:23:43 -0700 Subject: [PATCH 167/435] highway: add v1.2.0 (#45335) Co-authored-by: pranav-sivaraman --- .../repos/builtin/packages/highway/package.py | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/highway/package.py b/var/spack/repos/builtin/packages/highway/package.py index bb14ce3287739c..c944a6776426af 100644 --- a/var/spack/repos/builtin/packages/highway/package.py +++ b/var/spack/repos/builtin/packages/highway/package.py @@ -14,6 +14,7 @@ class Highway(CMakePackage): license("Apache-2.0") + version("1.2.0", sha256="7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343") version("1.1.0", sha256="354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9") version("1.0.7", sha256="5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5") version("1.0.6", sha256="d89664a045a41d822146e787bceeefbf648cc228ce354f347b18f2b419e57207") @@ -24,16 +25,30 @@ class Highway(CMakePackage): version("1.0.1", sha256="7ca6af7dc2e3e054de9e17b9dfd88609a7fd202812b1c216f43cc41647c97311") version("1.0.0", sha256="ab4f5f864932268356f9f6aa86f612fa4430a7db3c8de0391076750197e876b8") - depends_on("cxx", type="build") # generated + variant("shared", default=True, description="Build shared libs") + variant("examples", default=False, description="Build examples") + + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("cmake@3.10:", type="build") + depends_on("googletest", type="test") def cmake_args(self): + spec = self.spec + define = self.define + from_variant = self.define_from_variant + args = [ - self.define("HWY_ENABLE_TESTS", self.run_tests), - self.define("BUILD_TESTING", self.run_tests), + from_variant("BUILD_SHARED_LIBS", "shared"), + from_variant("HWY_ENABLE_EXAMPLES", "examples"), + define("HWY_ENABLE_TESTS", self.run_tests), + define("BUILD_TESTING", self.run_tests), + define("HWY_SYSTEM_GTEST", self.run_tests), + define( + "HWY_CMAKE_ARM7", spec.satisfies("%gcc@:6.1.0") or spec.satisfies("%clang@:16") + ), ] - if self.run_tests: - args.append(self.define("HWY_SYSTEM_GTEST", True)) + return args From b9125ae3e73c6c8d24b4a3b5670fb2005394ba5d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 5 Aug 2024 18:24:57 +0200 Subject: [PATCH 168/435] Do not halt concretization on unknown variants in externals (#45326) * Do not halt concretization on unkwnown variants in externals --- lib/spack/spack/solver/asp.py | 57 +++++++++++++++++------------- lib/spack/spack/test/concretize.py | 49 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index c4251bc22018a0..53d5aa8cfb6f9e 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1438,16 +1438,14 @@ def condition( # caller, we won't emit partial facts. condition_id = next(self._id_counter) - self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id))) - self.gen.fact(fn.condition_reason(condition_id, msg)) - trigger_id = self._get_condition_id( required_spec, cache=self._trigger_cache, body=True, transform=transform_required ) + self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id))) + self.gen.fact(fn.condition_reason(condition_id, msg)) self.gen.fact( fn.pkg_fact(required_spec.name, fn.condition_trigger(condition_id, trigger_id)) ) - if not imposed_spec: return condition_id @@ -1696,19 +1694,43 @@ def external_packages(self): spack.spec.parse_with_version_concrete(x["spec"]) for x in externals ] - external_specs = [] + selected_externals = set() if spec_filters: for current_filter in spec_filters: current_filter.factory = lambda: candidate_specs - external_specs.extend(current_filter.selected_specs()) - else: - external_specs.extend(candidate_specs) + selected_externals.update(current_filter.selected_specs()) + + # Emit facts for externals specs. Note that "local_idx" is the index of the spec + # in packages::externals. This means: + # + # packages::externals[local_idx].spec == spec + external_versions = [] + for local_idx, spec in enumerate(candidate_specs): + msg = f"{spec.name} available as external when satisfying {spec}" + + if spec_filters and spec not in selected_externals: + continue + + if not spec.versions.concrete: + warnings.warn(f"cannot use the external spec {spec}: needs a concrete version") + continue + + def external_imposition(input_spec, requirements): + return requirements + [ + fn.attr("external_conditions_hold", input_spec.name, local_idx) + ] + + try: + self.condition(spec, spec, msg=msg, transform_imposed=external_imposition) + except (spack.error.SpecError, RuntimeError) as e: + warnings.warn(f"while setting up external spec {spec}: {e}") + continue + external_versions.append((spec.version, local_idx)) + self.possible_versions[spec.name].add(spec.version) + self.gen.newline() # Order the external versions to prefer more recent versions # even if specs in packages.yaml are not ordered that way - external_versions = [ - (x.version, external_id) for external_id, x in enumerate(external_specs) - ] external_versions = [ (v, idx, external_id) for idx, (v, external_id) in enumerate(sorted(external_versions, reverse=True)) @@ -1718,19 +1740,6 @@ def external_packages(self): DeclaredVersion(version=version, idx=idx, origin=Provenance.EXTERNAL) ) - # Declare external conditions with a local index into packages.yaml - for local_idx, spec in enumerate(external_specs): - msg = "%s available as external when satisfying %s" % (spec.name, spec) - - def external_imposition(input_spec, requirements): - return requirements + [ - fn.attr("external_conditions_hold", input_spec.name, local_idx) - ] - - self.condition(spec, spec, msg=msg, transform_imposed=external_imposition) - self.possible_versions[spec.name].add(spec.version) - self.gen.newline() - self.trigger_rules() self.effect_rules() diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index e1076abd103abc..f18e1f6854ee27 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -2609,6 +2609,55 @@ def test_cannot_reuse_host_incompatible_libc(self): assert len(result.specs) == 1 assert result.specs[0] == snd + @pytest.mark.regression("45321") + @pytest.mark.parametrize( + "corrupted_str", + [ + "cmake@3.4.3 foo=bar", # cmake has no variant "foo" + "mvdefaults@1.0 foo=a,d", # variant "foo" has no value "d" + "cmake %gcc", # spec has no version + ], + ) + def test_corrupted_external_does_not_halt_concretization(self, corrupted_str, mutable_config): + """Tests that having a wrong variant in an external spec doesn't stop concretization""" + corrupted_spec = Spec(corrupted_str) + packages_yaml = { + f"{corrupted_spec.name}": { + "externals": [{"spec": corrupted_str, "prefix": "/dev/null"}] + } + } + mutable_config.set("packages", packages_yaml) + # Assert we don't raise due to the corrupted external entry above + s = Spec("pkg-a").concretized() + assert s.concrete + + @pytest.mark.regression("44828") + @pytest.mark.not_on_windows("Tests use linux paths") + def test_correct_external_is_selected_from_packages_yaml(self, mutable_config): + """Tests that when filtering external specs, the correct external is selected to + reconstruct the prefix, and other external attributes. + """ + packages_yaml = { + "cmake": { + "externals": [ + {"spec": "cmake@3.23.1 %gcc", "prefix": "/tmp/prefix1"}, + {"spec": "cmake@3.23.1 %clang", "prefix": "/tmp/prefix2"}, + ] + } + } + concretizer_yaml = { + "reuse": {"roots": True, "from": [{"type": "external", "exclude": ["%gcc"]}]} + } + mutable_config.set("packages", packages_yaml) + mutable_config.set("concretizer", concretizer_yaml) + + s = Spec("cmake").concretized() + + # Check that we got the properties from the right external + assert s.external + assert s.satisfies("%clang") + assert s.prefix == "/tmp/prefix2" + @pytest.fixture() def duplicates_test_repository(): From 02063302c5422a2cb2480de1dca428afb38adfe3 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 5 Aug 2024 11:56:36 -0500 Subject: [PATCH 169/435] fastor: add git attribute, verify language dependency (#45549) --- var/spack/repos/builtin/packages/fastor/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fastor/package.py b/var/spack/repos/builtin/packages/fastor/package.py index c6ff4fa6f9585d..348026f3e348a4 100644 --- a/var/spack/repos/builtin/packages/fastor/package.py +++ b/var/spack/repos/builtin/packages/fastor/package.py @@ -12,6 +12,7 @@ class Fastor(CMakePackage): homepage = "https://github.com/romeric/Fastor" url = "https://github.com/romeric/Fastor/archive/refs/tags/V0.6.4.tar.gz" + git = "https://github.com/romeric/Fastor.git" maintainers("wdconinc") @@ -19,7 +20,7 @@ class Fastor(CMakePackage): version("0.6.4", sha256="c97a3b9dbb92413be90689af9d942cddee12a74733cf42f1a8014965553a11f8") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") depends_on("cmake@3.20:", type="build") From 433abfcc80b13567d71026c089d6baf4f9dbe2eb Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 5 Aug 2024 19:01:09 +0200 Subject: [PATCH 170/435] gcc: add 14.2.0 (#45577) --- var/spack/repos/builtin/packages/gcc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index a17060b147931c..81e325feda4fc2 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -36,6 +36,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage): version("master", branch="master") + version("14.2.0", sha256="a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9") version("14.1.0", sha256="e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840") version("13.3.0", sha256="0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083") From b1adfcf665395fb7f7dea93b0ffda682ebf83ef2 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 5 Aug 2024 13:11:45 -0500 Subject: [PATCH 171/435] seacas: limit to fmt@10 (#45565) --- var/spack/repos/builtin/packages/seacas/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py index 986068e16a7090..58423ae981ba94 100644 --- a/var/spack/repos/builtin/packages/seacas/package.py +++ b/var/spack/repos/builtin/packages/seacas/package.py @@ -35,6 +35,7 @@ class Seacas(CMakePackage): # ###################### Versions ########################## version("master", branch="master") + # note: if next release supports fmt@11, update dependencies below version( "2024-07-10", sha256="b2ba6ca80359fed8ed2a8a210052582c7a3b7b837253bd1e9be941047dcab3ff" ) @@ -236,8 +237,8 @@ class Seacas(CMakePackage): depends_on("hdf5+hl~mpi", when="~mpi") depends_on("hdf5+hl+mpi", when="+mpi") - depends_on("fmt@10.2.1:", when="@2024-03-11:") - depends_on("fmt@10.1.0:", when="@2023-10-24:2023-11-27") + depends_on("fmt@10.2.1:10", when="@2024-03-11:") + depends_on("fmt@10.1.0:10", when="@2023-10-24:2023-11-27") depends_on("fmt@9.1.0", when="@2022-10-14:2023-05-30") depends_on("fmt@8.1.0:9", when="@2022-03-04:2022-05-16") From cee6c59684157484b715f98402b0da85972937dc Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Mon, 5 Aug 2024 20:40:59 +0200 Subject: [PATCH 172/435] nag: add version 7.2.7203 (#45556) --- var/spack/repos/builtin/packages/nag/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index d0c35c8de70ff2..2fc265268a5147 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -13,7 +13,13 @@ class Nag(Package, CompilerPackage): homepage = "https://www.nag.com/nagware/np.asp" maintainers("skosukhin") - version("7.2.7200", sha256="3c2179e073d6cf2aadaeaf9a6a5f3b7f1fdcfb85b99c6fb593445b28ddd44880") + version("7.2.7203", sha256="775e2a10329bcf1c0ba35adb73d49db11b76698ede1f4ae070177216c9ee6e1e") + version( + "7.2.7200", + sha256="3c2179e073d6cf2aadaeaf9a6a5f3b7f1fdcfb85b99c6fb593445b28ddd44880", + url="file://{0}/npl6a72na_amd64.tgz".format(os.getcwd()), + deprecated=True, + ) version("7.1.7125", sha256="738ed9ed943ebeb05d337cfdc603b9c88b8642b3d0cafea8d2872f36201adb37") version( "7.1.7101", From 441b64c3d9daf0e581ec2c8a3cd1ed2f6fb5aadd Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Mon, 5 Aug 2024 21:16:54 +0200 Subject: [PATCH 173/435] highfive: add v2.10.0 (#45486) --- var/spack/repos/builtin/packages/highfive/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/highfive/package.py b/var/spack/repos/builtin/packages/highfive/package.py index e7f73bdf419538..c871e27dbd5bea 100644 --- a/var/spack/repos/builtin/packages/highfive/package.py +++ b/var/spack/repos/builtin/packages/highfive/package.py @@ -19,6 +19,7 @@ class Highfive(CMakePackage): license("BSL-1.0") version("develop", branch="master") + version("2.10.0", sha256="c29e8e1520e7298fabb26545f804e35bb3af257005c1c2df62e39986458d7c38") version("2.9.0", sha256="6301def8ceb9f4d7a595988612db288b448a3c0546f6c83417dab38c64994d7e") version("2.8.0", sha256="cd2502cae61bfb00e32dd18c9dc75289e09ad1db5c2a46d3b0eefd32e0df983b") version("2.7.1", sha256="25b4c51a94d1e670dc93b9b73f51e79b65d8ff49bcd6e5d5582d5ecd2789a249") From 5f29bb9b2298c0b694aebdb8953dc76adaea1c5f Mon Sep 17 00:00:00 2001 From: Jaroslav Hron Date: Mon, 5 Aug 2024 21:24:50 +0200 Subject: [PATCH 174/435] petsc: fix zlib-api handling (#45545) --- var/spack/repos/builtin/packages/petsc/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 47641a0d807761..04c0c1be1b95d5 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -521,7 +521,7 @@ def configure_options(self): True, ), ("hdf5" + hdf5libs, "hdf5", True, True), - "zlib", + ("zlib-api", "zlib", True, True), "mumps", ("trilinos", "trilinos", False, False), ("fftw:mpi", "fftw", True, True), From 83efafa09f0b84357cac4b5009737e9415c484b1 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 5 Aug 2024 13:48:58 -0600 Subject: [PATCH 175/435] Add language depends_on on several packages (#45298) --- var/spack/repos/builtin/packages/flecsi/package.py | 5 +++-- .../packages/lammps-example-plugin/package.py | 4 +--- var/spack/repos/builtin/packages/lammps/package.py | 14 +++++++++++--- .../builtin/packages/ports-of-call/package.py | 3 ++- .../builtin/packages/singularity-eos/package.py | 7 ++++--- var/spack/repos/builtin/packages/spiner/package.py | 3 ++- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py index 12d6d9df81debb..c18adb82331e7e 100644 --- a/var/spack/repos/builtin/packages/flecsi/package.py +++ b/var/spack/repos/builtin/packages/flecsi/package.py @@ -28,8 +28,6 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage): version("2.1.0", tag="v2.1.0", commit="533df139c267e2a93c268dfe68f9aec55de11cf0") version("2.0.0", tag="v2.0.0", commit="5ceebadf75d1c98999ea9e9446926722d061ec22") - depends_on("cxx", type="build") # generated - variant( "backend", default="mpi", @@ -52,6 +50,9 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage): variant("kokkos", default=False, description="Enable Kokkos Support") variant("openmp", default=False, description="Enable OpenMP Support") + depends_on("c", type="build") + depends_on("cxx", type="build") + # All Current FleCSI Releases for level in ("low", "medium", "high"): depends_on("caliper@:2.5,2.8:", when=f"caliper_detail={level}") diff --git a/var/spack/repos/builtin/packages/lammps-example-plugin/package.py b/var/spack/repos/builtin/packages/lammps-example-plugin/package.py index 729b29f732a018..e82a8d4a471f12 100644 --- a/var/spack/repos/builtin/packages/lammps-example-plugin/package.py +++ b/var/spack/repos/builtin/packages/lammps-example-plugin/package.py @@ -43,9 +43,7 @@ class LammpsExamplePlugin(CMakePackage): preferred=True, ) - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("cxx", type="build") def url_for_version(self, version): split_ver = str(version).split(".") diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index 0be3ed6daaa344..663adedcbd0f39 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -369,9 +369,15 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension): deprecated=True, ) - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("cxx", type="build") + + # mdi, scafacos, ml-quip, qmmm require C, but not available in Spack + for c_pkg in ("adios", "atc", "awpmd", "ml-pod", "electrode", "kim", "h5md", "tools"): + depends_on("c", type="build", when=f"+{c_pkg}") + + # scafacos, ml-quip require Fortran, but not available in Spack + for fc_pkg in ("kim",): + depends_on("fortran", type="build", when=f"+{fc_pkg}") stable_versions = { "20230802.3", @@ -602,6 +608,7 @@ def url_for_version(self, version): values=("double", "mixed", "single"), multi=False, ) + variant("tools", default=False, description="Build LAMMPS tools (msi2lmp, binary2txt, chain)") depends_on("cmake@3.16:", when="@20231121:") depends_on("mpi", when="+mpi") @@ -780,6 +787,7 @@ def cmake_args(self): self.define_from_variant("LAMMPS_EXCEPTIONS", "exceptions"), self.define_from_variant("{}_MPI".format(mpi_prefix), "mpi"), self.define_from_variant("BUILD_OMP", "openmp"), + self.define_from_variant("BUILD_TOOLS", "tools"), self.define("ENABLE_TESTING", self.run_tests), self.define("DOWNLOAD_POTENTIALS", False), ] diff --git a/var/spack/repos/builtin/packages/ports-of-call/package.py b/var/spack/repos/builtin/packages/ports-of-call/package.py index d0ad83b84a4909..2ba749532b2e2f 100644 --- a/var/spack/repos/builtin/packages/ports-of-call/package.py +++ b/var/spack/repos/builtin/packages/ports-of-call/package.py @@ -34,7 +34,8 @@ class PortsOfCall(CMakePackage): deprecated=True, ) - depends_on("cxx", type="build") # generated + depends_on("c", type="build") # todo: disable cmake default? + depends_on("cxx", type="build") variant( "portability_strategy", diff --git a/var/spack/repos/builtin/packages/singularity-eos/package.py b/var/spack/repos/builtin/packages/singularity-eos/package.py index ac3fc6655ef3f0..ef5c5711184929 100644 --- a/var/spack/repos/builtin/packages/singularity-eos/package.py +++ b/var/spack/repos/builtin/packages/singularity-eos/package.py @@ -34,9 +34,6 @@ class SingularityEos(CMakePackage, CudaPackage): deprecated=True, ) - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated - # build with kokkos, kokkos-kernels for offloading support variant("kokkos", default=False, description="Enable kokkos") variant( @@ -69,6 +66,10 @@ class SingularityEos(CMakePackage, CudaPackage): variant("closure", default=True, description="Build closure module") + depends_on("c", type="build") + depends_on("cxx", type="build") + depends_on("fortran", type="build", when="+fortran") + # building/testing/docs depends_on("cmake@3.19:", type="build") depends_on("python@3:", when="+python") diff --git a/var/spack/repos/builtin/packages/spiner/package.py b/var/spack/repos/builtin/packages/spiner/package.py index 24e549ce77f4e9..7b065d482bd1b0 100644 --- a/var/spack/repos/builtin/packages/spiner/package.py +++ b/var/spack/repos/builtin/packages/spiner/package.py @@ -38,7 +38,8 @@ class Spiner(CMakePackage, CudaPackage): deprecated=True, ) - depends_on("cxx", type="build") # generated + depends_on("c", type="build") # todo: disable cmake default? + depends_on("cxx", type="build") # When overriding/overloading varaints, the last variant is always used, except for # "when" clauses. Therefore, call the whens FIRST then the non-whens. From 9ea103f94e10ae568875f8cb857226a59cf9b90c Mon Sep 17 00:00:00 2001 From: jmuddnv <143751186+jmuddnv@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:49:59 -0700 Subject: [PATCH 176/435] nvhpc: add v24.7 (#45511) --- var/spack/repos/builtin/packages/nvhpc/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/nvhpc/package.py b/var/spack/repos/builtin/packages/nvhpc/package.py index 7b8c9bc553b798..537630e0ba30e1 100644 --- a/var/spack/repos/builtin/packages/nvhpc/package.py +++ b/var/spack/repos/builtin/packages/nvhpc/package.py @@ -21,6 +21,16 @@ # - package key must be in the form '{os}-{arch}' where 'os' is in the # format returned by platform.system() and 'arch' by platform.machine() _versions = { + "24.7": { + "Linux-aarch64": ( + "256ae392ed961162f3f6dc633498db2b68441103a6192f5d4a1c18fa96e992e7", + "https://developer.download.nvidia.com/hpc-sdk/24.7/nvhpc_2024_247_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "bf2094aa2fc5bdbcbf9bfa0fddc1cbed1bfa6e9342980649db2350d9f675f853", + "https://developer.download.nvidia.com/hpc-sdk/24.7/nvhpc_2024_247_Linux_x86_64_cuda_multi.tar.gz", + ), + }, "24.5": { "Linux-aarch64": ( "c52b5ba370e053472cbffb825ba1da5b6abaee93d4e15479ec12c32d6ebc47d5", From 54d17ae0443e0684dd41cc7dceedb81f2d2edc3b Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Mon, 5 Aug 2024 17:00:23 -0400 Subject: [PATCH 177/435] Update GFE packages (#45194) * Update GFE packages * Approve compiler depends_on --- .../builtin/packages/fargparse/package.py | 3 +- .../builtin/packages/gftl-shared/package.py | 3 +- .../repos/builtin/packages/gftl/package.py | 3 +- .../builtin/packages/pflogger/package.py | 2 +- .../repos/builtin/packages/pfunit/package.py | 6 ++-- .../repos/builtin/packages/yafyaml/package.py | 33 ++++++++++++++++++- 6 files changed, 43 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/fargparse/package.py b/var/spack/repos/builtin/packages/fargparse/package.py index 09b1ee0ca11668..bd1e3d5906195e 100644 --- a/var/spack/repos/builtin/packages/fargparse/package.py +++ b/var/spack/repos/builtin/packages/fargparse/package.py @@ -20,6 +20,7 @@ class Fargparse(CMakePackage): version("develop", branch="develop") version("main", branch="main") + version("1.8.0", sha256="37108bd3c65d892d8c24611ce4d8e5451767e4afe81445fde67eab652178dd01") version("1.7.0", sha256="9889e7eca9c020b742787fba2be0ba16edcc3fcf52929261ccb7d09996a35f89") version("1.6.0", sha256="055a0af44f50c302f8f20a8bcf3d26c5bbeacf5222cdbaa5b19da4cff56eb9c0") version("1.5.0", sha256="1c16ead5f1bacb9c2f33aab99a0889c68c1a1ece754ddc3fd340f10a0d5da2f7") @@ -30,7 +31,7 @@ class Fargparse(CMakePackage): version("1.2.0", sha256="4d14584d2bd5406267e3eacd35b50548dd9e408526465e89514690774217da70") version("1.1.2", sha256="89f63f181ccf183ca6212aee7ed7e39d510e3df938b0b16d487897ac9a61647f") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") depends_on("gftl-shared") depends_on("gftl") diff --git a/var/spack/repos/builtin/packages/gftl-shared/package.py b/var/spack/repos/builtin/packages/gftl-shared/package.py index d03d0dac2665e2..6933b97ec5dabd 100644 --- a/var/spack/repos/builtin/packages/gftl-shared/package.py +++ b/var/spack/repos/builtin/packages/gftl-shared/package.py @@ -25,6 +25,7 @@ class GftlShared(CMakePackage): version("main", branch="main") + version("1.9.0", sha256="a3291ce61b512fe88628cc074b02363c2ba3081e7b453371089121988482dd6f") version("1.8.0", sha256="3450161508c573ea053b2a23cdbf2a1d6fd6fdb78c162d31fc0019da0f8dd03c") version("1.7.0", sha256="8ba567133fcee6b93bc71f61b3bb2053b4b07c6d78f6ad98a04dfc40aa478de7") version("1.6.1", sha256="0e3e1e0c7e0c3f1576e296b3b199dcae4bbaad055fc8fe929c34e52d4b07b02c") @@ -41,7 +42,7 @@ class GftlShared(CMakePackage): version("1.3.1", sha256="a71e164108847f32f37da505f604fc2a50f392a4fcdf9a7cfe8eaf775bed64d4") version("1.3.0", sha256="979b00c4d531e701bf4346f662e3e4cc865124a97ca958637a53201d66d4ee43") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") depends_on("m4", type=("build", "run")) depends_on("cmake@3.12:", type="build") diff --git a/var/spack/repos/builtin/packages/gftl/package.py b/var/spack/repos/builtin/packages/gftl/package.py index 888b39094c3dc4..207b297126bf90 100644 --- a/var/spack/repos/builtin/packages/gftl/package.py +++ b/var/spack/repos/builtin/packages/gftl/package.py @@ -39,6 +39,7 @@ class Gftl(CMakePackage): version("develop", branch="develop") version("main", branch="main") + version("1.14.0", sha256="bf8e3ba3f708ea327c7eb1a5bd1afdce41358c6df1a323aba0f73575c25d5fc8") version("1.13.0", sha256="d8ef4bca5fb67e63dcd69e5377a0cef8336b00178a97450e79010552000d0a52") version("1.12.0", sha256="b50e17cb2109372819b3ee676e6e61fd3a517dc4c1ea293937c8a83f03b0cbd6") version("1.11.0", sha256="b28935bc077749823b1505ad8c1208360a5ba7e961d7593c17a33b11455a32a4") @@ -56,7 +57,7 @@ class Gftl(CMakePackage): version("1.5.5", sha256="67ff8210f08e9f2ee6ba23c8c26336f948420db5db7fc054c3a662e9017f18a3") version("1.5.4", sha256="4c53e932ba8d82616b65500f403a33a14957b9266b5e931e2448f1f005990750") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") depends_on("cmake@3.12:", type="build") depends_on("m4", type="build") diff --git a/var/spack/repos/builtin/packages/pflogger/package.py b/var/spack/repos/builtin/packages/pflogger/package.py index 1bd366066057b3..7271a1b94696ea 100644 --- a/var/spack/repos/builtin/packages/pflogger/package.py +++ b/var/spack/repos/builtin/packages/pflogger/package.py @@ -38,7 +38,7 @@ class Pflogger(CMakePackage): version("1.8.0", sha256="28ce9ac8af374253b6dfd8f53f8fd271c787d432645ec9bc6a5a01601dc56e19") version("1.6.1", sha256="114a15daa7994ab7d4eea463c3a9b8fe7df3da7d07a0004b5c40cf155e374916") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") variant( "build_type", diff --git a/var/spack/repos/builtin/packages/pfunit/package.py b/var/spack/repos/builtin/packages/pfunit/package.py index 679788bffcfe56..0ad50d8a486c0e 100644 --- a/var/spack/repos/builtin/packages/pfunit/package.py +++ b/var/spack/repos/builtin/packages/pfunit/package.py @@ -19,6 +19,7 @@ class Pfunit(CMakePackage): maintainers("mathomp4", "tclune") + version("4.10.0", sha256="ee5e899dfb786bac46e3629b272d120920bafdb7f6a677980fc345f6acda0f99") version("4.9.0", sha256="caea019f623d4e02dd3e8442cee88e6087b4c431a2628e9ec2de55b527b51ab6") version("4.8.0", sha256="b5c66ab949fd23bee5c3b4d93069254f7ea40decb8d21f622fd6aa45ee68ef10") version("4.7.4", sha256="ac850e33ea99c283f503f75293bf238b4b601885d7adba333066e6185dad5c04") @@ -77,8 +78,8 @@ class Pfunit(CMakePackage): deprecated=True, ) - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") variant("mpi", default=False, description="Enable MPI") variant( @@ -116,6 +117,7 @@ class Pfunit(CMakePackage): depends_on("mpi", when="+mpi") depends_on("esmf", when="+esmf") depends_on("m4", when="@4.1.5:", type="build") + depends_on("fargparse@1.8.0:", when="@4.10.0:") depends_on("fargparse", when="@4:") depends_on("cmake@3.12:", type="build") diff --git a/var/spack/repos/builtin/packages/yafyaml/package.py b/var/spack/repos/builtin/packages/yafyaml/package.py index 5d2f4e3ff2a610..996b57fa1e62e2 100644 --- a/var/spack/repos/builtin/packages/yafyaml/package.py +++ b/var/spack/repos/builtin/packages/yafyaml/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import re from spack.package import * @@ -30,6 +31,7 @@ class Yafyaml(CMakePackage): version("main", branch="main") + version("1.4.0", sha256="2a415087eb26d291ff40da4430d668c702d22601ed52a72d001140d97372bc7d") version("1.3.0", sha256="a3882210b2620485471e3337d995edc1e653b49d9caaa902a43293826a61a635") version("1.2.0", sha256="912a4248bbf2e2e84cf3e36f2ae8483bee6b32d2eaa4406dd2100ad660c9bfc6") version("1.1.0", sha256="f0be81afe643adc2452055e5485f09cdb509a8fdd5a4ec5547b0c31dd22b4830") @@ -49,7 +51,7 @@ class Yafyaml(CMakePackage): version("0.5.1", sha256="7019460314e388b2d556db75d5eb734237a18494f79b921613addb96b7b7ce2f") version("0.5.0", sha256="8ac5d41b1020e9311ac87f50dbd61b9f3e3188f3599ce463ad59650208fdb8ad") - depends_on("fortran", type="build") # generated + depends_on("fortran", type="build") depends_on("gftl-shared") depends_on("gftl") @@ -62,6 +64,35 @@ class Yafyaml(CMakePackage): msg="yaFyaml only works with the Fujitsu compiler from 1.3.0 onwards", ) + # GCC 13.3 and higher only work with yafyaml 1.4.0 onwards + # First we can check if the spec is gcc@13.3... + conflicts("%gcc@13.3:", when="@:1.3.0", msg="GCC 13.3+ only works with yafyaml 1.4.0 onwards") + + # ...but if it is not (say apple-clang with gfortran as a fc), there is + # no easy way to check this. So we hijack flag_handler to raise an + # exception if we detect gfortran 13.3 or 14. + # NOTE: This will only error out at install time, so `spack spec` will + # not catch this. + def flag_handler(self, name, flags): + # We need to match any compiler that has a name of gfortran or gfortran-* + pattern = re.compile(r"gfortran(-\d+)?$") + + if pattern.search(self.compiler.fc): + gfortran_version = spack.compiler.get_compiler_version_output( + self.compiler.fc, "-dumpfullversion" + ).strip() + + # gfortran_version is now a string like "13.3.0". We now need to just capture + # the major and minor version numbers + gfortran_version = ".".join(gfortran_version.split(".")[:2]) + + if self.spec.satisfies("@:1.3.0") and (float(gfortran_version) >= 13.3): + raise InstallError( + f"Your gfortran version {gfortran_version} is not compatible with " + f"yafyaml 1.3.0 and below. Use yafyaml 1.4.0 or higher." + ) + return None, None, None + variant( "build_type", default="Release", From 994d995b64da81a6438899fbe0004ad6423e3c4e Mon Sep 17 00:00:00 2001 From: Jonathon Anderson <17242663+blue42u@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:53:15 -0500 Subject: [PATCH 178/435] intel-xed: Rewrite recipe to match upstream install layout (v2) (#45155) * intel-xed: Rewrite to use mbuild install procedure Fixes https://github.com/spack/spack/issues/41268 * hpctoolkit: depend on intel-xed +deprecated-includes * intel-xed: add missing versions from 2024 * intel-xed: Verify dependencies on C/C++ compilers --------- Signed-off-by: Jonathon Anderson --- .../builtin/packages/hpctoolkit/package.py | 5 +- .../builtin/packages/intel-xed/package.py | 141 ++++++++++-------- 2 files changed, 86 insertions(+), 60 deletions(-) diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index e947d25cb31b48..18690a512f940c 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -189,7 +189,6 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): depends_on("intel-gtpin", when="+gtpin") depends_on("opencl-c-headers", when="+opencl") - depends_on("intel-xed+pic", when="target=x86_64:") depends_on("memkind", type=("build", "run"), when="@2021.05.01:2023.08") depends_on("papi", when="+papi") depends_on("libpfm4", when="~papi") @@ -199,6 +198,10 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): depends_on("hpcviewer", type="run", when="+viewer") depends_on("python@3.10:", type=("build", "run"), when="+python") + with when("target=x86_64:"): + depends_on("intel-xed+pic") + depends_on("intel-xed+deprecated-includes", when="@:2024.01.1") + # Avoid 'link' dep, we don't actually link, and that adds rpath # that conflicts with app. depends_on("hip@4.5:", type=("build", "run"), when="+rocm") diff --git a/var/spack/repos/builtin/packages/intel-xed/package.py b/var/spack/repos/builtin/packages/intel-xed/package.py index 7ed44861534956..b1ff16d51f0fea 100644 --- a/var/spack/repos/builtin/packages/intel-xed/package.py +++ b/var/spack/repos/builtin/packages/intel-xed/package.py @@ -4,6 +4,8 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import stat +from pathlib import Path from spack.package import * @@ -21,6 +23,9 @@ class IntelXed(Package): # Current versions now have actual releases and tags. version("main", branch="main") + version("2024.05.20", tag="v2024.05.20", commit="7e88c3e00274a10daa6b9d053decc057f65aa0ec") + version("2024.04.01", tag="v2024.04.01", commit="6d87b5481aa53b5ab1fc2b5a5622759c46746bf9") + version("2024.02.22", tag="v2024.02.22", commit="d08a6f66f780a685f26322960cd3ae297dbad931") version("2023.10.11", tag="v2023.10.11", commit="d7d46c73fb04a1742e99c9382a4acb4ed07ae272") version("2023.08.21", tag="v2023.08.21", commit="01a6da8090af84cd52f6c1070377ae6e885b078f") version("2023.07.09", tag="v2023.07.09", commit="539a6a349cf7538a182ed3ee1f48bb9317eb185f") @@ -35,8 +40,8 @@ class IntelXed(Package): # The old 2019.03.01 version (before there were tags). version("10.2019.03", commit="b7231de4c808db821d64f4018d15412640c34113", deprecated=True) - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") # XED wants the mbuild directory adjacent to xed in the same directory. mdir = join_path("..", "mbuild") @@ -62,8 +67,21 @@ class IntelXed(Package): when="@:2022.06", ) + variant("optimize", default=True, description="Build with -O2") variant("debug", default=False, description="Enable debug symbols") variant("pic", default=False, description="Compile with position independent code.") + variant("examples", default=False, description="Build and install the examples") + + # Previous versions of this recipe used a different install layout than upstream Xed. + # This has since been fixed, but some packages were written on the older install layout and + # will not build on the upstream Xed layout. + # Enabling this variant adds compatibility headers for such software to build successfully. + variant( + "deprecated-includes", + default=False, + sticky=True, + description="Add compatibility headers for software written on the old include layout", + ) # The current mfile uses python3 by name. depends_on("python@3.7:", type="build") @@ -72,26 +90,10 @@ class IntelXed(Package): patch("2019-python3.patch", when="@10.2019.03") patch("libxed-ild.patch", when="@12.0:2022.12") - requires("target=x86_64:", msg="intel-xed only runs on x86/x86_64") - - mycflags = [] # type: List[str] - - # Save CFLAGS for use in install. - def flag_handler(self, name, flags): - if name == "cflags": - self.mycflags = flags - - if "+pic" in self.spec: - flags.append(self.compiler.cc_pic_flag) - - return (flags, None, None) - - def install(self, spec, prefix): - # XED needs PYTHONPATH to find the mbuild directory. - mbuild_dir = join_path(self.stage.source_path, "..", "mbuild") - python_path = os.getenv("PYTHONPATH", "") - os.environ["PYTHONPATH"] = mbuild_dir + ":" + python_path + requires("target=x86_64:,aarch64:", msg="intel-xed only builds on x86-64 or aarch64") + @when("@2023.04.16") + def patch(self): # In 2023.04.16, the xed source directory must be exactly 'xed', # so add a symlink, but don't fail if the link already exists. # See: https://github.com/intelxed/xed/issues/300 @@ -101,45 +103,66 @@ def install(self, spec, prefix): except OSError: pass - mfile = Executable(join_path(".", "mfile.py")) + def setup_build_environment(self, env): + # XED needs PYTHONPATH to find the mbuild directory. + env.prepend_path("PYTHONPATH", self.mdir) - args = ["-j", str(make_jobs), "--cc=%s" % spack_cc, "--no-werror"] + @staticmethod + def _make_writable(root) -> None: + for dirpath, _, filenames in os.walk(root): + for fn in filenames: + path = Path(dirpath) / fn + if not path.is_symlink(): + path.chmod(path.stat().st_mode | stat.S_IWUSR) + def install(self, spec, prefix): + mfile = Executable(join_path(".", "mfile.py")) + mfile.add_default_arg( + f"--jobs={make_jobs}", + f"--cc={spack_cc}", + f"--cxx={spack_cxx}", + "--no-werror", + f"--prefix={prefix}", + ) + if "+optimize" in spec: + mfile.add_default_arg("--opt=2") if "+debug" in spec: - args.append("--debug") - - # If an optimization flag (-O...) is specified in CFLAGS, use - # that, else set default opt level. - for flag in self.mycflags: - if flag.startswith("-O"): - break - else: - args.append("--opt=2") - - # Build and install static libxed.a. - mfile("--clean") - mfile(*args) - - mkdirp(prefix.include) - mkdirp(prefix.lib) - mkdirp(prefix.bin) - - install(join_path("obj", "lib*.a"), prefix.lib) - - # Build and install shared libxed.so and examples (to get the CLI). + mfile.add_default_arg("--debug") + if "+pic" in spec: + mfile.add_default_arg( + f"--extra-ccflags={self.compiler.cc_pic_flag}", + f"--extra-cxxflags={self.compiler.cxx_pic_flag}", + ) + + # Build and install first as static (the default). + mfile("--install-dir=" + join_path("kits", "static"), "install") + self._make_writable(prefix) + + # Rebuild and reinstall as shared. This overwrites anything installed as static before. + shared_kit = join_path("kits", "shared") mfile("--clean") - mfile("examples", "--shared", *args) - - install(join_path("obj", "lib*.so"), prefix.lib) - - # Starting with 11.x, the install files are moved or copied into - # subdirs of obj/wkit. - if spec.satisfies("@11.0:"): - wkit = join_path("obj", "wkit") - install(join_path(wkit, "bin", "xed"), prefix.bin) - install(join_path(wkit, "include", "xed", "*.h"), prefix.include) - else: - # Old 2019.03.01 paths. - install(join_path("obj", "examples", "xed"), prefix.bin) - install(join_path("include", "public", "xed", "*.h"), prefix.include) - install(join_path("obj", "*.h"), prefix.include) + mfile( + f"--install-dir={shared_kit}", + "--shared", + *(["examples"] if "+examples" in spec else []), + "install", + ) + + if "+examples" in self.spec: + # Install the example binaries to share/xed/examples + install_tree(join_path(shared_kit, "bin"), prefix.share.xed.examples) + + # Add a convenience symlink for the xed example/CLI to bin/xed + mkdirp(prefix.bin) + symlink(prefix.share.xed.examples.xed, prefix.bin.xed) + + @run_after("install", when="+deprecated-includes") + def install_deprecated_include_compat(self): + """Install compatibility headers in /include for old code""" + for hdr in Path(self.prefix.include).glob("xed/*.h"): + (Path(self.prefix.include) / hdr.name).write_text( + f"""\ +#warning This is a Spack compatibilty header, please update your #includes! +#include "xed/{hdr.name}" +""" + ) From 6c903543e1bb11e73e8effabedff531126a5e3c3 Mon Sep 17 00:00:00 2001 From: Zach Jibben Date: Mon, 5 Aug 2024 17:40:56 -0600 Subject: [PATCH 179/435] Update Truchas package for 24.06 and 24.07 (#45583) --- .../repos/builtin/packages/truchas/package.py | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/truchas/package.py b/var/spack/repos/builtin/packages/truchas/package.py index ded94cb68ff979..0b283c763a9e57 100644 --- a/var/spack/repos/builtin/packages/truchas/package.py +++ b/var/spack/repos/builtin/packages/truchas/package.py @@ -24,6 +24,8 @@ class Truchas(CMakePackage): maintainers("pbrady", "zjibben") version("develop", branch="master") + version("24.07", sha256="42a2e2edfaa157786bd801e889477f08c6d168690a123a8bfa6d86c222bc54e6") + version("24.06", sha256="648c5c3f3c3c72fd359de91713af5feed1c1580268489c079511fa5ac2428519") version("23.06", sha256="a786caba5129d7e33ba42a06751d6c570bd3b9697e3404276a56216d27820c68") version("22.04.1", sha256="ed2000f27ee5c4bd3024063a374023878c61e8a3c76c37542fffd341d1226dc1") @@ -43,7 +45,8 @@ class Truchas(CMakePackage): # ------------------------------------------------------------ # # Build dependencies # ------------------------------------------------------------ # - depends_on("cmake@3.16:", type="build") + depends_on("cmake@3.20.2:", type="build") + depends_on("cmake@3.16:", when="@:24.05", type="build") # ------------------------------------------------------------ # # Test suite and restart utils @@ -55,16 +58,25 @@ class Truchas(CMakePackage): # ------------------------------------------------------------ # # IO dependencies # ------------------------------------------------------------ # - depends_on("exodusii@2020-05-12: +mpi") + depends_on("exodusii@2023-11-27: +mpi", when="@24.06:") + depends_on("exodusii@2020-05-12: +mpi", when="@:24.05") depends_on("scorpio") - depends_on("petaca@22.03: +shared") - depends_on("petaca@22.03: +shared +std_name", when="+std_name") + depends_on("hdf5@1.14:", when="@24.06:") + depends_on("hdf5@1.10", when="@:24.05") + depends_on("netcdf-c@4.9:", when="@24.06:") + depends_on("netcdf-c@4.8", when="@:24.05") + depends_on("petaca@24.04: +shared", when="@24.06:") + depends_on("petaca@24.04: +shared +std_name", when="@24.06: +std_name") + depends_on("petaca@22.03: +shared", when="@:24.05") + depends_on("petaca@22.03: +shared +std_name", when="@:24.05 +std_name") # ------------------------------------------------------------ # # Partitioning # ------------------------------------------------------------ # - depends_on("chaco") + # Chaco dependency removed & metis required starting 24.06. + depends_on("chaco", when="@:24.05") depends_on("metis@5:", when="+metis") + requires("+metis", when="@24.06:", msg="Metis is required starting with Truchas 24.06") # ------------------------------------------------------------ # # Radiation @@ -74,8 +86,9 @@ class Truchas(CMakePackage): # ------------------------------------------------------------ # # Solvers # ------------------------------------------------------------ # - depends_on("hypre@2.20: ~fortran") - depends_on("netlib-lapack") + depends_on("hypre@2.29: ~fortran", when="@24.06:") + depends_on("hypre@2.20:2.28 ~fortran", when="@:24.05") + depends_on("lapack") # ------------------------------------------------------------ # # Mapping From 9a1002c098de80f5668533740b63b769e4972b45 Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:34:26 -0700 Subject: [PATCH 180/435] tix: skip implicit patch (#45244) --- var/spack/repos/builtin/packages/tix/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/tix/package.py b/var/spack/repos/builtin/packages/tix/package.py index de73e2516e0427..b92541ed07b228 100644 --- a/var/spack/repos/builtin/packages/tix/package.py +++ b/var/spack/repos/builtin/packages/tix/package.py @@ -31,10 +31,15 @@ class Tix(AutotoolsPackage): sha256="1be1a1c7453f6ab8771f90d7e7c0f8959490104752a16a8755bbb7287a841a96", level=0, ) + # This patch causes 'install' to fail on RHEL8 with at least gcc@10.3.1 with + # "error: expected ')' before '->' token in expansion of macro 'Tcl_Panic'". + # + # TBD: Is the problem the platform, os, or compiler? patch( "https://raw.githubusercontent.com/macports/macports-ports/v2.7.0-archive/x11/tix/files/implicit.patch", sha256="8a2720368c7757896814684147029d8318b9aa3b0914b3f37dd5e8a8603a61d3", level=0, + when="platform=darwin", ) patch( "https://raw.githubusercontent.com/macports/macports-ports/v2.7.0-archive/x11/tix/files/patch-generic-tixGrSort.c.diff", From 6a6c2959384b8242acf63e9f3f7ed6a2f38b6e1d Mon Sep 17 00:00:00 2001 From: Christopher Christofi <77968333+ChristopherChristofi@users.noreply.github.com> Date: Tue, 6 Aug 2024 01:45:27 +0100 Subject: [PATCH 181/435] r: add version 4.4.1 (#45564) --- var/spack/repos/builtin/packages/r/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index 26bbd789ecf634..a21ac6ac84c2a4 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -22,6 +22,7 @@ class R(AutotoolsPackage): license("GPL-2.0-or-later") + version("4.4.1", sha256="b4cb675deaaeb7299d3b265d218cde43f192951ce5b89b7bb1a5148a36b2d94d") version("4.4.0", sha256="ace4125f9b976d2c53bcc5fca30c75e30d4edc401584859cbadb080e72b5f030") version("4.3.3", sha256="80851231393b85bf3877ee9e39b282e750ed864c5ec60cbd68e6e139f0520330") version("4.3.2", sha256="b3f5760ac2eee8026a3f0eefcb25b47723d978038eee8e844762094c860c452a") From 98e206193b4bff9f28d1e6ecb0a738c19cc8741a Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Tue, 6 Aug 2024 05:26:27 +0100 Subject: [PATCH 182/435] py-configspace: add main, 1.0.0, 1.0.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, fix url and fix cython dependency (#45193) * [py-configspace] fix dependency on cython * py-cython not needed starting from 1.0.0 * added py-configspace 1.0.0 and 1.0.1 * py-configspace: fix style * added py-configspace version 1.1.0 * added py-configspace version 1.1.1 * py-configspace: two more versions and new maintainer * py-configspace: fixed typo * py-configspace: added version 1.1.4 --- .../packages/py-configspace/package.py | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-configspace/package.py b/var/spack/repos/builtin/packages/py-configspace/package.py index 64dfd9d4472c6e..6a392b6276fea6 100644 --- a/var/spack/repos/builtin/packages/py-configspace/package.py +++ b/var/spack/repos/builtin/packages/py-configspace/package.py @@ -10,13 +10,21 @@ class PyConfigspace(PythonPackage): """Creation and manipulation of parameter configuration spaces for automated algorithm configuration and hyperparameter tuning.""" - maintainers("Kerilk") + maintainers("Kerilk", "mdorier") homepage = "https://automl.github.io/ConfigSpace/master/" - pypi = "ConfigSpace/ConfigSpace-0.4.20.tar.gz" + pypi = "configspace/configspace-1.0.0.tar.gz" license("BSD-3-Clause") + version("main", git="https://github.com/automl/ConfigSpace.git", branch="main") + version("1.1.4", sha256="afd625a9bcf4c01efa06114ce9dcc718cf9cba68910b602849b1c59654415762") + version("1.1.3", sha256="8b77e77bd1c286a57e35da87552e33052f6793ddbcc696a9fc62425f60739ac2") + version("1.1.2", sha256="8cd77438f976ce65ce2d056fbd659d12ca1425fe230b737942261879b7c542f0") + version("1.1.1", sha256="450e5dccb52ffc56ec5ade131eaa95207412e1fa44883d611e024fc185a54bf0") + version("1.1.0", sha256="84f20d2b78365a33820558749975667e9bb81d8fb283fcf2ef5bae6052745481") + version("1.0.1", sha256="ffaf2c02db1df47589d5501178827e945d3f953f2812e7e44a9c3029ea13a543") + version("1.0.0", sha256="cc55ac8a550c86bee7853417f1eda22d46185fb911b5875754619735966e2736") version("0.7.1", sha256="57b5b8e28ed6ee14ecf6206fdca43ca698ef63bc1531f081d482b26acf4edf1a") version("0.6.1", sha256="b0a9487c7997481a041feee46f2c8fc9fb9787e1ff553250838d62624dfb0d5a") version("0.6.0", sha256="9b6c95d8839fcab220372673214b3129b45dcd8b1179829eb2c65746cacb72a9") @@ -29,8 +37,20 @@ class PyConfigspace(PythonPackage): depends_on("python@3.7:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-numpy", type=("build", "run")) - depends_on("py-cython", type="build") + depends_on("py-cython@:0.29.36", type="build", when="@:0.9.9") depends_on("py-pyparsing", type=("build", "run")) depends_on("py-scipy", when="@0.4.21:") depends_on("py-typing-extensions", when="@0.6.0:") depends_on("py-more-itertools", when="@0.6.1:") + + def url_for_version(self, version): + new_url = ( + "https://files.pythonhosted.org/packages/source/c/configspace/configspace-{0}.tar.gz" + ) + old_url = ( + "https://files.pythonhosted.org/packages/source/C/ConfigSpace/ConfigSpace-{0}.tar.gz" + ) + if version >= Version("1.0.0"): + return new_url.format(version) + else: + return old_url.format(version) From 4a8d09dcc11e8d6734b004e0b4781768c9562298 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 07:08:57 +0200 Subject: [PATCH 183/435] build(deps): bump flake8 from 7.1.0 to 7.1.1 in /lib/spack/docs (#45588) Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1. - [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1) --- updated-dependencies: - dependency-name: flake8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index e94eb7607adef6..09655e609e6900 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -9,5 +9,5 @@ urllib3==2.2.2 pytest==8.3.2 isort==5.13.2 black==24.8.0 -flake8==7.1.0 +flake8==7.1.1 mypy==1.11.1 From 899e458ee532bb2864af93f909e9a2a7231d9e70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 07:09:18 +0200 Subject: [PATCH 184/435] build(deps): bump flake8 in /.github/workflows/requirements/style (#45587) Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1. - [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1) --- updated-dependencies: - dependency-name: flake8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/requirements/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements/style/requirements.txt b/.github/workflows/requirements/style/requirements.txt index 11ad278e95f94e..6cd71ed1280f30 100644 --- a/.github/workflows/requirements/style/requirements.txt +++ b/.github/workflows/requirements/style/requirements.txt @@ -1,6 +1,6 @@ black==24.8.0 clingo==5.7.1 -flake8==7.1.0 +flake8==7.1.1 isort==5.13.2 mypy==1.8.0 types-six==1.16.21.20240513 From 16a2a5047c15c21f8db6bd4ac2dadcd70efac919 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Mon, 5 Aug 2024 23:10:53 -0700 Subject: [PATCH 185/435] amrex: add v24.08 (#45543) --- var/spack/repos/builtin/packages/amrex/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index 564fc84955934b..dee3897fd772e6 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -26,6 +26,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") version("develop", branch="development") + version("24.08", sha256="e09623e715887a19a1f86ed6fdb8335022fd6c03f19372d8f13b55cdeeadf5de") version("24.07", sha256="6baf76c1377d765e94020a9bd89dd1bf1485d0440d41cce2ba35d4dfee562580") version("24.06", sha256="103a97163d81716165fcff1af56df61741608b56f90730a725e9e4eb797bebf0") version("24.05", sha256="f3db5ea2b81973e3e244c5cf39d5a5383a98f297f56ed91c8dcdd2e24f7b750e") From fa38dd9386b6350cc2a16775fe99260c5846f100 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Tue, 6 Aug 2024 02:32:31 -0400 Subject: [PATCH 186/435] gdrcopy: specify CUDA envvar during build (#45415) otherwise /usr/local/cuda is used --- var/spack/repos/builtin/packages/gdrcopy/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/gdrcopy/package.py b/var/spack/repos/builtin/packages/gdrcopy/package.py index 75ab32b9dff684..9b99a81319fe39 100644 --- a/var/spack/repos/builtin/packages/gdrcopy/package.py +++ b/var/spack/repos/builtin/packages/gdrcopy/package.py @@ -34,6 +34,9 @@ class Gdrcopy(MakefilePackage, CudaPackage): depends_on("check") requires("+cuda") + def setup_build_environment(self, env): + env.set("CUDA", self.spec["cuda"].prefix) + def build(self, spec, prefix): make("lib") make("exes") From 5650d4d419140f483751dfa5470af3527ff4f2b3 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Tue, 6 Aug 2024 08:40:09 +0200 Subject: [PATCH 187/435] dbcsr: add v2.7.0 and +g2g variant (#45501) Co-authored-by: RMeli --- var/spack/repos/builtin/packages/dbcsr/package.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dbcsr/package.py b/var/spack/repos/builtin/packages/dbcsr/package.py index 0e0ff823a26392..8f7df9adabcf77 100644 --- a/var/spack/repos/builtin/packages/dbcsr/package.py +++ b/var/spack/repos/builtin/packages/dbcsr/package.py @@ -19,6 +19,7 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage): license("GPL-2.0-or-later") version("develop", branch="develop") + version("2.7.0", sha256="25c367b49fb108c5230bcfb127f05fc16deff2bb467f437023dfa6045aff66f6") version("2.6.0", sha256="c67b02ff9abc7c1f529af446a9f01f3ef9e5b0574f220259128da8d5ca7e9dc6") version("2.5.0", sha256="91fda9b2502e5d0a2a6cdd5a73ef096253cc7e75bd01ba5189a4726ad86aef08") version("2.4.1", sha256="b3d5ae62ca582b72707a2c932e8074a4f2f61d61085d97bd374213c70b8dbdcf") @@ -55,6 +56,9 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage): variant("opencl", default=False, description="Enable OpenCL backend") variant("mpi_f08", default=False, when="@2.6:", description="Use mpi F08 module") + variant("g2g", default=False, description="GPU-aware MPI with CUDA/HIP") + conflicts("+g2g", when="~cuda ~rocm", msg="GPU-aware MPI requires +cuda or +rocm") + depends_on("blas") depends_on("lapack") depends_on("mpi", when="+mpi") @@ -84,7 +88,7 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage): # for optimal kernels. Note that we don't override the parent class arch # properties, since the parent class defines constraints for different archs # Instead just mark all unsupported cuda archs as conflicting. - dbcsr_cuda_archs = ("35", "37", "60", "70", "80") + dbcsr_cuda_archs = ("35", "37", "60", "70", "80", "90") cuda_msg = "dbcsr only supports cuda_arch {0}".format(dbcsr_cuda_archs) for arch in CudaPackage.cuda_arch_values: @@ -152,7 +156,14 @@ def cmake_args(self): if self.spec.satisfies("+cuda"): cuda_arch = self.spec.variants["cuda_arch"].value[0] - gpu_map = {"35": "K40", "37": "K80", "60": "P100", "70": "V100", "80": "A100"} + gpu_map = { + "35": "K40", + "37": "K80", + "60": "P100", + "70": "V100", + "80": "A100", + "90": "H100", + } gpuver = gpu_map[cuda_arch] if cuda_arch == "35" and self.spec.satisfies("+cuda_arch_35_k20x"): From 7e69671570fd9e3526ad7556a432697f1b94620d Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Tue, 6 Aug 2024 01:43:27 -0500 Subject: [PATCH 188/435] petsc, py-petsc4py: add v3.21.4 (#45506) --- var/spack/repos/builtin/packages/petsc/package.py | 1 + var/spack/repos/builtin/packages/py-petsc4py/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 04c0c1be1b95d5..59a265649f18f3 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -21,6 +21,7 @@ class Petsc(Package, CudaPackage, ROCmPackage): tags = ["e4s"] version("main", branch="main") + version("3.21.4", sha256="a9ae076d4617c7d84ce2bed37194022319c19f19b3930edf148b2bc8ecf2248d") version("3.21.3", sha256="6d9ceb99d84d275250c614192dad45955d4a7610e12d8292a07dc49403556d26") version("3.21.2", sha256="a1ac62b6204bdf2f7f9b637abf45e6cff24d372d4d3d3702c50e157bdb56eb21") version("3.21.1", sha256="7ff8b692bceb7d7a8f51e2f45ccb20af00ba9395d7e1eee8816d46eb1c4c4b27") diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py index 8e33851c83c16e..aa76a2abbbeb74 100644 --- a/var/spack/repos/builtin/packages/py-petsc4py/package.py +++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py @@ -20,6 +20,7 @@ class PyPetsc4py(PythonPackage): license("BSD-2-Clause") version("main", branch="main") + version("3.21.4", sha256="4ba702558cc91186912eeacef26b171255f3adaa7ea02bec40c2f4c919eccecd") version("3.21.3", sha256="1c3664d5b527354171077c89c4b1fef3df4a41be7196d12bca74b2759c7e2648") version("3.21.2", sha256="6ce1e1a45407da300c6869d0d9abe17b5b077424aa4895713642dda0bb19ab4e") version("3.21.1", sha256="ea8c6afb16541167d39f87d5fcad98c32d856fe8a2173504ef2a31c16647d53d") From 7780059c644176540a69369a88436bf4ca973116 Mon Sep 17 00:00:00 2001 From: alvaro-sch <49589619+alvaro-sch@users.noreply.github.com> Date: Tue, 6 Aug 2024 04:13:42 -0300 Subject: [PATCH 189/435] orca: add v6.0.0 (#45489) --- var/spack/repos/builtin/packages/orca/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/orca/package.py b/var/spack/repos/builtin/packages/orca/package.py index d2e47fb334e4ad..f0abb62569f255 100644 --- a/var/spack/repos/builtin/packages/orca/package.py +++ b/var/spack/repos/builtin/packages/orca/package.py @@ -23,6 +23,7 @@ class Orca(Package): license("LGPL-2.1-or-later") + version("6.0.0", sha256="219bd1deb6d64a63cb72471926cb81665cbbcdec19f9c9549761be67d49a29c6") version("5.0.4", sha256="c4ea5aea60da7bcb18a6b7042609206fbeb2a765c6fa958c5689d450b588b036") version("5.0.3", sha256="b8b9076d1711150a6d6cb3eb30b18e2782fa847c5a86d8404b9339faef105043") version("4.2.1", sha256="a84b6d2706f0ddb2f3750951864502a5c49d081836b00164448b1d81c577f51a") @@ -33,7 +34,13 @@ class Orca(Package): # Map Orca version with the required OpenMPI version # OpenMPI@4.1.1 has issues in pmix environments, hence 4.1.2 here - openmpi_versions = {"4.2.0": "3.1.4", "4.2.1": "3.1.4", "5.0.3": "4.1.2", "5.0.4": "4.1.2"} + openmpi_versions = { + "4.2.0": "3.1.4", + "4.2.1": "3.1.4", + "5.0.3": "4.1.2", + "5.0.4": "4.1.2", + "6.0.0": "4.1.6", + } for orca_version, openmpi_version in openmpi_versions.items(): depends_on( "openmpi@{0}".format(openmpi_version), type="run", when="@{0}".format(orca_version) From 2fa314b6b63be8cd264c7787852886e9b6c827aa Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 6 Aug 2024 09:14:55 +0200 Subject: [PATCH 190/435] Avoid duplicate dependabot bumps (#45590) * Avoid duplicate dependabot bumps Example of a duplicate bump: - https://github.com/spack/spack/pull/45124 - https://github.com/spack/spack/pull/45125 * Deduplicate "pip" ecosystem --- .github/dependabot.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b19c9381ecf178..136f798711c372 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,14 +5,10 @@ updates: directory: "/" schedule: interval: "daily" - # Requirements to build documentation - - package-ecosystem: "pip" - directory: "/lib/spack/docs" - schedule: - interval: "daily" - # Requirements to run style checks + # Requirements to run style checks and build documentation - package-ecosystem: "pip" directories: - - "/.github/workflows/requirements/*" + - "/.github/workflows/requirements/style/*" + - "/lib/spack/docs" schedule: interval: "daily" From 8de03e2bf59afa1c2457c4a8c0531181db330f77 Mon Sep 17 00:00:00 2001 From: Christopher Christofi <77968333+ChristopherChristofi@users.noreply.github.com> Date: Tue, 6 Aug 2024 08:17:41 +0100 Subject: [PATCH 191/435] py-numba4jax: add new package (#45481) --- .../builtin/packages/py-numba4jax/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-numba4jax/package.py diff --git a/var/spack/repos/builtin/packages/py-numba4jax/package.py b/var/spack/repos/builtin/packages/py-numba4jax/package.py new file mode 100644 index 00000000000000..ab24f932375194 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-numba4jax/package.py @@ -0,0 +1,29 @@ +# 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 PyNumba4jax(PythonPackage): + """Use numba-compiled kernels from within Jax""" + + homepage = "https://github.com/PhilipVinc/numba4jax" + pypi = "numba4jax/numba4jax-0.0.12.tar.gz" + + license("MIT") + + version("0.0.12", sha256="e1faf6a0566f4fb941abf8821b9c854b7398eb08a0c8157927f8b4717a393446") + + with default_args(type="build"): + depends_on("py-hatchling@1.8.0:") + depends_on("py-hatch-vcs") + + with default_args(type=("build", "run")): + depends_on("python@3.9:") + depends_on("py-numpy@1.22:1.23") + depends_on("py-numba@0.53:0.61") + depends_on("py-cffi@1.14.4:") + depends_on("py-jax@0.4.16:0.5") + depends_on("py-jaxlib@0.4.16:0.5") From 28171f1b9ddd23c91eecf357e05a2d9241c095b8 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Tue, 6 Aug 2024 02:30:22 -0500 Subject: [PATCH 192/435] diamond: add blast support and eigen (#45254) Signed-off-by: Shane Nehring --- .../repos/builtin/packages/diamond/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/var/spack/repos/builtin/packages/diamond/package.py b/var/spack/repos/builtin/packages/diamond/package.py index 62a7c101ddcb88..c87e675eaebd5d 100644 --- a/var/spack/repos/builtin/packages/diamond/package.py +++ b/var/spack/repos/builtin/packages/diamond/package.py @@ -39,10 +39,38 @@ class Diamond(CMakePackage): depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated + depends_on("blas", when="+eigen") + depends_on("blast-plus", when="+blast") + depends_on("eigen", when="+eigen") + depends_on("lapack", when="+eigen") depends_on("zlib-api") + depends_on("zstd", when="+zstd") + + variant("zstd", default=False, description="Bulid with zstd support", when="@2.1.0:") + variant("blast", default=True, description="Build with blast db support", when="@2.1.0:") + variant("eigen", default=False, description="Build with Eigen support", when="@2.1.0:") + + requires("+zstd", when="+blast", msg="blast support requires zstd") conflicts("target=aarch64:", when="@:0.9.25") # fix error [-Wc++11-narrowing] # Ref: https://github.com/bbuchfink/diamond/commit/155e076d662b0e9268e2b00bef6d33d90aede7ff patch("fix_narrowing_error.patch", when="@:0.9.25") + + def cmake_args(self): + args = [ + self.define_from_variant("WITH_ZSTD", "zstd"), + self.define_from_variant("EIGEN_BLAS", "eigen"), + ] + if self.spec.satisfies("+blast"): + args.extend( + [ + self.define( + "BLAST_INCLUDE_DIR", + join_path(self.spec["blast-plus"].prefix.include, "ncbi-tools++"), + ), + self.define("BLAST_LIBRARY_DIR", self.spec["blast-plus"].prefix.lib), + ] + ) + return args From fa671a639a943a480584ef04af972ae7db4c3dce Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Tue, 6 Aug 2024 03:40:56 -0400 Subject: [PATCH 193/435] hiop: update package.py with correct cusolver_lu CMake variable (#45332) --- var/spack/repos/builtin/packages/hiop/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py index ae00e6643caafc..2495796d9be73f 100644 --- a/var/spack/repos/builtin/packages/hiop/package.py +++ b/var/spack/repos/builtin/packages/hiop/package.py @@ -208,7 +208,7 @@ def cmake_args(self): self.define_from_variant("HIOP_USE_COINHSL", "sparse"), self.define_from_variant("HIOP_TEST_WITH_BSUB", "jsrun"), self.define_from_variant("HIOP_USE_GINKGO", "ginkgo"), - self.define_from_variant("HIOP_USE_CUSOLVER_LU", "cusolver_lu"), + self.define_from_variant("HIOP_USE_RESOLVE", "cusolver_lu"), ] ) From e1bcbcf9f3d5e3e259577e15980e5792da73106c Mon Sep 17 00:00:00 2001 From: Bill Williams Date: Tue, 6 Aug 2024 09:51:50 +0200 Subject: [PATCH 194/435] Score-P: Add remapping for rocmcc (#45316) * Score-P: Add remapping for rocmcc rocmcc -> amdclang for ScoreP * [@spackbot] updating style on behalf of wrwilliams --------- Co-authored-by: William Williams Co-authored-by: wrwilliams --- var/spack/repos/builtin/packages/scorep/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py index 02c8718a7270e6..d4076a89a19a39 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -160,7 +160,7 @@ def find_libpath(self, libname, root): # handle any mapping of Spack compiler names to Score-P args # this should continue to exist for backward compatibility def clean_compiler(self, compiler): - renames = {"cce": "cray"} + renames = {"cce": "cray", "rocmcc": "amdclang"} if compiler in renames: return renames[compiler] return compiler From e3904d4cbf63645228278209a12f534719c705cd Mon Sep 17 00:00:00 2001 From: Gavin John Date: Tue, 6 Aug 2024 09:54:01 +0100 Subject: [PATCH 195/435] Fix spack url stats (#45584) --- lib/spack/spack/cmd/url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/url.py b/lib/spack/spack/cmd/url.py index 38dd6a4aeb05d1..cb151b26d99015 100644 --- a/lib/spack/spack/cmd/url.py +++ b/lib/spack/spack/cmd/url.py @@ -339,7 +339,7 @@ def add(self, pkg_name, fetcher): for pkg_cls in spack.repo.PATH.all_package_classes(): npkgs += 1 - for v in pkg_cls.versions: + for v in list(pkg_cls.versions): try: pkg = pkg_cls(spack.spec.Spec(pkg_cls.name)) fetcher = fs.for_package_version(pkg, v) From 8ded2ddf5e05c8ccbc0762f77bf0c3f7e34ad8d9 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 6 Aug 2024 03:54:24 -0500 Subject: [PATCH 196/435] C-Blosc2: add v2.15.1 (#45582) --- var/spack/repos/builtin/packages/c-blosc2/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/c-blosc2/package.py b/var/spack/repos/builtin/packages/c-blosc2/package.py index c899c16e997982..6de7e4b01892e2 100644 --- a/var/spack/repos/builtin/packages/c-blosc2/package.py +++ b/var/spack/repos/builtin/packages/c-blosc2/package.py @@ -11,7 +11,7 @@ class CBlosc2(CMakePackage): other bells and whistles""" homepage = "https://www.blosc.org/" - url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.10.2.tar.gz" + url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.15.1.tar.gz" git = "https://github.com/Blosc/c-blosc2.git" maintainers("ax3l", "robert-mijakovic") @@ -19,6 +19,7 @@ class CBlosc2(CMakePackage): license("BSD-3-Clause") version("develop", branch="master") + version("2.15.1", sha256="6cf32fcfc615542b9ba35e021635c8ab9fd3d328fd99d5bf04b7eebc80f1fae2") version("2.11.1", sha256="1e9923e0f026eb6e6caee608b4b9a523837806076fc79409055a6386cf5de1ea") version("2.10.5", sha256="a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d") # 2.10.2+ fixes regressions with external dependencies From f438a339782c0e205901c86733de7673414f288f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 6 Aug 2024 11:12:45 +0200 Subject: [PATCH 197/435] changa: add v3.5 (#45591) --- .../packages/changa/fix_makefile.patch | 11 +++++ .../repos/builtin/packages/changa/package.py | 45 ++++++++++++++----- 2 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 var/spack/repos/builtin/packages/changa/fix_makefile.patch diff --git a/var/spack/repos/builtin/packages/changa/fix_makefile.patch b/var/spack/repos/builtin/packages/changa/fix_makefile.patch new file mode 100644 index 00000000000000..40235f21bf4855 --- /dev/null +++ b/var/spack/repos/builtin/packages/changa/fix_makefile.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in 2024-07-17 19:21:06.292521857 +0200 ++++ b/Makefile.in 2024-07-17 19:29:45.896742764 +0200 +@@ -236,7 +236,7 @@ + $(compile-c) + + $(build_dir)/cha_commitid.c: force +- $(quiet) VER=`cd $(source_dir) && git describe --long --always` && \ ++ $(quiet) VER="3.5" && \ + echo "const char * const Cha_CommitID = \"$$VER\";" > $(build_dir)/cha_commitid.c + + $(ci_files): $(build_dir)/settings diff --git a/var/spack/repos/builtin/packages/changa/package.py b/var/spack/repos/builtin/packages/changa/package.py index ac44bc2a936555..f3cce60c0bd795 100644 --- a/var/spack/repos/builtin/packages/changa/package.py +++ b/var/spack/repos/builtin/packages/changa/package.py @@ -6,15 +6,10 @@ from spack.package import * -class Changa(AutotoolsPackage): +class Changa(AutotoolsPackage, CudaPackage): """ChaNGa (Charm N-body GrAvity solver) is a code to perform collisionless - N-body simulations. It can perform cosmological simulations with periodic - boundary conditions in comoving coordinates or simulations of isolated - stellar systems. It also can include hydrodynamics using the Smooth - Particle Hydrodynamics (SPH) technique. It uses a Barnes-Hut tree to - calculate gravity, with hexadecapole expansion of nodes and - Ewald summation for periodic forces. Timestepping is done with a leapfrog - integrator with individual timesteps for each particle.""" + N-body simulations. + """ homepage = "https://faculty.washington.edu/trq/hpcc/tools/changa.html" url = "https://github.com/N-BodyShop/changa/archive/v3.4.tar.gz" @@ -23,24 +18,50 @@ class Changa(AutotoolsPackage): license("GPL-2.0-or-later") version("master", branch="master") + version("3.5", sha256="8c49ab5b540a8adb23d3eaa80942621e5ac83244918e66c87886c9d3fb463d39") version("3.4", sha256="c2bceb6ac00025dfd704bb6960bc17c6df7c746872185845d1e75f47e6ce2a94") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") + patch("fix_configure_path.patch") + # Version 3.5 assumes to have a git repository available to compute the current version + # using `git describe ...` Since we are installing from the release tarball, hardcode + # the version to 3.5 + patch("fix_makefile.patch", when="@3.5") resource( name="utility", url="https://github.com/N-BodyShop/utility/archive/v3.4.tar.gz", sha256="19f9f09023ce9d642e848a36948788fb29cd7deb8e9346cdaac4c945f1416667", placement="utility", + when="@3.4", + ) + + resource( + name="utility", + git="https://github.com/N-BodyShop/utility.git", + commit="f947639f78162a68d697195e6963328f2665bf44", + placement="utility", + when="@3.5", ) depends_on("charmpp build-target=ChaNGa") + depends_on("charmpp +cuda", when="+cuda") + depends_on("libjpeg") + depends_on("zlib-api") + + parallel = False + + def setup_build_environment(self, env): + env.set("CHARM_DIR", self.spec["charmpp"].prefix) def configure_args(self): - args = [] - args.append("STRUCT_DIR={0}/utility/structures".format(self.stage.source_path)) + args = [f"STRUCT_DIR={self.stage.source_path}/utility/structures"] + if "avx" in self.spec.target: + args.append("--enable-arch=avx") + if self.spec.satisfies("+cuda"): + args.append(f"--with-cuda={self.spec['cuda'].prefix}") return args def install(self, spec, prefix): From 9835b072e281113a2208edfca9b6066ced5c2fba Mon Sep 17 00:00:00 2001 From: Dave Keeshan <96727608+davekeeshan@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:27:36 +0100 Subject: [PATCH 198/435] yosys: add v0.42 --- var/spack/repos/builtin/packages/yosys/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/yosys/package.py b/var/spack/repos/builtin/packages/yosys/package.py index e407d7a18a1e75..9678f16528d8e3 100644 --- a/var/spack/repos/builtin/packages/yosys/package.py +++ b/var/spack/repos/builtin/packages/yosys/package.py @@ -20,7 +20,7 @@ class Yosys(MakefilePackage): """ homepage = "https://yosyshq.net/yosys" - url = "https://github.com/YosysHQ/yosys/archive/refs/tags/yosys-0.40.tar.gz" + url = "https://github.com/YosysHQ/yosys/archive/refs/tags/yosys-0.42.tar.gz" git = "https://github.com/YosysHQ/yosys.git" maintainers("davekeeshan") @@ -29,6 +29,7 @@ class Yosys(MakefilePackage): version("master", branch="master") + version("0.42", commit="9b6afcf3f83fea413b57c3790c25ba43b9914ce2", submodules=True) version("0.41", sha256="b0037d0a5864550a07a72ba81346e52a7d5f76b3027ef1d7c71b975d2c8bd2b2") version("0.40", sha256="c1d42ad90d587b587210b40cf3c5584e41e20f656e8630c33b6583322e8b764e") version("0.39", sha256="a66d95747b21d03e5b9c274d3f7cb0f7dd99610891dd66920bfaee25bc30dad1") From 90f8c20133f5c09f2bf8b4388b9b8984e2b314cf Mon Sep 17 00:00:00 2001 From: Dave Keeshan <96727608+davekeeshan@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:28:36 +0100 Subject: [PATCH 199/435] verible: Add versions 0.0.3671 and 0.0.3667 (#44660) --- var/spack/repos/builtin/packages/verible/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/verible/package.py b/var/spack/repos/builtin/packages/verible/package.py index c993d69727edeb..fbcc5b5503f1d4 100644 --- a/var/spack/repos/builtin/packages/verible/package.py +++ b/var/spack/repos/builtin/packages/verible/package.py @@ -34,6 +34,16 @@ class Verible(Package): version("master", branch="master") + version( + "0.0.3671", + sha256="9f492cdc64b047f4e91aece8aa01fd2b846d9695510360dde34980daf5dbe0dd", + url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3671-gf2731544.tar.gz", + ) + version( + "0.0.3667", + sha256="6a13a902bfd37ecabfd772d619251da40e8ad8e44cf75ec2bc8663046200b02a", + url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3667-g88d12889.tar.gz", + ) version( "0.0.3624", sha256="e5995644e092e72c9d37c492f319b0d4861a3c63d03d1c3cfefe2363bcd6b74f", From b231e6e9e9444b868d5ddc471dc7b8ff229c0836 Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Tue, 6 Aug 2024 06:49:01 -0500 Subject: [PATCH 200/435] Changes to DLIOProfiler and DFTracer Package (#45180) Co-authored-by: Massimiliano Culpo --- .../packages/py-dlio-profiler-py/package.py | 42 ++++++++++++++----- .../builtin/packages/py-pydftracer/package.py | 36 ++++++++++++++++ 2 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-pydftracer/package.py diff --git a/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py b/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py index 0bb2d7a86c1cfe..4785092136aa49 100644 --- a/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py +++ b/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py @@ -15,23 +15,39 @@ class PyDlioProfilerPy(PythonPackage): license("MIT") - version("develop", branch="dev") - version("master", branch="master") - version("0.0.5", tag="v0.0.5", commit="08f1a43c67c8dbb458d547020674c86118c9742e") - version("0.0.4", tag="v0.0.4", commit="f9ba207f4c3e3789eb7759653a94013e6b76c91c") - version("0.0.3", tag="v0.0.3", commit="531f4475cf03312e121c78bf644445882b51ad57") - version("0.0.2", tag="v0.0.2", commit="b72144abf1499e03d1db87ef51e780633e9e9533") - version("0.0.1", tag="v0.0.1", commit="28affe716211315dd6936ddc8e25ce6c43cdf491") + version( + "0.0.7", tag="v0.0.7", commit="e47ec476b58e14157b807cbadb4187bd4fe811d9", deprecated=True + ) + version( + "0.0.6", tag="v0.0.6", commit="3be111c973883387418ad96f63a18de63555c540", deprecated=True + ) + version( + "0.0.5", tag="v0.0.5", commit="08f1a43c67c8dbb458d547020674c86118c9742e", deprecated=True + ) + version( + "0.0.4", tag="v0.0.4", commit="f9ba207f4c3e3789eb7759653a94013e6b76c91c", deprecated=True + ) + version( + "0.0.3", tag="v0.0.3", commit="531f4475cf03312e121c78bf644445882b51ad57", deprecated=True + ) + version( + "0.0.2", tag="v0.0.2", commit="b72144abf1499e03d1db87ef51e780633e9e9533", deprecated=True + ) + version( + "0.0.1", tag="v0.0.1", commit="28affe716211315dd6936ddc8e25ce6c43cdf491", deprecated=True + ) depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated depends_on("cpp-logger@0.0.1", when="@:0.0.1") depends_on("cpp-logger@0.0.2", when="@0.0.2") - depends_on("cpp-logger@0.0.3", when="@0.0.3:") + depends_on("cpp-logger@0.0.3", when="@0.0.3:0.0.5") + depends_on("cpp-logger@0.0.4", when="@0.0.6:") depends_on("brahma@0.0.1", when="@:0.0.1") depends_on("brahma@0.0.2", when="@0.0.2") - depends_on("brahma@0.0.3", when="@0.0.3:") + depends_on("brahma@0.0.3", when="@0.0.3:0.0.5") + depends_on("brahma@0.0.5", when="@0.0.6:") depends_on("yaml-cpp@0.6.3", when="@0.0.2:") depends_on("py-setuptools@42:", type="build") depends_on("py-pybind11", type=("build", "run")) @@ -39,6 +55,10 @@ class PyDlioProfilerPy(PythonPackage): depends_on("cmake@3.12:", type="build") def setup_build_environment(self, env): - env.set("DLIO_PROFILER_DIR", self.prefix) - env.set("DLIO_PYTHON_SITE", python_purelib) + if self.spec.satisfies("@0.0.6:"): + env.set("DLIO_PROFILER_INSTALL_DIR", self.prefix) + env.set("DLIO_PROFILER_PYTHON_SITE", python_purelib) + else: + env.set("DLIO_PROFILER_DIR", self.prefix) + env.set("DLIO_PYTHON_SITE", python_purelib) env.set("DLIO_BUILD_DEPENDENCIES", "0") diff --git a/var/spack/repos/builtin/packages/py-pydftracer/package.py b/var/spack/repos/builtin/packages/py-pydftracer/package.py new file mode 100644 index 00000000000000..2b34fbfa985d40 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pydftracer/package.py @@ -0,0 +1,36 @@ +# 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 PyPydftracer(PythonPackage): + """A low-level profiler for capture I/O calls from deep learning applications.""" + + homepage = "https://github.com/hariharan-devarajan/dlio-profiler.git" + git = "https://github.com/hariharan-devarajan/dlio-profiler.git" + maintainers("hariharan-devarajan") + + license("MIT") + + version("develop", branch="develop") + version("master", branch="master") + version("1.0.3", tag="v1.0.3", commit="856de0b958a22081d80a9a25bea3f74e2759d9ee") + version("1.0.2", tag="v1.0.2", commit="8a15f09ff54a909605eda0070689c0b99401db20") + version("1.0.1", tag="v1.0.1", commit="dc1ce44042e669e6da495f906ca5f8b155c9f155") + version("1.0.0", tag="v1.0.0", commit="b6df57d81ffb043b468e2bd3e8df9959fdb4af53") + + depends_on("cpp-logger@0.0.4", when="@1.0.0:") + depends_on("brahma@0.0.5", when="@1.0.0:") + depends_on("yaml-cpp@0.6.3", when="@1.0.0:") + depends_on("py-setuptools@42:", type="build") + depends_on("py-pybind11", type=("build", "run")) + depends_on("ninja", type="build") + depends_on("cmake@3.12:", type="build") + + def setup_build_environment(self, env): + env.set("DFTRACER_INSTALL_DIR", self.prefix) + env.set("DFTRACER_PYTHON_SITE", python_purelib) + env.set("DFTRACER_BUILD_DEPENDENCIES", "0") From 82752ad0b7b11be57046da242099f836b736788d Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 6 Aug 2024 17:23:13 +0200 Subject: [PATCH 201/435] rocksdb: add missing build dependencies (#45252) --- var/spack/repos/builtin/packages/rocksdb/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/rocksdb/package.py b/var/spack/repos/builtin/packages/rocksdb/package.py index 6feab293aa8b5a..7ff8ad1efda535 100644 --- a/var/spack/repos/builtin/packages/rocksdb/package.py +++ b/var/spack/repos/builtin/packages/rocksdb/package.py @@ -46,6 +46,12 @@ class Rocksdb(MakefilePackage): variant("werror", default=False, description="Build with -Werror") variant("rtti", default=False, description="Build with RTTI") + depends_on("bash", type="build") + # Depends on coreutil's install command (e.g., Alpine's Busybox version does not work) + depends_on("coreutils", type="build") + depends_on("perl", type="build") + depends_on("which", type="build") + depends_on("bzip2", when="+bz2") depends_on("gflags") depends_on("lz4", when="+lz4") From 51ac4686b477e1afdb78dbaf22ba09b802f444b5 Mon Sep 17 00:00:00 2001 From: Alex Leute <36964815+alex391@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:52:18 -0400 Subject: [PATCH 202/435] py-anvio and py-rich-argparse: new packages (#45367) --- .../builtin/packages/py-anvio/package.py | 55 +++++++++++++++++++ .../packages/py-rich-argparse/package.py | 23 ++++++++ 2 files changed, 78 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-anvio/package.py create mode 100644 var/spack/repos/builtin/packages/py-rich-argparse/package.py diff --git a/var/spack/repos/builtin/packages/py-anvio/package.py b/var/spack/repos/builtin/packages/py-anvio/package.py new file mode 100644 index 00000000000000..2a6de3f404782d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-anvio/package.py @@ -0,0 +1,55 @@ +# Copyright 2013-2023 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 PyAnvio(PythonPackage): + """Anvi’o is a comprehensive platform that brings together many aspects of + today’s cutting-edge computational strategies of data-enabled microbiology, + including genomics, metagenomics, metatranscriptomics, pangenomics, + metapangenomics, phylogenomics, and microbial population genetics in an + integrated and easy-to-use fashion through extensive interactive + visualization capabilities.""" + + homepage = "https://anvio.org/" + + # Not available on pypi + url = "https://github.com/merenlab/anvio/releases/download/v8/anvio-8.tar.gz" + + maintainers("alex391", "meren") + + version("8", sha256="4ced91773648d9ca27a20b725ab64bc213d80b33726940f5f818240033912c04") + + depends_on("py-setuptools", type="build") + + depends_on("py-numpy@:1.24", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) + depends_on("py-bottle", type=("build", "run")) + depends_on("py-pysam", type=("build", "run")) + depends_on("py-ete3", type=("build", "run")) + depends_on("py-scikit-learn@1.2.2", type=("build", "run")) + depends_on("py-django", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-mistune", type=("build", "run")) + depends_on("py-six", type=("build", "run")) + depends_on("py-matplotlib", type=("build", "run")) + depends_on("py-statsmodels", type=("build", "run")) + # Needs a version of py-colored newer than 1.4.2 (not listed in + # requirements.txt) + depends_on("py-colored@2:", type=("build", "run")) + depends_on("py-illumina-utils", type=("build", "run")) + depends_on("py-tabulate", type=("build", "run")) + depends_on("py-rich-argparse", type=("build", "run")) + depends_on("py-numba", type=("build", "run")) + depends_on("py-paste", type=("build", "run")) + depends_on("py-pyani", type=("build", "run")) + depends_on("py-psutil", type=("build", "run")) + depends_on("py-pandas@1.4.4", type=("build", "run")) + depends_on("snakemake", type=("build", "run")) + depends_on("py-multiprocess", type=("build", "run")) + depends_on("py-plotext", type=("build", "run")) + depends_on("py-networkx", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-rich-argparse/package.py b/var/spack/repos/builtin/packages/py-rich-argparse/package.py new file mode 100644 index 00000000000000..efc24f7b6a08eb --- /dev/null +++ b/var/spack/repos/builtin/packages/py-rich-argparse/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 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 PyRichArgparse(PythonPackage): + """rich-argparse improves the look and readability of argparse's help while + requiring minimal changes to the code.""" + + homepage = "https://github.com/hamdanal/rich-argparse" + pypi = "rich_argparse/rich_argparse-1.4.0.tar.gz" + + version("1.4.0", sha256="c275f34ea3afe36aec6342c2a2298893104b5650528941fb53c21067276dba19") + + depends_on("python@3.7:", type=("build", "run")) + + depends_on("py-hatchling@1.11.0:", type="build") + + depends_on("py-rich@11.0.0:", type=("build", "run")) From f3c21b0177ea1bd69b5fea5b2e785e9d23292e4e Mon Sep 17 00:00:00 2001 From: Pranav Sivaraman Date: Tue, 6 Aug 2024 09:50:29 -0700 Subject: [PATCH 203/435] libdwarf: remove old versions with 0.10.1 (#45306) --- .../builtin/packages/libdwarf/package.py | 92 ++++++++++++++++--- 1 file changed, 80 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py index bdb570ef1382c1..a55d24b6e09624 100644 --- a/var/spack/repos/builtin/packages/libdwarf/package.py +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -12,7 +12,7 @@ dwarf_dirs = ["libdwarf", "dwarfdump2"] -class Libdwarf(Package): +class Libdwarf(CMakePackage, Package): """The DWARF Debugging Information Format is of interest to programmers working on compilers and debuggers (and any one interested in reading or writing DWARF information). It was @@ -25,29 +25,97 @@ class Libdwarf(Package): MIPS/IRIX C compiler.""" homepage = "https://www.prevanders.net/dwarf.html" - url = "https://www.prevanders.net/libdwarf-20160507.tar.gz" + url = "https://www.prevanders.net/libdwarf-0.10.1.tar.xz" list_url = homepage license("LGPL-2.1-only") - version("20180129", sha256="8bd91b57064b0c14ade5a009d3a1ce819f1b6ec0e189fc876eb8f42a8720d8a6") - version("20160507", sha256="12ae39376e3915bf8fa92555989f3ad5f2f4f332b590a628541ce68987b337af") - version("20130729", sha256="b6455d8616baf2883e2af91f006d6cbd583128fdfff46e3d1fae460bc223bb7b") - version("20130207", sha256="5cb81459f0a1f6a2a10ef4635faddc2fa5e1a9e36901018c017759e491e708b8") - version("20130126", sha256="c23c847935f8612f4fcdcfa0b3311f1553dcbd95bb683d3d5e030440201192fe") + version("0.10.1", sha256="b511a2dc78b98786064889deaa2c1bc48a0c70115c187900dd838474ded1cc19") + with default_args(deprecated=True): + version( + "20180129", sha256="8bd91b57064b0c14ade5a009d3a1ce819f1b6ec0e189fc876eb8f42a8720d8a6" + ) + version( + "20160507", sha256="12ae39376e3915bf8fa92555989f3ad5f2f4f332b590a628541ce68987b337af" + ) + version( + "20130729", sha256="b6455d8616baf2883e2af91f006d6cbd583128fdfff46e3d1fae460bc223bb7b" + ) + version( + "20130207", sha256="5cb81459f0a1f6a2a10ef4635faddc2fa5e1a9e36901018c017759e491e708b8" + ) + version( + "20130126", sha256="c23c847935f8612f4fcdcfa0b3311f1553dcbd95bb683d3d5e030440201192fe" + ) + + build_system( + conditional("generic", when="@20130126:20180130"), + conditional("cmake", when="@0:"), + default="generic", + ) + + with when("@:20130126"): + variant("shared", default=True, description="Build shared libs") + variant("examples", default=False, description="Build examples") + variant("pic", default=True, description="Build with position independent code") + variant("dwarfdump", default=True, description="Build dwarfdump") + variant("dwarfgen", default=False, description="Build dwarfgen") + variant( + "decompression", + default=True, + description="Enables support for compressed debug sections", + ) + + conflicts("+shared ~pic") + + depends_on("c", type="build") + depends_on("cxx", type="build") + + depends_on("cmake@3.5:", type="build", when="@:20130126") + depends_on("gmake", type="build", when="@20130126:") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated depends_on("elfutils@0.163", when="@20160507", type="link") - depends_on("elf", type="link") - depends_on("zlib-api", type="link") + depends_on("elf", when="@20130126:", type="link") + + depends_on("zlib-api", when="@20130126:", type="link") + + with when("@:20130126 +decompression"): + depends_on("zlib-api", type="link") + depends_on("zstd", type="link") parallel = False + def url_for_version(self, version): + if version < Version("20130126"): + return super().url_for_version(version) + return f"https://www.prevanders.net/libdwarf-{version}.tar.gz" + + +class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): + def cmake_args(self): + spec = self.spec + define = self.define + from_variant = self.define_from_variant + + args = [ + from_variant("BUILD_SHARED", "shared"), + from_variant("BUILD_DWARFEXAMPLE", "examples"), + from_variant("PIC_ALWAYS", "pic"), + from_variant("BUILD_DWARFDUMP", "dwarfdump"), + from_variant("BUILD_DWARFGEN", "dwarfgen"), + from_variant("ENABLE_DECOMPRESSION", "decompression"), + define("BUILD_NON_SHARED", spec.satisfies("~shared")), + define("DO_TESTING", self.pkg.run_tests), + ] + + return args + + +class GenericBuilder(spack.build_systems.generic.GenericBuilder): def patch(self): filter_file(r"^typedef struct Elf Elf;$", "", "libdwarf/libdwarf.h.in") - def install(self, spec, prefix): + def install(self, pkg, spec, prefix): # dwarf build does not set arguments for ar properly make.add_default_arg("ARFLAGS=rcs") From 85ec4cca927f27402d7879b2874d1201d6dde3c0 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 6 Aug 2024 12:56:35 -0500 Subject: [PATCH 204/435] libxshmfence: add v1.3.1, v1.3.2 (#44393) * libxshmfence: add v1.3.1, v1.3.2 * libxshmfence: fix url_for_version * libxshmfence: url_for_version without spec.satisfies * libxshmfence: mv url_for_version after directives --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/libxshmfence/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py index 45c47fcd4b60b4..8584b1281e1059 100644 --- a/var/spack/repos/builtin/packages/libxshmfence/package.py +++ b/var/spack/repos/builtin/packages/libxshmfence/package.py @@ -13,11 +13,13 @@ class Libxshmfence(AutotoolsPackage, XorgPackage): with the X SyncFence objects that can be shared between processes using file descriptor passing.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libxshmfence/" - xorg_mirror_path = "lib/libxshmfence-1.3.tar.bz2" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libxshmfence" + xorg_mirror_path = "lib/libxshmfence-1.3.2.tar.xz" license("MIT") + version("1.3.2", sha256="870df257bc40b126d91b5a8f1da6ca8a524555268c50b59c0acd1a27f361606f") + version("1.3.1", sha256="1129f95147f7bfe6052988a087f1b7cb7122283d2c47a7dbf7135ce0df69b4f8") version("1.3", sha256="b884300d26a14961a076fbebc762a39831cb75f92bed5ccf9836345b459220c7") version("1.2", sha256="d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c") @@ -26,3 +28,10 @@ class Libxshmfence(AutotoolsPackage, XorgPackage): depends_on("xproto") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") + + def url_for_version(self, version): + url = super().url_for_version(version) + if version <= Version("1.3"): + return url.replace("xz", "bz2") + + return url From 81281646e9cf893b841e742493c7c8fcc8b71af1 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Tue, 6 Aug 2024 20:23:46 +0100 Subject: [PATCH 205/435] py-colorlog: added new version (#45596) * py-colorlog: added new version * py-colorlog: corrected dependency on py-setuptools --- var/spack/repos/builtin/packages/py-colorlog/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-colorlog/package.py b/var/spack/repos/builtin/packages/py-colorlog/package.py index 8c8810dd265d23..c9c85097a0a997 100644 --- a/var/spack/repos/builtin/packages/py-colorlog/package.py +++ b/var/spack/repos/builtin/packages/py-colorlog/package.py @@ -12,7 +12,9 @@ class PyColorlog(PythonPackage): homepage = "https://github.com/borntyping/python-colorlog" pypi = "colorlog/colorlog-4.0.2.tar.gz" + version("6.8.2", sha256="3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44") version("4.0.2", sha256="3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42") version("3.1.4", sha256="418db638c9577f37f0fae4914074f395847a728158a011be2a193ac491b9779d") depends_on("py-setuptools", type="build") + depends_on("py-setuptools@38.6.0:", when="@6.8.0:", type="build") From 51ba25fec30d205c5b041e0a8baa006213130090 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Tue, 6 Aug 2024 20:41:03 +0100 Subject: [PATCH 206/435] py-gcovr: add version 7.2 (#45597) * py-gcovr: add version 7.2 * py-gcovr: fix dependency on py-tomli --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- var/spack/repos/builtin/packages/py-gcovr/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-gcovr/package.py b/var/spack/repos/builtin/packages/py-gcovr/package.py index bd26134bc260ca..017346357cc548 100644 --- a/var/spack/repos/builtin/packages/py-gcovr/package.py +++ b/var/spack/repos/builtin/packages/py-gcovr/package.py @@ -15,9 +15,11 @@ class PyGcovr(PythonPackage): homepage = "https://gcovr.com/" pypi = "gcovr/gcovr-4.2.tar.gz" + version("7.2", sha256="e3e95cb56ca88dbbe741cb5d69aa2be494eb2fc2a09ee4f651644a670ee5aeb3") version("5.2", sha256="217195085ec94346291a87b7b1e6d9cfdeeee562b3e0f9a32b25c9530b3bce8f") version("4.2", sha256="5aae34dc81e51600cfecbbbce3c3a80ce3f7548bc0aa1faa4b74ecd18f6fca3f") + depends_on("python@3.8:", when="@7.2:", type=("build", "run")) depends_on("python@3.7:", when="@5.1:", type=("build", "run")) depends_on("python@3.6:", when="@5.0", type=("build", "run")) depends_on("python@2.7:2,3.5:", when="@:4", type=("build", "run")) @@ -26,3 +28,6 @@ class PyGcovr(PythonPackage): depends_on("py-jinja2", type=("build", "run")) depends_on("py-lxml", type=("build", "run")) depends_on("py-pygments", when="@5:", type=("build", "run")) + depends_on("py-pygments@2.13.0:", when="@7.2:", type=("build", "run")) + depends_on("py-colorlog", when="@7.2:", type=("build", "run")) + depends_on("py-tomli@1.1:", when="@7.2: ^python@:3.10", type=("build", "run")) From 97e691cdbf20904281f1d32a82434c05537fac17 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 6 Aug 2024 23:09:55 +0200 Subject: [PATCH 207/435] binutils: add v2.43 (#45594) --- var/spack/repos/builtin/packages/binutils/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 85ef788279ebaa..fea8631c8e6cd4 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -27,6 +27,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): checked_by="tgamblin", ) + version("2.43", sha256="fed3c3077f0df7a4a1aa47b080b8c53277593ccbb4e5e78b73ffb4e3f265e750") version("2.42", sha256="aa54850ebda5064c72cd4ec2d9b056c294252991486350d9a97ab2a6dfdfaf12") version("2.41", sha256="a4c4bec052f7b8370024e60389e194377f3f48b56618418ea51067f67aaab30b") version("2.40", sha256="f8298eb153a4b37d112e945aa5cb2850040bcf26a3ea65b5a715c83afe05e48a") From 1ee29929a731a685c2e1b83c713b4126ab7aa8d1 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 7 Aug 2024 03:53:45 +0200 Subject: [PATCH 208/435] cmake: add v3.30.2 (#45593) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 7d8d32bbc5615a..676fc26180e6d9 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -29,6 +29,7 @@ class Cmake(Package): license("BSD-3-Clause") version("master", branch="master") + version("3.30.2", sha256="46074c781eccebc433e98f0bbfa265ca3fd4381f245ca3b140e7711531d60db2") version("3.30.1", sha256="df9b3c53e3ce84c3c1b7c253e5ceff7d8d1f084ff0673d048f260e04ccb346e1") version("3.30.0", sha256="157e5be6055c154c34f580795fe5832f260246506d32954a971300ed7899f579") version("3.29.6", sha256="1391313003b83d48e2ab115a8b525a557f78d8c1544618b48d1d90184a10f0af") From f9fa160a243c8d7f17cd195abaedbf057177505e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 06:50:18 +0200 Subject: [PATCH 209/435] build(deps): bump actions/upload-artifact from 4.3.5 to 4.3.6 (#45608) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.5 to 4.3.6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/89ef406dd8d7e03cfd12d9e0a4a378f454709029...834a144ee995460fba8ed112a2fc961b36a5ec5a) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index cd5998f1f89822..288996881fb6ee 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -87,7 +87,7 @@ jobs: fi - name: Upload Dockerfile - uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: dockerfiles_${{ matrix.dockerfile[0] }} path: dockerfiles @@ -126,7 +126,7 @@ jobs: needs: deploy-images steps: - name: Merge Artifacts - uses: actions/upload-artifact/merge@89ef406dd8d7e03cfd12d9e0a4a378f454709029 + uses: actions/upload-artifact/merge@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: dockerfiles pattern: dockerfiles_* From fb315c37ba048f43b9f32cdfe2ff792080c3bc27 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Tue, 6 Aug 2024 21:55:07 -0700 Subject: [PATCH 210/435] py-hail: new package (#44521) --- .../repos/builtin/packages/py-hail/package.py | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-hail/package.py diff --git a/var/spack/repos/builtin/packages/py-hail/package.py b/var/spack/repos/builtin/packages/py-hail/package.py new file mode 100644 index 00000000000000..53a0d4f4f64b86 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-hail/package.py @@ -0,0 +1,236 @@ +# 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 PyHail(MakefilePackage): + """Cloud-native genomic dataframes and batch computing (Python API)""" + + homepage = "https://hail.is" + git = "https://github.com/hail-is/hail.git" + # We can't use tarballs because HAIL needs to look up git commit metadata + # to determine its version. We could patch this, but that is not yet + # implemented. + # url = "https://github.com/hail-is/hail/archive/refs/tags/0.2.130.tar.gz" + + maintainers("teaguesterling") + license("MIT", checked_by="teaguesterling") + + version("0.2.132", commit="678e1f52b9999cb05ebf03fd360e5c4506bd6dad") + version("0.2.131", commit="11d9b2ff89da9ef6a4f576be89f1f06959580ea4") + version("0.2.130", commit="bea04d9c79b5ca739364e8c121132845475f617a") + version("0.2.129", commit="41126be2df04e4ef823cefea40fba4cadbe5db8a") + + resource( + name="catch", + url="https://github.com/catchorg/Catch2/releases/download/v2.6.0/catch.hpp", + sha256="a86133b34d4721b6e1cf7171981ea469789f83f2475907b4033012577e4975fe", + destination="hail/src/main/resources/include/catch.hpp", + expand=False, + ) + + resource( + name="libsimdpp-2.1", + extension="tar.gz", + url="https://storage.googleapis.com/hail-common/libsimdpp-2.1.tar.gz", + sha256="b0e986b20bef77cd17004dd02db0c1ad9fab9c70d4e99594a9db1ee6a345be93", + destination="hail/src/main/c", + ) + + resource( + name="mill-0.11.7", + url="https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/0.11.7/mill-dist-0.11.7.jar", + sha256="278b430150af899495d360d1f886e223e78bb4a20e67144a240bfb7e2d4f6085", + destination="hail/mill", + expand=False, + ) + + variant("native", default=True, description="Compile C & C++ HAIL optimizations") + variant( + "query_backend", + values=["undefined", "spark", "batch"], + default="spark", + description="Configure HAIL query backend at build", + ) + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-pip", type="build") + depends_on("py-wheel", type="build") + depends_on("py-build@1.1+virtualenv", type="build", when="@0.2.131:") + depends_on("c", type="build", when="+native") + depends_on("cxx", type="build", when="+native") + + # HAIL bundle is tied to specific runtime versions + # HAIL spec, Java sec, Spark spec, Scala spec + # We're not accurately capturing previous versions + for hail, java, spark, scala in [ + # 0.2.130 and before (to somwhere around 0.2.64) used Spark 3.3 + # And either Java 8 or Java 11 + (":0.2.130", "8,11", "3.3", "2.12"), + # 0.2.131 updated to Java 11 and Spark 3.5 + # Undocumented bump was to scala 2.12.13 for scala.annotation.noerror + ("0.2.131:", "11", "3.5", "2.12.18:2.12"), + ]: + with default_args(type=("build", "run"), when=f"@{hail}"): + depends_on(f"java@{java}") + depends_on(f"scala@{scala}") + depends_on(f"spark@{spark}") + # This should match spark but isn't actually enforced + # by the PySpark package and they can conflit. + depends_on(f"py-pyspark@{spark}") + + with default_args(type=("build", "link"), when="+native"): + # Hail build requirements + depends_on("blas") + depends_on("lapack") + depends_on("lz4") + + with default_args(type=("build", "run")): + depends_on("py-avro@1.10:1.11") + depends_on("py-bokeh@3:3.3") + depends_on("py-decorator@:4") + depends_on("py-deprecated@1.2.10:1.2") + depends_on("py-numpy@:1") + depends_on("py-pandas@2:2") + depends_on("py-parsimonious@:0") + depends_on("py-plotly@5.18:5") + depends_on("py-protobuf@3.20.2") + depends_on("py-requests@2.31:2") + depends_on("py-scipy@1.3:1.11") + + # hailtop requirements + depends_on("py-aiodns@2") + depends_on("py-aiohttp@3.9") + depends_on("py-azure-identity@1.6:1") + depends_on("py-azure-mgmt-storage@20.1.0") + depends_on("py-azure-storage-blob@12.11:12") + depends_on("py-boto3@1.17:1") + depends_on("py-botocore@1.20:1") + depends_on("py-dill@0.3.6:0.3") + depends_on("py-frozenlist@1.3.1:1") + depends_on("py-google-auth@2.14.1:2") + depends_on("py-google-auth-oauthlib@0.5.2:0") + depends_on("py-humanize@1.0.0:1") + depends_on("py-janus@0.6:1.0") + depends_on("py-nest-asyncio@1.5.8:1") + depends_on("py-rich@12.6.0:12") + depends_on("py-orjson@3.9.15:3") + depends_on("py-typer@0.9.0:0") + depends_on("py-python-json-logger@2.0.2:2") + depends_on("py-pyyaml@6.0:7") + depends_on("py-sortedcontainers@2.4.0:2") + depends_on("py-tabulate@0.8.9:0") + depends_on("py-uvloop@0.19.0:0") + depends_on("py-jproperties@2.1.1:2") + # Undocumented runtime requirements for hailtop + # These are also required to use the HAIL API + # but are not explicitly mentioned anywhere + depends_on("py-azure-mgmt-core") + depends_on("py-typing-extensions") + + build_directory = "hail" + + def patch(self): + # Hail will fail to build if it cannot determine a commit hash from git + # which will not be available in a spack cache. Since we know it from + # the package, we can inject it in the failure and move forward. + revision = self.hail_revision + version = self.hail_pip_version + + filter_file( + r'\$\(error "git rev-parse HEAD" failed to produce output\)', + f"REVISION := {revision}", + "hail/version.mk", + ) + filter_file( + r'\$\(error "git rev-parse --short=12 HEAD" failed to produce output\)', + f"SHORT_REVISION := {revision[:12]}", + "hail/version.mk", + ) + filter_file( + r'\$\(error "git rev-parse --abbrev-ref HEAD" failed to produce output\)', + f"BRANCH := tags/{version}", + "hail/version.mk", + ) + + # Also need to make sure that build-info.properties gets the right revision + # which ends up improperly calculated in scala and will crash at runtime + filter_file( + r"val revision = VcsVersion\.vcsState\(\)\.currentRevision", + "val vcs_revision = VcsVersion.vcsState().currentRevision\n" + f' val revision = if(vcs_revision == "no-vcs") "{revision}" else vcs_revision\n', + "hail/build.sc", + ) + + @property + def hail_revision(self): + version = self.version + version_info = self.versions[version] + # REVISION must look like a hash or Hail crashes at startup + # Technically, it needs to be at least 12 characters + revision = version_info.get("commit", version.joined.string.ljust(40, "0")) + return revision + + @property + def hail_pip_version(self): + # This is the same behavior is as is defined in hail/version.mk + return f"{self.spec.version.up_to(3)}" + + @property + def build_wheel_file_path(self): + wheel_file = f"hail-{self.hail_pip_version}-py3-none-any.whl" + wheel_dir = join_path("build", "deploy", "dist") + return join_path(wheel_dir, wheel_file) + + def flag_handler(self, name, flags): + if name == "cxxflags" and self.spec.satisfies("+native"): + # HAIL build doesn't find lz4: https://discuss.hail.is/t/ld-pruning-repeated-errors/1838/14 + flags.append(f"-I{self.spec['lz4'].prefix.include}") + return (flags, None, None) + + @property + def build_targets(self): + spec = self.spec + + # Hail likes variables passed in to Make + variables = [ + f"HAIL_PYTHON3={spec['python'].home.bin.python3}", + f"PIP={spec['py-pip'].home.bin.pip}", + f"SCALA_VERSION={spec['scala'].version}", + f"SPARK_VERSION={spec['spark'].version}", + ] + if spec.satisfies("+native"): + variables += ["HAIL_COMPILE_NATIVES=1"] + + # We're not using the documented target to + # because it depends on pip to install and resolve + # dependencies directly. This does everything in one step. + # and ends up downloading all of the dependencies via pip. + # The documented target is `install-on-cluster` + targets = [ + # This may be too specific but it would detect failures + # and fail to build instead of taking a long time to build + # and then failing at install time. + self.build_wheel_file_path + ] + + return targets + variables + + def install(self, spec, prefix): + spec = self.spec + pip = which("pip") + wheel = self.build_wheel_file_path + + # This mimics the install-on-cluster target but avoids anything + # that utilizes pip to resolve dependencies + with working_dir(join_path(self.stage.source_path, "hail")): + pip("install", "--use-pep517", "--no-deps", f"--prefix={prefix}", wheel) + + backend = spec.variants["query_backend"].value + if backend != "undefined": + hailctl = which("hailctl") # Should be installed from above + if hailctl is not None: # but it might not be + hailctl("config", "set", "query/backend", f"{backend}") From 431f5627d90127170cc0847839bf17cb0a215f8d Mon Sep 17 00:00:00 2001 From: tygoetsch Date: Wed, 7 Aug 2024 01:33:36 -0600 Subject: [PATCH 211/435] Add charliecloud@0.38 (#45566) --- var/spack/repos/builtin/packages/charliecloud/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/charliecloud/package.py b/var/spack/repos/builtin/packages/charliecloud/package.py index 98035a27515f41..2f4497ac18f295 100644 --- a/var/spack/repos/builtin/packages/charliecloud/package.py +++ b/var/spack/repos/builtin/packages/charliecloud/package.py @@ -19,6 +19,7 @@ class Charliecloud(AutotoolsPackage): license("Apache-2.0") version("master", branch="master") + version("0.38", sha256="1a3766d57ff4db9c65fd5c561bbaac52476c9a19fa10c1554190912a03429b7a") version("0.37", sha256="1fd8e7cd1dd09a001aead5e105e3234792c1a1e9e30417f495ab3f422ade7397") version("0.36", sha256="b6b1a085d8ff82abc6d625ab990af3925c84fa08ec837828b383f329bd0b8e72") version("0.35", sha256="042f5be5ed8eda95f45230b4647510780142a50adb4e748be57e8dd8926b310e") From 228c82502d3a9c2d7958f37416328997831bf879 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 7 Aug 2024 03:47:31 -0500 Subject: [PATCH 212/435] qt-5compat: new package for QtCore5Compat module (#45601) --- .../builtin/packages/qt-5compat/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/qt-5compat/package.py diff --git a/var/spack/repos/builtin/packages/qt-5compat/package.py b/var/spack/repos/builtin/packages/qt-5compat/package.py new file mode 100644 index 00000000000000..027468f7c809be --- /dev/null +++ b/var/spack/repos/builtin/packages/qt-5compat/package.py @@ -0,0 +1,29 @@ +# 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 * +from spack.pkg.builtin.qt_base import QtBase, QtPackage + + +class Qt5compat(QtPackage): + """The Qt5compat module contains unsupported Qt 5 APIs for use in Qt 6 projects.""" + + url = QtPackage.get_url(__qualname__) + list_url = QtPackage.get_list_url(__qualname__) + + maintainers("wdconinc") + + license("LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only") + + version("6.7.2", sha256="331a1e617952217868beeef7964828500388abeeb502ea3436f16eec816426c4") + + depends_on("cxx", type="build") + + depends_on("qt-base") + + for _v in QtBase.versions: + v = str(_v) + depends_on("qt-base@" + v, when="@" + v) From 2106a2be2634601fa7ab6f367bb8fd98253b0222 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 7 Aug 2024 03:53:32 -0500 Subject: [PATCH 213/435] qt-base: let QtPackage base class handle module files (#45603) --- .../repos/builtin/packages/qt-base/package.py | 40 +++++++++++++++++++ .../repos/builtin/packages/qt-svg/package.py | 4 -- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py index e9b3885e1d70ff..5ba8ab63896be9 100644 --- a/var/spack/repos/builtin/packages/qt-base/package.py +++ b/var/spack/repos/builtin/packages/qt-base/package.py @@ -7,6 +7,7 @@ import re import shutil import sys +import tempfile import llnl.util.tty as tty @@ -82,6 +83,45 @@ def install_config_summary(self): # and should not be relied upon for downstream parsing. tty.warn("config.summary in prefix is a temporary feature only") + @run_after("install") + def add_qt_module_files(self): + """Qt modules need to drop a forwarding qt_module.pri file in the qt-base + mkspecs/modules directory. This violates the spack install prefix separation, + so we modify the downstream module files to work regardless.""" + + # No need to modify qt-base itself + if self.spec.name == "qt-base": + return + + # Define qt_module.pri filename, but postpone writing until after loop + qt_module_pri = join_path(self.prefix.mkspecs.modules, "qt_module.pri") + + # Include qt_module.pri file in every pri file + for old_file in find(self.prefix.mkspecs.modules, "*.pri"): + new_fd, new_file = tempfile.mkstemp( + prefix=os.path.basename(old_file), dir=self.prefix.mkspecs.modules + ) + with os.fdopen(new_fd, "w") as new_fh: + new_fh.write("include(qt_module.pri)\n") + with open(old_file, "r") as old_fh: + new_fh.write(old_fh.read()) + shutil.move(new_file, old_file) + + # Create qt_module.pri file with definitions + defs = [] + for dir in ["BIN", "INCLUDE", "LIB"]: + if os.path.exists(join_path(self.prefix, dir.lower())): + defs.append(f"QT_MODULE_{dir}_BASE = {join_path(self.prefix, dir.lower())}\n") + with open(qt_module_pri, "w") as file: + file.write("\n".join(defs)) + + def setup_run_environment(self, env): + env.prepend_path("QMAKEPATH", self.prefix) + if os.path.exists(self.prefix.mkspecs.modules): + env.prepend_path("QMAKE_MODULE_PATH", self.prefix.mkspecs.modules) + if os.path.exists(self.prefix.plugins): + env.prepend_path("QT_PLUGIN_PATH", self.prefix.plugins) + class QtBase(QtPackage): """Qt Base (Core, Gui, Widgets, Network, ...)""" diff --git a/var/spack/repos/builtin/packages/qt-svg/package.py b/var/spack/repos/builtin/packages/qt-svg/package.py index d42435979a0981..8f2e78f91492b0 100644 --- a/var/spack/repos/builtin/packages/qt-svg/package.py +++ b/var/spack/repos/builtin/packages/qt-svg/package.py @@ -49,7 +49,3 @@ class QtSvg(QtPackage): def cmake_args(self): args = super().cmake_args() + [] return args - - def setup_run_environment(self, env): - # to make plugins from SVG module to base, for e.g. icon loading - env.prepend_path("QT_PLUGIN_PATH", self.prefix.plugins) From 4584d85ca6048c5b4e8236bff2cabfe1439b1450 Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Wed, 7 Aug 2024 02:43:23 -0700 Subject: [PATCH 214/435] biobambam2: fix test scripts to use installed binaries (#45609) --- var/spack/repos/builtin/packages/biobambam2/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/biobambam2/package.py b/var/spack/repos/builtin/packages/biobambam2/package.py index c50f11c47ac435..1ea3a3a0886b41 100644 --- a/var/spack/repos/builtin/packages/biobambam2/package.py +++ b/var/spack/repos/builtin/packages/biobambam2/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack.package import * @@ -38,6 +40,12 @@ def cache_test_sources(self): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources(self.test_src_dir) + # Fix test scripts to run installed binaries + scripts_dir = join_path(install_test_root(self), self.test_src_dir) + for path in os.listdir(scripts_dir): + if path.endswith(".sh"): + filter_file(r"../src/", r"", join_path(scripts_dir, path)) + def test_short_sort(self): """run testshortsort.sh to check alignments sorted by coordinate""" test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) From d2f269ed7bfb314bb76e9e88f62a14bf690b2021 Mon Sep 17 00:00:00 2001 From: Jordan Galby <67924449+Jordan474@users.noreply.github.com> Date: Wed, 7 Aug 2024 12:12:56 +0200 Subject: [PATCH 215/435] Fix SIP build system installing files into python-venv (#45360) For example: spack install py-pyqt5 or py-pyqt6 would install pylupdate5 pyrcc5 and pyuic5 into in python-venv's install prefix. Fix https://github.com/spack/spack/issues/45359 --- lib/spack/spack/build_systems/sip.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/build_systems/sip.py b/lib/spack/spack/build_systems/sip.py index 5d93e23ac2d52d..f1263c12a600b7 100644 --- a/lib/spack/spack/build_systems/sip.py +++ b/lib/spack/spack/build_systems/sip.py @@ -139,6 +139,10 @@ def configure(self, pkg, spec, prefix): args = ["--verbose", "--target-dir", inspect.getmodule(self.pkg).python_platlib] args.extend(self.configure_args()) + # https://github.com/Python-SIP/sip/commit/cb0be6cb6e9b756b8b0db3136efb014f6fb9b766 + if spec["py-sip"].satisfies("@6.1.0:"): + args.extend(["--scripts-dir", pkg.prefix.bin]) + sip_build = Executable(spec["py-sip"].prefix.bin.join("sip-build")) sip_build(*args) From 1b1663aceaf3bdeed7a4d5d6e70f661bfd66a147 Mon Sep 17 00:00:00 2001 From: Konstantinos Parasyris Date: Wed, 7 Aug 2024 04:09:47 -0700 Subject: [PATCH 216/435] flux-pmix: correct FLUX_PMI_CLIENT_SEARCHPATH (#45277) --- var/spack/repos/builtin/packages/flux-pmix/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/flux-pmix/package.py b/var/spack/repos/builtin/packages/flux-pmix/package.py index 7b6dafc750b84c..23d7425d36634b 100644 --- a/var/spack/repos/builtin/packages/flux-pmix/package.py +++ b/var/spack/repos/builtin/packages/flux-pmix/package.py @@ -57,8 +57,8 @@ def add_pluginpath(self): def setup_run_environment(self, env): spec = self.spec - env.prepend_path("FLUX_SHELL_RC_PATH", join_path(self.prefix, "etc/flux/shell/lua.d")) + env.prepend_path("FLUX_SHELL_RC_PATH", join_path(self.prefix.etc, "flux/shell/lua.d")) if spec.satisfies("@0.3.0:"): env.prepend_path( - "FLUX_PMI_CLIENT_SEARCHPATH", join_path(self.prefix, "flux/upmi/plugins") + "FLUX_PMI_CLIENT_SEARCHPATH", join_path(self.prefix.lib, "flux/upmi/plugins") ) From c16191d9ea966d62dc7ebc6e4fa8619af643dca9 Mon Sep 17 00:00:00 2001 From: Jordan GALBY Date: Fri, 13 Oct 2023 15:11:11 +0200 Subject: [PATCH 217/435] babeltrace: Add 1.5.11 for linux-perf --- var/spack/repos/builtin/packages/babeltrace/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/babeltrace/package.py b/var/spack/repos/builtin/packages/babeltrace/package.py index 3677c2b4292b77..ed9c380328d639 100644 --- a/var/spack/repos/builtin/packages/babeltrace/package.py +++ b/var/spack/repos/builtin/packages/babeltrace/package.py @@ -16,6 +16,7 @@ class Babeltrace(AutotoolsPackage): license("MIT") + version("1.5.11", sha256="67b43aaaef5c951fa7af1a557cf7201a11fe89876b7c22ba0a03cbc316db5a9c") version("1.2.4", sha256="666e3a1ad2dc7d5703059963056e7800f0eab59c8eeb6be2efe4f3acc5209eb1") depends_on("c", type="build") # generated From 652de07d8c5569b0be59206c8ee9a3866a6e8705 Mon Sep 17 00:00:00 2001 From: Jordan GALBY Date: Mon, 16 Oct 2023 15:42:12 +0200 Subject: [PATCH 218/435] babeltrace: Fix build minimal OS: missing pkgconfig --- var/spack/repos/builtin/packages/babeltrace/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/babeltrace/package.py b/var/spack/repos/builtin/packages/babeltrace/package.py index ed9c380328d639..59e565b5451990 100644 --- a/var/spack/repos/builtin/packages/babeltrace/package.py +++ b/var/spack/repos/builtin/packages/babeltrace/package.py @@ -21,6 +21,7 @@ class Babeltrace(AutotoolsPackage): depends_on("c", type="build") # generated + depends_on("pkgconfig", type="build") depends_on("glib@2.22:", type=("build", "link")) depends_on("uuid") depends_on("popt") From 5f3f968a1f523e77610370e81893488eccd7b60c Mon Sep 17 00:00:00 2001 From: Jordan GALBY Date: Thu, 26 Oct 2023 12:06:40 +0200 Subject: [PATCH 219/435] xmlto: Fix missing flex build dep Fixes error: ```txt 3 errors found in build log: 61 ==> xmlto: Executing phase: 'build' 62 ==> [2023-10-26-09:48:35.425903] 'make' '-j16' 'V=1' 63 make all-am 64 make[1]: Entering directory '/tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src' 65 /bin/sh ./ylwrap xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/sh /tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src/missing flex 66 /tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src/missing: line 81: flex: command not found >> 67 WARNING: 'flex' is missing on your system. 68 You should only need it if you modified a '.l' file. 69 You may want to install the Fast Lexical Analyzer package: 70 >> 71 make[1]: *** [Makefile:757: xmlif/xmlif.c] Error 127 72 make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src' >> 73 make: *** [Makefile:584: all] Error 2 ``` --- var/spack/repos/builtin/packages/xmlto/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/xmlto/package.py b/var/spack/repos/builtin/packages/xmlto/package.py index dec27de960b72d..ea16a58550beea 100644 --- a/var/spack/repos/builtin/packages/xmlto/package.py +++ b/var/spack/repos/builtin/packages/xmlto/package.py @@ -22,6 +22,7 @@ class Xmlto(AutotoolsPackage): depends_on("c", type="build") # generated # FIXME: missing a lot of dependencies + depends_on("flex", type=("build")) depends_on("docbook-xsl", type=("build", "run")) depends_on("libxml2", type=("build", "run")) # xmllint depends_on("libxslt", type=("build", "run")) # xsltconf From 3ae3bfd997f4113b897ad997d33849ccee7ebc5f Mon Sep 17 00:00:00 2001 From: Jordan GALBY Date: Thu, 26 Oct 2023 12:11:42 +0200 Subject: [PATCH 220/435] audit-userspace: Add 3.1.2 Fixes build errors on almalinux 8 gcc 8.5.0: ```txt 1352 audit_wrap.c: In function '_wrap_audit_rule_data_buf_set': >> 1353 audit_wrap.c:5010:17: error: cast specifies array type 1354 arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); 1355 ^ >> 1356 audit_wrap.c:5010:15: error: invalid use of flexible array member 1357 arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); 1358 ^ >> 1359 audit_wrap.c:5012:15: error: invalid use of flexible array member 1360 arg1->buf = 0; 1361 ^ ``` --- var/spack/repos/builtin/packages/audit-userspace/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/audit-userspace/package.py b/var/spack/repos/builtin/packages/audit-userspace/package.py index 1c719a9753990a..69bec21a2f4448 100644 --- a/var/spack/repos/builtin/packages/audit-userspace/package.py +++ b/var/spack/repos/builtin/packages/audit-userspace/package.py @@ -15,6 +15,7 @@ class AuditUserspace(AutotoolsPackage): license("LGPL-2.1-or-later") version("4.0.1", sha256="f964610dc0c1e68075d5ae4b14d6280d1164b6eca3a4a13721d1a711681403d9") + version("3.1.2", sha256="4516dbfd1bea0eea10a30f907e50f17087673a536ec6322a2a568dff4ebe50f4") version("3.1.1", sha256="6a97cc472920639d736e9927353be05e323f351067fcf6e5d34439cafa0e9006") version("2.8.5", sha256="835ffdd65056ba0c26509dbf48882713b00dbe70e1d8cf25d538501136c2e3e9") version("2.8.4", sha256="089dfdceb38edf056202a6de4892fd0c9aaa964c08bd7806c5d0c7c33f09e18d") From a2794f04bccfd93bb145f4cbbceb927527dd428e Mon Sep 17 00:00:00 2001 From: Jordan Galby Date: Tue, 23 Jul 2024 11:33:50 +0200 Subject: [PATCH 221/435] audit-userspace: Backport patch to fix build error Fix build error: ``` 1711 ../../../py-compile: line 125: test: found: integer expression expected 1712 ../../../py-compile: line 137: python: command not found >> 1713 make[4]: *** [Makefile:521: install-pyexecPYTHON] Error 127 ``` --- var/spack/repos/builtin/packages/audit-userspace/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/audit-userspace/package.py b/var/spack/repos/builtin/packages/audit-userspace/package.py index 69bec21a2f4448..105c692ecad1b0 100644 --- a/var/spack/repos/builtin/packages/audit-userspace/package.py +++ b/var/spack/repos/builtin/packages/audit-userspace/package.py @@ -30,3 +30,9 @@ class AuditUserspace(AutotoolsPackage): depends_on("m4", type="build") depends_on("openldap") depends_on("swig") + + patch( + "https://github.com/linux-audit/audit-userspace/commit/28a74a445d54932e1450b60d6148912344615b44.patch?full_index=1", + sha256="63d4644c7037be21bcafa913f4c96fbaa37f388c170cf0344869a0dc2449fd65", + when="@4.0.1", + ) From 6007a77a33156d50999dcfa4d79dce912adf8871 Mon Sep 17 00:00:00 2001 From: Jordan Galby Date: Tue, 23 Jul 2024 08:44:49 +0200 Subject: [PATCH 222/435] Add linux-perf --- .../builtin/packages/linux-perf/package.py | 265 ++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 var/spack/repos/builtin/packages/linux-perf/package.py diff --git a/var/spack/repos/builtin/packages/linux-perf/package.py b/var/spack/repos/builtin/packages/linux-perf/package.py new file mode 100644 index 00000000000000..afd94f988de24d --- /dev/null +++ b/var/spack/repos/builtin/packages/linux-perf/package.py @@ -0,0 +1,265 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os.path +import re +from textwrap import dedent + +import llnl.util.tty as tty + +from spack.package import * + + +class LinuxPerf(Package): + """The Linux perf tool.""" + + homepage = "https://www.kernel.org/" + url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.5.tar.xz" + + executables = ["^perf$"] + + maintainers("Jordan474") + + version("6.9.10", sha256="efd12e335fa67d13a3eae30e4b7b7546e74b8ccc90682e4c3fffab0b22654da1") + version("6.6.41", sha256="9ec99c578158ab85d99b37791a76643d2ea4c3f72ecbef7b5eb6d60f3de032ef") + version("5.15.163", sha256="025fc7d8b1560cf456ccae50591fe1ca21c990645df9791aed25820fe78db302") + + variant("libtraceevent", default=True, description="recommended dependency") + variant("python", default=True, description="Python support") + variant("perl", default=True, description="perl script extension") + variant("slang", default=True, description="TUI support") + variant("libpfm4", default=True, description="libpfm4 events extension") + variant("babeltrace", default=True, description="libbabeltrace support for CTF data format") + variant("libcap", default=True, description="process capabilities considered by perf") + variant("numactl", default=True, description="numa perf benchmark") + variant( + "libaudit", + default=False, + description=( + "get perf-trace syscall table from libaudit at runtime," + " rather than unistd.h at buildtime" + ), + ) + variant("debuginfod", default=False, description="support debuginfod") + variant( + "zstd", + default=True, + description="Zstandard based runtime trace compression in record mode", + ) + variant("xz", default=True, description="xz kernel module decompression") + variant( + "openssl", + default=True, + description="support generating build-ids for ELFs generated by jitdump", + ) + variant("jvmti", default=False, description="build jvmti agent") + + depends_on("gmake", type="build") + depends_on("pkgconfig", type="build") + depends_on("flex", type="build") + depends_on("bison", type="build") + + depends_on("elfutils") + depends_on("elfutils +debuginfod", when="+debuginfod") + depends_on("libunwind components=ptrace") + depends_on("libiberty") + depends_on("binutils", type=("build", "link", "run")) + depends_on("zlib-api") + + depends_on("libtraceevent", when="+libtraceevent") + + # jevents requires python >= 3.6 + depends_on("python@3.6:", type=("build", "link", "run"), when="+python") + depends_on("py-setuptools", type="build", when="+python") + depends_on("perl", when="+perl") + depends_on("slang", when="+slang") + depends_on("libpfm4", when="+libpfm4") + depends_on("babeltrace@1.5:", when="+babeltrace") + depends_on("libcap", when="+libcap") + depends_on("audit-userspace", when="+libaudit") + depends_on("numactl", when="+numactl") + depends_on("zstd", when="+zstd") + depends_on("xz", when="+xz") + depends_on("openssl", when="+openssl") + depends_on("openssl@1.1:", when="@5.19: +openssl") + depends_on("java", when="+jvmti") + + depends_on("asciidoc", type="build") + depends_on("xmlto", type="build") + + conflicts( + "~libtraceevent", + when="@6.2:", + msg="linux 6.2 removed internal libtraceevent, and it's highly recommended", + ) + + def url_for_version(self, version): + return f"https://cdn.kernel.org/pub/linux/kernel/v{version[0]}.x/linux-{version}.tar.xz" + + def setup_build_environment(self, env): + # This variable is used in the Makefile. If it is defined on the + # system, it can break the build if there is no build recipe for + # that specific ARCH + env.unset("ARCH") + + @property + def archive_files(self): + return [join_path(self.stage.source_path, "tools/perf/FEATURE-DUMP")] + + def install(self, spec, prefix): + # TODO: + # - GTK2= + # - NO_LIBBPF=1 ? + # - d3 flamegraph resources (libexec/perf-core/scripts/python/flamegraph.py) + + version = self.spec.version + + args = [ + "LIBDW_DIR={}".format(spec["elfutils"].prefix), + "LIBUNWIND_DIR={}".format(spec["libunwind"].prefix), + "NO_SHELLCHECK=1", + ] + # Features to check post-install against `perf version --build-options` + checks = {"dwarf", "libunwind", "libbfd", "zlib"} + + if version >= Version("6.4"): + args.append("BUILD_NONDISTRO=1") + + if "+libaudit" in spec: + checks.add("libaudit") + args.append("NO_SYSCALL_TABLE=1") # will look for libaudit + else: + checks.add("syscall_table") + args.append("NO_LIBAUDIT=1") + + if "+debuginfod" in spec: + if version >= Version("5.19"): # Not in --build-options before that + checks.add("debuginfod") + else: + args.append("NO_LIBDEBUGINFOD=1") + + if "+python" in spec: + checks.add("libpython") + args.extend( + [ + "PYTHON={}".format(spec["python"].command), + "PYTHON_CONFIG={}".format(spec["python"].prefix.bin.join("python-config")), + ] + ) + else: + args.append("NO_LIBPYTHON=1") + + if "+perl" in spec: + checks.add("libperl") + else: + args.append("NO_LIBPERL=1") + + if "+openssl" in spec: + checks.add("libcrypto") + else: + args.append("NO_LIBCRYPTO=1") + + if "+slang" in spec: + checks.add("libslang") + else: + args.append("NO_SLANG=1") + + if "+libpfm4" in spec: + checks.add("libpfm4") + if version < Version("6.4"): + args.append("LIBPFM4=1") + else: + if version >= Version("6.4"): + args.append("NO_LIBPFM4=1") + + if "+babeltrace" in spec: + # checks.add("babeltrace") # Not in --build-options ? + args.append("LIBBABELTRACE_DIR={}".format(spec["babeltrace"].prefix)) + else: + args.append("NO_LIBBABELTRACE=1") + + if "+libcap" in spec: + # checks.add("libcap") # Not in --build-options ? + pass + else: + args.append("NO_LIBCAP=1") + + if "+numactl" in spec: + checks.add("libnuma") + else: + args.append("NO_LIBNUMA=1") + + if "+xz" in spec: + checks.add("lzma") + else: + args.append("NO_LZMA=1") + + if "+zstd" in spec: + checks.add("zstd") + args.append("LIBZSTD_DIR={}".format(spec["zstd"].prefix)) + else: + args.append("NO_LIBZSTD=1") + + if "+libtraceevent" in spec: + if version >= Version("6.2"): # Not in --build-options before that + checks.add("libtraceevent") + if version >= Version("6.10"): + args.append("LIBTRACEEVENT_DIR={}".format(spec["libtraceevent"].prefix)) + if version < Version("6.2"): + args.append("LIBTRACEEVENT_DYNAMIC=1") + else: + if version >= Version("6.2"): + args.append("NO_LIBTRACEEVENT=1") + + if "+jvmti" in spec: + # checks.add("jvmti") # Not in --build-options ? + args.append("JDIR={}".format(spec["java"].prefix)) + else: + args.append("NO_JVMTI=1") + + with working_dir("tools/perf"): + make( + "V=1", + f"JOBS={make_jobs}", + f"prefix={prefix}", + "DESTDIR=", + *args, + "all", + "install", + parallel=False, + ) + + # Create a perfconfig with binutils paths + perfconfig = str(prefix.join("etc/perfconfig")) + assert not os.path.exists(perfconfig) + mkdirp(os.path.dirname(perfconfig)) + with open(perfconfig, "w") as f: + f.write( + dedent( + """\ + [annotate] + addr2line = {addr2line} + objdump = {objdump} + """ + ).format( + addr2line=spec["binutils"].prefix.bin.join("addr2line"), + objdump=spec["binutils"].prefix.bin.join("objdump"), + ) + ) + + # Post-install dependency check: + # $ perf version --build-options + # perf version 6.5.7 + # dwarf: [ on ] # HAVE_DWARF_SUPPORT + # ... + perf = Executable(self.prefix.bin.perf) + output = perf("version", "--build-options", output=str, error=str) + tty.msg(output) # keep a trace in build log + enabled = set(re.findall(r"^\s*(\S+)\s*:\s*\[\s*on\s*\]", output, re.MULTILINE)) + missing = set(checks) - enabled + tty.msg(f"detected features: {sorted(enabled)!r}") + tty.msg(f"expected features: {sorted(checks)!r}") + if missing: + raise InstallError(f"Perf is missing features {sorted(missing)!r}, see log") From 831b4a3e4a9d3f7299a04a16817b0b3fdb4c61d8 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Wed, 7 Aug 2024 12:00:00 +0200 Subject: [PATCH 223/435] linux-perf: If clang is in PATH, pass "CLANG=" + shutil.which("clang") When clang is installed I get `clang: Permission denied`. Setting CLANG to the full path of clang fixes this. Signed-off-by: Bernhard Kaindl --- var/spack/repos/builtin/packages/linux-perf/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/linux-perf/package.py b/var/spack/repos/builtin/packages/linux-perf/package.py index afd94f988de24d..ddbd08224fdf73 100644 --- a/var/spack/repos/builtin/packages/linux-perf/package.py +++ b/var/spack/repos/builtin/packages/linux-perf/package.py @@ -5,6 +5,7 @@ import os.path import re +import shutil from textwrap import dedent import llnl.util.tty as tty @@ -56,6 +57,7 @@ class LinuxPerf(Package): ) variant("jvmti", default=False, description="build jvmti agent") + depends_on("c", type="build") depends_on("gmake", type="build") depends_on("pkgconfig", type="build") depends_on("flex", type="build") @@ -121,6 +123,12 @@ def install(self, spec, prefix): "LIBUNWIND_DIR={}".format(spec["libunwind"].prefix), "NO_SHELLCHECK=1", ] + + # Setup clang if found in the system's or env's PATH: + clang = shutil.which("clang") + if clang: + args.append("CLANG=" + clang) + # Features to check post-install against `perf version --build-options` checks = {"dwarf", "libunwind", "libbfd", "zlib"} From ef461befcc827867b64f6fac8193b5e750410fd2 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Wed, 7 Aug 2024 12:00:00 +0200 Subject: [PATCH 224/435] linux-perf: Add capstone variant to build with capstone disassembler --- var/spack/repos/builtin/packages/linux-perf/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/linux-perf/package.py b/var/spack/repos/builtin/packages/linux-perf/package.py index ddbd08224fdf73..a9cba0e7c66b82 100644 --- a/var/spack/repos/builtin/packages/linux-perf/package.py +++ b/var/spack/repos/builtin/packages/linux-perf/package.py @@ -44,6 +44,7 @@ class LinuxPerf(Package): ), ) variant("debuginfod", default=False, description="support debuginfod") + variant("capstone", default=True, description="capstone disassembler") variant( "zstd", default=True, @@ -77,6 +78,7 @@ class LinuxPerf(Package): depends_on("py-setuptools", type="build", when="+python") depends_on("perl", when="+perl") depends_on("slang", when="+slang") + depends_on("capstone", when="+capstone") depends_on("libpfm4", when="+libpfm4") depends_on("babeltrace@1.5:", when="+babeltrace") depends_on("libcap", when="+libcap") From 5400b1e22235d6c309866f2be8816ecd4208654e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 7 Aug 2024 13:34:58 +0200 Subject: [PATCH 225/435] py-lightly: add v1.5.11 (#45610) --- .../builtin/packages/py-lightly/package.py | 82 ++++++++++++------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-lightly/package.py b/var/spack/repos/builtin/packages/py-lightly/package.py index 5a34d6cfa6b4d5..81fe84015f07ca 100644 --- a/var/spack/repos/builtin/packages/py-lightly/package.py +++ b/var/spack/repos/builtin/packages/py-lightly/package.py @@ -17,6 +17,7 @@ class PyLightly(PythonPackage): license("MIT") + version("1.5.11", sha256="2c19c0e5841b7477323ef3ffca234a60a57c0aaf6753a55c2a75d72cde9c0719") version("1.5.0", sha256="db49e2bafe3bc70df7f3248ad08bef4948e957c1bc5cde3769ec2b190b51eedb") version("1.4.26", sha256="7bbcf0a358f23659eb4089043c559c4584ef339266b1c0a9a2598c3100f2f3b8") version("1.4.25", sha256="c16449ee5788a7ac98dd78c1fa32702a426c718519d79522d726469d6ca119a0") @@ -34,41 +35,60 @@ class PyLightly(PythonPackage): version("1.4.7", sha256="dce719996d9b01b2a3c652e9cbab3ff80d078c4ed86d1adb39220d20e1f3fdf2") version("1.4.6", sha256="1c8b904a96fadaefbaa00296eea0ac1e8b50cb10e94595c74b0abada5f4f5a64") version("1.4.5", sha256="67b1de64950ff5bc35ef86fec3049f437ed1c9cb4a191c43b52384460207535f") - version("1.4.4", sha256="e726120437ee61754da8e1c384d2ed27d9a7004e037c74d98e3debbc98cbd4a4") - version("1.4.3", sha256="ff2cfded234bc5338519bdb2de774c59a55200159f4429b009b7a3923bc0be0e") - version("1.4.2", sha256="bae451fcd04fbd3cc14b044a2583ae24591533d4a8a6ff51e5f1477f9a077648") - version("1.4.1", sha256="4c64657639c66ee5c8b4b8d300fc9b5287dc7e14a260f3a2e04917dca7f57f5b") + version( + "1.4.4", + sha256="e726120437ee61754da8e1c384d2ed27d9a7004e037c74d98e3debbc98cbd4a4", + deprecated=True, + ) + version( + "1.4.3", + sha256="ff2cfded234bc5338519bdb2de774c59a55200159f4429b009b7a3923bc0be0e", + deprecated=True, + ) + version( + "1.4.2", + sha256="bae451fcd04fbd3cc14b044a2583ae24591533d4a8a6ff51e5f1477f9a077648", + deprecated=True, + ) + version( + "1.4.1", + sha256="4c64657639c66ee5c8b4b8d300fc9b5287dc7e14a260f3a2e04917dca7f57f5b", + deprecated=True, + ) - # setup.py - depends_on("py-setuptools@21:", when="@1.4.2:", type="build") - depends_on("py-setuptools@21:", when="@1.4.8,1.4.15:1.4.25", type=("build", "run")) - depends_on("py-setuptools@21:65.5.1", when="@:1.4.1", type=("build", "run")) + with default_args(type="build"): + depends_on("py-setuptools@21:", when="@1.4.2:") + depends_on("py-setuptools-scm", when="@1.5.11:") - # requirements/base.txt - depends_on("py-certifi@14.05.14:", type=("build", "run")) - depends_on("py-hydra-core@1:", type=("build", "run")) - depends_on("py-lightly-utils@0.0", type=("build", "run")) - depends_on("py-numpy@1.18.1:", type=("build", "run")) - # https://github.com/lightly-ai/lightly/issues/1558 - depends_on("py-numpy@:1", type=("build", "run")) - depends_on("py-python-dateutil@2.5.3:", type=("build", "run")) - depends_on("py-requests@2.23:", type=("build", "run")) - depends_on("py-six@1.10:", type=("build", "run")) - depends_on("py-tqdm@4.44:", type=("build", "run")) - depends_on("py-urllib3@1.25.3:", when="@1.4.8:", type=("build", "run")) - depends_on("py-urllib3@1.15.1:", type=("build", "run")) - depends_on("py-pydantic@1.10.5:1", when="@1.4.8:", type=("build", "run")) - depends_on("py-aenum@3.1.11:", when="@1.4.8:", type=("build", "run")) + with default_args(type=("build", "run")): + depends_on("py-certifi@14.05.14:") + depends_on("py-hydra-core@1:") + depends_on("py-lightly-utils@0.0") + depends_on("py-numpy@1.18.1:") + depends_on("py-python-dateutil@2.5.3:") + depends_on("py-requests@2.23:") + depends_on("py-six@1.10:") + depends_on("py-tqdm@4.44:") + depends_on("py-torch") + depends_on("py-torch@:1", when="@:1.4.1") + depends_on("py-torchvision") + depends_on("py-pytorch-lightning@1.0.4:") + depends_on("py-pytorch-lightning@1.0.4:1", when="@:1.4.1") + depends_on("py-urllib3@1.25.3:", when="@1.4.8:") + depends_on("py-urllib3@1.15.1:") + depends_on("py-pydantic@1.10.5:", when="@1.5.11:") + depends_on("py-pydantic@1.10.5:1", when="@1.4.8:1.5.0") + depends_on("py-aenum@3.1.11:", when="@1.4.8:") - # requirements/torch.txt - depends_on("py-torch", type=("build", "run")) - depends_on("py-torch@:1", when="@:1.4.1", type=("build", "run")) - depends_on("py-torchvision", type=("build", "run")) - depends_on("py-pytorch-lightning@1.0.4:", type=("build", "run")) - depends_on("py-pytorch-lightning@1.0.4:1", when="@:1.4.1", type=("build", "run")) + # Historical dependencies + depends_on("py-setuptools@21:", when="@1.4.8,1.4.15:1.4.25") + depends_on("py-setuptools@21:65.5.1", when="@:1.4.1") - # https://github.com/lightly-ai/lightly/issues/1153 - depends_on("py-torch+distributed", when="@:1.4.4", type=("build", "run")) + # https://github.com/lightly-ai/lightly/issues/1558 + depends_on("py-numpy@:1", when="@:1.5.10") + + # https://github.com/lightly-ai/lightly/issues/1153 + depends_on("py-torch+distributed", when="@:1.4.4") # https://github.com/microsoft/torchgeo/issues/1824 conflicts("py-timm@:0.9.8", when="@1.4.26") From 0a735c6ea61074b5426ae8aa592fa3355434fe85 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 7 Aug 2024 13:36:33 +0200 Subject: [PATCH 226/435] py-lightning: add v2.4.0 (#45611) --- .../packages/py-lightning-utilities/package.py | 7 +++---- .../repos/builtin/packages/py-lightning/package.py | 13 ++++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-lightning-utilities/package.py b/var/spack/repos/builtin/packages/py-lightning-utilities/package.py index f93c80f2eca55d..36502f236cdc52 100644 --- a/var/spack/repos/builtin/packages/py-lightning-utilities/package.py +++ b/var/spack/repos/builtin/packages/py-lightning-utilities/package.py @@ -16,6 +16,7 @@ class PyLightningUtilities(PythonPackage): license("Apache-2.0") + version("0.11.2", sha256="adf4cf9c5d912fe505db4729e51d1369c6927f3a8ac55a9dff895ce5c0da08d9") version("0.8.0", sha256="8e5d95c7c57f026cdfed7c154303e88c93a7a5e868c9944cb02cf71f1db29720") version( "0.6.0.post0", sha256="6f02cfe59e6576487e709a0e66e07671563bde9e21b40e1c567918e4d753278c" @@ -26,13 +27,11 @@ class PyLightningUtilities(PythonPackage): version("0.4.0", sha256="961c29774c2c8303e0a2f6e6512a2e21e1d8acaf6df182865667af4a51bc176c") version("0.3.0", sha256="d769ab9b76ebdee3243d1051d509aafee57d7947734ddc22977deef8a6427f2f") - # setup.py - depends_on("py-setuptools", type=("build", "run")) - - # requirements/base.txt + # requirements/core.txt depends_on("py-importlib-metadata@4:", when="@0.4.1: ^python@:3.7", type=("build", "run")) depends_on("py-packaging@17.1:", when="@0.6.0.post0:", type=("build", "run")) depends_on("py-packaging@20:", when="@0.5:0.6.0.a", type=("build", "run")) + depends_on("py-setuptools", type=("build", "run")) depends_on("py-typing-extensions", when="@0.5:", type=("build", "run")) # Historical dependencies diff --git a/var/spack/repos/builtin/packages/py-lightning/package.py b/var/spack/repos/builtin/packages/py-lightning/package.py index 791ab781b6b06f..f48326981fb32c 100644 --- a/var/spack/repos/builtin/packages/py-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-lightning/package.py @@ -17,6 +17,10 @@ class PyLightning(PythonPackage): license("Apache-2.0") + version("2.4.0", sha256="9156604cc56e4b2b603f34fa7f0fe5107375c8e6d85e74544b319a15faa9ed0e") + version("2.3.3", sha256="7f454711895c1c6e455766f01fa39522e25e5ab54c15c5e5fbad342fa92bc93c") + version("2.3.2", sha256="6d02862e7e8c9e6903c06314296d0950e677f7e67ad615c3262fe7c73d95f4b8") + version("2.3.1", sha256="29cf87270a1779984d3614f7f748af57e3695396a25e814119840894505c334c") version("2.3.0", sha256="4bb4d6e3650d2d5f544ad60853a22efc4e164aa71b9596d13f0454b29df05130") version("2.2.5", sha256="a6c31a2052fc30fee34aec7e31ea2a117a005d049c3593fc9cfb867a34f962bf") version("2.2.4", sha256="4cc3fb3edf04fcd63c0ecf75087d2fa06163759fc8c1fc500b16404ac1854f77") @@ -49,6 +53,7 @@ class PyLightning(PythonPackage): with default_args(type=("build", "run")): # src/lightning/__setup__.py + depends_on("python@3.9:", when="@2.4:") depends_on("python@3.8:", when="@2:") # src/lightning.egg-info/requires.txt @@ -58,13 +63,14 @@ class PyLightning(PythonPackage): depends_on("py-fsspec@2021.6.1:2024+http", when="@2.1.0:2.1.2") depends_on("py-fsspec@2022.5:2024+http", when="@2.0.5:2.0") depends_on("py-fsspec@2022.5:2023+http", when="@:2.0.4") - depends_on("py-lightning-utilities@0.8:1", when="@2.1:") + depends_on("py-lightning-utilities@0.10:1", when="@2.4:") + depends_on("py-lightning-utilities@0.8:1", when="@2.1:2.3") depends_on("py-lightning-utilities@0.7:1", when="@2.0") depends_on("py-lightning-utilities@0.6.0.post0:1", when="@:1") - depends_on("py-numpy@1.17.2:2") depends_on("py-packaging@20:24", when="@2.1:") depends_on("py-packaging@17.1:24", when="@:2.0") - depends_on("py-torch@2:3", when="@2.3:") + depends_on("py-torch@2.1:3", when="@2.4:") + depends_on("py-torch@2:3", when="@2.3") depends_on("py-torch@1.13:3", when="@2.2:") depends_on("py-torch@1.12:3", when="@2.1") depends_on("py-torch@1.11:3", when="@2.0") @@ -81,6 +87,7 @@ class PyLightning(PythonPackage): # Historical requirements # https://github.com/Lightning-AI/pytorch-lightning/pull/20081 depends_on("py-setuptools", when="@:2.3") + depends_on("py-numpy@1.17.2:2", when="@:2.3") with when("@:2.0"): depends_on("py-jinja2@:4") From 1cce947be67d1e1f0a5e9b21eb97259e67e10c79 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 7 Aug 2024 13:38:33 +0200 Subject: [PATCH 227/435] py-torchgeo: incompatible with lightning 2.3 (#45612) --- var/spack/repos/builtin/packages/py-torchgeo/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torchgeo/package.py b/var/spack/repos/builtin/packages/py-torchgeo/package.py index 9ebee2bdde5ae0..40912643142060 100644 --- a/var/spack/repos/builtin/packages/py-torchgeo/package.py +++ b/var/spack/repos/builtin/packages/py-torchgeo/package.py @@ -169,3 +169,6 @@ class PyTorchgeo(PythonPackage): depends_on("py-pandas@0.19.1:2.0", when="@0.2+datasets", type="run") depends_on("py-omegaconf@2.1:", when="@0.4.1+tests", type="run") depends_on("py-tensorboard@2.9.1:", when="@0.4.1+tests", type="run") + + # https://github.com/Lightning-AI/pytorch-lightning/issues/19977 + conflicts("py-lightning@2.3") From 55cbdd435ca6c6e268307d42fcb03ca1e57be669 Mon Sep 17 00:00:00 2001 From: Christopher Christofi <77968333+ChristopherChristofi@users.noreply.github.com> Date: Wed, 7 Aug 2024 13:16:01 +0100 Subject: [PATCH 228/435] py-chex: add v0.1.86 (#45476) --- .../repos/builtin/packages/py-chex/package.py | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-chex/package.py b/var/spack/repos/builtin/packages/py-chex/package.py index b2dcfa5ee9620a..feef3a4a224aa3 100644 --- a/var/spack/repos/builtin/packages/py-chex/package.py +++ b/var/spack/repos/builtin/packages/py-chex/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack.package import * @@ -13,26 +12,32 @@ class PyChex(PythonPackage): homepage = "https://github.com/deepmind/chex" pypi = "chex/chex-0.1.0.tar.gz" + maintainers("ChristopherChristofi") + license("Apache-2.0") + version("0.1.86", sha256="e8b0f96330eba4144659e1617c0f7a57b161e8cbb021e55c6d5056c7378091d1") version("0.1.85", sha256="a27cfe87119d6e1fe24ccc1438a59195e6dc1d6e0e10099fcf618c3f64771faf") version("0.1.5", sha256="686858320f8f220c82a6c7eeb54dcdcaa4f3d7f66690dacd13a24baa1ee8299e") version("0.1.0", sha256="9e032058f5fed2fc1d5e9bf8e12ece5910cf6a478c12d402b6d30984695f2161") - depends_on("python@3.9:", type=("build", "run"), when="@0.1.85:") - depends_on("py-setuptools", type="build") - depends_on("py-absl-py@0.9.0:", type=("build", "run")) - depends_on("py-typing-extensions@4.2:", type=("build", "run"), when="@0.1.85:") - depends_on("py-jax@0.4.16:", type=("build", "run"), when="@0.1.85:") - depends_on("py-jax@0.1.55:", type=("build", "run")) - depends_on("py-jaxlib@0.1.37:", type=("build", "run")) - depends_on("py-numpy@1.24.1:", type=("build", "run"), when="@0.1.85:") - depends_on("py-numpy@1.18.0:", type=("build", "run")) - depends_on("py-setuptools", type=("build", "run"), when="@0.1.85: ^python@3.12:") - depends_on("py-toolz@0.9.0:", type=("build", "run")) - - # Historical dependencies - depends_on("py-dm-tree@0.1.5:", type=("build", "run"), when="@:0.1.5") - # AttributeError: module 'jax.interpreters.pxla' has no attribute 'ShardedDeviceArray' conflicts("^py-jax@0.4.14:", when="@:0.1.5") + + depends_on("py-setuptools", type="build") + + with default_args(type=("build", "run")): + depends_on("python@3.9:", when="@0.1.85:") + depends_on("py-absl-py@0.9:") + depends_on("py-dataclasses@0.7:", when="@:0.1.5 ^python@3.6") + depends_on("py-jax@0.4.16:", when="@0.1.85:") + depends_on("py-jax@0.1.55:") + depends_on("py-jaxlib@0.1.37:") + depends_on("py-numpy@1.24.1:", when="@0.1.85:") + depends_on("py-numpy@1.18.0:") + depends_on("py-setuptools", when="@0.1.85: ^python@3.12:") + depends_on("py-toolz@0.9:") + depends_on("py-typing-extensions@4.2:", when="@0.1.85:") + + # Historical dependencies + depends_on("py-dm-tree@0.1.5:", when="@:0.1.5") From f1ea979e2b3e621aedfd492b6c485598a604536b Mon Sep 17 00:00:00 2001 From: Jeremy Guillette <3651377+jaguillette@users.noreply.github.com> Date: Wed, 7 Aug 2024 08:35:30 -0400 Subject: [PATCH 229/435] py-gevent: @:23.9.0 conflicts with py-cython@3.0.10 (#45257) (#45295) Co-authored-by: Wouter Deconinck --- var/spack/repos/builtin/packages/py-gevent/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-gevent/package.py b/var/spack/repos/builtin/packages/py-gevent/package.py index fb42471f8a108a..fdcdad0f8d2712 100644 --- a/var/spack/repos/builtin/packages/py-gevent/package.py +++ b/var/spack/repos/builtin/packages/py-gevent/package.py @@ -41,6 +41,12 @@ class PyGevent(PythonPackage): # https://github.com/gevent/gevent/issues/1599 conflicts("^py-cython@3:", when="@:20.5.0") + # https://github.com/gevent/gevent/issues/2031 + conflicts( + "^py-cython@3.0.10", + when="@:23.9.0", + msg="py-gevent fails to build when using cython@3.0.10", + ) # Deprecated compiler options. upstream PR: https://github.com/gevent/gevent/pull/1896 patch("icc.patch", when="@:21.12.0 %intel") From 34c98101ad4f954395c1a364fbdadc8a48410fa9 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 7 Aug 2024 07:51:52 -0500 Subject: [PATCH 230/435] xorg-server and xorg pkgs: Fix the build and mark protocols as build deps (#45536) --- .../repos/builtin/packages/appres/package.py | 6 +- .../builtin/packages/bdftopcf/package.py | 16 ++-- .../repos/builtin/packages/bitmap/package.py | 6 +- .../builtin/packages/fonttosfnt/package.py | 6 +- .../builtin/packages/fslsfonts/package.py | 6 +- .../repos/builtin/packages/fstobdf/package.py | 6 +- .../repos/builtin/packages/iceauth/package.py | 6 +- .../repos/builtin/packages/ico/package.py | 6 +- .../repos/builtin/packages/imake/package.py | 7 +- .../builtin/packages/lbxproxy/package.py | 8 +- .../builtin/packages/libapplewm/package.py | 13 ++- .../repos/builtin/packages/libdmx/package.py | 8 +- .../builtin/packages/libfontenc/package.py | 6 +- .../repos/builtin/packages/libfs/package.py | 10 ++- .../repos/builtin/packages/libice/package.py | 6 +- .../builtin/packages/liblbxutil/package.py | 8 +- .../repos/builtin/packages/libsm/package.py | 8 +- .../builtin/packages/libwindowswm/package.py | 8 +- .../repos/builtin/packages/libx11/package.py | 12 +-- .../repos/builtin/packages/libxau/package.py | 4 +- .../repos/builtin/packages/libxaw/package.py | 6 +- .../builtin/packages/libxaw3d/package.py | 4 +- .../builtin/packages/libxcomposite/package.py | 8 +- .../builtin/packages/libxcursor/package.py | 4 +- .../builtin/packages/libxdamage/package.py | 8 +- .../builtin/packages/libxdmcp/package.py | 4 +- .../builtin/packages/libxevie/package.py | 6 +- .../repos/builtin/packages/libxext/package.py | 6 +- .../builtin/packages/libxfixes/package.py | 10 +-- .../builtin/packages/libxfont/package.py | 6 +- .../builtin/packages/libxfont2/package.py | 6 +- .../builtin/packages/libxfontcache/package.py | 6 +- .../repos/builtin/packages/libxi/package.py | 12 +-- .../builtin/packages/libxinerama/package.py | 6 +- .../builtin/packages/libxkbfile/package.py | 4 +- .../repos/builtin/packages/libxmu/package.py | 4 +- .../repos/builtin/packages/libxp/package.py | 6 +- .../repos/builtin/packages/libxpm/package.py | 4 +- .../builtin/packages/libxpresent/package.py | 12 +-- .../packages/libxprintapputil/package.py | 4 +- .../builtin/packages/libxprintutil/package.py | 4 +- .../builtin/packages/libxrandr/package.py | 8 +- .../builtin/packages/libxrender/package.py | 4 +- .../repos/builtin/packages/libxres/package.py | 8 +- .../builtin/packages/libxscrnsaver/package.py | 6 +- .../builtin/packages/libxshmfence/package.py | 4 +- .../repos/builtin/packages/libxt/package.py | 6 +- .../builtin/packages/libxtrap/package.py | 6 +- .../repos/builtin/packages/libxtst/package.py | 10 +-- .../repos/builtin/packages/libxv/package.py | 6 +- .../repos/builtin/packages/libxvmc/package.py | 6 +- .../builtin/packages/libxxf86dga/package.py | 8 +- .../builtin/packages/libxxf86misc/package.py | 8 +- .../builtin/packages/libxxf86vm/package.py | 8 +- .../repos/builtin/packages/lndir/package.py | 6 +- .../builtin/packages/makedepend/package.py | 7 +- .../builtin/packages/mkfontscale/package.py | 6 +- .../builtin/packages/proxymngr/package.py | 9 +- .../builtin/packages/rendercheck/package.py | 6 +- .../repos/builtin/packages/rgb/package.py | 6 +- .../repos/builtin/packages/rstart/package.py | 6 +- .../repos/builtin/packages/sessreg/package.py | 6 +- .../builtin/packages/transset/package.py | 6 +- .../repos/builtin/packages/twm/package.py | 6 +- .../repos/builtin/packages/x11perf/package.py | 4 +- .../repos/builtin/packages/xauth/package.py | 4 +- .../repos/builtin/packages/xcalc/package.py | 4 +- .../builtin/packages/xclipboard/package.py | 4 +- .../repos/builtin/packages/xclock/package.py | 4 +- .../builtin/packages/xconsole/package.py | 4 +- .../builtin/packages/xdpyinfo/package.py | 10 +-- .../builtin/packages/xfindproxy/package.py | 6 +- .../repos/builtin/packages/xfsinfo/package.py | 4 +- .../repos/builtin/packages/xfwp/package.py | 6 +- .../repos/builtin/packages/xinput/package.py | 10 +-- .../builtin/packages/xkbutils/package.py | 6 +- .../packages/xkeyboard-config/package.py | 2 +- .../repos/builtin/packages/xkill/package.py | 4 +- .../repos/builtin/packages/xload/package.py | 4 +- .../builtin/packages/xlsfonts/package.py | 4 +- .../repos/builtin/packages/xman/package.py | 4 +- .../repos/builtin/packages/xmodmap/package.py | 4 +- .../builtin/packages/xorg-server/package.py | 90 +++++++++++++------ .../packages/xorg-server/sysmacros.patch | 24 +++++ .../repos/builtin/packages/xpr/package.py | 4 +- .../repos/builtin/packages/xprop/package.py | 4 +- .../repos/builtin/packages/xrandr/package.py | 6 +- .../repos/builtin/packages/xrdb/package.py | 4 +- .../builtin/packages/xrefresh/package.py | 4 +- .../repos/builtin/packages/xrx/package.py | 4 +- .../repos/builtin/packages/xscope/package.py | 4 +- .../repos/builtin/packages/xset/package.py | 4 +- .../builtin/packages/xsetpointer/package.py | 4 +- .../builtin/packages/xsetroot/package.py | 4 +- .../builtin/packages/xstdcmap/package.py | 4 +- .../repos/builtin/packages/xts/package.py | 13 +-- .../repos/builtin/packages/xvinfo/package.py | 4 +- .../repos/builtin/packages/xwd/package.py | 4 +- .../builtin/packages/xwininfo/package.py | 4 +- .../repos/builtin/packages/xwud/package.py | 4 +- 100 files changed, 392 insertions(+), 323 deletions(-) create mode 100644 var/spack/repos/builtin/packages/xorg-server/sysmacros.patch diff --git a/var/spack/repos/builtin/packages/appres/package.py b/var/spack/repos/builtin/packages/appres/package.py index 29fb85c0f4d5a4..45719d7662708a 100644 --- a/var/spack/repos/builtin/packages/appres/package.py +++ b/var/spack/repos/builtin/packages/appres/package.py @@ -12,17 +12,17 @@ class Appres(AutotoolsPackage, XorgPackage): names. It can be used to determine which resources a particular program will load.""" - homepage = "https://cgit.freedesktop.org/xorg/app/appres" + homepage = "https://gitlab.freedesktop.org/xorg/app/appres" xorg_mirror_path = "app/appres-1.0.4.tar.gz" version("1.0.6", sha256="848f383ff429612fb9df840d79e97dc193dc72dbbf53d3217a8d1e90a5aa1e26") version("1.0.4", sha256="22cb6f639c891ffdbb5371bc50a88278185789eae6907d05e9e0bd1086a80803") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxt") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/bdftopcf/package.py b/var/spack/repos/builtin/packages/bdftopcf/package.py index 30ee505a4dfaf2..36e731cd784cf4 100644 --- a/var/spack/repos/builtin/packages/bdftopcf/package.py +++ b/var/spack/repos/builtin/packages/bdftopcf/package.py @@ -14,19 +14,25 @@ class Bdftopcf(AutotoolsPackage, XorgPackage): appropriate machine, but the files are still portable (but read more slowly) on other machines.""" - homepage = "https://cgit.freedesktop.org/xorg/app/bdftopcf" - xorg_mirror_path = "app/bdftopcf-1.0.5.tar.gz" + homepage = "https://gitlab.freedesktop.org/xorg/util/bdftopcf" + xorg_mirror_path = "util/bdftopcf-1.0.5.tar.gz" license("MIT") + version("1.1.1", sha256="3291df9910c006a0345f3eac485e2a5734bbb79a0d97bf1f2b4cddad48fb1bc4") version("1.1", sha256="699d1a62012035b1461c7f8e3f05a51c8bd6f28f348983249fb89bbff7309b47") version("1.0.5", sha256="78a5ec945de1d33e6812167b1383554fda36e38576849e74a9039dc7364ff2c3") - depends_on("c", type="build") # generated + # note: url_for_version can only return a single url, no mirrors + @when("@:1.1.0") + def url_for_version(self, version): + return self.urls[0].replace("util", "app") + + depends_on("c", type="build") depends_on("libxfont") depends_on("pkgconfig", type="build") - depends_on("xproto") - depends_on("fontsproto") + depends_on("xproto", type="build") + depends_on("fontsproto", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/bitmap/package.py b/var/spack/repos/builtin/packages/bitmap/package.py index c99c8001647c39..5e704b4fdb2a50 100644 --- a/var/spack/repos/builtin/packages/bitmap/package.py +++ b/var/spack/repos/builtin/packages/bitmap/package.py @@ -9,14 +9,14 @@ class Bitmap(AutotoolsPackage, XorgPackage): """bitmap, bmtoa, atobm - X bitmap (XBM) editor and converter utilities.""" - homepage = "https://cgit.freedesktop.org/xorg/app/bitmap" + homepage = "https://gitlab.freedesktop.org/xorg/app/bitmap" xorg_mirror_path = "app/bitmap-1.0.8.tar.gz" version("1.1.1", sha256="86928020ece030435eb5ae795a5f22c5ca0886a6c589187886d1b6d14d9eec81") version("1.1.0", sha256="60ca941e8e38e1f8f9c61d3e86c098878113fd11eac4e07177c111f0bf00779e") version("1.0.8", sha256="1a2fbd10a2ca5cd93f7b77bbb0555b86d8b35e0fc18d036b1607c761755006fc") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxmu") @@ -25,6 +25,6 @@ class Bitmap(AutotoolsPackage, XorgPackage): depends_on("libxt") depends_on("xbitmaps") - depends_on("xproto@7.0.25:") + depends_on("xproto@7.0.25:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/fonttosfnt/package.py b/var/spack/repos/builtin/packages/fonttosfnt/package.py index f58227e1c003e5..730fa99631af10 100644 --- a/var/spack/repos/builtin/packages/fonttosfnt/package.py +++ b/var/spack/repos/builtin/packages/fonttosfnt/package.py @@ -9,7 +9,7 @@ class Fonttosfnt(AutotoolsPackage, XorgPackage): """Wrap a bitmap font in a sfnt (TrueType) wrapper.""" - homepage = "https://cgit.freedesktop.org/xorg/app/fonttosfnt" + homepage = "https://gitlab.freedesktop.org/xorg/app/fonttosfnt" xorg_mirror_path = "app/fonttosfnt-1.0.4.tar.gz" license("MIT") @@ -18,11 +18,11 @@ class Fonttosfnt(AutotoolsPackage, XorgPackage): version("1.2.2", sha256="8111317c38f63aff08c717595e65381af7ebfc54ccc23511c2042ef1cd86c648") version("1.0.4", sha256="3873636be5b3b8e4160070e8f9a7a9221b5bd5efbf740d7abaa9092e10732673") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("freetype") depends_on("libfontenc") - depends_on("xproto") + depends_on("xproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/fslsfonts/package.py b/var/spack/repos/builtin/packages/fslsfonts/package.py index 8f7f331cdea95c..c1af295066c521 100644 --- a/var/spack/repos/builtin/packages/fslsfonts/package.py +++ b/var/spack/repos/builtin/packages/fslsfonts/package.py @@ -9,16 +9,16 @@ class Fslsfonts(AutotoolsPackage, XorgPackage): """fslsfonts produces a list of fonts served by an X font server.""" - homepage = "https://cgit.freedesktop.org/xorg/app/fslsfonts" + homepage = "https://gitlab.freedesktop.org/xorg/app/fslsfonts" xorg_mirror_path = "app/fslsfonts-1.0.5.tar.gz" version("1.0.6", sha256="17179e32cfc4588da9e8aa1aa21f862af265d673de64fe5e3a8556921caccb28") version("1.0.5", sha256="27e58d2313835ce0f08cf47c59a43798b122f605a55f54b170db27b57a492007") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libfs") - depends_on("xproto@7.0.25:") + depends_on("xproto@7.0.25:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/fstobdf/package.py b/var/spack/repos/builtin/packages/fstobdf/package.py index ca3bd1f51fa32d..c8f9caecfaca5e 100644 --- a/var/spack/repos/builtin/packages/fstobdf/package.py +++ b/var/spack/repos/builtin/packages/fstobdf/package.py @@ -12,17 +12,17 @@ class Fstobdf(AutotoolsPackage, XorgPackage): This is useful in testing servers, debugging font metrics, and reproducing lost BDF files.""" - homepage = "https://cgit.freedesktop.org/xorg/app/fstobdf" + homepage = "https://gitlab.freedesktop.org/xorg/app/fstobdf" xorg_mirror_path = "app/fstobdf-1.0.6.tar.gz" version("1.0.7", sha256="5cf1f697415dc5f66df24d7495471dbd5bc3812580773e4c700ead5db27503cf") version("1.0.6", sha256="bb903ae76cbcb0a08a71f06762b64db7d5c2064f6e88e8dc3a604e76d0bcb93d") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libfs") - depends_on("xproto@7.0.25:") + depends_on("xproto@7.0.25:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/iceauth/package.py b/var/spack/repos/builtin/packages/iceauth/package.py index 67ebf0f1d3c566..6b5bcfce51c07f 100644 --- a/var/spack/repos/builtin/packages/iceauth/package.py +++ b/var/spack/repos/builtin/packages/iceauth/package.py @@ -11,7 +11,7 @@ class Iceauth(AutotoolsPackage, XorgPackage): information used in connecting with ICE. It operates very much like the xauth program for X11 connection authentication records.""" - homepage = "https://cgit.freedesktop.org/xorg/app/iceauth" + homepage = "https://gitlab.freedesktop.org/xorg/app/iceauth" xorg_mirror_path = "app/iceauth-1.0.7.tar.gz" license("MIT") @@ -20,10 +20,10 @@ class Iceauth(AutotoolsPackage, XorgPackage): version("1.0.9", sha256="5ca274cf210453e7d7cf5c827a2fbc92149df83824f99a27cde17e1f20324dc6") version("1.0.7", sha256="6c9706cce276609876e768759ed4ee3b447cd17af4a61f9b5a374c7dda9696d8") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libice") - depends_on("xproto@7.0.22:") + depends_on("xproto@7.0.22:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/ico/package.py b/var/spack/repos/builtin/packages/ico/package.py index 00d8782755e977..a057f41252a893 100644 --- a/var/spack/repos/builtin/packages/ico/package.py +++ b/var/spack/repos/builtin/packages/ico/package.py @@ -12,16 +12,16 @@ class Ico(AutotoolsPackage, XorgPackage): polyhedron, with hidden lines removed, or a solid-fill polyhedron with hidden faces removed.""" - homepage = "https://cgit.freedesktop.org/xorg/app/ico" + homepage = "https://gitlab.freedesktop.org/xorg/app/ico" xorg_mirror_path = "app/ico-1.0.4.tar.gz" version("1.0.6", sha256="dc59589044d71e3ef4dacf5a62a7b0f69b543386d2a12fb8b5558caee5b1e22f") version("1.0.4", sha256="eb8609c3b43dc2e575272f2702590525fe13229e022c4aff8b9a0cc2a3f3205d") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@0.99.1:") - depends_on("xproto@7.0.22:") + depends_on("xproto@7.0.22:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/imake/package.py b/var/spack/repos/builtin/packages/imake/package.py index 5e350232736ca1..7749f3efa8d913 100644 --- a/var/spack/repos/builtin/packages/imake/package.py +++ b/var/spack/repos/builtin/packages/imake/package.py @@ -9,7 +9,7 @@ class Imake(AutotoolsPackage, XorgPackage): """The imake build system.""" - homepage = "http://www.snake.net/software/imake-stuff/" + homepage = "https://gitlab.freedesktop.org/xorg/util/imake" xorg_mirror_path = "util/imake-1.0.7.tar.gz" license("custom") @@ -18,10 +18,9 @@ class Imake(AutotoolsPackage, XorgPackage): version("1.0.9", sha256="ca53ad18c683091490596d72fee8dbee4c6ddb7693709e25f26da140d29687c1") version("1.0.7", sha256="6bda266a07eb33445d513f1e3c82a61e4822ccb94d420643d58e1be5f881e5cb") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") - depends_on("xproto") + depends_on("xproto", type="build") depends_on("xorg-cf-files", type="run") depends_on("pkgconfig", type="build") diff --git a/var/spack/repos/builtin/packages/lbxproxy/package.py b/var/spack/repos/builtin/packages/lbxproxy/package.py index d7951ee599db2d..122ddbc0c84575 100644 --- a/var/spack/repos/builtin/packages/lbxproxy/package.py +++ b/var/spack/repos/builtin/packages/lbxproxy/package.py @@ -16,12 +16,12 @@ class Lbxproxy(AutotoolsPackage, XorgPackage): extension, so this program is only useful in connecting to older X servers.""" - homepage = "https://cgit.freedesktop.org/xorg/app/lbxproxy" + homepage = "https://gitlab.freedesktop.org/xorg/app/lbxproxy" xorg_mirror_path = "app/lbxproxy-1.0.3.tar.gz" version("1.0.3", sha256="db36251c9656c7da720f31e10df384f8946a9a5395915371b60d9423ad8f6a80") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxext") depends_on("liblbxutil") @@ -29,7 +29,7 @@ class Lbxproxy(AutotoolsPackage, XorgPackage): depends_on("libice") depends_on("xtrans") - depends_on("xproxymanagementprotocol") - depends_on("bigreqsproto") + depends_on("xproxymanagementprotocol", type="build") + depends_on("bigreqsproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libapplewm/package.py b/var/spack/repos/builtin/packages/libapplewm/package.py index 9486a10c269c4e..203ac436796632 100644 --- a/var/spack/repos/builtin/packages/libapplewm/package.py +++ b/var/spack/repos/builtin/packages/libapplewm/package.py @@ -11,23 +11,22 @@ class Libapplewm(AutotoolsPackage, XorgPackage): extension. This extension allows X window managers to better interact with the Mac OS X Aqua user interface when running X11 in a rootless mode.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libAppleWM" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libAppleWM" xorg_mirror_path = "lib/libAppleWM-1.4.1.tar.gz" license("MIT") version("1.4.1", sha256="d7fb098d65ad4d840f60e5c92de7f58f1725bd70d0d132755ea453462fd50049") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xextproto") - depends_on("applewmproto@1.4:") + depends_on("xextproto", type="build") + depends_on("applewmproto@1.4:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") - # Crashes with this error message on Linux: - # HIServices/Processes.h: No such file or directory - # May only build properly on macOS? + conflicts("platform=linux", msg="AppleWM is only available for macOS") + conflicts("platform=windows", msg="AppleWM is only available for macOS") diff --git a/var/spack/repos/builtin/packages/libdmx/package.py b/var/spack/repos/builtin/packages/libdmx/package.py index 0a864812544f9c..177623e25f820f 100644 --- a/var/spack/repos/builtin/packages/libdmx/package.py +++ b/var/spack/repos/builtin/packages/libdmx/package.py @@ -10,19 +10,19 @@ class Libdmx(AutotoolsPackage, XorgPackage): """libdmx - X Window System DMX (Distributed Multihead X) extension library.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libdmx" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libdmx" xorg_mirror_path = "lib/libdmx-1.1.3.tar.gz" version("1.1.5", sha256="070e82cc1daa1b21ee1339aef56a909eab04cbe7d430fabfbb01ecd21b2dd9f3") version("1.1.4", sha256="4d05bd5b248c1f46729fa1536b7a5e4d692567327ad41564c36742fb327af925") version("1.1.3", sha256="c4b24d7e13e5a67ead7a18f0b4cc9b7b5363c9d04cd01b83b5122ff92b3b4996") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xextproto") - depends_on("dmxproto@2.2.99.1:") + depends_on("xextproto", type="build") + depends_on("dmxproto@2.2.99.1:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libfontenc/package.py b/var/spack/repos/builtin/packages/libfontenc/package.py index 79c153853e4f05..8d9a1d93e62481 100644 --- a/var/spack/repos/builtin/packages/libfontenc/package.py +++ b/var/spack/repos/builtin/packages/libfontenc/package.py @@ -9,7 +9,7 @@ class Libfontenc(AutotoolsPackage, XorgPackage): """libfontenc - font encoding library.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libfontenc" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libfontenc" xorg_mirror_path = "lib/libfontenc-1.1.3.tar.gz" license("MIT") @@ -18,10 +18,10 @@ class Libfontenc(AutotoolsPackage, XorgPackage): version("1.1.7", sha256="5e5f210329823f08f97bfe9fd5b4105070c789bc5aef88ce01d86d8203d4aa9f") version("1.1.3", sha256="6fba26760ca8d5045f2b52ddf641c12cedc19ee30939c6478162b7db8b6220fb") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("zlib-api") - depends_on("xproto") + depends_on("xproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libfs/package.py b/var/spack/repos/builtin/packages/libfs/package.py index 9675762e54a319..d468a495f7fdb0 100644 --- a/var/spack/repos/builtin/packages/libfs/package.py +++ b/var/spack/repos/builtin/packages/libfs/package.py @@ -12,16 +12,18 @@ class Libfs(AutotoolsPackage, XorgPackage): This library is used by clients of X Font Servers (xfs), such as xfsinfo, fslsfonts, and the X servers themselves.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libFS" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libFS" xorg_mirror_path = "lib/libFS-1.0.7.tar.gz" version("1.0.9", sha256="8bc2762f63178905228a28670539badcfa2c8793f7b6ce3f597b7741b932054a") version("1.0.7", sha256="91bf1c5ce4115b7dbf4e314fdbee54052708e8f7b6a2ec6e82c309bcbe40ef3d") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto@7.0.17:") - depends_on("fontsproto") + # Note: `Requires: xproto fontsproto` in libfs.pc means this is type link + # https://gitlab.freedesktop.org/xorg/lib/libfs/-/blob/master/libfs.pc.in + depends_on("xproto@7.0.17:", type=("build", "link")) + depends_on("fontsproto", type=("build", "link")) depends_on("xtrans") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libice/package.py b/var/spack/repos/builtin/packages/libice/package.py index 574d80e0faa363..e8807b88817c15 100644 --- a/var/spack/repos/builtin/packages/libice/package.py +++ b/var/spack/repos/builtin/packages/libice/package.py @@ -9,7 +9,7 @@ class Libice(AutotoolsPackage, XorgPackage): """libICE - Inter-Client Exchange Library.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libICE" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libICE" xorg_mirror_path = "lib/libICE-1.0.9.tar.gz" license("X11") @@ -21,13 +21,13 @@ class Libice(AutotoolsPackage, XorgPackage): version("1.0.10", sha256="1116bc64c772fd127a0d0c0ffa2833479905e3d3d8197740b3abd5f292f22d2d") version("1.0.9", sha256="7812a824a66dd654c830d21982749b3b563d9c2dfe0b88b203cefc14a891edc0") - depends_on("c", type="build") # generated + depends_on("c", type="build") # technically libbsd is only required when glibc < 2.36 which provides arc4random_buf, # but spack doesn't currently have a good way to model this so we depend on it unconditionally depends_on("libbsd", when="platform=linux") - depends_on("xproto") + depends_on("xproto", type=("build", "link")) depends_on("xtrans") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/liblbxutil/package.py b/var/spack/repos/builtin/packages/liblbxutil/package.py index f69cb5b6b468d0..3717532752113a 100644 --- a/var/spack/repos/builtin/packages/liblbxutil/package.py +++ b/var/spack/repos/builtin/packages/liblbxutil/package.py @@ -9,17 +9,17 @@ class Liblbxutil(AutotoolsPackage, XorgPackage): """liblbxutil - Low Bandwith X extension (LBX) utility routines.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/liblbxutil" + homepage = "https://gitlab.freedesktop.org/xorg/lib/liblbxutil" xorg_mirror_path = "lib/liblbxutil-1.1.0.tar.gz" license("libtiff") version("1.1.0", sha256="285c1bc688cc71ec089e9284f2566d1780cc5d90816e9997890af8689f386951") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xextproto@7.0.99.1:") - depends_on("xproto") + depends_on("xextproto@7.0.99.1:", type="build") + depends_on("xproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") depends_on("zlib-api", type="link") diff --git a/var/spack/repos/builtin/packages/libsm/package.py b/var/spack/repos/builtin/packages/libsm/package.py index eaa0858a9e480e..103b16aa0a727f 100644 --- a/var/spack/repos/builtin/packages/libsm/package.py +++ b/var/spack/repos/builtin/packages/libsm/package.py @@ -9,7 +9,7 @@ class Libsm(AutotoolsPackage, XorgPackage): """libSM - X Session Management Library.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libSM" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libSM" xorg_mirror_path = "lib/libSM-1.2.2.tar.gz" license("MIT") @@ -20,14 +20,14 @@ class Libsm(AutotoolsPackage, XorgPackage): version("1.2.3", sha256="1e92408417cb6c6c477a8a6104291001a40b3bb56a4a60608fdd9cd2c5a0f320") version("1.2.2", sha256="14bb7c669ce2b8ff712fbdbf48120e3742a77edcd5e025d6b3325ed30cf120f4") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libice@1.1.0:", when="@1.2.4:") depends_on("libice@1.0.5:") depends_on("uuid") - depends_on("xproto") - depends_on("xtrans") + depends_on("xproto", type="build") + depends_on("xtrans", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libwindowswm/package.py b/var/spack/repos/builtin/packages/libwindowswm/package.py index e0a2bd8dfed0d1..ceca358af77fbf 100644 --- a/var/spack/repos/builtin/packages/libwindowswm/package.py +++ b/var/spack/repos/builtin/packages/libwindowswm/package.py @@ -14,19 +14,19 @@ class Libwindowswm(AutotoolsPackage, XorgPackage): better interact with the Cygwin XWin server when running X11 in a rootless mode.""" - homepage = "https://cgit.freedesktop.org/xorg/lib/libWindowsWM" + homepage = "https://gitlab.freedesktop.org/xorg/lib/libWindowsWM" xorg_mirror_path = "lib/libWindowsWM-1.0.1.tar.gz" license("MIT") version("1.0.1", sha256="94f9c0add3bad38ebd84bc43d854207c4deaaa74fb15339276e022546124b98a") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xextproto") - depends_on("windowswmproto") + depends_on("xextproto", type="build") + depends_on("windowswmproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libx11/package.py b/var/spack/repos/builtin/packages/libx11/package.py index b5cf2307f4441d..f77e1d9de4584f 100644 --- a/var/spack/repos/builtin/packages/libx11/package.py +++ b/var/spack/repos/builtin/packages/libx11/package.py @@ -38,17 +38,17 @@ class Libx11(AutotoolsPackage, XorgPackage): version("1.6.5", sha256="3abce972ba62620611fab5b404dafb852da3da54e7c287831c30863011d28fb3") version("1.6.3", sha256="0b03b9d22f4c9e59b4ba498f294e297f013cae27050dfa0f3496640200db5376") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxcb@1.11.1:", when="@1.6.4:") depends_on("libxcb@1.1.92:") - depends_on("xproto@7.0.25:", when="@1.7.0:") - depends_on("xproto@7.0.17:") - depends_on("xextproto") + depends_on("xproto@7.0.25:", when="@1.7.0:", type=("build", "link")) + depends_on("xproto@7.0.17:", type=("build", "link")) + depends_on("xextproto", type="build") depends_on("xtrans") - depends_on("kbproto") - depends_on("inputproto") + depends_on("kbproto", type=("build", "link")) + depends_on("inputproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") depends_on("perl", type="build") diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py index 0f747619398792..1d3ecde7c62073 100644 --- a/var/spack/repos/builtin/packages/libxau/package.py +++ b/var/spack/repos/builtin/packages/libxau/package.py @@ -23,9 +23,9 @@ class Libxau(AutotoolsPackage, XorgPackage): version("1.0.9", sha256="1f123d8304b082ad63a9e89376400a3b1d4c29e67e3ea07b3f659cccca690eea") version("1.0.8", sha256="c343b4ef66d66a6b3e0e27aa46b37ad5cab0f11a5c565eafb4a1c7590bc71d7b") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto") + depends_on("xproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxaw/package.py b/var/spack/repos/builtin/packages/libxaw/package.py index d67ca1f690fea8..e2633f11d6f9f2 100644 --- a/var/spack/repos/builtin/packages/libxaw/package.py +++ b/var/spack/repos/builtin/packages/libxaw/package.py @@ -23,7 +23,7 @@ class Libxaw(AutotoolsPackage, XorgPackage): version("1.0.13", sha256="7e74ac3e5f67def549722ff0333d6e6276b8becd9d89615cda011e71238ab694") version("1.0.12", sha256="e32abc68d759ffb643f842329838f8b6c157e31023cc91059aabf730e7222ad2") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") @@ -31,7 +31,7 @@ class Libxaw(AutotoolsPackage, XorgPackage): depends_on("libxmu") depends_on("libxpm") - depends_on("xproto") - depends_on("xextproto") + depends_on("xproto", type=("build", "link")) + depends_on("xextproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxaw3d/package.py b/var/spack/repos/builtin/packages/libxaw3d/package.py index 6ce61e39dfcc64..f332772e430eef 100644 --- a/var/spack/repos/builtin/packages/libxaw3d/package.py +++ b/var/spack/repos/builtin/packages/libxaw3d/package.py @@ -22,14 +22,14 @@ class Libxaw3d(AutotoolsPackage, XorgPackage): version("1.6.4", sha256="09fecfdab9d7d5953567883e2074eb231bc7a122a06e5055f9c119090f1f76a7") version("1.6.2", sha256="847dab01aeac1448916e3b4edb4425594b3ac2896562d9c7141aa4ac6c898ba9") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxt") depends_on("libxmu") depends_on("libxext") depends_on("libxpm") - depends_on("xproto@7.0.22:") + depends_on("xproto@7.0.22:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxcomposite/package.py b/var/spack/repos/builtin/packages/libxcomposite/package.py index 620cd106e8e1eb..489ef94150c5e1 100644 --- a/var/spack/repos/builtin/packages/libxcomposite/package.py +++ b/var/spack/repos/builtin/packages/libxcomposite/package.py @@ -20,12 +20,12 @@ class Libxcomposite(AutotoolsPackage, XorgPackage): version("0.4.6", sha256="3599dfcd96cd48d45e6aeb08578aa27636fa903f480f880c863622c2b352d076") version("0.4.4", sha256="83c04649819c6f52cda1b0ce8bcdcc48ad8618428ad803fb07f20b802f1bdad1") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxfixes") - depends_on("fixesproto@0.4:") - depends_on("compositeproto@0.4:") - depends_on("xproto@7.0.22:", when="@0.4.6") + depends_on("fixesproto@0.4:", type="build") + depends_on("compositeproto@0.4:", type=("build", "link")) + depends_on("xproto@7.0.22:", type=("build", "link"), when="@0.4.6") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxcursor/package.py b/var/spack/repos/builtin/packages/libxcursor/package.py index 5680971829a619..103ed5862e2e45 100644 --- a/var/spack/repos/builtin/packages/libxcursor/package.py +++ b/var/spack/repos/builtin/packages/libxcursor/package.py @@ -20,12 +20,12 @@ class Libxcursor(AutotoolsPackage, XorgPackage): version("1.2.1", sha256="77f96b9ad0a3c422cfa826afabaf1e02b9bfbfc8908c5fa1a45094faad074b98") version("1.1.14", sha256="be0954faf274969ffa6d95b9606b9c0cfee28c13b6fc014f15606a0c8b05c17b") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxrender@0.8.2:") depends_on("libxfixes") depends_on("libx11") - depends_on("fixesproto") + depends_on("fixesproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxdamage/package.py b/var/spack/repos/builtin/packages/libxdamage/package.py index 37546254c173db..e3da4a50060ac7 100644 --- a/var/spack/repos/builtin/packages/libxdamage/package.py +++ b/var/spack/repos/builtin/packages/libxdamage/package.py @@ -20,13 +20,13 @@ class Libxdamage(AutotoolsPackage, XorgPackage): version("1.1.5", sha256="630ec53abb8c2d6dac5cd9f06c1f73ffb4a3167f8118fdebd77afd639dbc2019") version("1.1.4", sha256="4bb3e9d917f5f593df2277d452926ee6ad96de7b7cd1017cbcf4579fe5d3442b") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxfixes") depends_on("libx11") - depends_on("damageproto@1.1:") - depends_on("fixesproto") - depends_on("xextproto") + depends_on("damageproto@1.1:", type=("build", "link")) + depends_on("fixesproto", type="build") + depends_on("xextproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxdmcp/package.py b/var/spack/repos/builtin/packages/libxdmcp/package.py index dd22e784386263..6a66f62984f7ae 100644 --- a/var/spack/repos/builtin/packages/libxdmcp/package.py +++ b/var/spack/repos/builtin/packages/libxdmcp/package.py @@ -21,9 +21,9 @@ class Libxdmcp(AutotoolsPackage, XorgPackage): version("1.1.3", sha256="2ef9653d32e09d1bf1b837d0e0311024979653fe755ad3aaada8db1aa6ea180c") version("1.1.2", sha256="6f7c7e491a23035a26284d247779174dedc67e34e93cc3548b648ffdb6fc57c0") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto") + depends_on("xproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") depends_on("libbsd", when="platform=linux") diff --git a/var/spack/repos/builtin/packages/libxevie/package.py b/var/spack/repos/builtin/packages/libxevie/package.py index 30dcac3cf183e7..b56191d0bb8343 100644 --- a/var/spack/repos/builtin/packages/libxevie/package.py +++ b/var/spack/repos/builtin/packages/libxevie/package.py @@ -16,13 +16,13 @@ class Libxevie(AutotoolsPackage, XorgPackage): version("1.0.3", sha256="3759bb1f7fdade13ed99bfc05c0717bc42ce3f187e7da4eef80beddf5e461258") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xproto") - depends_on("xextproto") + depends_on("xproto", type=("build", "link")) + depends_on("xextproto", type="build") depends_on("evieext") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxext/package.py b/var/spack/repos/builtin/packages/libxext/package.py index fbd577914937bf..c107e9305bf43c 100644 --- a/var/spack/repos/builtin/packages/libxext/package.py +++ b/var/spack/repos/builtin/packages/libxext/package.py @@ -21,12 +21,12 @@ class Libxext(AutotoolsPackage, XorgPackage): version("1.3.4", sha256="8ef0789f282826661ff40a8eef22430378516ac580167da35cc948be9041aac1") version("1.3.3", sha256="eb0b88050491fef4716da4b06a4d92b4fc9e76f880d6310b2157df604342cfe5") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") - depends_on("xproto@7.0.13:") - depends_on("xextproto@7.2:") + depends_on("xproto@7.0.13:", type="build") + depends_on("xextproto@7.2:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxfixes/package.py b/var/spack/repos/builtin/packages/libxfixes/package.py index 073270dc0b0580..7b30f07026287b 100644 --- a/var/spack/repos/builtin/packages/libxfixes/package.py +++ b/var/spack/repos/builtin/packages/libxfixes/package.py @@ -23,13 +23,13 @@ class Libxfixes(AutotoolsPackage, XorgPackage): version("5.0.3", sha256="9ab6c13590658501ce4bd965a8a5d32ba4d8b3bb39a5a5bc9901edffc5666570") version("5.0.2", sha256="ad8df1ecf3324512b80ed12a9ca07556e561b14256d94216e67a68345b23c981") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") - depends_on("xproto") - depends_on("fixesproto@5.0:", when="@5") - # depends_on("fixesproto@6.0:", when="@6") - depends_on("xextproto") + depends_on("xproto", type=("build", "link")) + depends_on("fixesproto@5.0:", type=("build", "link"), when="@5") + # depends_on("fixesproto@6.0:", type=("build", "link"), when="@6") + depends_on("xextproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxfont/package.py b/var/spack/repos/builtin/packages/libxfont/package.py index 708a7bcdb8e450..f48b8971ffa5f9 100644 --- a/var/spack/repos/builtin/packages/libxfont/package.py +++ b/var/spack/repos/builtin/packages/libxfont/package.py @@ -22,13 +22,13 @@ class Libxfont(AutotoolsPackage, XorgPackage): version("1.5.4", sha256="59be6eab53f7b0feb6b7933c11d67d076ae2c0fd8921229c703fc7a4e9a80d6e") version("1.5.2", sha256="a7350c75171d03d06ae0d623e42240356d6d3e1ac7dfe606639bf20f0d653c93") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libfontenc") depends_on("freetype build_system=autotools") depends_on("xtrans") - depends_on("xproto") - depends_on("fontsproto@2.1.3:") + depends_on("xproto", type=("build", "link")) + depends_on("fontsproto@2.1.3:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxfont2/package.py b/var/spack/repos/builtin/packages/libxfont2/package.py index 34ac9d4da0e8d0..b8ca4cfa1bc7da 100644 --- a/var/spack/repos/builtin/packages/libxfont2/package.py +++ b/var/spack/repos/builtin/packages/libxfont2/package.py @@ -22,13 +22,13 @@ class Libxfont2(AutotoolsPackage, XorgPackage): version("2.0.6", sha256="a944df7b6837c8fa2067f6a5fc25d89b0acc4011cd0bc085106a03557fb502fc") version("2.0.1", sha256="381b6b385a69343df48a082523c856aed9042fbbc8ee0a6342fb502e4321230a") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libfontenc") depends_on("freetype") depends_on("xtrans") - depends_on("xproto") - depends_on("fontsproto@2.1.3:") + depends_on("xproto", type=("build", "link")) + depends_on("fontsproto@2.1.3:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxfontcache/package.py b/var/spack/repos/builtin/packages/libxfontcache/package.py index f05ea5d59b1c42..f8139113783f0b 100644 --- a/var/spack/repos/builtin/packages/libxfontcache/package.py +++ b/var/spack/repos/builtin/packages/libxfontcache/package.py @@ -16,12 +16,12 @@ class Libxfontcache(AutotoolsPackage, XorgPackage): version("1.0.5", sha256="fdba75307a0983d2566554e0e9effa7079551f1b7b46e8de642d067998619659") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xextproto") - depends_on("fontcacheproto") + depends_on("xextproto", type="build") + depends_on("fontcacheproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxi/package.py b/var/spack/repos/builtin/packages/libxi/package.py index 59f757f4e51496..3f7cf05dc82295 100644 --- a/var/spack/repos/builtin/packages/libxi/package.py +++ b/var/spack/repos/builtin/packages/libxi/package.py @@ -25,17 +25,17 @@ class Libxi(AutotoolsPackage, XorgPackage): version("1.7.7", sha256="501f49e9c85609da17614d711aa4931fd128011042ff1cae53a16ce03e51ff5e") version("1.7.6", sha256="4e88fa7decd287e58140ea72238f8d54e4791de302938c83695fc0c9ac102b7e") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("pkgconfig", type="build") depends_on("libx11@1.6:") depends_on("libxext@1.0.99.1:") depends_on("libxfixes@5:") - depends_on("fixesproto@5.0:") - depends_on("xproto@7.0.13:") - depends_on("xextproto@7.0.3:") - depends_on("inputproto@2.2.99.1:", when="@1.7:") - # depends_on("inputproto@2.3.99.1:", when="@1.8:") + depends_on("fixesproto@5.0:", type="build") + depends_on("xproto@7.0.13:", type="build") + depends_on("xextproto@7.0.3:", type="build") + depends_on("inputproto@2.2.99.1:", when="@1.7:", type=("build", "link")) + # depends_on("inputproto@2.3.99.1:", when="@1.8:", type=("build", "link")) @property def libs(self): diff --git a/var/spack/repos/builtin/packages/libxinerama/package.py b/var/spack/repos/builtin/packages/libxinerama/package.py index b29ffafd9ca3da..3156091c5a0269 100644 --- a/var/spack/repos/builtin/packages/libxinerama/package.py +++ b/var/spack/repos/builtin/packages/libxinerama/package.py @@ -20,13 +20,13 @@ class Libxinerama(AutotoolsPackage, XorgPackage): version("1.1.4", sha256="64de45e18cc76b8e703cb09b3c9d28bd16e3d05d5cd99f2d630de2d62c3acc18") version("1.1.3", sha256="0ba243222ae5aba4c6a3d7a394c32c8b69220a6872dbb00b7abae8753aca9a44") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xextproto") - depends_on("xineramaproto@1.1.99.1:") + depends_on("xextproto", type="build") + depends_on("xineramaproto@1.1.99.1:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxkbfile/package.py b/var/spack/repos/builtin/packages/libxkbfile/package.py index 7d4917232acfbb..a9cb63402352aa 100644 --- a/var/spack/repos/builtin/packages/libxkbfile/package.py +++ b/var/spack/repos/builtin/packages/libxkbfile/package.py @@ -22,10 +22,10 @@ class Libxkbfile(AutotoolsPackage, XorgPackage): version("1.1.0", sha256="2a92adda3992aa7cbad758ef0b8dfeaedebb49338b772c64ddf369d78c1c51d3") version("1.0.9", sha256="95df50570f38e720fb79976f603761ae6eff761613eb56f258c3cb6bab4fd5e3") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") - depends_on("kbproto") + depends_on("kbproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxmu/package.py b/var/spack/repos/builtin/packages/libxmu/package.py index 7e79a2477847c4..2d740fd1bde045 100644 --- a/var/spack/repos/builtin/packages/libxmu/package.py +++ b/var/spack/repos/builtin/packages/libxmu/package.py @@ -24,13 +24,13 @@ class Libxmu(AutotoolsPackage, XorgPackage): version("1.1.4", sha256="3091d711cdc1d8ea0f545a13b90d1464c3c3ab64778fd121f0d789b277a80289") version("1.1.2", sha256="e5fd4bacef068f9509b8226017205040e38d3fba8d2de55037200e7176c13dba") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxt") depends_on("libxt@1.1:", when="@1.2:") depends_on("libxext") depends_on("libx11") - depends_on("xextproto") + depends_on("xextproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxp/package.py b/var/spack/repos/builtin/packages/libxp/package.py index 28d08726637037..38f97cc0a5a394 100644 --- a/var/spack/repos/builtin/packages/libxp/package.py +++ b/var/spack/repos/builtin/packages/libxp/package.py @@ -17,13 +17,13 @@ class Libxp(AutotoolsPackage, XorgPackage): version("1.0.4", sha256="05e46af1ccb68f1752cca5879774a4fb9bf3b19fe088eb745034956e0c6fadba") version("1.0.3", sha256="f6b8cc4ef05d3eafc9ef5fc72819dd412024b4ed60197c0d5914758125817e9c") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") depends_on("libxext") depends_on("libxau") - depends_on("xextproto") - depends_on("printproto") + depends_on("xextproto", type="build") + depends_on("printproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py index fa368d39db4601..93fa947ce580bf 100644 --- a/var/spack/repos/builtin/packages/libxpm/package.py +++ b/var/spack/repos/builtin/packages/libxpm/package.py @@ -28,12 +28,12 @@ class Libxpm(AutotoolsPackage, XorgPackage): version("3.5.8", sha256="06472c7fdd175ea54c84162a428be19c154e7dda03d8bf91beee7f1d104669a6") version("3.5.7", sha256="422fbb311c4fe6ef337e937eb3adc8617a4320bd3e00fce06850d4360829b3ae") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("gettext") depends_on("libx11") - depends_on("xproto") + depends_on("xproto", type="build") depends_on("ncompress", when="@3.5.15") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxpresent/package.py b/var/spack/repos/builtin/packages/libxpresent/package.py index a91eedfd00fa9f..e8cf21f0afc459 100644 --- a/var/spack/repos/builtin/packages/libxpresent/package.py +++ b/var/spack/repos/builtin/packages/libxpresent/package.py @@ -20,17 +20,17 @@ class Libxpresent(AutotoolsPackage, XorgPackage): version("1.0.1", sha256="8ebf8567a8f6afe5a64275a2ecfd4c84e957970c27299d964350f60be9f3541d") version("1.0.0", sha256="92f1bdfb67ae2ffcdb25ad72c02cac5e4912dc9bc792858240df1d7f105946fa") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11", type="link") depends_on("libxext", type="link") depends_on("libxfixes", type="link") depends_on("libxrandr", type="link") - depends_on("xproto") - depends_on("presentproto@1.0:") - depends_on("xextproto") - depends_on("fixesproto") - depends_on("randrproto") + depends_on("xproto", type=("build", "link")) + depends_on("presentproto@1.0:", type=("build", "link")) + depends_on("xextproto", type="build") + depends_on("fixesproto", type="build") + depends_on("randrproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxprintapputil/package.py b/var/spack/repos/builtin/packages/libxprintapputil/package.py index 6aea4db93ec5a3..582106f9d388d2 100644 --- a/var/spack/repos/builtin/packages/libxprintapputil/package.py +++ b/var/spack/repos/builtin/packages/libxprintapputil/package.py @@ -14,13 +14,13 @@ class Libxprintapputil(AutotoolsPackage, XorgPackage): version("1.0.1", sha256="5af3939ffe15508b942bc1e325a29a95b1c85e8900a5f65a896101e63048bbf7") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxp") depends_on("libxprintutil") depends_on("libxau") - depends_on("printproto") + depends_on("printproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxprintutil/package.py b/var/spack/repos/builtin/packages/libxprintutil/package.py index e79caaecf338c2..d2c671183d84bc 100644 --- a/var/spack/repos/builtin/packages/libxprintutil/package.py +++ b/var/spack/repos/builtin/packages/libxprintutil/package.py @@ -14,13 +14,13 @@ class Libxprintutil(AutotoolsPackage, XorgPackage): version("1.0.1", sha256="220924216f98ef8f7aa4cff33629edb1171ad10f8ea302a1eb85055545d4d195") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxp") depends_on("libxt") depends_on("libxau") - depends_on("printproto") + depends_on("printproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxrandr/package.py b/var/spack/repos/builtin/packages/libxrandr/package.py index 0a7f7b2ffb7d14..01e28d012d2a62 100644 --- a/var/spack/repos/builtin/packages/libxrandr/package.py +++ b/var/spack/repos/builtin/packages/libxrandr/package.py @@ -20,15 +20,15 @@ class Libxrandr(AutotoolsPackage, XorgPackage): version("1.5.3", sha256="3ad316c1781fe2fe22574b819e81f0eff087a8560377f521ba932238b41b251f") version("1.5.0", sha256="1b594a149e6b124aab7149446f2fd886461e2935eca8dca43fe83a70cf8ec451") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") depends_on("libxext") depends_on("libxrender") - depends_on("randrproto@1.5:") - depends_on("xextproto") - depends_on("renderproto") + depends_on("randrproto@1.5:", type=("build", "link")) + depends_on("xextproto", type="build") + depends_on("renderproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxrender/package.py b/var/spack/repos/builtin/packages/libxrender/package.py index 88fc25d8a570fe..a01b8e86775ee5 100644 --- a/var/spack/repos/builtin/packages/libxrender/package.py +++ b/var/spack/repos/builtin/packages/libxrender/package.py @@ -20,11 +20,11 @@ class Libxrender(AutotoolsPackage, XorgPackage): version("0.9.10", sha256="770527cce42500790433df84ec3521e8bf095dfe5079454a92236494ab296adf") version("0.9.9", sha256="beeac64ff8d225f775019eb7c688782dee9f4cc7b412a65538f8dde7be4e90fe") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") - depends_on("renderproto@0.9:") + depends_on("renderproto@0.9:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxres/package.py b/var/spack/repos/builtin/packages/libxres/package.py index 2fc2137b5a4668..946c900c139ab2 100644 --- a/var/spack/repos/builtin/packages/libxres/package.py +++ b/var/spack/repos/builtin/packages/libxres/package.py @@ -21,14 +21,14 @@ class Libxres(AutotoolsPackage, XorgPackage): version("1.2.0", sha256="5b62feee09f276d74054787df030fceb41034de84174abec6d81c591145e043a") version("1.0.7", sha256="488c9fa14b38f794d1f019fe62e6b06514a39f1a7538e55ece8faf22482fefcd") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xextproto") - depends_on("resourceproto@1.0:", when="@1.0") - depends_on("resourceproto@1.2:", when="@1.2") + depends_on("xextproto", type="build") + depends_on("resourceproto@1.0:", type="build", when="@1.0") + depends_on("resourceproto@1.2:", type="build", when="@1.2") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxscrnsaver/package.py b/var/spack/repos/builtin/packages/libxscrnsaver/package.py index e624e737efcbb3..df5823230c6bc4 100644 --- a/var/spack/repos/builtin/packages/libxscrnsaver/package.py +++ b/var/spack/repos/builtin/packages/libxscrnsaver/package.py @@ -20,12 +20,12 @@ class Libxscrnsaver(AutotoolsPackage, XorgPackage): version("1.2.3", sha256="4f74e7e412144591d8e0616db27f433cfc9f45aae6669c6c4bb03e6bf9be809a") version("1.2.2", sha256="e12ba814d44f7b58534c0d8521e2d4574f7bf2787da405de4341c3b9f4cc8d96") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xextproto") - depends_on("scrnsaverproto@1.2:") + depends_on("xextproto", type="build") + depends_on("scrnsaverproto@1.2:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py index 8584b1281e1059..11005334f13e13 100644 --- a/var/spack/repos/builtin/packages/libxshmfence/package.py +++ b/var/spack/repos/builtin/packages/libxshmfence/package.py @@ -23,9 +23,9 @@ class Libxshmfence(AutotoolsPackage, XorgPackage): version("1.3", sha256="b884300d26a14961a076fbebc762a39831cb75f92bed5ccf9836345b459220c7") version("1.2", sha256="d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto") + depends_on("xproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxt/package.py b/var/spack/repos/builtin/packages/libxt/package.py index 7a3804f336c442..96693ebecd729b 100644 --- a/var/spack/repos/builtin/packages/libxt/package.py +++ b/var/spack/repos/builtin/packages/libxt/package.py @@ -21,14 +21,14 @@ class Libxt(AutotoolsPackage, XorgPackage): version("1.2.0", sha256="d4bee88898fc5e1dc470e361430c72fbc529b9cdbbb6c0ed3affea3a39f97d8d") version("1.1.5", sha256="b59bee38a9935565fa49dc1bfe84cb30173e2e07e1dcdf801430d4b54eb0caa3") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libsm") depends_on("libice") depends_on("libx11") - depends_on("xproto") - depends_on("kbproto") + depends_on("xproto", type=("build", "link")) + depends_on("kbproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxtrap/package.py b/var/spack/repos/builtin/packages/libxtrap/package.py index 652a26a8d7998c..2ce4055623eaf6 100644 --- a/var/spack/repos/builtin/packages/libxtrap/package.py +++ b/var/spack/repos/builtin/packages/libxtrap/package.py @@ -23,13 +23,13 @@ class Libxtrap(AutotoolsPackage, XorgPackage): version("1.0.1", sha256="db748e299dcc9af68428795b898a4a96cf806f79b75786781136503e4fce5e17") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxt") depends_on("libxext") - depends_on("trapproto") - depends_on("xextproto") + depends_on("trapproto", type=("build", "link")) + depends_on("xextproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxtst/package.py b/var/spack/repos/builtin/packages/libxtst/package.py index 112f8f5b529b84..62d914daaceb8f 100644 --- a/var/spack/repos/builtin/packages/libxtst/package.py +++ b/var/spack/repos/builtin/packages/libxtst/package.py @@ -29,15 +29,15 @@ class Libxtst(AutotoolsPackage, XorgPackage): version("1.2.3", sha256="a0c83acce02d4923018c744662cb28eb0dbbc33b4adc027726879ccf68fbc2c2") version("1.2.2", sha256="221838960c7b9058cd6795c1c3ee8e25bae1c68106be314bc3036a4f26be0e6c") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext@1.0.99.4:") depends_on("libxi") - depends_on("recordproto@1.13.99.1:") - depends_on("xextproto@7.0.99.3:") - depends_on("inputproto") - depends_on("fixesproto") + depends_on("recordproto@1.13.99.1:", type=("build", "link")) + depends_on("xextproto@7.0.99.3:", type="build") + depends_on("inputproto", type="build") + depends_on("fixesproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxv/package.py b/var/spack/repos/builtin/packages/libxv/package.py index 4e01e3be04fc7c..c0ea897606c1bc 100644 --- a/var/spack/repos/builtin/packages/libxv/package.py +++ b/var/spack/repos/builtin/packages/libxv/package.py @@ -21,12 +21,12 @@ class Libxv(AutotoolsPackage, XorgPackage): version("1.0.11", sha256="c4112532889b210e21cf05f46f0f2f8354ff7e1b58061e12d7a76c95c0d47bb1") version("1.0.10", sha256="89a664928b625558268de81c633e300948b3752b0593453d7815f8775bab5293") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") depends_on("libxext") - depends_on("xextproto") - depends_on("videoproto") + depends_on("xextproto", type="build") + depends_on("videoproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxvmc/package.py b/var/spack/repos/builtin/packages/libxvmc/package.py index cbe654022e88d0..d3e95109239c2a 100644 --- a/var/spack/repos/builtin/packages/libxvmc/package.py +++ b/var/spack/repos/builtin/packages/libxvmc/package.py @@ -23,13 +23,13 @@ class Libxvmc(AutotoolsPackage, XorgPackage): version("1.0.10", sha256="d8306f71c798d10409bb181b747c2644e1d60c05773c742c12304ab5aa5c8436") version("1.0.9", sha256="090f087fe65b30b3edfb996c79ff6cf299e473fb25e955fff1c4e9cb624da2c2") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") depends_on("libxext") depends_on("libxv") - depends_on("xextproto") - depends_on("videoproto") + depends_on("xextproto", type=("build", "link")) + depends_on("videoproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxxf86dga/package.py b/var/spack/repos/builtin/packages/libxxf86dga/package.py index 9f67a2a88c0fc7..65c8709949803b 100644 --- a/var/spack/repos/builtin/packages/libxxf86dga/package.py +++ b/var/spack/repos/builtin/packages/libxxf86dga/package.py @@ -20,13 +20,13 @@ class Libxxf86dga(AutotoolsPackage, XorgPackage): version("1.1.5", sha256="715e2bf5caf6276f0858eb4b11a1aef1a26beeb40dce2942387339da395bef69") version("1.1.4", sha256="e6361620a15ceba666901ca8423e8be0c6ed0271a7088742009160349173766b") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xproto") - depends_on("xextproto") - depends_on("xf86dgaproto@2.0.99.2:") + depends_on("xproto", type="build") + depends_on("xextproto", type="build") + depends_on("xf86dgaproto@2.0.99.2:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxxf86misc/package.py b/var/spack/repos/builtin/packages/libxxf86misc/package.py index d06dc5326021e4..331ddc05644621 100644 --- a/var/spack/repos/builtin/packages/libxxf86misc/package.py +++ b/var/spack/repos/builtin/packages/libxxf86misc/package.py @@ -17,13 +17,13 @@ class Libxxf86misc(AutotoolsPackage, XorgPackage): version("1.0.4", sha256="63a68b2fafd03236f9b0135de21976e9194d6d811ca2fd774c13a6b4be576676") version("1.0.3", sha256="358f692f793af00f6ef4c7a8566c1bcaeeea37e417337db3f519522cc1df3946") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") - depends_on("xproto") - depends_on("xextproto") - depends_on("xf86miscproto") + depends_on("xproto", type="build") + depends_on("xextproto", type="build") + depends_on("xf86miscproto", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/libxxf86vm/package.py b/var/spack/repos/builtin/packages/libxxf86vm/package.py index dd04e35435eaff..eef44998cda6f0 100644 --- a/var/spack/repos/builtin/packages/libxxf86vm/package.py +++ b/var/spack/repos/builtin/packages/libxxf86vm/package.py @@ -19,14 +19,14 @@ class Libxxf86vm(AutotoolsPackage, XorgPackage): version("1.1.5", sha256="f3f1c29fef8accb0adbd854900c03c6c42f1804f2bc1e4f3ad7b2e1f3b878128") version("1.1.4", sha256="5108553c378a25688dcb57dca383664c36e293d60b1505815f67980ba9318a99") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11@1.6:") depends_on("libxext") - depends_on("xproto") - depends_on("xextproto") - depends_on("xf86vidmodeproto@2.2.99.1:") + depends_on("xproto", type="build") + depends_on("xextproto", type="build") + depends_on("xf86vidmodeproto@2.2.99.1:", type=("build", "link")) depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/lndir/package.py b/var/spack/repos/builtin/packages/lndir/package.py index db18f773dddd50..91cf5aaabd0373 100644 --- a/var/spack/repos/builtin/packages/lndir/package.py +++ b/var/spack/repos/builtin/packages/lndir/package.py @@ -10,14 +10,14 @@ class Lndir(AutotoolsPackage, XorgPackage): """lndir - create a shadow directory of symbolic links to another directory tree.""" - homepage = "https://cgit.freedesktop.org/xorg/util/lndir" + homepage = "https://gitlab.freedesktop.org/xorg/util/lndir" xorg_mirror_path = "util/lndir-1.0.3.tar.gz" version("1.0.5", sha256="2be863f59e6833955b11295c43d79ab32464a8706d29072171cd8da95922a7a2") version("1.0.4", sha256="b448b49a55d0750acfc3fd992c2511b21838ec2cea870d109bb9fdca2ac028da") version("1.0.3", sha256="95b2d26fb3cbe702f828146c7a4c7c48001d2da52b062580227b7b68180be902") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") diff --git a/var/spack/repos/builtin/packages/makedepend/package.py b/var/spack/repos/builtin/packages/makedepend/package.py index 0c4d7c4c58ed13..5778c9eadf3c62 100644 --- a/var/spack/repos/builtin/packages/makedepend/package.py +++ b/var/spack/repos/builtin/packages/makedepend/package.py @@ -9,7 +9,7 @@ class Makedepend(AutotoolsPackage, XorgPackage): """makedepend - create dependencies in makefiles.""" - homepage = "https://cgit.freedesktop.org/xorg/util/makedepend" + homepage = "https://gitlab.freedesktop.org/xorg/util/makedepend" xorg_mirror_path = "util/makedepend-1.0.5.tar.gz" license("MIT-open-group") @@ -18,8 +18,7 @@ class Makedepend(AutotoolsPackage, XorgPackage): version("1.0.8", sha256="275f0d2b196bfdc740aab9f02bb48cb7a97e4dfea011a7b468ed5648d0019e54") version("1.0.5", sha256="503903d41fb5badb73cb70d7b3740c8b30fe1cc68c504d3b6a85e6644c4e5004") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") diff --git a/var/spack/repos/builtin/packages/mkfontscale/package.py b/var/spack/repos/builtin/packages/mkfontscale/package.py index ae74b563158793..623ffe113288da 100644 --- a/var/spack/repos/builtin/packages/mkfontscale/package.py +++ b/var/spack/repos/builtin/packages/mkfontscale/package.py @@ -10,7 +10,7 @@ class Mkfontscale(AutotoolsPackage, XorgPackage): """mkfontscale creates the fonts.scale and fonts.dir index files used by the legacy X11 font system.""" - homepage = "https://cgit.freedesktop.org/xorg/app/mkfontscale" + homepage = "https://gitlab.freedesktop.org/xorg/app/mkfontscale" xorg_mirror_path = "app/mkfontscale-1.1.2.tar.gz" license("MIT") @@ -19,11 +19,11 @@ class Mkfontscale(AutotoolsPackage, XorgPackage): version("1.2.2", sha256="4a5af55e670713024639a7f7d10826d905d86faf574cd77e0f5aef2d00e70168") version("1.1.2", sha256="8bba59e60fbc4cb082092cf6b67e810b47b4fe64fbc77dbea1d7e7d55312b2e4") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libfontenc") depends_on("freetype build_system=autotools") - depends_on("xproto@7.0.25:") + depends_on("xproto@7.0.25:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/proxymngr/package.py b/var/spack/repos/builtin/packages/proxymngr/package.py index cc1ec5d46c8ca2..1563fbeb0e25df 100644 --- a/var/spack/repos/builtin/packages/proxymngr/package.py +++ b/var/spack/repos/builtin/packages/proxymngr/package.py @@ -12,19 +12,18 @@ class Proxymngr(AutotoolsPackage, XorgPackage): appropriate, and keeping track of all of the available proxy services. The proxy manager strives to reuse existing proxies whenever possible.""" - homepage = "https://cgit.freedesktop.org/xorg/app/proxymngr" + homepage = "https://gitlab.freedesktop.org/xorg/app/proxymngr" xorg_mirror_path = "app/proxymngr-1.0.4.tar.gz" version("1.0.4", sha256="d40f2d15985ee8e8ef5320a85c0b1899a7bc95974a65137ae886e499bced86f4") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") depends_on("libice") depends_on("libxt") depends_on("lbxproxy") - depends_on("xproto@7.0.17:") - depends_on("xproxymanagementprotocol") + depends_on("xproto@7.0.17:", type="build") + depends_on("xproxymanagementprotocol", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/rendercheck/package.py b/var/spack/repos/builtin/packages/rendercheck/package.py index 113bf059e53fcd..f19e7b97dfcb4e 100644 --- a/var/spack/repos/builtin/packages/rendercheck/package.py +++ b/var/spack/repos/builtin/packages/rendercheck/package.py @@ -10,16 +10,16 @@ class Rendercheck(AutotoolsPackage, XorgPackage): """rendercheck is a program to test a Render extension implementation against separate calculations of expected output.""" - homepage = "https://cgit.freedesktop.org/xorg/app/rendercheck" + homepage = "https://gitlab.freedesktop.org/xorg/app/rendercheck" xorg_mirror_path = "app/rendercheck-1.5.tar.gz" version("1.5", sha256="1553fef61c30f2524b597c3758cc8d3f8dc1f52eb8137417fa0667b0adc8a604") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxrender") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/rgb/package.py b/var/spack/repos/builtin/packages/rgb/package.py index 22bde52c3ab2b9..48a63de83993d3 100644 --- a/var/spack/repos/builtin/packages/rgb/package.py +++ b/var/spack/repos/builtin/packages/rgb/package.py @@ -15,7 +15,7 @@ class Rgb(AutotoolsPackage, XorgPackage): The "others" subdirectory contains some alternate color databases.""" - homepage = "https://cgit.freedesktop.org/xorg/app/rgb" + homepage = "https://gitlab.freedesktop.org/xorg/app/rgb" xorg_mirror_path = "app/rgb-1.0.6.tar.gz" license("MIT") @@ -23,8 +23,8 @@ class Rgb(AutotoolsPackage, XorgPackage): version("1.1.0", sha256="77142e3d6f06cfbfbe440e29596765259988a22db40b1e706e14b8ba4c962aa5") version("1.0.6", sha256="cb998035e08b9f58ad3150cab60461c3225bdd075238cffc665e24da40718933") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("xorg-server") - depends_on("xproto") + depends_on("xproto", type="build") diff --git a/var/spack/repos/builtin/packages/rstart/package.py b/var/spack/repos/builtin/packages/rstart/package.py index 3c52dfcc837f3b..a7e5c3c137ed0c 100644 --- a/var/spack/repos/builtin/packages/rstart/package.py +++ b/var/spack/repos/builtin/packages/rstart/package.py @@ -14,14 +14,14 @@ class Rstart(AutotoolsPackage, XorgPackage): This software has been deprecated in favor of the X11 forwarding provided in common ssh implementations.""" - homepage = "https://cgit.freedesktop.org/xorg/app/rstart" + homepage = "https://gitlab.freedesktop.org/xorg/app/rstart" xorg_mirror_path = "app/rstart-1.0.5.tar.gz" version("1.0.6", sha256="28aa687437efeee70965a0878f9db79397cf691f4011268e16bc835627e23ec5") version("1.0.5", sha256="5271c0c2675b4ad09aace7edddfdd137af10fc754afa6260d8eb5d0bba7098c7") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto") + depends_on("xproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/sessreg/package.py b/var/spack/repos/builtin/packages/sessreg/package.py index 4873193756c303..63f14e8904a62e 100644 --- a/var/spack/repos/builtin/packages/sessreg/package.py +++ b/var/spack/repos/builtin/packages/sessreg/package.py @@ -11,7 +11,7 @@ class Sessreg(AutotoolsPackage, XorgPackage): sessions. It was originally written for use with xdm, but may also be used with other display managers such as gdm or kdm.""" - homepage = "https://cgit.freedesktop.org/xorg/app/sessreg" + homepage = "https://gitlab.freedesktop.org/xorg/app/sessreg" xorg_mirror_path = "app/sessreg-1.1.0.tar.gz" license("ICU") @@ -21,9 +21,9 @@ class Sessreg(AutotoolsPackage, XorgPackage): version("1.1.1", sha256="3e38f72ff690eaffc0f5eaff533a236bb5e93d4b91ed4fff60e9a2505347d009") version("1.1.0", sha256="e561edb48dfc3b0624554169c15f9dd2c3139e83084cb323b0c712724f2b6043") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto@7.0.25:") + depends_on("xproto@7.0.25:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/transset/package.py b/var/spack/repos/builtin/packages/transset/package.py index 4c0dd0d9950a49..9215ef0574091f 100644 --- a/var/spack/repos/builtin/packages/transset/package.py +++ b/var/spack/repos/builtin/packages/transset/package.py @@ -9,7 +9,7 @@ class Transset(AutotoolsPackage, XorgPackage): """transset is an utility for setting opacity property.""" - homepage = "https://cgit.freedesktop.org/xorg/app/transset" + homepage = "https://gitlab.freedesktop.org/xorg/app/transset" xorg_mirror_path = "app/transset-1.0.1.tar.gz" license("MIT") @@ -18,10 +18,10 @@ class Transset(AutotoolsPackage, XorgPackage): version("1.0.2", sha256="5c7d7d1bac36137f41ac3db84d7ed9b9fdac868608572bcba0bc1de40510ca67") version("1.0.1", sha256="87c560e69e05ae8a5bad17ff62ac31cda43a5065508205b109c756c0ab857d55") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/twm/package.py b/var/spack/repos/builtin/packages/twm/package.py index 6b5209da9b2fb5..3a027151ad543c 100644 --- a/var/spack/repos/builtin/packages/twm/package.py +++ b/var/spack/repos/builtin/packages/twm/package.py @@ -12,7 +12,7 @@ class Twm(AutotoolsPackage, XorgPackage): user-defined macro functions, click-to-type and pointer-driven keyboard focus, and user-specified key and pointer button bindings.""" - homepage = "https://cgit.freedesktop.org/xorg/app/twm" + homepage = "https://gitlab.freedesktop.org/xorg/app/twm" xorg_mirror_path = "app/twm-1.0.9.tar.gz" license("MIT") @@ -22,7 +22,7 @@ class Twm(AutotoolsPackage, XorgPackage): version("1.0.10", sha256="679a1d07078c918fa32454498dc15573b299bbb0f001499e213c408e4b2170f5") version("1.0.9", sha256="1c325e8456a200693c816baa27ceca9c5e5e0f36af63d98f70a335853a0039e8") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") @@ -31,7 +31,7 @@ class Twm(AutotoolsPackage, XorgPackage): depends_on("libice") depends_on("libsm") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("bison", type="build") depends_on("flex", type="build") depends_on("pkgconfig", type="build") diff --git a/var/spack/repos/builtin/packages/x11perf/package.py b/var/spack/repos/builtin/packages/x11perf/package.py index f7c94db6a96bc6..cdd5ee0496debf 100644 --- a/var/spack/repos/builtin/packages/x11perf/package.py +++ b/var/spack/repos/builtin/packages/x11perf/package.py @@ -15,13 +15,13 @@ class X11perf(AutotoolsPackage, XorgPackage): version("1.6.1", sha256="a1874618df0e30ae1a9b2470fb50e77a40c4a6f6ddf87a5c154f7a3b913ac0b3") version("1.6.0", sha256="d33051c4e93100ab60609aee14ff889bb2460f28945063d793e21eda19381abb") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxmu") depends_on("libxrender") depends_on("libxft") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xauth/package.py b/var/spack/repos/builtin/packages/xauth/package.py index 7d233c857529ae..33649b571a2e3d 100644 --- a/var/spack/repos/builtin/packages/xauth/package.py +++ b/var/spack/repos/builtin/packages/xauth/package.py @@ -21,14 +21,14 @@ class Xauth(AutotoolsPackage, XorgPackage): version("1.0.10", sha256="5196821221d824b9bc278fa6505c595acee1d374518a52217d9b64d3c63dedd0") version("1.0.9", sha256="0709070caf23ba2fb99536907b75be1fe31853999c62d3e87a6a8d26ba8a8cdb") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxau") depends_on("libxext") depends_on("libxmu") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xcalc/package.py b/var/spack/repos/builtin/packages/xcalc/package.py index c9aae5b2b17111..de11c6f87069bd 100644 --- a/var/spack/repos/builtin/packages/xcalc/package.py +++ b/var/spack/repos/builtin/packages/xcalc/package.py @@ -20,12 +20,12 @@ class Xcalc(AutotoolsPackage, XorgPackage): version("1.0.7", sha256="2b00129583f51a45acfcaaa461750169e530996e190b31f7a92891846380f1f5") version("1.0.6", sha256="7fd5cd9a35160925c41cbadfb1ea23599fa20fd26cd873dab20a650b24efe8d1") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxaw") depends_on("libxt") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xclipboard/package.py b/var/spack/repos/builtin/packages/xclipboard/package.py index f9c14f6edb3f11..b1b4215a00cecf 100644 --- a/var/spack/repos/builtin/packages/xclipboard/package.py +++ b/var/spack/repos/builtin/packages/xclipboard/package.py @@ -18,7 +18,7 @@ class Xclipboard(AutotoolsPackage, XorgPackage): version("1.1.4", sha256="c40cb97f6c8597ba74a3de5c188d4429f686e4d395b85dac0ec8c7311bdf3d10") version("1.1.3", sha256="a8c335cf166cbb27ff86569503db7e639f85741ad199bfb3ba45dd0cfda3da7f") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxaw") depends_on("libxmu") @@ -26,6 +26,6 @@ class Xclipboard(AutotoolsPackage, XorgPackage): depends_on("libx11") depends_on("libxkbfile") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xclock/package.py b/var/spack/repos/builtin/packages/xclock/package.py index 8b74db2e60d280..9d2bf79db25a74 100644 --- a/var/spack/repos/builtin/packages/xclock/package.py +++ b/var/spack/repos/builtin/packages/xclock/package.py @@ -22,7 +22,7 @@ class Xclock(AutotoolsPackage, XorgPackage): version("1.0.8", sha256="bb6f2439e6037759dc1682d80a3fe0232e7b55aa9b38548203e746d290b246bd") version("1.0.7", sha256="e730bd575938d5628ef47003a9d4d41b882621798227f5d0c12f4a26365ed1b5") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxaw") depends_on("libxmu") @@ -32,6 +32,6 @@ class Xclock(AutotoolsPackage, XorgPackage): depends_on("libxkbfile") depends_on("libxt") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xconsole/package.py b/var/spack/repos/builtin/packages/xconsole/package.py index b22ae751d821e7..8ca378c61404e5 100644 --- a/var/spack/repos/builtin/packages/xconsole/package.py +++ b/var/spack/repos/builtin/packages/xconsole/package.py @@ -18,13 +18,13 @@ class Xconsole(AutotoolsPackage, XorgPackage): version("1.0.7", sha256="91bc7327643b1ca57800a37575930af16fbea485d426a96d8f465de570aa6eb3") version("1.0.6", sha256="28151453a0a687462516de133bac0287b488a2ff56da78331fee34bc1bf3e7d5") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxaw") depends_on("libxmu") depends_on("libxt@1.0:") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xdpyinfo/package.py b/var/spack/repos/builtin/packages/xdpyinfo/package.py index b558de378daddf..5c972059d1967f 100644 --- a/var/spack/repos/builtin/packages/xdpyinfo/package.py +++ b/var/spack/repos/builtin/packages/xdpyinfo/package.py @@ -22,16 +22,16 @@ class Xdpyinfo(AutotoolsPackage, XorgPackage): version("1.3.3", sha256="2ae7b8213ea839b8376843477496276e8d69550c48bff081e16376539fc27c5a") version("1.3.2", sha256="ef39935e8e9b328e54a85d6218d410d6939482da6058db1ee1b39749d98cbcf2") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxext") depends_on("libx11") depends_on("libxtst") depends_on("libxcb") - depends_on("xproto@7.0.22:") - depends_on("recordproto") - depends_on("inputproto") - depends_on("fixesproto") + depends_on("xproto@7.0.22:", type="build") + depends_on("recordproto", type="build") + depends_on("inputproto", type="build") + depends_on("fixesproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xfindproxy/package.py b/var/spack/repos/builtin/packages/xfindproxy/package.py index 5f81012e9b9613..8358377d231187 100644 --- a/var/spack/repos/builtin/packages/xfindproxy/package.py +++ b/var/spack/repos/builtin/packages/xfindproxy/package.py @@ -19,12 +19,12 @@ class Xfindproxy(AutotoolsPackage, XorgPackage): version("1.0.4", sha256="fa6152fcf9c16fbb2ef52259731df5df899a39a86894b0508456613f26ff924a") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libice") depends_on("libxt") - depends_on("xproto") - depends_on("xproxymanagementprotocol") + depends_on("xproto", type="build") + depends_on("xproxymanagementprotocol", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xfsinfo/package.py b/var/spack/repos/builtin/packages/xfsinfo/package.py index 255d3b5c587251..c56c6bf3d8ff5f 100644 --- a/var/spack/repos/builtin/packages/xfsinfo/package.py +++ b/var/spack/repos/builtin/packages/xfsinfo/package.py @@ -20,10 +20,10 @@ class Xfsinfo(AutotoolsPackage, XorgPackage): version("1.0.6", sha256="a817e553703748fe2d721b1fe8ea95687ee78f7aef25427ed72d9584494d91e1") version("1.0.5", sha256="56a0492ed2cde272dc8f4cff4ba0970ccb900e51c10bb8ec62747483d095fd69") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libfs") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xfwp/package.py b/var/spack/repos/builtin/packages/xfwp/package.py index 2d7c105280faed..ac243fe9d57f7d 100644 --- a/var/spack/repos/builtin/packages/xfwp/package.py +++ b/var/spack/repos/builtin/packages/xfwp/package.py @@ -14,12 +14,12 @@ class Xfwp(AutotoolsPackage, XorgPackage): version("1.0.3", sha256="6fe243bde0374637e271a3f038b5d6d79a04621fc18162727782392069c5c04d") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libice") - depends_on("xproto") - depends_on("xproxymanagementprotocol") + depends_on("xproto", type="build") + depends_on("xproxymanagementprotocol", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xinput/package.py b/var/spack/repos/builtin/packages/xinput/package.py index 32265c1bb651ec..9dd5b69f2525e7 100644 --- a/var/spack/repos/builtin/packages/xinput/package.py +++ b/var/spack/repos/builtin/packages/xinput/package.py @@ -17,7 +17,7 @@ class Xinput(AutotoolsPackage, XorgPackage): version("1.6.3", sha256="9f29f9bfe387c5a3d582f9edc8c5a753510ecc6fdfb154c03b5cea5975b10ce4") version("1.6.2", sha256="2c8ca5ff2a8703cb7d898629a4311db720dbd30d0c162bfe37f18849a727bd42") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxext") @@ -25,9 +25,9 @@ class Xinput(AutotoolsPackage, XorgPackage): depends_on("libxrandr") depends_on("libxinerama") - depends_on("inputproto@2.1.99.1:") - depends_on("fixesproto") - depends_on("randrproto") - depends_on("xineramaproto") + depends_on("inputproto@2.1.99.1:", type="build") + depends_on("fixesproto", type="build") + depends_on("randrproto", type="build") + depends_on("xineramaproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xkbutils/package.py b/var/spack/repos/builtin/packages/xkbutils/package.py index cb6cf1b028475a..e090389b6a460d 100644 --- a/var/spack/repos/builtin/packages/xkbutils/package.py +++ b/var/spack/repos/builtin/packages/xkbutils/package.py @@ -17,13 +17,13 @@ class Xkbutils(AutotoolsPackage, XorgPackage): version("1.0.5", sha256="b87072f0d7e75f56ee04455e1feab92bb5847aee4534b18c2e08b926150279ff") version("1.0.4", sha256="cf31303cbdd6a86c34cab46f4b6e0c7acd2e84578593b334a146142894529bca") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxaw") depends_on("libxt") depends_on("libx11") - depends_on("xproto@7.0.17:") - depends_on("inputproto") + depends_on("xproto@7.0.17:", type="build") + depends_on("inputproto", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xkeyboard-config/package.py b/var/spack/repos/builtin/packages/xkeyboard-config/package.py index 50436f37ef23d8..5e139ffe7d3e24 100644 --- a/var/spack/repos/builtin/packages/xkeyboard-config/package.py +++ b/var/spack/repos/builtin/packages/xkeyboard-config/package.py @@ -24,7 +24,7 @@ class XkeyboardConfig(AutotoolsPackage, XorgPackage): depends_on("libxslt", type="build") depends_on("pkgconfig", type="build") depends_on("intltool@0.30:", type="build") - depends_on("xproto@7.0.20:") + depends_on("xproto@7.0.20:", type="build") # TODO: missing dependencies # xgettext diff --git a/var/spack/repos/builtin/packages/xkill/package.py b/var/spack/repos/builtin/packages/xkill/package.py index fff9bfdc6fe807..398d352eff19a6 100644 --- a/var/spack/repos/builtin/packages/xkill/package.py +++ b/var/spack/repos/builtin/packages/xkill/package.py @@ -20,11 +20,11 @@ class Xkill(AutotoolsPackage, XorgPackage): version("1.0.5", sha256="98fab8a8af78d5aae4e1f284b580c60e3d25ed2a72daa4dbce419b28d8adaf8a") version("1.0.4", sha256="f80115f2dcca3d4b61f3c28188752c21ca7b2718b54b6e0274c0497a7f827da0") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxmu") - depends_on("xproto@7.0.22:") + depends_on("xproto@7.0.22:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xload/package.py b/var/spack/repos/builtin/packages/xload/package.py index 103729c83b5e17..88908041649cfe 100644 --- a/var/spack/repos/builtin/packages/xload/package.py +++ b/var/spack/repos/builtin/packages/xload/package.py @@ -20,14 +20,14 @@ class Xload(AutotoolsPackage, XorgPackage): version("1.1.3", sha256="9952e841d25ab2fd0ce5e27ba91858331c3f97575d726481772d4deb89432483") version("1.1.2", sha256="4863ad339d22c41a0ca030dc5886404f5ae8b8c47cd5e09f0e36407edbdbe769") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxaw") depends_on("libxmu") depends_on("libxt") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xlsfonts/package.py b/var/spack/repos/builtin/packages/xlsfonts/package.py index 49e7b872f3b708..54be4a0082f4ca 100644 --- a/var/spack/repos/builtin/packages/xlsfonts/package.py +++ b/var/spack/repos/builtin/packages/xlsfonts/package.py @@ -17,10 +17,10 @@ class Xlsfonts(AutotoolsPackage, XorgPackage): version("1.0.6", sha256="870bbcfb903e790e730ea8ee964c72ce4a4df60f7a4b39541b88193d1e8c9453") version("1.0.5", sha256="2a7aeca1023a3918ad2a1af2258ed63d8f8b6c48e53841b3a3f15fb9a0c008ce") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xman/package.py b/var/spack/repos/builtin/packages/xman/package.py index 52b498c3fd1f20..2c8b9b0057d984 100644 --- a/var/spack/repos/builtin/packages/xman/package.py +++ b/var/spack/repos/builtin/packages/xman/package.py @@ -18,11 +18,11 @@ class Xman(AutotoolsPackage, XorgPackage): version("1.1.5", sha256="ff0aeb164fcb736b381bd7722c27aa0284cafb9a5d1b3940c3c3ee0af642f204") version("1.1.4", sha256="72fd0d479624a31d9a7330e5fdd220b7aa144744781f8e78aa12deece86e05c7") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxaw") depends_on("libxt") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xmodmap/package.py b/var/spack/repos/builtin/packages/xmodmap/package.py index 700564f1f3d5ff..f521bebad88f04 100644 --- a/var/spack/repos/builtin/packages/xmodmap/package.py +++ b/var/spack/repos/builtin/packages/xmodmap/package.py @@ -22,10 +22,10 @@ class Xmodmap(AutotoolsPackage, XorgPackage): version("1.0.10", sha256="d4e9dc4cb034d0d774d059498d05348869934c52b0f24b0f3913823090b88640") version("1.0.9", sha256="73427a996f0fcda2a2c7ac96cfc4edd5985aeb13b48053f55ae7f63a668fadef") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") - depends_on("xproto@7.0.25:") + depends_on("xproto@7.0.25:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xorg-server/package.py b/var/spack/repos/builtin/packages/xorg-server/package.py index f72115569578af..7f423d44c01540 100644 --- a/var/spack/repos/builtin/packages/xorg-server/package.py +++ b/var/spack/repos/builtin/packages/xorg-server/package.py @@ -10,7 +10,7 @@ class XorgServer(AutotoolsPackage, XorgPackage): """X.Org Server is the free and open source implementation of the display server for the X Window System stewarded by the X.Org Foundation.""" - homepage = "https://cgit.freedesktop.org/xorg/xserver" + homepage = "https://gitlab.freedesktop.org/xorg/xserver" xorg_mirror_path = "xserver/xorg-server-1.18.99.901.tar.gz" license("MIT") @@ -19,8 +19,18 @@ class XorgServer(AutotoolsPackage, XorgPackage): "1.18.99.901", sha256="c8425163b588de2ee7e5c8e65b0749f2710f55a7e02a8d1dc83b3630868ceb21" ) - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + # glibc stopped declaring major()/minor() macros in + # https://gitlab.freedesktop.org/xorg/xserver/-/commit/d732c36597fab2e9bc4f2aa72cf1110997697557 + patch("sysmacros.patch", when="@:1.18 ^glibc@2.25:") + + def patch(self): + with when("@1"): + # Due to transition from mesa version numbers to libglvnd version numbers, + # subset of https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/292 + filter_file('LIBGL="gl >= 7.1.0"', 'LIBGL="gl >= 1.2"', "configure") + filter_file('LIBGL="gl >= 9.2.0"', 'LIBGL="gl >= 1.2"', "configure") + + depends_on("c", type="build") depends_on("pixman@0.27.2:") depends_on("font-util") @@ -28,39 +38,67 @@ class XorgServer(AutotoolsPackage, XorgPackage): depends_on("libdrm@2.3.0:") depends_on("libx11") - depends_on("dri2proto@2.8:") - depends_on("dri3proto@1.0:") - depends_on("glproto@1.4.17:") + depends_on("gl") + + depends_on("dri2proto@2.8:", type="build") + depends_on("dri3proto@1.0:", type="build") + depends_on("glproto@1.4.17:", type="build") depends_on("flex", type="build") depends_on("bison", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") - depends_on("fixesproto@5.0:") - depends_on("damageproto@1.1:") - depends_on("xcmiscproto@1.2.0:") + depends_on("fixesproto@5.0:", type="build") + depends_on("damageproto@1.1:", type="build") + depends_on("xcmiscproto@1.2.0:", type="build") depends_on("xtrans@1.3.5:") - depends_on("bigreqsproto@1.1.0:") - depends_on("xproto@7.0.28:") - depends_on("randrproto@1.5.0:") - depends_on("renderproto@0.11:") - depends_on("xextproto@7.2.99.901:") - depends_on("inputproto@2.3:") - depends_on("kbproto@1.0.3:") - depends_on("fontsproto@2.1.3:") + depends_on("bigreqsproto@1.1.0:", type="build") + depends_on("xproto@7.0.28:", type="build") + depends_on("randrproto@1.5.0:", type="build") + depends_on("renderproto@0.11:", type="build") + depends_on("xextproto@7.2.99.901:", type="build") + depends_on("inputproto@2.3:", type="build") + depends_on("kbproto@1.0.3:", type="build") + depends_on("fontsproto@2.1.3:", type="build") depends_on("pixman@0.27.2:") - depends_on("videoproto") - depends_on("compositeproto@0.4:") - depends_on("recordproto@1.13.99.1:") - depends_on("scrnsaverproto@1.1:") - depends_on("resourceproto@1.2.0:") - depends_on("xf86driproto@2.1.0:") - depends_on("glproto@1.4.17:") - depends_on("presentproto@1.0:") - depends_on("xineramaproto") + depends_on("videoproto", type="build") + depends_on("compositeproto@0.4:", type="build") + depends_on("recordproto@1.13.99.1:", type="build") + depends_on("scrnsaverproto@1.1:", type="build") + depends_on("resourceproto@1.2.0:", type="build") + depends_on("xf86driproto@2.1.0:", type="build") + depends_on("glproto@1.4.17:", type="build") + depends_on("presentproto@1.0:", type="build") + depends_on("xineramaproto", type="build") depends_on("libxkbfile") depends_on("libxfont2") depends_on("libxext") depends_on("libxdamage") depends_on("libxfixes") depends_on("libepoxy") + + @when("@:1.19") + def setup_build_environment(self, env): + # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/406 + env.set("CPPFLAGS", "-fcommon") + + gl_libs = self.spec["gl"].libs + env.set("GL_LIBS", gl_libs) + env.set("GL_CFLAGS", self.spec["gl"].headers.cpp_flags) + + def configure_args(self): + args = [] + + if self.spec.satisfies("^[virtuals=gl] osmesa"): + args.append("--enable-glx") + else: + args.append("--disable-glx") + + args.extend( + [ + "--disable-dri", # dri >= 7.8.0 + "--disable-glamor", # Glamor for Xorg requires gbm >= 10.2.0 + ] + ) + + return args diff --git a/var/spack/repos/builtin/packages/xorg-server/sysmacros.patch b/var/spack/repos/builtin/packages/xorg-server/sysmacros.patch new file mode 100644 index 00000000000000..15f8c314c014d9 --- /dev/null +++ b/var/spack/repos/builtin/packages/xorg-server/sysmacros.patch @@ -0,0 +1,24 @@ +diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c +index 39de498a372c468b67013bb43488ef3201c267d4..136bf50ff9de77ad68e1933572de3efd0d9d786d 100644 +--- a/hw/xfree86/common/xf86Xinput.c ++++ b/hw/xfree86/common/xf86Xinput.c +@@ -84,6 +84,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_SYS_MKDEV_H + #include /* for major() & minor() on Solaris */ + #endif +diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c +index dbf497ca2ebdc09e2ee28ec9d72ea335b43c947b..9e5ddcd503d370f733b4fc66bd0532f903f94a1c 100644 +--- a/hw/xfree86/os-support/linux/lnx_init.c ++++ b/hw/xfree86/os-support/linux/lnx_init.c +@@ -38,6 +38,7 @@ + #include "xf86_OSlib.h" + + #include ++#include + + #ifndef K_OFF + #define K_OFF 0x4 diff --git a/var/spack/repos/builtin/packages/xpr/package.py b/var/spack/repos/builtin/packages/xpr/package.py index d1896a6843410e..1ab58ef195ba9c 100644 --- a/var/spack/repos/builtin/packages/xpr/package.py +++ b/var/spack/repos/builtin/packages/xpr/package.py @@ -17,11 +17,11 @@ class Xpr(AutotoolsPackage, XorgPackage): version("1.0.5", sha256="7a429478279a2b0f2363b24b8279ff132cc5e83762d3329341490838b0723757") version("1.0.4", sha256="9ec355388ae363fd40239a3fa56908bb2f3e53b5bfc872cf0182d14d730c6207") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxmu") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xprop/package.py b/var/spack/repos/builtin/packages/xprop/package.py index c97c07727d8acc..da9bd6b4a94ba8 100644 --- a/var/spack/repos/builtin/packages/xprop/package.py +++ b/var/spack/repos/builtin/packages/xprop/package.py @@ -22,10 +22,10 @@ class Xprop(AutotoolsPackage, XorgPackage): version("1.2.3", sha256="82c13f40577e10b6f3f0160a21b1e46c00a0c719aa560618b961c453e1b5c80d") version("1.2.2", sha256="3db78771ce8fb8954fb242ed9d4030372523649c5e9c1a9420340020dd0afbc2") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xrandr/package.py b/var/spack/repos/builtin/packages/xrandr/package.py index a6186fabf53722..c3b2838ae6c986 100644 --- a/var/spack/repos/builtin/packages/xrandr/package.py +++ b/var/spack/repos/builtin/packages/xrandr/package.py @@ -21,13 +21,13 @@ class Xrandr(AutotoolsPackage, XorgPackage): version("1.5.1", sha256="7b99edb7970a1365eaf5bcaf552144e4dfc3ccf510c4abc08569849929fb366e") version("1.5.0", sha256="ddfe8e7866149c24ccce8e6aaa0623218ae19130c2859cadcaa4228d8bb4a46d") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxrandr@1.5:") depends_on("libxrender") depends_on("libx11") - depends_on("randrproto") + depends_on("randrproto", type="build") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xrdb/package.py b/var/spack/repos/builtin/packages/xrdb/package.py index 4b702d444fdbc4..96fd97b88e67fc 100644 --- a/var/spack/repos/builtin/packages/xrdb/package.py +++ b/var/spack/repos/builtin/packages/xrdb/package.py @@ -19,11 +19,11 @@ class Xrdb(AutotoolsPackage, XorgPackage): version("1.1.1", sha256="d19f856296c5f1742a703afc620654efc76fedfb86e1afe0bff9f1038b9e8a47") version("1.1.0", sha256="44b0b6b7b7eb80b83486dfea67c880f6b0059052386c7ddec4d58fd2ad9ae8e9") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxmu") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xrefresh/package.py b/var/spack/repos/builtin/packages/xrefresh/package.py index e34713194f08dc..7b28eb364fef73 100644 --- a/var/spack/repos/builtin/packages/xrefresh/package.py +++ b/var/spack/repos/builtin/packages/xrefresh/package.py @@ -19,10 +19,10 @@ class Xrefresh(AutotoolsPackage, XorgPackage): version("1.0.6", sha256="0dda726365d341c00aed0f9cfebf3d2cfaa0c661212c73c0114cbb4ce92f357e") version("1.0.5", sha256="b373cc1ecd37c3d787e7074ce89a8a06ea173d7ba9e73fa48de973c759fbcf38") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xrx/package.py b/var/spack/repos/builtin/packages/xrx/package.py index 4ff7f058f7190f..bb4f3d9f22592f 100644 --- a/var/spack/repos/builtin/packages/xrx/package.py +++ b/var/spack/repos/builtin/packages/xrx/package.py @@ -19,7 +19,7 @@ class Xrx(AutotoolsPackage, XorgPackage): version("1.0.4", sha256="1ffa1c2af28587c6ed7ded3af2e62e93bad8f9900423d09c45b1d59449d15134") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxt") @@ -29,6 +29,6 @@ class Xrx(AutotoolsPackage, XorgPackage): depends_on("libxaw") depends_on("xtrans") - depends_on("xproxymanagementprotocol") + depends_on("xproxymanagementprotocol", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xscope/package.py b/var/spack/repos/builtin/packages/xscope/package.py index 5bbddce9dde678..9bb0cf44bf5a8d 100644 --- a/var/spack/repos/builtin/packages/xscope/package.py +++ b/var/spack/repos/builtin/packages/xscope/package.py @@ -18,9 +18,9 @@ class Xscope(AutotoolsPackage, XorgPackage): version("1.4.2", sha256="e12d634a69ce1ec36b0afd1d40814215e262801a030ddf83d7d0348cd046b381") version("1.4.1", sha256="f99558a64e828cd2c352091ed362ad2ef42b1c55ef5c01cbf782be9735bb6de3") - depends_on("c", type="build") # generated + depends_on("c", type="build") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("xtrans") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xset/package.py b/var/spack/repos/builtin/packages/xset/package.py index ca8b35d147c02f..c47e76d5702522 100644 --- a/var/spack/repos/builtin/packages/xset/package.py +++ b/var/spack/repos/builtin/packages/xset/package.py @@ -18,11 +18,11 @@ class Xset(AutotoolsPackage, XorgPackage): version("1.2.4", sha256="3a05e8626298c7a79002ec5fb4949dcba8abc7a2b95c03ed5e0f5698c3b4dea0") version("1.2.3", sha256="5ecb2bb2cbf3c9349b735080b155a08c97b314dacedfc558c7f5a611ee1297f7") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxmu") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xsetpointer/package.py b/var/spack/repos/builtin/packages/xsetpointer/package.py index 95fa11e3b00c3e..6205461c5fd25d 100644 --- a/var/spack/repos/builtin/packages/xsetpointer/package.py +++ b/var/spack/repos/builtin/packages/xsetpointer/package.py @@ -14,11 +14,11 @@ class Xsetpointer(AutotoolsPackage, XorgPackage): version("1.0.1", sha256="54be93b20fd6f1deac67246d6e214a60b02dcfbf05295e43751f7a04edb986ac") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxi", type="link") depends_on("libx11", type="link") - depends_on("inputproto@1.4:") + depends_on("inputproto@1.4:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xsetroot/package.py b/var/spack/repos/builtin/packages/xsetroot/package.py index 51e6ebad4db489..9427a96bc40c64 100644 --- a/var/spack/repos/builtin/packages/xsetroot/package.py +++ b/var/spack/repos/builtin/packages/xsetroot/package.py @@ -18,13 +18,13 @@ class Xsetroot(AutotoolsPackage, XorgPackage): version("1.1.2", sha256="9d007f5119be09924ac3a5d2bd506f32e6c164b82633c88d2aff26311e1a2a2b") version("1.1.1", sha256="6cdd48757d18835251124138b4a8e4008c3bbc51cf92533aa39c6ed03277168b") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxmu") depends_on("libx11") depends_on("libxcursor") depends_on("xbitmaps") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xstdcmap/package.py b/var/spack/repos/builtin/packages/xstdcmap/package.py index e6935f4fde239b..88b23d029f220b 100644 --- a/var/spack/repos/builtin/packages/xstdcmap/package.py +++ b/var/spack/repos/builtin/packages/xstdcmap/package.py @@ -19,11 +19,11 @@ class Xstdcmap(AutotoolsPackage, XorgPackage): version("1.0.4", sha256="7b1a23ba7ac623803101b6f9df37889fb1ef2f1bb53da25a415c8a88eebc8073") version("1.0.3", sha256="b97aaa883a9eedf9c3056ea1a7e818e3d93b63aa1f54193ef481d392bdef5711") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxmu") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xts/package.py b/var/spack/repos/builtin/packages/xts/package.py index 48597dd682e093..d2a76cb30248ad 100644 --- a/var/spack/repos/builtin/packages/xts/package.py +++ b/var/spack/repos/builtin/packages/xts/package.py @@ -10,12 +10,12 @@ class Xts(AutotoolsPackage, XorgPackage): """This is a revamped version of X Test Suite (XTS) which removes some of the ugliness of building and running the tests.""" - homepage = "https://www.x.org/wiki/XorgTesting/" + homepage = "https://gitlab.freedesktop.org/xorg/test/xts" xorg_mirror_path = "test/xts-0.99.1.tar.gz" version("0.99.1", sha256="d04d987b9a9f8b3921dfe8de8577d0c2a0f21d2c4c3196948fc9805838a352e6") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11", type="link") depends_on("libxext", type="link") @@ -25,9 +25,9 @@ class Xts(AutotoolsPackage, XorgPackage): depends_on("libxt", type="link") depends_on("libxmu", type="link") depends_on("libxaw", type="link") - depends_on("inputproto") - depends_on("recordproto") - depends_on("fixesproto") + depends_on("inputproto", type="build") + depends_on("recordproto", type="build") + depends_on("fixesproto", type="build") depends_on("xtrans") depends_on("bdftopcf", type="build") @@ -36,5 +36,8 @@ class Xts(AutotoolsPackage, XorgPackage): depends_on("xset", type="build") depends_on("xdpyinfo", type="build") + depends_on("pkgconfig", type="build") + depends_on("util-macros", type="build") + # FIXME: Crashes during compilation # error: redeclaration of enumerator 'XawChainTop' diff --git a/var/spack/repos/builtin/packages/xvinfo/package.py b/var/spack/repos/builtin/packages/xvinfo/package.py index a09ed8ca299b54..eb176b410d4fdb 100644 --- a/var/spack/repos/builtin/packages/xvinfo/package.py +++ b/var/spack/repos/builtin/packages/xvinfo/package.py @@ -19,11 +19,11 @@ class Xvinfo(AutotoolsPackage, XorgPackage): version("1.1.4", sha256="43d06be36fe10f247295fbe2edf1062740064343f2228d6a61b4f9feac4f7396") version("1.1.3", sha256="1c1c2f97abfe114389e94399cc7bf3dfd802ed30ad41ba23921d005bd8a6c39f") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxv") depends_on("libx11") - depends_on("xproto@7.0.25:") + depends_on("xproto@7.0.25:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xwd/package.py b/var/spack/repos/builtin/packages/xwd/package.py index 9f9fd8ccf7e55e..662895c73f3e8b 100644 --- a/var/spack/repos/builtin/packages/xwd/package.py +++ b/var/spack/repos/builtin/packages/xwd/package.py @@ -18,11 +18,11 @@ class Xwd(AutotoolsPackage, XorgPackage): version("1.0.7", sha256="1c5e86806234a96a29c90be1872128293c6def5ba69ecb70e161efe325e2ba03") version("1.0.6", sha256="ff01f0a4b736f955aaf7c8c3942211bc52f9fb75d96f2b19777f33fff5dc5b83") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") depends_on("libxkbfile") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xwininfo/package.py b/var/spack/repos/builtin/packages/xwininfo/package.py index cbb43815696b65..8ffeedad1d649d 100644 --- a/var/spack/repos/builtin/packages/xwininfo/package.py +++ b/var/spack/repos/builtin/packages/xwininfo/package.py @@ -20,11 +20,11 @@ class Xwininfo(AutotoolsPackage, XorgPackage): version("1.1.4", sha256="3561f6c37eec416ad306f41ff24172b86cbed00854dff8912915e97d2cc17c34") version("1.1.3", sha256="784f8b9c9ddab24ce4faa65fde6430a8d7cf3c0564573582452cc99c599bd941") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libxcb@1.6:") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") diff --git a/var/spack/repos/builtin/packages/xwud/package.py b/var/spack/repos/builtin/packages/xwud/package.py index a3aacae4a28b8a..4618088d60a0f3 100644 --- a/var/spack/repos/builtin/packages/xwud/package.py +++ b/var/spack/repos/builtin/packages/xwud/package.py @@ -17,10 +17,10 @@ class Xwud(AutotoolsPackage, XorgPackage): version("1.0.5", sha256="24d51e236ec3d1dd57c73679136029a14808aee5a2edda152d61598ba018c697") version("1.0.4", sha256="b7c124ccd87f529daedb7ef01c670ce6049fe141fd9ba7f444361de34510cd6c") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("libx11") - depends_on("xproto@7.0.17:") + depends_on("xproto@7.0.17:", type="build") depends_on("pkgconfig", type="build") depends_on("util-macros", type="build") From 7f89391b140c4a90d907538abf5eb56feff816a6 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Wed, 7 Aug 2024 07:55:10 -0600 Subject: [PATCH 231/435] parallelio: fix install_name for on macos (#45567) --- var/spack/repos/builtin/packages/parallelio/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/parallelio/package.py b/var/spack/repos/builtin/packages/parallelio/package.py index 5872c17a8d5463..51a78a76cc7133 100644 --- a/var/spack/repos/builtin/packages/parallelio/package.py +++ b/var/spack/repos/builtin/packages/parallelio/package.py @@ -70,6 +70,11 @@ class Parallelio(CMakePackage): # Allow argument mismatch in gfortran versions > 10 for mpi library compatibility patch("gfortran.patch", when="@:2.5.8 +fortran %gcc@10:") + @run_after("install", when="platform=darwin") + def darwin_install_name(self): + # The shared library is not installed correctly on Darwin; fix this + fix_darwin_install_name(self.prefix.lib) + def cmake_args(self): define = self.define define_from_variant = self.define_from_variant From a653579e5619e012d1a6760dc2aaf195bc4c7af5 Mon Sep 17 00:00:00 2001 From: Mathieu Cloirec <114424510+cloirec@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:23:53 +0200 Subject: [PATCH 232/435] hipsycl: add compile options for ROCm (#45497) Co-authored-by: cloirec --- .../repos/builtin/packages/hipsycl/package.py | 68 ++++++++++--------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/var/spack/repos/builtin/packages/hipsycl/package.py b/var/spack/repos/builtin/packages/hipsycl/package.py index 1be98ca586eab7..783f9c814512a7 100644 --- a/var/spack/repos/builtin/packages/hipsycl/package.py +++ b/var/spack/repos/builtin/packages/hipsycl/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import json +import os from os import path from llnl.util import filesystem @@ -11,7 +12,7 @@ from spack.package import * -class Hipsycl(CMakePackage): +class Hipsycl(CMakePackage, ROCmPackage): """hipSYCL is an implementation of the SYCL standard programming model over NVIDIA CUDA/AMD HIP""" @@ -26,6 +27,7 @@ class Hipsycl(CMakePackage): license("BSD-2-Clause") version("stable", branch="stable", submodules=True) + version("24.02.0", commit="974adc33ea5a35dd8b5be68c7a744b37482b8b64", submodules=True) version("23.10.0", commit="3952b468c9da89edad9dff953cdcab0a3c3bf78c", submodules=True) version("0.9.4", commit="99d9e24d462b35e815e0e59c1b611936c70464ae", submodules=True) version("0.9.4", commit="99d9e24d462b35e815e0e59c1b611936c70464ae", submodules=True) @@ -35,9 +37,8 @@ class Hipsycl(CMakePackage): version("0.8.0", commit="2daf8407e49dd32ebd1c266e8e944e390d28b22a", submodules=True) version("develop", branch="develop", submodules=True) - depends_on("cxx", type="build") # generated - variant("cuda", default=False, description="Enable CUDA backend for SYCL kernels") + variant("rocm", default=False, description="Enable ROCM backend for SYCL kernels") depends_on("cmake@3.5:", type="build") depends_on("boost +filesystem", when="@:0.8") @@ -78,8 +79,7 @@ def cmake_args(self): spec = self.spec args = [ "-DWITH_CPU_BACKEND:Bool=TRUE", - # TODO: no ROCm stuff available in spack yet - "-DWITH_ROCM_BACKEND:Bool=FALSE", + "-DWITH_ROCM_BACKEND:Bool={0}".format("TRUE" if "+rocm" in spec else "FALSE"), "-DWITH_CUDA_BACKEND:Bool={0}".format("TRUE" if "+cuda" in spec else "FALSE"), # prevent hipSYCL's cmake to look for other LLVM installations # if the specified one isn't compatible @@ -120,6 +120,11 @@ def cmake_args(self): # explicit CUDA toolkit if "+cuda" in spec: args.append("-DCUDA_TOOLKIT_ROOT_DIR:String={0}".format(spec["cuda"].prefix)) + if "+rocm" in spec: + args.append("-DWITH_ACCELERATED_CPU:STRING=OFF") + args.append("-DROCM_PATH:STRING={0}".format(os.environ.get("ROCM_PATH"))) + if self.spec.satisfies("@24.02.0:"): + args.append("-DWITH_SSCP_COMPILER=OFF") return args @run_after("install") @@ -158,31 +163,32 @@ def adjust_core_config(config): # the libc++.so and libc++abi.so dyn linked to the sycl # ptx backend rpaths = set() - so_paths = filesystem.find_libraries( - "libc++", self.spec["llvm"].prefix, shared=True, recursive=True - ) - if len(so_paths) != 1: - raise InstallError( - "concretized llvm dependency must provide a " - "unique directory containing libc++.so, " - "found: {0}".format(so_paths) - ) - rpaths.add(path.dirname(so_paths[0])) - so_paths = filesystem.find_libraries( - "libc++abi", self.spec["llvm"].prefix, shared=True, recursive=True - ) - if len(so_paths) != 1: - raise InstallError( - "concretized llvm dependency must provide a " - "unique directory containing libc++abi, " - "found: {0}".format(so_paths) + if "~rocm" in spec: + so_paths = filesystem.find_libraries( + "libc++", self.spec["llvm"].prefix, shared=True, recursive=True ) - rpaths.add(path.dirname(so_paths[0])) - - def adjust_cuda_config(config): - config["default-cuda-link-line"] += " " + " ".join( - "-rpath {0}".format(p) for p in rpaths + if len(so_paths) != 1: + raise InstallError( + "concretized llvm dependency must provide a " + "unique directory containing libc++.so, " + "found: {0}".format(so_paths) + ) + rpaths.add(path.dirname(so_paths[0])) + so_paths = filesystem.find_libraries( + "libc++abi", self.spec["llvm"].prefix, shared=True, recursive=True ) - return config - - edit_config(configfiles["cuda"], adjust_cuda_config) + if len(so_paths) != 1: + raise InstallError( + "concretized llvm dependency must provide a " + "unique directory containing libc++abi, " + "found: {0}".format(so_paths) + ) + rpaths.add(path.dirname(so_paths[0])) + + def adjust_cuda_config(config): + config["default-cuda-link-line"] += " " + " ".join( + "-rpath {0}".format(p) for p in rpaths + ) + return config + + edit_config(configfiles["cuda"], adjust_cuda_config) From b52e4fc65086e2a78295d93e619fd97f54ea7153 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Wed, 7 Aug 2024 08:00:45 -0700 Subject: [PATCH 233/435] libxcvt: new package (#44640) * Adding libxcvt package Signed-off-by: Teague Sterling * [@spackbot] updating style on behalf of teaguesterling * Update package.py * Update package.py * updating checksum after swithc to x.org mirror Signed-off-by: Teague Sterling --------- Signed-off-by: Teague Sterling --- .../repos/builtin/packages/libxcvt/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libxcvt/package.py diff --git a/var/spack/repos/builtin/packages/libxcvt/package.py b/var/spack/repos/builtin/packages/libxcvt/package.py new file mode 100644 index 00000000000000..6a73ef3d859db8 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxcvt/package.py @@ -0,0 +1,16 @@ +# 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 Libxcvt(MesonPackage, XorgPackage): + """Implementation of the VESA CVT standard timing modelines generator.""" + + homepage = "https://gitlab.freedesktop.org/xorg/lib/libxcvt" + xorg_mirror_path = "lib/libxcvt-0.1.2.tar.xz" + + license("MIT", checked_by="teaguesterling") + + version("0.1.2", sha256="0561690544796e25cfbd71806ba1b0d797ffe464e9796411123e79450f71db38") From 470a26bbcd7c3c005926854b1fe0ca62781a5c23 Mon Sep 17 00:00:00 2001 From: kjrstory Date: Thu, 8 Aug 2024 01:55:33 +0900 Subject: [PATCH 234/435] openfoam-org: Add new version 11 (#39771) --- var/spack/repos/builtin/packages/openfoam-org/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py index ad9c89deadf570..d54c9e30bfbb79 100644 --- a/var/spack/repos/builtin/packages/openfoam-org/package.py +++ b/var/spack/repos/builtin/packages/openfoam-org/package.py @@ -70,6 +70,7 @@ class OpenfoamOrg(Package): license("GPL-3.0-or-later") version("develop", branch="master") + version("11", sha256="ebc0f86ead699abba61290ba8aac5b730aa93256e675d1d93a5d5f116d51e0c0") version("10", sha256="59d712ba798ca44b989b6ac50bcb7c534eeccb82bcf961e10ec19fc8d84000cf") version("9", sha256="0c48fb56e2fbb4dd534112811364d3b2dc12106e670a6486b361e4f864b435ee") version("8", sha256="94ba11cbaaa12fbb5b356e01758df403ac8832d69da309a5d79f76f42eb008fc") From ca9a7b2033a4eac4e93ef3a77b2edeac832c8bbb Mon Sep 17 00:00:00 2001 From: Sreenivasa Murthy Kolam Date: Wed, 7 Aug 2024 23:15:20 +0530 Subject: [PATCH 235/435] MIOpen-hip , RocFFT packages: fix miopendriver failure and build failure with centos-8 os (#45429) * MIOpen-hip package: fix miopendriver failure with centos-8 os * fix the centos-8 build error with lstdc++ --- var/spack/repos/builtin/packages/miopen-hip/package.py | 2 ++ var/spack/repos/builtin/packages/rocfft/package.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index b1ad016e9f61b7..84b5f1f0aa39cb 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -112,6 +112,8 @@ class MiopenHip(CMakePackage): def setup_build_environment(self, env): lib_dir = self.spec["zlib-api"].libs.directories[0] env.prepend_path("LIBRARY_PATH", lib_dir) + if self.spec.satisfies("%gcc@8.0:8.9") and self.spec.satisfies("@6.1:"): + env.append_flags("LDFLAGS", "-lstdc++fs") def get_bitcode_dir(self): return self.spec["llvm-amdgpu"].prefix.amdgcn.bitcode diff --git a/var/spack/repos/builtin/packages/rocfft/package.py b/var/spack/repos/builtin/packages/rocfft/package.py index 121e9764361640..eb56ae21317801 100644 --- a/var/spack/repos/builtin/packages/rocfft/package.py +++ b/var/spack/repos/builtin/packages/rocfft/package.py @@ -104,6 +104,8 @@ class Rocfft(CMakePackage): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("%gcc@8.0:8.9") and self.spec.satisfies("@6.1:"): + env.append_flags("LDFLAGS", "-lstdc++fs") @run_after("build") @on_package_attributes(run_tests=True) From 60c589db28d5de31581a9bae2d0ecb0952712c5f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 7 Aug 2024 19:49:29 +0200 Subject: [PATCH 236/435] PyTorch: add support for the UCC distributed backend (#45598) --- .../repos/builtin/packages/gloo/package.py | 10 +++++++-- .../builtin/packages/py-torch/package.py | 22 +++++++++---------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/var/spack/repos/builtin/packages/gloo/package.py b/var/spack/repos/builtin/packages/gloo/package.py index b554d5c30138ab..5a4d4f5110bb58 100644 --- a/var/spack/repos/builtin/packages/gloo/package.py +++ b/var/spack/repos/builtin/packages/gloo/package.py @@ -31,7 +31,7 @@ class Gloo(CMakePackage, CudaPackage): version("2018-05-29", commit="69eef748cc1dfbe0fefed69b34e6545495f67ac5") # py-torch@0.4.1 version("2018-04-06", commit="aad0002fb40612e991390d8e807f247ed23f13c5") # py-torch@:0.4.0 - depends_on("cxx", type="build") # generated + variant("libuv", default=False, description="Build libuv transport") # Gloo does not build on Linux >=6.0.3 (fixed in master) # See: https://github.com/facebookincubator/gloo/issues/345 @@ -48,7 +48,13 @@ class Gloo(CMakePackage, CudaPackage): ) generator("ninja") + depends_on("cxx", type="build") + depends_on("pkgconfig", type="build") + depends_on("libuv@1.26:", when="+libuv") depends_on("cmake@2.8.12:", type="build") def cmake_args(self): - return [self.define_from_variant("USE_CUDA", "cuda")] + return [ + self.define_from_variant("USE_CUDA", "cuda"), + self.define_from_variant("USE_LIBUV", "libuv"), + ] diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 39b041f34f4f71..663f7d49014eb6 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -91,15 +91,11 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): variant("valgrind", default=True, description="Use Valgrind", when="@1.8: platform=linux") variant("xnnpack", default=True, description="Use XNNPACK", when="@1.5:") variant("mkldnn", default=True, description="Use MKLDNN") - variant("distributed", default=not is_darwin, description="Use distributed") - variant("mpi", default=not is_darwin, description="Use MPI for Caffe2", when="+distributed") - variant("gloo", default=not is_darwin, description="Use Gloo", when="+distributed") - variant( - "tensorpipe", - default=not is_darwin, - description="Use TensorPipe", - when="@1.6: +distributed", - ) + variant("distributed", default=True, description="Use distributed") + variant("mpi", default=True, description="Use MPI for Caffe2", when="+distributed") + 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", @@ -205,6 +201,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo") depends_on("gloo@2020-03-17", when="@1.6+gloo") depends_on("gloo+cuda", when="@1.6:+gloo+cuda") + 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:+onnx_ml") @@ -278,6 +275,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("miopen-hip") depends_on("rocminfo") depends_on("mpi", when="+mpi") + depends_on("ucc", when="+ucc") + depends_on("ucx", when="+ucc") depends_on("mkl", when="+mkldnn") # Test dependencies @@ -591,6 +590,7 @@ def enable_or_disable(variant, keyword="USE", var=None): enable_or_disable("mkldnn") enable_or_disable("distributed") enable_or_disable("mpi") + enable_or_disable("ucc") # cmake/Modules/FindGloo.cmake enable_or_disable("gloo") enable_or_disable("tensorpipe") @@ -661,11 +661,9 @@ def enable_or_disable(variant, keyword="USE", var=None): env.set("USE_SYSTEM_PTHREADPOOL", "ON") env.set("USE_SYSTEM_PYBIND11", "ON") env.set("USE_SYSTEM_SLEEF", "ON") - # env.set("USE_SYSTEM_TBB", "ON") - # env.set("USE_SYSTEM_UCC", "ON") + env.set("USE_SYSTEM_UCC", "ON") # https://github.com/pytorch/pytorch/issues/60332 # env.set("USE_SYSTEM_XNNPACK", "ON") - # env.set("USE_SYSTEM_ZSTD", "ON") if self.spec.satisfies("+custom-protobuf"): env.set("BUILD_CUSTOM_PROTOBUF", "ON") From 46efa7e15144c9abf469cc7a22ee185e13a162db Mon Sep 17 00:00:00 2001 From: BOUDAOUD34 <114594090+BOUDAOUD34@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:54:33 +0200 Subject: [PATCH 237/435] namd: add compile options for ROCm (#45553) * namd:add compile options for ROCm * Combine --rocm-prefix and its value in a single opts.extend call to ensure they remain ordered correctly and improve code robustness. * Standardize the code and add ROCm conflicts * add single_node_gpu conflict --------- Co-authored-by: U-PALLAS\boudaoud --- var/spack/repos/builtin/packages/namd/package.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py index 80446885fc10f0..2b62c3ea795b1e 100644 --- a/var/spack/repos/builtin/packages/namd/package.py +++ b/var/spack/repos/builtin/packages/namd/package.py @@ -12,7 +12,7 @@ from spack.package import * -class Namd(MakefilePackage, CudaPackage): +class Namd(MakefilePackage, CudaPackage, ROCmPackage): """NAMD is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.""" @@ -104,6 +104,9 @@ class Namd(MakefilePackage, CudaPackage): depends_on("python", when="interface=python") conflicts("+avxtiles", when="@:2.14,3:", msg="AVXTiles algorithm requires NAMD 2.15") + conflicts("+rocm", when="~single_node_gpu") + conflicts("+rocm", when="+cuda", msg="NAMD supports only one GPU backend at a time") + conflicts("+single_node_gpu", when="~cuda~rocm") # https://www.ks.uiuc.edu/Research/namd/2.12/features.html # https://www.ks.uiuc.edu/Research/namd/2.13/features.html @@ -294,6 +297,14 @@ def edit(self, spec, prefix): if "+single_node_gpu" in spec: opts.extend(["--with-single-node-cuda"]) + if "+rocm" in spec: + self._copy_arch_file("hip") + opts.append("--with-hip") + opts.extend(["--rocm-prefix", os.environ["ROCM_PATH"]]) + + if "+single_node_gpu" in spec: + opts.extend(["--with-single-node-hip"]) + config = Executable("./config") config(self.build_directory, *opts) From 2298abd7f4250cdc8ec68109d89c9afb42b9d923 Mon Sep 17 00:00:00 2001 From: teddy Date: Wed, 7 Aug 2024 20:47:00 +0200 Subject: [PATCH 238/435] Add py-gmsh package (#45409) Co-authored-by: chantrait --- .../repos/builtin/packages/py-gmsh/package.py | 21 ++++++++++++++++ .../builtin/packages/py-pygmsh/package.py | 25 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-gmsh/package.py create mode 100644 var/spack/repos/builtin/packages/py-pygmsh/package.py diff --git a/var/spack/repos/builtin/packages/py-gmsh/package.py b/var/spack/repos/builtin/packages/py-gmsh/package.py new file mode 100644 index 00000000000000..b1e3ce20bf2cb9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gmsh/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyGmsh(PythonPackage): + """Pythonic interface to GMSH.""" + + homepage = "https://pypi.org/project/gmsh" + url = "https://files.pythonhosted.org/packages/30/cb/44245b93105e93ca0223f4dfbfd199803b10770e79dee63f63cb755570e0/gmsh-4.13.1-py2.py3-none-manylinux_2_24_x86_64.whl" + + maintainers("tech-91") + + license("GPL-2.0-or-later") + + version("4.13.1", sha256="89ab53b6ec28f099b723da35bcdb6f5df779b10a9c0e6b09e8059906c3a48b27") + depends_on("gmsh+opencascade", type=("build", "run")) + depends_on("python@3.7:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-pygmsh/package.py b/var/spack/repos/builtin/packages/py-pygmsh/package.py new file mode 100644 index 00000000000000..66480f2602d7af --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pygmsh/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyPygmsh(PythonPackage): + """Easier Pythonic interface to GMSH.""" + + homepage = "https://github.com/nschloe/pygmsh" + url = "https://github.com/nschloe/pygmsh/archive/refs/tags/v7.1.17.tar.gz" + + maintainers("tech-91") + + license("GPL-3.0-only") + + version("7.1.17", sha256="9c9c0fb507eb5c0d0f1f64a23909b3bda25652df737e935ea9336b08773afc4e") + + depends_on("py-flit-core@3.2:4", type="build", when="@1.3:") + depends_on("python@3.7:", type=("build", "run")) + depends_on("py-meshio@4.3.2:6", type=("build", "run")) + depends_on("py-gmsh", type=("build", "run")) + depends_on("py-numpy@1.20.0:1.26.4", type=("build", "run")) From 7efbad0d812f17c2dcffe32649d9c14db82a69dd Mon Sep 17 00:00:00 2001 From: Federico Ficarelli <1379149+nazavode@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:50:59 +0200 Subject: [PATCH 239/435] hipsycl: remove myself from maintainers (#45616) --- var/spack/repos/builtin/packages/hipsycl/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hipsycl/package.py b/var/spack/repos/builtin/packages/hipsycl/package.py index 783f9c814512a7..1a17760aac23ed 100644 --- a/var/spack/repos/builtin/packages/hipsycl/package.py +++ b/var/spack/repos/builtin/packages/hipsycl/package.py @@ -20,8 +20,6 @@ class Hipsycl(CMakePackage, ROCmPackage): url = "https://github.com/illuhad/hipSYCL/archive/v0.8.0.tar.gz" git = "https://github.com/illuhad/hipSYCL.git" - maintainers("nazavode") - provides("sycl") license("BSD-2-Clause") From 7050ace968d18f611124f43e3be5494f2862ca18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 07:26:50 +0200 Subject: [PATCH 240/435] build(deps): bump docker/build-push-action from 6.5.0 to 6.6.1 (#45623) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.5.0 to 6.6.1. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/5176d81f87c23d6fc96624dfdbcd9f3830bbe445...16ebe778df0e7752d2cfcbd924afdbbd89c1a755) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 288996881fb6ee..8d20d007608b7c 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -113,7 +113,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & Deploy ${{ matrix.dockerfile[0] }} - uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 + uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: dockerfiles/${{ matrix.dockerfile[0] }} platforms: ${{ matrix.dockerfile[1] }} From 0902910784dbe755d1ee1e0e76b9c263c6124bbc Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 8 Aug 2024 00:40:36 -0600 Subject: [PATCH 241/435] Compiler wrapper: add env var to pass vcheck flags (#44588) Fixes #43494 Add a set of environment variables SPACK_ALWAYS_CFLAGS (etc.) that are always applied by the compiler wrapper. Unlike SPACK_CFLAGS, for example, these will also be applied to version checks (both SPACK_CFLAGS and SPACK_ALWAYS_CFLAGS will be applied to the other invocation modes like ccld etc.). Using this new functionality, the classic Intel and oneAPI compilers are updated to pass compiler flags that disable warning messages when newer versions are invoked via their older binary names (these warnings were also generated for version checks, hence the need for a new wrapper variable). --------- Co-authored-by: Peter Josef Scheibel --- lib/spack/env/cc | 96 ++++++++++++++--------- lib/spack/spack/compilers/intel.py | 11 +++ lib/spack/spack/compilers/oneapi.py | 11 +++ lib/spack/spack/test/build_environment.py | 20 +++++ lib/spack/spack/test/cc.py | 9 +++ 5 files changed, 110 insertions(+), 37 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index ffaa9944df2626..ccfc14bb89dc53 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -174,6 +174,46 @@ preextend() { unset IFS } +execute() { + # dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args + if [ -n "${SPACK_TEST_COMMAND=}" ]; then + case "$SPACK_TEST_COMMAND" in + dump-args) + IFS="$lsep" + for arg in $full_command_list; do + echo "$arg" + done + unset IFS + exit + ;; + dump-env-*) + var=${SPACK_TEST_COMMAND#dump-env-} + eval "printf '%s\n' \"\$0: \$var: \$$var\"" + ;; + *) + die "Unknown test command: '$SPACK_TEST_COMMAND'" + ;; + esac + fi + + # + # Write the input and output commands to debug logs if it's asked for. + # + if [ "$SPACK_DEBUG" = TRUE ]; then + input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log" + output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log" + echo "[$mode] $command $input_command" >> "$input_log" + IFS="$lsep" + echo "[$mode] "$full_command_list >> "$output_log" + unset IFS + fi + + # Execute the full command, preserving spaces with IFS set + # to the alarm bell separator. + IFS="$lsep"; exec $full_command_list + exit +} + # Fail with a clear message if the input contains any bell characters. if eval "[ \"\${*#*${lsep}}\" != \"\$*\" ]"; then die "Compiler command line contains our separator ('${lsep}'). Cannot parse." @@ -231,12 +271,17 @@ fi # ld link # ccld compile & link +# Note. SPACK_ALWAYS_XFLAGS are applied for all compiler invocations, +# including version checks (SPACK_XFLAGS variants are not applied +# for version checks). command="${0##*/}" comp="CC" +vcheck_flags="" case "$command" in cpp) mode=cpp debug_flags="-g" + vcheck_flags="${SPACK_ALWAYS_CPPFLAGS}" ;; cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc|amdclang|cl.exe|craycc) command="$SPACK_CC" @@ -244,6 +289,7 @@ case "$command" in comp="CC" lang_flags=C debug_flags="-g" + vcheck_flags="${SPACK_ALWAYS_CFLAGS}" ;; c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC) command="$SPACK_CXX" @@ -251,6 +297,7 @@ case "$command" in comp="CXX" lang_flags=CXX debug_flags="-g" + vcheck_flags="${SPACK_ALWAYS_CXXFLAGS}" ;; ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt|amdflang|crayftn) command="$SPACK_FC" @@ -258,6 +305,7 @@ case "$command" in comp="FC" lang_flags=F debug_flags="-g" + vcheck_flags="${SPACK_ALWAYS_FFLAGS}" ;; f77|xlf|xlf_r|pgf77) command="$SPACK_F77" @@ -265,6 +313,7 @@ case "$command" in comp="F77" lang_flags=F debug_flags="-g" + vcheck_flags="${SPACK_ALWAYS_FFLAGS}" ;; ld|ld.gold|ld.lld) mode=ld @@ -365,7 +414,11 @@ unset IFS export PATH="$new_dirs" if [ "$mode" = vcheck ]; then - exec "${command}" "$@" + full_command_list="$command" + args="$@" + extend full_command_list vcheck_flags + extend full_command_list args + execute fi # Darwin's linker has a -r argument that merges object files together. @@ -722,6 +775,7 @@ case "$mode" in cc|ccld) case $lang_flags in F) + extend spack_flags_list SPACK_ALWAYS_FFLAGS extend spack_flags_list SPACK_FFLAGS ;; esac @@ -731,6 +785,7 @@ esac # C preprocessor flags come before any C/CXX flags case "$mode" in cpp|as|cc|ccld) + extend spack_flags_list SPACK_ALWAYS_CPPFLAGS extend spack_flags_list SPACK_CPPFLAGS ;; esac @@ -741,9 +796,11 @@ case "$mode" in cc|ccld) case $lang_flags in C) + extend spack_flags_list SPACK_ALWAYS_CFLAGS extend spack_flags_list SPACK_CFLAGS ;; CXX) + extend spack_flags_list SPACK_ALWAYS_CXXFLAGS extend spack_flags_list SPACK_CXXFLAGS ;; esac @@ -933,39 +990,4 @@ if [ -n "$SPACK_CCACHE_BINARY" ]; then esac fi -# dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args -if [ -n "${SPACK_TEST_COMMAND=}" ]; then - case "$SPACK_TEST_COMMAND" in - dump-args) - IFS="$lsep" - for arg in $full_command_list; do - echo "$arg" - done - unset IFS - exit - ;; - dump-env-*) - var=${SPACK_TEST_COMMAND#dump-env-} - eval "printf '%s\n' \"\$0: \$var: \$$var\"" - ;; - *) - die "Unknown test command: '$SPACK_TEST_COMMAND'" - ;; - esac -fi - -# -# Write the input and output commands to debug logs if it's asked for. -# -if [ "$SPACK_DEBUG" = TRUE ]; then - input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log" - output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log" - echo "[$mode] $command $input_command" >> "$input_log" - IFS="$lsep" - echo "[$mode] "$full_command_list >> "$output_log" - unset IFS -fi - -# Execute the full command, preserving spaces with IFS set -# to the alarm bell separator. -IFS="$lsep"; exec $full_command_list +execute diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index c7b0d8033c6eaa..023248b86e57e5 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -126,3 +126,14 @@ def fc_pic_flag(self): @property def stdcxx_libs(self): return ("-cxxlib",) + + def setup_custom_environment(self, pkg, env): + # Edge cases for Intel's oneAPI compilers when using the legacy classic compilers: + # Always pass flags to disable deprecation warnings, since these warnings can + # confuse tools that parse the output of compiler commands (e.g. version checks). + if self.cc and self.cc.endswith("icc") and self.real_version >= Version("2021"): + env.append_flags("SPACK_ALWAYS_CFLAGS", "-diag-disable=10441") + if self.cxx and self.cxx.endswith("icpc") and self.real_version >= Version("2021"): + env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441") + if self.fc and self.fc.endswith("ifort") and self.real_version >= Version("2021"): + env.append_flags("SPACK_ALWAYS_FFLAGS", "-diag-disable=10448") diff --git a/lib/spack/spack/compilers/oneapi.py b/lib/spack/spack/compilers/oneapi.py index 1baac8382687dd..fbcf7876c7451b 100644 --- a/lib/spack/spack/compilers/oneapi.py +++ b/lib/spack/spack/compilers/oneapi.py @@ -9,6 +9,7 @@ from llnl.util import tty from spack.compiler import Compiler +from spack.version import Version class Oneapi(Compiler): @@ -142,6 +143,16 @@ def setup_custom_environment(self, pkg, env): env.prepend_path("PATH", dirname(self.cxx)) env.prepend_path("LD_LIBRARY_PATH", join(dirname(dirname(self.cxx)), "lib")) + # Edge cases for Intel's oneAPI compilers when using the legacy classic compilers: + # Always pass flags to disable deprecation warnings, since these warnings can + # confuse tools that parse the output of compiler commands (e.g. version checks). + if self.cc and self.cc.endswith("icc") and self.real_version >= Version("2021"): + env.append_flags("SPACK_ALWAYS_CFLAGS", "-diag-disable=10441") + if self.cxx and self.cxx.endswith("icpc") and self.real_version >= Version("2021"): + env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441") + if self.fc and self.fc.endswith("ifort") and self.real_version >= Version("2021"): + env.append_flags("SPACK_ALWAYS_FFLAGS", "-diag-disable=10448") + # 2024 release bumped the libsycl version because of an ABI # change, 2024 compilers are required. You will see this # error: diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py index a47fb28811222f..3c381f368ce59a 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.py @@ -6,6 +6,7 @@ import os import platform import posixpath +import sys import pytest @@ -287,6 +288,25 @@ def platform_pathsep(pathlist): assert name not in os.environ +def test_compiler_custom_env(config, mock_packages, monkeypatch, working_env): + if sys.platform == "win32": + test_path = r"C:\test\path\element\custom-env" + "\\" + else: + test_path = r"/test/path/element/custom-env/" + + def custom_env(pkg, env): + env.prepend_path("PATH", test_path) + env.append_flags("ENV_CUSTOM_CC_FLAGS", "--custom-env-flag1") + + pkg = spack.spec.Spec("cmake").concretized().package + monkeypatch.setattr(pkg.compiler, "setup_custom_environment", custom_env) + spack.build_environment.setup_package(pkg, False) + + # Note: trailing slash may be stripped by internal logic + assert test_path[:-1] in os.environ["PATH"] + assert "--custom-env-flag1" in os.environ["ENV_CUSTOM_CC_FLAGS"] + + def test_external_config_env(mock_packages, mutable_config, working_env): cmake_config = { "externals": [ diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index b547641b06f30a..27d05fb7861430 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -355,6 +355,15 @@ def test_fc_flags(wrapper_environment, wrapper_flags): ) +def test_always_cflags(wrapper_environment, wrapper_flags): + with set_env(SPACK_ALWAYS_CFLAGS="-always1 -always2"): + check_args( + cc, + ["-v", "--cmd-line-v-opt"], + [real_cc] + ["-always1", "-always2"] + ["-v", "--cmd-line-v-opt"], + ) + + def test_Wl_parsing(wrapper_environment): check_args( cc, From 946489844905e603a23f6177d6ed01a0ee619ee9 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Thu, 8 Aug 2024 06:35:16 -0700 Subject: [PATCH 242/435] py-glean-sdk: add 60.5.0 and fix 60.0.1 checksum (#45630) Signed-off-by: Teague Sterling Co-authored-by: Bernhard Kaindl --- var/spack/repos/builtin/packages/py-glean-sdk/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-glean-sdk/package.py b/var/spack/repos/builtin/packages/py-glean-sdk/package.py index 1c18c1a738aba2..364df912784862 100644 --- a/var/spack/repos/builtin/packages/py-glean-sdk/package.py +++ b/var/spack/repos/builtin/packages/py-glean-sdk/package.py @@ -13,8 +13,9 @@ class PyGleanSdk(PythonPackage): license("MPL-2.0", checked_by="teaguesterling") + version("60.5.0", sha256="0a23adad449c05d2cc522dc28ef98287b59a42ff112e53e3c8b4cfe9c938f6ae") version("60.4.0", sha256="24bc608e06580962ce029cc4c09a51af75e4a29b3d889232b298f87208acbf62") - version("60.0.1", sha256="160d054b27b8ef221cfd143b531d120ed0ee6a3d0e858eb80560f56dcfb12f35") + version("60.0.1", sha256="ba7fb8b1e4ecd50da4dc2e02ef887a71d93f848580e17a6f3e947ed3bcf68726") depends_on("python@3.8:") depends_on("py-semver@2.13.0:") From 6f8d8ba47e25f2f51c932ad0fb0733ee3f47b851 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Thu, 8 Aug 2024 07:50:30 -0600 Subject: [PATCH 243/435] `openblas` : fix `install_name` on macos (#45606) --- var/spack/repos/builtin/packages/openblas/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index ae9f2e6070385d..832fdda9db1ed2 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -590,7 +590,12 @@ def check_install(self): class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): def cmake_args(self): - cmake_defs = [self.define("TARGET", "GENERIC")] + cmake_defs = [ + self.define("TARGET", "GENERIC"), + # ensure MACOSX_RPATH is set + self.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"), + ] + if self.spec.satisfies("+dynamic_dispatch"): cmake_defs += [self.define("DYNAMIC_ARCH", "ON")] if self.spec.satisfies("platform=windows"): From 1cebb7e1c3361c98e3994e9202d9c9e86d3f8df8 Mon Sep 17 00:00:00 2001 From: Andrey Perestoronin Date: Thu, 8 Aug 2024 15:44:26 +0100 Subject: [PATCH 244/435] intel-oneapi-2024.2.1 (#45618) --- .../builtin/packages/intel-oneapi-advisor/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-ccl/package.py | 6 ++++++ .../packages/intel-oneapi-compilers/package.py | 11 +++++++++++ .../builtin/packages/intel-oneapi-dal/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-dnn/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-dpct/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-dpl/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-ipp/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-ippcp/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-mkl/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-mpi/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-tbb/package.py | 6 ++++++ .../builtin/packages/intel-oneapi-vtune/package.py | 6 ++++++ 13 files changed, 83 insertions(+) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py index d973e105b71e1d..545bee01d95f15 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py @@ -24,6 +24,12 @@ class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/advisor.html" ) + version( + "2024.2.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/65f69c5c-b41f-4688-8a41-ece8f2bbbb5a/l_oneapi_advisor_p_2024.2.1.44_offline.sh", + sha256="2ef23dac756dc41bd7021297d3f3248968d7a0e29372e6b19b8752eb8d2e6a61", + expand=False, + ) version( "2024.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/a4c8046c-6abf-4f53-a33c-4a587cd80fc1/l_oneapi_advisor_p_2024.2.0.683_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py index 98f14a66273d34..ae26272fa392fe 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py @@ -27,6 +27,12 @@ class IntelOneapiCcl(IntelOneApiLibraryPackage): depends_on("intel-oneapi-mpi") + version( + "2021.13.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/4b4cf672-c1f9-4bac-97c4-f4ae10a0a020/l_oneapi_ccl_p_2021.13.1.32_offline.sh", + sha256="05027a00d3b97754c8ba4ec009901b95e11a88d32c1206ea464ac6ea8b5aa03b", + expand=False, + ) version( "2021.13.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2413acba-2216-4a35-9c74-82694a20d176/l_oneapi_ccl_p_2021.13.0.300_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index 1853f00fb18318..db11f5fd040eb1 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -9,6 +9,17 @@ from spack.package import * versions = [ + { + "version": "2024.2.1", + "cpp": { + "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/74587994-3c83-48fd-b963-b707521a63f4/l_dpcpp-cpp-compiler_p_2024.2.1.79_offline.sh", + "sha256": "af0243f80640afa94c7f9c8151da91d7ab17f448f542fa76d785230dec712048", + }, + "ftn": { + "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5e7b0f1c-6f25-4cc8-94d7-3a527e596739/l_fortran-compiler_p_2024.2.1.80_offline.sh", + "sha256": "6f6dab82a88082a7a39f6feb699343c521f58c6481a1bb87edba7e2550995b6d", + }, + }, { "version": "2024.2.0", "cpp": { diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py index fcc6c97240cea1..5e4fa856f0ecfb 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py @@ -26,6 +26,12 @@ class IntelOneapiDal(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onedal.html" ) + version( + "2024.6.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1edf7074-80f8-4b97-aad3-5023b41b7ecd/l_daal_oneapi_p_2024.6.0.418_offline.sh", + sha256="2e5966348df4dd70b2887512dca12ecc671de831a30ca21a23a28822c4d24f9f", + expand=False, + ) version( "2024.5.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6ca2d1a8-b7c7-4a70-9c38-2b437dacae1a/l_daal_oneapi_p_2024.5.0.284_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py index d27f0c6931376d..93a34ef4cd1f1c 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py @@ -26,6 +26,12 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onednn.html" ) + version( + "2024.2.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7c850be0-b17d-4b7f-898d-3bc5fc36aa8d/l_onednn_p_2024.2.1.76_offline.sh", + sha256="86f143568529465d6e8b87763e645774f40ac3c38d7713088a597a3f941978bb", + expand=False, + ) version( "2024.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6f830f51-56cd-4ea6-ade7-0f066c9b1939/l_onednn_p_2024.2.0.571_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py index 801512ad13f3a6..5acc3766782371 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py @@ -19,6 +19,12 @@ class IntelOneapiDpct(IntelOneApiPackage): homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compatibility-tool.html#gs.2p8km6" + version( + "2024.2.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e3b7b68d-65dd-4d03-9119-ce3ad448657e/l_dpcpp-ct_p_2024.2.1.64_offline.sh", + sha256="87af24e0151bcde66c568f73156532a055569b349a7dbd34178344245a43ca1f", + expand=False, + ) version( "2024.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6b83dabd-75cf-4371-b4cd-91160175d5ff/l_dpcpp-ct_p_2024.2.0.424_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py index 215f464294d2bd..f631242b634a67 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py @@ -22,6 +22,12 @@ class IntelOneapiDpl(IntelOneApiLibraryPackage): homepage = "https://github.com/oneapi-src/oneDPL" + version( + "2022.6.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fe007d71-c49f-4cdd-8a95-5c8e29c5b19c/l_oneDPL_p_2022.6.1.15_offline.sh", + sha256="44eb3d12321e4fbf0bf8f78f47831ce4d5825cc041037ff919dca79db3354c7d", + expand=False, + ) version( "2022.6.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/65565430-3eb6-49ad-ae51-e35314cc6f08/l_oneDPL_p_2022.6.0.560_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py index aac8357a45ecbd..95781edbb690e8 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py @@ -27,6 +27,12 @@ class IntelOneapiIpp(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html" ) + version( + "2021.12.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7e07b203-af56-4b52-b69d-97680826a8df/l_ipp_oneapi_p_2021.12.1.16_offline.sh", + sha256="2d53745148d33f44895f4a9f9ba123c689efedbc739ab13630f25b4a1ce53165", + expand=False, + ) version( "2021.12.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ecc315bf-9e5a-4a23-b0ca-f58aea109e39/l_ipp_oneapi_p_2021.12.0.559_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py index 0c8f9c65999753..bc988992c67423 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py @@ -28,6 +28,12 @@ class IntelOneapiIppcp(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html" ) + version( + "2021.12.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/8d82c537-2756-4000-a6cf-d7fedbfb9499/l_ippcp_oneapi_p_2021.12.1.14_offline.sh", + sha256="d83dc57a2471579297dd3a303b93c50c6be37c0f7aaac80d0fc34dda90e4750a", + expand=False, + ) version( "2021.12.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/16cce450-2d08-474f-a783-da6061bd8de9/l_ippcp_oneapi_p_2021.12.0.472_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py index 986b584766b3f8..fc517708857ced 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -25,6 +25,12 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html" ) + version( + "2024.2.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6e00e368-b61d-4f87-a409-9b510c022a37/l_onemkl_p_2024.2.1.105_offline.sh", + sha256="adfb1391f87a0a638772ac3146db92126a4accf4da1fe8707a000b27dd2448ef", + expand=False, + ) version( "2024.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cdff21a5-6ac7-4b41-a7ec-351b5f9ce8fd/l_onemkl_p_2024.2.0.664_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py index 867fb1440a4606..98485a754af905 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py @@ -21,6 +21,12 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage): homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/mpi-library.html" + version( + "2021.13.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/364c798c-4cad-4c01-82b5-e1edd1b476af/l_mpi_oneapi_p_2021.13.1.769_offline.sh", + sha256="be61c4792d25bd4a1b5f7b808c06a9f4676f1b247d7605ac6d3c6cffdb8f19b7", + expand=False, + ) version( "2021.13.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/9f84e1e8-11b2-4bd1-8512-3e3343585956/l_mpi_oneapi_p_2021.13.0.719_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py index 5fbba70f83b35a..622814ee7ef4e5 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py @@ -22,6 +22,12 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onetbb.html" ) + version( + "2021.13.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b9aad7b8-0a4c-4f95-a100-e0e2921d5777/l_tbb_oneapi_p_2021.13.1.15_offline.sh", + sha256="cae21300e5e4e3bbb392b24db54246a103c1634296529617292be62e7b8505a4", + expand=False, + ) version( "2021.13.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d6b5327e-f2fd-4c90-966a-d7a0e1376686/l_tbb_oneapi_p_2021.13.0.629_offline.sh", diff --git a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py index 69df769849172b..f11c5745726448 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py @@ -25,6 +25,12 @@ class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk): homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html" + version( + "2024.2.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d703d28b-d70b-4c90-bdb1-c3562c1084e5/l_oneapi_vtune_p_2024.2.1.68_offline.sh", + sha256="09d8a6b025eb895a3a5fa593f63de1f04aced37bf7f7c1ec8efc2525df8bb4f1", + expand=False, + ) version( "2024.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/3ffac886-6281-46d7-8704-7aab66705926/l_oneapi_vtune_p_2024.2.0.708_offline.sh", From 8b2fec61f23a7b8230c0ed0378d90d04d8f590d8 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Thu, 8 Aug 2024 10:19:26 -0500 Subject: [PATCH 245/435] hepmc3: add v3.3.0 (#45617) --- var/spack/repos/builtin/packages/hepmc3/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hepmc3/package.py b/var/spack/repos/builtin/packages/hepmc3/package.py index b7d13f03c7838b..53ce10eb9a5752 100644 --- a/var/spack/repos/builtin/packages/hepmc3/package.py +++ b/var/spack/repos/builtin/packages/hepmc3/package.py @@ -20,6 +20,7 @@ class Hepmc3(CMakePackage): license("LGPL-3.0-or-later") + version("3.3.0", sha256="6f876091edcf7ee6d0c0db04e080056e89efc1a61abe62355d97ce8e735769d6") version("3.2.7", sha256="587faa6556cc54ccd89ad35421461b4761d7809bc17a2e72f5034daea142232b") version("3.2.6", sha256="248f3b5b36dd773844cbe73d51f60891458334b986b259754c59dbf4bbf1d525") version("3.2.5", sha256="cd0f75c80f75549c59cc2a829ece7601c77de97cb2a5ab75790cac8e1d585032") @@ -79,7 +80,7 @@ def cmake_args(self): if spec.satisfies("+rootio"): args.append(self.define("ROOT_DIR", spec["root"].prefix)) - if spec.satisfies("@3.2.4:"): + if spec.satisfies("@3.2.4:3.2"): args.append( self.define("HEPMC3_CXX_STANDARD", spec["root"].variants["cxxstd"].value) ) From 007c1148c03927cc53e816b65d7b8f236d00c845 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 8 Aug 2024 18:15:42 +0200 Subject: [PATCH 246/435] Remove `Compiler.PrgEnv*` attributes (#45615) --- lib/spack/spack/compiler.py | 5 ----- lib/spack/spack/compilers/aocc.py | 3 --- lib/spack/spack/compilers/cce.py | 5 +---- lib/spack/spack/compilers/gcc.py | 3 --- lib/spack/spack/compilers/intel.py | 3 --- lib/spack/spack/compilers/nvhpc.py | 3 --- lib/spack/spack/compilers/oneapi.py | 3 --- lib/spack/spack/compilers/pgi.py | 3 --- lib/spack/spack/compilers/rocmcc.py | 3 --- 9 files changed, 1 insertion(+), 30 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 13049883e7f2bd..341b77db05b1af 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -278,11 +278,6 @@ def debug_flags(self): def opt_flags(self): return ["-O", "-O0", "-O1", "-O2", "-O3"] - # Cray PrgEnv name that can be used to load this compiler - PrgEnv: Optional[str] = None - # Name of module used to switch versions of this compiler - PrgEnv_compiler: Optional[str] = None - def __init__( self, cspec, diff --git a/lib/spack/spack/compilers/aocc.py b/lib/spack/spack/compilers/aocc.py index ad67e173380e47..26e0b7d893cb19 100644 --- a/lib/spack/spack/compilers/aocc.py +++ b/lib/spack/spack/compilers/aocc.py @@ -25,9 +25,6 @@ class Aocc(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ["flang"] - PrgEnv = "PrgEnv-aocc" - PrgEnv_compiler = "aocc" - version_argument = "--version" @property diff --git a/lib/spack/spack/compilers/cce.py b/lib/spack/spack/compilers/cce.py index e9377a0bb1bab7..ae3d9889a3a892 100644 --- a/lib/spack/spack/compilers/cce.py +++ b/lib/spack/spack/compilers/cce.py @@ -34,12 +34,9 @@ def __init__(self, *args, **kwargs): # MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes. suffixes = [r"-mp-\d\.\d"] - PrgEnv = "PrgEnv-cray" - PrgEnv_compiler = "cce" - @property def link_paths(self): - if any(self.PrgEnv in m for m in self.modules): + if any("PrgEnv-cray" in m for m in self.modules): # Old module-based interface to cray compilers return { "cc": os.path.join("cce", "cc"), diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 6d635523ae4e74..acf3003c3df5f5 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -40,9 +40,6 @@ class Gcc(spack.compiler.Compiler): "fc": os.path.join("gcc", "gfortran"), } - PrgEnv = "PrgEnv-gnu" - PrgEnv_compiler = "gcc" - @property def verbose_flag(self): return "-v" diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 023248b86e57e5..1e8ad20afa8f59 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -31,9 +31,6 @@ class Intel(Compiler): "fc": os.path.join("intel", "ifort"), } - PrgEnv = "PrgEnv-intel" - PrgEnv_compiler = "intel" - if sys.platform == "win32": version_argument = "/QV" else: diff --git a/lib/spack/spack/compilers/nvhpc.py b/lib/spack/spack/compilers/nvhpc.py index 1078e921081af9..813d14a6c2df5b 100644 --- a/lib/spack/spack/compilers/nvhpc.py +++ b/lib/spack/spack/compilers/nvhpc.py @@ -29,9 +29,6 @@ class Nvhpc(Compiler): "fc": os.path.join("nvhpc", "nvfortran"), } - PrgEnv = "PrgEnv-nvhpc" - PrgEnv_compiler = "nvhpc" - version_argument = "--version" version_regex = r"nv[^ ]* (?:[^ ]+ Dev-r)?([0-9.]+)(?:-[0-9]+)?" diff --git a/lib/spack/spack/compilers/oneapi.py b/lib/spack/spack/compilers/oneapi.py index fbcf7876c7451b..e8edc227d8a35a 100644 --- a/lib/spack/spack/compilers/oneapi.py +++ b/lib/spack/spack/compilers/oneapi.py @@ -33,9 +33,6 @@ class Oneapi(Compiler): "fc": os.path.join("oneapi", "ifx"), } - PrgEnv = "PrgEnv-oneapi" - PrgEnv_compiler = "oneapi" - version_argument = "--version" version_regex = r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)" diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index 1e8656fd3fbfb3..1dd7eeed42a7cd 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -30,9 +30,6 @@ class Pgi(Compiler): "fc": os.path.join("pgi", "pgfortran"), } - PrgEnv = "PrgEnv-pgi" - PrgEnv_compiler = "pgi" - version_argument = "-V" ignore_version_errors = [2] # `pgcc -V` on PowerPC annoyingly returns 2 version_regex = r"pg[^ ]* ([0-9.]+)-[0-9]+ (LLVM )?[^ ]+ target on " diff --git a/lib/spack/spack/compilers/rocmcc.py b/lib/spack/spack/compilers/rocmcc.py index 863d3c2cbfbd6b..5dc8d1c1d30590 100644 --- a/lib/spack/spack/compilers/rocmcc.py +++ b/lib/spack/spack/compilers/rocmcc.py @@ -23,9 +23,6 @@ class Rocmcc(spack.compilers.clang.Clang): # Subclasses use possible names of Fortran 90 compiler fc_names = ["amdflang"] - PrgEnv = "PrgEnv-amd" - PrgEnv_compiler = "amd" - @property def link_paths(self): link_paths = { From 7b879d092d418fc938a715799b081d1648e20bc5 Mon Sep 17 00:00:00 2001 From: Vicente Bolea Date: Thu, 8 Aug 2024 12:35:48 -0400 Subject: [PATCH 247/435] vtk-m: update vtk-m to 2.2.0 (#45544) --- ...fix-typo-thrust-dependency-with-rocm.patch | 73 +++++++++++++++++++ .../repos/builtin/packages/vtk-m/package.py | 16 ++-- 2 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch diff --git a/var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch b/var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch new file mode 100644 index 00000000000000..c7ddcc44fbdc8c --- /dev/null +++ b/var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch @@ -0,0 +1,73 @@ +From be6649803d199c33bb6abcaab57074dca066f1c0 Mon Sep 17 00:00:00 2001 +From: Vicente Adolfo Bolea Sanchez +Date: Fri, 2 Aug 2024 17:43:54 -0400 +Subject: [PATCH] ci,thrust: fix typo thrust dependency with kokkos + +--- + CMakeLists.txt | 14 ++++++++++++-- + README.md | 1 + + vtkm/cont/kokkos/internal/CMakeLists.txt | 8 +++++++- + 3 files changed, 20 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 561bee9835..46d1cfc37c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -264,11 +264,21 @@ include(VTKmWrappers) + + # By default: Set VTKm_ENABLE_KOKKOS_THRUST to ON if VTKm_ENABLE_KOKKOS is ON, otherwise + # disable it (or if the user explicitly turns this option OFF) +-cmake_dependent_option(VTKm_ENABLE_KOKKOS_THRUST "Enable Kokkos thrust support (only valid with CUDA and HIP)" +- ON "VTKm_ENABLE_KOKKOS;Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP" OFF) ++cmake_dependent_option( ++ VTKm_ENABLE_KOKKOS_THRUST ++ "Enable Kokkos thrust support (only valid with CUDA and HIP)" ++ ON ++ "VTKm_ENABLE_KOKKOS;Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP; NOT Kokkos_ENABLE_HIP AND CMAKE_VERSION VERSION_LESS 3.24" ++ OFF ++) + + # CUDA already provides thrust + if (VTKm_ENABLE_KOKKOS_THRUST AND TARGET vtkm_kokkos_hip) ++ if (CMAKE_VERSION VERSION_LESS 3.24) ++ message(FATAL_ERROR "VTKm_ENABLE_KOKKOS_THRUST=ON with HIP needs CMAKE >= 3.24") ++ endif() ++ # This policy is needed for LINK_ONLY to work in LINK_LIBRARIES. ++ cmake_policy(SET CMP0131 NEW) + find_package(rocthrust REQUIRED CONFIG) + endif() + +diff --git a/README.md b/README.md +index aad908b955..8f5512a7e6 100644 +--- a/README.md ++++ b/README.md +@@ -76,6 +76,7 @@ VTK-m Requires: + + [CMake](http://www.cmake.org/download/) + + CMake 3.12+ + + CMake 3.13+ (for CUDA support) ++ + CMake 3.24+ (for ROCM+THRUST support) + + Optional dependencies are: + +diff --git a/vtkm/cont/kokkos/internal/CMakeLists.txt b/vtkm/cont/kokkos/internal/CMakeLists.txt +index 7777005f3e..210d9ed25c 100644 +--- a/vtkm/cont/kokkos/internal/CMakeLists.txt ++++ b/vtkm/cont/kokkos/internal/CMakeLists.txt +@@ -35,7 +35,13 @@ if (TARGET vtkm_kokkos) + set_source_files_properties(${sources} TARGET_DIRECTORY vtkm_cont PROPERTIES LANGUAGE HIP) + kokkos_compilation(SOURCE ${sources}) + if (VTKm_ENABLE_KOKKOS_THRUST) +- target_link_libraries(vtkm_cont PRIVATE $<$:roc::rocthrust>) ++ # rocthrust does not wrap its compile defs/ops/dirs with $<$. ++ # We need this workaround since we mix CXX and HIP source files in vtkm_cont. ++ target_link_libraries(vtkm_cont ++ PRIVATE ++ $<$:roc::rocthrust> ++ $ ++ ) + endif() + endif() + +-- +2.35.3 + diff --git a/var/spack/repos/builtin/packages/vtk-m/package.py b/var/spack/repos/builtin/packages/vtk-m/package.py index c17a85318a1c39..699cdb53ac0017 100644 --- a/var/spack/repos/builtin/packages/vtk-m/package.py +++ b/var/spack/repos/builtin/packages/vtk-m/package.py @@ -29,12 +29,12 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version("release", branch="release") - version("2.2.0-rc1", sha256="32643cf3564fa77f8e2a2a5456a574b6b2355bb68918eb62ccde493993ade1a3") version( - "2.1.0", - sha256="9cf3522b6dc0675281a1a16839464ebd1cc5f9c08c20eabee1719b3bcfdcf41f", + "2.2.0", + sha256="ee66b6bbd33f6ad6f2350e11a7c9328492e53935ba8f66b4b1d01f074eb96341", preferred=True, ) + version("2.1.0", sha256="9cf3522b6dc0675281a1a16839464ebd1cc5f9c08c20eabee1719b3bcfdcf41f") version("2.0.0", sha256="32643cf3564fa77f8e2a2a5456a574b6b2355bb68918eb62ccde493993ade1a3") version("1.9.0", sha256="12355dea1a24ec32767260068037adeb71abb3df2f9f920c92ce483f35ff46e4") version("1.8.0", sha256="fcedee6e8f4ac50dde56e8c533d48604dbfb663cea1561542a837e8e80ba8768") @@ -121,7 +121,7 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage): depends_on("hip@3.7:", when="+rocm") # CUDA thrust is already include in the CUDA pkg - depends_on("rocthrust", when="@2.1: +kokkos+rocm") + depends_on("rocthrust", when="@2.2: +kokkos+rocm ^cmake@3.24:") # The rocm variant is only valid options for >= 1.7. It would be better if # this could be expressed as a when clause to disable the rocm variant, @@ -152,13 +152,17 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage): # VTK-M PR#3160 # https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3160 - patch("mr3160-rocthrust-fix.patch", when="@2.1:") + patch("mr3160-rocthrust-fix.patch", when="@2.1") + + # VTK-M PR#3258 + # https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3258 + patch("mr3258-fix-typo-thrust-dependency-with-rocm.patch", when="@2.2:") # Disable Thrust patch that is no longer needed in modern Thrust patch( "https://github.com/Kitware/VTK-m/commit/4a4466e7c8cd44d2be2bd3fe6f359faa8e9547aa.patch?full_index=1", sha256="58dc104ba05ec99c359eeec3ac094cdb071053a4250f4ad9d72ef6a356c4346e", - when="@1.6.0: +cuda ^cuda@12.5:", + when="@1.6.0:2.1 +cuda ^cuda@12.5:", ) def cmake_args(self): From 6b936884f5a4124a76f803f1fab1270144f1cd64 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Thu, 8 Aug 2024 11:00:39 -0600 Subject: [PATCH 248/435] py-rioxarray: add v0.17.0 (#45529) * Update available versions * fix style * Reduce added versions to just a single new version as per review * fix style * Set dependency versions in line with pyproject and setup.py * add new interp variant * add wheel as required * Add variant description * change +interp default, actually add packaging this time --- .../builtin/packages/py-rioxarray/package.py | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-rioxarray/package.py b/var/spack/repos/builtin/packages/py-rioxarray/package.py index 0eba71e8a70f57..720937c102c68a 100644 --- a/var/spack/repos/builtin/packages/py-rioxarray/package.py +++ b/var/spack/repos/builtin/packages/py-rioxarray/package.py @@ -16,13 +16,30 @@ class PyRioxarray(PythonPackage): license("Apache-2.0") + version("0.17.0", sha256="46c29938827fff268d497f7ae277077066fcfbac4e53132ed3d4e2b96455be62") version( "0.4.1.post0", sha256="f043f846724a58518f87dd3fa84acbe39e15a1fac7e64244be3d5dacac7fe62b" ) - depends_on("python@3.7:", type=("build", "run")) + # interpolation variant + variant("interp", default=False, when="@0.17.0:", description="Enable interpolation routines") + depends_on("py-setuptools", type="build") - depends_on("py-rasterio", type=("build", "run")) - depends_on("py-scipy", type=("build", "run")) - depends_on("py-xarray@0.17:", type=("build", "run")) - depends_on("py-pyproj@2.2:", type=("build", "run")) + + with when("@0.17.0"): + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-packaging", type=("build", "run")) + depends_on("py-rasterio@1.3:", type=("build", "run")) + depends_on("py-xarray@2022.3.0:", type=("build", "run")) + depends_on("py-pyproj@3.3:", type=("build", "run")) + depends_on("py-numpy@1.23:", type=("build", "run")) + depends_on("py-scipy", type=("build", "run"), when="+interp") + + with when("@0.4.1.post0"): + depends_on("python@3.7:", type=("build", "run")) + depends_on("py-rasterio", type=("build", "run")) + depends_on("py-xarray@0.17:", type=("build", "run")) + depends_on("py-pyproj@2.2:", type=("build", "run")) + + # not an optional in this version + depends_on("py-scipy", type=("build", "run")) From 28fe85ae6614a5d7e3e353a87afad2b6a2901998 Mon Sep 17 00:00:00 2001 From: Eric Lingerfelt <30530322+ericlingerfelt@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:58:21 -0600 Subject: [PATCH 249/435] Adding ecmwf-atlas version 0.38 (#45505) --- var/spack/repos/builtin/packages/ecmwf-atlas/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py index 900eb13fc20d47..29f9198c8fb2a8 100644 --- a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py +++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py @@ -22,6 +22,8 @@ class EcmwfAtlas(CMakePackage): version("master", branch="master") version("develop", branch="develop") + version("0.38.1", sha256="c6868deb483c1d6c241aae92f8af63f3351062c2611c9163e8a9bbf6c97a9798") + version("0.38.0", sha256="befe3bfc045bc0783126efb72ed55db9f205eaf176e1b8a2059eaaaaacc4880a") version("0.36.0", sha256="39bf748aa7b22df80b9791fbb6b4351ed9a9f85587b58fc3225314278a2a68f8") version("0.35.1", sha256="7a344aaa8a1378d989a7bb883eb741852c5fa494630be6d8c88e477e4b9c5be1") version("0.35.0", sha256="5a4f898ffb4a33c738b6f86e4e2a4c8e26dfd56d3c3399018081487374e29e97") From 95b533ddcd465db54a8dc50182eeecdbce286a9a Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:18:35 -0600 Subject: [PATCH 250/435] flux-sched: add version 0.36.1 (#45619) Signed-off-by: vsoch Co-authored-by: vsoch --- var/spack/repos/builtin/packages/flux-sched/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py index d75024e041c338..24f75fe18652af 100644 --- a/var/spack/repos/builtin/packages/flux-sched/package.py +++ b/var/spack/repos/builtin/packages/flux-sched/package.py @@ -24,6 +24,7 @@ class FluxSched(CMakePackage, AutotoolsPackage): license("LGPL-3.0-only") version("master", branch="master") + version("0.36.1", sha256="0ee37ed364912f3f5a48ed5b5f5f21cb86cda43ff357486695b9454c217ad8b8") version("0.36.0", sha256="c20814eae65b6eb9f2c919dbcc216dd4b87f038a341cf99510cca88d43631c41") version("0.35.0", sha256="38fde51464f4e34ecbd1e4fbbf00267f96b639db5987257a7ad07f811e2f09d2") version("0.34.0", sha256="10c03d78fa2302de7ddf9599ea59fb7a2dc7ccf6f526fd9fbfc9e3ff6ba39713") From 546e0925b0c8b07ec1fa71b0a4bfb2dd983d11eb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 8 Aug 2024 13:28:19 -0600 Subject: [PATCH 251/435] odc: add v1.5.2 (#45622) * Add odc@1.5.2 * Add climbfuji as maintainer in var/spack/repos/builtin/packages/odc/package.py --- var/spack/repos/builtin/packages/odc/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/odc/package.py b/var/spack/repos/builtin/packages/odc/package.py index b34a279701cb09..20a9026d18fbfa 100644 --- a/var/spack/repos/builtin/packages/odc/package.py +++ b/var/spack/repos/builtin/packages/odc/package.py @@ -12,10 +12,11 @@ class Odc(CMakePackage): homepage = "https://github.com/ecmwf/odc" url = "https://github.com/ecmwf/odc/archive/refs/tags/1.3.0.tar.gz" - maintainers("skosukhin") + maintainers("skosukhin", "climbfuji") license("Apache-2.0") + version("1.5.2", sha256="49575c3ef9ae8825d588357022d0ff6caf3e557849888c9d2f0677e9efe95869") version("1.4.6", sha256="ff99d46175e6032ddd0bdaa3f6a5e2c4729d24b698ba0191a2a4aa418f48867c") version("1.4.5", sha256="8532d0453531d62e1f15791d1c5c96540b842913bd211a8ef090211eaf4cccae") version("1.3.0", sha256="97a4f10765b341cc8ccbbf203f5559cb1b838cbd945f48d4cecb1bc4305e6cd6") From 7bec524dd5b8055eab7bd06ac820c1df47bf6ddf Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:01:06 -0700 Subject: [PATCH 252/435] Install test root update: old to new API (#45491) * convert install_test_root from old to new API --- var/spack/repos/builtin/packages/heffte/package.py | 2 +- var/spack/repos/builtin/packages/kokkos/package.py | 2 +- var/spack/repos/builtin/packages/py-chainer/package.py | 2 +- var/spack/repos/builtin/packages/tasmanian/package.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index dc20db8a4fe40a..a397f95f740b8c 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -129,7 +129,7 @@ def setup_smoke_test(self): if self.spec.satisfies("@:2.2.0"): return install_tree( - self.prefix.share.heffte.testing, join_path(self.install_test_root, "testing") + self.prefix.share.heffte.testing, join_path(install_test_root(self), "testing") ) def test_make_test(self): diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 18ef8b9f01ac94..7dbfd79a1a6007 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -392,7 +392,7 @@ def setup_build_tests(self): cmake_source_path, "-DSPACK_PACKAGE_SOURCE_DIR:PATH={0}".format(self.stage.source_path), "-DSPACK_PACKAGE_TEST_ROOT_DIR:PATH={0}".format( - join_path(self.install_test_root, cmake_out_path) + join_path(install_test_root(self), cmake_out_path) ), "-DSPACK_PACKAGE_INSTALL_DIR:PATH={0}".format(self.prefix), ] diff --git a/var/spack/repos/builtin/packages/py-chainer/package.py b/var/spack/repos/builtin/packages/py-chainer/package.py index f284f2a054e330..77167c0b363ed0 100644 --- a/var/spack/repos/builtin/packages/py-chainer/package.py +++ b/var/spack/repos/builtin/packages/py-chainer/package.py @@ -59,7 +59,7 @@ def test_chainermn(self): if "+mn" not in self.spec: raise SkipTest("Test only supported when built with +mn") - mnist_file = join_path(self.install_test_root.examples.chainermn.mnist, "train_mnist.py") + mnist_file = join_path(install_test_root(self).examples.chainermn.mnist, "train_mnist.py") mpirun = which(self.spec["mpi"].prefix.bin.mpirun) opts = ["-n", "4", python.path, mnist_file, "-o", "."] env["OMP_NUM_THREADS"] = "4" diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py index 6a43c5ee04f1f1..c858c6713e436e 100644 --- a/var/spack/repos/builtin/packages/tasmanian/package.py +++ b/var/spack/repos/builtin/packages/tasmanian/package.py @@ -122,7 +122,7 @@ def cmake_args(self): @run_after("install") def setup_smoke_test(self): install_tree( - self.prefix.share.Tasmanian.testing, join_path(self.install_test_root, "testing") + self.prefix.share.Tasmanian.testing, join_path(install_test_root(self), "testing") ) def test_make_test(self): From 899ac7888761746b735089473873a68c45c7cfb4 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:23:05 -0700 Subject: [PATCH 253/435] cxx: new test API (#45462) * cxx: new test API * gcc: provide cxx * default providers: cxx provided by gcc * cxx: cleanup stand-alone test - test_c -> test_cxx - simplify compilation and execution - corrected output checks --------- Co-authored-by: Tamara Dahlgren --- etc/spack/defaults/packages.yaml | 1 + .../repos/builtin/packages/cxx/package.py | 45 +++++++++---------- .../repos/builtin/packages/gcc/package.py | 2 + 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 25a707e4ddf331..38bc2014d5a521 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -20,6 +20,7 @@ packages: awk: [gawk] armci: [armcimpi] blas: [openblas, amdblis] + cxx: [gcc] D: [ldc] daal: [intel-oneapi-daal] elf: [elfutils] diff --git a/var/spack/repos/builtin/packages/cxx/package.py b/var/spack/repos/builtin/packages/cxx/package.py index c34e8af7bb9082..bedd235fd8f14e 100644 --- a/var/spack/repos/builtin/packages/cxx/package.py +++ b/var/spack/repos/builtin/packages/cxx/package.py @@ -14,28 +14,27 @@ class Cxx(Package): homepage = "https://isocpp.org/std/the-standard" virtual = True - def test(self): - test_source = self.test_suite.current_test_data_dir + def test_cxx(self): + """Compile and run 'Hello World'""" + cxx = which(os.environ["CXX"]) + expected = ["Hello world", "YES!"] + test_source = self.test_suite.current_test_data_dir for test in os.listdir(test_source): - filepath = os.path.join(test_source, test) - exe_name = "%s.exe" % test - - cxx_exe = os.environ["CXX"] - - # standard options - # Hack to get compiler attributes - # TODO: remove this when compilers are dependencies - c_name = clang if self.spec.satisfies("llvm+clang") else self.name - c_spec = spack.spec.CompilerSpec(c_name, self.spec.version) - c_cls = spack.compilers.class_for_compiler_name(c_name) - compiler = c_cls(c_spec, None, None, ["fakecc", "fakecxx"]) - - cxx_opts = [compiler.cxx11_flag] if "c++11" in test else [] - - cxx_opts += ["-o", exe_name, filepath] - compiled = self.run_test(cxx_exe, options=cxx_opts, installed=True) - - if compiled: - expected = ["Hello world", "YES!"] - self.run_test(exe_name, expected=expected) + exe_name = f"{test}.exe" + filepath = test_source.join(test) + with test_part(self, f"test_cxx_{test}", f"build and run {exe_name}"): + # standard options + # Hack to get compiler attributes + # TODO: remove this when compilers are dependencies + c_name = clang if self.spec.satisfies("llvm+clang") else self.name + c_spec = spack.spec.CompilerSpec(c_name, self.spec.version) + c_cls = spack.compilers.class_for_compiler_name(c_name) + compiler = c_cls(c_spec, None, None, ["fakecc", "fakecxx"]) + cxx_opts = [compiler.cxx11_flag] if "c++11" in test else [] + cxx_opts += ["-o", exe_name, filepath] + + cxx(*cxx_opts) + exe = which(exe_name) + out = exe(output=str.split, error=str.split) + check_outputs(expected, out) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 81e325feda4fc2..0a91eb83d854a6 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -34,6 +34,8 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage): license("GPL-2.0-or-later AND LGPL-2.1-or-later") + provides("cxx") + version("master", branch="master") version("14.2.0", sha256="a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9") From 92e42bbed96f0faadde8808b0be8f878c14c38da Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:13:57 -0400 Subject: [PATCH 254/435] Windows: Port Libuv (#45413) * On Windows it is built with CMake, however CMake is built against libuv, so libuv must depend on cmake+ownlibs to short circuit the circular dependency * libuv currently fetches the -dist source distribution of libuv for certain versions because those versions contain a pre-generated ./configure script. However those distributions have all CMake files removed, so they cannot be used to build on Windows. Because the source distributions are different, this means the checksums are different, and necessitates an additional version declaration for each version we want to support with CMake. --- .../repos/builtin/packages/gloo/package.py | 1 + .../repos/builtin/packages/libuv/package.py | 90 ++++++++++++++++--- 2 files changed, 77 insertions(+), 14 deletions(-) diff --git a/var/spack/repos/builtin/packages/gloo/package.py b/var/spack/repos/builtin/packages/gloo/package.py index 5a4d4f5110bb58..4d431020a87437 100644 --- a/var/spack/repos/builtin/packages/gloo/package.py +++ b/var/spack/repos/builtin/packages/gloo/package.py @@ -52,6 +52,7 @@ class Gloo(CMakePackage, CudaPackage): depends_on("pkgconfig", type="build") depends_on("libuv@1.26:", when="+libuv") depends_on("cmake@2.8.12:", type="build") + depends_on("libuv", when="platform=windows") def cmake_args(self): return [ diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py index f6a5947957a670..5b578d419e90e0 100644 --- a/var/spack/repos/builtin/packages/libuv/package.py +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -2,25 +2,63 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + +import spack.build_systems from spack.package import * -class Libuv(AutotoolsPackage): +class Libuv(CMakePackage, AutotoolsPackage): """Multi-platform library with a focus on asynchronous IO""" homepage = "https://libuv.org" - url = "https://dist.libuv.org/dist/v1.44.1/libuv-v1.44.1-dist.tar.gz" + url = "https://dist.libuv.org/dist/v1.44.1/libuv-v1.44.1.tar.gz" list_url = "https://dist.libuv.org/dist" list_depth = 1 license("MIT") - version("1.48.0", sha256="c593139feb9061699fdd2f7fde47bb6c1ca77761ae9ec04f052083f1ef46c13b") - version("1.46.0", sha256="94f101111ef3209340d7f09c2aa150ddb4feabd2f9d87d47d9f5bded835b8094") - version("1.45.0", sha256="3793d8c0d6fa587721d010d0555b7e82443fd4e8b3c91e529eb6607592f52b87") - version("1.44.2", sha256="8ff28f6ac0d6d2a31d2eeca36aff3d7806706c7d3f5971f5ee013ddb0bdd2e9e") - version("1.44.1", sha256="b7293cefb470e17774dcf5d62c4c969636172726155b55ceef5092b7554863cc") - version("1.44.0", sha256="6c52494401cfe8d08fb4ec245882f0bd4b1572b5a8e79d6c418b855422a1a27d") + if sys.platform == "win32": + version( + "1.48.0", sha256="7f1db8ac368d89d1baf163bac1ea5fe5120697a73910c8ae6b2fffb3551d59fb" + ) + version( + "1.47.0", sha256="20c37a4ca77a2107879473c6c8fa0dc1350e80045df98bfbe78f7cd6d7dd2965" + ) + version( + "1.46.0", sha256="111f83958b9fdc65f1489195d25f342b9f7a3e683140c60e62c00fbaccddddce" + ) + version( + "1.45.0", sha256="f5b07f65a1e8166e47983a7ed1f42fae0bee08f7458142170c37332fc676a748" + ) + version( + "1.44.2", sha256="ccfcdc968c55673c6526d8270a9c8655a806ea92468afcbcabc2b16040f03cb4" + ) + version( + "1.44.1", sha256="9d37b63430fe3b92a9386b949bebd8f0b4784a39a16964c82c9566247a76f64a" + ) + version( + "1.44.0", sha256="d969fc47b8e39ec909d3f8cfa6a6e616e7c370637068ce2d95fdfcbb7f8467f5" + ) + else: + version( + "1.48.0", sha256="c593139feb9061699fdd2f7fde47bb6c1ca77761ae9ec04f052083f1ef46c13b" + ) + version( + "1.46.0", sha256="94f101111ef3209340d7f09c2aa150ddb4feabd2f9d87d47d9f5bded835b8094" + ) + version( + "1.45.0", sha256="3793d8c0d6fa587721d010d0555b7e82443fd4e8b3c91e529eb6607592f52b87" + ) + version( + "1.44.2", sha256="8ff28f6ac0d6d2a31d2eeca36aff3d7806706c7d3f5971f5ee013ddb0bdd2e9e" + ) + version( + "1.44.1", sha256="b7293cefb470e17774dcf5d62c4c969636172726155b55ceef5092b7554863cc" + ) + version( + "1.44.0", sha256="6c52494401cfe8d08fb4ec245882f0bd4b1572b5a8e79d6c418b855422a1a27d" + ) version("1.43.0", sha256="90d72bb7ae18de2519d0cac70eb89c319351146b90cd3f91303a492707e693a4") version("1.42.0", sha256="43129625155a8aed796ebe90b8d4c990a73985ec717de2b2d5d3a23cfe4deb72") version("1.41.1", sha256="65db0c7f2438bc8cd48865de282bf6670027f3557d6e3cb62fb65b2e350a687d") @@ -35,17 +73,33 @@ class Libuv(AutotoolsPackage): depends_on("c", type="build") # generated def url_for_version(self, version): - if self.spec.satisfies("@:1.43"): + if self.spec.satisfies("@:1.43") or self.spec.satisfies("build_system=cmake"): + # This version includes CMake files unlike the '-dist' source distribution below url = "https://dist.libuv.org/dist/v{0}/libuv-v{0}.tar.gz" else: # From 1.44 on, the `-dist` download includes a configure script url = "https://dist.libuv.org/dist/v{0}/libuv-v{0}-dist.tar.gz" return url.format(version, version) - depends_on("automake", type="build", when="@:1.43.0") - depends_on("autoconf", type="build", when="@:1.43.0") - depends_on("libtool", type="build", when="@:1.43.0") - depends_on("m4", type="build", when="@:1.43.0") + # Windows needs a CMake build, but the cmake-enabled sources do not have a + # pre-generated configure script to enable the autotools build, so: (a) + # pull different sources if you are on Windows and (b) make sure cmake + # build is not chosen on Linux + # (because Linux does not download the cmake-enabled source). + # new libuv versions should only use CMake to prevent the scenario + # described above + build_system(conditional("cmake", when="platform=windows"), "autotools", default="autotools") + + with when("build_system=autotools"): + depends_on("automake", type="build", when="@:1.43.0") + depends_on("autoconf", type="build", when="@:1.43.0") + depends_on("libtool", type="build", when="@:1.43.0") + depends_on("m4", type="build", when="@:1.43.0") + + with when("build_system=cmake"): + # explicitly require ownlibs to indicate we're short + # circuiting the cmake<->libuv cyclic dependency here + depends_on("cmake+ownlibs") conflicts( "%gcc@:4.8", @@ -63,9 +117,17 @@ def url_for_version(self, version): msg="libuv does not compile with GCC on macOS yet, use clang. " "See: https://github.com/libuv/libuv/issues/2805", ) + conflicts( + "platform=windows", + when="@:1.20", + msg="Build system for Windows in versions older than 1.21 is" + "broken for versions of MSVC supported by Spack", + ) + +class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): @when("@:1.43") - def autoreconf(self, spec, prefix): + def autoreconf(self, pkg, spec, prefix): # This is needed because autogen.sh generates on-the-fly # an m4 macro needed during configuration Executable("./autogen.sh")() From 5d7d18d028bdb3a47ec96600ca2227f79e94f180 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Fri, 9 Aug 2024 10:45:11 -0700 Subject: [PATCH 255/435] go: add v1.22.6, deprecate insecure versions (#45635) --- .../repos/builtin/packages/go/package.py | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 25d53308c3a375..05ef84c252ee39 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -41,12 +41,36 @@ class Go(Package): license("BSD-3-Clause") + version("1.22.6", sha256="9e48d99d519882579917d8189c17e98c373ce25abaebb98772e2927088992a51") version("1.22.4", sha256="fed720678e728a7ca30ba8d1ded1caafe27d16028fab0232b8ba8e22008fb784") - version("1.22.2", sha256="374ea82b289ec738e968267cac59c7d5ff180f9492250254784b2044e90df5a9") - version("1.22.1", sha256="79c9b91d7f109515a25fc3ecdaad125d67e6bdb54f6d4d98580f46799caea321") - version("1.22.0", sha256="4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c") - version("1.21.6", sha256="124926a62e45f78daabbaedb9c011d97633186a33c238ffc1e25320c02046248") - version("1.21.5", sha256="285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19") + + # https://nvd.nist.gov/vuln/detail/CVE-2024-24790 + # https://nvd.nist.gov/vuln/detail/CVE-2024-24789 + version( + "1.22.2", + sha256="374ea82b289ec738e968267cac59c7d5ff180f9492250254784b2044e90df5a9", + deprecated=True, + ) + version( + "1.22.1", + sha256="79c9b91d7f109515a25fc3ecdaad125d67e6bdb54f6d4d98580f46799caea321", + deprecated=True, + ) + version( + "1.22.0", + sha256="4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c", + deprecated=True, + ) + version( + "1.21.6", + sha256="124926a62e45f78daabbaedb9c011d97633186a33c238ffc1e25320c02046248", + deprecated=True, + ) + version( + "1.21.5", + sha256="285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19", + deprecated=True, + ) provides("golang") From c30979ed6672cf20e32fb889e4d6b184c0c940fc Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Fri, 9 Aug 2024 11:11:01 -0700 Subject: [PATCH 256/435] fzf: add v0.52.1, v0.53.0, v0.54.3 (#45634) * fzf: add v0.52.1, v0.53.0, v0.54.3 * fzf: accept suggestions for url_for_version Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- var/spack/repos/builtin/packages/fzf/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fzf/package.py b/var/spack/repos/builtin/packages/fzf/package.py index d9a5b6057fd9fd..7616724ea2a193 100644 --- a/var/spack/repos/builtin/packages/fzf/package.py +++ b/var/spack/repos/builtin/packages/fzf/package.py @@ -11,7 +11,7 @@ class Fzf(MakefilePackage): """fzf is a general-purpose command-line fuzzy finder.""" homepage = "https://github.com/junegunn/fzf" - url = "https://github.com/junegunn/fzf/archive/0.17.5.tar.gz" + url = "https://github.com/junegunn/fzf/archive/v0.54.0.tar.gz" maintainers("alecbcs") @@ -19,6 +19,9 @@ class Fzf(MakefilePackage): license("MIT") + version("0.54.3", sha256="6413f3916f8058b396820f9078b1336d94c72cbae39c593b1d16b83fcc4fdf74") + version("0.53.0", sha256="d45abbfb64f21913c633d46818d9d3eb3d7ebc7e94bd16f45941958aa5480e1d") + version("0.52.1", sha256="96848746ca78249c1fdd16f170776ce2f667097b60e4ffbd5ecdbd7dfac72ef9") version("0.48.1", sha256="c8dbb545d651808ef4e1f51edba177fa918ea56ac53376c690dc6f2dd0156a71") version("0.47.0", sha256="bc566cb4630418bc9981898d3350dbfddc114637a896acaa8d818a51945bdf30") version("0.46.1", sha256="b0d640be3ae79980fdf461096f7d9d36d38ec752e25f8c4d2ca3ca6c041c2491") @@ -29,6 +32,7 @@ class Fzf(MakefilePackage): version("0.40.0", sha256="9597f297a6811d300f619fff5aadab8003adbcc1566199a43886d2ea09109a65") depends_on("go@1.17:", type="build") + depends_on("go@1.20:", type="build", when="@0.49.0:") variant("vim", default=False, description="Install vim plugins for fzf") @@ -38,6 +42,10 @@ def determine_version(cls, exe): match = re.match(r"(^[\d.]+)", output) return match.group(1) if match else None + def url_for_version(self, version): + base = "refs/tags/v" if self.spec.satisfies("@:0.53.0") else "" + return f"https://github.com/junegunn/fzf/archive/{base}{version}.tar.gz" + def setup_build_environment(self, env): # Point GOPATH at the top of the staging dir for the build step. env.prepend_path("GOPATH", self.stage.path) From da33c12ad4d70c39dce99885c64bb755d6fce2e6 Mon Sep 17 00:00:00 2001 From: Dominic Hofer <6570912+dominichofer@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:27:07 +0200 Subject: [PATCH 257/435] Remove execution permission from setup-env.sh (#45641) `setup-env.sh` is meant to be sourced, not executed directly. By revoking execution permissions, users who accidentally execute the script will receive an error instead of seeing no effect. * Remove execution permission from `setup-env.sh` and friends * Don't make output file executable in `spack commands --update-completion` --------- Co-authored-by: Todd Gamblin Signed-off-by: Todd Gamblin --- lib/spack/spack/cmd/commands.py | 4 ---- share/spack/setup-env.csh | 0 share/spack/setup-env.fish | 0 share/spack/setup-env.sh | 0 share/spack/setup-tutorial-env.sh | 0 share/spack/spack-completion.bash | 0 share/spack/spack-completion.fish | 0 7 files changed, 4 deletions(-) mode change 100755 => 100644 share/spack/setup-env.csh mode change 100755 => 100644 share/spack/setup-env.fish mode change 100755 => 100644 share/spack/setup-env.sh mode change 100755 => 100644 share/spack/setup-tutorial-env.sh mode change 100755 => 100644 share/spack/spack-completion.bash mode change 100755 => 100644 share/spack/spack-completion.fish diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py index f9979339edb644..c6e775dd4329c8 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -11,7 +11,6 @@ from argparse import ArgumentParser, Namespace from typing import IO, Any, Callable, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union -import llnl.util.filesystem as fs import llnl.util.tty as tty from llnl.util.argparsewriter import ArgparseRstWriter, ArgparseWriter, Command from llnl.util.tty.colify import colify @@ -867,9 +866,6 @@ def _commands(parser: ArgumentParser, args: Namespace) -> None: prepend_header(args, f) formatter(args, f) - if args.update_completion: - fs.set_executable(args.update) - else: prepend_header(args, sys.stdout) formatter(args, sys.stdout) diff --git a/share/spack/setup-env.csh b/share/spack/setup-env.csh old mode 100755 new mode 100644 diff --git a/share/spack/setup-env.fish b/share/spack/setup-env.fish old mode 100755 new mode 100644 diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh old mode 100755 new mode 100644 diff --git a/share/spack/setup-tutorial-env.sh b/share/spack/setup-tutorial-env.sh old mode 100755 new mode 100644 diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash old mode 100755 new mode 100644 diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish old mode 100755 new mode 100644 From 7a83cdbcc7d6410936a9d09f0f008dbbb67e5fb1 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 9 Aug 2024 13:51:34 -0700 Subject: [PATCH 258/435] Concretizer should respect namespace of reused specs (#45538) * concretize.lp: improve coverage of internal_error facts * concretizer: track namespaces for reused packages * regression test --- lib/spack/spack/solver/asp.py | 4 + lib/spack/spack/solver/concretize.lp | 107 +++++++++++++++++++-------- lib/spack/spack/test/concretize.py | 14 ++++ 3 files changed, 95 insertions(+), 30 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 53d5aa8cfb6f9e..e12789055c90be 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1851,6 +1851,8 @@ def _spec_clauses( if spec.name: clauses.append(f.node(spec.name) if not spec.virtual else f.virtual_node(spec.name)) + if spec.namespace: + clauses.append(f.namespace(spec.name, spec.namespace)) clauses.extend(self.spec_versions(spec)) @@ -2748,6 +2750,7 @@ class _Head: """ASP functions used to express spec clauses in the HEAD of a rule""" node = fn.attr("node") + namespace = fn.attr("namespace_set") virtual_node = fn.attr("virtual_node") node_platform = fn.attr("node_platform_set") node_os = fn.attr("node_os_set") @@ -2763,6 +2766,7 @@ class _Body: """ASP functions used to express spec clauses in the BODY of a rule""" node = fn.attr("node") + namespace = fn.attr("namespace") virtual_node = fn.attr("virtual_node") node_platform = fn.attr("node_platform") node_os = fn.attr("node_os") diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index ccbe6ed29b0b63..18c82474c9c9cc 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -18,38 +18,79 @@ { attr("virtual_node", node(0..X-1, Package)) } :- max_dupes(Package, X), virtual(Package). % Integrity constraints on DAG nodes -:- attr("root", PackageNode), not attr("node", PackageNode). -:- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode). -:- attr("node_version_satisfies", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode). -:- attr("hash", PackageNode, _), not attr("node", PackageNode). -:- attr("node_platform", PackageNode, _), not attr("node", PackageNode). -:- attr("node_os", PackageNode, _), not attr("node", PackageNode). -:- attr("node_target", PackageNode, _), not attr("node", PackageNode). -:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode). -:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode). -:- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode). -:- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode). -:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode). -:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode). -:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode). -:- attr("node_flag_source", ParentNode, _, _), not attr("node", ParentNode). -:- attr("node_flag_source", _, _, ChildNode), not attr("node", ChildNode). -:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode), internal_error("virtual node with no provider"). -:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode), internal_error("provider with no virtual node"). -:- provider(PackageNode, _), not attr("node", PackageNode), internal_error("provider with no real node"). - -:- attr("root", node(ID, PackageNode)), ID > min_dupe_id, internal_error("root with a non-minimal duplicate ID"). +:- attr("root", PackageNode), + not attr("node", PackageNode), + internal_error("Every root must be a node"). +:- attr("version", PackageNode, _), + not attr("node", PackageNode), + not attr("virtual_node", PackageNode), + internal_error("Only nodes and virtual_nodes can have versions"). +:- attr("node_version_satisfies", PackageNode, _), + not attr("node", PackageNode), + not attr("virtual_node", PackageNode), + internal_error("Only nodes and virtual_nodes can have version satisfaction"). +:- attr("hash", PackageNode, _), + not attr("node", PackageNode), + internal_error("Only nodes can have hashes"). +:- attr("node_platform", PackageNode, _), + not attr("node", PackageNode), + internal_error("Only nodes can have platforms"). +:- attr("node_os", PackageNode, _), not attr("node", PackageNode), + internal_error("Only nodes can have node_os"). +:- attr("node_target", PackageNode, _), not attr("node", PackageNode), + internal_error("Only nodes can have node_target"). +:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode), + internal_error("Only nodes can have node_compiler_version"). +:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode), + internal_error("variant_value true for a non-node"). +:- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode), + internal_error("node_flag_compiler_default true for non-node"). +:- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode), + internal_error("node_flag assigned for non-node"). +:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode), + internal_error("external_spec_selected for non-node"). +:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode), + internal_error("non-node depends on something"). +:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode), + internal_error("something depends_on a non-node"). +:- attr("node_flag_source", Node, _, _), not attr("node", Node), + internal_error("node_flag_source assigned for a non-node"). +:- attr("node_flag_source", _, _, SourceNode), not attr("node", SourceNode), + internal_error("node_flag_source assigned with a non-node source"). +:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode), + internal_error("virtual node with no provider"). +:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode), + internal_error("provider with no virtual node"). +:- provider(PackageNode, _), not attr("node", PackageNode), + internal_error("provider with no real node"). + +:- attr("root", node(ID, PackageNode)), ID > min_dupe_id, + internal_error("root with a non-minimal duplicate ID"). % Nodes in the "root" unification set cannot depend on non-root nodes if the dependency is "link" or "run" :- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "link"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("link dependency out of the root unification set"). :- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "run"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("run dependency out of the root unification set"). -% Namespaces are statically assigned by a package fact -attr("namespace", node(ID, Package), Namespace) :- attr("node", node(ID, Package)), pkg_fact(Package, namespace(Namespace)). +% Namespaces are statically assigned by a package fact if not otherwise set +error(100, "{0} does not have a namespace", Package) :- attr("node", node(ID, Package)), + not attr("namespace", node(ID, Package), _), + internal_error("A node must have a namespace"). +error(100, "{0} cannot come from both {1} and {2} namespaces", Package, NS1, NS2) :- attr("node", node(ID, Package)), + attr("namespace", node(ID, Package), NS1), + attr("namespace", node(ID, Package), NS2), + NS1 != NS2, + internal_error("A node cannot have two namespaces"). + +attr("namespace", node(ID, Package), Namespace) :- attr("namespace_set", node(ID, Package), Namespace). +attr("namespace", node(ID, Package), Namespace) + :- attr("node", node(ID, Package)), + not attr("namespace_set", node(ID, Package), _), + pkg_fact(Package, namespace(Namespace)). % Rules on "unification sets", i.e. on sets of nodes allowing a single configuration of any given package unify(SetID, PackageName) :- unification_set(SetID, node(_, PackageName)). -:- 2 { unification_set(SetID, node(_, PackageName)) }, unify(SetID, PackageName). +:- 2 { unification_set(SetID, node(_, PackageName)) }, unify(SetID, PackageName), + internal_error("Cannot have multiple unification sets IDs for one set"). unification_set("root", PackageNode) :- attr("root", PackageNode). unification_set(SetID, ChildNode) :- attr("depends_on", ParentNode, ChildNode, Type), Type != "build", unification_set(SetID, ParentNode). @@ -75,7 +116,8 @@ unification_set(SetID, VirtualNode) % as a build dependency. % % We'll need to relax the rule before we get to actual cross-compilation -:- depends_on(ParentNode, node(X, Dependency)), depends_on(ParentNode, node(Y, Dependency)), X < Y. +:- depends_on(ParentNode, node(X, Dependency)), depends_on(ParentNode, node(Y, Dependency)), X < Y, + internal_error("Cannot split link/build deptypes for a single edge (yet)"). #defined multiple_unification_sets/1. @@ -131,7 +173,8 @@ mentioned_in_literal(Root, Mentioned) :- mentioned_in_literal(TriggerID, Root, M condition_set(node(min_dupe_id, Root), node(min_dupe_id, Root)) :- mentioned_in_literal(Root, Root). 1 { condition_set(node(min_dupe_id, Root), node(0..Y-1, Mentioned)) : max_dupes(Mentioned, Y) } 1 :- - mentioned_in_literal(Root, Mentioned), Mentioned != Root. + mentioned_in_literal(Root, Mentioned), Mentioned != Root, + internal_error("must have exactly one condition_set for literals"). % Discriminate between "roots" that have been explicitly requested, and roots that are deduced from "virtual roots" explicitly_requested_root(node(min_dupe_id, Package)) :- @@ -151,7 +194,8 @@ associated_with_root(RootNode, ChildNode) :- :- attr("root", RootNode), condition_set(RootNode, node(X, Package)), not virtual(Package), - not associated_with_root(RootNode, node(X, Package)). + not associated_with_root(RootNode, node(X, Package)), + internal_error("nodes in root condition set must be associated with root"). #defined concretize_everything/0. #defined literal/1. @@ -385,8 +429,10 @@ imposed_nodes(ConditionID, PackageNode, node(X, A1)) condition_set(PackageNode, node(X, A1)), attr("hash", PackageNode, ConditionID). -:- imposed_packages(ID, A1), impose(ID, PackageNode), not condition_set(PackageNode, node(_, A1)). -:- imposed_packages(ID, A1), impose(ID, PackageNode), not imposed_nodes(ID, PackageNode, node(_, A1)). +:- imposed_packages(ID, A1), impose(ID, PackageNode), not condition_set(PackageNode, node(_, A1)), + internal_error("Imposing constraint outside of condition set"). +:- imposed_packages(ID, A1), impose(ID, PackageNode), not imposed_nodes(ID, PackageNode, node(_, A1)), + internal_error("Imposing constraint outside of imposed_nodes"). % Conditions that hold impose may impose constraints on other specs attr(Name, node(X, A1)) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1), imposed_nodes(ID, PackageNode, node(X, A1)). @@ -416,7 +462,8 @@ provider(ProviderNode, VirtualNode) :- attr("provider_set", ProviderNode, Virtua % satisfy the dependency. 1 { attr("depends_on", node(X, A1), node(0..Y-1, A2), A3) : max_dupes(A2, Y) } 1 :- impose(ID, node(X, A1)), - imposed_constraint(ID, "depends_on", A1, A2, A3). + imposed_constraint(ID, "depends_on", A1, A2, A3), + internal_error("Build deps must land in exactly one duplicate"). % Reconstruct virtual dependencies for reused specs attr("virtual_on_edge", node(X, A1), node(Y, A2), Virtual) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index f18e1f6854ee27..d0c5ba839a3c72 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -1761,6 +1761,20 @@ def test_reuse_with_unknown_namespace_dont_raise( s = Spec("pkg-c").concretized() assert s.namespace == "builtin.mock" + @pytest.mark.regression("45538") + def test_reuse_from_other_namespace_no_raise(self, tmpdir, temporary_store, monkeypatch): + myrepo = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"), namespace="myrepo") + myrepo.add_package("zlib") + + builtin = Spec("zlib").concretized() + builtin.package.do_install(fake=True, explicit=True) + + with spack.repo.use_repositories(myrepo.root, override=False): + with spack.config.override("concretizer:reuse", True): + myrepo = Spec("myrepo.zlib").concretized() + + assert myrepo.namespace == "myrepo" + @pytest.mark.regression("28259") def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, monkeypatch): builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"), namespace="myrepo") From 2dbc5213b02c3c5f2e021a0493e8cf593e7082e3 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Sat, 10 Aug 2024 10:01:16 -0700 Subject: [PATCH 259/435] pulseaudio: add pkgconfig build dep (#45653) Signed-off-by: Teague Sterling --- var/spack/repos/builtin/packages/pulseaudio/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pulseaudio/package.py b/var/spack/repos/builtin/packages/pulseaudio/package.py index bacf9bb733edb6..8a3396c520e703 100644 --- a/var/spack/repos/builtin/packages/pulseaudio/package.py +++ b/var/spack/repos/builtin/packages/pulseaudio/package.py @@ -55,6 +55,7 @@ class Pulseaudio(AutotoolsPackage): depends_on("libxtst", when="+x11") depends_on("openssl", when="+openssl") depends_on("perl-xml-parser", type="build") + depends_on("pkgconfig", type="build") depends_on("speexdsp@1.2:") depends_on("m4", type="build") From 2079b888c8b14a72bd1558af532f1befd32bcc7c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sun, 11 Aug 2024 01:12:27 +0200 Subject: [PATCH 260/435] Remove the old concretizer (#45215) The old concretizer is still used to bootstrap clingo from source. If we switch to a DAG model where compilers are treated as nodes, we need to either: 1. fix the old concretizer to support this (which is a lot of work and possibly research), or 2. bootstrap `clingo` without the old concretizer. This PR takes the second approach and gets rid of the old concretizer code. To bootstrap `clingo`, we store some concrete spec prototypes as JSON, select one according to the coarse-grained system architecture, and tweak them according to the current host. The old concretizer and related dead code are removed. In particular, this removes `Spec.normalize()` and related methods, which were used in many unit-tests to set up the test context. The tests have been updated not to use `normalize()`. - [x] Bootstrap clingo concretization based on a JSON file - [x] Bootstrap clingo *before* patchelf - [x] Remove any use of the old concretizer, including: * Remove only_clingo and only_original fixtures * Remove _old_concretize and _new_concretize * Remove _concretize_together_old * Remove _concretize_together_new * Remove any use of `SPACK_TEST_SOLVER` * Simplify CI jobs - [x] ensure bootstrapping `clingo` works on on Darwin and Windows - [x] Raise an intelligible error when a compiler is missing - [x] Ensure bootstrapping works on FreeBSD - [x] remove normalize and related methods Signed-off-by: Todd Gamblin --- .github/workflows/unit_tests.yaml | 14 - etc/spack/defaults/config.yaml | 17 - etc/spack/defaults/windows/config.yaml | 1 - lib/spack/spack/bootstrap/clingo.py | 154 ++++ lib/spack/spack/bootstrap/core.py | 22 +- .../prototypes/clingo-darwin-aarch64.json | 1 + .../prototypes/clingo-darwin-x86_64.json | 1 + .../prototypes/clingo-freebsd-amd64.json | 1 + .../prototypes/clingo-linux-aarch64.json | 1 + .../prototypes/clingo-linux-ppc64le.json | 1 + .../prototypes/clingo-linux-x86_64.json | 1 + .../prototypes/clingo-windows-x86_64.json | 1 + lib/spack/spack/cmd/debug.py | 1 - lib/spack/spack/concretize.py | 741 +----------------- lib/spack/spack/config.py | 1 - lib/spack/spack/environment/environment.py | 5 +- lib/spack/spack/schema/config.py | 7 +- lib/spack/spack/spec.py | 644 +-------------- lib/spack/spack/test/architecture.py | 1 - lib/spack/spack/test/cmd/debug.py | 1 - lib/spack/spack/test/cmd/env.py | 14 +- lib/spack/spack/test/cmd/spec.py | 1 - lib/spack/spack/test/concretize.py | 82 -- .../test/concretize_compiler_runtimes.py | 5 +- lib/spack/spack/test/concretize_errors.py | 5 +- .../spack/test/concretize_preferences.py | 5 - .../spack/test/concretize_requirements.py | 5 +- lib/spack/spack/test/config.py | 10 +- lib/spack/spack/test/conftest.py | 13 +- lib/spack/spack/test/data/config/config.yaml | 3 +- lib/spack/spack/test/env.py | 6 - lib/spack/spack/test/graph.py | 27 - lib/spack/spack/test/multimethod.py | 1 - lib/spack/spack/test/optional_deps.py | 7 - lib/spack/spack/test/spec_dag.py | 366 ++------- lib/spack/spack/test/spec_semantics.py | 33 +- lib/spack/spack/test/spec_yaml.py | 17 +- lib/spack/spack/test/url_fetch.py | 1 - pytest.ini | 2 - share/spack/qa/run-unit-tests | 5 - 40 files changed, 286 insertions(+), 1938 deletions(-) create mode 100644 lib/spack/spack/bootstrap/clingo.py create mode 100644 lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json create mode 100644 lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json create mode 100644 lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json create mode 100644 lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json create mode 100644 lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json create mode 100644 lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json create mode 100644 lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index d5737af27efc93..557fc8c5816065 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -16,38 +16,27 @@ jobs: matrix: os: [ubuntu-latest] python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - concretizer: ['clingo'] on_develop: - ${{ github.ref == 'refs/heads/develop' }} include: - - python-version: '3.11' - os: ubuntu-latest - concretizer: original - on_develop: ${{ github.ref == 'refs/heads/develop' }} - python-version: '3.6' os: ubuntu-20.04 - concretizer: clingo on_develop: ${{ github.ref == 'refs/heads/develop' }} exclude: - python-version: '3.7' os: ubuntu-latest - concretizer: 'clingo' on_develop: false - python-version: '3.8' os: ubuntu-latest - concretizer: 'clingo' on_develop: false - python-version: '3.9' os: ubuntu-latest - concretizer: 'clingo' on_develop: false - python-version: '3.10' os: ubuntu-latest - concretizer: 'clingo' on_develop: false - python-version: '3.11' os: ubuntu-latest - concretizer: 'clingo' on_develop: false steps: @@ -85,7 +74,6 @@ jobs: - name: Run unit tests env: SPACK_PYTHON: python - SPACK_TEST_SOLVER: ${{ matrix.concretizer }} SPACK_TEST_PARALLEL: 2 COVERAGE: true UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }} @@ -182,7 +170,6 @@ jobs: - name: Run unit tests (full suite with coverage) env: COVERAGE: true - SPACK_TEST_SOLVER: clingo run: | share/spack/qa/run-unit-tests - uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 @@ -213,7 +200,6 @@ jobs: brew install dash fish gcc gnupg2 kcov - name: Run unit tests env: - SPACK_TEST_SOLVER: clingo SPACK_TEST_PARALLEL: 4 run: | git --version diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml index 532e3db270cf86..686575f8fc01d5 100644 --- a/etc/spack/defaults/config.yaml +++ b/etc/spack/defaults/config.yaml @@ -170,23 +170,6 @@ config: # If set to true, Spack will use ccache to cache C compiles. ccache: false - - # The concretization algorithm to use in Spack. Options are: - # - # 'clingo': Uses a logic solver under the hood to solve DAGs with full - # backtracking and optimization for user preferences. Spack will - # try to bootstrap the logic solver, if not already available. - # - # 'original': Spack's original greedy, fixed-point concretizer. This - # algorithm can make decisions too early and will not backtrack - # sufficiently for many specs. This will soon be deprecated in - # favor of clingo. - # - # See `concretizer.yaml` for more settings you can fine-tune when - # using clingo. - concretizer: clingo - - # How long to wait to lock the Spack installation database. This lock is used # when Spack needs to manage its own package metadata and all operations are # expected to complete within the default time limit. The timeout should diff --git a/etc/spack/defaults/windows/config.yaml b/etc/spack/defaults/windows/config.yaml index 53116391ccef6c..eaa336dca2b45f 100644 --- a/etc/spack/defaults/windows/config.yaml +++ b/etc/spack/defaults/windows/config.yaml @@ -1,6 +1,5 @@ config: locks: false - concretizer: clingo build_stage:: - '$spack/.staging' stage_name: '{name}-{version}-{hash:7}' diff --git a/lib/spack/spack/bootstrap/clingo.py b/lib/spack/spack/bootstrap/clingo.py new file mode 100644 index 00000000000000..fb0150f49d4c20 --- /dev/null +++ b/lib/spack/spack/bootstrap/clingo.py @@ -0,0 +1,154 @@ +# 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) +"""Bootstrap concrete specs for clingo + +Spack uses clingo to concretize specs. When clingo itself needs to be bootstrapped from sources, +we need to rely on another mechanism to get a concrete spec that fits the current host. + +This module contains the logic to get a concrete spec for clingo, starting from a prototype +JSON file for a similar platform. +""" +import pathlib +import sys +from typing import Dict, Optional, Tuple + +import archspec.cpu + +import spack.compiler +import spack.compilers +import spack.platforms +import spack.spec +import spack.traverse + +from .config import spec_for_current_python + + +class ClingoBootstrapConcretizer: + def __init__(self, configuration): + self.host_platform = spack.platforms.host() + self.host_os = self.host_platform.operating_system("frontend") + self.host_target = archspec.cpu.host().family + self.host_architecture = spack.spec.ArchSpec.frontend_arch() + self.host_architecture.target = str(self.host_target) + self.host_compiler = self._valid_compiler_or_raise() + self.host_python = self.python_external_spec() + if str(self.host_platform) == "linux": + self.host_libc = self.libc_external_spec() + + self.external_cmake, self.external_bison = self._externals_from_yaml(configuration) + + def _valid_compiler_or_raise(self) -> "spack.compiler.Compiler": + if str(self.host_platform) == "linux": + compiler_name = "gcc" + elif str(self.host_platform) == "darwin": + compiler_name = "apple-clang" + elif str(self.host_platform) == "windows": + compiler_name = "msvc" + elif str(self.host_platform) == "freebsd": + compiler_name = "clang" + else: + raise RuntimeError(f"Cannot bootstrap clingo from sources on {self.host_platform}") + candidates = spack.compilers.compilers_for_spec( + compiler_name, arch_spec=self.host_architecture + ) + if not candidates: + raise RuntimeError( + f"Cannot find any version of {compiler_name} to bootstrap clingo from sources" + ) + candidates.sort(key=lambda x: x.spec.version, reverse=True) + return candidates[0] + + def _externals_from_yaml( + self, configuration: "spack.config.Configuration" + ) -> Tuple[Optional["spack.spec.Spec"], Optional["spack.spec.Spec"]]: + packages_yaml = configuration.get("packages") + requirements = {"cmake": "@3.20:", "bison": "@2.5:"} + selected: Dict[str, Optional["spack.spec.Spec"]] = {"cmake": None, "bison": None} + for pkg_name in ["cmake", "bison"]: + if pkg_name not in packages_yaml: + continue + + candidates = packages_yaml[pkg_name].get("externals", []) + for candidate in candidates: + s = spack.spec.Spec(candidate["spec"], external_path=candidate["prefix"]) + if not s.satisfies(requirements[pkg_name]): + continue + + if not s.intersects(f"%{self.host_compiler.spec}"): + continue + + if not s.intersects(f"arch={self.host_architecture}"): + continue + + selected[pkg_name] = self._external_spec(s) + break + return selected["cmake"], selected["bison"] + + def prototype_path(self) -> pathlib.Path: + """Path to a prototype concrete specfile for clingo""" + parent_dir = pathlib.Path(__file__).parent + result = parent_dir / "prototypes" / f"clingo-{self.host_platform}-{self.host_target}.json" + if str(self.host_platform) == "linux": + # Using aarch64 as a fallback, since it has gnuconfig (x86_64 doesn't have it) + if not result.exists(): + result = parent_dir / "prototypes" / f"clingo-{self.host_platform}-aarch64.json" + + elif str(self.host_platform) == "freebsd": + result = parent_dir / "prototypes" / f"clingo-{self.host_platform}-amd64.json" + + elif not result.exists(): + raise RuntimeError(f"Cannot bootstrap clingo from sources on {self.host_platform}") + + return result + + def concretize(self) -> "spack.spec.Spec": + # Read the prototype and mark it NOT concrete + s = spack.spec.Spec.from_specfile(str(self.prototype_path())) + s._mark_concrete(False) + + # Tweak it to conform to the host architecture + for node in s.traverse(): + node.architecture.os = str(self.host_os) + node.compiler = self.host_compiler.spec + node.architecture = self.host_architecture + + if node.name == "gcc-runtime": + node.versions = self.host_compiler.spec.versions + + for edge in spack.traverse.traverse_edges([s], cover="edges"): + if edge.spec.name == "python": + edge.spec = self.host_python + + if edge.spec.name == "bison" and self.external_bison: + edge.spec = self.external_bison + + if edge.spec.name == "cmake" and self.external_cmake: + edge.spec = self.external_cmake + + if "libc" in edge.virtuals: + edge.spec = self.host_libc + + s._finalize_concretization() + + # Work around the fact that the installer calls Spec.dependents() and + # we modified edges inconsistently + return s.copy() + + def python_external_spec(self) -> "spack.spec.Spec": + """Python external spec corresponding to the current running interpreter""" + result = spack.spec.Spec(spec_for_current_python(), external_path=sys.exec_prefix) + return self._external_spec(result) + + def libc_external_spec(self) -> "spack.spec.Spec": + result = self.host_compiler.default_libc + return self._external_spec(result) + + def _external_spec(self, initial_spec) -> "spack.spec.Spec": + initial_spec.namespace = "builtin" + initial_spec.compiler = self.host_compiler.spec + initial_spec.architecture = self.host_architecture + for flag_type in spack.spec.FlagMap.valid_compiler_flags(): + initial_spec.compiler_flags[flag_type] = [] + return spack.spec.parse_with_version_concrete(initial_spec) diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py index e5e0983c24e7bd..62b6b86570c3a8 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -54,6 +54,7 @@ import spack.version from ._common import _executables_in_store, _python_import, _root_spec, _try_import_from_store +from .clingo import ClingoBootstrapConcretizer from .config import spack_python_interpreter, spec_for_current_python #: Name of the file containing metadata about the bootstrapping source @@ -268,15 +269,13 @@ def try_import(self, module: str, abstract_spec_str: str) -> bool: # Try to build and install from sources with spack_python_interpreter(): - # Add hint to use frontend operating system on Cray - concrete_spec = spack.spec.Spec(abstract_spec_str + " ^" + spec_for_current_python()) - if module == "clingo": - # TODO: remove when the old concretizer is deprecated # pylint: disable=fixme - concrete_spec._old_concretize( # pylint: disable=protected-access - deprecation_warning=False - ) + bootstrapper = ClingoBootstrapConcretizer(configuration=spack.config.CONFIG) + concrete_spec = bootstrapper.concretize() else: + concrete_spec = spack.spec.Spec( + abstract_spec_str + " ^" + spec_for_current_python() + ) concrete_spec.concretize() msg = "[BOOTSTRAP MODULE {0}] Try installing '{1}' from sources" @@ -303,14 +302,7 @@ def try_search_path(self, executables: Tuple[str], abstract_spec_str: str) -> bo # might reduce compilation time by a fair amount _add_externals_if_missing() - concrete_spec = spack.spec.Spec(abstract_spec_str) - if concrete_spec.name == "patchelf": - concrete_spec._old_concretize( # pylint: disable=protected-access - deprecation_warning=False - ) - else: - concrete_spec.concretize() - + concrete_spec = spack.spec.Spec(abstract_spec_str).concretized() msg = "[BOOTSTRAP] Try installing '{0}' from sources" tty.debug(msg.format(abstract_spec_str)) with spack.config.override(self.mirror_scope): diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json new file mode 100644 index 00000000000000..ed94121b19e8f9 --- /dev/null +++ b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json @@ -0,0 +1 @@ +{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"usieka7hqtluag2n5avq33dzcx5fywas","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"l5u7o7gwhxg4n7zxbp75x4mvocxy45iy","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"xfvnoiytjpkpxuvayzx73junhbjlo76z","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"qpn2suueaqg3p2xfcw3ruqfngnv6wfwt","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"5dtluxfskylswcrd7se47q6vowlb4t2r","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"oyppt4jowtz4mghkbbonp5vkup4ocgyo"},{"name":"bison","version":"3.8.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"7q76qbncpm6mducfafctabgeavuvmype","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"usieka7hqtluag2n5avq33dzcx5fywas"},{"name":"diffutils","version":"3.10","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa"},{"name":"gmake","version":"4.4.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc"},{"name":"gnuconfig","version":"2022-09-17","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2gikx4ks5wrf2cct3kt2ras4snqcrgwicovqmrn7sfac5g55qzdq====","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf"},{"name":"libiconv","version":"1.17","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2ozelkl3vfy3eppsgocj37domutujqg5"},{"name":"m4","version":"1.4.19","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"kspd6u5yi5436so33e36qnnaz7k55o4s","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"7q76qbncpm6mducfafctabgeavuvmype"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"kspd6u5yi5436so33e36qnnaz7k55o4s"},{"name":"cmake","version":"3.29.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"2hsifykculvqj6jqwhr6qhq4avgufc45","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"l5u7o7gwhxg4n7zxbp75x4mvocxy45iy"},{"name":"curl","version":"8.7.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["secure_transport"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"h4puzdoh6vqddnhnbdquelff6ccukjpp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"2hsifykculvqj6jqwhr6qhq4avgufc45"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"h4puzdoh6vqddnhnbdquelff6ccukjpp"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf"},{"name":"perl","version":"5.38.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"owpo7sp32vczfk2nahlfzzkhm4od7b2y","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"qugf72xw7oi4dlrxmchddrdn4v7cle7t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"owpo7sp32vczfk2nahlfzzkhm4od7b2y"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm"},{"name":"gdbm","version":"1.23","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"pzu53iejjjzqsuxjduvc752t2rx46md4","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"qugf72xw7oi4dlrxmchddrdn4v7cle7t"},{"name":"readline","version":"8.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"pzu53iejjjzqsuxjduvc752t2rx46md4"},{"name":"ncurses","version":"6.5","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"orq5smllpn6ex3qp2qula5uvxmuvatas"},{"name":"python","version":"3.11.9","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"apple-libuuid","hash":"pjmzrksnrtzuxyeeef66hehcoffzb7qq","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"647zzgfka4pilqx4rbosr4efrbcdbk3s","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"qugf72xw7oi4dlrxmchddrdn4v7cle7t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"3c5kdgak36exx3n4rrjrbd4ggporhbxl","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"5bf24m3l7qoj3mlajk7mlk66n5d5f5sx","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"u3f5iif7nopr6xnh4ps6n233mgyzxonv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"sp7ylb5lyleunjkdinknplmansaazm33","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"pzu53iejjjzqsuxjduvc752t2rx46md4","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"yumq26wifcmlqyvoysnly3dcplzc7h4l","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"xfvnoiytjpkpxuvayzx73junhbjlo76z"},{"name":"apple-libuuid","version":"1353.100.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"bundle","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk","module":null,"extra_attributes":{}},"package_hash":"rv7eeukm7m2umg6ulafeco2qz2kvaqpx2bjoita6g27hrs6vfmiq====","hash":"pjmzrksnrtzuxyeeef66hehcoffzb7qq"},{"name":"expat","version":"2.6.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"647zzgfka4pilqx4rbosr4efrbcdbk3s"},{"name":"gettext","version":"0.22.5","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"nyu7k62i347svjpkbtpyjhsw5afrz3xo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"dmnxmihjkv7iu53k5xffbycatl7jmnij","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"3c5kdgak36exx3n4rrjrbd4ggporhbxl"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"nyu7k62i347svjpkbtpyjhsw5afrz3xo"},{"name":"xz","version":"5.4.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml"},{"name":"tar","version":"1.34","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"ttzjdjlimt4nrngxhd5wclhawnmskz4i","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"belg3dt3cvlblwuzu7twitbrpzscocdk","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"dmnxmihjkv7iu53k5xffbycatl7jmnij"},{"name":"pigz","version":"2.8","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ttzjdjlimt4nrngxhd5wclhawnmskz4i"},{"name":"zstd","version":"1.5.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"belg3dt3cvlblwuzu7twitbrpzscocdk"},{"name":"libffi","version":"3.4.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"5bf24m3l7qoj3mlajk7mlk66n5d5f5sx"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"u3f5iif7nopr6xnh4ps6n233mgyzxonv"},{"name":"openssl","version":"3.3.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"zlwt7pdv4hpflspaoq2mielortiyhy63","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"sp7ylb5lyleunjkdinknplmansaazm33"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","hash":"zlwt7pdv4hpflspaoq2mielortiyhy63"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"pzu53iejjjzqsuxjduvc752t2rx46md4","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"yumq26wifcmlqyvoysnly3dcplzc7h4l"},{"name":"python-venv","version":"1.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"xfvnoiytjpkpxuvayzx73junhbjlo76z","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"qpn2suueaqg3p2xfcw3ruqfngnv6wfwt"},{"name":"re2c","version":"3.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"5dtluxfskylswcrd7se47q6vowlb4t2r"}]}} diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json new file mode 100644 index 00000000000000..c713d5662df944 --- /dev/null +++ b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json @@ -0,0 +1 @@ +{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"tcstiesejoijdcxvwpmmghqwxgyvadyi","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"ncmbvgmldvjq2ct7bdb36pa7rorgr6ia","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"46skxysjiafgqvyk2cqj2cithhkloj2g","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"p2betn6fduff6uhcmslks6lwdxdllaqx","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"tpv4lkit3ekpahcziwmpeawdnioucyut","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"yebuzmu45zxhlfnurot7f5fydgv4ujen"},{"name":"bison","version":"3.8.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"7f5bvgqhvzuhog5fjzjhc52boqpo4eg4","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"tcstiesejoijdcxvwpmmghqwxgyvadyi"},{"name":"diffutils","version":"3.10","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak"},{"name":"gmake","version":"4.4.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz"},{"name":"libiconv","version":"1.17","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"mctiikna6qibnfutgekl6h3h747nhl73"},{"name":"m4","version":"1.4.19","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"2ab3ieebereandqjennaq6bobs5ggc4y","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"7f5bvgqhvzuhog5fjzjhc52boqpo4eg4"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2ab3ieebereandqjennaq6bobs5ggc4y"},{"name":"cmake","version":"3.29.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"5midcs5brhx4h6vnh2bryqh7qipzww6p","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ncmbvgmldvjq2ct7bdb36pa7rorgr6ia"},{"name":"curl","version":"8.7.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["secure_transport"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"22mzwts36yiedkziivh5sdgyjogb2it2","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"5midcs5brhx4h6vnh2bryqh7qipzww6p"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"22mzwts36yiedkziivh5sdgyjogb2it2"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc"},{"name":"perl","version":"5.38.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"upn52ynxcbgarg2trkmqwm4ppbdkx3zs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"wik3tgroytjrfvy5poap2gairb2nabxp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"upn52ynxcbgarg2trkmqwm4ppbdkx3zs"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg"},{"name":"gdbm","version":"1.23","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"amnbyrmtafl2pyypogji6gharv46lkrp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"wik3tgroytjrfvy5poap2gairb2nabxp"},{"name":"readline","version":"8.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"amnbyrmtafl2pyypogji6gharv46lkrp"},{"name":"ncurses","version":"6.5","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"bfptmetyuv567sjav5haen57waanfxyc"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5"},{"name":"python","version":"3.11.9","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"apple-libuuid","hash":"zdktedsebu7zjozb4wqhr45hfr665tlh","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"ewxodvrjxwjn4gayblrayq4mxp4todqu","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"wik3tgroytjrfvy5poap2gairb2nabxp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"qatrw6nst2iqufrcjszou2zlbri6nphm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"ffu7cslh3j3fi4pnszo6kjfu7optpzzb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"wi4esgdayal4yyw3mcxqueiift2rvs2n","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"us6qb6xd62jhohhzq6uvwrkgtwazxdvf","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"amnbyrmtafl2pyypogji6gharv46lkrp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"mmdphtu7zomdlsupofpcuur3l2hobahc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"46skxysjiafgqvyk2cqj2cithhkloj2g"},{"name":"apple-libuuid","version":"1353.100.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"bundle","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk","module":null,"extra_attributes":{}},"package_hash":"rv7eeukm7m2umg6ulafeco2qz2kvaqpx2bjoita6g27hrs6vfmiq====","hash":"zdktedsebu7zjozb4wqhr45hfr665tlh"},{"name":"expat","version":"2.6.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ewxodvrjxwjn4gayblrayq4mxp4todqu"},{"name":"gettext","version":"0.22.5","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"mqe3367abnu4eijzq4akvplrxvef62f3","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"jm53r4fgccnjp77x6ktjui5moishomnh","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"qatrw6nst2iqufrcjszou2zlbri6nphm"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"mqe3367abnu4eijzq4akvplrxvef62f3"},{"name":"xz","version":"5.4.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"bspvdxfryax3wnxlua26ghowojosrzaa"},{"name":"tar","version":"1.34","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"73zuxkusbtdu7v52fgeiyhwuuaihvkhz","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"54a5z2cqsezl7q7cudyonywh3tcth5m7","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"jm53r4fgccnjp77x6ktjui5moishomnh"},{"name":"pigz","version":"2.8","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"73zuxkusbtdu7v52fgeiyhwuuaihvkhz"},{"name":"zstd","version":"1.5.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"54a5z2cqsezl7q7cudyonywh3tcth5m7"},{"name":"libffi","version":"3.4.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ffu7cslh3j3fi4pnszo6kjfu7optpzzb"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wi4esgdayal4yyw3mcxqueiift2rvs2n"},{"name":"openssl","version":"3.3.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"rzhpcobyanwb5cncuh7o7zr23zbo3vr2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"us6qb6xd62jhohhzq6uvwrkgtwazxdvf"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","hash":"rzhpcobyanwb5cncuh7o7zr23zbo3vr2"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"amnbyrmtafl2pyypogji6gharv46lkrp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"mmdphtu7zomdlsupofpcuur3l2hobahc"},{"name":"python-venv","version":"1.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"46skxysjiafgqvyk2cqj2cithhkloj2g","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"p2betn6fduff6uhcmslks6lwdxdllaqx"},{"name":"re2c","version":"3.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"tpv4lkit3ekpahcziwmpeawdnioucyut"}]}} diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json b/lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json new file mode 100644 index 00000000000000..414a0a2071be02 --- /dev/null +++ b/lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json @@ -0,0 +1 @@ +{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":false,"optimized":false,"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"3wdklrcdn74jrtsre32c2fw7rugodnhp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"bwpbzabluu6b4cifqacnggfj325hhygp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"7lm43ao2uclf2zc74fyuiy43v4gtzk7a","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"elm263xl5rvuph7tksslsoxtr5ldsckf","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"g6rvrl5tghnxmldvsrjpye46y7nfa2it","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"d73jzr7ocsvpbwpbdfit6myiwe5soyd4"},{"name":"bison","version":"3.8.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"3bfqnppsvbrfgxfd2xhjvcwtz5xulzdh","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"3wdklrcdn74jrtsre32c2fw7rugodnhp"},{"name":"diffutils","version":"3.10","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"2jg7xlirln67iqw2owirghpez2vfhotd"},{"name":"gmake","version":"4.4.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"rpzjfobv7qh3wevti34nlbd2emtw5mnyszqmkyiq5jiq33xm7qzq====","hash":"wydxawduinvosugi5pwkm7dbsxqltryg"},{"name":"libiconv","version":"1.17","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"w5p56ykqczhy7l6h435qvjheivk36qy4"},{"name":"m4","version":"1.4.19","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"byc3ga7ez2d7jmzyao32x266cgubesqq","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"3bfqnppsvbrfgxfd2xhjvcwtz5xulzdh"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"byc3ga7ez2d7jmzyao32x266cgubesqq"},{"name":"cmake","version":"3.29.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"3eurdl4v6krpmgbfvqaivosebv5xyiis","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"bwpbzabluu6b4cifqacnggfj325hhygp"},{"name":"curl","version":"8.7.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"ffcpmjsfc6rao2hylcfws5zedgekf5vz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"7g3tlrp5kiroaak364nmsy2syb4zmvbs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"pdpqvtmsot4linjoftvfkds3q3kqk7xr","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"3eurdl4v6krpmgbfvqaivosebv5xyiis"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"ffcpmjsfc6rao2hylcfws5zedgekf5vz"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup"},{"name":"openssl","version":"3.3.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"orkemgy3ncctka6e5wuhjmvv4hqf57dk","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"pdpqvtmsot4linjoftvfkds3q3kqk7xr","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"7g3tlrp5kiroaak364nmsy2syb4zmvbs"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","hash":"orkemgy3ncctka6e5wuhjmvv4hqf57dk"},{"name":"perl","version":"5.38.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"jk6dyv372wyksasduryfojgn55tugtie","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"mhn6tszi6hsltchugtzrcssvynz57csg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"pdpqvtmsot4linjoftvfkds3q3kqk7xr"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"jk6dyv372wyksasduryfojgn55tugtie"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"uozy6txh4p3kq44rycstcadu7m5l36eh"},{"name":"gdbm","version":"1.23","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"cdsre6iv6m4if3gx7k27ynraamwducqj","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"mhn6tszi6hsltchugtzrcssvynz57csg"},{"name":"readline","version":"8.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"cdsre6iv6m4if3gx7k27ynraamwducqj"},{"name":"ncurses","version":"6.5","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6"},{"name":"python","version":"3.11.9","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"cjcphxa5agystc6egs7x2zfv6s7kt52p","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"mhn6tszi6hsltchugtzrcssvynz57csg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"ch2bcvngtps62qfxns4pzbleye7ic57c","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"kkc7oupodtd67dlhjugfuzw3g7tvcuno","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"7g3tlrp5kiroaak364nmsy2syb4zmvbs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"cdsre6iv6m4if3gx7k27ynraamwducqj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"qgog7nkb6ubobruuhcvyv5vbraferneg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"u3rkbgitzhddldu75y6od4qcjad7h2a3","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"7lm43ao2uclf2zc74fyuiy43v4gtzk7a"},{"name":"expat","version":"2.6.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"cjcphxa5agystc6egs7x2zfv6s7kt52p"},{"name":"gettext","version":"0.22.5","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"uu3uyudar6cz5tmenmmk376i54alwmwl","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"3on36tpbw5355v3czpeyn2vokzbttigm","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"ch2bcvngtps62qfxns4pzbleye7ic57c"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"uu3uyudar6cz5tmenmmk376i54alwmwl"},{"name":"xz","version":"5.4.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv"},{"name":"tar","version":"1.34","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"n6urcuk2bvv6q32udka2ldaf3ap345a4","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"aejhse4tyvwvgywcz26ai4l4zxe4jvg2","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"3on36tpbw5355v3czpeyn2vokzbttigm"},{"name":"pigz","version":"2.8","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"n6urcuk2bvv6q32udka2ldaf3ap345a4"},{"name":"zstd","version":"1.5.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"aejhse4tyvwvgywcz26ai4l4zxe4jvg2"},{"name":"libffi","version":"3.4.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"kkc7oupodtd67dlhjugfuzw3g7tvcuno"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"lpes7bwf6khi6o2fswt6rex4o6jo5jipwzh4iq4hdfgnqp6wqxwq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"cdsre6iv6m4if3gx7k27ynraamwducqj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"qgog7nkb6ubobruuhcvyv5vbraferneg"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"u3rkbgitzhddldu75y6od4qcjad7h2a3"},{"name":"python-venv","version":"1.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"7lm43ao2uclf2zc74fyuiy43v4gtzk7a","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"elm263xl5rvuph7tksslsoxtr5ldsckf"},{"name":"re2c","version":"3.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"g6rvrl5tghnxmldvsrjpye46y7nfa2it"}]}} diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json b/lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json new file mode 100644 index 00000000000000..ce0d63abc72fa3 --- /dev/null +++ b/lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json @@ -0,0 +1 @@ +{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"static_libstdcpp":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"hnyddubugwyhntjpc5cflgtyyxesplfc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"ofd6tvbbzgk2oga4qlrbfnisfiyhkibe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"mgeapxgv3p333s676cdztm2khprm74c2","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"qup6txvaopzzxrih4wyskfbgsfrbw47g","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"ab6idsf3epl2usyp5beguihyxdya5y7y","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ruwcurd3t7tlujwpawnxmize6uyzi52g"},{"name":"bison","version":"3.8.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"msmyb5twiltq3za5olk25etbbtmmxr2p","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"hnyddubugwyhntjpc5cflgtyyxesplfc"},{"name":"diffutils","version":"3.10","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp"},{"name":"gcc-runtime","version":"11.4.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"se7e7lu5ega7wrxwwnhpwjp2fsl4u277hopdz2lw7bwhatp22soq====","dependencies":[{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe"},{"name":"glibc","version":"2.34","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/usr","module":null,"extra_attributes":{}},"package_hash":"4z35ntbdhytzlhaviffrorrqxvspd6k6jf3pqj7gbday4c2hld5q====","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu"},{"name":"gmake","version":"4.4.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7"},{"name":"gnuconfig","version":"2022-09-17","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2gikx4ks5wrf2cct3kt2ras4snqcrgwicovqmrn7sfac5g55qzdq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p"},{"name":"libiconv","version":"1.17","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp"},{"name":"m4","version":"1.4.19","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"bqrwa4grh7j4dbhmao2gwq5li7otidvp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"msmyb5twiltq3za5olk25etbbtmmxr2p"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"bqrwa4grh7j4dbhmao2gwq5li7otidvp"},{"name":"cmake","version":"3.29.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"nevz7fogpskla4ygnbaa5dmigdk7ivtm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ofd6tvbbzgk2oga4qlrbfnisfiyhkibe"},{"name":"curl","version":"8.7.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"4pc2aydqr6xvckmsqpscnbpbvynb7akb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"lrcxk5wcodfzti2eembel774vg2mqpdr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"3lfg2qhin325sous4tomgjbrjezdokfd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"nevz7fogpskla4ygnbaa5dmigdk7ivtm"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"4pc2aydqr6xvckmsqpscnbpbvynb7akb"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p"},{"name":"openssl","version":"3.3.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"ldkgus2vincr7rsth3icgpbud5dd3fvr","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"3lfg2qhin325sous4tomgjbrjezdokfd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"lrcxk5wcodfzti2eembel774vg2mqpdr"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"ldkgus2vincr7rsth3icgpbud5dd3fvr"},{"name":"perl","version":"5.38.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"m4lrsz6xzcylkgacr64jour6kiyqk6mf","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"ib2pxjrvkjirkmyostemesulmlapdmdz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"3lfg2qhin325sous4tomgjbrjezdokfd"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"m4lrsz6xzcylkgacr64jour6kiyqk6mf"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j"},{"name":"gdbm","version":"1.23","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"xumzexii6opul35g6g67ohj4boco35hp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ib2pxjrvkjirkmyostemesulmlapdmdz"},{"name":"readline","version":"8.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"xumzexii6opul35g6g67ohj4boco35hp"},{"name":"ncurses","version":"6.5","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb"},{"name":"python","version":"3.11.9","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"jrsnxzjej3vxqehewuelz4nwvqgyrv2l","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"ib2pxjrvkjirkmyostemesulmlapdmdz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"sityderlvnhfgmj6qmg23hgjkt2mvgn7","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"6ztlwxyvhquaekh3ggnax4gxjcm7z5xs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"ff6j37dfruzkftuo2vpxxuvgsguuircg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"lrcxk5wcodfzti2eembel774vg2mqpdr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"xumzexii6opul35g6g67ohj4boco35hp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"ssuidmgnu4g4rxns4yhsc2i35wm6w4nm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"u7tzv4v6hjmqwraas2fg4g4bggsg54hn","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"mgeapxgv3p333s676cdztm2khprm74c2"},{"name":"expat","version":"2.6.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libbsd","hash":"2asjwudpsolmnvtvy2klrx4423zxfb46","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"jrsnxzjej3vxqehewuelz4nwvqgyrv2l"},{"name":"libbsd","version":"0.12.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"debyg3en7sgggswkdhcyd6lbp7arawzmyujthyyuaiad5jqd5msa====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libmd","hash":"5g3gadwxtaklyslka2absv2ey5nvu7qp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"2asjwudpsolmnvtvy2klrx4423zxfb46"},{"name":"libmd","version":"1.0.4","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zs2e7fqr4dzthpj5fascqvfn7xcahf7dtc5bzdwfv6vqkzi7oncq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"5g3gadwxtaklyslka2absv2ey5nvu7qp"},{"name":"gettext","version":"0.22.5","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"qok6mvtsef3v5oziizc5ypldokgfoufi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"vwkyj52hs7kfnk6ui4gtaav55zxlotm3","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"sityderlvnhfgmj6qmg23hgjkt2mvgn7"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"qok6mvtsef3v5oziizc5ypldokgfoufi"},{"name":"xz","version":"5.4.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc"},{"name":"tar","version":"1.34","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"l5sst3uni4hkaetfv5ep2knougpbpsvz","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"xbn4zwa6afke6acunbztswy72j5khy5v","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"vwkyj52hs7kfnk6ui4gtaav55zxlotm3"},{"name":"pigz","version":"2.8","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"l5sst3uni4hkaetfv5ep2knougpbpsvz"},{"name":"zstd","version":"1.5.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xbn4zwa6afke6acunbztswy72j5khy5v"},{"name":"libffi","version":"3.4.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"6ztlwxyvhquaekh3ggnax4gxjcm7z5xs"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"3lfg2qhin325sous4tomgjbrjezdokfd","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ff6j37dfruzkftuo2vpxxuvgsguuircg"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"xumzexii6opul35g6g67ohj4boco35hp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ssuidmgnu4g4rxns4yhsc2i35wm6w4nm"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"u7tzv4v6hjmqwraas2fg4g4bggsg54hn"},{"name":"python-venv","version":"1.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"python","hash":"mgeapxgv3p333s676cdztm2khprm74c2","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"qup6txvaopzzxrih4wyskfbgsfrbw47g"},{"name":"re2c","version":"3.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ab6idsf3epl2usyp5beguihyxdya5y7y"}]}} diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json b/lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json new file mode 100644 index 00000000000000..3a2ed4c635817e --- /dev/null +++ b/lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json @@ -0,0 +1 @@ +{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"static_libstdcpp":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"zlf5po3jq7ewnyqvmijdqvezidjkewwc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"fhs7nnfo4fpelnw47cnlq2ta3gonoybi","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"kaunhs7qjatcib7dxtdumk6ti5rtkwhi","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"rscwjgp3i7lrkw425i554hugfqtbpmcz","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"g36e7tmo7u3lrs5n3kn26xtdzsgnsjmf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"e5azl4x62b2ttfez7tgh2amsaufw5kxf"},{"name":"bison","version":"3.8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"k5nvhktsfld5k75nydtshmgqxt6vnd7z","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"zlf5po3jq7ewnyqvmijdqvezidjkewwc"},{"name":"diffutils","version":"3.10","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc"},{"name":"gcc-runtime","version":"8.5.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"se7e7lu5ega7wrxwwnhpwjp2fsl4u277hopdz2lw7bwhatp22soq====","dependencies":[{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw"},{"name":"glibc","version":"2.28","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/usr","module":null,"extra_attributes":{}},"package_hash":"riktbfk2yybad7tgbvdkntk5c5msjcm5pk3x7naszgbvfm57h4rq====","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh"},{"name":"gmake","version":"4.4.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"vlaspdtbomyzueuolydbhrmouikifc35"},{"name":"gnuconfig","version":"2022-09-17","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2gikx4ks5wrf2cct3kt2ras4snqcrgwicovqmrn7sfac5g55qzdq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb"},{"name":"libiconv","version":"1.17","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"psjili5a534fgwzmso7e525glphp4cig"},{"name":"m4","version":"1.4.19","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"wcibv54gmuzs7r7ixxzou7unrzn7pa3w","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"k5nvhktsfld5k75nydtshmgqxt6vnd7z"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wcibv54gmuzs7r7ixxzou7unrzn7pa3w"},{"name":"cmake","version":"3.29.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"vtskoiw5dhhv3kwxv27lc4cdxkdcxvwb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"fhs7nnfo4fpelnw47cnlq2ta3gonoybi"},{"name":"curl","version":"8.7.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"35pubyn2mdls6gppiymahqxlmjib5bzc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"otlr7jk6mle7jbxemw2jgouv6whcmbro","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"vtskoiw5dhhv3kwxv27lc4cdxkdcxvwb"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"35pubyn2mdls6gppiymahqxlmjib5bzc"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke"},{"name":"openssl","version":"3.3.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"k6us4tbfauthyaqlndg2335pdgy4lu2i","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"otlr7jk6mle7jbxemw2jgouv6whcmbro"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"k6us4tbfauthyaqlndg2335pdgy4lu2i"},{"name":"perl","version":"5.38.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"h3eno322vommoajsv332gkscxlcublqi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"nuzlj7idsicuuwlbhl2mtbgzx37ioumc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"h3eno322vommoajsv332gkscxlcublqi"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo"},{"name":"gdbm","version":"1.23","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"nuzlj7idsicuuwlbhl2mtbgzx37ioumc"},{"name":"readline","version":"8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv"},{"name":"ncurses","version":"6.5","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix"},{"name":"python","version":"3.11.9","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"nm6tjs4hxbxgbxgrgwk5m6p3cv5f2xp6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"nuzlj7idsicuuwlbhl2mtbgzx37ioumc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"lwsm4syj2fwaqauv765cbio3xmtecfh6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"7dro2wwskvjqmoknz4qqefn6dcypxvo3","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"plkpy2gwretmhc2pncx4jxr3snyvrtl2","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"otlr7jk6mle7jbxemw2jgouv6whcmbro","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"bgz5kp2p7vv4t3efvnn5ebsu3zvsa7xu","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"4zecuq35tj72zffmsonlxkrefs6nlind","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"kaunhs7qjatcib7dxtdumk6ti5rtkwhi"},{"name":"expat","version":"2.6.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libbsd","hash":"kdvtk2gxo5qzxdqyotv3tja77tmq4vut","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"nm6tjs4hxbxgbxgrgwk5m6p3cv5f2xp6"},{"name":"libbsd","version":"0.12.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"debyg3en7sgggswkdhcyd6lbp7arawzmyujthyyuaiad5jqd5msa====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libmd","hash":"y5jvp4qgm7obwftbvdkwpgc3jrabrwap","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"kdvtk2gxo5qzxdqyotv3tja77tmq4vut"},{"name":"libmd","version":"1.0.4","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zs2e7fqr4dzthpj5fascqvfn7xcahf7dtc5bzdwfv6vqkzi7oncq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"y5jvp4qgm7obwftbvdkwpgc3jrabrwap"},{"name":"gettext","version":"0.22.5","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"xubldvubx7oe3oux3uaogjydl2ejnw6t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"7c7264uajtdc3onu5rxa5yf5uxtdzkox","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"lwsm4syj2fwaqauv765cbio3xmtecfh6"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"xubldvubx7oe3oux3uaogjydl2ejnw6t"},{"name":"xz","version":"5.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj"},{"name":"tar","version":"1.34","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"ouuobfwhka4oby6ajleqfj74jewljbn3","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"iozznbkczpkeh2l73kzyq4s3rq2vfd6p","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"7c7264uajtdc3onu5rxa5yf5uxtdzkox"},{"name":"pigz","version":"2.8","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ouuobfwhka4oby6ajleqfj74jewljbn3"},{"name":"zstd","version":"1.5.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"iozznbkczpkeh2l73kzyq4s3rq2vfd6p"},{"name":"libffi","version":"3.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"7dro2wwskvjqmoknz4qqefn6dcypxvo3"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"plkpy2gwretmhc2pncx4jxr3snyvrtl2"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"bgz5kp2p7vv4t3efvnn5ebsu3zvsa7xu"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"4zecuq35tj72zffmsonlxkrefs6nlind"},{"name":"python-venv","version":"1.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"python","hash":"kaunhs7qjatcib7dxtdumk6ti5rtkwhi","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"rscwjgp3i7lrkw425i554hugfqtbpmcz"},{"name":"re2c","version":"3.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"g36e7tmo7u3lrs5n3kn26xtdzsgnsjmf"}]}} diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json b/lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json new file mode 100644 index 00000000000000..704ee73689aaff --- /dev/null +++ b/lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json @@ -0,0 +1 @@ +{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"static_libstdcpp":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"ddgl3onrbfkboqpjskzdaiwpomvppwgt","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"l2qxvjavbdyl4gh6it743qrknlgpaeu6","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"ipb4su3jaocbbxxn7ronvotabz4dkbgp","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"wt5iofmuq447aul5r6ydidmhv2rtepfg","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"ncrrgeaeg65l63s4n2ele3gssfbelqei","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"nf64noutpg25ptisllb435k3u3qgwgim"},{"name":"bison","version":"3.8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"hckrrjzj7upowvamvgbqux6s4hxfirbc","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"ddgl3onrbfkboqpjskzdaiwpomvppwgt"},{"name":"diffutils","version":"3.10","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe"},{"name":"gcc-runtime","version":"8.5.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"se7e7lu5ega7wrxwwnhpwjp2fsl4u277hopdz2lw7bwhatp22soq====","dependencies":[{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv"},{"name":"glibc","version":"2.28","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/usr","module":null,"extra_attributes":{}},"package_hash":"riktbfk2yybad7tgbvdkntk5c5msjcm5pk3x7naszgbvfm57h4rq====","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn"},{"name":"gmake","version":"4.4.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2"},{"name":"libiconv","version":"1.17","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"cvbsirp3vg7iuzzhddpebygekjj445ek"},{"name":"m4","version":"1.4.19","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"a7utmadxdq5pwbyzzsqufc5z4c5dzil3","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"hckrrjzj7upowvamvgbqux6s4hxfirbc"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"a7utmadxdq5pwbyzzsqufc5z4c5dzil3"},{"name":"cmake","version":"3.29.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"tx4uqyb24um2fbkztpv45vte25ddwirm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"l2qxvjavbdyl4gh6it743qrknlgpaeu6"},{"name":"curl","version":"8.7.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"izrdxl4retiy57ugtdmppsol5xlhiapb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"3ox4v5cseir7gcx7s6ygygoktdej4bfr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"tx4uqyb24um2fbkztpv45vte25ddwirm"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"izrdxl4retiy57ugtdmppsol5xlhiapb"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx"},{"name":"openssl","version":"3.3.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"4diyktn6tmoj6iurlz7gieu3ub5q5trh","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"3ox4v5cseir7gcx7s6ygygoktdej4bfr"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"4diyktn6tmoj6iurlz7gieu3ub5q5trh"},{"name":"perl","version":"5.38.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"2zsffebnfhcjdsjgn6x7ydsrwf7yfxjq","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"tduhe6zd7urqpt7i7rej5vzoaxa4ze3t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2zsffebnfhcjdsjgn6x7ydsrwf7yfxjq"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ypik55ez75ipc2357brsnfr6ns4zibrk"},{"name":"gdbm","version":"1.23","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"knome32natgdwoyv6rlbqb6w5um5jzqa","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"tduhe6zd7urqpt7i7rej5vzoaxa4ze3t"},{"name":"readline","version":"8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"knome32natgdwoyv6rlbqb6w5um5jzqa"},{"name":"ncurses","version":"6.5","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"qdrdnglnycx5usajs354nmxy763r5jd6"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"4rjyysplubcoslfbmi23u2voobghr4jy"},{"name":"python","version":"3.11.9","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"hzopg2h3vpjkpb4gqcygzvvfb4wjquu3","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"tduhe6zd7urqpt7i7rej5vzoaxa4ze3t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"yvb5vlha6yr2lwfkzkqz6mtzzz7wdiyv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"wmoq7qgzlbf7ebxnji4nro6gn7g25dt5","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"2yxrh2umuxhtymwd2gxlkgogwxjy2epx","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"3ox4v5cseir7gcx7s6ygygoktdej4bfr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"knome32natgdwoyv6rlbqb6w5um5jzqa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"kcdye5hn4jwz3a7u4ck4konz7747bn4w","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"ws5pwa6qz45lahc75zo27ovgldtlmnpm","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ipb4su3jaocbbxxn7ronvotabz4dkbgp"},{"name":"expat","version":"2.6.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libbsd","hash":"ut2bfnjpiaw35lvt6efz5y62fjpah6ow","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"hzopg2h3vpjkpb4gqcygzvvfb4wjquu3"},{"name":"libbsd","version":"0.12.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"debyg3en7sgggswkdhcyd6lbp7arawzmyujthyyuaiad5jqd5msa====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libmd","hash":"4yumgzpllawj3dfsg6ezog4lvblkc2cl","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ut2bfnjpiaw35lvt6efz5y62fjpah6ow"},{"name":"libmd","version":"1.0.4","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zs2e7fqr4dzthpj5fascqvfn7xcahf7dtc5bzdwfv6vqkzi7oncq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"4yumgzpllawj3dfsg6ezog4lvblkc2cl"},{"name":"gettext","version":"0.22.5","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"dvhrxtvvpg2m4jyoex7qtn26zjrxmikg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"eygw75slf4egmw4pwyshieddjurkp2ph","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"yvb5vlha6yr2lwfkzkqz6mtzzz7wdiyv"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"dvhrxtvvpg2m4jyoex7qtn26zjrxmikg"},{"name":"xz","version":"5.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6"},{"name":"tar","version":"1.34","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"sh3u7ctgnbf567fhrrivyx3h5rgir4sy","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"zpktnpdo632qhcmiqavbu757gc3ze6te","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"eygw75slf4egmw4pwyshieddjurkp2ph"},{"name":"pigz","version":"2.8","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"sh3u7ctgnbf567fhrrivyx3h5rgir4sy"},{"name":"zstd","version":"1.5.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"zpktnpdo632qhcmiqavbu757gc3ze6te"},{"name":"libffi","version":"3.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wmoq7qgzlbf7ebxnji4nro6gn7g25dt5"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2yxrh2umuxhtymwd2gxlkgogwxjy2epx"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"knome32natgdwoyv6rlbqb6w5um5jzqa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"kcdye5hn4jwz3a7u4ck4konz7747bn4w"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"ws5pwa6qz45lahc75zo27ovgldtlmnpm"},{"name":"python-venv","version":"1.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"python","hash":"ipb4su3jaocbbxxn7ronvotabz4dkbgp","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"wt5iofmuq447aul5r6ydidmhv2rtepfg"},{"name":"re2c","version":"3.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ncrrgeaeg65l63s4n2ele3gssfbelqei"}]}} diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json b/lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json new file mode 100644 index 00000000000000..03760625574147 --- /dev/null +++ b/lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json @@ -0,0 +1 @@ +{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"ninja","ipo":true,"optimized":false,"patches":["311bd2ae3f2f5274d1d36a2d65f887dfdf4c309a3c6bb29a53bbafb82b42ba7a","4ccfd173d439ed1e23eff42d5a01a8fbb21341c632d86b5691242dc270dbf065","c5c4db292a920ded6eecfbb6749d88ce9c4f179500aee6aee3a417b93c7c5c7a"],"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4ccfd173d439ed1e23eff42d5a01a8fbb21341c632d86b5691242dc270dbf065","311bd2ae3f2f5274d1d36a2d65f887dfdf4c309a3c6bb29a53bbafb82b42ba7a","c5c4db292a920ded6eecfbb6749d88ce9c4f179500aee6aee3a417b93c7c5c7a"],"package_hash":"hkhwttazqtgz7nw7e6yzka5nc7o6akrqe23kb3gkdl37dcmwjxkq====","dependencies":[{"name":"cmake","hash":"4ezjoethijaqxue2xt3nal4txe767xns","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ninja","hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"x6lyli3psq6zk3644k2wugm576lci33r","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"7bxfiqnxbqtqsyb2un5c7gqyeqeovmuk","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"winbison","hash":"xvhc7don5aszzxvlizjiau2pbs4ar2a6","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"wfpfomrvcbtfjrjxjc2f3fi3nj22cyat"},{"name":"cmake","version":"3.29.6","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":false,"ownlibs":true,"patches":["d041289e3e9483cbdbbac46705a1fb01a7c40a8fc13e291229fb4fa2b071369b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["d041289e3e9483cbdbbac46705a1fb01a7c40a8fc13e291229fb4fa2b071369b"],"package_hash":"6eevq4j4p722uva3cej3xbkvh57fv7ahuqg4pheefouecqh5rnxa====","dependencies":[{"name":"curl","hash":"jt3nq766b6qphqfhezutxbsls4r5ecf5","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ninja","hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib","hash":"xfzaydeo4udjmwno4hi5mehuje43mrp5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"4ezjoethijaqxue2xt3nal4txe767xns"},{"name":"curl","version":"8.7.1","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"nmake","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":"shared","libssh":false,"libssh2":false,"nghttp2":false,"tls":["sspi"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"perl","hash":"pkljs7xtxfgvkcbczmygiubpdczoqrlb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib","hash":"xfzaydeo4udjmwno4hi5mehuje43mrp5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"jt3nq766b6qphqfhezutxbsls4r5ecf5"},{"name":"perl","version":"5.38.2","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"xx43demwtox532nxdz7gqwrlx2g5ksgxfv62c7h4zqfpmclnrruq====","hash":"pkljs7xtxfgvkcbczmygiubpdczoqrlb"},{"name":"zlib","version":"1.3.1","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","optimize":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2jkvm4tfyhgosw533mwogyfqz2z32hvk4h5leguukrofpebi5xgq====","hash":"xfzaydeo4udjmwno4hi5mehuje43mrp5"},{"name":"ninja","version":"1.12.0","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","re2c":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jcf35uxhgv42a53liynorg4clnpbgbirydp5s3fjeobf7ur2obbq====","dependencies":[{"name":"python","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6"},{"name":"python","version":"3.11.9","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["01b5df08776d2c3ffeb75da4ccff144cd554b63fcf9962f27c6ecb5fca06a33d","7abb961432aa530349755d639c2902a342f3b5744d11103901e0acf88fae533e","bccfd87e518d2ebc1dafe5d009b9071c046fe8400d52d2f0283bda6904c4dbf1","fc5b6c586b1b654ac2ed00ba6417b1eb526bd24a0dc28074ce14ff56f6057f7c"],"pic":true,"pyexpat":true,"pythoncmd":false,"readline":false,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["01b5df08776d2c3ffeb75da4ccff144cd554b63fcf9962f27c6ecb5fca06a33d","fc5b6c586b1b654ac2ed00ba6417b1eb526bd24a0dc28074ce14ff56f6057f7c","bccfd87e518d2ebc1dafe5d009b9071c046fe8400d52d2f0283bda6904c4dbf1","7abb961432aa530349755d639c2902a342f3b5744d11103901e0acf88fae533e"],"package_hash":"u4pa2ashu6det7izfzs7hl7fhelecogvtit6mb3nzsn6gvzpnnoa====","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7"},{"name":"python-venv","version":"1.0","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"x6lyli3psq6zk3644k2wugm576lci33r"},{"name":"re2c","version":"3.0","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"e5avvdpvjibybyeqgefi3xrpxyzr2mejjap4mx7q2lgxmpqzco4q====","dependencies":[{"name":"cmake","hash":"4ezjoethijaqxue2xt3nal4txe767xns","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"7bxfiqnxbqtqsyb2un5c7gqyeqeovmuk"},{"name":"winbison","version":"2.5.25","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","generator":"ninja","ipo":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"t3g2slcnnleieqtz66oly6vsfe5ibje6b2wmamxv5chuewwds5la====","dependencies":[{"name":"cmake","hash":"4ezjoethijaqxue2xt3nal4txe767xns","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ninja","hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xvhc7don5aszzxvlizjiau2pbs4ar2a6"}]}} diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py index 1c9fb214f41fa9..c4b5b427ad0de7 100644 --- a/lib/spack/spack/cmd/debug.py +++ b/lib/spack/spack/cmd/debug.py @@ -90,7 +90,6 @@ def report(args): print("* **Spack:**", get_version()) print("* **Python:**", platform.python_version()) print("* **Platform:**", architecture) - print("* **Concretizer:**", spack.config.get("config:concretizer")) def debug(parser, args): diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index b311d777f45698..58d8f83e8e43e4 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -2,29 +2,11 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - """ -Functions here are used to take abstract specs and make them concrete. -For example, if a spec asks for a version between 1.8 and 1.9, these -functions might take will take the most recent 1.9 version of the -package available. Or, if the user didn't specify a compiler for a -spec, then this will assign a compiler to the spec based on defaults -or user preferences. - -TODO: make this customizable and allow users to configure - concretization policies. +(DEPRECATED) Used to contain the code for the original concretizer """ -import functools -import platform -import tempfile from contextlib import contextmanager from itertools import chain -from typing import Union - -import archspec.cpu - -import llnl.util.lang -import llnl.util.tty as tty import spack.abi import spack.compilers @@ -37,639 +19,20 @@ import spack.target import spack.tengine import spack.util.path -import spack.variant as vt -from spack.package_prefs import PackagePrefs, is_spec_buildable, spec_externals -from spack.version import ClosedOpenRange, VersionList, ver - -#: impements rudimentary logic for ABI compatibility -_abi: Union[spack.abi.ABI, llnl.util.lang.Singleton] = llnl.util.lang.Singleton( - lambda: spack.abi.ABI() -) - - -@functools.total_ordering -class reverse_order: - """Helper for creating key functions. - - This is a wrapper that inverts the sense of the natural - comparisons on the object. - """ - - def __init__(self, value): - self.value = value - - def __eq__(self, other): - return other.value == self.value - - def __lt__(self, other): - return other.value < self.value class Concretizer: - """You can subclass this class to override some of the default - concretization strategies, or you can override all of them. - """ + """(DEPRECATED) Only contains logic to enable/disable compiler existence checks.""" #: Controls whether we check that compiler versions actually exist #: during concretization. Used for testing and for mirror creation check_for_compiler_existence = None - #: Packages that the old concretizer cannot deal with correctly, and cannot build anyway. - #: Those will not be considered as providers for virtuals. - non_buildable_packages = {"glibc", "musl"} - - def __init__(self, abstract_spec=None): + def __init__(self): if Concretizer.check_for_compiler_existence is None: Concretizer.check_for_compiler_existence = not spack.config.get( "config:install_missing_compilers", False ) - self.abstract_spec = abstract_spec - self._adjust_target_answer_generator = None - - def concretize_develop(self, spec): - """ - Add ``dev_path=*`` variant to packages built from local source. - """ - env = spack.environment.active_environment() - dev_info = env.dev_specs.get(spec.name, {}) if env else {} - if not dev_info: - return False - - path = spack.util.path.canonicalize_path(dev_info["path"], default_wd=env.path) - - if "dev_path" in spec.variants: - assert spec.variants["dev_path"].value == path - changed = False - else: - spec.variants.setdefault("dev_path", vt.SingleValuedVariant("dev_path", path)) - changed = True - changed |= spec.constrain(dev_info["spec"]) - return changed - - def _valid_virtuals_and_externals(self, spec): - """Returns a list of candidate virtual dep providers and external - packages that coiuld be used to concretize a spec. - - Preferred specs come first in the list. - """ - # First construct a list of concrete candidates to replace spec with. - candidates = [spec] - pref_key = lambda spec: 0 # no-op pref key - - if spec.virtual: - candidates = [ - s - for s in spack.repo.PATH.providers_for(spec) - if s.name not in self.non_buildable_packages - ] - if not candidates: - raise spack.error.UnsatisfiableProviderSpecError(candidates[0], spec) - - # Find nearest spec in the DAG (up then down) that has prefs. - spec_w_prefs = find_spec( - spec, lambda p: PackagePrefs.has_preferred_providers(p.name, spec.name), spec - ) # default to spec itself. - - # Create a key to sort candidates by the prefs we found - pref_key = PackagePrefs(spec_w_prefs.name, "providers", spec.name) - - # For each candidate package, if it has externals, add those - # to the usable list. if it's not buildable, then *only* add - # the externals. - usable = [] - for cspec in candidates: - if is_spec_buildable(cspec): - usable.append(cspec) - - externals = spec_externals(cspec) - for ext in externals: - if ext.intersects(spec): - usable.append(ext) - - # If nothing is in the usable list now, it's because we aren't - # allowed to build anything. - if not usable: - raise NoBuildError(spec) - - # Use a sort key to order the results - return sorted( - usable, - key=lambda spec: ( - not spec.external, # prefer externals - pref_key(spec), # respect prefs - spec.name, # group by name - reverse_order(spec.versions), # latest version - spec, # natural order - ), - ) - - def choose_virtual_or_external(self, spec: spack.spec.Spec): - """Given a list of candidate virtual and external packages, try to - find one that is most ABI compatible. - """ - candidates = self._valid_virtuals_and_externals(spec) - if not candidates: - return candidates - - # Find the nearest spec in the dag that has a compiler. We'll - # use that spec to calibrate compiler compatibility. - abi_exemplar = find_spec(spec, lambda x: x.compiler) - if abi_exemplar is None: - abi_exemplar = spec.root - - # Sort candidates from most to least compatibility. - # We reverse because True > False. - # Sort is stable, so candidates keep their order. - return sorted( - candidates, - reverse=True, - key=lambda spec: ( - _abi.compatible(spec, abi_exemplar, loose=True), - _abi.compatible(spec, abi_exemplar), - ), - ) - - def concretize_version(self, spec): - """If the spec is already concrete, return. Otherwise take - the preferred version from spackconfig, and default to the package's - version if there are no available versions. - - TODO: In many cases we probably want to look for installed - versions of each package and use an installed version - if we can link to it. The policy implemented here will - tend to rebuild a lot of stuff becasue it will prefer - a compiler in the spec to any compiler already- - installed things were built with. There is likely - some better policy that finds some middle ground - between these two extremes. - """ - # return if already concrete. - if spec.versions.concrete: - return False - - # List of versions we could consider, in sorted order - pkg_versions = spec.package_class.versions - usable = [v for v in pkg_versions if any(v.intersects(sv) for sv in spec.versions)] - - yaml_prefs = PackagePrefs(spec.name, "version") - - # The keys below show the order of precedence of factors used - # to select a version when concretizing. The item with - # the "largest" key will be selected. - # - # NOTE: When COMPARING VERSIONS, the '@develop' version is always - # larger than other versions. BUT when CONCRETIZING, - # the largest NON-develop version is selected by default. - keyfn = lambda v: ( - # ------- Special direction from the user - # Respect order listed in packages.yaml - -yaml_prefs(v), - # The preferred=True flag (packages or packages.yaml or both?) - pkg_versions.get(v).get("preferred", False), - # ------- Regular case: use latest non-develop version by default. - # Avoid @develop version, which would otherwise be the "largest" - # in straight version comparisons - not v.isdevelop(), - # Compare the version itself - # This includes the logic: - # a) develop > everything (disabled by "not v.isdevelop() above) - # b) numeric > non-numeric - # c) Numeric or string comparison - v, - ) - usable.sort(key=keyfn, reverse=True) - - if usable: - spec.versions = ver([usable[0]]) - else: - # We don't know of any SAFE versions that match the given - # spec. Grab the spec's versions and grab the highest - # *non-open* part of the range of versions it specifies. - # Someone else can raise an error if this happens, - # e.g. when we go to fetch it and don't know how. But it - # *might* work. - if not spec.versions or spec.versions == VersionList([":"]): - raise NoValidVersionError(spec) - else: - last = spec.versions[-1] - if isinstance(last, ClosedOpenRange): - range_as_version = VersionList([last]).concrete_range_as_version - if range_as_version: - spec.versions = ver([range_as_version]) - else: - raise NoValidVersionError(spec) - else: - spec.versions = ver([last]) - - return True # Things changed - - def concretize_architecture(self, spec): - """If the spec is empty provide the defaults of the platform. If the - architecture is not a string type, then check if either the platform, - target or operating system are concretized. If any of the fields are - changed then return True. If everything is concretized (i.e the - architecture attribute is a namedtuple of classes) then return False. - If the target is a string type, then convert the string into a - concretized architecture. If it has no architecture and the root of the - DAG has an architecture, then use the root otherwise use the defaults - on the platform. - """ - # ensure type safety for the architecture - if spec.architecture is None: - spec.architecture = spack.spec.ArchSpec() - - if spec.architecture.concrete: - return False - - # Get platform of nearest spec with a platform, including spec - # If spec has a platform, easy - if spec.architecture.platform: - new_plat = spack.platforms.by_name(spec.architecture.platform) - else: - # Else if anyone else has a platform, take the closest one - # Search up, then down, along build/link deps first - # Then any nearest. Algorithm from compilerspec search - platform_spec = find_spec(spec, lambda x: x.architecture and x.architecture.platform) - if platform_spec: - new_plat = spack.platforms.by_name(platform_spec.architecture.platform) - else: - # If no platform anywhere in this spec, grab the default - new_plat = spack.platforms.host() - - # Get nearest spec with relevant platform and an os - # Generally, same algorithm as finding platform, except we only - # consider specs that have a platform - if spec.architecture.os: - new_os = spec.architecture.os - else: - new_os_spec = find_spec( - spec, - lambda x: ( - x.architecture - and x.architecture.platform == str(new_plat) - and x.architecture.os - ), - ) - if new_os_spec: - new_os = new_os_spec.architecture.os - else: - new_os = new_plat.operating_system("default_os") - - # Get the nearest spec with relevant platform and a target - # Generally, same algorithm as finding os - curr_target = None - if spec.architecture.target: - curr_target = spec.architecture.target - if spec.architecture.target and spec.architecture.target_concrete: - new_target = spec.architecture.target - else: - new_target_spec = find_spec( - spec, - lambda x: ( - x.architecture - and x.architecture.platform == str(new_plat) - and x.architecture.target - and x.architecture.target != curr_target - ), - ) - if new_target_spec: - if curr_target: - # constrain one target by the other - new_target_arch = spack.spec.ArchSpec( - (None, None, new_target_spec.architecture.target) - ) - curr_target_arch = spack.spec.ArchSpec((None, None, curr_target)) - curr_target_arch.constrain(new_target_arch) - new_target = curr_target_arch.target - else: - new_target = new_target_spec.architecture.target - else: - # To get default platform, consider package prefs - if PackagePrefs.has_preferred_targets(spec.name): - new_target = self.target_from_package_preferences(spec) - else: - new_target = new_plat.target("default_target") - if curr_target: - # convert to ArchSpec to compare satisfaction - new_target_arch = spack.spec.ArchSpec((None, None, str(new_target))) - curr_target_arch = spack.spec.ArchSpec((None, None, str(curr_target))) - - if not new_target_arch.intersects(curr_target_arch): - # new_target is an incorrect guess based on preferences - # and/or default - valid_target_ranges = str(curr_target).split(",") - for target_range in valid_target_ranges: - t_min, t_sep, t_max = target_range.partition(":") - if not t_sep: - new_target = t_min - break - elif t_max: - new_target = t_max - break - elif t_min: - # TODO: something better than picking first - new_target = t_min - break - - # Construct new architecture, compute whether spec changed - arch_spec = (str(new_plat), str(new_os), str(new_target)) - new_arch = spack.spec.ArchSpec(arch_spec) - spec_changed = new_arch != spec.architecture - spec.architecture = new_arch - return spec_changed - - def target_from_package_preferences(self, spec): - """Returns the preferred target from the package preferences if - there's any. - - Args: - spec: abstract spec to be concretized - """ - target_prefs = PackagePrefs(spec.name, "target") - target_specs = [spack.spec.Spec("target=%s" % tname) for tname in archspec.cpu.TARGETS] - - def tspec_filter(s): - # Filter target specs by whether the architecture - # family is the current machine type. This ensures - # we only consider x86_64 targets when on an - # x86_64 machine, etc. This may need to change to - # enable setting cross compiling as a default - target = archspec.cpu.TARGETS[str(s.architecture.target)] - arch_family_name = target.family.name - return arch_family_name == platform.machine() - - # Sort filtered targets by package prefs - target_specs = list(filter(tspec_filter, target_specs)) - target_specs.sort(key=target_prefs) - new_target = target_specs[0].architecture.target - return new_target - - def concretize_variants(self, spec): - """If the spec already has variants filled in, return. Otherwise, add - the user preferences from packages.yaml or the default variants from - the package specification. - """ - changed = False - preferred_variants = PackagePrefs.preferred_variants(spec.name) - pkg_cls = spec.package_class - for name, entry in pkg_cls.variants.items(): - variant, when = entry - var = spec.variants.get(name, None) - if var and "*" in var: - # remove variant wildcard before concretizing - # wildcard cannot be combined with other variables in a - # multivalue variant, a concrete variant cannot have the value - # wildcard, and a wildcard does not constrain a variant - spec.variants.pop(name) - if name not in spec.variants and any(spec.satisfies(w) for w in when): - changed = True - if name in preferred_variants: - spec.variants[name] = preferred_variants.get(name) - else: - spec.variants[name] = variant.make_default() - if name in spec.variants and not any(spec.satisfies(w) for w in when): - raise vt.InvalidVariantForSpecError(name, when, spec) - - return changed - - def concretize_compiler(self, spec): - """If the spec already has a compiler, we're done. If not, then take - the compiler used for the nearest ancestor with a compiler - spec and use that. If the ancestor's compiler is not - concrete, then used the preferred compiler as specified in - spackconfig. - - Intuition: Use the spackconfig default if no package that depends on - this one has a strict compiler requirement. Otherwise, try to - build with the compiler that will be used by libraries that - link to this one, to maximize compatibility. - """ - # Pass on concretizing the compiler if the target or operating system - # is not yet determined - if not spec.architecture.concrete: - # We haven't changed, but other changes need to happen before we - # continue. `return True` here to force concretization to keep - # running. - return True - - # Only use a matching compiler if it is of the proper style - # Takes advantage of the proper logic already existing in - # compiler_for_spec Should think whether this can be more - # efficient - def _proper_compiler_style(cspec, aspec): - compilers = spack.compilers.compilers_for_spec(cspec, arch_spec=aspec) - # If the spec passed as argument is concrete we want to check - # the versions match exactly - if ( - cspec.concrete - and compilers - and cspec.version not in [c.version for c in compilers] - ): - return [] - - return compilers - - if spec.compiler and spec.compiler.concrete: - if self.check_for_compiler_existence and not _proper_compiler_style( - spec.compiler, spec.architecture - ): - _compiler_concretization_failure(spec.compiler, spec.architecture) - return False - - # Find another spec that has a compiler, or the root if none do - other_spec = spec if spec.compiler else find_spec(spec, lambda x: x.compiler, spec.root) - other_compiler = other_spec.compiler - assert other_spec - - # Check if the compiler is already fully specified - if other_compiler and other_compiler.concrete: - if self.check_for_compiler_existence and not _proper_compiler_style( - other_compiler, spec.architecture - ): - _compiler_concretization_failure(other_compiler, spec.architecture) - spec.compiler = other_compiler - return True - - if other_compiler: # Another node has abstract compiler information - compiler_list = spack.compilers.find_specs_by_arch(other_compiler, spec.architecture) - if not compiler_list: - # We don't have a matching compiler installed - if not self.check_for_compiler_existence: - # Concretize compiler spec versions as a package to build - cpkg_spec = spack.compilers.pkg_spec_for_compiler(other_compiler) - self.concretize_version(cpkg_spec) - spec.compiler = spack.spec.CompilerSpec( - other_compiler.name, cpkg_spec.versions - ) - return True - else: - # No compiler with a satisfactory spec was found - raise UnavailableCompilerVersionError(other_compiler, spec.architecture) - else: - # We have no hints to go by, grab any compiler - compiler_list = spack.compilers.all_compiler_specs() - if not compiler_list: - # Spack has no compilers. - raise spack.compilers.NoCompilersError() - - # By default, prefer later versions of compilers - compiler_list = sorted(compiler_list, key=lambda x: (x.name, x.version), reverse=True) - ppk = PackagePrefs(other_spec.name, "compiler") - matches = sorted(compiler_list, key=ppk) - - # copy concrete version into other_compiler - try: - spec.compiler = next( - c for c in matches if _proper_compiler_style(c, spec.architecture) - ).copy() - except StopIteration: - # No compiler with a satisfactory spec has a suitable arch - _compiler_concretization_failure(other_compiler, spec.architecture) - - assert spec.compiler.concrete - return True # things changed. - - def concretize_compiler_flags(self, spec): - """ - The compiler flags are updated to match those of the spec whose - compiler is used, defaulting to no compiler flags in the spec. - Default specs set at the compiler level will still be added later. - """ - # Pass on concretizing the compiler flags if the target or operating - # system is not set. - if not spec.architecture.concrete: - # We haven't changed, but other changes need to happen before we - # continue. `return True` here to force concretization to keep - # running. - return True - - compiler_match = lambda other: ( - spec.compiler == other.compiler and spec.architecture == other.architecture - ) - - ret = False - for flag in spack.spec.FlagMap.valid_compiler_flags(): - if flag not in spec.compiler_flags: - spec.compiler_flags[flag] = list() - try: - nearest = next( - p - for p in spec.traverse(direction="parents") - if (compiler_match(p) and (p is not spec) and flag in p.compiler_flags) - ) - nearest_flags = nearest.compiler_flags.get(flag, []) - flags = spec.compiler_flags.get(flag, []) - if set(nearest_flags) - set(flags): - spec.compiler_flags[flag] = list(llnl.util.lang.dedupe(nearest_flags + flags)) - ret = True - except StopIteration: - pass - - # Include the compiler flag defaults from the config files - # This ensures that spack will detect conflicts that stem from a change - # in default compiler flags. - try: - compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture) - except spack.compilers.NoCompilerForSpecError: - if self.check_for_compiler_existence: - raise - return ret - for flag in compiler.flags: - config_flags = compiler.flags.get(flag, []) - flags = spec.compiler_flags.get(flag, []) - spec.compiler_flags[flag] = list(llnl.util.lang.dedupe(config_flags + flags)) - if set(config_flags) - set(flags): - ret = True - - return ret - - def adjust_target(self, spec): - """Adjusts the target microarchitecture if the compiler is too old - to support the default one. - - Args: - spec: spec to be concretized - - Returns: - True if spec was modified, False otherwise - """ - # To minimize the impact on performance this function will attempt - # to adjust the target only at the very first call once necessary - # information is set. It will just return False on subsequent calls. - # The way this is achieved is by initializing a generator and making - # this function return the next answer. - if not (spec.architecture and spec.architecture.concrete): - # Not ready, but keep going because we have work to do later - return True - - def _make_only_one_call(spec): - yield self._adjust_target(spec) - while True: - yield False - - if self._adjust_target_answer_generator is None: - self._adjust_target_answer_generator = _make_only_one_call(spec) - - return next(self._adjust_target_answer_generator) - - def _adjust_target(self, spec): - """Assumes that the architecture and the compiler have been - set already and checks if the current target microarchitecture - is the default and can be optimized by the compiler. - - If not, downgrades the microarchitecture until a suitable one - is found. If none can be found raise an error. - - Args: - spec: spec to be concretized - - Returns: - True if any modification happened, False otherwise - """ - import archspec.cpu - - # Try to adjust the target only if it is the default - # target for this platform - current_target = spec.architecture.target - current_platform = spack.platforms.by_name(spec.architecture.platform) - - default_target = current_platform.target("default_target") - if PackagePrefs.has_preferred_targets(spec.name): - default_target = self.target_from_package_preferences(spec) - - if current_target != default_target or ( - self.abstract_spec - and self.abstract_spec.architecture - and self.abstract_spec.architecture.concrete - ): - return False - - try: - current_target.optimization_flags(spec.compiler) - except archspec.cpu.UnsupportedMicroarchitecture: - microarchitecture = current_target.microarchitecture - for ancestor in microarchitecture.ancestors: - candidate = None - try: - candidate = spack.target.Target(ancestor) - candidate.optimization_flags(spec.compiler) - except archspec.cpu.UnsupportedMicroarchitecture: - continue - - if candidate is not None: - msg = ( - "{0.name}@{0.version} cannot build optimized " - 'binaries for "{1}". Using best target possible: ' - '"{2}"' - ) - msg = msg.format(spec.compiler, current_target, candidate) - tty.warn(msg) - spec.architecture.target = candidate - return True - else: - raise - - return False @contextmanager @@ -719,19 +82,6 @@ def find_spec(spec, condition, default=None): return default # Nothing matched the condition; return default. -def _compiler_concretization_failure(compiler_spec, arch): - # Distinguish between the case that there are compilers for - # the arch but not with the given compiler spec and the case that - # there are no compilers for the arch at all - if not spack.compilers.compilers_for_arch(arch): - available_os_targets = set( - (c.operating_system, c.target) for c in spack.compilers.all_compilers() - ) - raise NoCompilersForArchError(arch, available_os_targets) - else: - raise UnavailableCompilerVersionError(compiler_spec, arch) - - def concretize_specs_together(*abstract_specs, **kwargs): """Given a number of specs as input, tries to concretize them together. @@ -744,12 +94,6 @@ def concretize_specs_together(*abstract_specs, **kwargs): Returns: List of concretized specs """ - if spack.config.get("config:concretizer", "clingo") == "original": - return _concretize_specs_together_original(*abstract_specs, **kwargs) - return _concretize_specs_together_new(*abstract_specs, **kwargs) - - -def _concretize_specs_together_new(*abstract_specs, **kwargs): import spack.solver.asp allow_deprecated = spack.config.get("config:deprecated", False) @@ -760,51 +104,6 @@ def _concretize_specs_together_new(*abstract_specs, **kwargs): return [s.copy() for s in result.specs] -def _concretize_specs_together_original(*abstract_specs, **kwargs): - abstract_specs = [spack.spec.Spec(s) for s in abstract_specs] - tmpdir = tempfile.mkdtemp() - builder = spack.repo.MockRepositoryBuilder(tmpdir) - # Split recursive specs, as it seems the concretizer has issue - # respecting conditions on dependents expressed like - # depends_on('foo ^bar@1.0'), see issue #11160 - split_specs = [ - dep.copy(deps=False) for spec1 in abstract_specs for dep in spec1.traverse(root=True) - ] - builder.add_package( - "concretizationroot", dependencies=[(str(x), None, None) for x in split_specs] - ) - - with spack.repo.use_repositories(builder.root, override=False): - # Spec from a helper package that depends on all the abstract_specs - concretization_root = spack.spec.Spec("concretizationroot") - concretization_root.concretize(tests=kwargs.get("tests", False)) - # Retrieve the direct dependencies - concrete_specs = [concretization_root[spec.name].copy() for spec in abstract_specs] - - return concrete_specs - - -class NoCompilersForArchError(spack.error.SpackError): - def __init__(self, arch, available_os_targets): - err_msg = ( - "No compilers found" - " for operating system %s and target %s." - "\nIf previous installations have succeeded, the" - " operating system may have been updated." % (arch.os, arch.target) - ) - - available_os_target_strs = list() - for operating_system, t in available_os_targets: - os_target_str = "%s-%s" % (operating_system, t) if t else operating_system - available_os_target_strs.append(os_target_str) - err_msg += ( - "\nCompilers are defined for the following" - " operating systems and targets:\n\t" + "\n\t".join(available_os_target_strs) - ) - - super().__init__(err_msg, "Run 'spack compiler find' to add compilers.") - - class UnavailableCompilerVersionError(spack.error.SpackError): """Raised when there is no available compiler that satisfies a compiler spec.""" @@ -820,37 +119,3 @@ def __init__(self, compiler_spec, arch=None): "'spack compilers' to see which compilers are already recognized" " by spack.", ) - - -class NoValidVersionError(spack.error.SpackError): - """Raised when there is no way to have a concrete version for a - particular spec.""" - - def __init__(self, spec): - super().__init__( - "There are no valid versions for %s that match '%s'" % (spec.name, spec.versions) - ) - - -class InsufficientArchitectureInfoError(spack.error.SpackError): - """Raised when details on architecture cannot be collected from the - system""" - - def __init__(self, spec, archs): - super().__init__( - "Cannot determine necessary architecture information for '%s': %s" - % (spec.name, str(archs)) - ) - - -class NoBuildError(spack.error.SpecError): - """Raised when a package is configured with the buildable option False, but - no satisfactory external versions can be found - """ - - def __init__(self, spec): - msg = ( - "The spec\n '%s'\n is configured as not buildable, " - "and no matching external installs were found" - ) - super().__init__(msg % spec) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 8c84af00e832c4..765954c8f281d6 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -99,7 +99,6 @@ "dirty": False, "build_jobs": min(16, cpus_available()), "build_stage": "$tempdir/spack-stage", - "concretizer": "clingo", "license_dir": spack.paths.default_license_dir, } } diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 65a08ff7fa456e..ef51cb38d60435 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1644,9 +1644,8 @@ def _concretize_separately(self, tests=False): i += 1 # Ensure we don't try to bootstrap clingo in parallel - if spack.config.get("config:concretizer", "clingo") == "clingo": - with spack.bootstrap.ensure_bootstrap_configuration(): - spack.bootstrap.ensure_clingo_importable_or_raise() + with spack.bootstrap.ensure_bootstrap_configuration(): + spack.bootstrap.ensure_clingo_importable_or_raise() # Ensure all the indexes have been built or updated, since # otherwise the processes in the pool may timeout on waiting diff --git a/lib/spack/spack/schema/config.py b/lib/spack/spack/schema/config.py index fdb57f5b772519..78b988e4459913 100644 --- a/lib/spack/spack/schema/config.py +++ b/lib/spack/spack/schema/config.py @@ -84,7 +84,6 @@ "build_language": {"type": "string"}, "build_jobs": {"type": "integer", "minimum": 1}, "ccache": {"type": "boolean"}, - "concretizer": {"type": "string", "enum": ["original", "clingo"]}, "db_lock_timeout": {"type": "integer", "minimum": 1}, "package_lock_timeout": { "anyOf": [{"type": "integer", "minimum": 1}, {"type": "null"}] @@ -98,9 +97,9 @@ "aliases": {"type": "object", "patternProperties": {r"\w[\w-]*": {"type": "string"}}}, }, "deprecatedProperties": { - "properties": ["terminal_title"], - "message": "config:terminal_title has been replaced by " - "install_status and is ignored", + "properties": ["concretizer"], + "message": "Spack supports only clingo as a concretizer from v0.23. " + "The config:concretizer config option is ignored.", "error": False, }, } diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 413cb22f5f4792..ccdc498214c2d4 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -70,7 +70,6 @@ import spack.compiler import spack.compilers import spack.config -import spack.dependency as dp import spack.deptypes as dt import spack.error import spack.hash_types as ht @@ -2615,294 +2614,6 @@ def validate_detection(self): validate_fn = getattr(pkg_cls, "validate_detected_spec", lambda x, y: None) validate_fn(self, self.extra_attributes) - def _concretize_helper(self, concretizer, presets=None, visited=None): - """Recursive helper function for concretize(). - This concretizes everything bottom-up. As things are - concretized, they're added to the presets, and ancestors - will prefer the settings of their children. - """ - if presets is None: - presets = {} - if visited is None: - visited = set() - - if self.name in visited: - return False - - if self.concrete: - visited.add(self.name) - return False - - changed = False - - # Concretize deps first -- this is a bottom-up process. - for name in sorted(self._dependencies): - # WARNING: This function is an implementation detail of the - # WARNING: original concretizer. Since with that greedy - # WARNING: algorithm we don't allow multiple nodes from - # WARNING: the same package in a DAG, here we hard-code - # WARNING: using index 0 i.e. we assume that we have only - # WARNING: one edge from package "name" - changed |= self._dependencies[name][0].spec._concretize_helper( - concretizer, presets, visited - ) - - if self.name in presets: - changed |= self.constrain(presets[self.name]) - else: - # Concretize virtual dependencies last. Because they're added - # to presets below, their constraints will all be merged, but we'll - # still need to select a concrete package later. - if not self.virtual: - changed |= any( - ( - concretizer.concretize_develop(self), # special variant - concretizer.concretize_architecture(self), - concretizer.concretize_compiler(self), - concretizer.adjust_target(self), - # flags must be concretized after compiler - concretizer.concretize_compiler_flags(self), - concretizer.concretize_version(self), - concretizer.concretize_variants(self), - ) - ) - presets[self.name] = self - - visited.add(self.name) - return changed - - def _replace_with(self, concrete): - """Replace this virtual spec with a concrete spec.""" - assert self.virtual - virtuals = (self.name,) - for dep_spec in itertools.chain.from_iterable(self._dependents.values()): - dependent = dep_spec.parent - depflag = dep_spec.depflag - - # remove self from all dependents, unless it is already removed - if self.name in dependent._dependencies: - del dependent._dependencies.edges[self.name] - - # add the replacement, unless it is already a dep of dependent. - if concrete.name not in dependent._dependencies: - dependent._add_dependency(concrete, depflag=depflag, virtuals=virtuals) - else: - dependent.edges_to_dependencies(name=concrete.name)[0].update_virtuals( - virtuals=virtuals - ) - - def _expand_virtual_packages(self, concretizer): - """Find virtual packages in this spec, replace them with providers, - and normalize again to include the provider's (potentially virtual) - dependencies. Repeat until there are no virtual deps. - - Precondition: spec is normalized. - - .. todo:: - - If a provider depends on something that conflicts with - other dependencies in the spec being expanded, this can - produce a conflicting spec. For example, if mpich depends - on hwloc@:1.3 but something in the spec needs hwloc1.4:, - then we should choose an MPI other than mpich. Cases like - this are infrequent, but should implement this before it is - a problem. - """ - # Make an index of stuff this spec already provides - self_index = spack.provider_index.ProviderIndex( - repository=spack.repo.PATH, specs=self.traverse(), restrict=True - ) - changed = False - done = False - - while not done: - done = True - for spec in list(self.traverse()): - replacement = None - if spec.external: - continue - if spec.virtual: - replacement = self._find_provider(spec, self_index) - if replacement: - # TODO: may break if in-place on self but - # shouldn't happen if root is traversed first. - spec._replace_with(replacement) - done = False - break - - if not replacement: - # Get a list of possible replacements in order of - # preference. - candidates = concretizer.choose_virtual_or_external(spec) - - # Try the replacements in order, skipping any that cause - # satisfiability problems. - for replacement in candidates: - if replacement is spec: - break - - # Replace spec with the candidate and normalize - copy = self.copy() - copy[spec.name]._dup(replacement, deps=False) - - try: - # If there are duplicate providers or duplicate - # provider deps, consolidate them and merge - # constraints. - copy.normalize(force=True) - break - except spack.error.SpecError: - # On error, we'll try the next replacement. - continue - - # If replacement is external then trim the dependencies - if replacement.external: - if spec._dependencies: - for dep in spec.dependencies(): - del dep._dependents.edges[spec.name] - changed = True - spec.clear_dependencies() - replacement.clear_dependencies() - replacement.architecture = self.architecture - - # TODO: could this and the stuff in _dup be cleaned up? - def feq(cfield, sfield): - return (not cfield) or (cfield == sfield) - - if replacement is spec or ( - feq(replacement.name, spec.name) - and feq(replacement.versions, spec.versions) - and feq(replacement.compiler, spec.compiler) - and feq(replacement.architecture, spec.architecture) - and feq(replacement._dependencies, spec._dependencies) - and feq(replacement.variants, spec.variants) - and feq(replacement.external_path, spec.external_path) - and feq(replacement.external_modules, spec.external_modules) - ): - continue - # Refine this spec to the candidate. This uses - # replace_with AND dup so that it can work in - # place. TODO: make this more efficient. - if spec.virtual: - spec._replace_with(replacement) - changed = True - if spec._dup(replacement, deps=False, cleardeps=False): - changed = True - - self_index.update(spec) - done = False - break - - return changed - - def _old_concretize(self, tests=False, deprecation_warning=True): - """A spec is concrete if it describes one build of a package uniquely. - This will ensure that this spec is concrete. - - Args: - tests (list or bool): list of packages that will need test - dependencies, or True/False for test all/none - deprecation_warning (bool): enable or disable the deprecation - warning for the old concretizer - - If this spec could describe more than one version, variant, or build - of a package, this will add constraints to make it concrete. - - Some rigorous validation and checks are also performed on the spec. - Concretizing ensures that it is self-consistent and that it's - consistent with requirements of its packages. See flatten() and - normalize() for more details on this. - """ - import spack.concretize - - # Add a warning message to inform users that the original concretizer - # will be removed - if deprecation_warning: - msg = ( - "the original concretizer is currently being used.\n\tUpgrade to " - '"clingo" at your earliest convenience. The original concretizer ' - "will be removed from Spack in a future version." - ) - warnings.warn(msg) - - self.replace_hash() - - if not self.name: - raise spack.error.SpecError("Attempting to concretize anonymous spec") - - if self._concrete: - return - - # take the spec apart once before starting the main concretization loop and resolving - # deps, but don't break dependencies during concretization as the spec is built. - user_spec_deps = self.flat_dependencies(disconnect=True) - - changed = True - force = False - concretizer = spack.concretize.Concretizer(self.copy()) - while changed: - changes = ( - self.normalize(force, tests, user_spec_deps, disconnect=False), - self._expand_virtual_packages(concretizer), - self._concretize_helper(concretizer), - ) - changed = any(changes) - force = True - - visited_user_specs = set() - for dep in self.traverse(): - visited_user_specs.add(dep.name) - pkg_cls = spack.repo.PATH.get_pkg_class(dep.name) - visited_user_specs.update(pkg_cls(dep).provided_virtual_names()) - - extra = set(user_spec_deps.keys()).difference(visited_user_specs) - if extra: - raise InvalidDependencyError(self.name, extra) - - Spec.inject_patches_variant(self) - - for s in self.traverse(): - # TODO: Refactor this into a common method to build external specs - # TODO: or turn external_path into a lazy property - Spec.ensure_external_path_if_external(s) - - # assign hashes and mark concrete - self._finalize_concretization() - - # If any spec in the DAG is deprecated, throw an error - Spec.ensure_no_deprecated(self) - - # Update externals as needed - for dep in self.traverse(): - if dep.external: - dep.package.update_external_dependencies() - - # Now that the spec is concrete we should check if - # there are declared conflicts - # - # TODO: this needs rethinking, as currently we can only express - # TODO: internal configuration conflicts within one package. - matches = [] - for x in self.traverse(): - if x.external: - # external specs are already built, don't worry about whether - # it's possible to build that configuration with Spack - continue - - for when_spec, conflict_list in x.package_class.conflicts.items(): - if x.satisfies(when_spec): - for conflict_spec, msg in conflict_list: - if x.satisfies(conflict_spec): - when = when_spec.copy() - when.name = x.name - matches.append((x, conflict_spec, when, msg)) - if matches: - raise ConflictsInSpecError(self, matches) - - # Check if we can produce an optimized binary (will throw if - # there are declared inconsistencies) - self.architecture.target.optimization_flags(self.compiler) - def _patches_assigned(self): """Whether patches have been assigned to this spec by the concretizer.""" # FIXME: _patches_in_order_of_appearance is attached after concretization @@ -3032,7 +2743,13 @@ def ensure_no_deprecated(root): msg += " For each package listed, choose another spec\n" raise SpecDeprecatedError(msg) - def _new_concretize(self, tests=False): + def concretize(self, tests: Union[bool, List[str]] = False) -> None: + """Concretize the current spec. + + Args: + tests: if False disregard 'test' dependencies, if a list of names activate them for + the packages in the list, if True activate 'test' dependencies for all packages. + """ import spack.solver.asp self.replace_hash() @@ -3066,19 +2783,6 @@ def _new_concretize(self, tests=False): concretized = answer[node] self._dup(concretized) - def concretize(self, tests=False): - """Concretize the current spec. - - Args: - tests (bool or list): if False disregard 'test' dependencies, - if a list of names activate them for the packages in the list, - if True activate 'test' dependencies for all packages. - """ - if spack.config.get("config:concretizer", "clingo") == "clingo": - self._new_concretize(tests) - else: - self._old_concretize(tests) - def _mark_root_concrete(self, value=True): """Mark just this spec (not dependencies) concrete.""" if (not value) and self.concrete and self.installed: @@ -3182,34 +2886,6 @@ def concretized(self, tests=False): clone.concretize(tests=tests) return clone - def flat_dependencies(self, disconnect: bool = False): - """Build DependencyMap of all of this spec's dependencies with their constraints merged. - - Arguments: - disconnect: if True, disconnect all dependents and dependencies among nodes in this - spec's DAG. - """ - flat_deps = {} - deptree = self.traverse(root=False) - - for spec in deptree: - if spec.name not in flat_deps: - flat_deps[spec.name] = spec - else: - try: - flat_deps[spec.name].constrain(spec) - except spack.error.UnsatisfiableSpecError as e: - # DAG contains two instances of the same package with inconsistent constraints. - raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message) from e - - if disconnect: - for spec in flat_deps.values(): - if not spec.concrete: - spec.clear_edges() - self.clear_dependencies() - - return flat_deps - def index(self, deptype="all"): """Return a dictionary that points to all the dependencies in this spec. @@ -3219,312 +2895,6 @@ def index(self, deptype="all"): dm[spec.name].append(spec) return dm - def _evaluate_dependency_conditions(self, name): - """Evaluate all the conditions on a dependency with this name. - - Args: - name (str): name of dependency to evaluate conditions on. - - Returns: - (Dependency): new Dependency object combining all constraints. - - If the package depends on in the current spec - configuration, return the constrained dependency and - corresponding dependency types. - - If no conditions are True (and we don't depend on it), return - ``(None, None)``. - """ - vt.substitute_abstract_variants(self) - # evaluate when specs to figure out constraints on the dependency. - dep = None - for when_spec, deps_by_name in self.package_class.dependencies.items(): - if not self.satisfies(when_spec): - continue - - for dep_name, dependency in deps_by_name.items(): - if dep_name != name: - continue - - if dep is None: - dep = dp.Dependency(Spec(self.name), Spec(name), depflag=0) - try: - dep.merge(dependency) - except spack.error.UnsatisfiableSpecError as e: - e.message = ( - "Conflicting conditional dependencies for spec" - "\n\n\t{0}\n\n" - "Cannot merge constraint" - "\n\n\t{1}\n\n" - "into" - "\n\n\t{2}".format(self, dependency.spec, dep.spec) - ) - raise e - - return dep - - def _find_provider(self, vdep, provider_index): - """Find provider for a virtual spec in the provider index. - Raise an exception if there is a conflicting virtual - dependency already in this spec. - """ - assert spack.repo.PATH.is_virtual_safe(vdep.name), vdep - - # note that this defensively copies. - providers = provider_index.providers_for(vdep) - - # If there is a provider for the vpkg, then use that instead of - # the virtual package. - if providers: - # Remove duplicate providers that can concretize to the same - # result. - for provider in providers: - for spec in providers: - if spec is not provider and provider.intersects(spec): - providers.remove(spec) - # Can't have multiple providers for the same thing in one spec. - if len(providers) > 1: - raise MultipleProviderError(vdep, providers) - return providers[0] - else: - # The user might have required something insufficient for - # pkg_dep -- so we'll get a conflict. e.g., user asked for - # mpi@:1.1 but some package required mpi@2.1:. - required = provider_index.providers_for(vdep.name) - if len(required) > 1: - raise MultipleProviderError(vdep, required) - elif required: - raise UnsatisfiableProviderSpecError(required[0], vdep) - - def _merge_dependency(self, dependency, visited, spec_deps, provider_index, tests): - """Merge dependency information from a Package into this Spec. - - Args: - dependency (Dependency): dependency metadata from a package; - this is typically the result of merging *all* matching - dependency constraints from the package. - visited (set): set of dependency nodes already visited by - ``normalize()``. - spec_deps (dict): ``dict`` of all dependencies from the spec - being normalized. - provider_index (dict): ``provider_index`` of virtual dep - providers in the ``Spec`` as normalized so far. - - NOTE: Caller should assume that this routine owns the - ``dependency`` parameter, i.e., it needs to be a copy of any - internal structures. - - This is the core of ``normalize()``. There are some basic steps: - - * If dep is virtual, evaluate whether it corresponds to an - existing concrete dependency, and merge if so. - - * If it's real and it provides some virtual dep, see if it provides - what some virtual dependency wants and merge if so. - - * Finally, if none of the above, merge dependency and its - constraints into this spec. - - This method returns True if the spec was changed, False otherwise. - - """ - changed = False - dep = dependency.spec - - # If it's a virtual dependency, try to find an existing - # provider in the spec, and merge that. - virtuals = () - if spack.repo.PATH.is_virtual_safe(dep.name): - virtuals = (dep.name,) - visited.add(dep.name) - provider = self._find_provider(dep, provider_index) - if provider: - dep = provider - else: - index = spack.provider_index.ProviderIndex( - repository=spack.repo.PATH, specs=[dep], restrict=True - ) - items = list(spec_deps.items()) - for name, vspec in items: - if not spack.repo.PATH.is_virtual_safe(vspec.name): - continue - - if index.providers_for(vspec): - vspec._replace_with(dep) - del spec_deps[vspec.name] - changed = True - else: - required = index.providers_for(vspec.name) - if required: - raise UnsatisfiableProviderSpecError(required[0], dep) - provider_index.update(dep) - - # If the spec isn't already in the set of dependencies, add it. - # Note: dep is always owned by this method. If it's from the - # caller, it's a copy from _evaluate_dependency_conditions. If it - # comes from a vdep, it's a defensive copy from _find_provider. - if dep.name not in spec_deps: - if self.concrete: - return False - - spec_deps[dep.name] = dep - changed = True - else: - # merge package/vdep information into spec - try: - tty.debug("{0} applying constraint {1}".format(self.name, str(dep))) - changed |= spec_deps[dep.name].constrain(dep) - except spack.error.UnsatisfiableSpecError as e: - fmt = "An unsatisfiable {0}".format(e.constraint_type) - fmt += " constraint has been detected for spec:" - fmt += "\n\n{0}\n\n".format(spec_deps[dep.name].tree(indent=4)) - fmt += "while trying to concretize the partial spec:" - fmt += "\n\n{0}\n\n".format(self.tree(indent=4)) - fmt += "{0} requires {1} {2} {3}, but spec asked for {4}" - - e.message = fmt.format( - self.name, dep.name, e.constraint_type, e.required, e.provided - ) - - raise - - # Add merged spec to my deps and recurse - spec_dependency = spec_deps[dep.name] - if dep.name not in self._dependencies: - self._add_dependency(spec_dependency, depflag=dependency.depflag, virtuals=virtuals) - - changed |= spec_dependency._normalize_helper(visited, spec_deps, provider_index, tests) - return changed - - def _normalize_helper(self, visited, spec_deps, provider_index, tests): - """Recursive helper function for _normalize.""" - if self.name in visited: - return False - visited.add(self.name) - - # If we descend into a virtual spec, there's nothing more - # to normalize. Concretize will finish resolving it later. - if self.virtual or self.external: - return False - - # Avoid recursively adding constraints for already-installed packages: - # these may include build dependencies which are not needed for this - # install (since this package is already installed). - if self.concrete and self.installed: - return False - - # Combine constraints from package deps with constraints from - # the spec, until nothing changes. - any_change = False - changed = True - - while changed: - changed = False - for dep_name in self.package_class.dependency_names(): - # Do we depend on dep_name? If so pkg_dep is not None. - dep = self._evaluate_dependency_conditions(dep_name) - - # If dep is a needed dependency, merge it. - if dep: - merge = ( - # caller requested test dependencies - tests is True - or (tests and self.name in tests) - or - # this is not a test-only dependency - (dep.depflag & ~dt.TEST) - ) - - if merge: - changed |= self._merge_dependency( - dep, visited, spec_deps, provider_index, tests - ) - any_change |= changed - - return any_change - - def normalize(self, force=False, tests=False, user_spec_deps=None, disconnect=True): - """When specs are parsed, any dependencies specified are hanging off - the root, and ONLY the ones that were explicitly provided are there. - Normalization turns a partial flat spec into a DAG, where: - - 1. Known dependencies of the root package are in the DAG. - 2. Each node's dependencies dict only contains its known direct - deps. - 3. There is only ONE unique spec for each package in the DAG. - - * This includes virtual packages. If there a non-virtual - package that provides a virtual package that is in the spec, - then we replace the virtual package with the non-virtual one. - - TODO: normalize should probably implement some form of cycle - detection, to ensure that the spec is actually a DAG. - """ - if not self.name: - raise spack.error.SpecError("Attempting to normalize anonymous spec") - - # Set _normal and _concrete to False when forced - if force and not self._concrete: - self._normal = False - - if self._normal: - return False - - # Ensure first that all packages & compilers in the DAG exist. - self.validate_or_raise() - # Clear the DAG and collect all dependencies in the DAG, which will be - # reapplied as constraints. All dependencies collected this way will - # have been created by a previous execution of 'normalize'. - # A dependency extracted here will only be reintegrated if it is - # discovered to apply according to _normalize_helper, so - # user-specified dependencies are recorded separately in case they - # refer to specs which take several normalization passes to - # materialize. - all_spec_deps = self.flat_dependencies(disconnect=disconnect) - - if user_spec_deps: - for name, spec in user_spec_deps.items(): - if not name: - msg = "Attempted to normalize anonymous dependency spec" - msg += " %s" % spec - raise InvalidSpecDetected(msg) - if name not in all_spec_deps: - all_spec_deps[name] = spec - else: - all_spec_deps[name].constrain(spec) - - # Initialize index of virtual dependency providers if - # concretize didn't pass us one already - provider_index = spack.provider_index.ProviderIndex( - repository=spack.repo.PATH, specs=[s for s in all_spec_deps.values()], restrict=True - ) - - # traverse the package DAG and fill out dependencies according - # to package files & their 'when' specs - visited = set() - - any_change = self._normalize_helper(visited, all_spec_deps, provider_index, tests) - - # remove any leftover dependents outside the spec from, e.g., pruning externals - valid = {id(spec) for spec in all_spec_deps.values()} | {id(self)} - for spec in all_spec_deps.values(): - remove = [dep for dep in spec.dependents() if id(dep) not in valid] - for dep in remove: - del spec._dependents.edges[dep.name] - del dep._dependencies.edges[spec.name] - - # Mark the spec as normal once done. - self._normal = True - return any_change - - def normalized(self): - """ - Return a normalized copy of this spec without modifying this spec. - """ - clone = self.copy() - clone.normalize() - return clone - def validate_or_raise(self): """Checks that names and values in this spec are real. If they're not, it will raise an appropriate exception. diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 3e4b0412dc412b..24040ee0c4a892 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -208,7 +208,6 @@ def test_satisfy_strict_constraint_when_not_concrete(architecture_tuple, constra ], ) @pytest.mark.usefixtures("mock_packages", "config") -@pytest.mark.only_clingo("Fixing the parser broke this test for the original concretizer.") @pytest.mark.skipif( str(archspec.cpu.host().family) != "x86_64", reason="tests are for x86_64 uarch ranges" ) diff --git a/lib/spack/spack/test/cmd/debug.py b/lib/spack/spack/test/cmd/debug.py index 6a240a0ca7d6bc..1d29f441681ae9 100644 --- a/lib/spack/spack/test/cmd/debug.py +++ b/lib/spack/spack/test/cmd/debug.py @@ -60,4 +60,3 @@ def test_report(): assert get_version() in out assert platform.python_version() in out assert str(architecture) in out - assert spack.config.get("config:concretizer") in out diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index e4c5b247805a05..77fa41d54fb677 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -1057,7 +1057,6 @@ def test_env_with_included_config_file(mutable_mock_env_path, packages_file): assert any(x.satisfies("mpileaks@2.2") for x in e._get_environment_specs()) -@pytest.mark.only_clingo("original concretizer does not support requirements") def test_config_change_existing(mutable_mock_env_path, tmp_path, mock_packages, mutable_config): """Test ``config change`` with config in the ``spack.yaml`` as well as an included file scope. @@ -1133,7 +1132,6 @@ def test_config_change_existing(mutable_mock_env_path, tmp_path, mock_packages, spack.spec.Spec("bowtie@1.2.2").concretized() -@pytest.mark.only_clingo("original concretizer does not support requirements") def test_config_change_new(mutable_mock_env_path, tmp_path, mock_packages, mutable_config): spack_yaml = tmp_path / ev.manifest_name spack_yaml.write_text( @@ -2332,8 +2330,6 @@ def test_stack_concretize_extraneous_deps(tmpdir, mock_packages): # FIXME: constraints for stacks # FIXME: This now works for statically-determinable invalid deps # FIXME: But it still does not work for dynamically determined invalid deps - # if spack.config.get('config:concretizer') == 'clingo': - # pytest.skip('Clingo concretizer does not support soft constraints') filename = str(tmpdir.join("spack.yaml")) with open(filename, "w") as f: @@ -3180,9 +3176,7 @@ def test_concretize_user_specs_together(): e.remove("mpich") e.add("mpich2") - exc_cls = spack.error.SpackError - if spack.config.get("config:concretizer") == "clingo": - exc_cls = spack.error.UnsatisfiableSpecError + exc_cls = spack.error.UnsatisfiableSpecError # Concretizing without invalidating the concrete spec for mpileaks fails with pytest.raises(exc_cls): @@ -3208,10 +3202,8 @@ def test_duplicate_packages_raise_when_concretizing_together(): e.add("mpileaks~opt") e.add("mpich") - exc_cls, match = spack.error.SpackError, None - if spack.config.get("config:concretizer") == "clingo": - exc_cls = spack.error.UnsatisfiableSpecError - match = r"You could consider setting `concretizer:unify`" + exc_cls = spack.error.UnsatisfiableSpecError + match = r"You could consider setting `concretizer:unify`" with pytest.raises(exc_cls, match=match): e.concretize() diff --git a/lib/spack/spack/test/cmd/spec.py b/lib/spack/spack/test/cmd/spec.py index 11d88dbc4c6707..9512f31c2a6ab4 100644 --- a/lib/spack/spack/test/cmd/spec.py +++ b/lib/spack/spack/test/cmd/spec.py @@ -30,7 +30,6 @@ def test_spec(): assert "mpich@3.0.4" in output -@pytest.mark.only_clingo("Known failure of the original concretizer") def test_spec_concretizer_args(mutable_database, do_not_check_runtimes_on_reuse): """End-to-end test of CLI concretizer prefs. diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index d0c5ba839a3c72..696160595940b1 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -425,9 +425,6 @@ def test_compiler_flags_differ_identical_compilers(self, mutable_config, clang12 spec.concretize() assert spec.satisfies("cflags=-O2") - @pytest.mark.only_clingo( - "Optional compiler propagation isn't deprecated for original concretizer" - ) @pytest.mark.parametrize( "spec_str,expected,not_expected", [ @@ -472,7 +469,6 @@ def test_compiler_inherited_upwards(self): for dep in spec.traverse(): assert "%clang" in dep - @pytest.mark.only_clingo("Fixing the parser broke this test for the original concretizer") def test_architecture_deep_inheritance(self, mock_targets, compiler_factory): """Make sure that indirect dependencies receive architecture information from the root even when partial architecture information @@ -537,9 +533,6 @@ def test_concretize_two_virtuals_with_dual_provider_and_a_conflict(self): with pytest.raises(spack.error.SpackError): s.concretize() - @pytest.mark.only_clingo( - "Optional compiler propagation isn't deprecated for original concretizer" - ) @pytest.mark.parametrize( "spec_str,expected_propagation", [ @@ -567,9 +560,6 @@ def test_concretize_propagate_disabled_variant(self, spec_str, expected_propagat for key, expected_satisfies in expected_propagation: spec[key].satisfies(expected_satisfies) - @pytest.mark.only_clingo( - "Optional compiler propagation isn't deprecated for original concretizer" - ) def test_concretize_propagated_variant_is_not_passed_to_dependent(self): """Test a package variant value was passed from its parent.""" spec = Spec("ascent~~shared +adios2 ^adios2+shared") @@ -578,9 +568,6 @@ def test_concretize_propagated_variant_is_not_passed_to_dependent(self): assert spec.satisfies("^adios2+shared") assert spec.satisfies("^bzip2~shared") - @pytest.mark.only_clingo( - "Optional compiler propagation isn't deprecated for original concretizer" - ) def test_concretize_propagate_specified_variant(self): """Test that only the specified variant is propagated to the dependencies""" spec = Spec("parent-foo-bar ~~foo") @@ -589,7 +576,6 @@ def test_concretize_propagate_specified_variant(self): assert spec.satisfies("~foo") and spec.satisfies("^dependency-foo-bar~foo") assert spec.satisfies("+bar") and not spec.satisfies("^dependency-foo-bar+bar") - @pytest.mark.only_clingo("Original concretizer is allowed to forego variant propagation") def test_concretize_propagate_multivalue_variant(self): """Test that multivalue variants are propagating the specified value(s) to their dependecies. The dependencies should not have the default value""" @@ -646,11 +632,6 @@ def test_virtual_is_fully_expanded_for_mpileaks(self): assert all(not d.dependencies(name="mpi") for d in spec.traverse()) assert all(x in spec for x in ("zmpi", "mpi")) - def test_my_dep_depends_on_provider_of_my_virtual_dep(self): - spec = Spec("indirect-mpich") - spec.normalize() - spec.concretize() - @pytest.mark.parametrize("compiler_str", ["clang", "gcc", "gcc@10.2.1", "clang@:15.0.0"]) def test_compiler_inheritance(self, compiler_str): spec_str = "mpileaks %{0}".format(compiler_str) @@ -746,7 +727,6 @@ def test_conflicts_in_spec(self, conflict_spec): with pytest.raises(spack.error.SpackError): s.concretize() - @pytest.mark.only_clingo("Testing debug statements specific to new concretizer") def test_conflicts_show_cores(self, conflict_spec, monkeypatch): s = Spec(conflict_spec) with pytest.raises(spack.error.SpackError) as e: @@ -920,7 +900,6 @@ def test_concretize_anonymous_dep(self, spec_str): ("bowtie@1.2.2 os=redhat6", "%gcc@11.1.0"), ], ) - @pytest.mark.only_clingo("Original concretizer cannot work around conflicts") def test_compiler_conflicts_in_package_py( self, spec_str, expected_str, clang12_with_flags, gcc11_with_flags ): @@ -1036,7 +1015,6 @@ def test_patching_dependencies(self, spec_str, patched_deps): ("quantum-espresso~veritas", ["^libelf@0.8.13"]), ], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_working_around_conflicting_defaults(self, spec_str, expected): s = Spec(spec_str).concretized() @@ -1049,7 +1027,6 @@ def test_working_around_conflicting_defaults(self, spec_str, expected): "spec_str,expected", [("cmake", ["%clang"]), ("cmake %gcc", ["%gcc"]), ("cmake %clang", ["%clang"])], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_external_package_and_compiler_preferences(self, spec_str, expected, mutable_config): packages_yaml = { "all": {"compiler": ["clang", "gcc"]}, @@ -1066,7 +1043,6 @@ def test_external_package_and_compiler_preferences(self, spec_str, expected, mut assert s.satisfies(condition) @pytest.mark.regression("5651") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_package_with_constraint_not_met_by_external(self): """Check that if we have an external package A at version X.Y in packages.yaml, but our spec doesn't allow X.Y as a version, then @@ -1081,7 +1057,6 @@ def test_package_with_constraint_not_met_by_external(self): assert not s["libelf"].external @pytest.mark.regression("9744") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_cumulative_version_ranges_with_different_length(self): s = Spec("cumulative-vrange-root").concretized() assert s.concrete @@ -1109,7 +1084,6 @@ def test_dependency_conditional_on_another_dependency_state(self): @pytest.mark.parametrize( "spec_str,expected", [("cmake %gcc", "%gcc"), ("cmake %clang", "%clang")] ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_compiler_constraint_with_external_package(self, spec_str, expected): packages_yaml = { "cmake": {"externals": [{"spec": "cmake@3.4.3", "prefix": "/usr"}], "buildable": False} @@ -1154,18 +1128,9 @@ def test_compiler_in_nonbuildable_external_package( spack.config.set("packages", packages_yaml) s = Spec(spec_str).concretized() - if xfailold and spack.config.get("config:concretizer") == "original": - pytest.xfail("This only works on the ASP-based concretizer") assert s.satisfies(expected) assert "external-common-perl" not in [d.name for d in s.dependencies()] - @pytest.mark.only_clingo("Use case not supported by the original concretizer") - def test_external_packages_have_consistent_hash(self): - s, t = Spec("externaltool"), Spec("externaltool") - s._old_concretize(), t._new_concretize() - - assert s.dag_hash() == t.dag_hash() - def test_external_that_would_require_a_virtual_dependency(self): s = Spec("requires-virtual").concretized() @@ -1182,7 +1147,6 @@ def test_transitive_conditional_virtual_dependency(self, mutable_config): assert s.satisfies("^[virtuals=stuff] externalvirtual") @pytest.mark.regression("20040") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_conditional_provides_or_depends_on(self): # Check that we can concretize correctly a spec that can either # provide a virtual or depend on it based on the value of a variant @@ -1221,7 +1185,6 @@ def test_activating_test_dependencies(self, spec_str, tests_arg, with_dep, witho assert not node.dependencies(deptype="test"), msg.format(pkg_name) @pytest.mark.regression("20019") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_compiler_match_is_preferred_to_newer_version(self, compiler_factory): # This spec depends on openblas. Openblas has a conflict # that doesn't allow newer versions with gcc@4.4.0. Check @@ -1240,7 +1203,6 @@ def test_target_ranges_in_conflicts(self): with pytest.raises(spack.error.SpackError): Spec("impossible-concretization").concretized() - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_target_compatibility(self): with pytest.raises(spack.error.SpackError): Spec("libdwarf target=x86_64 ^libelf target=x86_64_v2").concretized() @@ -1257,7 +1219,6 @@ def test_variant_not_default(self): assert "+foo+bar+baz" in d @pytest.mark.regression("20055") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_custom_compiler_version(self, mutable_config, compiler_factory, monkeypatch): mutable_config.set( "compilers", [compiler_factory(spec="gcc@10foo", operating_system="redhat6")] @@ -1358,7 +1319,6 @@ def mock_fn(*args, **kwargs): {"add_variant": True, "delete_variant": True}, ], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_reuse_installed_packages_when_package_def_changes( self, context, mutable_database, repo_with_changing_recipe ): @@ -1388,7 +1348,6 @@ def test_reuse_installed_packages_when_package_def_changes( # Structure and package hash will be different without reuse assert root.dag_hash() != new_root_without_reuse.dag_hash() - @pytest.mark.only_clingo("Use case not supported by the original concretizer") @pytest.mark.regression("43663") def test_no_reuse_when_variant_condition_does_not_hold(self, mutable_database, mock_packages): spack.config.set("concretizer:reuse", True) @@ -1404,7 +1363,6 @@ def test_no_reuse_when_variant_condition_does_not_hold(self, mutable_database, m new2 = Spec("conditional-variant-pkg +two_whens").concretized() assert new2.satisfies("@2 +two_whens +version_based") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_reuse_with_flags(self, mutable_database, mutable_config): spack.config.set("concretizer:reuse", True) spec = Spec("pkg-a cflags=-g cxxflags=-g").concretized() @@ -1425,7 +1383,6 @@ def test_concretization_of_test_dependencies(self): @pytest.mark.parametrize( "spec_str", ["wrong-variant-in-conflicts", "wrong-variant-in-depends-on"] ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_error_message_for_inconsistent_variants(self, spec_str): s = Spec(spec_str) with pytest.raises(RuntimeError, match="not found in package"): @@ -1530,7 +1487,6 @@ def test_multivalued_variants_from_cli(self, spec_str, expected_dict): ("deprecated-versions@=1.1.0", "deprecated-versions@1.1.0"), ], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_deprecated_versions_not_selected(self, spec_str, expected): with spack.config.override("config:deprecated", True): s = Spec(spec_str).concretized() @@ -1591,7 +1547,6 @@ def test_non_default_provider_of_multiple_virtuals(self): "spec_str,expect_installed", [("mpich", True), ("mpich+debug", False), ("mpich~debug", True)], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_concrete_specs_are_not_modified_on_reuse( self, mutable_database, spec_str, expect_installed ): @@ -1605,7 +1560,6 @@ def test_concrete_specs_are_not_modified_on_reuse( assert s.satisfies(spec_str) @pytest.mark.regression("26721,19736") - @pytest.mark.only_clingo("Original concretizer cannot use sticky variants") def test_sticky_variant_in_package(self): # Here we test that a sticky variant cannot be changed from its default value # by the ASP solver if not set explicitly. The package used in the test needs @@ -1621,7 +1575,6 @@ def test_sticky_variant_in_package(self): assert s.satisfies("%clang") and s.satisfies("~allow-gcc") @pytest.mark.regression("42172") - @pytest.mark.only_clingo("Original concretizer cannot use sticky variants") @pytest.mark.parametrize( "spec,allow_gcc", [ @@ -1644,7 +1597,6 @@ def test_sticky_variant_in_external(self, spec, allow_gcc): assert s["sticky-variant"].satisfies("+allow-gcc") assert s["sticky-variant"].external - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_do_not_invent_new_concrete_versions_unless_necessary(self): # ensure we select a known satisfying version rather than creating # a new '2.7' version. @@ -1666,14 +1618,12 @@ def test_do_not_invent_new_concrete_versions_unless_necessary(self): ("conditional-values-in-variant foo=foo", True), ], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_conditional_values_in_variants(self, spec_str, valid): s = Spec(spec_str) raises = pytest.raises((RuntimeError, spack.error.UnsatisfiableSpecError)) with llnl.util.lang.nullcontext() if valid else raises: s.concretize() - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_conditional_values_in_conditional_variant(self): """Test that conditional variants play well with conditional possible values""" s = Spec("conditional-values-in-variant@1.50.0").concretized() @@ -1682,7 +1632,6 @@ def test_conditional_values_in_conditional_variant(self): s = Spec("conditional-values-in-variant@1.60.0").concretized() assert "cxxstd" in s.variants - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_target_granularity(self): # The test architecture uses core2 as the default target. Check that when # we configure Spack for "generic" granularity we concretize for x86_64 @@ -1693,7 +1642,6 @@ def test_target_granularity(self): with spack.config.override("concretizer:targets", {"granularity": "generic"}): assert s.concretized().satisfies("target=%s" % generic_target) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_host_compatible_concretization(self): # Check that after setting "host_compatible" to false we cannot concretize. # Here we use "k10" to set a target non-compatible with the current host @@ -1706,7 +1654,6 @@ def test_host_compatible_concretization(self): with pytest.raises(spack.error.SpackError): s.concretized() - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_add_microarchitectures_on_explicit_request(self): # Check that if we consider only "generic" targets, we can still solve for # specific microarchitectures on explicit requests @@ -1715,7 +1662,6 @@ def test_add_microarchitectures_on_explicit_request(self): assert s.satisfies("target=k10") @pytest.mark.regression("29201") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_delete_version_and_reuse(self, mutable_database, repo_with_changing_recipe): """Test that we can reuse installed specs with versions not declared in package.py @@ -1730,7 +1676,6 @@ def test_delete_version_and_reuse(self, mutable_database, repo_with_changing_rec assert root.dag_hash() == new_root.dag_hash() @pytest.mark.regression("29201") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_installed_version_is_selected_only_for_reuse( self, mutable_database, repo_with_changing_recipe ): @@ -1808,7 +1753,6 @@ def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, mo (["mpi", "mpich"], 1, 1), ], ) - @pytest.mark.only_clingo("Original concretizer cannot concretize in rounds") def test_best_effort_coconcretize(self, specs, expected, libc_offset): specs = [Spec(s) for s in specs] solver = spack.solver.asp.Solver() @@ -1853,7 +1797,6 @@ def test_best_effort_coconcretize(self, specs, expected, libc_offset): (["hdf5+mpi", "zmpi", "mpich"], "mpich", 2), ], ) - @pytest.mark.only_clingo("Original concretizer cannot concretize in rounds") def test_best_effort_coconcretize_preferences(self, specs, expected_spec, occurances): """Test package preferences during coconcretization.""" specs = [Spec(s) for s in specs] @@ -1869,7 +1812,6 @@ def test_best_effort_coconcretize_preferences(self, specs, expected_spec, occura counter += 1 assert counter == occurances, concrete_specs - @pytest.mark.only_clingo("Original concretizer cannot concretize in rounds") def test_solve_in_rounds_all_unsolved(self, monkeypatch, mock_packages): specs = [Spec(x) for x in ["libdwarf%gcc", "libdwarf%clang"]] solver = spack.solver.asp.Solver() @@ -1885,7 +1827,6 @@ def test_solve_in_rounds_all_unsolved(self, monkeypatch, mock_packages): ): list(solver.solve_in_rounds(specs)) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_coconcretize_reuse_and_virtuals(self): reusable_specs = [] for s in ["mpileaks ^mpich", "zmpi"]: @@ -1902,7 +1843,6 @@ def test_coconcretize_reuse_and_virtuals(self): assert "zmpi" in spec @pytest.mark.regression("30864") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_misleading_error_message_on_version(self, mutable_database): # For this bug to be triggered we need a reusable dependency # that is not optimal in terms of optimization scores. @@ -1919,7 +1859,6 @@ def test_misleading_error_message_on_version(self, mutable_database): solver.driver.solve(setup, [root_spec], reuse=reusable_specs) @pytest.mark.regression("31148") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_version_weight_and_provenance(self): """Test package preferences during coconcretization.""" reusable_specs = [Spec(spec_str).concretized() for spec_str in ("pkg-b@0.9", "pkg-b@1.0")] @@ -1951,7 +1890,6 @@ def test_version_weight_and_provenance(self): assert criterion in result.criteria, criterion assert result_spec.satisfies("^pkg-b@1.0") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_reuse_succeeds_with_config_compatible_os(self): root_spec = Spec("pkg-b") s = root_spec.concretized() @@ -1977,7 +1915,6 @@ def test_git_hash_assigned_version_is_preferred(self): assert hash in str(c) @pytest.mark.parametrize("git_ref", ("a" * 40, "0.2.15", "main")) - @pytest.mark.only_clingo("Original concretizer cannot account for git hashes") def test_git_ref_version_is_equivalent_to_specified_version(self, git_ref): s = Spec("develop-branch-version@git.%s=develop" % git_ref) c = s.concretized() @@ -1987,7 +1924,6 @@ def test_git_ref_version_is_equivalent_to_specified_version(self, git_ref): assert s.satisfies("@0.1:") @pytest.mark.parametrize("git_ref", ("a" * 40, "0.2.15", "fbranch")) - @pytest.mark.only_clingo("Original concretizer cannot account for git hashes") def test_git_ref_version_succeeds_with_unknown_version(self, git_ref): # main is not defined in the package.py for this file s = Spec("develop-branch-version@git.%s=main" % git_ref) @@ -1995,7 +1931,6 @@ def test_git_ref_version_succeeds_with_unknown_version(self, git_ref): assert s.satisfies("develop-branch-version@main") @pytest.mark.regression("31484") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_installed_externals_are_reused( self, mutable_database, repo_with_changing_recipe, tmp_path ): @@ -2027,7 +1962,6 @@ def test_installed_externals_are_reused( assert external3.dag_hash() == external1.dag_hash() @pytest.mark.regression("31484") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_user_can_select_externals_with_require(self, mutable_database, tmp_path): """Test that users have means to select an external even in presence of reusable specs.""" external_conf = { @@ -2056,7 +1990,6 @@ def test_user_can_select_externals_with_require(self, mutable_database, tmp_path assert mpi_spec.name == "multi-provider-mpi" @pytest.mark.regression("31484") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_installed_specs_disregard_conflicts(self, mutable_database, monkeypatch): """Test that installed specs do not trigger conflicts. This covers for the rare case where a conflict is added on a package after a spec matching the conflict was installed. @@ -2077,7 +2010,6 @@ def test_installed_specs_disregard_conflicts(self, mutable_database, monkeypatch assert s.satisfies("~debug"), s @pytest.mark.regression("32471") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_require_targets_are_allowed(self, mutable_database): """Test that users can set target constraints under the require attribute.""" # Configuration to be added to packages.yaml @@ -2252,7 +2184,6 @@ def test_unsolved_specs_raises_error(self, monkeypatch, mock_packages): solver.driver.solve(setup, specs, reuse=[]) @pytest.mark.regression("43141") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_clear_error_when_unknown_compiler_requested(self, mock_packages): """Tests that the solver can report a case where the compiler cannot be set""" with pytest.raises( @@ -2355,7 +2286,6 @@ def test_virtuals_are_annotated_on_edges(self, spec_str): edges = spec.edges_to_dependencies(name="callpath") assert len(edges) == 1 and edges[0].virtuals == () - @pytest.mark.only_clingo("Use case not supported by the original concretizer") @pytest.mark.db @pytest.mark.parametrize( "spec_str,mpi_name", @@ -2370,7 +2300,6 @@ def test_virtuals_are_reconstructed_on_reuse(self, spec_str, mpi_name, mutable_d assert len(mpi_edges) == 1 assert "mpi" in mpi_edges[0].virtuals - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_dont_define_new_version_from_input_if_checksum_required(self, working_env): os.environ["SPACK_CONCRETIZER_REQUIRE_CHECKSUM"] = "yes" with pytest.raises(spack.error.UnsatisfiableSpecError): @@ -2407,7 +2336,6 @@ def test_reuse_python_from_cli_and_extension_from_db(self, mutable_database): ("hdf5 ^gmake", {"gmake": "duplicates.test", "hdf5": "duplicates.test"}), ], ) - @pytest.mark.only_clingo("Uses specs requiring multiple gmake specs") def test_select_lower_priority_package_from_repository_stack( self, spec_str, expected_namespaces ): @@ -2423,7 +2351,6 @@ def test_select_lower_priority_package_from_repository_stack( assert s[name].concrete assert s[name].namespace == namespace - @pytest.mark.only_clingo("Old concretizer cannot reuse") def test_reuse_specs_from_non_available_compilers(self, mutable_config, mutable_database): """Tests that we can reuse specs with compilers that are not configured locally.""" # All the specs in the mutable DB have been compiled with %gcc@=10.2.1 @@ -2494,7 +2421,6 @@ def test_spec_with_build_dep_from_json(self, tmp_path): assert s["dttop"].dag_hash() == build_dep.dag_hash() @pytest.mark.regression("44040") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_exclude_specs_from_reuse(self, monkeypatch): """Tests that we can exclude a spec from reuse when concretizing, and that the spec is not added back to the solve as a dependency of another reusable spec. @@ -2544,7 +2470,6 @@ def test_exclude_specs_from_reuse(self, monkeypatch): [], ], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_include_specs_from_externals_and_libcs( self, included_externals, mutable_config, tmp_path ): @@ -2577,7 +2502,6 @@ def test_include_specs_from_externals_and_libcs( assert result["deprecated-versions"].satisfies("@1.0.0") @pytest.mark.regression("44085") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_can_reuse_concrete_externals_for_dependents(self, mutable_config, tmp_path): """Test that external specs that are in the DB can be reused. This means they are preferred to concretizing another external from packages.yaml @@ -2600,7 +2524,6 @@ def test_can_reuse_concrete_externals_for_dependents(self, mutable_config, tmp_p sombrero = result.specs[0] assert sombrero["externaltool"].dag_hash() == external_spec.dag_hash() - @pytest.mark.only_clingo("Original concretizer cannot reuse") def test_cannot_reuse_host_incompatible_libc(self): """Test whether reuse concretization correctly fails to reuse a spec with a host incompatible libc.""" @@ -2681,7 +2604,6 @@ def duplicates_test_repository(): @pytest.mark.usefixtures("mutable_config", "duplicates_test_repository") -@pytest.mark.only_clingo("Not supported by the original concretizer") class TestConcretizeSeparately: """Collects test on separate concretization""" @@ -2900,7 +2822,6 @@ def edges_test_repository(): @pytest.mark.usefixtures("mutable_config", "edges_test_repository") -@pytest.mark.only_clingo("Edge properties not supported by the original concretizer") class TestConcretizeEdges: """Collects tests on edge properties""" @@ -3051,7 +2972,6 @@ def test_concretization_version_order(): ] -@pytest.mark.only_clingo("Original concretizer cannot reuse specs") @pytest.mark.parametrize( "roots,reuse_yaml,expected,not_expected,expected_length", [ @@ -3126,7 +3046,6 @@ def test_spec_filters(specs, include, exclude, expected): assert f.selected_specs() == expected -@pytest.mark.only_clingo("clingo only reuse feature being tested") @pytest.mark.regression("38484") def test_git_ref_version_can_be_reused(install_mockery, do_not_check_runtimes_on_reuse): first_spec = spack.spec.Spec("git-ref-package@git.2.1.5=2.1.5~opt").concretized() @@ -3144,7 +3063,6 @@ def test_git_ref_version_can_be_reused(install_mockery, do_not_check_runtimes_on assert third_spec.dag_hash() == first_spec.dag_hash() -@pytest.mark.only_clingo("clingo only reuse feature being tested") @pytest.mark.parametrize("standard_version", ["2.0.0", "2.1.5", "2.1.6"]) def test_reuse_prefers_standard_over_git_versions( standard_version, install_mockery, do_not_check_runtimes_on_reuse diff --git a/lib/spack/spack/test/concretize_compiler_runtimes.py b/lib/spack/spack/test/concretize_compiler_runtimes.py index 5b7968ed20788f..fefa262ca4da1b 100644 --- a/lib/spack/spack/test/concretize_compiler_runtimes.py +++ b/lib/spack/spack/test/concretize_compiler_runtimes.py @@ -17,10 +17,7 @@ from spack.environment.environment import ViewDescriptor from spack.version import Version -pytestmark = [ - pytest.mark.only_clingo("Original concretizer does not support compiler runtimes"), - pytest.mark.usefixtures("enable_runtimes"), -] +pytestmark = [pytest.mark.usefixtures("enable_runtimes")] def _concretize_with_reuse(*, root_str, reused_str): diff --git a/lib/spack/spack/test/concretize_errors.py b/lib/spack/spack/test/concretize_errors.py index 09ac4e3b93f001..114942bc6de3c1 100644 --- a/lib/spack/spack/test/concretize_errors.py +++ b/lib/spack/spack/test/concretize_errors.py @@ -8,10 +8,7 @@ import spack.solver.asp import spack.spec -pytestmark = [ - pytest.mark.not_on_windows("Windows uses old concretizer"), - pytest.mark.only_clingo("Original concretizer does not support configuration requirements"), -] +pytestmark = [pytest.mark.not_on_windows("Windows uses old concretizer")] version_error_messages = [ "Cannot satisfy 'fftw@:1.0' and 'fftw@1.1:", diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py index d0ecc8f5994ed9..1a411407740037 100644 --- a/lib/spack/spack/test/concretize_preferences.py +++ b/lib/spack/spack/test/concretize_preferences.py @@ -113,7 +113,6 @@ def test_preferred_compilers(self, compiler_str, spec_str): spec = spack.spec.Spec(spec_str).concretized() assert spec.compiler == CompilerSpec(compiler_str) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_preferred_target(self, mutable_mock_repo): """Test preferred targets are applied correctly""" spec = concretize("mpich") @@ -143,7 +142,6 @@ def test_preferred_versions(self): spec = concretize("mpileaks") assert spec.version == Version("2.2") - @pytest.mark.only_clingo("This behavior is not enforced for the old concretizer") def test_preferred_versions_mixed_version_types(self): update_packages("mixedversions", "version", ["=2.0"]) spec = concretize("mixedversions") @@ -225,7 +223,6 @@ def test_preferred(self): spec.concretize() assert spec.version == Version("3.5.0") - @pytest.mark.only_clingo("This behavior is not enforced for the old concretizer") def test_preferred_undefined_raises(self): """Preference should not specify an undefined version""" update_packages("python", "version", ["3.5.0.1"]) @@ -233,7 +230,6 @@ def test_preferred_undefined_raises(self): with pytest.raises(spack.config.ConfigError): spec.concretize() - @pytest.mark.only_clingo("This behavior is not enforced for the old concretizer") def test_preferred_truncated(self): """Versions without "=" are treated as version ranges: if there is a satisfying version defined in the package.py, we should use that @@ -510,7 +506,6 @@ def test_sticky_variant_accounts_for_packages_yaml(self): assert s.satisfies("%gcc") and s.satisfies("+allow-gcc") @pytest.mark.regression("41134") - @pytest.mark.only_clingo("Not backporting the fix to the old concretizer") def test_default_preference_variant_different_type_does_not_error(self): """Tests that a different type for an existing variant in the 'all:' section of packages.yaml doesn't fail with an error. diff --git a/lib/spack/spack/test/concretize_requirements.py b/lib/spack/spack/test/concretize_requirements.py index 3ec086d962a570..38fe4c296ffdae 100644 --- a/lib/spack/spack/test/concretize_requirements.py +++ b/lib/spack/spack/test/concretize_requirements.py @@ -19,10 +19,7 @@ from spack.test.conftest import create_test_repo from spack.util.url import path_to_file_url -pytestmark = [ - pytest.mark.not_on_windows("Windows uses old concretizer"), - pytest.mark.only_clingo("Original concretizer does not support configuration requirements"), -] +pytestmark = [pytest.mark.not_on_windows("Windows uses old concretizer")] def update_packages_config(conf_str): diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index b0cf6bac651eaa..7dccdcc1822ab4 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -306,14 +306,14 @@ def test_add_config_path(mutable_config): @pytest.mark.regression("17543,23259") def test_add_config_path_with_enumerated_type(mutable_config): - spack.config.add("config:concretizer:clingo") - assert spack.config.get("config")["concretizer"] == "clingo" + spack.config.add("config:flags:keep_werror:all") + assert spack.config.get("config")["flags"]["keep_werror"] == "all" - spack.config.add("config:concretizer:original") - assert spack.config.get("config")["concretizer"] == "original" + spack.config.add("config:flags:keep_werror:specific") + assert spack.config.get("config")["flags"]["keep_werror"] == "specific" with pytest.raises(spack.config.ConfigError): - spack.config.add("config:concretizer:foo") + spack.config.add("config:flags:keep_werror:foo") def test_add_config_filename(mock_low_high_config, tmpdir): diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 37fabe3f0bc1c8..00d7980a551dee 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -704,11 +704,10 @@ def configuration_dir(tmpdir_factory, linux_os): tmpdir.ensure("user", dir=True) # Fill out config.yaml, compilers.yaml and modules.yaml templates. - solver = os.environ.get("SPACK_TEST_SOLVER", "clingo") locks = sys.platform != "win32" config = tmpdir.join("site", "config.yaml") config_template = test_config / "config.yaml" - config.write(config_template.read_text().format(install_tree_root, solver, locks)) + config.write(config_template.read_text().format(install_tree_root, locks)) target = str(archspec.cpu.host().family) compilers = tmpdir.join("site", "compilers.yaml") @@ -1956,16 +1955,6 @@ def nullify_globals(request, monkeypatch): def pytest_runtest_setup(item): - # Skip tests if they are marked only clingo and are run with the original concretizer - only_clingo_marker = item.get_closest_marker(name="only_clingo") - if only_clingo_marker and os.environ.get("SPACK_TEST_SOLVER") == "original": - pytest.skip(*only_clingo_marker.args) - - # Skip tests if they are marked only original and are run with clingo - only_original_marker = item.get_closest_marker(name="only_original") - if only_original_marker and os.environ.get("SPACK_TEST_SOLVER", "clingo") == "clingo": - pytest.skip(*only_original_marker.args) - # Skip test marked "not_on_windows" if they're run on Windows not_on_windows_marker = item.get_closest_marker(name="not_on_windows") if not_on_windows_marker and sys.platform == "win32": diff --git a/lib/spack/spack/test/data/config/config.yaml b/lib/spack/spack/test/data/config/config.yaml index 4a8da4e25f61da..e6867adb3db9b2 100644 --- a/lib/spack/spack/test/data/config/config.yaml +++ b/lib/spack/spack/test/data/config/config.yaml @@ -13,5 +13,4 @@ config: ssl_certs: $SSL_CERT_FILE checksum: true dirty: false - concretizer: {1} - locks: {2} + locks: {1} diff --git a/lib/spack/spack/test/env.py b/lib/spack/spack/test/env.py index 46be9ca66c864b..2452cd937a76cd 100644 --- a/lib/spack/spack/test/env.py +++ b/lib/spack/spack/test/env.py @@ -573,9 +573,6 @@ def test_conflicts_with_packages_that_are_not_dependencies( """Tests that we cannot concretize two specs together, if one conflicts with the other, even though they don't have a dependency relation. """ - if spack.config.get("config:concretizer") == "original": - pytest.xfail("Known failure of the original concretizer") - manifest = tmp_path / "spack.yaml" manifest.write_text( f"""\ @@ -597,7 +594,6 @@ def test_conflicts_with_packages_that_are_not_dependencies( @pytest.mark.regression("39455") -@pytest.mark.only_clingo("Known failure of the original concretizer") @pytest.mark.parametrize( "possible_mpi_spec,unify", [("mpich", False), ("mpich", True), ("zmpi", False), ("zmpi", True)] ) @@ -698,7 +694,6 @@ def test_removing_spec_from_manifest_with_exact_duplicates( @pytest.mark.regression("35298") -@pytest.mark.only_clingo("Propagation not supported in the original concretizer") def test_variant_propagation_with_unify_false(tmp_path, mock_packages, config): """Spack distributes concretizations to different processes, when unify:false is selected and the number of roots is 2 or more. When that happens, the specs to be concretized need to be @@ -814,7 +809,6 @@ def test_deconcretize_then_concretize_does_not_error(mutable_mock_env_path, mock @pytest.mark.regression("44216") -@pytest.mark.only_clingo() def test_root_version_weights_for_old_versions(mutable_mock_env_path, mock_packages): """Tests that, when we select two old versions of root specs that have the same version optimization penalty, both are considered. diff --git a/lib/spack/spack/test/graph.py b/lib/spack/spack/test/graph.py index 338690a72e4105..001091d22c6dc4 100644 --- a/lib/spack/spack/test/graph.py +++ b/lib/spack/spack/test/graph.py @@ -9,33 +9,6 @@ import spack.spec -def test_static_graph_mpileaks(config, mock_packages): - """Test a static spack graph for a simple package.""" - s = spack.spec.Spec("mpileaks").normalized() - - stream = io.StringIO() - spack.graph.static_graph_dot([s], out=stream) - - dot = stream.getvalue() - - assert ' "mpileaks" [label="mpileaks"]\n' in dot - assert ' "dyninst" [label="dyninst"]\n' in dot - assert ' "callpath" [label="callpath"]\n' in dot - assert ' "libelf" [label="libelf"]\n' in dot - assert ' "libdwarf" [label="libdwarf"]\n' in dot - - mpi_providers = spack.repo.PATH.providers_for("mpi") - for spec in mpi_providers: - assert ('"mpileaks" -> "%s"' % spec.name) in dot - assert ('"callpath" -> "%s"' % spec.name) in dot - - assert ' "dyninst" -> "libdwarf"\n' in dot - assert ' "callpath" -> "dyninst"\n' in dot - assert ' "libdwarf" -> "libelf"\n' in dot - assert ' "mpileaks" -> "callpath"\n' in dot - assert ' "dyninst" -> "libelf"\n' in dot - - def test_dynamic_dot_graph_mpileaks(default_mock_concretization): """Test dynamically graphing the mpileaks package.""" s = default_mock_concretization("mpileaks") diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 0ab26060c69a41..84272a15d10d4b 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -14,7 +14,6 @@ pytestmark = [ pytest.mark.usefixtures("mock_packages", "config"), - pytest.mark.only_clingo("The original concretizer cannot concretize most of the specs"), pytest.mark.not_on_windows("Not running on windows"), ] diff --git a/lib/spack/spack/test/optional_deps.py b/lib/spack/spack/test/optional_deps.py index bc3596220d30c5..18fab35065cefb 100644 --- a/lib/spack/spack/test/optional_deps.py +++ b/lib/spack/spack/test/optional_deps.py @@ -72,13 +72,6 @@ def spec_and_expected(request): return spec, Spec.from_literal(d) -def test_normalize(spec_and_expected, config, mock_packages): - spec, expected = spec_and_expected - spec = Spec(spec) - spec.normalize() - assert spec.eq_dag(expected, deptypes=False) - - def test_default_variant(config, mock_packages): spec = Spec("optional-dep-test-3") spec.concretize() diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 398741a6cfa318..e66c3e1390cb9e 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -82,7 +82,6 @@ def test_test_deptype(tmpdir): @pytest.mark.usefixtures("config") -@pytest.mark.only_clingo("fails with the original concretizer and full hashes") def test_installed_deps(monkeypatch, mock_packages): """Ensure that concrete specs and their build deps don't constrain solves. @@ -183,14 +182,11 @@ def test_conflicting_package_constraints(self, set_dependency): spec = Spec("mpileaks ^mpich ^callpath ^dyninst ^libelf ^libdwarf") - # TODO: try to do something to show that the issue was with - # TODO: the user's input or with package inconsistencies. - with pytest.raises(spack.spec.UnsatisfiableVersionSpecError): - spec.normalize() + with pytest.raises(spack.error.UnsatisfiableSpecError): + spec.concretize() def test_preorder_node_traversal(self): - dag = Spec("mpileaks ^zmpi") - dag.normalize() + dag = Spec("mpileaks ^zmpi").concretized() names = ["mpileaks", "callpath", "dyninst", "libdwarf", "libelf", "zmpi", "fake"] pairs = list(zip([0, 1, 2, 3, 4, 2, 3], names)) @@ -202,8 +198,7 @@ def test_preorder_node_traversal(self): assert [(x, y.name) for x, y in traversal] == pairs def test_preorder_edge_traversal(self): - dag = Spec("mpileaks ^zmpi") - dag.normalize() + dag = Spec("mpileaks ^zmpi").concretized() names = [ "mpileaks", @@ -225,8 +220,7 @@ def test_preorder_edge_traversal(self): assert [(x, y.name) for x, y in traversal] == pairs def test_preorder_path_traversal(self): - dag = Spec("mpileaks ^zmpi") - dag.normalize() + dag = Spec("mpileaks ^zmpi").concretized() names = [ "mpileaks", @@ -249,8 +243,7 @@ def test_preorder_path_traversal(self): assert [(x, y.name) for x, y in traversal] == pairs def test_postorder_node_traversal(self): - dag = Spec("mpileaks ^zmpi") - dag.normalize() + dag = Spec("mpileaks ^zmpi").concretized() names = ["libelf", "libdwarf", "dyninst", "fake", "zmpi", "callpath", "mpileaks"] pairs = list(zip([4, 3, 2, 3, 2, 1, 0], names)) @@ -262,8 +255,7 @@ def test_postorder_node_traversal(self): assert [(x, y.name) for x, y in traversal] == pairs def test_postorder_edge_traversal(self): - dag = Spec("mpileaks ^zmpi") - dag.normalize() + dag = Spec("mpileaks ^zmpi").concretized() names = [ "libelf", @@ -285,8 +277,7 @@ def test_postorder_edge_traversal(self): assert [(x, y.name) for x, y in traversal] == pairs def test_postorder_path_traversal(self): - dag = Spec("mpileaks ^zmpi") - dag.normalize() + dag = Spec("mpileaks ^zmpi").concretized() names = [ "libelf", @@ -308,63 +299,6 @@ def test_postorder_path_traversal(self): traversal = dag.traverse(cover="paths", depth=True, order="post") assert [(x, y.name) for x, y in traversal] == pairs - def test_conflicting_spec_constraints(self): - mpileaks = Spec("mpileaks ^mpich ^callpath ^dyninst ^libelf ^libdwarf") - - # Normalize then add conflicting constraints to the DAG (this is an - # extremely unlikely scenario, but we test for it anyway) - mpileaks.normalize() - - mpileaks.edges_to_dependencies(name="mpich")[0].spec = Spec("mpich@1.0") - - mpileaks.edges_to_dependencies(name="callpath")[0].spec.edges_to_dependencies( - name="mpich" - )[0].spec = Spec("mpich@2.0") - - with pytest.raises(spack.spec.InconsistentSpecError): - mpileaks.flat_dependencies() - - def test_normalize_twice(self): - """Make sure normalize can be run twice on the same spec, - and that it is idempotent.""" - spec = Spec("mpileaks") - spec.normalize() - n1 = spec.copy() - - spec.normalize() - assert n1 == spec - - def test_normalize_a_lot(self): - spec = Spec("mpileaks") - spec.normalize() - spec.normalize() - spec.normalize() - spec.normalize() - - def test_normalize_with_virtual_spec(self): - dag = Spec.from_literal( - { - "mpileaks": { - "callpath": { - "dyninst": {"libdwarf": {"libelf": None}, "libelf": None}, - "mpi": None, - }, - "mpi": None, - } - } - ) - dag.normalize() - - # make sure nothing with the same name occurs twice - counts = {} - for spec in dag.traverse(key=id): - if spec.name not in counts: - counts[spec.name] = 0 - counts[spec.name] += 1 - - for name in counts: - assert counts[name] == 1 - def test_dependents_and_dependencies_are_correct(self): spec = Spec.from_literal( { @@ -377,36 +311,26 @@ def test_dependents_and_dependencies_are_correct(self): } } ) - check_links(spec) - spec.normalize() + spec.concretize() check_links(spec) - def test_unsatisfiable_version(self, set_dependency): - set_dependency("mpileaks", "mpich@1.0") - spec = Spec("mpileaks ^mpich@2.0 ^callpath ^dyninst ^libelf ^libdwarf") - with pytest.raises(spack.spec.UnsatisfiableVersionSpecError): - spec.normalize() - - def test_unsatisfiable_compiler(self, set_dependency): - set_dependency("mpileaks", "mpich%gcc") - spec = Spec("mpileaks ^mpich%intel ^callpath ^dyninst ^libelf" " ^libdwarf") - with pytest.raises(spack.spec.UnsatisfiableCompilerSpecError): - spec.normalize() - - def test_unsatisfiable_compiler_version(self, set_dependency): - set_dependency("mpileaks", "mpich%gcc@4.6") - spec = Spec("mpileaks ^mpich%gcc@4.5 ^callpath ^dyninst ^libelf" " ^libdwarf") - with pytest.raises(spack.spec.UnsatisfiableCompilerSpecError): - spec.normalize() - - def test_unsatisfiable_architecture(self, set_dependency): - set_dependency("mpileaks", "mpich platform=test target=be") - spec = Spec( - "mpileaks ^mpich platform=test target=fe ^callpath" " ^dyninst ^libelf ^libdwarf" - ) - with pytest.raises(spack.spec.UnsatisfiableArchitectureSpecError): - spec.normalize() + @pytest.mark.parametrize( + "constraint_str,spec_str", + [ + ("mpich@1.0", "mpileaks ^mpich@2.0"), + ("mpich%gcc", "mpileaks ^mpich%intel"), + ("mpich%gcc@4.6", "mpileaks ^mpich%gcc@4.5"), + ("mpich platform=test target=be", "mpileaks ^mpich platform=test target=fe"), + ], + ) + def test_unsatisfiable_cases(self, set_dependency, constraint_str, spec_str): + """Tests that synthetic cases of conflicting requirements raise an UnsatisfiableSpecError + when concretizing. + """ + set_dependency("mpileaks", constraint_str) + with pytest.raises(spack.error.UnsatisfiableSpecError): + Spec(spec_str).concretize() @pytest.mark.parametrize( "spec_str", ["libelf ^mpich", "libelf ^libdwarf", "mpich ^dyninst ^libelf"] @@ -451,106 +375,6 @@ def test_equal(self): assert not flip_flat.eq_dag(flip_dag) assert not dag.eq_dag(flip_dag) - def test_normalize_mpileaks(self): - # Spec parsed in from a string - spec = Spec.from_literal( - {"mpileaks ^mpich ^callpath ^dyninst ^libelf@1.8.11 ^libdwarf": None} - ) - - # What that spec should look like after parsing - expected_flat = Spec.from_literal( - { - "mpileaks": { - "mpich": None, - "callpath": None, - "dyninst": None, - "libelf@1.8.11": None, - "libdwarf": None, - } - } - ) - - # What it should look like after normalization - mpich = Spec("mpich") - libelf = Spec("libelf@1.8.11") - expected_normalized = Spec.from_literal( - { - "mpileaks": { - "callpath": { - "dyninst": {"libdwarf": {libelf: None}, libelf: None}, - mpich: None, - }, - mpich: None, - } - } - ) - - # Similar to normalized spec, but now with copies of the same - # libelf node. Normalization should result in a single unique - # node for each package, so this is the wrong DAG. - non_unique_nodes = Spec.from_literal( - { - "mpileaks": { - "callpath": { - "dyninst": {"libdwarf": {"libelf@1.8.11": None}, "libelf@1.8.11": None}, - mpich: None, - }, - mpich: None, - } - }, - normal=False, - ) - - # All specs here should be equal under regular equality - specs = (spec, expected_flat, expected_normalized, non_unique_nodes) - for lhs, rhs in zip(specs, specs): - assert lhs == rhs - assert str(lhs) == str(rhs) - - # Test that equal and equal_dag are doing the right thing - assert spec == expected_flat - assert spec.eq_dag(expected_flat) - - # Normalized has different DAG structure, so NOT equal. - assert spec != expected_normalized - assert not spec.eq_dag(expected_normalized) - - # Again, different DAG structure so not equal. - assert spec != non_unique_nodes - assert not spec.eq_dag(non_unique_nodes) - - spec.normalize() - - # After normalizing, spec_dag_equal should match the normalized spec. - assert spec != expected_flat - assert not spec.eq_dag(expected_flat) - - # verify DAG structure without deptypes. - assert spec.eq_dag(expected_normalized, deptypes=False) - assert not spec.eq_dag(non_unique_nodes, deptypes=False) - - assert not spec.eq_dag(expected_normalized, deptypes=True) - assert not spec.eq_dag(non_unique_nodes, deptypes=True) - - @pytest.mark.xfail(reason="String representation changed") - def test_normalize_with_virtual_package(self): - spec = Spec("mpileaks ^mpi ^libelf@1.8.11 ^libdwarf") - spec.normalize() - - expected_normalized = Spec.from_literal( - { - "mpileaks": { - "callpath": { - "dyninst": {"libdwarf": {"libelf@1.8.11": None}, "libelf@1.8.11": None}, - "mpi": None, - }, - "mpi": None, - } - } - ) - - assert str(spec) == str(expected_normalized) - def test_contains(self): spec = Spec("mpileaks ^mpi ^libelf@1.8.11 ^libdwarf") assert Spec("mpi") in spec @@ -576,20 +400,6 @@ def test_copy_simple(self): copy_ids = set(id(s) for s in copy.traverse()) assert not orig_ids.intersection(copy_ids) - def test_copy_normalized(self): - orig = Spec("mpileaks") - orig.normalize() - copy = orig.copy() - check_links(copy) - - assert orig == copy - assert orig.eq_dag(copy) - - # ensure no shared nodes bt/w orig and copy. - orig_ids = set(id(s) for s in orig.traverse()) - copy_ids = set(id(s) for s in copy.traverse()) - assert not orig_ids.intersection(copy_ids) - def test_copy_concretized(self): orig = Spec("mpileaks") orig.concretize() @@ -650,63 +460,53 @@ def test_copy_through_spec_build_interface(self): run3 -b-> build3 """ - def test_deptype_traversal(self): - dag = Spec("dtuse") - dag.normalize() - - names = [ - "dtuse", - "dttop", - "dtbuild1", - "dtbuild2", - "dtlink2", - "dtlink1", - "dtlink3", - "dtlink4", - ] - - traversal = dag.traverse(deptype=("build", "link")) - assert [x.name for x in traversal] == names - - def test_deptype_traversal_with_builddeps(self): - dag = Spec("dttop") - dag.normalize() - - names = ["dttop", "dtbuild1", "dtbuild2", "dtlink2", "dtlink1", "dtlink3", "dtlink4"] - - traversal = dag.traverse(deptype=("build", "link")) - assert [x.name for x in traversal] == names - - def test_deptype_traversal_full(self): - dag = Spec("dttop") - dag.normalize() - - names = [ - "dttop", - "dtbuild1", - "dtbuild2", - "dtlink2", - "dtrun2", - "dtlink1", - "dtlink3", - "dtlink4", - "dtrun1", - "dtlink5", - "dtrun3", - "dtbuild3", - ] - - traversal = dag.traverse(deptype=all) - assert [x.name for x in traversal] == names - - def test_deptype_traversal_run(self): - dag = Spec("dttop") - dag.normalize() - - names = ["dttop", "dtrun1", "dtrun3"] - - traversal = dag.traverse(deptype="run") - assert [x.name for x in traversal] == names + @pytest.mark.parametrize( + "spec_str,deptypes,expected", + [ + ( + "dtuse", + ("build", "link"), + [ + "dtuse", + "dttop", + "dtbuild1", + "dtbuild2", + "dtlink2", + "dtlink1", + "dtlink3", + "dtlink4", + ], + ), + ( + "dttop", + ("build", "link"), + ["dttop", "dtbuild1", "dtbuild2", "dtlink2", "dtlink1", "dtlink3", "dtlink4"], + ), + ( + "dttop", + all, + [ + "dttop", + "dtbuild1", + "dtbuild2", + "dtlink2", + "dtrun2", + "dtlink1", + "dtlink3", + "dtlink4", + "dtrun1", + "dtlink5", + "dtrun3", + "dtbuild3", + ], + ), + ("dttop", "run", ["dttop", "dtrun1", "dtrun3"]), + ], + ) + def test_deptype_traversal(self, spec_str, deptypes, expected): + dag = Spec(spec_str).concretized() + traversal = dag.traverse(deptype=deptypes) + assert [x.name for x in traversal] == expected def test_hash_bits(self): """Ensure getting first n bits of a base32-encoded DAG hash works.""" @@ -834,15 +634,6 @@ def check_diamond_normalized_dag(self, spec): assert spec.eq_dag(dag) - def test_normalize_diamond_deptypes(self): - """Ensure that dependency types are preserved even if the same thing is - depended on in two different ways.""" - s = Spec("dt-diamond") - s.normalize() - - self.check_diamond_deptypes(s) - self.check_diamond_normalized_dag(s) - def test_concretize_deptypes(self): """Ensure that dependency types are preserved after concretization.""" s = Spec("dt-diamond") @@ -851,22 +642,11 @@ def test_concretize_deptypes(self): def test_copy_deptypes(self): """Ensure that dependency types are preserved by spec copy.""" - s1 = Spec("dt-diamond") - s1.normalize() + s1 = Spec("dt-diamond").concretized() self.check_diamond_deptypes(s1) - self.check_diamond_normalized_dag(s1) - s2 = s1.copy() - self.check_diamond_normalized_dag(s2) self.check_diamond_deptypes(s2) - s3 = Spec("dt-diamond") - s3.concretize() - self.check_diamond_deptypes(s3) - - s4 = s3.copy() - self.check_diamond_deptypes(s4) - def test_getitem_query(self): s = Spec("mpileaks") s.concretize() diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 0f9d1b3f051b83..e11e663338e8e3 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -537,27 +537,20 @@ def test_self_index(self): s = Spec("callpath") assert s["callpath"] == s - def test_dep_index(self): - s = Spec("callpath") - s.normalize() + def test_dep_index(self, default_mock_concretization): + """Tests __getitem__ and __contains__ for specs.""" + s = default_mock_concretization("callpath") assert s["callpath"] == s - assert isinstance(s["dyninst"], Spec) - assert isinstance(s["libdwarf"], Spec) - assert isinstance(s["libelf"], Spec) - assert isinstance(s["mpi"], Spec) - assert s["dyninst"].name == "dyninst" - assert s["libdwarf"].name == "libdwarf" - assert s["libelf"].name == "libelf" - assert s["mpi"].name == "mpi" + # Real dependencies + for key in ("dyninst", "libdwarf", "libelf"): + assert isinstance(s[key], Spec) + assert s[key].name == key + assert key in s - def test_spec_contains_deps(self): - s = Spec("callpath") - s.normalize() - assert "dyninst" in s - assert "libdwarf" in s - assert "libelf" in s + # Virtual dependencies + assert s["mpi"].name == "mpich" assert "mpi" in s @pytest.mark.usefixtures("config") @@ -1123,9 +1116,6 @@ def test_spec_override(self): ], ) def test_virtual_deps_bindings(self, default_mock_concretization, spec_str, specs_in_dag): - if spack.config.get("config:concretizer") == "original": - pytest.skip("Use case not supported by the original concretizer") - s = default_mock_concretization(spec_str) for label, expected in specs_in_dag: assert label in s @@ -1141,9 +1131,6 @@ def test_virtual_deps_bindings(self, default_mock_concretization, spec_str, spec ], ) def test_unsatisfiable_virtual_deps_bindings(self, spec_str): - if spack.config.get("config:concretizer") == "original": - pytest.skip("Use case not supported by the original concretizer") - with pytest.raises(spack.solver.asp.UnsatisfiableSpecError): Spec(spec_str).concretized() diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py index 3f20e5626eee10..5b64822b38268a 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -117,8 +117,9 @@ def test_yaml_subdag(config, mock_packages): assert spec[dep].eq_dag(json_spec[dep]) -def test_using_ordered_dict(mock_packages): - """Checks that dicts are ordered +@pytest.mark.parametrize("spec_str", ["mpileaks ^zmpi", "dttop", "dtuse"]) +def test_using_ordered_dict(default_mock_concretization, spec_str): + """Checks that we use syaml_dicts for spec serialization. Necessary to make sure that dag_hash is stable across python versions and processes. @@ -136,14 +137,10 @@ def descend_and_check(iterable, level=0): max_level = nlevel return max_level - specs = ["mpileaks ^zmpi", "dttop", "dtuse"] - for spec in specs: - dag = Spec(spec) - dag.normalize() - level = descend_and_check(dag.to_node_dict()) - - # level just makes sure we are doing something here - assert level >= 5 + s = default_mock_concretization(spec_str) + level = descend_and_check(s.to_node_dict()) + # level just makes sure we are doing something here + assert level >= 5 def test_ordered_read_not_required_for_consistent_dag_hash(config, mock_packages): diff --git a/lib/spack/spack/test/url_fetch.py b/lib/spack/spack/test/url_fetch.py index dadac0944e1803..74505b3688081c 100644 --- a/lib/spack/spack/test/url_fetch.py +++ b/lib/spack/spack/test/url_fetch.py @@ -213,7 +213,6 @@ def test_from_list_url(mock_packages, config, spec, url, digest, _fetch_method): ("=2.0.0", "foo-2.0.0.tar.gz", None), ], ) -@pytest.mark.only_clingo("Original concretizer doesn't resolve concrete versions to known ones") def test_new_version_from_list_url( mock_packages, config, _fetch_method, requested_version, tarball, digest ): diff --git a/pytest.ini b/pytest.ini index 2a3152da3d9ada..8465cb808594b0 100644 --- a/pytest.ini +++ b/pytest.ini @@ -14,6 +14,4 @@ markers = enable_compiler_verification: enable compiler verification within unit tests enable_compiler_execution: enable compiler execution to detect link paths and libc disable_clean_stage_check: avoid failing tests if there are leftover files in the stage area - only_clingo: mark unit tests that run only with clingo - only_original: mark unit tests that are specific to the original concretizer not_on_windows: mark tests that are skipped on Windows diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests index 6808e18bdbe867..3c889bc8881d31 100755 --- a/share/spack/qa/run-unit-tests +++ b/share/spack/qa/run-unit-tests @@ -46,11 +46,6 @@ $coverage_run $(which spack) python -c "import spack.pkg.builtin.mpileaks; repr( #----------------------------------------------------------- # Run unit tests with code coverage #----------------------------------------------------------- -if [[ "$SPACK_TEST_SOLVER" == "original" ]]; then - echo "ORIGINAL CONCRETIZER [skipping slow unit tests]" - export PYTEST_ADDOPTS='-m "not maybeslow"' -fi - # Check if xdist is available if python -m pytest --trace-config 2>&1 | grep xdist; then export PYTEST_ADDOPTS="$PYTEST_ADDOPTS --dist loadfile --tx '${SPACK_TEST_PARALLEL:=3}*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python'" From f9d8b6b5aa59fc1e6895943227f809c99277b902 Mon Sep 17 00:00:00 2001 From: Piotr Luszczek Date: Sun, 11 Aug 2024 04:14:21 -0400 Subject: [PATCH 261/435] plasma: add version 24.8.7 (#45656) --- var/spack/repos/builtin/packages/plasma/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/plasma/package.py b/var/spack/repos/builtin/packages/plasma/package.py index 85b0141fafddae..1d5e46b272b58a 100644 --- a/var/spack/repos/builtin/packages/plasma/package.py +++ b/var/spack/repos/builtin/packages/plasma/package.py @@ -27,6 +27,7 @@ class Plasma(CMakePackage): license("BSD-3-Clause") version("develop", git=git) + version("24.8.7", sha256="748464deb08642d2ea7309fb667e1383d85127c2cd8f0d134180b39c17834503") version("23.8.2", sha256="2db34de0575f3e3d16531bdcf1caddef146f68e71335977a3e8ec193003ab943") version("22.9.29", sha256="78827898b7e3830eee2e388823b9180858279f77c5eda5aa1be173765c53ade5") version("21.8.29", sha256="e0bb4d9143c8540f9f46cbccac9ed0cbea12500a864e6954fce2fe94ea057a10") From 990e0dc52629d2c38b8b36317c51a4a7e9a4d845 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Sun, 11 Aug 2024 01:28:25 -0700 Subject: [PATCH 262/435] hypre: old to new test API (#45066) * hypre: old to new test API * hypre: restore test_parts; add Makefile cleanup --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/hypre/package.py | 76 +++++++++---------- 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 86ff57b274b50b..9b908b4465445a 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -139,17 +139,11 @@ def patch(self): # fix sequential compilation in 'src/seq_mv' gpu_pkgs = ["magma", "umpire"] for sm_ in CudaPackage.cuda_arch_values: for pkg in gpu_pkgs: - depends_on( - "{0}+cuda cuda_arch={1}".format(pkg, sm_), - when="+{0}+cuda cuda_arch={1}".format(pkg, sm_), - ) + depends_on(f"{pkg}+cuda cuda_arch={sm_}", when=f"+{pkg}+cuda cuda_arch={sm_}") for gfx in ROCmPackage.amdgpu_targets: for pkg in gpu_pkgs: - depends_on( - "{0}+rocm amdgpu_target={1}".format(pkg, gfx), - when="+{0}+rocm amdgpu_target={1}".format(pkg, gfx), - ) + depends_on(f"{pkg}+rocm amdgpu_target={gfx}", when=f"+{pkg}+rocm amdgpu_target={gfx}") # hypre@:2.28.0 uses deprecated cuSPARSE functions/types (e.g. csrsv2Info_t). depends_on("cuda@:11", when="@:2.28.0+cuda") @@ -193,11 +187,13 @@ def patch(self): # fix sequential compilation in 'src/seq_mv' def url_for_version(self, version): if version >= Version("2.12.0"): - url = "https://github.com/hypre-space/hypre/archive/v{0}.tar.gz" + url = f"https://github.com/hypre-space/hypre/archive/v{version}.tar.gz" else: - url = "http://computing.llnl.gov/project/linear_solvers/download/hypre-{0}.tar.gz" + url = ( + f"http://computing.llnl.gov/project/linear_solvers/download/hypre-{version}.tar.gz" + ) - return url.format(version) + return url def configure_args(self): spec = self.spec @@ -220,8 +216,8 @@ def configure_args(self): os.environ["F77"] = spec["mpi"].mpif77 os.environ["FC"] = spec["mpi"].mpifc configure_args.append("--with-MPI") - configure_args.append("--with-MPI-lib-dirs={0}".format(spec["mpi"].prefix.lib)) - configure_args.append("--with-MPI-include={0}".format(spec["mpi"].prefix.include)) + configure_args.append(f"--with-MPI-lib-dirs={spec['mpi'].prefix.lib}") + configure_args.append(f"--with-MPI-include={spec['mpi'].prefix.include}") else: configure_args.append("--without-MPI") @@ -278,11 +274,11 @@ def configure_args(self): if cuda_arch_vals: cuda_arch_sorted = list(sorted(cuda_arch_vals, reverse=True)) cuda_arch = cuda_arch_sorted[0] - configure_args.append("--with-gpu-arch={0}".format(cuda_arch)) + configure_args.append(f"--with-gpu-arch={cuda_arch}") # New in 2.21.0: replaces --enable-cub if spec.satisfies("@2.21.0:"): configure_args.append("--enable-device-memory-pool") - configure_args.append("--with-cuda-home={0}".format(spec["cuda"].prefix)) + configure_args.append(f"--with-cuda-home={spec['cuda'].prefix}") else: configure_args.append("--enable-cub") if spec.satisfies("+cublas"): @@ -304,14 +300,14 @@ def configure_args(self): "--with-hip", "--enable-rocrand", "--enable-rocsparse", - "--with-extra-CUFLAGS={0}".format(rocm_inc), + f"--with-extra-CUFLAGS={rocm_inc}", ] ) rocm_arch_vals = spec.variants["amdgpu_target"].value if rocm_arch_vals: rocm_arch_sorted = list(sorted(rocm_arch_vals, reverse=True)) rocm_arch = rocm_arch_sorted[0] - configure_args.append("--with-gpu-arch={0}".format(rocm_arch)) + configure_args.append(f"--with-gpu-arch={rocm_arch}") if spec.satisfies("+rocblas"): configure_args.append("--enable-rocblas") else: @@ -387,36 +383,34 @@ def install(self, spec, prefix): def cache_test_sources(self): cache_extra_test_sources(self, self.extra_install_tests) + # Customize the makefile to use the installed package + makefile = join_path(install_test_root(self), self.extra_install_tests, "Makefile") + filter_file(r"^HYPRE_DIR\s* =.*", f"HYPRE_DIR = {self.prefix}", makefile) + filter_file(r"^CC\s*=.*", f"CC = {os.environ['CC']}", makefile) + filter_file(r"^F77\s*=.*", f"F77 = {os.environ['F77']}", makefile) + filter_file(r"^CXX\s*=.*", f"CXX = {os.environ['CXX']}", makefile) + @property def _cached_tests_work_dir(self): """The working directory for cached test sources.""" return join_path(self.test_suite.current_test_cache_dir, self.extra_install_tests) - def test(self): - """Perform smoke test on installed HYPRE package.""" + def test_bigint(self): + """build and run bigint tests""" if "+mpi" not in self.spec: - print("Skipping: HYPRE must be installed with +mpi to run tests") - return - - # Build copied and cached test examples - self.run_test( - "make", - ["HYPRE_DIR={0}".format(self.prefix), "bigint"], - purpose="test: building selected examples", - work_dir=self._cached_tests_work_dir, - ) - - # Run the examples built above - for exe in ["./ex5big", "./ex15big"]: - self.run_test( - exe, - [], - [], - installed=False, - purpose="test: ensuring {0} runs".format(exe), - skip_missing=True, - work_dir=self._cached_tests_work_dir, - ) + raise SkipTest("Package must be installed with +mpi") + + # build and run cached examples + with working_dir(self._cached_tests_work_dir): + make = which("make") + make("bigint") + + for name in ["ex5big", "ex15big"]: + with test_part(self, f"test_bigint_{name}", f"ensure {name} runs"): + exe = which(name) + if exe is None: + raise SkipTest(f"{name} does not exist in version {self.version}") + exe() @property def headers(self): From e4869cd5580feef221277cd7cd2217fc3cd2399c Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Sun, 11 Aug 2024 02:03:24 -0700 Subject: [PATCH 263/435] hypre-cmake: old to new test API (#45144) * hypre-cmake: old to new test API * hypre-cmake: update Makefile to use installed files * hypre-cmake: make stand-alone test method name more specific --------- Co-authored-by: Tamara Dahlgren --- .../builtin/packages/hypre-cmake/package.py | 63 +++++++++++-------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/var/spack/repos/builtin/packages/hypre-cmake/package.py b/var/spack/repos/builtin/packages/hypre-cmake/package.py index c65fa30fc2785f..0a6bd38f6e1870 100644 --- a/var/spack/repos/builtin/packages/hypre-cmake/package.py +++ b/var/spack/repos/builtin/packages/hypre-cmake/package.py @@ -56,11 +56,13 @@ class HypreCmake(CMakePackage, CudaPackage): def url_for_version(self, version): if version >= Version("2.12.0"): - url = "https://github.com/hypre-space/hypre/archive/v{0}.tar.gz" + url = f"https://github.com/hypre-space/hypre/archive/v{version}.tar.gz" else: - url = "http://computing.llnl.gov/project/linear_solvers/download/hypre-{0}.tar.gz" + url = ( + f"http://computing.llnl.gov/project/linear_solvers/download/hypre-{version}.tar.gz" + ) - return url.format(version) + return url root_cmakelists_dir = "src" @@ -96,38 +98,47 @@ def setup_build_environment(self, env): @run_after("install") def cache_test_sources(self): - self.cache_extra_test_sources(self.extra_install_tests) + if "+mpi" not in self.spec: + print("Package must be installed with +mpi to cache test sources") + return + + cache_extra_test_sources(self, self.extra_install_tests) + + # Customize the examples makefile before caching it + makefile = join_path(install_test_root(self), self.extra_install_tests, "Makefile") + filter_file(r"^HYPRE_DIR\s* =.*", f"HYPRE_DIR = {self.prefix}", makefile) + filter_file(r"^CC\s*=.*", "CC = " + self.spec["mpi"].mpicc, makefile) + filter_file(r"^F77\s*=.*", "F77 = " + self.spec["mpi"].mpif77, makefile) + filter_file(r"^CXX\s*=.*", "CXX = " + self.spec["mpi"].mpicxx, makefile) + filter_file( + r"^LIBS\s*=.*", + r"LIBS = -L$(HYPRE_DIR)/lib64 -lHYPRE -lm $(CUDA_LIBS) $(DOMP_LIBS)", + makefile, + ) @property def _cached_tests_work_dir(self): """The working directory for cached test sources.""" return join_path(self.test_suite.current_test_cache_dir, self.extra_install_tests) - def test(self): - """Perform smoke test on installed HYPRE package.""" + def test_bigint(self): + """Perform smoke tests on installed HYPRE package.""" if "+mpi" not in self.spec: - print("Skipping: HYPRE must be installed with +mpi to run tests") - return + raise SkipTest("Package must be installed with +mpi to run tests") - # Build copied and cached test examples - self.run_test( - "make", - ["HYPRE_DIR={0}".format(self.prefix), "bigint"], - purpose="test: building selected examples", - work_dir=self._cached_tests_work_dir, - ) + # Build and run cached examples + with working_dir(self._cached_tests_work_dir): + make = which("make") + make("bigint") - # Run the examples built above - for exe in ["./ex5big", "./ex15big"]: - self.run_test( - exe, - [], - [], - installed=False, - purpose="test: ensuring {0} runs".format(exe), - skip_missing=True, - work_dir=self._cached_tests_work_dir, - ) + for exe_name in ["ex5big", "ex15big"]: + with test_part(self, f"test_bigint_{exe_name}", purpose=f"Ensure {exe_name} runs"): + + program = which(exe_name) + if program is None: + raise SkipTest(f"{exe_name} does not exist in version {self.version}") + + program() @property def headers(self): From 565165f02d2f74ec28b4cb088ea2dc5ba93d238d Mon Sep 17 00:00:00 2001 From: Steven Hahn Date: Sun, 11 Aug 2024 15:48:05 -0400 Subject: [PATCH 264/435] benchmark: add 1.8.5 (#45657) Signed-off-by: Steven Hahn --- var/spack/repos/builtin/packages/benchmark/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/benchmark/package.py b/var/spack/repos/builtin/packages/benchmark/package.py index 7300c40e8c47d3..8e398aefa3c722 100644 --- a/var/spack/repos/builtin/packages/benchmark/package.py +++ b/var/spack/repos/builtin/packages/benchmark/package.py @@ -18,6 +18,7 @@ class Benchmark(CMakePackage): # first properly installed CMake config packages in # 1.2.0 release: https://github.com/google/benchmark/issues/363 version("main", branch="main") + version("1.8.5", sha256="d26789a2b46d8808a48a4556ee58ccc7c497fcd4c0af9b90197674a81e04798a") version("1.8.4", sha256="3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45") version("1.8.3", sha256="6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce") version("1.8.2", sha256="2aab2980d0376137f969d92848fbb68216abb07633034534fc8c65cc4e7a0e93") From 7ce5ac1e6e561a658ab1cf7863366c561ed86914 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Sun, 11 Aug 2024 13:32:39 -0700 Subject: [PATCH 265/435] fortran: new test API (#45470) * fortran: new test API * fortran: add provides to gcc package * fortran: simplify stand-alone test processing --------- Co-authored-by: Tamara Dahlgren --- etc/spack/defaults/packages.yaml | 1 + .../repos/builtin/packages/fortran/package.py | 24 +++++++++---------- .../repos/builtin/packages/gcc/package.py | 1 + 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 38bc2014d5a521..3056cbb5d53d80 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -26,6 +26,7 @@ packages: elf: [elfutils] fftw-api: [fftw, amdfftw] flame: [libflame, amdlibflame] + fortran: [gcc] fortran-rt: [gcc-runtime, intel-oneapi-runtime] fuse: [libfuse] gl: [glx, osmesa] diff --git a/var/spack/repos/builtin/packages/fortran/package.py b/var/spack/repos/builtin/packages/fortran/package.py index 082d1224c64288..df1d30cf20b16b 100644 --- a/var/spack/repos/builtin/packages/fortran/package.py +++ b/var/spack/repos/builtin/packages/fortran/package.py @@ -14,18 +14,16 @@ class Fortran(Package): homepage = "https://wg5-fortran.org/" virtual = True - def test(self): - test_source = self.test_suite.current_test_data_dir + def test_fortran(self): + """Compile and run 'Hello world'""" + expected = ["Hello world", "YES!"] + fc = which(os.environ["FC"]) + test_source = self.test_suite.current_test_data_dir for test in os.listdir(test_source): - filepath = os.path.join(test_source, test) - exe_name = "%s.exe" % test - - fc_exe = os.environ["FC"] - fc_opts = ["-o", exe_name, filepath] - - compiled = self.run_test(fc_exe, options=fc_opts, installed=True) - - if compiled: - expected = ["Hello world", "YES!"] - self.run_test(exe_name, expected=expected) + exe_name = f"{test}.exe" + with test_part(self, f"test_fortran_{test}", f"run {exe_name}"): + fc("-o", exe_name, join_path(test_source, test)) + exe = which(exe_name) + out = exe(output=str.split, error=str.split) + check_outputs(expected, out) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 0a91eb83d854a6..d57c57526d090b 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -35,6 +35,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage): license("GPL-2.0-or-later AND LGPL-2.1-or-later") provides("cxx") + provides("fortran") version("master", branch="master") From 010324714f1ceac062e52f8dd34ac68de3458412 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 11 Aug 2024 16:09:45 -0500 Subject: [PATCH 266/435] py-gssapi: add v1.8.3 (#45666) --- var/spack/repos/builtin/packages/py-gssapi/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-gssapi/package.py b/var/spack/repos/builtin/packages/py-gssapi/package.py index 081196475338d7..f957a842db3f61 100644 --- a/var/spack/repos/builtin/packages/py-gssapi/package.py +++ b/var/spack/repos/builtin/packages/py-gssapi/package.py @@ -15,9 +15,11 @@ class PyGssapi(PythonPackage): maintainers("wdconinc") + version("1.8.3", sha256="aa3c8d0b1526f52559552bb2c9d2d6be013d76a8e5db00b39a1db5727e93b0b0") version("1.8.2", sha256="b78e0a021cc91158660e4c5cc9263e07c719346c35a9c0f66725e914b235c89a") - depends_on("py-cython@0.29.29:2", type="build") + depends_on("py-cython@0.29.29:2", type="build", when="@:1.8.2") + depends_on("py-cython@0.29.29:3", type="build", when="@1.8.3:") depends_on("py-setuptools@40.6.0:", type="build") depends_on("py-decorator", type=("build", "run")) From 078984dcf47adb2918c786186eb014e5a6ecb0af Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 11 Aug 2024 16:20:24 -0500 Subject: [PATCH 267/435] libx11: add v1.8.10 (#45664) --- var/spack/repos/builtin/packages/libx11/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libx11/package.py b/var/spack/repos/builtin/packages/libx11/package.py index f77e1d9de4584f..41d64789db0830 100644 --- a/var/spack/repos/builtin/packages/libx11/package.py +++ b/var/spack/repos/builtin/packages/libx11/package.py @@ -17,6 +17,7 @@ class Libx11(AutotoolsPackage, XorgPackage): maintainers("wdconinc") + version("1.8.10", sha256="b7a1a90d881bb7b94df5cf31509e6b03f15c0972d3ac25ab0441f5fbc789650f") version("1.8.9", sha256="57ca5f07d263788ad661a86f4139412e8b699662e6b60c20f1f028c25a935e48") version("1.8.8", sha256="26997a2bc48c03df7d670f8a4ee961d1d6b039bf947475e5fec6b7635b4efe72") version("1.8.7", sha256="793ebebf569f12c864b77401798d38814b51790fce206e01a431e5feb982e20b") From 847d7bc87dc0bd70371b2e1f39e3d9c6a55c8db1 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 11 Aug 2024 16:26:37 -0500 Subject: [PATCH 268/435] libdrm: add v2.4.121, v2.4.122 (switch to multiple build systems) (#45663) * libdrm: add v2.4.121, v2.4.122 (switch to multiple build systems) * [@spackbot] updating style on behalf of wdconinc --------- Co-authored-by: wdconinc --- .../repos/builtin/packages/libdrm/package.py | 55 ++++++++----------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py index 703f1def981438..49239cc8bba14d 100644 --- a/var/spack/repos/builtin/packages/libdrm/package.py +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -6,18 +6,21 @@ from spack.package import * -class Libdrm(Package): +class Libdrm(AutotoolsPackage, MesonPackage): """A userspace library for accessing the DRM, direct rendering manager, on Linux, BSD and other systems supporting the ioctl interface.""" homepage = "https://dri.freedesktop.org/libdrm/" url = "https://dri.freedesktop.org/libdrm/libdrm-2.4.101.tar.xz" list_url = "https://dri.freedesktop.org/libdrm/" + git = "https://gitlab.freedesktop.org/mesa/drm" maintainers("wdconinc") license("MIT") + version("2.4.122", sha256="d9f5079b777dffca9300ccc56b10a93588cdfbc9dde2fae111940dfb6292f251") + version("2.4.121", sha256="909084a505d7638887f590b70791b3bbd9069c710c948f5d1f1ce6d080cdfcab") version("2.4.120", sha256="3bf55363f76c7250946441ab51d3a6cc0ae518055c0ff017324ab76cdefb327a") version("2.4.119", sha256="0a49f12f09b5b6e68eaaaff3f02ca7cff9aa926939b212d343161d3e8ac56291") version("2.4.118", sha256="a777bd85f2b5fc9c57f886c82058300578317cafdbc77d0a769d7e9a9567ab88") @@ -39,7 +42,7 @@ class Libdrm(Package): version("2.4.59", sha256="ed9d03a92c2d80e6310cc350db3430620f1659ae084a07c6824cee7bc81ae8fa") version("2.4.33", sha256="bd2a8fecf28616f2157ca33ede691c139cc294ed2d0c4244b62ca7d22e98e5a4") - depends_on("c", type="build") # generated + depends_on("c", type="build") variant("docs", default=False, description="Build man pages") @@ -47,10 +50,16 @@ class Libdrm(Package): depends_on("libpciaccess@0.10:") depends_on("libpthread-stubs") - # 2.4.90 is the first version to use meson, spack defaults to meson since - # 2.4.101. - depends_on("meson@0.53:", type="build", when="@2.4.101:") - depends_on("meson@0.59:", type="build", when="@2.4.117:") + # 2.4.90 is the first version to use meson, but spack supports meson since 2.4.101. + build_system( + conditional("meson", when="@2.4.101:"), + conditional("autotools", when="@:2.4.100"), + default="meson", + ) + + with when("build_system=meson"): + depends_on("meson@0.53:", type="build", when="@2.4.101:") + depends_on("meson@0.59:", type="build", when="@2.4.117:") # >= 2.4.104 uses reStructuredText for man pages. with when("@2.4.104: +docs"): @@ -68,24 +77,8 @@ def url_for_version(self, version): else: return self.list_url + "libdrm-%s.tar.xz" % version - def meson_args(self): - if self.version <= Version("2.4.112"): - return ["-Dman-pages=" + ("true" if "+docs" in self.spec else "false")] - else: - return ["-Dman-pages=" + ("enabled" if "+docs" in self.spec else "disabled")] - def install(self, spec, prefix): - with working_dir("spack-build", create=True): - args = [] - args.extend(std_meson_args) - args.extend(self.meson_args()) - meson("..", *args) - ninja("-v") - if self.run_tests: - ninja("test") - ninja("install") - - @when("@:2.4.100") +class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): def configure_args(self): args = [] args.append("--enable-static") @@ -101,12 +94,10 @@ def configure_args(self): args.append("CFLAGS=-fcommon") return args - @when("@:2.4.100") - def install(self, spec, prefix): - configure("--prefix={0}".format(prefix), *self.configure_args()) - make() - if self.run_tests: - make("check") - make("install") - if self.run_tests: - make("installcheck") + +class MesonBuilder(spack.build_systems.meson.MesonBuilder): + def meson_args(self): + if self.spec.satisfies("@:2.4.112"): + return ["-Dman-pages=" + ("true" if "+docs" in self.spec else "false")] + else: + return ["-Dman-pages=" + ("enabled" if "+docs" in self.spec else "disabled")] From 7900d0b3db56acc4ebaeb1b91f7e00b434d855d4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 11 Aug 2024 23:31:23 +0200 Subject: [PATCH 269/435] py-ruff: add v0.5.7 (#45660) --- var/spack/repos/builtin/packages/py-ruff/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-ruff/package.py b/var/spack/repos/builtin/packages/py-ruff/package.py index 88c67398e59d27..cb41f2fe90914a 100644 --- a/var/spack/repos/builtin/packages/py-ruff/package.py +++ b/var/spack/repos/builtin/packages/py-ruff/package.py @@ -16,13 +16,16 @@ class PyRuff(PythonPackage): license("MIT") maintainers("adamjstewart") + version("0.5.7", sha256="8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5") version("0.4.5", sha256="286eabd47e7d4d521d199cab84deca135557e6d1e0f0d01c29e757c3cb151b54") version("0.4.0", sha256="7457308d9ebf00d6a1c9a26aa755e477787a636c90b823f91cd7d4bea9e89260") version("0.3.7", sha256="d5c1aebee5162c2226784800ae031f660c350e7a3402c4d1f8ea4e97e232e3ba") version("0.3.0", sha256="0886184ba2618d815067cf43e005388967b67ab9c80df52b32ec1152ab49f53a") version("0.1.6", sha256="1b09f29b16c6ead5ea6b097ef2764b42372aebe363722f1605ecbcd2b9207184") - depends_on("py-maturin@1", type="build") + with default_args(type="build"): + depends_on("py-maturin@1") - # Found in Cargo.toml - depends_on("rust@1.71:", type="build") + # Found in Cargo.toml + depends_on("rust@1.76:", when="@0.5.6:") + depends_on("rust@1.71:") From b91b42dc7b2b940253e27a6e488029b4dd812229 Mon Sep 17 00:00:00 2001 From: Jim Phillips Date: Sun, 11 Aug 2024 17:04:56 -0500 Subject: [PATCH 270/435] namd: do not require single_node_gpu with rocm (#45650) Removes conflict inadvertently left in #45553 --- var/spack/repos/builtin/packages/namd/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py index 2b62c3ea795b1e..273835e07ef2d7 100644 --- a/var/spack/repos/builtin/packages/namd/package.py +++ b/var/spack/repos/builtin/packages/namd/package.py @@ -104,7 +104,6 @@ class Namd(MakefilePackage, CudaPackage, ROCmPackage): depends_on("python", when="interface=python") conflicts("+avxtiles", when="@:2.14,3:", msg="AVXTiles algorithm requires NAMD 2.15") - conflicts("+rocm", when="~single_node_gpu") conflicts("+rocm", when="+cuda", msg="NAMD supports only one GPU backend at a time") conflicts("+single_node_gpu", when="~cuda~rocm") From 18ab3c20ce1422705082dc3f19f6d749d27df55f Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 11 Aug 2024 17:27:34 -0500 Subject: [PATCH 271/435] opencascade: add v7.8.1 (#45665) * opencascade: add v7.8.1 * opencascade: with default_args --- .../builtin/packages/opencascade/package.py | 88 +++++-------------- 1 file changed, 23 insertions(+), 65 deletions(-) diff --git a/var/spack/repos/builtin/packages/opencascade/package.py b/var/spack/repos/builtin/packages/opencascade/package.py index b223ecad491b98..7cd1ae20a50523 100644 --- a/var/spack/repos/builtin/packages/opencascade/package.py +++ b/var/spack/repos/builtin/packages/opencascade/package.py @@ -23,71 +23,29 @@ class Opencascade(CMakePackage): license("LGPL-2.1-only") - version( - "7.8.0", - extension="tar.gz", - sha256="b9c8f0a9d523ac1a606697f95fc39d8acf1140d3728561b8010a604431b4e9cf", - ) - version( - "7.7.2", - extension="tar.gz", - sha256="2fb23c8d67a7b72061b4f7a6875861e17d412d524527b2a96151ead1d9cfa2c1", - ) - version( - "7.7.1", - extension="tar.gz", - sha256="f413d30a8a06d6164e94860a652cbc96ea58fe262df36ce4eaa92a9e3561fd12", - ) - version( - "7.7.0", - extension="tar.gz", - sha256="075ca1dddd9646fcf331a809904925055747a951a6afd07a463369b9b441b445", - ) - version( - "7.6.3", - extension="tar.gz", - sha256="baae5b3a7a38825396fc45ef9d170db406339f5eeec62e21b21036afeda31200", - ) - version( - "7.6.0", - extension="tar.gz", - sha256="e7f989d52348c3b3acb7eb4ee001bb5c2eed5250cdcceaa6ae97edc294f2cabd", - ) - version( - "7.5.3p5", - extension="tar.gz", - sha256="29a4b4293f725bea2f32de5641b127452fc836a30e207d0daa5a0d1b746226b8", - ) - version( - "7.5.3p4", - extension="tar.gz", - sha256="f7571462041694f6bc7fadd94b0c251762078713cb5b0484845b6b8a4d8a0b99", - ) - version( - "7.5.3", - extension="tar.gz", - sha256="cc3d3fd9f76526502c3d9025b651f45b034187430f231414c97dda756572410b", - ) - version( - "7.5.2", - extension="tar.gz", - sha256="1a32d2b0d6d3c236163cb45139221fb198f0f3cdad56606c5b1c9a2a8869b3ac", - ) - version( - "7.4.0p2", - extension="tar.gz", - sha256="93565f9bdc9575e0d6fcb34c11c8f06d8f9394250bb427870da65424e8537f60", - ) - version( - "7.4.0p1", - extension="tar.gz", - sha256="e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0", - ) - version( - "7.4.0", - extension="tar.gz", - sha256="655da7717dac3460a22a6a7ee68860c1da56da2fec9c380d8ac0ac0349d67676", - ) + with default_args(extension="tar.gz"): + version("7.8.1", sha256="33f2bdb67e3f6ae469f3fa816cfba34529a23a9cb736bf98a32b203d8531c523") + version("7.8.0", sha256="b9c8f0a9d523ac1a606697f95fc39d8acf1140d3728561b8010a604431b4e9cf") + version("7.7.2", sha256="2fb23c8d67a7b72061b4f7a6875861e17d412d524527b2a96151ead1d9cfa2c1") + version("7.7.1", sha256="f413d30a8a06d6164e94860a652cbc96ea58fe262df36ce4eaa92a9e3561fd12") + version("7.7.0", sha256="075ca1dddd9646fcf331a809904925055747a951a6afd07a463369b9b441b445") + version("7.6.3", sha256="baae5b3a7a38825396fc45ef9d170db406339f5eeec62e21b21036afeda31200") + version("7.6.0", sha256="e7f989d52348c3b3acb7eb4ee001bb5c2eed5250cdcceaa6ae97edc294f2cabd") + version( + "7.5.3p5", sha256="29a4b4293f725bea2f32de5641b127452fc836a30e207d0daa5a0d1b746226b8" + ) + version( + "7.5.3p4", sha256="f7571462041694f6bc7fadd94b0c251762078713cb5b0484845b6b8a4d8a0b99" + ) + version("7.5.3", sha256="cc3d3fd9f76526502c3d9025b651f45b034187430f231414c97dda756572410b") + version("7.5.2", sha256="1a32d2b0d6d3c236163cb45139221fb198f0f3cdad56606c5b1c9a2a8869b3ac") + version( + "7.4.0p2", sha256="93565f9bdc9575e0d6fcb34c11c8f06d8f9394250bb427870da65424e8537f60" + ) + version( + "7.4.0p1", sha256="e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0" + ) + version("7.4.0", sha256="655da7717dac3460a22a6a7ee68860c1da56da2fec9c380d8ac0ac0349d67676") depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated From 9e7183fb14cad8b222ad52671242ef9d882f9a73 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 11 Aug 2024 23:00:42 -0500 Subject: [PATCH 272/435] catch2: add v3.5.4, v3.6.0 (#45662) * catch2: add v3.5.4, v3.6.0 * [@spackbot] updating style on behalf of wdconinc --------- Co-authored-by: wdconinc --- var/spack/repos/builtin/packages/catch2/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/catch2/package.py b/var/spack/repos/builtin/packages/catch2/package.py index 590552eb8c63bc..045726fa25c256 100644 --- a/var/spack/repos/builtin/packages/catch2/package.py +++ b/var/spack/repos/builtin/packages/catch2/package.py @@ -22,6 +22,8 @@ class Catch2(CMakePackage): version("develop", branch="devel") # Releases + version("3.6.0", sha256="485932259a75c7c6b72d4b874242c489ea5155d17efa345eb8cc72159f49f356") + version("3.5.4", sha256="b7754b711242c167d8f60b890695347f90a1ebc95949a045385114165d606dbb") version("3.4.0", sha256="122928b814b75717316c71af69bd2b43387643ba076a6ec16e7882bfb2dfacbb") version("3.3.2", sha256="8361907f4d9bff3ae7c1edb027f813659f793053c99b67837a0c0375f065bae2") version("3.3.1", sha256="d90351cdc55421f640c553cfc0875a8c834428679444e8062e9187d05b18aace") @@ -32,10 +34,14 @@ class Catch2(CMakePackage): version("3.1.0", sha256="c252b2d9537e18046d8b82535069d2567f77043f8e644acf9a9fffc22ea6e6f7") version("3.0.1", sha256="8c4173c68ae7da1b5b505194a0c2d6f1b2aef4ec1e3e7463bde451f26bbaf4e7") version( - "3.0.0-preview4", sha256="2458d47d923b65ab611656cb7669d1810bcc4faa62e4c054a7405b1914cd4aee" + "3.0.0-preview4", + sha256="2458d47d923b65ab611656cb7669d1810bcc4faa62e4c054a7405b1914cd4aee", + deprecated=True, ) version( - "3.0.0-preview3", sha256="06a4f903858f21c553e988f8b76c9c6915d1f95f95512d6a58c421e02a2c4975" + "3.0.0-preview3", + sha256="06a4f903858f21c553e988f8b76c9c6915d1f95f95512d6a58c421e02a2c4975", + deprecated=True, ) version("2.13.10", sha256="d54a712b7b1d7708bc7a819a8e6e47b2fde9536f487b89ccbca295072a7d9943") version("2.13.9", sha256="06dbc7620e3b96c2b69d57bf337028bf245a211b3cddb843835bfe258f427a52") From 7ddc886d6d43d66e6b78f74922eb570ea2e4c2c6 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 12 Aug 2024 09:25:31 +0200 Subject: [PATCH 273/435] buildcache: fix hard-coded, outdated layout version (#45645) --- lib/spack/spack/cmd/buildcache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index f43578257a441f..a2dace6003e8a0 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -798,7 +798,7 @@ def _push_oci( def extra_config(spec: Spec): spec_dict = spec.to_dict(hash=ht.dag_hash) - spec_dict["buildcache_layout_version"] = 1 + spec_dict["buildcache_layout_version"] = bindist.CURRENT_BUILD_CACHE_LAYOUT_VERSION spec_dict["binary_cache_checksum"] = { "hash_algorithm": "sha256", "hash": checksums[spec.dag_hash()].compressed_digest.digest, From 102a30a5a27847dfdff9297b421797c99bf9fc9f Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 03:24:32 -0500 Subject: [PATCH 274/435] {url,homepage} = http->https://*.sourceforge.net (#45676) --- var/spack/repos/builtin/packages/3dtk/package.py | 2 +- var/spack/repos/builtin/packages/aespipe/package.py | 2 +- var/spack/repos/builtin/packages/albany/package.py | 2 +- var/spack/repos/builtin/packages/ampt/package.py | 4 ++-- var/spack/repos/builtin/packages/antimony/package.py | 2 +- var/spack/repos/builtin/packages/antlr/package.py | 2 +- var/spack/repos/builtin/packages/argtable/package.py | 2 +- var/spack/repos/builtin/packages/armadillo/package.py | 2 +- var/spack/repos/builtin/packages/astyle/package.py | 2 +- var/spack/repos/builtin/packages/atlas/package.py | 2 +- var/spack/repos/builtin/packages/audacity/package.py | 2 +- var/spack/repos/builtin/packages/boost/package.py | 4 ++-- var/spack/repos/builtin/packages/bowtie2/package.py | 4 ++-- var/spack/repos/builtin/packages/cppcheck/package.py | 2 +- var/spack/repos/builtin/packages/cqrlib/package.py | 2 +- var/spack/repos/builtin/packages/cscope/package.py | 2 +- var/spack/repos/builtin/packages/cvector/package.py | 2 +- .../repos/builtin/packages/deconseq-standalone/package.py | 2 +- var/spack/repos/builtin/packages/dmtcp/package.py | 2 +- var/spack/repos/builtin/packages/dmxproto/package.py | 2 +- var/spack/repos/builtin/packages/emboss/package.py | 2 +- var/spack/repos/builtin/packages/erne/package.py | 2 +- var/spack/repos/builtin/packages/expect/package.py | 2 +- var/spack/repos/builtin/packages/exuberant-ctags/package.py | 4 ++-- var/spack/repos/builtin/packages/freeglut/package.py | 2 +- var/spack/repos/builtin/packages/freeimage/package.py | 2 +- var/spack/repos/builtin/packages/genomefinisher/package.py | 2 +- var/spack/repos/builtin/packages/giflib/package.py | 2 +- var/spack/repos/builtin/packages/glew/package.py | 2 +- var/spack/repos/builtin/packages/gmime/package.py | 2 +- var/spack/repos/builtin/packages/gnuplot/package.py | 2 +- var/spack/repos/builtin/packages/gts/package.py | 4 ++-- var/spack/repos/builtin/packages/id3lib/package.py | 2 +- var/spack/repos/builtin/packages/jackcess/package.py | 2 +- var/spack/repos/builtin/packages/jags/package.py | 2 +- var/spack/repos/builtin/packages/jmol/package.py | 2 +- var/spack/repos/builtin/packages/judy/package.py | 4 ++-- var/spack/repos/builtin/packages/kdiff3/package.py | 2 +- var/spack/repos/builtin/packages/lame/package.py | 2 +- var/spack/repos/builtin/packages/lcms/package.py | 4 ++-- var/spack/repos/builtin/packages/lcov/package.py | 2 +- var/spack/repos/builtin/packages/libaio/package.py | 2 +- var/spack/repos/builtin/packages/libmng/package.py | 2 +- var/spack/repos/builtin/packages/libnids/package.py | 2 +- var/spack/repos/builtin/packages/libnova/package.py | 2 +- var/spack/repos/builtin/packages/libpfm4/package.py | 2 +- var/spack/repos/builtin/packages/librsb/package.py | 4 ++-- var/spack/repos/builtin/packages/lmbench/package.py | 2 +- var/spack/repos/builtin/packages/log4c/package.py | 2 +- var/spack/repos/builtin/packages/log4cpp/package.py | 2 +- var/spack/repos/builtin/packages/loki/package.py | 2 +- var/spack/repos/builtin/packages/maq/package.py | 2 +- var/spack/repos/builtin/packages/microbiomeutil/package.py | 2 +- var/spack/repos/builtin/packages/mrbayes/package.py | 2 +- var/spack/repos/builtin/packages/mummer/package.py | 2 +- var/spack/repos/builtin/packages/nccmp/package.py | 2 +- var/spack/repos/builtin/packages/nco/package.py | 2 +- var/spack/repos/builtin/packages/neartree/package.py | 2 +- var/spack/repos/builtin/packages/netpbm/package.py | 2 +- var/spack/repos/builtin/packages/ngspice/package.py | 2 +- var/spack/repos/builtin/packages/octave-splines/package.py | 2 +- var/spack/repos/builtin/packages/opium/package.py | 2 +- var/spack/repos/builtin/packages/optipng/package.py | 2 +- var/spack/repos/builtin/packages/p7zip/package.py | 2 +- var/spack/repos/builtin/packages/perl-swissknife/package.py | 2 +- var/spack/repos/builtin/packages/ploticus/package.py | 2 +- var/spack/repos/builtin/packages/plplot/package.py | 2 +- var/spack/repos/builtin/packages/pmgr-collective/package.py | 2 +- var/spack/repos/builtin/packages/pngwriter/package.py | 2 +- var/spack/repos/builtin/packages/prinseq-lite/package.py | 2 +- var/spack/repos/builtin/packages/pslib/package.py | 2 +- var/spack/repos/builtin/packages/psrchive/package.py | 2 +- var/spack/repos/builtin/packages/pstreams/package.py | 2 +- var/spack/repos/builtin/packages/py-crcmod/package.py | 2 +- var/spack/repos/builtin/packages/py-crossmap/package.py | 2 +- var/spack/repos/builtin/packages/py-docutils/package.py | 2 +- var/spack/repos/builtin/packages/py-gnuplot/package.py | 2 +- var/spack/repos/builtin/packages/py-pychecker/package.py | 2 +- var/spack/repos/builtin/packages/py-pydispatcher/package.py | 2 +- var/spack/repos/builtin/packages/py-pyopengl/package.py | 2 +- var/spack/repos/builtin/packages/py-rseqc/package.py | 2 +- var/spack/repos/builtin/packages/qjson/package.py | 2 +- var/spack/repos/builtin/packages/qucs/package.py | 2 +- var/spack/repos/builtin/packages/qwt/package.py | 2 +- var/spack/repos/builtin/packages/ray/package.py | 2 +- var/spack/repos/builtin/packages/scalpel/package.py | 2 +- var/spack/repos/builtin/packages/setserial/package.py | 2 +- var/spack/repos/builtin/packages/snpeff/package.py | 2 +- var/spack/repos/builtin/packages/sox/package.py | 2 +- var/spack/repos/builtin/packages/sparse/package.py | 4 ++-- var/spack/repos/builtin/packages/squashfs/package.py | 2 +- var/spack/repos/builtin/packages/staden-io-lib/package.py | 2 +- var/spack/repos/builtin/packages/tcl-tclxml/package.py | 2 +- var/spack/repos/builtin/packages/tclap/package.py | 2 +- var/spack/repos/builtin/packages/tempo/package.py | 2 +- var/spack/repos/builtin/packages/tfel/package.py | 2 +- var/spack/repos/builtin/packages/uncrustify/package.py | 2 +- var/spack/repos/builtin/packages/unzip/package.py | 2 +- var/spack/repos/builtin/packages/utf8cpp/package.py | 2 +- var/spack/repos/builtin/packages/virtualgl/package.py | 2 +- var/spack/repos/builtin/packages/w3m/package.py | 2 +- var/spack/repos/builtin/packages/wxpropgrid/package.py | 2 +- var/spack/repos/builtin/packages/xqilla/package.py | 2 +- var/spack/repos/builtin/packages/zsh/package.py | 2 +- 104 files changed, 113 insertions(+), 113 deletions(-) diff --git a/var/spack/repos/builtin/packages/3dtk/package.py b/var/spack/repos/builtin/packages/3dtk/package.py index d606757286b663..027b7e0bd2fe01 100644 --- a/var/spack/repos/builtin/packages/3dtk/package.py +++ b/var/spack/repos/builtin/packages/3dtk/package.py @@ -15,7 +15,7 @@ class _3dtk(CMakePackage): plane extraction software, etc. Several file formats for the point clouds are natively supported, new formats can be implemented easily.""" - homepage = "http://slam6d.sourceforge.net/" + homepage = "https://slam6d.sourceforge.net/" # Repo seems to be in the process of switching to git: # https://github.com/3DTK/3DTK diff --git a/var/spack/repos/builtin/packages/aespipe/package.py b/var/spack/repos/builtin/packages/aespipe/package.py index 9edfa7aba46b21..3f34992709acc5 100644 --- a/var/spack/repos/builtin/packages/aespipe/package.py +++ b/var/spack/repos/builtin/packages/aespipe/package.py @@ -10,7 +10,7 @@ class Aespipe(AutotoolsPackage): """aespipe program is AES encrypting or decrypting pipe. It reads from standard input and writes to standard output.""" - homepage = "http://loop-aes.sourceforge.net/" + homepage = "https//loop-aes.sourceforge.net/" url = "https://sourceforge.net/projects/loop-aes/files/aespipe/v2.4f/aespipe-v2.4f.tar.bz2" license("Intel") diff --git a/var/spack/repos/builtin/packages/albany/package.py b/var/spack/repos/builtin/packages/albany/package.py index cfe0aaab7dc915..dc8ea6dec0bb84 100644 --- a/var/spack/repos/builtin/packages/albany/package.py +++ b/var/spack/repos/builtin/packages/albany/package.py @@ -14,7 +14,7 @@ class Albany(CMakePackage): including fluid mechanics, solid mechanics (elasticity and plasticity), ice-sheet flow, quantum device modeling, and many other applications.""" - homepage = "http://gahansen.github.io/Albany" + homepage = "https://gahansen.github.io/Albany" git = "https://github.com/gahansen/Albany.git" maintainers("gahansen") diff --git a/var/spack/repos/builtin/packages/ampt/package.py b/var/spack/repos/builtin/packages/ampt/package.py index bbbbf33e9d7fc4..e4d083251a53ec 100644 --- a/var/spack/repos/builtin/packages/ampt/package.py +++ b/var/spack/repos/builtin/packages/ampt/package.py @@ -11,8 +11,8 @@ class Ampt(MakefilePackage): """A Multi-Phase Transport (AMPT) model is a Monte Carlo transport model for nuclear collisions at relativistic energies.""" - homepage = "http://myweb.ecu.edu/linz/ampt/" - url = "http://myweb.ecu.edu/linz/ampt/ampt-v1.26t9b-v2.26t9b.zip" + homepage = "https://myweb.ecu.edu/linz/ampt/" + url = "https://myweb.ecu.edu/linz/ampt/ampt-v1.26t9b-v2.26t9b.zip" maintainers("vvolkl") diff --git a/var/spack/repos/builtin/packages/antimony/package.py b/var/spack/repos/builtin/packages/antimony/package.py index dfcc478f9368bf..021aea6fd158d1 100644 --- a/var/spack/repos/builtin/packages/antimony/package.py +++ b/var/spack/repos/builtin/packages/antimony/package.py @@ -9,7 +9,7 @@ class Antimony(CMakePackage): """Human readable language for modifying sbml""" - homepage = "http://antimony.sourceforge.net/" + homepage = "https://antimony.sourceforge.net/" url = "antimony" maintainers("rblake-llnl") diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py index 8f10a2f0980579..baf2b4b7177cd5 100644 --- a/var/spack/repos/builtin/packages/antlr/package.py +++ b/var/spack/repos/builtin/packages/antlr/package.py @@ -14,7 +14,7 @@ class Antlr(AutotoolsPackage): walk parse trees.""" homepage = "https://www.antlr2.org/" - url = "http://www.antlr2.org/download/antlr-2.7.7.tar.gz" + url = "https://www.antlr2.org/download/antlr-2.7.7.tar.gz" license("ANTLR-PD") diff --git a/var/spack/repos/builtin/packages/argtable/package.py b/var/spack/repos/builtin/packages/argtable/package.py index 4da15c45a9bc83..2e93563505b69b 100644 --- a/var/spack/repos/builtin/packages/argtable/package.py +++ b/var/spack/repos/builtin/packages/argtable/package.py @@ -11,7 +11,7 @@ class Argtable(AutotoolsPackage): options with a minimum of fuss. """ - homepage = "http://argtable.sourceforge.net/" + homepage = "https://argtable.sourceforge.net/" url = "https://sourceforge.net/projects/argtable/files/argtable/argtable-2.13/argtable2-13.tar.gz/download" license("LGPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py index d22297cdd303d4..517df23f303af6 100644 --- a/var/spack/repos/builtin/packages/armadillo/package.py +++ b/var/spack/repos/builtin/packages/armadillo/package.py @@ -11,7 +11,7 @@ class Armadillo(CMakePackage): for the C++ language, aiming towards a good balance between speed and ease of use.""" - homepage = "http://arma.sourceforge.net/" + homepage = "https://arma.sourceforge.net/" url = "http://sourceforge.net/projects/arma/files/armadillo-8.100.1.tar.xz" license("Apache-2.0") diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 202b0af22102b8..ca55f48483d020 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -12,7 +12,7 @@ class Astyle(CMakePackage, MakefilePackage): Objective-C, C#, and Java Source Code. """ - homepage = "http://astyle.sourceforge.net/" + homepage = "https://astyle.sourceforge.net/" url = "https://sourceforge.net/projects/astyle/files/astyle/astyle%204.1.11/astyle-4.1.11.tar.bz2" list_url = "https://sourceforge.net/projects/astyle/files/astyle" list_depth = 1 diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index 741e5b554c8a4f..207f67c250f6f3 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -17,7 +17,7 @@ class Atlas(Package): (BLAS), and a subset of the linear algebra routines in the LAPACK library. """ - homepage = "http://math-atlas.sourceforge.net/" + homepage = "https://math-atlas.sourceforge.net/" license("Apache-2.0") diff --git a/var/spack/repos/builtin/packages/audacity/package.py b/var/spack/repos/builtin/packages/audacity/package.py index 9e97c93a7f344a..aae305611de3e9 100644 --- a/var/spack/repos/builtin/packages/audacity/package.py +++ b/var/spack/repos/builtin/packages/audacity/package.py @@ -13,7 +13,7 @@ class Audacity(CMakePackage): should need, and unlimited undo. The GUI was built with wxWidgets and the audio I/O supports PulseAudio, OSS and ALSA under Linux.""" - homepage = "http://audacity.sourceforge.net" + homepage = "https://audacity.sourceforge.net" url = "https://github.com/audacity/audacity/archive/Audacity-2.4.2.tar.gz" license("GPL-3.0-or-later") diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index d0da3cdb7da00c..9b8cb167c92f7d 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -20,7 +20,7 @@ class Boost(Package): """ homepage = "https://www.boost.org" - url = "http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2" + url = "https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2" git = "https://github.com/boostorg/boost.git" list_url = "https://sourceforge.net/projects/boost/files/boost/" list_depth = 1 @@ -450,7 +450,7 @@ def url_for_version(self, version): if version >= Version("1.63.0"): url = "https://archives.boost.io/release/{0}/source/boost_{1}.tar.bz2" else: - url = "http://downloads.sourceforge.net/project/boost/boost/{0}/boost_{1}.tar.bz2" + url = "https://downloads.sourceforge.net/project/boost/boost/{0}/boost_{1}.tar.bz2" return url.format(version.dotted, version.underscored) diff --git a/var/spack/repos/builtin/packages/bowtie2/package.py b/var/spack/repos/builtin/packages/bowtie2/package.py index a17d6749abf67a..33a1e28cc2b51f 100644 --- a/var/spack/repos/builtin/packages/bowtie2/package.py +++ b/var/spack/repos/builtin/packages/bowtie2/package.py @@ -11,8 +11,8 @@ class Bowtie2(MakefilePackage): """Bowtie 2 is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences""" - homepage = "http://bowtie-bio.sourceforge.net/bowtie2/index.shtml" - url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.3.1/bowtie2-2.3.1-source.zip" + homepage = "https://bowtie-bio.sourceforge.net/bowtie2/index.shtml" + url = "https://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.3.1/bowtie2-2.3.1-source.zip" license("GPL-3.0-or-later") diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py index 0874acd21a2864..61f9266eefe1a4 100644 --- a/var/spack/repos/builtin/packages/cppcheck/package.py +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -9,7 +9,7 @@ class Cppcheck(CMakePackage): """A tool for static C/C++ code analysis.""" - homepage = "http://cppcheck.sourceforge.net/" + homepage = "https://cppcheck.sourceforge.net/" url = "https://downloads.sourceforge.net/project/cppcheck/cppcheck/1.78/cppcheck-1.78.tar.bz2" maintainers("white238") diff --git a/var/spack/repos/builtin/packages/cqrlib/package.py b/var/spack/repos/builtin/packages/cqrlib/package.py index e9a187d4caf969..ba698f7ed7a36f 100644 --- a/var/spack/repos/builtin/packages/cqrlib/package.py +++ b/var/spack/repos/builtin/packages/cqrlib/package.py @@ -9,7 +9,7 @@ class Cqrlib(MakefilePackage): """CQRlib -- ANSI C API for Quaternion Rotations""" - homepage = "http://cqrlib.sourceforge.net/" + homepage = "https://cqrlib.sourceforge.net/" url = ( "https://downloads.sourceforge.net/project/cqrlib/cqrlib/CQRlib-1.1.2/CQRlib-1.1.2.tar.gz" ) diff --git a/var/spack/repos/builtin/packages/cscope/package.py b/var/spack/repos/builtin/packages/cscope/package.py index 0c43bf4fc37f95..2de4b7313e07f9 100644 --- a/var/spack/repos/builtin/packages/cscope/package.py +++ b/var/spack/repos/builtin/packages/cscope/package.py @@ -9,7 +9,7 @@ class Cscope(AutotoolsPackage): """Cscope is a developer's tool for browsing source code.""" - homepage = "http://cscope.sourceforge.net/" + homepage = "https://cscope.sourceforge.net/" url = "https://sourceforge.net/projects/cscope/files/cscope/v15.9/cscope-15.9.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/cvector/package.py b/var/spack/repos/builtin/packages/cvector/package.py index 71bf37c1b8efcd..105142bbcd6578 100644 --- a/var/spack/repos/builtin/packages/cvector/package.py +++ b/var/spack/repos/builtin/packages/cvector/package.py @@ -9,7 +9,7 @@ class Cvector(MakefilePackage): """CVector -- ANSI C API for Dynamic Arrays""" - homepage = "http://cvector.sourceforge.net/" + homepage = "https://cvector.sourceforge.net/" url = "https://downloads.sourceforge.net/project/cvector/cvector/CVector-1.0.3/CVector-1.0.3.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/deconseq-standalone/package.py b/var/spack/repos/builtin/packages/deconseq-standalone/package.py index d5bd5bcf1e37a5..c015f1b316a480 100644 --- a/var/spack/repos/builtin/packages/deconseq-standalone/package.py +++ b/var/spack/repos/builtin/packages/deconseq-standalone/package.py @@ -10,7 +10,7 @@ class DeconseqStandalone(Package): """The DeconSeq tool can be used to automatically detect and efficiently remove sequence contaminations from genomic and metagenomic datasets.""" - homepage = "http://deconseq.sourceforge.net" + homepage = "https://deconseq.sourceforge.net" url = "https://sourceforge.net/projects/deconseq/files/standalone/deconseq-standalone-0.4.3.tar.gz" license("GPL-3.0-only") diff --git a/var/spack/repos/builtin/packages/dmtcp/package.py b/var/spack/repos/builtin/packages/dmtcp/package.py index 282038b6b71105..1b063a8e407ad9 100644 --- a/var/spack/repos/builtin/packages/dmtcp/package.py +++ b/var/spack/repos/builtin/packages/dmtcp/package.py @@ -11,7 +11,7 @@ class Dmtcp(AutotoolsPackage): checkpoints a single-host or distributed computation in user-space -- with no modifications to user code or to the O/S.""" - homepage = "http://dmtcp.sourceforge.net/" + homepage = "https://dmtcp.sourceforge.net/" url = "https://github.com/dmtcp/dmtcp/archive/refs/tags/3.0.0.tar.gz" git = "https://github.com/dmtcp/dmtcp.git" diff --git a/var/spack/repos/builtin/packages/dmxproto/package.py b/var/spack/repos/builtin/packages/dmxproto/package.py index 565b066bd6a9b1..54b01df358c6e0 100644 --- a/var/spack/repos/builtin/packages/dmxproto/package.py +++ b/var/spack/repos/builtin/packages/dmxproto/package.py @@ -13,7 +13,7 @@ class Dmxproto(AutotoolsPackage, XorgPackage): X server that controls multiple back-end X servers making up a large display.""" - homepage = "http://dmx.sourceforge.net/" + homepage = "https://dmx.sourceforge.net/" xorg_mirror_path = "proto/dmxproto-2.3.1.tar.gz" version("2.3.1", sha256="3262bbf5902211a3ce88f5c6ab4528145ff84f69c52fd386ae0312bc45fb8a40") diff --git a/var/spack/repos/builtin/packages/emboss/package.py b/var/spack/repos/builtin/packages/emboss/package.py index a02570a1dea788..cfaa52a634c05d 100644 --- a/var/spack/repos/builtin/packages/emboss/package.py +++ b/var/spack/repos/builtin/packages/emboss/package.py @@ -11,7 +11,7 @@ class Emboss(AutotoolsPackage): developed for the needs of the molecular biology (e.g. EMBnet) user community""" - homepage = "http://emboss.sourceforge.net/" + homepage = "https://emboss.sourceforge.net/" url = "ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz" license("GPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/erne/package.py b/var/spack/repos/builtin/packages/erne/package.py index 385cf0876eb36c..8074001213e138 100644 --- a/var/spack/repos/builtin/packages/erne/package.py +++ b/var/spack/repos/builtin/packages/erne/package.py @@ -9,7 +9,7 @@ class Erne(AutotoolsPackage): """The Extended Randomized Numerical alignEr using BWT""" - homepage = "http://erne.sourceforge.net/" + homepage = "https://erne.sourceforge.net/" url = "https://downloads.sourceforge.net/project/erne/2.1.1/erne-2.1.1-source.tar.gz" license("GPL-3.0-only") diff --git a/var/spack/repos/builtin/packages/expect/package.py b/var/spack/repos/builtin/packages/expect/package.py index 33f79fe2d9ba18..02a8cc259979c6 100644 --- a/var/spack/repos/builtin/packages/expect/package.py +++ b/var/spack/repos/builtin/packages/expect/package.py @@ -13,7 +13,7 @@ class Expect(AutotoolsPackage): """Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc.""" - homepage = "http://expect.sourceforge.net/" + homepage = "https://expect.sourceforge.net/" url = ( "https://sourceforge.net/projects/expect/files/Expect/5.45.4/expect5.45.4.tar.gz/download" ) diff --git a/var/spack/repos/builtin/packages/exuberant-ctags/package.py b/var/spack/repos/builtin/packages/exuberant-ctags/package.py index 55ad28002993fc..fbe19519380bae 100644 --- a/var/spack/repos/builtin/packages/exuberant-ctags/package.py +++ b/var/spack/repos/builtin/packages/exuberant-ctags/package.py @@ -9,8 +9,8 @@ class ExuberantCtags(AutotoolsPackage): """The canonical ctags generator""" - homepage = "http://ctags.sourceforge.net" - url = "http://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz" + homepage = "https://ctags.sourceforge.net" + url = "https://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz" license("GPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/freeglut/package.py b/var/spack/repos/builtin/packages/freeglut/package.py index 2cf9c5965d31c2..79e04f38859cc2 100644 --- a/var/spack/repos/builtin/packages/freeglut/package.py +++ b/var/spack/repos/builtin/packages/freeglut/package.py @@ -10,7 +10,7 @@ class Freeglut(CMakePackage, SourceforgePackage): """FreeGLUT is a free-software/open-source alternative to the OpenGL Utility Toolkit (GLUT) library""" - homepage = "http://freeglut.sourceforge.net/" + homepage = "https://freeglut.sourceforge.net/" sourceforge_mirror_path = "freeglut/freeglut-3.2.1.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/freeimage/package.py b/var/spack/repos/builtin/packages/freeimage/package.py index a0e6ae2e2608f3..f3ac391b7b04d8 100644 --- a/var/spack/repos/builtin/packages/freeimage/package.py +++ b/var/spack/repos/builtin/packages/freeimage/package.py @@ -11,7 +11,7 @@ class Freeimage(MakefilePackage): to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications""" - homepage = "http://freeimage.sourceforge.net/" + homepage = "https://freeimage.sourceforge.net/" version("3.18.0", sha256="f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd") diff --git a/var/spack/repos/builtin/packages/genomefinisher/package.py b/var/spack/repos/builtin/packages/genomefinisher/package.py index e4c42ce2f6f046..2e1cce0f249f25 100644 --- a/var/spack/repos/builtin/packages/genomefinisher/package.py +++ b/var/spack/repos/builtin/packages/genomefinisher/package.py @@ -14,7 +14,7 @@ class Genomefinisher(Package): assembly errors and organizes the contigs/scaffolds with genomes references.""" - homepage = "http://gfinisher.sourceforge.net" + homepage = "https://gfinisher.sourceforge.net" url = "https://sourceforge.net/projects/gfinisher/files/GenomeFinisher_1.4.zip" version("1.4", sha256="8efbebaab4b577c72193f14c2c362b96fb949981fd66d2cca1364839af8bf1e3") diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py index f794c16519f6b9..9260fae32783de 100644 --- a/var/spack/repos/builtin/packages/giflib/package.py +++ b/var/spack/repos/builtin/packages/giflib/package.py @@ -10,7 +10,7 @@ class Giflib(MakefilePackage, SourceforgePackage): """The GIFLIB project maintains the giflib service library, which has been pulling images out of GIFs since 1989.""" - homepage = "http://giflib.sourceforge.net/" + homepage = "https://giflib.sourceforge.net/" sourceforge_mirror_path = "giflib/giflib-5.1.4.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/glew/package.py b/var/spack/repos/builtin/packages/glew/package.py index 8bc88fd1c84186..43db0431d236a5 100644 --- a/var/spack/repos/builtin/packages/glew/package.py +++ b/var/spack/repos/builtin/packages/glew/package.py @@ -8,7 +8,7 @@ class Glew(CMakePackage): """The OpenGL Extension Wrangler Library.""" - homepage = "http://glew.sourceforge.net/" + homepage = "https://glew.sourceforge.net/" url = "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" root_cmakelists_dir = "build/cmake" diff --git a/var/spack/repos/builtin/packages/gmime/package.py b/var/spack/repos/builtin/packages/gmime/package.py index 6641aab7e5b7c2..0e62740defa8a3 100644 --- a/var/spack/repos/builtin/packages/gmime/package.py +++ b/var/spack/repos/builtin/packages/gmime/package.py @@ -11,7 +11,7 @@ class Gmime(AutotoolsPackage): parsing of messages using the Multipurpose Internet Mail Extension (MIME). """ - homepage = "http://spruce.sourceforge.net/gmime/" + homepage = "https://spruce.sourceforge.net/gmime/" url = "https://download.gnome.org/sources/gmime/2.6/gmime-2.6.23.tar.xz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py index 7c29fe1bb37efd..0f69b3c654e9a3 100644 --- a/var/spack/repos/builtin/packages/gnuplot/package.py +++ b/var/spack/repos/builtin/packages/gnuplot/package.py @@ -22,7 +22,7 @@ class Gnuplot(AutotoolsPackage): """ homepage = "http://www.gnuplot.info" - url = "http://downloads.sourceforge.net/project/gnuplot/gnuplot/5.0.6/gnuplot-5.0.6.tar.gz" + url = "https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.0.6/gnuplot-5.0.6.tar.gz" # There is a conflict in term.h between gnuplot and ncurses, which is a # dependency of readline. Fix it with a small patch diff --git a/var/spack/repos/builtin/packages/gts/package.py b/var/spack/repos/builtin/packages/gts/package.py index 490e85d00dd599..c3598ceb747d69 100644 --- a/var/spack/repos/builtin/packages/gts/package.py +++ b/var/spack/repos/builtin/packages/gts/package.py @@ -21,8 +21,8 @@ class Gts(AutotoolsPackage): surface meshes. """ - homepage = "http://gts.sourceforge.net/index.html" - url = "http://gts.sourceforge.net/tarballs/gts-snapshot-121130.tar.gz" + homepage = "https://gts.sourceforge.net/index.html" + url = "https://gts.sourceforge.net/tarballs/gts-snapshot-121130.tar.gz" license("LGPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/id3lib/package.py b/var/spack/repos/builtin/packages/id3lib/package.py index 39b78311f8f0d6..77561832914b99 100644 --- a/var/spack/repos/builtin/packages/id3lib/package.py +++ b/var/spack/repos/builtin/packages/id3lib/package.py @@ -9,7 +9,7 @@ class Id3lib(AutotoolsPackage): """Library for manipulating ID3v1 and ID3v2 tags""" - homepage = "http://id3lib.sourceforge.net/" + homepage = "https://id3lib.sourceforge.net/" url = "https://downloads.sourceforge.net/project/id3lib/id3lib/3.8.3/id3lib-3.8.3.tar.gz" license("GPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/jackcess/package.py b/var/spack/repos/builtin/packages/jackcess/package.py index 72d92fdebca616..eb271cb1a05136 100644 --- a/var/spack/repos/builtin/packages/jackcess/package.py +++ b/var/spack/repos/builtin/packages/jackcess/package.py @@ -10,7 +10,7 @@ class Jackcess(Package): """Jackcess is a pure Java library for reading from and writing to MS Access databases (currently supporting versions 2000-2016).""" - homepage = "http://jackcess.sourceforge.net/" + homepage = "https://jackcess.sourceforge.net/" url = "https://sourceforge.net/projects/jackcess/files/jackcess/2.1.12/jackcess-2.1.12.jar" version( diff --git a/var/spack/repos/builtin/packages/jags/package.py b/var/spack/repos/builtin/packages/jags/package.py index e584ebd264588c..e73dfe8c8697a3 100644 --- a/var/spack/repos/builtin/packages/jags/package.py +++ b/var/spack/repos/builtin/packages/jags/package.py @@ -13,7 +13,7 @@ class Jags(AutotoolsPackage): tags = ["mcmc", "Gibbs-sampler"] - homepage = "http://mcmc-jags.sourceforge.net/" + homepage = "https://mcmc-jags.sourceforge.net/" url = "https://downloads.sourceforge.net/project/mcmc-jags/JAGS/4.x/Source/JAGS-4.2.0.tar.gz" license("GPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/jmol/package.py b/var/spack/repos/builtin/packages/jmol/package.py index a3eba1e202394c..317627f4de8807 100644 --- a/var/spack/repos/builtin/packages/jmol/package.py +++ b/var/spack/repos/builtin/packages/jmol/package.py @@ -12,7 +12,7 @@ class Jmol(Package): """Jmol: an open-source Java viewer for chemical structures in 3D with features for chemicals, crystals, materials and biomolecules.""" - homepage = "http://jmol.sourceforge.net/" + homepage = "https://jmol.sourceforge.net/" url = "https://sourceforge.net/projects/jmol/files/Jmol/Version%2014.8/Jmol%2014.8.0/Jmol-14.8.0-binary.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/judy/package.py b/var/spack/repos/builtin/packages/judy/package.py index 508b27bc5c4a4c..9353721974d083 100644 --- a/var/spack/repos/builtin/packages/judy/package.py +++ b/var/spack/repos/builtin/packages/judy/package.py @@ -9,8 +9,8 @@ class Judy(AutotoolsPackage): """Judy: General-purpose dynamic array, associative array and hash-trie.""" - homepage = "http://judy.sourceforge.net/" - url = "http://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz" + homepage = "https://judy.sourceforge.net/" + url = "https://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz" license("LGPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/kdiff3/package.py b/var/spack/repos/builtin/packages/kdiff3/package.py index 931bae44f6f987..f49d74176fd5f5 100644 --- a/var/spack/repos/builtin/packages/kdiff3/package.py +++ b/var/spack/repos/builtin/packages/kdiff3/package.py @@ -9,7 +9,7 @@ class Kdiff3(Package): """Compare and merge 2 or 3 files or directories.""" - homepage = "http://kdiff3.sourceforge.net/" + homepage = "https://kdiff3.sourceforge.net/" url = "https://downloads.sourceforge.net/project/kdiff3/kdiff3/0.9.98/kdiff3-0.9.98.tar.gz" license("GPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/lame/package.py b/var/spack/repos/builtin/packages/lame/package.py index e48b203bb2958b..5c6a4115dd4bc5 100644 --- a/var/spack/repos/builtin/packages/lame/package.py +++ b/var/spack/repos/builtin/packages/lame/package.py @@ -10,7 +10,7 @@ class Lame(AutotoolsPackage): """LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.""" - homepage = "http://lame.sourceforge.net/" + homepage = "https://lame.sourceforge.net/" url = "https://download.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz" license("LGPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/lcms/package.py b/var/spack/repos/builtin/packages/lcms/package.py index 6bb8d05941678f..42ee9af89fec07 100644 --- a/var/spack/repos/builtin/packages/lcms/package.py +++ b/var/spack/repos/builtin/packages/lcms/package.py @@ -12,7 +12,7 @@ class Lcms(AutotoolsPackage): portable across several platforms (MIT license).""" homepage = "https://www.littlecms.com" - url = "http://downloads.sourceforge.net/project/lcms/lcms/2.9/lcms2-2.9.tar.gz" + url = "https://downloads.sourceforge.net/project/lcms/lcms/2.9/lcms2-2.9.tar.gz" license("MIT") @@ -28,7 +28,7 @@ class Lcms(AutotoolsPackage): depends_on("cxx", type="build") # generated def url_for_version(self, version): - url = "http://downloads.sourceforge.net/project/lcms/lcms/{0}/lcms2-{1}.tar.gz" + url = "https://downloads.sourceforge.net/project/lcms/lcms/{0}/lcms2-{1}.tar.gz" return url.format(version.up_to(2), version) depends_on("jpeg") diff --git a/var/spack/repos/builtin/packages/lcov/package.py b/var/spack/repos/builtin/packages/lcov/package.py index 96a25f96a36ff1..54ab5955e36bc8 100644 --- a/var/spack/repos/builtin/packages/lcov/package.py +++ b/var/spack/repos/builtin/packages/lcov/package.py @@ -12,7 +12,7 @@ class Lcov(MakefilePackage): adds overview pages for easy navigation within the file structure. LCOV supports statement, function and branch coverage measurement.""" - homepage = "http://ltp.sourceforge.net/coverage/lcov.php" + homepage = "https://ltp.sourceforge.net/coverage/lcov.php" url = "https://github.com/linux-test-project/lcov/releases/download/v2.0/lcov-2.0.tar.gz" git = "https://github.com/linux-test-project/lcov.git" diff --git a/var/spack/repos/builtin/packages/libaio/package.py b/var/spack/repos/builtin/packages/libaio/package.py index 4e43322098ba10..46f15792648072 100644 --- a/var/spack/repos/builtin/packages/libaio/package.py +++ b/var/spack/repos/builtin/packages/libaio/package.py @@ -17,7 +17,7 @@ class Libaio(MakefilePackage): I/O operations associated with a given completion group. """ - homepage = "http://lse.sourceforge.net/io/aio.html" + homepage = "https://lse.sourceforge.net/io/aio.html" url = ( "https://debian.inf.tu-dresden.de/debian/pool/main/liba/libaio/libaio_0.3.110.orig.tar.gz" ) diff --git a/var/spack/repos/builtin/packages/libmng/package.py b/var/spack/repos/builtin/packages/libmng/package.py index 37a7f5bafc5fcb..3a5f6cb27d29fc 100644 --- a/var/spack/repos/builtin/packages/libmng/package.py +++ b/var/spack/repos/builtin/packages/libmng/package.py @@ -12,7 +12,7 @@ class Libmng(CMakePackage): extension to the popular PNG image format.""" homepage = "https://sourceforge.net/projects/libmng/" - url = "http://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.gz" + url = "https://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.gz" license("custom") diff --git a/var/spack/repos/builtin/packages/libnids/package.py b/var/spack/repos/builtin/packages/libnids/package.py index 8711e4de94a4b6..da9cc25e3ac98c 100644 --- a/var/spack/repos/builtin/packages/libnids/package.py +++ b/var/spack/repos/builtin/packages/libnids/package.py @@ -11,7 +11,7 @@ class Libnids(AutotoolsPackage): NIDS (Network Intrusion Detection System) components, namely E-component.""" - homepage = "http://libnids.sourceforge.net/" + homepage = "https://libnids.sourceforge.net/" url = "https://github.com/MITRECND/libnids/archive/1.25.tar.gz" git = "https://github.com/MITRECND/libnids.git" diff --git a/var/spack/repos/builtin/packages/libnova/package.py b/var/spack/repos/builtin/packages/libnova/package.py index 7e5c381afbb716..875a968d64a311 100644 --- a/var/spack/repos/builtin/packages/libnova/package.py +++ b/var/spack/repos/builtin/packages/libnova/package.py @@ -10,7 +10,7 @@ class Libnova(AutotoolsPackage): """ "libnova is a general purpose, double precision, Celestial Mechanics, Astrometry and Astrodynamics library.""" - homepage = "http://libnova.sourceforge.net" + homepage = "https://libnova.sourceforge.net" url = "https://sourceforge.net/projects/libnova/files/libnova/v%200.15.0/libnova-0.15.0.tar.gz/download" license("LGPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/libpfm4/package.py b/var/spack/repos/builtin/packages/libpfm4/package.py index 3f971e10dd67ab..2c642657e45c15 100644 --- a/var/spack/repos/builtin/packages/libpfm4/package.py +++ b/var/spack/repos/builtin/packages/libpfm4/package.py @@ -11,7 +11,7 @@ class Libpfm4(MakefilePackage): setup performance events for use with the perf_events Linux kernel interface.""" - homepage = "http://perfmon2.sourceforge.net" + homepage = "https://perfmon2.sourceforge.net" url = "https://downloads.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.12.0.tar.gz" maintainers("mwkrentel") diff --git a/var/spack/repos/builtin/packages/librsb/package.py b/var/spack/repos/builtin/packages/librsb/package.py index f9ba660f88dcce..c917ee47ba7a43 100644 --- a/var/spack/repos/builtin/packages/librsb/package.py +++ b/var/spack/repos/builtin/packages/librsb/package.py @@ -10,8 +10,8 @@ class Librsb(AutotoolsPackage): """librsb : A shared memory parallel sparse matrix computations library for the Recursive Sparse Blocks format""" - homepage = "http://librsb.sourceforge.net/" - url = "http://download.sourceforge.net/librsb/librsb-1.3.0.1.tar.gz" + homepage = "https://librsb.sourceforge.net/" + url = "https://download.sourceforge.net/librsb/librsb-1.3.0.1.tar.gz" list_url = "https://sourceforge.net/projects/librsb/files/" license("LGPL-3.0-only") diff --git a/var/spack/repos/builtin/packages/lmbench/package.py b/var/spack/repos/builtin/packages/lmbench/package.py index 742ae247f94641..cf5407194cf248 100644 --- a/var/spack/repos/builtin/packages/lmbench/package.py +++ b/var/spack/repos/builtin/packages/lmbench/package.py @@ -12,7 +12,7 @@ class Lmbench(MakefilePackage): bandwidth. lmbench is intended to give system developers insight into basic costs of key operations.""" - homepage = "http://lmbench.sourceforge.net/" + homepage = "https://lmbench.sourceforge.net/" git = "https://github.com/intel/lmbench.git" license("GPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/log4c/package.py b/var/spack/repos/builtin/packages/log4c/package.py index 7a27b60ab76766..01a21b00c23047 100644 --- a/var/spack/repos/builtin/packages/log4c/package.py +++ b/var/spack/repos/builtin/packages/log4c/package.py @@ -9,7 +9,7 @@ class Log4c(AutotoolsPackage): """Library for writing log messages from C programs""" - homepage = "http://log4c.sourceforge.net/" + homepage = "https://log4c.sourceforge.net/" url = "https://downloads.sourceforge.net/project/log4c/log4c/1.2.4/log4c-1.2.4.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/log4cpp/package.py b/var/spack/repos/builtin/packages/log4cpp/package.py index 7a5303286366f0..1e08a86e2bea5e 100644 --- a/var/spack/repos/builtin/packages/log4cpp/package.py +++ b/var/spack/repos/builtin/packages/log4cpp/package.py @@ -13,7 +13,7 @@ class Log4cpp(AutotoolsPackage): the Log4j Java library, staying as close to their API as is reasonable.""" - homepage = "http://log4cpp.sourceforge.net/" + homepage = "https://log4cpp.sourceforge.net/" url = "http://sourceforge.net/projects/log4cpp/files/log4cpp-1.1.3.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/loki/package.py b/var/spack/repos/builtin/packages/loki/package.py index 3be71b8591682f..643c3c46daf996 100644 --- a/var/spack/repos/builtin/packages/loki/package.py +++ b/var/spack/repos/builtin/packages/loki/package.py @@ -10,7 +10,7 @@ class Loki(MakefilePackage): """Loki is a C++ library of designs, containing flexible implementations of common design patterns and idioms.""" - homepage = "http://loki-lib.sourceforge.net" + homepage = "https://loki-lib.sourceforge.net" url = "https://downloads.sourceforge.net/project/loki-lib/Loki/Loki%200.1.7/loki-0.1.7.tar.bz2" tags = ["e4s"] diff --git a/var/spack/repos/builtin/packages/maq/package.py b/var/spack/repos/builtin/packages/maq/package.py index 5b3ec7a02eaecb..e00336542f7309 100644 --- a/var/spack/repos/builtin/packages/maq/package.py +++ b/var/spack/repos/builtin/packages/maq/package.py @@ -10,7 +10,7 @@ class Maq(AutotoolsPackage): """Maq is a software that builds mapping assemblies from short reads generated by the next-generation sequencing machines.""" - homepage = "http://maq.sourceforge.net/" + homepage = "https://maq.sourceforge.net/" url = "https://downloads.sourceforge.net/project/maq/maq/0.7.1/maq-0.7.1.tar.bz2" list_url = "https://sourceforge.net/projects/maq/files/maq/" maintainers("snehring") diff --git a/var/spack/repos/builtin/packages/microbiomeutil/package.py b/var/spack/repos/builtin/packages/microbiomeutil/package.py index 67aa13b1938df7..9e62835cefa85c 100644 --- a/var/spack/repos/builtin/packages/microbiomeutil/package.py +++ b/var/spack/repos/builtin/packages/microbiomeutil/package.py @@ -9,7 +9,7 @@ class Microbiomeutil(MakefilePackage, SourceforgePackage): """Microbiome analysis utilities""" - homepage = "http://microbiomeutil.sourceforge.net/" + homepage = "https://microbiomeutil.sourceforge.net/" sourceforge_mirror_path = "microbiomeutil/microbiomeutil-r20110519.tgz" version("20110519", sha256="9233de80ea57bfb9e9371cbe7e3bfad2d4a51168fddaf60fa144c4046c80d823") diff --git a/var/spack/repos/builtin/packages/mrbayes/package.py b/var/spack/repos/builtin/packages/mrbayes/package.py index 2cc9a68589e14d..4525c1c5b385f3 100644 --- a/var/spack/repos/builtin/packages/mrbayes/package.py +++ b/var/spack/repos/builtin/packages/mrbayes/package.py @@ -12,7 +12,7 @@ class Mrbayes(AutotoolsPackage): chain Monte Carlo (MCMC) methods to estimate the posterior distribution of model parameters.""" - homepage = "http://mrbayes.sourceforge.net" + homepage = "https://mrbayes.sourceforge.net" url = "https://github.com/NBISweden/MrBayes/releases/download/v3.2.7a/mrbayes-3.2.7a.tar.gz" license("GPL-3.0-or-later") diff --git a/var/spack/repos/builtin/packages/mummer/package.py b/var/spack/repos/builtin/packages/mummer/package.py index a9a1a7c877e9e3..52b4da1feffc94 100644 --- a/var/spack/repos/builtin/packages/mummer/package.py +++ b/var/spack/repos/builtin/packages/mummer/package.py @@ -9,7 +9,7 @@ class Mummer(Package): """MUMmer is a system for rapidly aligning entire genomes.""" - homepage = "http://mummer.sourceforge.net/" + homepage = "https://mummer.sourceforge.net/" url = "https://sourceforge.net/projects/mummer/files/mummer/3.23/MUMmer3.23.tar.gz/download" license("Artistic-1.0") diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py index af601d662595b4..4e6d234ecb9f7f 100644 --- a/var/spack/repos/builtin/packages/nccmp/package.py +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -9,7 +9,7 @@ class Nccmp(CMakePackage): """Compare NetCDF Files""" - homepage = "http://nccmp.sourceforge.net/" + homepage = "https://nccmp.sourceforge.net/" url = "https://gitlab.com/remikz/nccmp/-/archive/1.9.0.1/nccmp-1.9.0.1.tar.gz" maintainers("ulmononian", "climbfuji") diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py index 8160ca8f58d760..c00f4aac76ee6a 100644 --- a/var/spack/repos/builtin/packages/nco/package.py +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -10,7 +10,7 @@ class Nco(AutotoolsPackage): """The NCO toolkit manipulates and analyzes data stored in netCDF-accessible formats""" - homepage = "http://nco.sourceforge.net/" + homepage = "https://nco.sourceforge.net/" url = "https://github.com/nco/nco/archive/5.0.1.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/neartree/package.py b/var/spack/repos/builtin/packages/neartree/package.py index 789bff4e6b3cef..e2cb4e3716e132 100644 --- a/var/spack/repos/builtin/packages/neartree/package.py +++ b/var/spack/repos/builtin/packages/neartree/package.py @@ -10,7 +10,7 @@ class Neartree(MakefilePackage): """This is a release of an API for finding nearest neighbors among points in spaces of arbitrary dimensions.""" - homepage = "http://neartree.sourceforge.net/" + homepage = "https://neartree.sourceforge.net/" url = "https://downloads.sourceforge.net/project/neartree/neartree/NearTree-3.1/NearTree-3.1.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/netpbm/package.py b/var/spack/repos/builtin/packages/netpbm/package.py index 4fe72eaa009098..512a2251d44e2f 100644 --- a/var/spack/repos/builtin/packages/netpbm/package.py +++ b/var/spack/repos/builtin/packages/netpbm/package.py @@ -19,7 +19,7 @@ class Netpbm(MakefilePackage): editing tools such as magnifying and cropping. """ - homepage = "http://netpbm.sourceforge.net" + homepage = "https://netpbm.sourceforge.net" url = "https://sourceforge.net/projects/netpbm/files/super_stable/10.73.35/netpbm-10.73.35.tgz" maintainers("cessenat") diff --git a/var/spack/repos/builtin/packages/ngspice/package.py b/var/spack/repos/builtin/packages/ngspice/package.py index 0b22cd0df5a5d7..7c2345120df04b 100644 --- a/var/spack/repos/builtin/packages/ngspice/package.py +++ b/var/spack/repos/builtin/packages/ngspice/package.py @@ -10,7 +10,7 @@ class Ngspice(AutotoolsPackage): """ngspice is the open source spice simulator for electric and electronic circuits.""" - homepage = "http://ngspice.sourceforge.net/" + homepage = "https://ngspice.sourceforge.net/" url = "https://sourceforge.net/projects/ngspice/files/ngspice-33.tar.gz" list_url = "https://sourceforge.net/projects/ngspice/files/ng-spice-rework" list_depth = 1 diff --git a/var/spack/repos/builtin/packages/octave-splines/package.py b/var/spack/repos/builtin/packages/octave-splines/package.py index d6c515475ba3b2..d3cb070b7c609d 100644 --- a/var/spack/repos/builtin/packages/octave-splines/package.py +++ b/var/spack/repos/builtin/packages/octave-splines/package.py @@ -9,7 +9,7 @@ class OctaveSplines(OctavePackage, SourceforgePackage): """Additional spline functions.""" - homepage = "http://octave.sourceforge.net/splines/index.html" + homepage = "https://octave.sourceforge.net/splines/index.html" sourceforge_mirror_path = "octave/splines-1.3.1.tar.gz" license("GPL-3.0-or-later") diff --git a/var/spack/repos/builtin/packages/opium/package.py b/var/spack/repos/builtin/packages/opium/package.py index 73ab47cd786227..8f8a59ae3a8b96 100644 --- a/var/spack/repos/builtin/packages/opium/package.py +++ b/var/spack/repos/builtin/packages/opium/package.py @@ -9,7 +9,7 @@ class Opium(AutotoolsPackage): """DFT pseudopotential generation project""" - homepage = "http://opium.sourceforge.net" + homepage = "https://opium.sourceforge.net" url = "https://downloads.sourceforge.net/project/opium/opium/opium-v3.8/opium-v3.8-src.tgz" license("GPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/optipng/package.py b/var/spack/repos/builtin/packages/optipng/package.py index 40ee730f19c3bc..ddbfb626bacf7d 100644 --- a/var/spack/repos/builtin/packages/optipng/package.py +++ b/var/spack/repos/builtin/packages/optipng/package.py @@ -14,7 +14,7 @@ class Optipng(AutotoolsPackage, SourceforgePackage): integrity checks and corrections. """ - homepage = "http://optipng.sourceforge.net/" + homepage = "https://optipng.sourceforge.net/" sourceforge_mirror_path = "optipng/optipng-0.7.7.tar.gz" license("Zlib") diff --git a/var/spack/repos/builtin/packages/p7zip/package.py b/var/spack/repos/builtin/packages/p7zip/package.py index c50aeb4d070069..2a04e90c34cf00 100644 --- a/var/spack/repos/builtin/packages/p7zip/package.py +++ b/var/spack/repos/builtin/packages/p7zip/package.py @@ -11,7 +11,7 @@ class P7zip(MakefilePackage): """A Unix port of the 7z file archiver""" maintainers("vmiheer") - homepage = "http://p7zip.sourceforge.net" + homepage = "https://p7zip.sourceforge.net" license("DOC") diff --git a/var/spack/repos/builtin/packages/perl-swissknife/package.py b/var/spack/repos/builtin/packages/perl-swissknife/package.py index 33ff9f59510715..9d44c199431d94 100644 --- a/var/spack/repos/builtin/packages/perl-swissknife/package.py +++ b/var/spack/repos/builtin/packages/perl-swissknife/package.py @@ -9,7 +9,7 @@ class PerlSwissknife(PerlPackage): """An object-oriented Perl library to handle Swiss-Prot entries""" - homepage = "http://swissknife.sourceforge.net" + homepage = "https://swissknife.sourceforge.net" url = "https://downloads.sourceforge.net/project/swissknife/swissknife/1.75/Swissknife_1.75.tar.gz" license("GPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/ploticus/package.py b/var/spack/repos/builtin/packages/ploticus/package.py index 0f1ae59373d0c2..dc2b0345777433 100644 --- a/var/spack/repos/builtin/packages/ploticus/package.py +++ b/var/spack/repos/builtin/packages/ploticus/package.py @@ -9,7 +9,7 @@ class Ploticus(MakefilePackage): """Ploticus can produce various types of plots and graphs.""" - homepage = "http://ploticus.sourceforge.net/doc/welcome.html" + homepage = "https://ploticus.sourceforge.net/doc/welcome.html" maintainers("Christoph-TU") diff --git a/var/spack/repos/builtin/packages/plplot/package.py b/var/spack/repos/builtin/packages/plplot/package.py index dc3b4d948bf3d2..4e3d148399152e 100644 --- a/var/spack/repos/builtin/packages/plplot/package.py +++ b/var/spack/repos/builtin/packages/plplot/package.py @@ -9,7 +9,7 @@ class Plplot(CMakePackage): """PLplot is a cross-platform package for creating scientific plots.""" - homepage = "http://plplot.sourceforge.net/" + homepage = "https://plplot.sourceforge.net/" url = "https://sourceforge.net/projects/plplot/files/plplot/5.13.0%20Source/plplot-5.13.0.tar.gz/download" license("LGPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/pmgr-collective/package.py b/var/spack/repos/builtin/packages/pmgr-collective/package.py index 2de440b3c901ea..99d862a789b2a2 100644 --- a/var/spack/repos/builtin/packages/pmgr-collective/package.py +++ b/var/spack/repos/builtin/packages/pmgr-collective/package.py @@ -11,7 +11,7 @@ class PmgrCollective(Package): MPI jobs.""" homepage = "https://www.sourceforge.net/projects/pmgrcollective" - url = "http://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz" + url = "https://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz" version("1.0", sha256="c8022d1128ce5e8f637166af6e55c13700e665550e468b8cdb1531441c6bb7f5") diff --git a/var/spack/repos/builtin/packages/pngwriter/package.py b/var/spack/repos/builtin/packages/pngwriter/package.py index 679eb138e49e61..e11fb3f121be96 100644 --- a/var/spack/repos/builtin/packages/pngwriter/package.py +++ b/var/spack/repos/builtin/packages/pngwriter/package.py @@ -16,7 +16,7 @@ class Pngwriter(CMakePackage): bezier curves, opening existing PNG images and more. """ - homepage = "http://pngwriter.sourceforge.net/" + homepage = "https://pngwriter.sourceforge.net/" url = "https://github.com/pngwriter/pngwriter/archive/0.5.6.tar.gz" git = "https://github.com/pngwriter/pngwriter.git" diff --git a/var/spack/repos/builtin/packages/prinseq-lite/package.py b/var/spack/repos/builtin/packages/prinseq-lite/package.py index 0737bb4a37d33a..97c22661cf31a5 100644 --- a/var/spack/repos/builtin/packages/prinseq-lite/package.py +++ b/var/spack/repos/builtin/packages/prinseq-lite/package.py @@ -10,7 +10,7 @@ class PrinseqLite(Package): """PRINSEQ will help you to preprocess your genomic or metagenomic sequence data in FASTA or FASTQ format.""" - homepage = "http://prinseq.sourceforge.net" + homepage = "https://prinseq.sourceforge.net" url = "https://sourceforge.net/projects/prinseq/files/standalone/prinseq-lite-0.20.4.tar.gz" license("GPL-3.0-only") diff --git a/var/spack/repos/builtin/packages/pslib/package.py b/var/spack/repos/builtin/packages/pslib/package.py index a720e6a8246725..7b591f60f9785d 100644 --- a/var/spack/repos/builtin/packages/pslib/package.py +++ b/var/spack/repos/builtin/packages/pslib/package.py @@ -9,7 +9,7 @@ class Pslib(AutotoolsPackage): """C-library to create PostScript files on the fly.""" - homepage = "http://pslib.sourceforge.net/" + homepage = "https://pslib.sourceforge.net/" url = "https://sourceforge.net/projects/pslib/files/pslib/0.4.5/pslib-0.4.5.tar.gz" license("GPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/psrchive/package.py b/var/spack/repos/builtin/packages/psrchive/package.py index f97f318fa72e15..5298872bc01319 100644 --- a/var/spack/repos/builtin/packages/psrchive/package.py +++ b/var/spack/repos/builtin/packages/psrchive/package.py @@ -14,7 +14,7 @@ class Psrchive(AutotoolsPackage): single-pulse work, RFI mitigation, etc. These tools are utilized by a powerful suite of user-end programs that come with the library.""" - homepage = "http://psrchive.sourceforge.net/" + homepage = "https://psrchive.sourceforge.net/" url = "https://sourceforge.net/projects/psrchive/files/psrchive/2022-05-14/psrchive-2022-05-14.tar.gz/download" git = "https://git.code.sf.net/p/psrchive/code.git" diff --git a/var/spack/repos/builtin/packages/pstreams/package.py b/var/spack/repos/builtin/packages/pstreams/package.py index 204c83cf7473f5..21e69832bde3ab 100644 --- a/var/spack/repos/builtin/packages/pstreams/package.py +++ b/var/spack/repos/builtin/packages/pstreams/package.py @@ -10,7 +10,7 @@ class Pstreams(Package): """C++ wrapper for the POSIX.2 functions popen(3) and pclose(3)""" - homepage = "http://pstreams.sourceforge.net/" + homepage = "https://pstreams.sourceforge.net/" url = "https://sourceforge.net/projects/pstreams/files/pstreams/Release%201.0/pstreams-1.0.1.tar.gz" license("BSL-1.0") diff --git a/var/spack/repos/builtin/packages/py-crcmod/package.py b/var/spack/repos/builtin/packages/py-crcmod/package.py index fa32304829978e..df6441df33a6fd 100644 --- a/var/spack/repos/builtin/packages/py-crcmod/package.py +++ b/var/spack/repos/builtin/packages/py-crcmod/package.py @@ -10,7 +10,7 @@ class PyCrcmod(PythonPackage): """Python module for generating objects that compute the Cyclic Redundancy Check (CRC)""" - homepage = "http://crcmod.sourceforge.net/" + homepage = "https://crcmod.sourceforge.net/" pypi = "crcmod/crcmod-1.7.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-crossmap/package.py b/var/spack/repos/builtin/packages/py-crossmap/package.py index b109d349896d7b..dfa58142009ee6 100644 --- a/var/spack/repos/builtin/packages/py-crossmap/package.py +++ b/var/spack/repos/builtin/packages/py-crossmap/package.py @@ -10,7 +10,7 @@ class PyCrossmap(PythonPackage, SourceforgePackage): """CrossMap is a program for convenient conversion of genome coordinates (or annotation files) between different assemblies""" - homepage = "http://crossmap.sourceforge.net/" + homepage = "https://crossmap.sourceforge.net/" sourceforge_mirror_path = "crossmap/CrossMap-0.3.3.tar.gz" version("0.3.9", sha256="e20a4653e9fc313ac0f5a6cfc37b42e83c3cf2b42f9483706cfb9ec9ff72c74c") diff --git a/var/spack/repos/builtin/packages/py-docutils/package.py b/var/spack/repos/builtin/packages/py-docutils/package.py index 537c0ea2ec4fe3..23cf1ef04f8cb5 100644 --- a/var/spack/repos/builtin/packages/py-docutils/package.py +++ b/var/spack/repos/builtin/packages/py-docutils/package.py @@ -15,7 +15,7 @@ class PyDocutils(PythonPackage): easy to read, easy to use, what-you-see-is-what-you-get plaintext markup language.""" - homepage = "http://docutils.sourceforge.net/" + homepage = "https://docutils.sourceforge.net/" pypi = "docutils/docutils-0.15.2.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py index 4b87213469e738..93edb94388edb7 100644 --- a/var/spack/repos/builtin/packages/py-gnuplot/package.py +++ b/var/spack/repos/builtin/packages/py-gnuplot/package.py @@ -10,7 +10,7 @@ class PyGnuplot(PythonPackage): """Gnuplot.py is a Python package that allows you to create graphs from within Python using the gnuplot plotting program.""" - homepage = "http://gnuplot-py.sourceforge.net/" + homepage = "https://gnuplot-py.sourceforge.net/" url = ( "http://downloads.sourceforge.net/project/gnuplot-py/Gnuplot-py/1.8/gnuplot-py-1.8.tar.gz" ) diff --git a/var/spack/repos/builtin/packages/py-pychecker/package.py b/var/spack/repos/builtin/packages/py-pychecker/package.py index 4deba1e1491330..11984b1abb47f9 100644 --- a/var/spack/repos/builtin/packages/py-pychecker/package.py +++ b/var/spack/repos/builtin/packages/py-pychecker/package.py @@ -9,7 +9,7 @@ class PyPychecker(PythonPackage): """Python source code checking tool.""" - homepage = "http://pychecker.sourceforge.net/" + homepage = "https://pychecker.sourceforge.net/" url = ( "http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz" ) diff --git a/var/spack/repos/builtin/packages/py-pydispatcher/package.py b/var/spack/repos/builtin/packages/py-pydispatcher/package.py index 9822d78d68bb0b..68c369909c22b9 100644 --- a/var/spack/repos/builtin/packages/py-pydispatcher/package.py +++ b/var/spack/repos/builtin/packages/py-pydispatcher/package.py @@ -9,7 +9,7 @@ class PyPydispatcher(PythonPackage): """Multi-producer-multi-consumer signal dispatching mechanism.""" - homepage = "http://pydispatcher.sourceforge.net/" + homepage = "https://pydispatcher.sourceforge.net/" pypi = "PyDispatcher/PyDispatcher-2.0.5.tar.gz" version("2.0.5", sha256="5570069e1b1769af1fe481de6dd1d3a388492acddd2cdad7a3bde145615d5caf") diff --git a/var/spack/repos/builtin/packages/py-pyopengl/package.py b/var/spack/repos/builtin/packages/py-pyopengl/package.py index 64f4913dc2812c..0f973c7b8bc193 100644 --- a/var/spack/repos/builtin/packages/py-pyopengl/package.py +++ b/var/spack/repos/builtin/packages/py-pyopengl/package.py @@ -11,7 +11,7 @@ class PyPyopengl(PythonPackage): """PyOpenGL is the most common cross platform Python binding to OpenGL and related APIs.""" - homepage = "http://pyopengl.sourceforge.net" + homepage = "https://pyopengl.sourceforge.net" pypi = "pyopengl/PyOpenGL-3.1.6.tar.gz" version("3.1.6", sha256="8ea6c8773927eda7405bffc6f5bb93be81569a7b05c8cac50cd94e969dce5e27") diff --git a/var/spack/repos/builtin/packages/py-rseqc/package.py b/var/spack/repos/builtin/packages/py-rseqc/package.py index ef3939311363f6..4f86b692f66658 100644 --- a/var/spack/repos/builtin/packages/py-rseqc/package.py +++ b/var/spack/repos/builtin/packages/py-rseqc/package.py @@ -11,7 +11,7 @@ class PyRseqc(PythonPackage): comprehensively evaluate high throughput sequence data especially RNA-seq data.""" - homepage = "http://rseqc.sourceforge.net" + homepage = "https://rseqc.sourceforge.net" pypi = "RSeQC/RSeQC-2.6.4.tar.gz" version("5.0.1", sha256="3c7d458784861af352d8da3f4f1cc8941934b37643164e9b74f929a32bd9ca80") diff --git a/var/spack/repos/builtin/packages/qjson/package.py b/var/spack/repos/builtin/packages/qjson/package.py index 798d7ec477c49f..15e64bc56fa4e8 100644 --- a/var/spack/repos/builtin/packages/qjson/package.py +++ b/var/spack/repos/builtin/packages/qjson/package.py @@ -10,7 +10,7 @@ class Qjson(CMakePackage): """QJson is a Qt-based library that maps JSON data to QVariant objects and vice versa.""" - homepage = "http://qjson.sourceforge.net/" + homepage = "https://qjson.sourceforge.net/" url = "https://github.com/flavio/qjson/archive/0.9.0.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/qucs/package.py b/var/spack/repos/builtin/packages/qucs/package.py index cf5794016c923f..8e9ee739c0d0e5 100644 --- a/var/spack/repos/builtin/packages/qucs/package.py +++ b/var/spack/repos/builtin/packages/qucs/package.py @@ -17,7 +17,7 @@ class Qucs(AutotoolsPackage): on a presentation page or window. """ - homepage = "http://qucs.sourceforge.net/" + homepage = "https://qucs.sourceforge.net/" url = "https://sourceforge.net/projects/qucs/files/qucs/0.0.19/qucs-0.0.19.tar.gz" git = "https://git.code.sf.net/p/qucs/git" diff --git a/var/spack/repos/builtin/packages/qwt/package.py b/var/spack/repos/builtin/packages/qwt/package.py index 5258f7cfaedce7..542ac58769f1c5 100644 --- a/var/spack/repos/builtin/packages/qwt/package.py +++ b/var/spack/repos/builtin/packages/qwt/package.py @@ -14,7 +14,7 @@ class Qwt(QMakePackage): ranges of type double. """ - homepage = "http://qwt.sourceforge.net/" + homepage = "https://qwt.sourceforge.net/" url = "https://sourceforge.net/projects/qwt/files/qwt/6.1.3/qwt-6.1.3.tar.bz2" license("custom") diff --git a/var/spack/repos/builtin/packages/ray/package.py b/var/spack/repos/builtin/packages/ray/package.py index 593457182a3473..48d5962cb171c3 100644 --- a/var/spack/repos/builtin/packages/ray/package.py +++ b/var/spack/repos/builtin/packages/ray/package.py @@ -9,7 +9,7 @@ class Ray(CMakePackage, SourceforgePackage): """Parallel genome assemblies for parallel DNA sequencing""" - homepage = "http://denovoassembler.sourceforge.net/" + homepage = "https://denovoassembler.sourceforge.net/" sourceforge_mirror_path = "denovoassembler/Ray-2.3.1.tar.bz2" license("GPL-3.0-or-later") diff --git a/var/spack/repos/builtin/packages/scalpel/package.py b/var/spack/repos/builtin/packages/scalpel/package.py index e639d275e6b2b6..e2ec4d881cd600 100644 --- a/var/spack/repos/builtin/packages/scalpel/package.py +++ b/var/spack/repos/builtin/packages/scalpel/package.py @@ -12,7 +12,7 @@ class Scalpel(MakefilePackage, SourceforgePackage): with next-generation sequencing technology. """ - homepage = "http://scalpel.sourceforge.net/index.html" + homepage = "https://scalpel.sourceforge.net/index.html" sourceforge_mirror_path = "scalpel/scalpel-0.5.4.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/setserial/package.py b/var/spack/repos/builtin/packages/setserial/package.py index 2b2bd5267c52ab..5f8eb61dacb8ea 100644 --- a/var/spack/repos/builtin/packages/setserial/package.py +++ b/var/spack/repos/builtin/packages/setserial/package.py @@ -9,7 +9,7 @@ class Setserial(AutotoolsPackage): """A utility for configuring serial ports.""" - homepage = "http://setserial.sourceforge.net" + homepage = "https://setserial.sourceforge.net" url = ( "https://udomain.dl.sourceforge.net/project/setserial/setserial/2.17/setserial-2.17.tar.gz" ) diff --git a/var/spack/repos/builtin/packages/snpeff/package.py b/var/spack/repos/builtin/packages/snpeff/package.py index 975cf0b0f669f5..4a8c05f408d3fc 100644 --- a/var/spack/repos/builtin/packages/snpeff/package.py +++ b/var/spack/repos/builtin/packages/snpeff/package.py @@ -13,7 +13,7 @@ class Snpeff(Package, SourceforgePackage): annotates and predicts the effects of genetic variants (such as amino acid changes).""" - homepage = "http://snpeff.sourceforge.net/" + homepage = "https://snpeff.sourceforge.net/" sourceforge_mirror_path = "snpeff/snpEff_latest_core.zip" version( diff --git a/var/spack/repos/builtin/packages/sox/package.py b/var/spack/repos/builtin/packages/sox/package.py index a4e6887449b474..d830fb27d6c71c 100644 --- a/var/spack/repos/builtin/packages/sox/package.py +++ b/var/spack/repos/builtin/packages/sox/package.py @@ -9,7 +9,7 @@ class Sox(AutotoolsPackage): """SoX, the Swiss Army knife of sound processing programs.""" - homepage = "http://sox.sourceforge.net/Main/HomePage" + homepage = "https://sox.sourceforge.net/Main/HomePage" url = "https://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.bz2" version("14.4.2", sha256="81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c") diff --git a/var/spack/repos/builtin/packages/sparse/package.py b/var/spack/repos/builtin/packages/sparse/package.py index 5221b3a4463aa5..6181c8702ce13b 100644 --- a/var/spack/repos/builtin/packages/sparse/package.py +++ b/var/spack/repos/builtin/packages/sparse/package.py @@ -10,8 +10,8 @@ class Sparse(MakefilePackage): """An open source sparse linear equation solver.""" - homepage = "http://sparse.sourceforge.net/" - url = "http://downloads.sourceforge.net/project/sparse/sparse/sparse1.4b/sparse1.4b.tar.gz" + homepage = "https://sparse.sourceforge.net/" + url = "https://downloads.sourceforge.net/project/sparse/sparse/sparse1.4b/sparse1.4b.tar.gz" maintainers("wortiz") diff --git a/var/spack/repos/builtin/packages/squashfs/package.py b/var/spack/repos/builtin/packages/squashfs/package.py index e53f1b253b7745..595da9a5cb43df 100644 --- a/var/spack/repos/builtin/packages/squashfs/package.py +++ b/var/spack/repos/builtin/packages/squashfs/package.py @@ -9,7 +9,7 @@ class Squashfs(MakefilePackage): """Squashfs - read only compressed filesystem""" - homepage = "http://squashfs.sourceforge.net" + homepage = "https://squashfs.sourceforge.net" url = "https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.3/squashfs4.3.tar.gz" license("GPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/staden-io-lib/package.py b/var/spack/repos/builtin/packages/staden-io-lib/package.py index f5ae09ca6682cb..ef539eed36af98 100644 --- a/var/spack/repos/builtin/packages/staden-io-lib/package.py +++ b/var/spack/repos/builtin/packages/staden-io-lib/package.py @@ -10,7 +10,7 @@ class StadenIoLib(AutotoolsPackage): """Io_lib is a library for reading/writing various bioinformatics file formats.""" - homepage = "http://staden.sourceforge.net/" + homepage = "https://staden.sourceforge.net/" url = ( "https://sourceforge.net/projects/staden/files/io_lib/1.14.8/io_lib-1.14.8.tar.gz/download" ) diff --git a/var/spack/repos/builtin/packages/tcl-tclxml/package.py b/var/spack/repos/builtin/packages/tcl-tclxml/package.py index 97183cf5b469ce..f52651a1cbd342 100644 --- a/var/spack/repos/builtin/packages/tcl-tclxml/package.py +++ b/var/spack/repos/builtin/packages/tcl-tclxml/package.py @@ -12,7 +12,7 @@ class TclTclxml(AutotoolsPackage): XSL Transformations (TclXSLT). These allow Tcl scripts to read, manipulate and write XML documents.""" - homepage = "http://tclxml.sourceforge.net/tclxml.html" + homepage = "https://tclxml.sourceforge.net/tclxml.html" url = "https://sourceforge.net/projects/tclxml/files/TclXML/3.2/tclxml-3.2.tar.gz" list_url = "https://sourceforge.net/projects/tclxml/files/TclXML/" list_depth = 1 diff --git a/var/spack/repos/builtin/packages/tclap/package.py b/var/spack/repos/builtin/packages/tclap/package.py index 56e759821f917e..cabbe44e5598b4 100644 --- a/var/spack/repos/builtin/packages/tclap/package.py +++ b/var/spack/repos/builtin/packages/tclap/package.py @@ -9,7 +9,7 @@ class Tclap(AutotoolsPackage, SourceforgePackage): """Templatized C++ Command Line Parser""" - homepage = "http://tclap.sourceforge.net" + homepage = "https://tclap.sourceforge.net" sourceforge_mirror_path = "tclap/tclap-1.2.2.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/tempo/package.py b/var/spack/repos/builtin/packages/tempo/package.py index 9fe09fb22f9614..8f71bd661cd745 100644 --- a/var/spack/repos/builtin/packages/tempo/package.py +++ b/var/spack/repos/builtin/packages/tempo/package.py @@ -9,7 +9,7 @@ class Tempo(AutotoolsPackage): """Tempo is a program for pulsar timing data analysis.""" - homepage = "http://tempo.sourceforge.net/" + homepage = "https://tempo.sourceforge.net/" git = "git://git.code.sf.net/p/tempo/tempo.git" version("develop") diff --git a/var/spack/repos/builtin/packages/tfel/package.py b/var/spack/repos/builtin/packages/tfel/package.py index fab93d082f81a4..901feee1abb77a 100644 --- a/var/spack/repos/builtin/packages/tfel/package.py +++ b/var/spack/repos/builtin/packages/tfel/package.py @@ -27,7 +27,7 @@ class Tfel(CMakePackage): constraints on each component of the strain or the stress. """ - homepage = "http://tfel.sourceforge.net" + 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") diff --git a/var/spack/repos/builtin/packages/uncrustify/package.py b/var/spack/repos/builtin/packages/uncrustify/package.py index e082a34bcc9e91..ebd09af5fdf97f 100644 --- a/var/spack/repos/builtin/packages/uncrustify/package.py +++ b/var/spack/repos/builtin/packages/uncrustify/package.py @@ -9,7 +9,7 @@ class Uncrustify(CMakePackage, AutotoolsPackage): """Source Code Beautifier for C, C++, C#, ObjectiveC, Java, and others.""" - homepage = "http://uncrustify.sourceforge.net/" + homepage = "https://uncrustify.sourceforge.net/" git = "https://github.com/uncrustify/uncrustify" url = "https://sourceforge.net/projects/uncrustify/files/uncrustify/uncrustify-0.69/uncrustify-0.69.tar.gz" diff --git a/var/spack/repos/builtin/packages/unzip/package.py b/var/spack/repos/builtin/packages/unzip/package.py index 470376a47fdb7d..e15cec39da2fb3 100644 --- a/var/spack/repos/builtin/packages/unzip/package.py +++ b/var/spack/repos/builtin/packages/unzip/package.py @@ -10,7 +10,7 @@ class Unzip(MakefilePackage): """Unzip is a compression and file packaging/archive utility.""" homepage = "http://www.info-zip.org/Zip.html" - url = "http://downloads.sourceforge.net/infozip/unzip60.tar.gz" + url = "https://downloads.sourceforge.net/infozip/unzip60.tar.gz" license("custom") diff --git a/var/spack/repos/builtin/packages/utf8cpp/package.py b/var/spack/repos/builtin/packages/utf8cpp/package.py index 49a2ecc2a61941..39d56ad06e9d5e 100644 --- a/var/spack/repos/builtin/packages/utf8cpp/package.py +++ b/var/spack/repos/builtin/packages/utf8cpp/package.py @@ -10,7 +10,7 @@ class Utf8cpp(Package): """A simple, portable and lightweight generic library for handling UTF-8 encoded strings.""" - homepage = "http://utfcpp.sourceforge.net/" + homepage = "https://utfcpp.sourceforge.net/" version("2.3.4", sha256="3373cebb25d88c662a2b960c4d585daf9ae7b396031ecd786e7bb31b15d010ef") diff --git a/var/spack/repos/builtin/packages/virtualgl/package.py b/var/spack/repos/builtin/packages/virtualgl/package.py index 72e8a574a434e6..1dcb644939258f 100644 --- a/var/spack/repos/builtin/packages/virtualgl/package.py +++ b/var/spack/repos/builtin/packages/virtualgl/package.py @@ -13,7 +13,7 @@ class Virtualgl(CMakePackage): 3D application in real time.""" homepage = "https://www.virtualgl.org/Main/HomePage" - url = "http://downloads.sourceforge.net/project/virtualgl/2.5.2/VirtualGL-2.5.2.tar.gz" + url = "https://downloads.sourceforge.net/project/virtualgl/2.5.2/VirtualGL-2.5.2.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/w3m/package.py b/var/spack/repos/builtin/packages/w3m/package.py index 2027b7f90bca05..b84381db121004 100644 --- a/var/spack/repos/builtin/packages/w3m/package.py +++ b/var/spack/repos/builtin/packages/w3m/package.py @@ -21,7 +21,7 @@ class W3m(AutotoolsPackage): # Feel free to use Debian's branch as you need. # Currently, Arch and Ubuntu (and Debian derivatives) use Debian's branch. # Also, Gentoo, Fedora and openSUSE switched to Debian's branch. - homepage = "http://w3m.sourceforge.net/index.en.html" + homepage = "https://w3m.sourceforge.net/index.en.html" url = "https://downloads.sourceforge.net/project/w3m/w3m/w3m-0.5.3/w3m-0.5.3.tar.gz" maintainers("ronin_gw") diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py index 9c725872071dc1..e8e7937b112bf4 100644 --- a/var/spack/repos/builtin/packages/wxpropgrid/package.py +++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py @@ -12,7 +12,7 @@ class Wxpropgrid(Package, SourceforgePackage): properties such as strings, numbers, flagsets, string arrays, and colours.""" - homepage = "http://wxpropgrid.sourceforge.net/" + homepage = "https://wxpropgrid.sourceforge.net/" sourceforge_mirror_path = "wxpropgrid/wxpropgrid-1.4.15-src.tar.gz" version("1.4.15", sha256="f0c9a86656828f592c8e57d2c89401f07f0af6a45b17bbca3990e8d29121c2b8") diff --git a/var/spack/repos/builtin/packages/xqilla/package.py b/var/spack/repos/builtin/packages/xqilla/package.py index e4d7b21ee43746..22e61bd63248b8 100644 --- a/var/spack/repos/builtin/packages/xqilla/package.py +++ b/var/spack/repos/builtin/packages/xqilla/package.py @@ -10,7 +10,7 @@ class Xqilla(AutotoolsPackage, SourceforgePackage): """XQilla is an XQuery and XPath 2 library and command line utility written in C++, implemented on top of the Xerces-C library.""" - homepage = "http://xqilla.sourceforge.net/HomePage" + homepage = "https://xqilla.sourceforge.net/HomePage" sourceforge_mirror_path = "xqilla/XQilla-2.3.3.tar.gz" license("Apache-2.0") diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py index 7f7af8a24daa5c..5e68d304652073 100644 --- a/var/spack/repos/builtin/packages/zsh/package.py +++ b/var/spack/repos/builtin/packages/zsh/package.py @@ -13,7 +13,7 @@ class Zsh(AutotoolsPackage): """ homepage = "https://www.zsh.org" - url = "http://downloads.sourceforge.net/project/zsh/zsh/5.4.2/zsh-5.4.2.tar.xz" + url = "https://downloads.sourceforge.net/project/zsh/zsh/5.4.2/zsh-5.4.2.tar.xz" license("custom") From 9adefd587e52faad9cbbe242f769cebbd318b066 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 03:46:55 -0500 Subject: [PATCH 275/435] ccache: add v4.10.2 (#45672) --- var/spack/repos/builtin/packages/ccache/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py index 5566e348c6540a..5c334f5e23ca16 100644 --- a/var/spack/repos/builtin/packages/ccache/package.py +++ b/var/spack/repos/builtin/packages/ccache/package.py @@ -23,6 +23,7 @@ class Ccache(CMakePackage): license("GPL-3.0-or-later") + version("4.10.2", sha256="108100960bb7e64573ea925af2ee7611701241abb36ce0aae3354528403a7d87") version("4.9.1", sha256="12834ecaaaf2db069dda1d1d991f91c19e3274cc04a471af5b64195def17e90f") version("4.8.3", sha256="d59dd569ad2bbc826c0bc335c8ebd73e78ed0f2f40ba6b30069347e63585d9ef") version("4.8.2", sha256="75eef15b8b9da48db9c91e1d0ff58b3645fc70c0e4ca2ef1b6825a12f21f217d") @@ -83,6 +84,8 @@ class Ccache(CMakePackage): def cmake_args(self): return [ + # The test suite does not support the compiler being a wrapper script + # https://github.com/ccache/ccache/issues/914#issuecomment-922521690 self.define("ENABLE_TESTING", False), self.define("ENABLE_DOCUMENTATION", False), self.define_from_variant("REDIS_STORAGE_BACKEND", "redis"), From 633d1d2ccbe85ed68c369bfbbde775411dc47927 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 03:50:20 -0500 Subject: [PATCH 276/435] abseil-cpp: add v20240722; support tests (#45671) --- .../repos/builtin/packages/abseil-cpp/package.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/abseil-cpp/package.py b/var/spack/repos/builtin/packages/abseil-cpp/package.py index 1eac4a1544ea22..f099c8f7bbdb22 100644 --- a/var/spack/repos/builtin/packages/abseil-cpp/package.py +++ b/var/spack/repos/builtin/packages/abseil-cpp/package.py @@ -15,8 +15,11 @@ class AbseilCpp(CMakePackage): maintainers("jcftang") tags = ["windows"] - license("Apache-2.0") + license("Apache-2.0", checked_by="wdconinc") + version( + "20240722.0", sha256="f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3" + ) version( "20240116.2", sha256="733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc" ) @@ -86,13 +89,20 @@ class AbseilCpp(CMakePackage): description="C++ standard used during compilation", ) + depends_on("cmake@3.16:", when="@20240722:", type="build") depends_on("cmake@3.10:", when="@20220907:", type="build") depends_on("cmake@3.5:", when="@20190312:", type="build") depends_on("cmake@3.1:", type="build") + depends_on("googletest", type="build", when="@20220623:") + def cmake_args(self): + run_tests = self.run_tests and self.spec.satisfies("@20220623:") return [ - self.define("BUILD_TESTING", False), + self.define("BUILD_TESTING", run_tests), + self.define("ABSL_BUILD_TESTING", run_tests), + self.define("ABSL_USE_EXTERNAL_GOOGLETEST", run_tests), + self.define("ABSL_FIND_GOOGLETEST", run_tests), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"), ] From 742b78d2b57d2a9d3730bbb6c5f924f14d43ea54 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 03:54:10 -0500 Subject: [PATCH 277/435] wayland-protocols: add v1.35, v1.36; support tests (#45670) --- .../builtin/packages/wayland-protocols/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/wayland-protocols/package.py b/var/spack/repos/builtin/packages/wayland-protocols/package.py index 52596f24c188bc..9f346187dade9c 100644 --- a/var/spack/repos/builtin/packages/wayland-protocols/package.py +++ b/var/spack/repos/builtin/packages/wayland-protocols/package.py @@ -28,6 +28,8 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage): license("MIT") + version("1.36", sha256="c839dd4325565fd59a93d6cde17335357328f66983c2e1fb03c33e92d6918b17") + version("1.35", sha256="6e62dfa92ce82487d107b76064cfe2d7ca107c87c239ea9036a763d79c09105a") version("1.34", sha256="cd3cc9dedb838e6fc8f55bbeb688e8569ffac7df53bc59dbfac8acbb39267f05") version("1.33", sha256="71a7d2f062d463aa839497ddfac97e4bd3f00aa306e014f94529aa3a2be193a8") version("1.32", sha256="444b5d823ad0163dfe505c97ea1a0689ca7e2978a87cf59b03f06573b87db260") @@ -53,7 +55,9 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage): depends_on("meson@0.55:") depends_on("pkgconfig", type="build") - depends_on("doxygen", type="build") - depends_on("xmlto", type="build") - depends_on("libxslt", type="build") depends_on("wayland") + + +class MesonBuilder(spack.build_systems.meson.MesonBuilder): + def meson_args(self): + return ["-Dtests={}".format("true" if self.pkg.run_tests else "false")] From 1144487ee70bf0b2b3a46533bcf06bb5ae1f7389 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 04:03:31 -0500 Subject: [PATCH 278/435] autodiff: add v1.0.2 -> v1.1.2 (#43527) --- .../repos/builtin/packages/autodiff/package.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/autodiff/package.py b/var/spack/repos/builtin/packages/autodiff/package.py index 78dca3bc183b93..42d4b5b1f95b56 100644 --- a/var/spack/repos/builtin/packages/autodiff/package.py +++ b/var/spack/repos/builtin/packages/autodiff/package.py @@ -6,7 +6,7 @@ from spack.package import * -class Autodiff(CMakePackage): +class Autodiff(CMakePackage, CudaPackage): """autodiff is automatic differentiation made easier for C++.""" homepage = "https://autodiff.github.io" @@ -16,8 +16,13 @@ class Autodiff(CMakePackage): maintainers("wdconinc") - license("MIT") + license("MIT", checked_by="wdconinc") + version("1.1.2", sha256="86f68aabdae1eed214bfbf0ddaa182c78ea1bb99e4df404efb7b94d30e06b744") + version("1.1.1", sha256="05aa2a432c83db079efeca1c407166a3f3d190645bd3202da3b6357fb30fc9e1") + version("1.1.0", sha256="a5489bb546c460af52de8ead447439b3c97429184df28b4d142ce7dcfd62b82c") + version("1.0.3", sha256="21b57ce60864857913cacb856c3973ae10f7539b6bb00bcc04f85b2f00db0ce2") + version("1.0.2", sha256="a3289aed937a39a817f76e6befa0d071a3e70a5b0b125ec62d1acf1d389e2197") version("1.0.1", sha256="63f2c8aaf940fbb1d1e7098b1d6c08794da0194eec3faf773f3123dc7233838c") version("1.0.0", sha256="112c6f5740071786b3f212c96896abc2089a74bca16b57bb46ebf4cec79dca43") version("0.6.12", sha256="3e9d667b81bba8e43bbe240a0321e25f4be248d1761097718664445306882dcc") @@ -31,7 +36,7 @@ class Autodiff(CMakePackage): version("0.6.4", sha256="cfe0bb7c0de10979caff9d9bfdad7e6267faea2b8d875027397486b47a7edd75") version("0.5.13", sha256="a73dc571bcaad6b44f74865fed51af375f5a877db44321b5568d94a4358b77a1") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") variant("python", default=False, description="Enable the compilation of the python bindings.") variant("examples", default=False, description="Enable the compilation of the example files.") @@ -44,6 +49,8 @@ class Autodiff(CMakePackage): depends_on("catch2", type="test") depends_on("catch2@3:", when="@0.6.12:", type="test") + conflicts("+cuda", when="@:1.0", msg="CUDA support was added in 1.1.0") + def cmake_args(self): args = [ self.define("AUTODIFF_BUILD_TESTS", self.run_tests), From cd7a49114c068c2d6dd751c1492ac70604f6ad15 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 04:13:03 -0500 Subject: [PATCH 279/435] embree: add v4.3.3 (#45674) --- var/spack/repos/builtin/packages/embree/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/embree/package.py b/var/spack/repos/builtin/packages/embree/package.py index 2ad0c8bd77ffff..131d4749a90fba 100644 --- a/var/spack/repos/builtin/packages/embree/package.py +++ b/var/spack/repos/builtin/packages/embree/package.py @@ -15,6 +15,8 @@ class Embree(CMakePackage): license("Apache-2.0") + version("4.3.3", sha256="8a3bc3c3e21aa209d9861a28f8ba93b2f82ed0dc93341dddac09f1f03c36ef2d") + version("4.3.2", sha256="dc7bb6bac095b2e7bc64321435acd07c6137d6d60e4b79ec07bb0b215ddf81cb") version("4.3.1", sha256="824edcbb7a8cd393c5bdb7a16738487b21ecc4e1d004ac9f761e934f97bb02a4") version("4.3.0", sha256="baf0a57a45837fc055ba828a139467bce0bc0c6a9a5f2dccb05163d012c12308") version("4.2.0", sha256="b0479ce688045d17aa63ce6223c84b1cdb5edbf00d7eda71c06b7e64e21f53a0") From 3cf1914b7e26833d20b1922bfdbba5b13ddef362 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 04:17:50 -0500 Subject: [PATCH 280/435] py-avro: add v1.11.3, v1.12.0 (#45677) --- var/spack/repos/builtin/packages/py-avro/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-avro/package.py b/var/spack/repos/builtin/packages/py-avro/package.py index d082432f55e037..6598787a917633 100644 --- a/var/spack/repos/builtin/packages/py-avro/package.py +++ b/var/spack/repos/builtin/packages/py-avro/package.py @@ -12,6 +12,8 @@ class PyAvro(PythonPackage): homepage = "https://avro.apache.org/docs/current/" pypi = "avro/avro-1.8.2.tar.gz" + version("1.12.0", sha256="cad9c53b23ceed699c7af6bddced42e2c572fd6b408c257a7d4fc4e8cf2e2d6b") + version("1.11.3", sha256="3393bb5139f9cf0791d205756ce1e39a5b58586af5b153d6a3b5a199610e9d17") version("1.11.1", sha256="f123623ecc648d0e20ce14f8ed85162140c13cc4b108865d1b2529fbfa06c008") version("1.11.0", sha256="1206365cc30ad561493f735329857dd078533459cee4e928aec2505f341ce445") version("1.10.2", sha256="381b990cc4c4444743c3297348ffd46e0c3a5d7a17e15b2f4a9042f6e955c31a") @@ -21,4 +23,5 @@ class PyAvro(PythonPackage): depends_on("py-setuptools@40.8.0:", when="@1.11.1:", type="build") depends_on("python@2.7:", type=("build", "run")) depends_on("python@3.6:", when="@1.11.1:", type=("build", "run")) + depends_on("python@3.7:", when="@1.12:", type=("build", "run")) depends_on("py-typing-extensions", when="^python@:3.7", type=("build", "run")) From e2f605f6e9eddc0d9a8c9ab6fe991b3066bdf7ba Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 12 Aug 2024 11:27:48 +0200 Subject: [PATCH 281/435] GDAL: clarify compiler version support (#45651) --- .../repos/builtin/packages/gdal/package.py | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index 54e098e5509611..38ca6555569725 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -100,8 +100,8 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): version("2.0.1", sha256="2564c91ed8ed36274ee31002a25798f5babc4221e879cb5013867733d80f9920") version("2.0.0", sha256="91704fafeea2349c5e268dc1e2d03921b3aae64b05ee01d59fdfc1a6b0ffc061") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") # Optional dependencies variant("archive", default=False, when="@3.7:", description="Optional for vsi7z VFS driver") @@ -430,16 +430,19 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): depends_on("googletest@1.10:", type="test") # https://gdal.org/development/rfc/rfc98_build_requirements_gdal_3_9.html - msg = "GDAL requires C++17 support" - conflicts("%gcc@:7", msg=msg) - conflicts("%clang@:4", msg=msg) - conflicts("%msvc@:19.14", msg=msg) + with default_args(when="@3.9:", msg="GDAL requires C++17 support"): + conflicts("%gcc@:7") + conflicts("%clang@:4") + conflicts("%msvc@:19.14") # https://gdal.org/development/rfc/rfc68_cplusplus11.html - msg = "GDAL requires C++11 support" - conflicts("%gcc@:4.8.0", msg=msg) - conflicts("%clang@:3.2", msg=msg) - conflicts("%msvc@:13", msg=msg) + with default_args(when="@2.3:", msg="GDAL requires C++11 support"): + conflicts("%gcc@:4.8.0") + conflicts("%clang@:3.2") + conflicts("%msvc@:13") + + # https://github.com/OSGeo/gdal/issues/8693 + conflicts("%gcc@11:", when="@:3.6") # https://github.com/OSGeo/gdal/issues/5994 conflicts("~png", when="@3:3.5.0") From 200dfb034618f010cb6bb26fb1cfe04a93c304ae Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 12 Aug 2024 11:30:45 +0200 Subject: [PATCH 282/435] giflib: fix build on macOS (#45643) --- var/spack/repos/builtin/packages/giflib/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py index 9260fae32783de..fc8b5b1ea9d84b 100644 --- a/var/spack/repos/builtin/packages/giflib/package.py +++ b/var/spack/repos/builtin/packages/giflib/package.py @@ -24,7 +24,7 @@ class Giflib(MakefilePackage, SourceforgePackage): extension="tar.bz2", ) - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("automake", type="build", when="@:5.2.0") depends_on("autoconf", type="build", when="@:5.2.0") @@ -36,10 +36,13 @@ class Giflib(MakefilePackage, SourceforgePackage): "https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch", sha256="a94e7bdd8840a31cecacc301684dfdbf7b98773ad824aeaab611fabfdc513036", level=0, - when="@5.2: platform=darwin", + when="@5.2.0:5.2.1 platform=darwin", ) patch("bsd-head.patch") + # error: no such file or directory: 'dgif_lib.o' + parallel = False + def prefix_and_libversion_args(self): args = [] if self.spec.satisfies("@5.2.0:"): From 63af548271a6ba64892dc2a92fba9e1a8a397710 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 04:33:11 -0500 Subject: [PATCH 283/435] runc: add v1.1.13 (#45679) --- var/spack/repos/builtin/packages/runc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/runc/package.py b/var/spack/repos/builtin/packages/runc/package.py index ae539d25299f64..8db11fea2e4148 100644 --- a/var/spack/repos/builtin/packages/runc/package.py +++ b/var/spack/repos/builtin/packages/runc/package.py @@ -15,6 +15,7 @@ class Runc(MakefilePackage): license("Apache-2.0") + version("1.1.13", sha256="d20e76688ce0681dc687369e18b47aeffcfdac5184c978befa7ce5da35e797fe") version("1.1.6", sha256="548506fc1de8f0a4790d8e937eeede17db4beb79c53d66acb4f7ec3edbc31668") version("1.1.4", sha256="9f5972715dffb0b2371e4d678c1206cc8c4ec5eb80f2d48755d150bac49be35b") version("1.0.2", sha256="740acb49e33eaf4958b5109c85363c1d3900f242d4cab47fbdbefa6f8f3c6909") From 678c9954159b9e5be468c56d19aeebb016113a32 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 12 Aug 2024 11:33:27 +0200 Subject: [PATCH 284/435] PyTorch: update ecosystem (#45431) --- .../builtin/packages/py-torch/package.py | 19 +++++++++++++------ .../builtin/packages/py-torchaudio/package.py | 6 ++++-- .../builtin/packages/py-torchdata/package.py | 7 +++++-- .../packages/py-torchvision/package.py | 12 ++++++++++-- .../repos/builtin/packages/sleef/package.py | 13 ++++++++----- 5 files changed, 40 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 663f7d49014eb6..327034ed7bdb34 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -26,6 +26,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") version("main", branch="main") + version("2.4.0", tag="v2.4.0", commit="d990dada86a8ad94882b5c23e859b88c0c255bda") version("2.3.1", tag="v2.3.1", commit="63d5e9221bedd1546b7d364b5ce4171547db12a9") version("2.3.0", tag="v2.3.0", commit="97ff6cfd9c86c5c09d7ce775ab64ec5c99230f5d") version("2.2.2", tag="v2.2.2", commit="39901f229520a5256505ec24782f716ee7ddc843") @@ -56,9 +57,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): version("1.5.0", tag="v1.5.0", commit="4ff3872a2099993bf7e8c588f7182f3df777205b") version("1.4.1", tag="v1.4.1", commit="74044638f755cd8667bedc73da4dbda4aa64c948") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") is_darwin = sys.platform == "darwin" @@ -159,7 +159,6 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("py-networkx", when="@2:") depends_on("py-jinja2", when="@2:") depends_on("py-fsspec", when="@2.1:") - depends_on("mkl@2021.1.1:2021.4.0", when="@2.3: platform=windows") # pyproject.toml depends_on("py-setuptools") @@ -236,14 +235,16 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("py-pybind11@2.10.0", when="@1.13:1") depends_on("py-pybind11@2.6.2", when="@1.8:1.12") depends_on("py-pybind11@2.3.0", when="@:1.7") - depends_on("sleef@3.5.1_2020-12-22", when="@1.8:") + depends_on("sleef@3.6.0_2024-03-20", when="@2.4:") + depends_on("sleef@3.5.1_2020-12-22", when="@1.8:2.3") depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7") # Optional dependencies with default_args(type=("build", "link", "run")): # cmake/public/cuda.cmake + depends_on("cuda@11:", when="@2.4:+cuda") # https://github.com/pytorch/pytorch/issues/122169 - depends_on("cuda@11:12.3", when="@2:+cuda") + depends_on("cuda@11:12.3", when="@2.0:2.3+cuda") depends_on("cuda@10.2:12.3", when="@1.11:1+cuda") # https://discuss.pytorch.org/t/compiling-1-10-1-from-source-with-gcc-11-and-cuda-11-5/140971 depends_on("cuda@10.2:11.4", when="@1.10+cuda") @@ -287,6 +288,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # Historical dependencies with default_args(type=("build", "run")): + depends_on("mkl@2021.1.1:2021.4.0", when="@2.3 platform=windows") depends_on("py-cffi", when="@:1") depends_on("py-future", when="@1.5:1") depends_on("py-six", when="@1.13:1") @@ -559,6 +561,11 @@ def enable_or_disable(variant, keyword="USE", var=None): env.set("CUDNN_INCLUDE_DIR", self.spec["cudnn"].prefix.include) env.set("CUDNN_LIBRARY", self.spec["cudnn"].libs[0]) + # Flash attention has very high memory requirements that may cause the build to fail + # https://github.com/pytorch/pytorch/issues/111526 + # https://github.com/pytorch/pytorch/issues/124018 + env.set("USE_FLASH_ATTENTION", "OFF") + enable_or_disable("fbgemm") enable_or_disable("kineto") enable_or_disable("magma") diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py index f7ac883ac7918e..cf4894cbfd7716 100644 --- a/var/spack/repos/builtin/packages/py-torchaudio/package.py +++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py @@ -18,6 +18,7 @@ class PyTorchaudio(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("2.4.0", tag="v2.4.0", commit="69d40773dc4ed86643820c21a8a880e4d074a46e") version("2.3.1", tag="v2.3.1", commit="3edcf69e78a3c9a3077a11159861422440ec7d4a") version("2.3.0", tag="v2.3.0", commit="952ea7457bcc3ed0669e7741ff23015c426d6322") version("2.2.2", tag="v2.2.2", commit="cefdb369247668e1dba74de503d4d996124b6b11") @@ -48,8 +49,8 @@ class PyTorchaudio(PythonPackage): version("0.5.0", tag="v0.5.0", commit="09494ea545738538f9db2dceeffe10d421060ee5") version("0.4.0", tag="v0.4.0", commit="8afed303af3de41f3586007079c0534543c8f663") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") with default_args(type=("build", "link", "run")): # Based on PyPI wheel availability @@ -60,6 +61,7 @@ class PyTorchaudio(PythonPackage): depends_on("python@:3.8", when="@:0.7.0") depends_on("py-torch@main", when="@main") + depends_on("py-torch@2.4.0", when="@2.4.0") depends_on("py-torch@2.3.1", when="@2.3.1") depends_on("py-torch@2.3.0", when="@2.3.0") depends_on("py-torch@2.2.2", when="@2.2.2") diff --git a/var/spack/repos/builtin/packages/py-torchdata/package.py b/var/spack/repos/builtin/packages/py-torchdata/package.py index 8ace2d51ff474a..db1b37305e718c 100644 --- a/var/spack/repos/builtin/packages/py-torchdata/package.py +++ b/var/spack/repos/builtin/packages/py-torchdata/package.py @@ -18,6 +18,7 @@ class PyTorchdata(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + version("0.8.0", sha256="d5d27b264e79d7d00ad4998f14d097b770332d979672dceb6d038caf204f1208") version("0.7.1", sha256="ef9bbdcee759b53c3c9d99e76eb0a66da33d36bfb7f859a25a9b5e737a51fa23") version("0.7.0", sha256="0b444719c3abc67201ed0fea92ea9c4100e7f36551ba0d19a09446cc11154eb3") version("0.6.1", sha256="c596db251c5e6550db3f00e4308ee7112585cca4d6a1c82a433478fd86693257") @@ -28,10 +29,11 @@ class PyTorchdata(PythonPackage): version("0.4.0", sha256="b4ec446a701680faa620fcb828b98ba36a63fa79da62a1e568d4a683889172da") version("0.3.0", sha256="ac36188bf133cf5f1041a28ccb3ee82ba52d4b5d99617be37d64d740acd6cfd4") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") # https://github.com/pytorch/data#version-compatibility - depends_on("python@3.8:3.11", when="@0.6:", type=("build", "run")) + depends_on("python@3.8:3.12", when="@0.8:", type=("build", "run")) + depends_on("python@3.8:3.11", when="@0.6:0.7", type=("build", "run")) depends_on("python@3.7:3.10", when="@:0.5", type=("build", "run")) # pyproject.toml @@ -43,6 +45,7 @@ class PyTorchdata(PythonPackage): # https://github.com/pytorch/data#version-compatibility depends_on("py-torch@main", when="@main", type=("build", "run")) + depends_on("py-torch@2.4.0", when="@0.8.0", type=("build", "run")) depends_on("py-torch@2.1.1", when="@0.7.1", type=("build", "run")) depends_on("py-torch@2.1.0", when="@0.7.0", type=("build", "run")) depends_on("py-torch@2.0.1", when="@0.6.1", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 543c744ee3a31f..2bfe45fe87b443 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -19,6 +19,7 @@ class PyTorchvision(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + version("0.19.0", sha256="4c499d0a412b5a21d55ac3c0a37e80ecd7e1f002f2a7b6b3b38a2de2544acbb6") version("0.18.1", sha256="347d472a9ceecc44e0bee1eda140d63cfaffc74a54ec07d4b98da7698ce75516") version("0.18.0", sha256="3e61cbac33986a862a59cd733fd65da8b2c2a6160a66556cfa0e850f62fd43c7") version("0.17.2", sha256="0f9304acd77aafb7cfaf3fd5e318b2986ecc73547394b971d710eacd59f3e78e") @@ -51,14 +52,17 @@ class PyTorchvision(PythonPackage): version("0.6.0", sha256="02de11b3abe6882de4032ce86dab9c7794cbc84369b44d04e667486580f0f1f7") version("0.5.0", sha256="eb9afc93df3d174d975ee0914057a9522f5272310b4d56c150b955c287a4d74d") - depends_on("cxx", type="build") # generated + depends_on("cxx", type="build") desc = "Enable support for native encoding/decoding of {} formats in torchvision.io" variant("png", default=True, description=desc.format("PNG")) variant("jpeg", default=True, description=desc.format("JPEG")) - variant("nvjpeg", default=False, description=desc.format("JPEG")) + variant("nvjpeg", default=False, description=desc.format("NVJPEG")) variant("ffmpeg", default=False, description=desc.format("FFMPEG")) variant("video_codec", default=False, description=desc.format("video_codec")) + # torchvision does not yet support disabling giflib: + # https://github.com/pytorch/vision/pull/8406#discussion_r1590926939 + # variant("gif", default=False, description=desc.format("GIF"), when="@0.19:") with default_args(type=("build", "link", "run")): # Based on PyPI wheel availability @@ -70,6 +74,7 @@ class PyTorchvision(PythonPackage): # https://github.com/pytorch/vision#installation depends_on("py-torch@main", when="@main") + depends_on("py-torch@2.4.0", when="@0.19.0") depends_on("py-torch@2.3.1", when="@0.18.1") depends_on("py-torch@2.3.0", when="@0.18.0") depends_on("py-torch@2.2.2", when="@0.17.2") @@ -118,6 +123,9 @@ class PyTorchvision(PythonPackage): depends_on("cuda", when="+nvjpeg") depends_on("ffmpeg@3.1:", when="+ffmpeg") depends_on("cuda", when="+video_codec") + # torchvision does not yet support externally-installed giflib: + # https://github.com/pytorch/vision/pull/8406#discussion_r1590926939 + # depends_on("giflib", when="+gif") # Historical dependencies depends_on("py-requests", when="@0.12:0.17.0", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/sleef/package.py b/var/spack/repos/builtin/packages/sleef/package.py index 02cf199e6299c8..5518519896d231 100644 --- a/var/spack/repos/builtin/packages/sleef/package.py +++ b/var/spack/repos/builtin/packages/sleef/package.py @@ -19,8 +19,11 @@ class Sleef(CMakePackage): version("master", branch="master") version("3.6.1", commit="6ee14bcae5fe92c2ff8b000d5a01102dab08d774", preferred=True) - version("3.6", commit="a99491afee2bae0b11e9ffbf3211349f43a5fd10") - version("3.5.1_2020-12-22", commit="e0a003ee838b75d11763aa9c3ef17bf71a725bff") # py-torch@1.8: + version("3.6.0_2024-03-20", commit="60e76d2bce17d278b439d9da17177c8f957a9e9b") # py-torch@2.4: + version("3.6.0", commit="a99491afee2bae0b11e9ffbf3211349f43a5fd10") + version( + "3.5.1_2020-12-22", commit="e0a003ee838b75d11763aa9c3ef17bf71a725bff" + ) # py-torch@1.8:2.3 version("3.5.1", sha256="415ee9b1bcc5816989d3d4d92afd0cd3f9ee89cbd5a33eb008e69751e40438ab") version( "3.4.0_2019-07-30", commit="7f523de651585fe25cade462efccca647dcc8d02" @@ -38,15 +41,15 @@ class Sleef(CMakePackage): deprecated=True, ) version( - "3.2_2018-05-09", commit="6ff7a135a1e31979d1e1844a2e7171dfbd34f54f", deprecated=True + "3.2.0_2018-05-09", commit="6ff7a135a1e31979d1e1844a2e7171dfbd34f54f", deprecated=True ) # py-torch@0.4.1:1.0 version( - "3.2", + "3.2.0", sha256="3130c5966e204e6d6a3ace81e543d12b5b21f60897f1c185bfa587c1bd77bee2", deprecated=True, ) - depends_on("c", type="build") # generated + depends_on("c", type="build") generator("ninja") depends_on("cmake@3.18:", type="build") From 91412fb595820c8bb2cbf677bfb9589f70847181 Mon Sep 17 00:00:00 2001 From: Derek Ryan Strong Date: Mon, 12 Aug 2024 02:40:02 -0700 Subject: [PATCH 285/435] openmpi: restrict versions for launcher variants (#45624) --- var/spack/repos/builtin/packages/openmpi/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 02fa6434d597f2..5b2fb93783aec6 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -542,6 +542,7 @@ class Openmpi(AutotoolsPackage, CudaPackage): variant( "orterunprefix", default=False, + when="@1.3:4", description="Prefix Open MPI to PATH and LD_LIBRARY_PATH on local and remote hosts", ) # Adding support to build a debug version of OpenMPI that activates @@ -560,6 +561,7 @@ class Openmpi(AutotoolsPackage, CudaPackage): variant( "legacylaunchers", default=False, + when="@1.6:4 schedulers=slurm", description="Do not remove mpirun/mpiexec when building with slurm", ) # Variants to use internal packages @@ -1030,9 +1032,9 @@ def configure_args(self): config_args.append("--enable-mca-no-build=plm-rsh") # Useful for ssh-based environments - if spec.satisfies("@1.3:"): - if spec.satisfies("+orterunprefix"): - config_args.append("--enable-orterun-prefix-by-default") + # For v4 and lower + if spec.satisfies("+orterunprefix"): + config_args.append("--enable-orterun-prefix-by-default") # some scientific packages ignore deprecated/remove symbols. Re-enable # them for now, for discussion see @@ -1264,6 +1266,7 @@ def filter_pc_files(self): if self.compiler.name == "nag": x.filter("-Wl,--enable-new-dtags", "", string=True, backup=False) + # For v4 and lower @run_after("install") def delete_mpirun_mpiexec(self): # The preferred way to run an application when Slurm is the @@ -1273,7 +1276,7 @@ def delete_mpirun_mpiexec(self): # applications via mpirun or mpiexec, and leaves srun as the # only sensible choice (orterun is still present, but normal # users don't know about that). - if "@1.6: ~legacylaunchers schedulers=slurm" in self.spec: + if self.spec.satisfies("~legacylaunchers schedulers=slurm"): exe_list = [ self.prefix.bin.mpirun, self.prefix.bin.mpiexec, From cd6237cac44beec254152fe1959f2edb37ca6a92 Mon Sep 17 00:00:00 2001 From: Melven Roehrig-Zoellner Date: Mon, 12 Aug 2024 11:44:28 +0200 Subject: [PATCH 286/435] py-pyside2: add version 5.15.14 (#44634) Co-authored-by: Massimiliano Culpo --- .../builtin/packages/py-pyside2/package.py | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pyside2/package.py b/var/spack/repos/builtin/packages/py-pyside2/package.py index 062da2bcea2556..2443694adab4ea 100644 --- a/var/spack/repos/builtin/packages/py-pyside2/package.py +++ b/var/spack/repos/builtin/packages/py-pyside2/package.py @@ -11,6 +11,7 @@ class PyPyside2(PythonPackage): homepage = "https://www.pyside.org/" git = "https://code.qt.io/pyside/pyside-setup.git" + url = "https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.15.14-src/pyside-setup-opensource-src-5.15.14.tar.xz" # More recent versions of PySide2 (for Qt5) have been taken under # the offical Qt umbrella. For more information, see: @@ -19,6 +20,7 @@ class PyPyside2(PythonPackage): license("LGPL-3.0-or-later") version("develop", tag="dev") + version("5.15.14", sha256="32651194f6a6b7bce42f04e68b1401ad2087e4789a4c8f3fb8649e86189c6372") version( "5.15.2.1", tag="v5.15.2.1", @@ -52,13 +54,20 @@ class PyPyside2(PythonPackage): description="Enables the generation of html and man page documentation", ) - depends_on("python@2.7.0:2.7,3.5.0:3.5,3.6.1:", type=("build", "run")) - depends_on("python@2.7.0:2.7,3.5.0:3.5,3.6.1:3.8", when="@:5.14", type=("build", "run")) + # see https://wiki.qt.io/Qt_for_Python#Python_compatibility_matrix + depends_on("python@2.7.0:2.7,3.5.0:3.5,3.6.1:3.8", when="@:5.15.0", type=("build", "run")) + depends_on( + "python@2.7.0:2.7,3.5.0:3.5,3.6.1:3.9", when="@5.15.1:5.15.7", type=("build", "run") + ) + depends_on("python@2.7:3.10", when="@5.15.8", type=("build", "run")) + depends_on("python@3.5:3.10", when="@5.15.9:5.15.10", type=("build", "run")) + depends_on("python@3.6:3.11", when="@5.15.11:5.15.15", type=("build", "run")) depends_on("cmake@3.1:", type="build") # libclang versioning from sources/shiboken2/doc/gettingstarted.rst depends_on("llvm@6", type="build", when="@5.12:5.13") - depends_on("llvm@10:", type="build", when="@5.15:") + # clang >= 16 doesn't work, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270715#c6 + depends_on("llvm@10:15 +clang", type="build", when="@5.15") depends_on("py-setuptools", type="build") depends_on("py-packaging", type="build") depends_on("py-wheel", type="build") @@ -98,9 +107,14 @@ def install_options(self, spec, prefix): # "--verbose-build", "--qmake={0}".format(spec["qt"].prefix.bin.qmake), ] - if spec.satisfies("^python@3.10:"): + # older versions allow some limited api for @3.10: + # (prevented currently by dependency matrix above!) + if spec.satisfies("@:5.15.2 ^python@3.10:"): args.append("--limited-api=yes") + # fix rpaths + args.append("--rpath={0}".format(":".join(self.rpath))) + if self.run_tests: args.append("--build-tests") return args From 91333919c67951a8a9cba9db8699e1debb83d619 Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Mon, 12 Aug 2024 04:54:41 -0500 Subject: [PATCH 287/435] SLATE package: make MPI and OpenMP a requirement (#44979) Co-authored-by: gragghia --- var/spack/repos/builtin/packages/slate/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/slate/package.py b/var/spack/repos/builtin/packages/slate/package.py index 01393ef5cb4d1b..aa303ed17d5add 100644 --- a/var/spack/repos/builtin/packages/slate/package.py +++ b/var/spack/repos/builtin/packages/slate/package.py @@ -70,7 +70,7 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): # The runtime dependency on cmake is needed by the stand-alone tests (spack test). depends_on("cmake", type="run") - depends_on("mpi", when="+mpi") + depends_on("mpi") depends_on("intel-oneapi-mkl threads=openmp", when="+sycl") depends_on("blas") depends_on("blaspp ~cuda", when="~cuda") @@ -105,6 +105,8 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): depends_on("rocsolver", when="+rocm") requires("%oneapi", when="+sycl", msg="slate+sycl must be compiled with %oneapi") + requires("+mpi", msg="MPI is required (use of the 'mpi' variant is deprecated)") + requires("+openmp", msg="OpenMP is required (use of the 'openmp' variant is deprecated)") cpp_17_msg = "Requires C++17 compiler support" conflicts("%gcc@:5", msg=cpp_17_msg) @@ -136,10 +138,8 @@ def cmake_args(self): config = [ "-Dbuild_tests=%s" % self.run_tests, - "-Duse_openmp=%s" % ("+openmp" in spec), "-DBUILD_SHARED_LIBS=%s" % ("+shared" in spec), backend_config, - "-Duse_mpi=%s" % ("+mpi" in spec), ] if "+cuda" in spec: archs = ";".join(spec.variants["cuda_arch"].value) From 83873d06a1bf943444cb075a91ae81c70a955507 Mon Sep 17 00:00:00 2001 From: Filippo Spiga Date: Mon, 12 Aug 2024 10:59:59 +0100 Subject: [PATCH 288/435] jube: add v2.6.2, v2.7.0, v2.7.1 (#45599) --- var/spack/repos/builtin/packages/jube/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/var/spack/repos/builtin/packages/jube/package.py b/var/spack/repos/builtin/packages/jube/package.py index ccd759d9667908..554e98c06949b1 100644 --- a/var/spack/repos/builtin/packages/jube/package.py +++ b/var/spack/repos/builtin/packages/jube/package.py @@ -16,6 +16,21 @@ class Jube(PythonPackage): license("GPL-3.0-or-later") + version( + "2.7.1", + sha256="fe8b505a8bf224d785df665af134a1e69063d34d1a7214700d8c7325fef9ecfc", + extension="tar.gz", + ) + version( + "2.7.0", + sha256="31bba50c40547db6dc777d9766babb4786bb8539e988fd5de962602593304d26", + extension="tar.gz", + ) + version( + "2.6.2", + sha256="44fd0dd74500cb2537af52850d5742e5bc09f0379036bad83984a69bd7396151", + extension="tar.gz", + ) version( "2.6.1", sha256="348ebeb4db0ea56889a5d13bf49e394fccc0992f620e8c0c61c40185db13ad64", From bfdcdb485195dcef1f5319f01e717e1613d9c47c Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Mon, 12 Aug 2024 12:07:53 +0200 Subject: [PATCH 289/435] cutensor: add v2.0.1.2 on aarch64 (#45138) --- var/spack/repos/builtin/packages/cutensor/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cutensor/package.py b/var/spack/repos/builtin/packages/cutensor/package.py index bebfb509fd6070..df5ad01f7ce088 100644 --- a/var/spack/repos/builtin/packages/cutensor/package.py +++ b/var/spack/repos/builtin/packages/cutensor/package.py @@ -17,6 +17,7 @@ "2.0.1.2": { "Linux-x86_64": "ededa12ca622baad706ea0a500a358ea51146535466afabd96e558265dc586a2", "Linux-ppc64le": "7176083a4dad44cb0176771be6efb3775748ad30a39292bf7b4584510f1dd811", + "Linux-aarch64": "4214a0f7b44747c738f2b643be06b2b24826bd1bae6af27f29f3c6dec131bdeb", }, } From 06eacdf9d83e02812f06a405bf6a5a678e04be94 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 05:27:49 -0500 Subject: [PATCH 290/435] xterm: add v393 (#45678) --- var/spack/repos/builtin/packages/xterm/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/xterm/package.py b/var/spack/repos/builtin/packages/xterm/package.py index 8e8f48ec587914..7edbe346e29b78 100644 --- a/var/spack/repos/builtin/packages/xterm/package.py +++ b/var/spack/repos/builtin/packages/xterm/package.py @@ -12,10 +12,11 @@ class Xterm(AutotoolsPackage): that can't use the window system directly.""" homepage = "https://invisible-island.net/xterm/" - url = "ftp://ftp.invisible-island.net/xterm/xterm-327.tgz" + url = "https://invisible-island.net/archives/xterm/xterm-327.tgz" license("MIT") + version("393", sha256="dc3abf533d66ae3db49e6783b0e1e29f0e4d045b4b3dac797a5e93be2735ec7b") version("353", sha256="e521d3ee9def61f5d5c911afc74dd5c3a56ce147c7071c74023ea24cac9bb768") version("350", sha256="aefb59eefd310268080d1a90a447368fb97a9a6737bfecfc3800bf6cc304104d") version("340", sha256="b5c7f77b7afade798461e2a2f86d5af64f9c9c9f408b1af0f545add978df722a") From 3b59817ea7be35f4222dc88313734f7a30733ad7 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 12 Aug 2024 13:06:13 +0200 Subject: [PATCH 291/435] deal with TimeoutError from ssl.py (#45683) --- lib/spack/spack/binary_distribution.py | 60 +++++++++----------------- lib/spack/spack/ci.py | 4 +- lib/spack/spack/fetch_strategy.py | 2 +- lib/spack/spack/util/web.py | 12 +++--- 4 files changed, 30 insertions(+), 48 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 8fe272db7d886f..6108e695487cd1 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -23,7 +23,6 @@ import warnings from contextlib import closing from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple -from urllib.error import HTTPError, URLError import llnl.util.filesystem as fsys import llnl.util.lang @@ -899,9 +898,8 @@ def url_read_method(url): try: _, _, spec_file = web_util.read_from_url(url) contents = codecs.getreader("utf-8")(spec_file).read() - except (URLError, web_util.SpackWebError) as url_err: - tty.error("Error reading specfile: {0}".format(url)) - tty.error(url_err) + except web_util.SpackWebError as e: + tty.error(f"Error reading specfile: {url}: {e}") return contents try: @@ -2041,21 +2039,17 @@ def try_direct_fetch(spec, mirrors=None): try: _, _, fs = web_util.read_from_url(buildcache_fetch_url_signed_json) specfile_is_signed = True - except (URLError, web_util.SpackWebError, HTTPError) as url_err: + except web_util.SpackWebError as e1: try: _, _, fs = web_util.read_from_url(buildcache_fetch_url_json) - except (URLError, web_util.SpackWebError, HTTPError) as url_err_x: + except web_util.SpackWebError as e2: tty.debug( - "Did not find {0} on {1}".format( - specfile_name, buildcache_fetch_url_signed_json - ), - url_err, + f"Did not find {specfile_name} on {buildcache_fetch_url_signed_json}", + e1, level=2, ) tty.debug( - "Did not find {0} on {1}".format(specfile_name, buildcache_fetch_url_json), - url_err_x, - level=2, + f"Did not find {specfile_name} on {buildcache_fetch_url_json}", e2, level=2 ) continue specfile_contents = codecs.getreader("utf-8")(fs).read() @@ -2150,19 +2144,12 @@ def get_keys(install=False, trust=False, force=False, mirrors=None): try: _, _, json_file = web_util.read_from_url(keys_index) json_index = sjson.load(codecs.getreader("utf-8")(json_file)) - except (URLError, web_util.SpackWebError) as url_err: + except web_util.SpackWebError as url_err: if web_util.url_exists(keys_index): - err_msg = [ - "Unable to find public keys in {0},", - " caught exception attempting to read from {1}.", - ] - tty.error( - "".join(err_msg).format( - url_util.format(fetch_url), url_util.format(keys_index) - ) + f"Unable to find public keys in {url_util.format(fetch_url)}," + f" caught exception attempting to read from {url_util.format(keys_index)}." ) - tty.debug(url_err) continue @@ -2442,7 +2429,7 @@ def get_remote_hash(self): url_index_hash = url_util.join(self.url, BUILD_CACHE_RELATIVE_PATH, "index.json.hash") try: response = self.urlopen(urllib.request.Request(url_index_hash, headers=self.headers)) - except urllib.error.URLError: + except (TimeoutError, urllib.error.URLError): return None # Validate the hash @@ -2464,7 +2451,7 @@ def conditional_fetch(self) -> FetchIndexResult: try: response = self.urlopen(urllib.request.Request(url_index, headers=self.headers)) - except urllib.error.URLError as e: + except (TimeoutError, urllib.error.URLError) as e: raise FetchIndexError("Could not fetch index from {}".format(url_index), e) from e try: @@ -2505,10 +2492,7 @@ def __init__(self, url, etag, urlopen=web_util.urlopen): def conditional_fetch(self) -> FetchIndexResult: # Just do a conditional fetch immediately url = url_util.join(self.url, BUILD_CACHE_RELATIVE_PATH, "index.json") - headers = { - "User-Agent": web_util.SPACK_USER_AGENT, - "If-None-Match": '"{}"'.format(self.etag), - } + headers = {"User-Agent": web_util.SPACK_USER_AGENT, "If-None-Match": f'"{self.etag}"'} try: response = self.urlopen(urllib.request.Request(url, headers=headers)) @@ -2516,14 +2500,14 @@ def conditional_fetch(self) -> FetchIndexResult: if e.getcode() == 304: # Not modified; that means fresh. return FetchIndexResult(etag=None, hash=None, data=None, fresh=True) - raise FetchIndexError("Could not fetch index {}".format(url), e) from e - except urllib.error.URLError as e: - raise FetchIndexError("Could not fetch index {}".format(url), e) from e + raise FetchIndexError(f"Could not fetch index {url}", e) from e + except (TimeoutError, urllib.error.URLError) as e: + raise FetchIndexError(f"Could not fetch index {url}", e) from e try: result = codecs.getreader("utf-8")(response).read() except ValueError as e: - raise FetchIndexError("Remote index {} is invalid".format(url), e) from e + raise FetchIndexError(f"Remote index {url} is invalid", e) from e headers = response.headers etag_header_value = headers.get("Etag", None) or headers.get("etag", None) @@ -2554,21 +2538,19 @@ def conditional_fetch(self) -> FetchIndexResult: headers={"Accept": "application/vnd.oci.image.manifest.v1+json"}, ) ) - except urllib.error.URLError as e: - raise FetchIndexError( - "Could not fetch manifest from {}".format(url_manifest), e - ) from e + except (TimeoutError, urllib.error.URLError) as e: + raise FetchIndexError(f"Could not fetch manifest from {url_manifest}", e) from e try: manifest = json.loads(response.read()) except Exception as e: - raise FetchIndexError("Remote index {} is invalid".format(url_manifest), e) from e + raise FetchIndexError(f"Remote index {url_manifest} is invalid", e) from e # Get first blob hash, which should be the index.json try: index_digest = spack.oci.image.Digest.from_string(manifest["layers"][0]["digest"]) except Exception as e: - raise FetchIndexError("Remote index {} is invalid".format(url_manifest), e) from e + raise FetchIndexError(f"Remote index {url_manifest} is invalid", e) from e # Fresh? if index_digest.digest == self.local_hash: diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index db8e8f1a3510ce..95e23cc64fd616 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -1107,7 +1107,7 @@ def main_script_replacements(cmd): if cdash_handler and cdash_handler.auth_token: try: cdash_handler.populate_buildgroup(all_job_names) - except (SpackError, HTTPError, URLError) as err: + except (SpackError, HTTPError, URLError, TimeoutError) as err: tty.warn(f"Problem populating buildgroup: {err}") else: tty.warn("Unable to populate buildgroup without CDash credentials") @@ -2083,7 +2083,7 @@ def read_broken_spec(broken_spec_url): """ try: _, _, fs = web_util.read_from_url(broken_spec_url) - except (URLError, web_util.SpackWebError, HTTPError): + except web_util.SpackWebError: tty.warn(f"Unable to read broken spec from {broken_spec_url}") return None diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index c803b304c2ca32..4aa7f339de86d1 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -554,7 +554,7 @@ def fetch(self): try: response = self._urlopen(self.url) - except urllib.error.URLError as e: + except (TimeoutError, urllib.error.URLError) as e: # clean up archive on failure. if self.archive_file: os.remove(self.archive_file) diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index 8c843c534617c4..b681bb4950ce7f 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -197,8 +197,8 @@ def read_from_url(url, accept_content_type=None): try: response = urlopen(request) - except URLError as err: - raise SpackWebError("Download failed: {}".format(str(err))) + except (TimeoutError, URLError) as e: + raise SpackWebError(f"Download of {url.geturl()} failed: {e}") if accept_content_type: try: @@ -458,8 +458,8 @@ def url_exists(url, curl=None): timeout=spack.config.get("config:connect_timeout", 10), ) return True - except URLError as e: - tty.debug("Failure reading URL: " + str(e)) + except (TimeoutError, URLError) as e: + tty.debug(f"Failure reading {url}: {e}") return False @@ -740,10 +740,10 @@ def _spider(url: urllib.parse.ParseResult, collect_nested: bool, _visited: Set[s subcalls.append(abs_link) _visited.add(abs_link) - except URLError as e: + except (TimeoutError, URLError) as e: tty.debug(f"[SPIDER] Unable to read: {url}") tty.debug(str(e), level=2) - if hasattr(e, "reason") and isinstance(e.reason, ssl.SSLError): + if isinstance(e, URLError) and isinstance(e.reason, ssl.SSLError): tty.warn( "Spack was unable to fetch url list due to a " "certificate verification problem. You can try " From 2a5d4b22919f43acfd3526f6864d707bf86fb1ea Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 06:07:59 -0500 Subject: [PATCH 292/435] cli11: add v2.4.2 (#45673) --- var/spack/repos/builtin/packages/cli11/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/cli11/package.py b/var/spack/repos/builtin/packages/cli11/package.py index 8f51db6d1f036f..a7cbf17c192132 100644 --- a/var/spack/repos/builtin/packages/cli11/package.py +++ b/var/spack/repos/builtin/packages/cli11/package.py @@ -16,6 +16,7 @@ class Cli11(CMakePackage): license("BSD-3-Clause") + version("2.4.2", sha256="f2d893a65c3b1324c50d4e682c0cdc021dd0477ae2c048544f39eed6654b699a") version("2.4.1", sha256="73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58") version("2.3.2", sha256="aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22") version("2.3.1", sha256="378da73d2d1d9a7b82ad6ed2b5bda3e7bc7093c4034a1d680a2e009eb067e7b2") @@ -27,6 +28,7 @@ class Cli11(CMakePackage): depends_on("cxx", type="build") # generated depends_on("cmake@3.4:", type="build") + depends_on("cmake@3.5:", type="build", when="@2.4:") def cmake_args(self): args = [ From a2cb7ee803863e673ad24529c7441412ba7fe086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Chevalier?= Date: Mon, 12 Aug 2024 14:38:13 +0200 Subject: [PATCH 293/435] Kokkos: only requires a C++ compiler (#45467) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédric Chevalier --- var/spack/repos/builtin/packages/kokkos/package.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 7dbfd79a1a6007..810e9527bcce84 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -50,9 +50,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): version("3.1.00", sha256="b935c9b780e7330bcb80809992caa2b66fd387e3a1c261c955d622dae857d878") version("3.0.00", sha256="c00613d0194a4fbd0726719bbed8b0404ed06275f310189b3493f5739042a92b") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("cxx", type="build") # Kokkos requires a C++ compiler depends_on("cmake@3.16:", type="build") conflicts("cmake@3.28", when="@:4.2.01 +cuda") From 327c75386a08e64a94a1ebcfc3583baeca2d6e2a Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Mon, 12 Aug 2024 15:08:33 +0200 Subject: [PATCH 294/435] mold: add 2.33.0 (#45680) --- var/spack/repos/builtin/packages/mold/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mold/package.py b/var/spack/repos/builtin/packages/mold/package.py index eae4005216816b..8a156d27d513b6 100644 --- a/var/spack/repos/builtin/packages/mold/package.py +++ b/var/spack/repos/builtin/packages/mold/package.py @@ -16,6 +16,7 @@ class Mold(CMakePackage): license("MIT") + version("2.33.0", sha256="37b3aacbd9b6accf581b92ba1a98ca418672ae330b78fe56ae542c2dcb10a155") version("2.32.1", sha256="f3c9a527d884c635834fe7d79b3de959b00783bf9446280ea274d996f0335825") version("2.32.0", sha256="4b7e4146ea0f52be9adae8b417399f3676a041e65b55e3f25f088120d30a320b") version("2.31.0", sha256="3dc3af83a5d22a4b29971bfad17261851d426961c665480e2ca294e5c74aa1e5") From 966a775a45a54f6d8331b5775ece748f04892ee4 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 12 Aug 2024 18:58:02 +0200 Subject: [PATCH 295/435] re2: fix cmake cxx std (#45694) --- var/spack/repos/builtin/packages/re2/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/re2/package.py b/var/spack/repos/builtin/packages/re2/package.py index ad569fa98c16ac..6ddf02a9b86788 100644 --- a/var/spack/repos/builtin/packages/re2/package.py +++ b/var/spack/repos/builtin/packages/re2/package.py @@ -42,6 +42,10 @@ def cmake_args(self): args = [ self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), - f"-DCMAKE_CXX_STANDARD={self.spec['abseil-cpp'].variants['cxxstd'].value}", ] + + abseil = self.spec.dependencies("abseil-cpp") + + if abseil: + args.append(self.define("CMAKE_CXX_STANDARD", abseil[0].variants["cxxstd"].value)) return args From 553b44473f0cb7d1210829099b9e0b968d6e354c Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 12 Aug 2024 13:38:00 -0500 Subject: [PATCH 296/435] aspell: add v0.60.8.1 (#45685) --- var/spack/repos/builtin/packages/aspell/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/aspell/package.py b/var/spack/repos/builtin/packages/aspell/package.py index affaa1c10260d9..84a90c9bdfa6cd 100644 --- a/var/spack/repos/builtin/packages/aspell/package.py +++ b/var/spack/repos/builtin/packages/aspell/package.py @@ -18,6 +18,7 @@ class Aspell(AutotoolsPackage, GNUMirrorPackage): license("LGPL-2.1-or-later") + version("0.60.8.1", sha256="d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b") version("0.60.8", sha256="f9b77e515334a751b2e60daab5db23499e26c9209f5e7b7443b05235ad0226f2") version("0.60.6.1", sha256="f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1") From 78810e95eddd9cd50bfa6c206283855377cfb45c Mon Sep 17 00:00:00 2001 From: dslarm <38504854+dslarm@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:21:40 +0100 Subject: [PATCH 297/435] acfl, armpl-gcc: use ubuntu-22.04 as target for Debian 12 (#45524) --- var/spack/repos/builtin/packages/acfl/package.py | 1 + var/spack/repos/builtin/packages/armpl-gcc/package.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/acfl/package.py b/var/spack/repos/builtin/packages/acfl/package.py index 42a750da51eaf1..ff920457e8fd2c 100644 --- a/var/spack/repos/builtin/packages/acfl/package.py +++ b/var/spack/repos/builtin/packages/acfl/package.py @@ -23,6 +23,7 @@ _os_map = { "ubuntu20.04": "Ubuntu-20.04", "ubuntu22.04": "Ubuntu-22.04", + "debian12": "Ubuntu-22.04", "sles15": "SLES-15", "centos7": "RHEL-7", "centos8": "RHEL-8", diff --git a/var/spack/repos/builtin/packages/armpl-gcc/package.py b/var/spack/repos/builtin/packages/armpl-gcc/package.py index d9629d786ffbef..5afe7013520bc8 100644 --- a/var/spack/repos/builtin/packages/armpl-gcc/package.py +++ b/var/spack/repos/builtin/packages/armpl-gcc/package.py @@ -24,6 +24,7 @@ _os_map_before_24 = { "ubuntu20.04": "Ubuntu-20.04", "ubuntu22.04": "Ubuntu-22.04", + "debian12": "Ubuntu-22.04", "sles15": "SLES-15", "centos7": "RHEL-7", "centos8": "RHEL-8", @@ -39,6 +40,7 @@ _os_pkg_map = { "ubuntu20.04": "deb", "ubuntu22.04": "deb", + "debian12": "deb", "sles15": "rpm", "centos7": "rpm", "centos8": "rpm", From 27557a133ba2ad5c1fd5c874006f264693b4716b Mon Sep 17 00:00:00 2001 From: "Nicole C." <48625123+nicolecheetham@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:50:51 -0400 Subject: [PATCH 298/435] debug: Update cmd and test for Windows (#45309) * debug: Update cmd and test for Windows * Add comment tar options not supported by Win tar --- lib/spack/spack/cmd/debug.py | 4 +++- lib/spack/spack/test/cmd/debug.py | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py index c4b5b427ad0de7..b1d33eb67df2a5 100644 --- a/lib/spack/spack/cmd/debug.py +++ b/lib/spack/spack/cmd/debug.py @@ -6,6 +6,7 @@ import os import platform import re +import sys from datetime import datetime from glob import glob @@ -62,9 +63,10 @@ def create_db_tarball(args): base = os.path.basename(str(spack.store.STORE.root)) transform_args = [] + # Currently --transform and -s are not supported by Windows native tar if "GNU" in tar("--version", output=str): transform_args = ["--transform", "s/^%s/%s/" % (base, tarball_name)] - else: + elif sys.platform != "win32": transform_args = ["-s", "/^%s/%s/" % (base, tarball_name)] wd = os.path.dirname(str(spack.store.STORE.root)) diff --git a/lib/spack/spack/test/cmd/debug.py b/lib/spack/spack/test/cmd/debug.py index 1d29f441681ae9..55d0928fbde53b 100644 --- a/lib/spack/spack/test/cmd/debug.py +++ b/lib/spack/spack/test/cmd/debug.py @@ -16,8 +16,6 @@ debug = SpackCommand("debug") -pytestmark = pytest.mark.not_on_windows("does not run on windows") - @pytest.mark.db def test_create_db_tarball(tmpdir, database): From 63e680e4f9fed6385ddf7867ac2c6d0c2112be17 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:58:09 -0700 Subject: [PATCH 299/435] c: new test API (#45469) * c: new test API * gcc: provides('c') * c: bugfix and simplification of the new stand-alone test method --------- Co-authored-by: Tamara Dahlgren --- etc/spack/defaults/packages.yaml | 1 + var/spack/repos/builtin/packages/c/package.py | 24 +++++++++---------- .../repos/builtin/packages/gcc/package.py | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 3056cbb5d53d80..2f6cf53defd8b3 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -20,6 +20,7 @@ packages: awk: [gawk] armci: [armcimpi] blas: [openblas, amdblis] + c: [gcc] cxx: [gcc] D: [ldc] daal: [intel-oneapi-daal] diff --git a/var/spack/repos/builtin/packages/c/package.py b/var/spack/repos/builtin/packages/c/package.py index d36fbd9ffe047c..5f1c33c80aa3b6 100644 --- a/var/spack/repos/builtin/packages/c/package.py +++ b/var/spack/repos/builtin/packages/c/package.py @@ -14,17 +14,17 @@ class C(Package): homepage = "http://open-std.org/JTC1/SC22/WG14/www/standards" virtual = True - def test(self): - test_source = self.test_suite.current_test_data_dir + def test_c(self): + """build and run C examples""" + cc = which(os.environ["CC"]) + expected = ["Hello world", "YES!"] + test_source = self.test_suite.current_test_data_dir for test in os.listdir(test_source): - filepath = test_source.join(test) - exe_name = "%s.exe" % test - - cc_exe = os.environ["CC"] - cc_opts = ["-o", exe_name, filepath] - compiled = self.run_test(cc_exe, options=cc_opts, installed=True) - - if compiled: - expected = ["Hello world", "YES!"] - self.run_test(exe_name, expected=expected) + exe_name = f"{test}.exe" + with test_part(self, f"test_c_{test}", f"build and run {exe_name}"): + filepath = join_path(test_source, test) + cc("-o", exe_name, filepath) + exe = which(exe_name) + out = exe(output=str.split, error=str.split) + check_outputs(expected, out) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index d57c57526d090b..d28209f04fbd3f 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -34,6 +34,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage): license("GPL-2.0-or-later AND LGPL-2.1-or-later") + provides("c") provides("cxx") provides("fortran") From 6f61e382da27e85295c8718769942b2764e60d70 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Tue, 13 Aug 2024 00:23:36 +0200 Subject: [PATCH 300/435] etsf-io: use pic flag when compiling (#45646) --- var/spack/repos/builtin/packages/etsf-io/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/etsf-io/package.py b/var/spack/repos/builtin/packages/etsf-io/package.py index 6cd2476ec34d68..91df214f7d0815 100644 --- a/var/spack/repos/builtin/packages/etsf-io/package.py +++ b/var/spack/repos/builtin/packages/etsf-io/package.py @@ -32,6 +32,13 @@ class EtsfIo(Package): patch("tests_module.patch") patch("tests_init.patch") + def flag_handler(self, name, flags): + if name == "fflags": + flags.append(self.compiler.f77_pic_flag) + elif name == "fcflags": + flags.append(self.compiler.fc_pic_flag) + return flags, None, None + def install(self, spec, prefix): options = ["--prefix=%s" % prefix] oapp = options.append From d367f14d5e8440a927bcd4f1d6b8a2e3a9ac7482 Mon Sep 17 00:00:00 2001 From: Brian Spilner Date: Tue, 13 Aug 2024 00:24:06 +0200 Subject: [PATCH 301/435] add cdo-2.4.1 and cdo-2.4.2 (#45686) --- var/spack/repos/builtin/packages/cdo/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py index 2d617d33f8164d..12b5a08f1bc3a9 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -20,6 +20,16 @@ class Cdo(AutotoolsPackage): maintainers("skosukhin", "Try2Code") + version( + "2.4.2", + sha256="4df1fe2b8f92f54c27eb9f399edfab40d9322005a6732ca1524ef5c1627ac4e7", + url="https://code.mpimet.mpg.de/attachments/download/29481/cdo-2.4.2.tar.gz", + ) + version( + "2.4.1", + sha256="9144d82b8ab7e73f4cb7a94cc4b884f64dff1a0455c4eb6c93ce4b568007aabf", + url="https://code.mpimet.mpg.de/attachments/download/29421/cdo-2.4.1.tar.gz", + ) version( "2.4.0", sha256="a4790fb8cc07f353b11f9bbe49218b8e4be8e5ae56aade8420bad390510b4d2c", From e09955d83b4ff389bf4d495e8ab56616c1998eb7 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Mon, 12 Aug 2024 18:54:48 -0400 Subject: [PATCH 302/435] mepo: Add 2.0.0 (#45691) --- var/spack/repos/builtin/packages/mepo/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mepo/package.py b/var/spack/repos/builtin/packages/mepo/package.py index 6d124d2121f90e..ac2dd71ab4998b 100644 --- a/var/spack/repos/builtin/packages/mepo/package.py +++ b/var/spack/repos/builtin/packages/mepo/package.py @@ -11,12 +11,13 @@ class Mepo(PythonPackage): homepage = "https://github.com/GEOS-ESM/mepo" git = "https://github.com/GEOS-ESM/mepo.git" - pypi = "mepo/mepo-2.0.0rc4.tar.gz" + pypi = "mepo/mepo-2.0.0.tar.gz" maintainers("pchakraborty", "mathomp4") license("Apache-2.0", checked_by="mathomp4") + version("2.0.0", sha256="8ca4aabd8ca350183db3b8e117b0cd87d9a20277e39931e2799c86bfa910ae71") version("2.0.0rc4", sha256="5f6113be565c561c08114355570a259042b25222a9e8e1dc6e6e44448381cd36") version("2.0.0rc3", sha256="c0c897a33f5018489e6cc14892961831c8922a3378ac30436496c52bf877aff7") From fe19394bf9bcd3af3fd056ea66e6f130a670260c Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:56:51 -0700 Subject: [PATCH 303/435] py-amrex: old to new test API (#45183) * py-amrex: test name change --- var/spack/repos/builtin/packages/py-amrex/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-amrex/package.py b/var/spack/repos/builtin/packages/py-amrex/package.py index b5dfe578e26d7e..aa3e6d87c55523 100644 --- a/var/spack/repos/builtin/packages/py-amrex/package.py +++ b/var/spack/repos/builtin/packages/py-amrex/package.py @@ -115,7 +115,11 @@ def copy_test_sources(self): install test subdirectory for use during `spack test run`.""" cache_extra_test_sources(self, [self.tests_src_dir]) - def test(self): + def test_pytest(self): """Perform smoke tests on the installed package.""" - pytest = which("pytest") - pytest(join_path(install_test_root(self), self.tests_src_dir)) + test_dir = join_path(self.test_suite.current_test_cache_dir, self.tests_src_dir) + with working_dir(test_dir): + pytest = which("pytest") + # TODO: Remove once test dependencies made available + assert pytest is not None, "Make sure a suitable 'pytest' is in your path" + pytest() From 063b987cebdcd1d8aea5f0f671c37087276c1cf0 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 13 Aug 2024 03:23:14 +0200 Subject: [PATCH 304/435] remove config:concretizer:clingo (#45684) --- share/spack/gitlab/cloud_pipelines/configs/config.yaml | 1 - share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml | 1 - share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml | 1 - 3 files changed, 3 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/configs/config.yaml b/share/spack/gitlab/cloud_pipelines/configs/config.yaml index 9ed4118e3ef0a0..fef23ade4bf903 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/config.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/config.yaml @@ -1,5 +1,4 @@ config: - concretizer: clingo db_lock_timeout: 120 install_tree: root: /home/software/spack diff --git a/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml b/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml index 6cf3846bdd5a51..893ff7e11ae690 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml @@ -1,5 +1,4 @@ config: - concretizer: clingo db_lock_timeout: 120 install_tree: root: $spack/opt/spack diff --git a/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml index 017c3d9c70fdef..a97606302dcb11 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml @@ -7,7 +7,6 @@ spack: reuse: false unify: false config: - concretizer: clingo db_lock_timeout: 120 install_tree: padded_length: 256 From 6b73f00310db34c054878c51d8ccf5092bc2e607 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Mon, 12 Aug 2024 18:29:25 -0700 Subject: [PATCH 305/435] migraphx: Old to new test API (#44988) * migraphx: Old to new test API * migraphx: tweak name and docstring to be more descriptive --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- var/spack/repos/builtin/packages/migraphx/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index cc18ab89e523ca..03a266d1e8073d 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -136,10 +136,10 @@ def cmake_args(self): ) return args - def test(self): + def test_unit_tests(self): + """Run installed UnitTests""" if self.spec.satisfies("@:5.5.0"): - print("Skipping: stand-alone tests") - return - test_dir = join_path(self.spec["migraphx"].prefix, "bin") - with working_dir(test_dir, create=True): - self.run_test("UnitTests") + raise SkipTest("Package must be installed as version @5.5.1 or later") + unit_tests = which(self.prefix.bin.UnitTests) + assert unit_tests is not None, "UnitTests is not installed!" + unit_tests() From a66586d749197841bd74e289802126f2359287a8 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 13 Aug 2024 08:12:48 +0200 Subject: [PATCH 306/435] spack buildcache push: best effort (#45631) "spack buildcache push" for partially installed environments pushes all it can by default, and only dumps errors towards the end. If --fail-fast is provided, error out before pushing anything if any of the packages is uninstalled oci build caches using parallel push now use futures to ensure pushing goes in best-effort style. --- lib/spack/docs/conf.py | 1 + lib/spack/spack/binary_distribution.py | 56 +--- lib/spack/spack/cmd/buildcache.py | 278 ++++++++++++------- lib/spack/spack/test/cmd/buildcache.py | 53 ++++ lib/spack/spack/test/conftest.py | 7 +- lib/spack/spack/test/oci/integration_test.py | 75 ++++- lib/spack/spack/util/parallel.py | 24 ++ share/spack/spack-completion.bash | 4 +- share/spack/spack-completion.fish | 12 +- 9 files changed, 335 insertions(+), 175 deletions(-) diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index e0542640a2dec5..9819d6f4d3039f 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -206,6 +206,7 @@ def setup(sphinx): ("py:class", "six.moves.urllib.parse.ParseResult"), ("py:class", "TextIO"), ("py:class", "hashlib._Hash"), + ("py:class", "concurrent.futures._base.Executor"), # Spack classes that are private and we don't want to expose ("py:class", "spack.provider_index._IndexBase"), ("py:class", "spack.repo._PrependFileLoader"), diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 6108e695487cd1..26b6396f26464b 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -22,7 +22,7 @@ import urllib.request import warnings from contextlib import closing -from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple +from typing import Dict, Iterable, NamedTuple, Optional, Set, Tuple import llnl.util.filesystem as fsys import llnl.util.lang @@ -46,7 +46,6 @@ import spack.repo import spack.stage import spack.store -import spack.traverse as traverse import spack.util.archive import spack.util.crypto import spack.util.file_cache as file_cache @@ -1201,59 +1200,6 @@ def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, option generate_package_index(url_util.join(out_url, os.path.relpath(cache_prefix, stage_dir))) -class NotInstalledError(spack.error.SpackError): - """Raised when a spec is not installed but picked to be packaged.""" - - def __init__(self, specs: List[Spec]): - super().__init__( - "Cannot push non-installed packages", - ", ".join(s.cformat("{name}{@version}{/hash:7}") for s in specs), - ) - - -def specs_to_be_packaged( - specs: List[Spec], root: bool = True, dependencies: bool = True -) -> List[Spec]: - """Return the list of nodes to be packaged, given a list of specs. - Raises NotInstalledError if a spec is not installed but picked to be packaged. - - Args: - specs: list of root specs to be processed - root: include the root of each spec in the nodes - dependencies: include the dependencies of each - spec in the nodes - """ - - if not root and not dependencies: - return [] - - # Filter packageable roots - with spack.store.STORE.db.read_transaction(): - if root: - # Error on uninstalled roots, when roots are requested - uninstalled_roots = list(s for s in specs if not s.installed) - if uninstalled_roots: - raise NotInstalledError(uninstalled_roots) - roots = specs - else: - roots = [] - - if dependencies: - # Error on uninstalled deps, when deps are requested - deps = list( - traverse.traverse_nodes( - specs, deptype="all", order="breadth", root=False, key=traverse.by_dag_hash - ) - ) - uninstalled_deps = list(s for s in deps if not s.installed) - if uninstalled_deps: - raise NotInstalledError(uninstalled_deps) - else: - deps = [] - - return [s for s in itertools.chain(roots, deps) if not s.external] - - def try_verify(specfile_path): """Utility function to attempt to verify a local file. Assumes the file is a clearsigned signature file. diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index a2dace6003e8a0..78d8e7a00cec99 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -3,25 +3,25 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import argparse +import concurrent.futures import copy import glob import hashlib import json -import multiprocessing -import multiprocessing.pool import os import shutil import sys import tempfile -from typing import Dict, List, Optional, Tuple, Union +from typing import Dict, List, Optional, Tuple import llnl.util.tty as tty from llnl.string import plural -from llnl.util.lang import elide_list +from llnl.util.lang import elide_list, stable_partition import spack.binary_distribution as bindist import spack.cmd import spack.config +import spack.deptypes as dt import spack.environment as ev import spack.error import spack.hash_types as ht @@ -35,10 +35,10 @@ import spack.store import spack.user_environment import spack.util.crypto +import spack.util.parallel import spack.util.url as url_util import spack.util.web as web_util from spack import traverse -from spack.build_environment import determine_number_of_jobs from spack.cmd import display_specs from spack.cmd.common import arguments from spack.oci.image import ( @@ -112,6 +112,17 @@ def setup_parser(subparser: argparse.ArgumentParser): "Alternatively, one can decide to build a cache for only the package or only the " "dependencies", ) + with_or_without_build_deps = push.add_mutually_exclusive_group() + with_or_without_build_deps.add_argument( + "--with-build-dependencies", + action="store_true", + help="include build dependencies in the buildcache", + ) + with_or_without_build_deps.add_argument( + "--without-build-dependencies", + action="store_true", + help="exclude build dependencies from the buildcache", + ) push.add_argument( "--fail-fast", action="store_true", @@ -336,32 +347,6 @@ def _progress(i: int, total: int): return "" -class NoPool: - def map(self, func, args): - return [func(a) for a in args] - - def starmap(self, func, args): - return [func(*a) for a in args] - - def __enter__(self): - return self - - def __exit__(self, *args): - pass - - -MaybePool = Union[multiprocessing.pool.Pool, NoPool] - - -def _make_pool() -> MaybePool: - """Can't use threading because it's unsafe, and can't use spawned processes because of globals. - That leaves only forking""" - if multiprocessing.get_start_method() == "fork": - return multiprocessing.pool.Pool(determine_number_of_jobs(parallel=True)) - else: - return NoPool() - - def _skip_no_redistribute_for_public(specs): remaining_specs = list() removed_specs = list() @@ -381,6 +366,47 @@ def _skip_no_redistribute_for_public(specs): return remaining_specs +class PackagesAreNotInstalledError(spack.error.SpackError): + """Raised when a list of specs is not installed but picked to be packaged.""" + + def __init__(self, specs: List[Spec]): + super().__init__( + "Cannot push non-installed packages", + ", ".join(elide_list(list(_format_spec(s) for s in specs), 5)), + ) + + +class PackageNotInstalledError(spack.error.SpackError): + """Raised when a spec is not installed but picked to be packaged.""" + + +class MissingLayerError(spack.error.SpackError): + """Raised when a required layer for a dependency is missing in an OCI registry.""" + + +def _specs_to_be_packaged( + requested: List[Spec], things_to_install: str, build_deps: bool +) -> List[Spec]: + """Collect all non-external with or without roots and dependencies""" + if "dependencies" not in things_to_install: + deptype = dt.NONE + elif build_deps: + deptype = dt.ALL + else: + deptype = dt.RUN | dt.LINK | dt.TEST + return [ + s + for s in traverse.traverse_nodes( + requested, + root="package" in things_to_install, + deptype=deptype, + order="breadth", + key=traverse.by_dag_hash, + ) + if not s.external + ] + + def push_fn(args): """create a binary package and push it to a mirror""" if args.spec_file: @@ -420,40 +446,52 @@ def push_fn(args): "Use --unsigned to silence this warning." ) - # This is a list of installed, non-external specs. - specs = bindist.specs_to_be_packaged( + specs = _specs_to_be_packaged( roots, - root="package" in args.things_to_install, - dependencies="dependencies" in args.things_to_install, + things_to_install=args.things_to_install, + build_deps=args.with_build_dependencies or not args.without_build_dependencies, ) + if not args.private: specs = _skip_no_redistribute_for_public(specs) - # When pushing multiple specs, print the url once ahead of time, as well as how - # many specs are being pushed. if len(specs) > 1: tty.info(f"Selected {len(specs)} specs to push to {push_url}") - failed = [] + # Pushing not installed specs is an error. Either fail fast or populate the error list and + # push installed package in best effort mode. + failed: List[Tuple[Spec, BaseException]] = [] + with spack.store.STORE.db.read_transaction(): + if any(not s.installed for s in specs): + specs, not_installed = stable_partition(specs, lambda s: s.installed) + if args.fail_fast: + raise PackagesAreNotInstalledError(not_installed) + else: + failed.extend( + (s, PackageNotInstalledError("package not installed")) for s in not_installed + ) - # TODO: unify this logic in the future. + # TODO: move into bindist.push_or_raise if target_image: base_image = ImageReference.from_string(args.base_image) if args.base_image else None with tempfile.TemporaryDirectory( dir=spack.stage.get_stage_root() - ) as tmpdir, _make_pool() as pool: - skipped, base_images, checksums = _push_oci( + ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: + skipped, base_images, checksums, upload_errors = _push_oci( target_image=target_image, base_image=base_image, installed_specs_with_deps=specs, force=args.force, tmpdir=tmpdir, - pool=pool, + executor=executor, ) + if upload_errors: + failed.extend(upload_errors) + # Apart from creating manifests for each individual spec, we allow users to create a # separate image tag for all root specs and their runtime dependencies. - if args.tag: + elif args.tag: tagged_image = target_image.with_tag(args.tag) # _push_oci may not populate base_images if binaries were already in the registry for spec in roots: @@ -496,7 +534,7 @@ def push_fn(args): e, (bindist.PickKeyException, bindist.NoKeyException) ): raise - failed.append((_format_spec(spec), e)) + failed.append((spec, e)) if skipped: if len(specs) == 1: @@ -519,7 +557,13 @@ def push_fn(args): raise spack.error.SpackError( f"The following {len(failed)} errors occurred while pushing specs to the buildcache", "\n".join( - elide_list([f" {spec}: {e.__class__.__name__}: {e}" for spec, e in failed], 5) + elide_list( + [ + f" {_format_spec(spec)}: {e.__class__.__name__}: {e}" + for spec, e in failed + ], + 5, + ) ), ) @@ -529,8 +573,8 @@ def push_fn(args): if target_image and len(skipped) < len(specs) and args.update_index: with tempfile.TemporaryDirectory( dir=spack.stage.get_stage_root() - ) as tmpdir, _make_pool() as pool: - _update_index_oci(target_image, tmpdir, pool) + ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: + _update_index_oci(target_image, tmpdir, executor) def _get_spack_binary_blob(image_ref: ImageReference) -> Optional[spack.oci.oci.Blob]: @@ -604,17 +648,12 @@ def _put_manifest( ): architecture = _archspec_to_gooarch(specs[0]) - dependencies = list( - reversed( - list( - s - for s in traverse.traverse_nodes( - specs, order="topo", deptype=("link", "run"), root=True - ) - if not s.external - ) - ) - ) + expected_blobs: List[Spec] = [ + s + for s in traverse.traverse_nodes(specs, order="topo", deptype=("link", "run"), root=True) + if not s.external + ] + expected_blobs.reverse() base_manifest, base_config = base_images[architecture] env = _retrieve_env_dict_from_config(base_config) @@ -633,9 +672,16 @@ def _put_manifest( # Create an oci.image.config file config = copy.deepcopy(base_config) - # Add the diff ids of the dependencies - for s in dependencies: - config["rootfs"]["diff_ids"].append(str(checksums[s.dag_hash()].uncompressed_digest)) + # Add the diff ids of the blobs + for s in expected_blobs: + # If a layer for a dependency has gone missing (due to removed manifest in the registry, a + # failed push, or a local forced uninstall), we cannot create a runnable container image. + # If an OCI registry is only used for storage, this is not a hard error, but for now we + # raise an exception unconditionally, until someone requests a more lenient behavior. + checksum = checksums.get(s.dag_hash()) + if not checksum: + raise MissingLayerError(f"missing layer for {_format_spec(s)}") + config["rootfs"]["diff_ids"].append(str(checksum.uncompressed_digest)) # Set the environment variables config["config"]["Env"] = [f"{k}={v}" for k, v in env.items()] @@ -679,7 +725,7 @@ def _put_manifest( "digest": str(checksums[s.dag_hash()].compressed_digest), "size": checksums[s.dag_hash()].size, } - for s in dependencies + for s in expected_blobs ), ], } @@ -724,9 +770,14 @@ def _push_oci( base_image: Optional[ImageReference], installed_specs_with_deps: List[Spec], tmpdir: str, - pool: MaybePool, + executor: concurrent.futures.Executor, force: bool = False, -) -> Tuple[List[str], Dict[str, Tuple[dict, dict]], Dict[str, spack.oci.oci.Blob]]: +) -> Tuple[ + List[str], + Dict[str, Tuple[dict, dict]], + Dict[str, spack.oci.oci.Blob], + List[Tuple[Spec, BaseException]], +]: """Push specs to an OCI registry Args: @@ -739,7 +790,8 @@ def _push_oci( Returns: A tuple consisting of the list of skipped specs already in the build cache, a dictionary mapping architectures to base image manifests and configs, - and a dictionary mapping each spec's dag hash to a blob. + a dictionary mapping each spec's dag hash to a blob, + and a list of tuples of specs with errors of failed uploads. """ # Reverse the order @@ -756,39 +808,50 @@ def _push_oci( if not force: tty.info("Checking for existing specs in the buildcache") - to_be_uploaded = [] + blobs_to_upload = [] tags_to_check = (target_image.with_tag(default_tag(s)) for s in installed_specs_with_deps) - available_blobs = pool.map(_get_spack_binary_blob, tags_to_check) + available_blobs = executor.map(_get_spack_binary_blob, tags_to_check) for spec, maybe_blob in zip(installed_specs_with_deps, available_blobs): if maybe_blob is not None: checksums[spec.dag_hash()] = maybe_blob skipped.append(_format_spec(spec)) else: - to_be_uploaded.append(spec) + blobs_to_upload.append(spec) else: - to_be_uploaded = installed_specs_with_deps + blobs_to_upload = installed_specs_with_deps - if not to_be_uploaded: - return skipped, base_images, checksums + if not blobs_to_upload: + return skipped, base_images, checksums, [] tty.info( - f"{len(to_be_uploaded)} specs need to be pushed to " + f"{len(blobs_to_upload)} specs need to be pushed to " f"{target_image.domain}/{target_image.name}" ) # Upload blobs - new_blobs = pool.starmap( - _push_single_spack_binary_blob, ((target_image, spec, tmpdir) for spec in to_be_uploaded) - ) - - # And update the spec to blob mapping - for spec, blob in zip(to_be_uploaded, new_blobs): - checksums[spec.dag_hash()] = blob + blob_futures = [ + executor.submit(_push_single_spack_binary_blob, target_image, spec, tmpdir) + for spec in blobs_to_upload + ] + + concurrent.futures.wait(blob_futures) + + manifests_to_upload: List[Spec] = [] + errors: List[Tuple[Spec, BaseException]] = [] + + # And update the spec to blob mapping for successful uploads + for spec, blob_future in zip(blobs_to_upload, blob_futures): + error = blob_future.exception() + if error is None: + manifests_to_upload.append(spec) + checksums[spec.dag_hash()] = blob_future.result() + else: + errors.append((spec, error)) # Copy base images if necessary - for spec in to_be_uploaded: + for spec in manifests_to_upload: _update_base_images( base_image=base_image, target_image=target_image, @@ -807,30 +870,35 @@ def extra_config(spec: Spec): # Upload manifests tty.info("Uploading manifests") - pool.starmap( - _put_manifest, - ( - ( - base_images, - checksums, - target_image.with_tag(default_tag(spec)), - tmpdir, - extra_config(spec), - {"org.opencontainers.image.description": spec.format()}, - spec, - ) - for spec in to_be_uploaded - ), - ) + manifest_futures = [ + executor.submit( + _put_manifest, + base_images, + checksums, + target_image.with_tag(default_tag(spec)), + tmpdir, + extra_config(spec), + {"org.opencontainers.image.description": spec.format()}, + spec, + ) + for spec in manifests_to_upload + ] + + concurrent.futures.wait(manifest_futures) # Print the image names of the top-level specs - for spec in to_be_uploaded: - tty.info(f"Pushed {_format_spec(spec)} to {target_image.with_tag(default_tag(spec))}") + for spec, manifest_future in zip(manifests_to_upload, manifest_futures): + error = manifest_future.exception() + if error is None: + tty.info(f"Pushed {_format_spec(spec)} to {target_image.with_tag(default_tag(spec))}") + else: + errors.append((spec, error)) - return skipped, base_images, checksums + return skipped, base_images, checksums, errors -def _config_from_tag(image_ref: ImageReference, tag: str) -> Optional[dict]: +def _config_from_tag(image_ref_and_tag: Tuple[ImageReference, str]) -> Optional[dict]: + image_ref, tag = image_ref_and_tag # Don't allow recursion here, since Spack itself always uploads # vnd.oci.image.manifest.v1+json, not vnd.oci.image.index.v1+json _, config = get_manifest_and_config_with_retry(image_ref.with_tag(tag), tag, recurse=0) @@ -840,13 +908,13 @@ def _config_from_tag(image_ref: ImageReference, tag: str) -> Optional[dict]: return config if "spec" in config else None -def _update_index_oci(image_ref: ImageReference, tmpdir: str, pool: MaybePool) -> None: +def _update_index_oci( + image_ref: ImageReference, tmpdir: str, pool: concurrent.futures.Executor +) -> None: tags = list_tags(image_ref) # Fetch all image config files in parallel - spec_dicts = pool.starmap( - _config_from_tag, ((image_ref, tag) for tag in tags if tag_is_spec(tag)) - ) + spec_dicts = pool.map(_config_from_tag, ((image_ref, tag) for tag in tags if tag_is_spec(tag))) # Populate the database db_root_dir = os.path.join(tmpdir, "db_root") @@ -1182,8 +1250,8 @@ def update_index(mirror: spack.mirror.Mirror, update_keys=False): if image_ref: with tempfile.TemporaryDirectory( dir=spack.stage.get_stage_root() - ) as tmpdir, _make_pool() as pool: - _update_index_oci(image_ref, tmpdir, pool) + ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: + _update_index_oci(image_ref, tmpdir, executor) return # Otherwise, assume a normal mirror. diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index b634e371165dc3..eee8c160f1fb25 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -12,7 +12,9 @@ import spack.binary_distribution import spack.cmd.buildcache +import spack.deptypes import spack.environment as ev +import spack.error import spack.main import spack.spec import spack.util.url @@ -443,3 +445,54 @@ def test_skip_no_redistribute(mock_packages, config): filtered = spack.cmd.buildcache._skip_no_redistribute_for_public(specs) assert not any(s.name == "no-redistribute" for s in filtered) assert any(s.name == "no-redistribute-dependent" for s in filtered) + + +def test_best_effort_vs_fail_fast_when_dep_not_installed(tmp_path, mutable_database): + """When --fail-fast is passed, the push command should fail if it immediately finds an + uninstalled dependency. Otherwise, failure to push one dependency shouldn't prevent the + others from being pushed.""" + + mirror("add", "--unsigned", "my-mirror", str(tmp_path)) + + # Uninstall mpich so that its dependent mpileaks can't be pushed + for s in mutable_database.query_local("mpich"): + s.package.do_uninstall(force=True) + + with pytest.raises(spack.cmd.buildcache.PackagesAreNotInstalledError, match="mpich"): + buildcache("push", "--update-index", "--fail-fast", "my-mirror", "mpileaks^mpich") + + # nothing should be pushed due to --fail-fast. + assert not os.listdir(tmp_path) + assert not spack.binary_distribution.update_cache_and_get_specs() + + with pytest.raises(spack.cmd.buildcache.PackageNotInstalledError): + buildcache("push", "--update-index", "my-mirror", "mpileaks^mpich") + + specs = spack.binary_distribution.update_cache_and_get_specs() + + # everything but mpich should be pushed + mpileaks = mutable_database.query_local("mpileaks^mpich")[0] + assert set(specs) == {s for s in mpileaks.traverse() if s.name != "mpich"} + + +def test_push_without_build_deps(tmp_path, temporary_store, mock_packages, mutable_config): + """Spack should not error when build deps are uninstalled and --without-build-dependenies is + passed.""" + + mirror("add", "--unsigned", "my-mirror", str(tmp_path)) + + s = spack.spec.Spec("dtrun3").concretized() + s.package.do_install(fake=True) + s["dtbuild3"].package.do_uninstall() + + # fails when build deps are required + with pytest.raises(spack.error.SpackError, match="package not installed"): + buildcache( + "push", "--update-index", "--with-build-dependencies", "my-mirror", f"/{s.dag_hash()}" + ) + + # succeeds when build deps are not required + buildcache( + "push", "--update-index", "--without-build-dependencies", "my-mirror", f"/{s.dag_hash()}" + ) + assert spack.binary_distribution.update_cache_and_get_specs() == [s] diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 00d7980a551dee..8a1f887fbec936 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -56,6 +56,7 @@ import spack.util.executable import spack.util.git import spack.util.gpg +import spack.util.parallel import spack.util.spack_yaml as syaml import spack.util.url as url_util import spack.version @@ -1961,10 +1962,12 @@ def pytest_runtest_setup(item): pytest.skip(*not_on_windows_marker.args) -@pytest.fixture(scope="function") +@pytest.fixture(autouse=True) def disable_parallel_buildcache_push(monkeypatch): """Disable process pools in tests.""" - monkeypatch.setattr(spack.cmd.buildcache, "_make_pool", spack.cmd.buildcache.NoPool) + monkeypatch.setattr( + spack.util.parallel, "make_concurrent_executor", spack.util.parallel.SequentialExecutor + ) def _root_path(x, y, *, path): diff --git a/lib/spack/spack/test/oci/integration_test.py b/lib/spack/spack/test/oci/integration_test.py index c4e2636619474b..cefd95f92db9f8 100644 --- a/lib/spack/spack/test/oci/integration_test.py +++ b/lib/spack/spack/test/oci/integration_test.py @@ -10,12 +10,19 @@ import json import os import pathlib +import re from contextlib import contextmanager +import pytest + +import spack.cmd.buildcache +import spack.database import spack.environment as ev +import spack.error import spack.oci.opener +import spack.spec from spack.main import SpackCommand -from spack.oci.image import Digest, ImageReference, default_config, default_manifest +from spack.oci.image import Digest, ImageReference, default_config, default_manifest, default_tag from spack.oci.oci import blob_exists, get_manifest_and_config, upload_blob, upload_manifest from spack.test.oci.mock_registry import DummyServer, InMemoryOCIRegistry, create_opener from spack.util.archive import gzip_compressed_tarfile @@ -34,7 +41,7 @@ def oci_servers(*servers: DummyServer): spack.oci.opener.urlopen = old_opener -def test_buildcache_push_command(mutable_database, disable_parallel_buildcache_push): +def test_buildcache_push_command(mutable_database): with oci_servers(InMemoryOCIRegistry("example.com")): mirror("add", "oci-test", "oci://example.com/image") @@ -57,9 +64,7 @@ def test_buildcache_push_command(mutable_database, disable_parallel_buildcache_p assert os.path.exists(os.path.join(spec.prefix, "bin", "mpileaks")) -def test_buildcache_tag( - install_mockery, mock_fetch, mutable_mock_env_path, disable_parallel_buildcache_push -): +def test_buildcache_tag(install_mockery, mock_fetch, mutable_mock_env_path): """Tests whether we can create an OCI image from a full environment with multiple roots.""" env("create", "test") with ev.read("test"): @@ -97,9 +102,7 @@ def test_buildcache_tag( assert len(manifest["layers"]) == 1 -def test_buildcache_push_with_base_image_command( - mutable_database, tmpdir, disable_parallel_buildcache_push -): +def test_buildcache_push_with_base_image_command(mutable_database, tmpdir): """Test that we can push a package with a base image to an OCI registry. This test is a bit involved, cause we have to create a small base image.""" @@ -200,7 +203,7 @@ def test_buildcache_push_with_base_image_command( def test_uploading_with_base_image_in_docker_image_manifest_v2_format( - tmp_path: pathlib.Path, mutable_database, disable_parallel_buildcache_push + tmp_path: pathlib.Path, mutable_database ): """If the base image uses an old manifest schema, Spack should also use that. That is necessary for container images to work with Apptainer, which is rather strict about @@ -286,3 +289,57 @@ def test_uploading_with_base_image_in_docker_image_manifest_v2_format( for layer in m["layers"]: assert layer["mediaType"] == "application/vnd.docker.image.rootfs.diff.tar.gzip" assert "annotations" not in m + + +def test_best_effort_upload(mutable_database: spack.database.Database, monkeypatch): + """Failure to upload a blob or manifest should not prevent others from being uploaded""" + + _push_blob = spack.cmd.buildcache._push_single_spack_binary_blob + _push_manifest = spack.cmd.buildcache._put_manifest + + def push_blob(image_ref, spec, tmpdir): + # fail to upload the blob of mpich + if spec.name == "mpich": + raise Exception("Blob Server Error") + return _push_blob(image_ref, spec, tmpdir) + + def put_manifest(base_images, checksums, image_ref, tmpdir, extra_config, annotations, *specs): + # fail to upload the manifest of libdwarf + if "libdwarf" in (s.name for s in specs): + raise Exception("Manifest Server Error") + return _push_manifest( + base_images, checksums, image_ref, tmpdir, extra_config, annotations, *specs + ) + + monkeypatch.setattr(spack.cmd.buildcache, "_push_single_spack_binary_blob", push_blob) + monkeypatch.setattr(spack.cmd.buildcache, "_put_manifest", put_manifest) + + registry = InMemoryOCIRegistry("example.com") + with oci_servers(registry): + mirror("add", "oci-test", "oci://example.com/image") + + with pytest.raises(spack.error.SpackError, match="The following 4 errors occurred") as e: + buildcache("push", "--update-index", "oci-test", "mpileaks^mpich") + + error = str(e.value) + + # mpich's blob failed to upload + assert re.search("mpich.+: Exception: Blob Server Error", error) + + # libdwarf's manifest failed to upload + assert re.search("libdwarf.+: Exception: Manifest Server Error", error) + + # since there is no blob for mpich, runtime dependents cannot refer to it in their + # manifests, which is a transitive error. + assert re.search("callpath.+: MissingLayerError: missing layer for mpich", error) + assert re.search("mpileaks.+: MissingLayerError: missing layer for mpich", error) + + mpileaks: spack.spec.Spec = mutable_database.query_local("mpileaks^mpich")[0] + + # ensure that packages not affected by errors were uploaded still. + uploaded_tags = {tag for _, tag in registry.manifests.keys()} + failures = {"mpich", "libdwarf", "callpath", "mpileaks"} + expected_tags = {default_tag(s) for s in mpileaks.traverse() if s.name not in failures} + + assert expected_tags + assert uploaded_tags == expected_tags diff --git a/lib/spack/spack/util/parallel.py b/lib/spack/spack/util/parallel.py index 9c0ff1ab8e75ea..28c55b7d1e5ee2 100644 --- a/lib/spack/spack/util/parallel.py +++ b/lib/spack/spack/util/parallel.py @@ -2,12 +2,15 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import concurrent.futures import multiprocessing import os import sys import traceback from typing import Optional +from spack.util.cpus import determine_number_of_jobs + class ErrorFromWorker: """Wrapper class to report an error from a worker process""" @@ -80,3 +83,24 @@ def imap_unordered( if isinstance(result, ErrorFromWorker): raise RuntimeError(result.stacktrace if debug else str(result)) yield result + + +class SequentialExecutor(concurrent.futures.Executor): + """Executor that runs tasks sequentially in the current thread.""" + + def submit(self, fn, *args, **kwargs): + """Submit a function to be executed.""" + future = concurrent.futures.Future() + try: + future.set_result(fn(*args, **kwargs)) + except Exception as e: + future.set_exception(e) + return future + + +def make_concurrent_executor() -> concurrent.futures.Executor: + """Can't use threading because it's unsafe, and can't use spawned processes because of globals. + That leaves only forking.""" + if multiprocessing.get_start_method() == "fork": + return concurrent.futures.ProcessPoolExecutor(determine_number_of_jobs(parallel=True)) + return SequentialExecutor() diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 7a33021f4c4522..0e946f3f1889fc 100644 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -571,7 +571,7 @@ _spack_buildcache() { _spack_buildcache_push() { if $list_options then - SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t --private -j --jobs" + SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --with-build-dependencies --without-build-dependencies --fail-fast --base-image --tag -t --private -j --jobs" else _mirrors fi @@ -580,7 +580,7 @@ _spack_buildcache_push() { _spack_buildcache_create() { if $list_options then - SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t --private -j --jobs" + SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --with-build-dependencies --without-build-dependencies --fail-fast --base-image --tag -t --private -j --jobs" else _mirrors fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index a2ffebda7ca80c..6ec431feca8004 100644 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -699,7 +699,7 @@ complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -f -a complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -d 'show this help message and exit' # spack buildcache push -set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= private j/jobs= +set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force u/unsigned signed k/key= update-index spec-file= only= with-build-dependencies without-build-dependencies fail-fast base-image= t/tag= private j/jobs= complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache push' -f -k -a '(__fish_spack_specs)' complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -d 'show this help message and exit' @@ -717,6 +717,10 @@ complete -c spack -n '__fish_spack_using_command buildcache push' -l spec-file - complete -c spack -n '__fish_spack_using_command buildcache push' -l spec-file -r -d 'create buildcache entry for spec from json or yaml file' complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -f -a 'package dependencies' complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies' +complete -c spack -n '__fish_spack_using_command buildcache push' -l with-build-dependencies -f -a with_build_dependencies +complete -c spack -n '__fish_spack_using_command buildcache push' -l with-build-dependencies -d 'include build dependencies in the buildcache' +complete -c spack -n '__fish_spack_using_command buildcache push' -l without-build-dependencies -f -a without_build_dependencies +complete -c spack -n '__fish_spack_using_command buildcache push' -l without-build-dependencies -d 'exclude build dependencies from the buildcache' complete -c spack -n '__fish_spack_using_command buildcache push' -l fail-fast -f -a fail_fast complete -c spack -n '__fish_spack_using_command buildcache push' -l fail-fast -d 'stop pushing on first failure (default is best effort)' complete -c spack -n '__fish_spack_using_command buildcache push' -l base-image -r -f -a base_image @@ -729,7 +733,7 @@ complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs - complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack buildcache create -set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= private j/jobs= +set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force u/unsigned signed k/key= update-index spec-file= only= with-build-dependencies without-build-dependencies fail-fast base-image= t/tag= private j/jobs= complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache create' -f -k -a '(__fish_spack_specs)' complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -d 'show this help message and exit' @@ -747,6 +751,10 @@ complete -c spack -n '__fish_spack_using_command buildcache create' -l spec-file complete -c spack -n '__fish_spack_using_command buildcache create' -l spec-file -r -d 'create buildcache entry for spec from json or yaml file' complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r -f -a 'package dependencies' complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies' +complete -c spack -n '__fish_spack_using_command buildcache create' -l with-build-dependencies -f -a with_build_dependencies +complete -c spack -n '__fish_spack_using_command buildcache create' -l with-build-dependencies -d 'include build dependencies in the buildcache' +complete -c spack -n '__fish_spack_using_command buildcache create' -l without-build-dependencies -f -a without_build_dependencies +complete -c spack -n '__fish_spack_using_command buildcache create' -l without-build-dependencies -d 'exclude build dependencies from the buildcache' complete -c spack -n '__fish_spack_using_command buildcache create' -l fail-fast -f -a fail_fast complete -c spack -n '__fish_spack_using_command buildcache create' -l fail-fast -d 'stop pushing on first failure (default is best effort)' complete -c spack -n '__fish_spack_using_command buildcache create' -l base-image -r -f -a base_image From 7c985d643206f3df00c444a470a7785040006121 Mon Sep 17 00:00:00 2001 From: Kaan <61908449+kaanolgu@users.noreply.github.com> Date: Tue, 13 Aug 2024 08:40:35 +0100 Subject: [PATCH 307/435] Intel OneAPI Codeplay Plugin for NVIDIA GPU Offload (#45655) * kickoff attempt * resource similar to fortran * delete unused install_component_codeplay * Adding conflict for versions <= 2022.2.1, moving install to package.py, adding sha256 for version 2024.2.1 * [@spackbot] updating style on behalf of kaanolgu --------- Co-authored-by: Kaan Olgu --- .../intel-oneapi-compilers/package.py | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index db11f5fd040eb1..3b35d9c3ae6fc0 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import platform from spack.build_environment import dso_suffix from spack.package import * @@ -19,6 +20,10 @@ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5e7b0f1c-6f25-4cc8-94d7-3a527e596739/l_fortran-compiler_p_2024.2.1.80_offline.sh", "sha256": "6f6dab82a88082a7a39f6feb699343c521f58c6481a1bb87edba7e2550995b6d", }, + "nvidia-plugin": { + "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.1&filters[]=12.0&filters[]=linux", + "sha256": "2c377027c650291ccd8267cbf75bd3d00c7b11998cc59d5668a02a0cbc2c015f", + }, }, { "version": "2024.2.0", @@ -30,6 +35,10 @@ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/801143de-6c01-4181-9911-57e00fe40181/l_fortran-compiler_p_2024.2.0.426_offline.sh", "sha256": "fd19a302662b2f86f76fc115ef53a69f16488080278dba4c573cc705f3a52ffa", }, + "nvidia-plugin": { + "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.0&filters[]=12.0&filters[]=linux", + "sha256": "0622df0054364b01e91e7ed72a33cb3281e281db5b0e86579f516b1cc5336b0f", + }, }, { "version": "2024.1.0", @@ -263,7 +272,9 @@ class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): # See https://github.com/spack/spack/issues/39252 depends_on("patchelf@:0.17", type="build", when="@:2024.1") - + # Add the nvidia variant + variant("nvidia", default=False, description="Install NVIDIA plugin for OneAPI") + conflicts("@:2022.2.1", when="+nvidia", msg="Codeplay NVIDIA plugin requires newer release") # TODO: effectively gcc is a direct dependency of intel-oneapi-compilers, but we # cannot express that properly. For now, add conflicts for non-gcc compilers # instead. @@ -279,6 +290,14 @@ class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): expand=False, **v["ftn"], ) + if "nvidia-plugin" in v: + resource( + name="nvidia-plugin-installer", + placement="nvidia-plugin-installer", + when="@{0}".format(v["version"]), + expand=False, + **v["nvidia-plugin"], + ) @property def v2_layout_versions(self): @@ -338,6 +357,18 @@ def install(self, spec, prefix): # Some installers have a bug and do not return an error code when failing if not is_exe(self._llvm_bin.ifx): raise RuntimeError("Fortran install failed") + # install nvidia-plugin + if self.spec.satisfies("+nvidia"): + nvidia_script = find("nvidia-plugin-installer", "*") + if nvidia_script: + if platform.system() == "Linux": + bash = Executable("bash") + # Installer writes files in ~/intel set HOME so it goes to prefix + bash.add_default_env("HOME", prefix) + # Installer checks $XDG_RUNTIME_DIR/.bootstrapper_lock_file as well + bash.add_default_env("XDG_RUNTIME_DIR", join_path(self.stage.path, "runtime")) + # For NVIDIA plugin installer + bash(nvidia_script[0], "-y", "--install-dir", self.prefix) @run_after("install") def inject_rpaths(self): From 7001a2a65ac8643c05a986b03e821fe22ef196ff Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 13 Aug 2024 10:19:26 +0200 Subject: [PATCH 308/435] Fix a bug with automatic tag detection (#45696) Extracted from #45638 When adding the "detectable" tag to a package class that has the "tag" attribute inherited from a base class, we need to copy it to avoid modifying the base class. --- lib/spack/spack/package_base.py | 11 ++++--- lib/spack/spack/test/cmd/external.py | 28 ++++++++++++++--- lib/spack/spack/test/tag.py | 2 +- .../builtin.mock/packages/gcc/package.py | 6 +++- .../intel-oneapi-compilers/package.py | 6 +++- .../builtin.mock/packages/llvm/package.py | 30 +++++++++++++++++++ 6 files changed, 70 insertions(+), 13 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/llvm/package.py diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 6f2d4406bca3e0..63aa02cc62a76b 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -197,13 +197,12 @@ def __init__(cls, name, bases, attr_dict): # that "foo" was a possible executable. # If a package has the executables or libraries attribute then it's - # assumed to be detectable + # assumed to be detectable. Add a tag, so finding them is faster if hasattr(cls, "executables") or hasattr(cls, "libraries"): - # Append a tag to each detectable package, so that finding them is faster - if not hasattr(cls, "tags"): - setattr(cls, "tags", [DetectablePackageMeta.TAG]) - elif DetectablePackageMeta.TAG not in cls.tags: - cls.tags.append(DetectablePackageMeta.TAG) + # To add the tag, we need to copy the tags attribute, and attach it to + # the current class. We don't use append, since it might modify base classes, + # if "tags" is retrieved following the MRO. + cls.tags = getattr(cls, "tags", []) + [DetectablePackageMeta.TAG] @classmethod def platform_executables(cls): diff --git a/lib/spack/spack/test/cmd/external.py b/lib/spack/spack/test/cmd/external.py index 2de6f18b506884..0573bc04ae11da 100644 --- a/lib/spack/spack/test/cmd/external.py +++ b/lib/spack/spack/test/cmd/external.py @@ -114,11 +114,31 @@ def test_find_external_cmd_not_buildable(mutable_config, working_env, mock_execu @pytest.mark.parametrize( "names,tags,exclude,expected", [ - # find --all - (None, ["detectable"], [], ["builtin.mock.find-externals1"]), + # find -all + ( + None, + ["detectable"], + [], + [ + "builtin.mock.find-externals1", + "builtin.mock.gcc", + "builtin.mock.llvm", + "builtin.mock.intel-oneapi-compilers", + ], + ), # find --all --exclude find-externals1 - (None, ["detectable"], ["builtin.mock.find-externals1"], []), - (None, ["detectable"], ["find-externals1"], []), + ( + None, + ["detectable"], + ["builtin.mock.find-externals1"], + ["builtin.mock.gcc", "builtin.mock.llvm", "builtin.mock.intel-oneapi-compilers"], + ), + ( + None, + ["detectable"], + ["find-externals1"], + ["builtin.mock.gcc", "builtin.mock.llvm", "builtin.mock.intel-oneapi-compilers"], + ), # find cmake (and cmake is not detectable) (["cmake"], ["detectable"], [], []), ], diff --git a/lib/spack/spack/test/tag.py b/lib/spack/spack/test/tag.py index 1f5affc549cadc..6a979eca4b6b7d 100644 --- a/lib/spack/spack/test/tag.py +++ b/lib/spack/spack/test/tag.py @@ -153,7 +153,7 @@ def test_tag_no_tags(mock_packages): def test_tag_update_package(mock_packages): - mock_index = spack.repo.PATH.tag_index + mock_index = mock_packages.tag_index index = spack.tag.TagIndex(repository=mock_packages) for name in spack.repo.all_package_names(): index.update_package(name) diff --git a/var/spack/repos/builtin.mock/packages/gcc/package.py b/var/spack/repos/builtin.mock/packages/gcc/package.py index 31f7c95b53684b..05518419ddb29f 100644 --- a/var/spack/repos/builtin.mock/packages/gcc/package.py +++ b/var/spack/repos/builtin.mock/packages/gcc/package.py @@ -6,7 +6,7 @@ from spack.package import * -class Gcc(Package): +class Gcc(CompilerPackage, Package): """Simple compiler package.""" homepage = "http://www.example.com" @@ -18,6 +18,10 @@ class Gcc(Package): depends_on("conflict", when="@3.0") + c_names = ["gcc"] + cxx_names = ["g++"] + fortran_names = ["gfortran"] + def install(self, spec, prefix): # Create the minimal compiler that will fool `spack compiler find` mkdirp(prefix.bin) diff --git a/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py index f7c7dd67e522a7..78fdbe056c0ca5 100644 --- a/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py @@ -8,7 +8,7 @@ from spack.package import * -class IntelOneapiCompilers(Package): +class IntelOneapiCompilers(Package, CompilerPackage): """Simple compiler package.""" homepage = "http://www.example.com" @@ -18,6 +18,10 @@ class IntelOneapiCompilers(Package): version("2.0", md5="abcdef0123456789abcdef0123456789") version("3.0", md5="def0123456789abcdef0123456789abc") + c_names = ["icx"] + cxx_names = ["icpx"] + fortran_names = ["ifx"] + @property def compiler_search_prefix(self): return self.prefix.foo.bar.baz.bin diff --git a/var/spack/repos/builtin.mock/packages/llvm/package.py b/var/spack/repos/builtin.mock/packages/llvm/package.py new file mode 100644 index 00000000000000..135ae5ebfa20a0 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/llvm/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Llvm(Package, CompilerPackage): + """Simple compiler package.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/gcc-1.0.tar.gz" + + version("18.1.8", md5="0123456789abcdef0123456789abcdef") + + variant( + "clang", default=True, description="Build the LLVM C/C++/Objective-C compiler frontend" + ) + + c_names = ["clang"] + cxx_names = ["clang++"] + fortran_names = ["flang"] + + def install(self, spec, prefix): + # Create the minimal compiler that will fool `spack compiler find` + mkdirp(prefix.bin) + with open(prefix.bin.gcc, "w") as f: + f.write('#!/bin/bash\necho "%s"' % str(spec.version)) + set_executable(prefix.bin.gcc) From 79996868563ba2580de1645767c52046f2a0aa0e Mon Sep 17 00:00:00 2001 From: BOUDAOUD34 <114594090+BOUDAOUD34@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:10:22 +0200 Subject: [PATCH 309/435] siesta: add v4.1.5, v5.0.0 and v5.0.1, add variants and build v5 using cmake (#45518) Co-authored-by: Bernhard Kaindl --- .../repos/builtin/packages/siesta/package.py | 285 +++++++++++++++--- 1 file changed, 248 insertions(+), 37 deletions(-) diff --git a/var/spack/repos/builtin/packages/siesta/package.py b/var/spack/repos/builtin/packages/siesta/package.py index 62dbfe920e227a..e70f2f9617a50b 100644 --- a/var/spack/repos/builtin/packages/siesta/package.py +++ b/var/spack/repos/builtin/packages/siesta/package.py @@ -5,16 +5,40 @@ import os +import shutil +from spack.build_systems import cmake from spack.package import * -class Siesta(MakefilePackage): +class Siesta(MakefilePackage, CMakePackage): """SIESTA performs electronic structure calculations and ab initio molecular dynamics simulations of molecules and solids. """ + build_system( + conditional("cmake", when="@5:"), conditional("makefile", when="@:4"), default="cmake" + ) + homepage = "https://departments.icmab.es/leem/siesta/" + git = "https://gitlab.com/siesta-project/siesta" + + version( + "5.0.1", + url="https://gitlab.com/siesta-project/siesta/-/archive/5.0.1/siesta-5.0.1.tar.gz", + sha256="800a22a831c1d36c6f5fe4aa9c49ee510cbd49a0b2f87b3c8bf3edb6ebd0193a", + ) + + version( + "5.0.0", + url="https://gitlab.com/siesta-project/siesta/-/archive/rel-5.0/siesta-rel-5.0.tar.gz", + sha256="0b40c341dfd47e99e7e191189600bbcaadb0f9af03977fefed6a69836bd523e4", + ) + version( + "4.1.5", + url="https://gitlab.com/siesta-project/siesta/-/archive/v4.1.5/siesta-v4.1.5.tar.gz", + sha256="adc88619bf7e17fca2c67ecdcdae1f07ec4b3caf3541c0edf12964c8c330edc9", + ) license("GPL-3.0-or-later") @@ -30,17 +54,43 @@ class Siesta(MakefilePackage): url="http://departments.icmab.es/leem/siesta/CodeAccess/Code/siesta-3.2-pl-5.tgz", ) - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated - patch("configure.patch", when="@:4.0") - depends_on("mpi") + variant("mpi", default=True, description="Builds with mpi support") + variant("openmp", default=True, description="Enables OpenMP support") + variant("netcdf", default=False, description="Compile with Netcdf") + variant("metis", default=False, description="Activate Metis as a possible ordering library") + variant("elpa", default=False, description="Use ELPA") + variant("mumps", default=False, description="Compile with support for MUMPS solvers") + variant("pexsi", default=False, description="Compile with PEXSI") + variant( + "cray", + default=False, + description="Enable specific cray settings for using cray-hdf5" + " and cray-netcdf modulefiles", + ) + variant("debug", default=False, description="Build in debug mode") + variant( + "build_type", + default="Release", + description="The build type to build", + values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel", "check"), + ) + + depends_on("mpi", when="+mpi") depends_on("blas") depends_on("lapack") - depends_on("scalapack") + depends_on("scalapack", when="+mpi") depends_on("netcdf-c") depends_on("netcdf-fortran") + depends_on("cray-libsci+openmp", when="^[virtuals=cray-libsci] cray-libsci") + depends_on("metis@5:", when="+metis") + depends_on("elpa", when="+elpa") + depends_on("mumps", when="+mumps") + depends_on("pexsi", when="+pexsi") + + with when("build_system=cmake"): + depends_on("cmake@3.20:", type="build") def flag_handler(self, name, flags): if "%gcc@10:" in self.spec and name == "fflags": @@ -49,49 +99,210 @@ def flag_handler(self, name, flags): def edit(self, spec, prefix): sh = which("sh") - configure_args = [ - "--enable-mpi", - "--with-blas=%s" % spec["blas"].libs, - "--with-lapack=%s" % spec["lapack"].libs, - # need to include BLAS below because Intel MKL's - # BLACS depends on BLAS, otherwise the compiler - # test fails - "--with-blacs=%s" % (spec["scalapack"].libs + spec["blas"].libs), - "--with-scalapack=%s" % spec["scalapack"].libs, - "--with-netcdf=%s" % (spec["netcdf-fortran"].libs + spec["netcdf-c"].libs), - # need to specify MPIFC explicitly below, otherwise - # Intel's mpiifort is not found - "MPIFC=%s" % spec["mpi"].mpifc, - ] - if self.spec.satisfies("%gcc"): - configure_args.append("FCFLAGS=-ffree-line-length-0") - for d in ["Obj", "Obj_trans"]: - with working_dir(d, create=True): - sh("../Src/configure", *configure_args) - if spec.satisfies("@:4.0%intel"): - with open("arch.make", "a") as f: - f.write("\natom.o: atom.F\n") - f.write("\t$(FC) -c $(FFLAGS) -O1") - f.write("$(INCFLAGS) $(FPPFLAGS) $<") + if "+cray" in spec: + netcdff_prefix = os.environ.get("NETCDF_DIR", "") + hdf5_prefix = os.environ.get("HDF5_DIR", "") + if spec.satisfies("@:4.0.2 +mpi"): + configure_args = [ + "--enable-mpi", + "--with-blas=%s" % spec["blas"].libs, + "--with-lapack=%s" % spec["lapack"].libs, + # need to include BLAS below because Intel MKL's + # BLACS depends on BLAS, otherwise the compiler + # test fails + "--with-blacs=%s" % (spec["scalapack"].libs + spec["blas"].libs), + "--with-scalapack=%s" % spec["scalapack"].libs, + # need to specify MPIFC explicitly below, otherwise + # Intel's mpiifort is not found + "MPIFC=%s" % spec["mpi"].mpifc, + ] + if "+cray" in spec: + configure_args += ["--with-netcdf={0}/lib/libnetcdff.so".format(netcdff_prefix)] + else: + configure_args += [ + "--with-netcdf=%s" % (spec["netcdf-fortran"].libs + spec["netcdf-c"].libs) + ] + + if self.spec.satisfies("%gcc"): + if "+cray" in spec: + configure_args.append( + "FCFLAGS=-ffree-line-length-0 -I{0}/include".format(netcdff_prefix) + ) + else: + configure_args.append("FCFLAGS=-ffree-line-length-0") + for d in ["Obj", "Obj_trans"]: + with working_dir(d, create=True): + sh("../Src/configure", *configure_args) + if spec.satisfies("@:4.0%intel"): + with open("arch.make", "a") as f: + f.write("\natom.o: atom.F\n") + f.write("\t$(FC) -c $(FFLAGS) -O1") + f.write("$(INCFLAGS) $(FPPFLAGS) $<") + sh("../Src/obj_setup.sh") + + elif self.spec.satisfies("@:4.1.5"): + with working_dir("Obj", create=True): sh("../Src/obj_setup.sh") + if spec.satisfies("@:4.1.5%gcc"): + shutil.copy("./gfortran.make", "./arch.make") + libs_arg = [] + fppflags_arg = [] + arch_make = FileFilter("./arch.make") + arch_make.filter( + "FFLAGS = .*", + "FFLAGS = {0}".format( + "-O2 -fPIC -ftree-vectorize -fallow-argument-mismatch" + ), + ) + + if "+debug" in spec: + arch_make.filter("FFLAGS_DEBUG=.*", "FFLAGS_DEBUG= -g -O1") + + if "^cray-libsci" in spec: + libs_arg.append("-L{0}/lib -lsci_gnu".format(spec["cray-libsci"].prefix)) + + with open("arch.make", "a") as f: + if "+mpi" in spec: + arch_make.filter("CC = .*", "CC = {0}".format(spec["mpi"].mpicc)) + arch_make.filter("FC = .*", "FC = {0}".format(spec["mpi"].mpifc)) + if "^cray-libsci" in spec: + libs_arg.append("-lsci_gnu_mpi") + f.write("MPI_INTERFACE = libmpi_f90.a\n") + f.write("MPI_INCLUDE = .\n") + f.write("LIBS += " + spec["scalapack"].libs.ld_flags + "\n") + fppflags_arg.append("-DMPI ") + + if "+openmp" in spec: + f.write("FFLAGS += -fopenmp\n") + f.write("LIBS += -fopenmp\n") + + if "+netcdf" in spec: + if "+cray" in spec: + libs_arg.append( + "-L{0}/lib -lnetcdff -lnetcdf".format(netcdff_prefix) + ) + libs_arg.append( + "-L{0}/lib -lhdf5_fortran -lhdf5".format(hdf5_prefix) + ) + else: + libs_arg.append( + "-L{0}/lib -lnetcdff -lnetcdf".format( + spec["netcdf-fortran"].prefix + ) + ) + libs_arg.append( + "-L{0}/lib -lhdf5_fortran -lhdf5".format(spec["hdf5"].prefix) + ) + + if "+metis" in spec: + libs_arg.append("-L{0} -lmetis".format(self.spec["metis"].prefix.lib)) + fppflags_arg.append("-DSIESTA__METIS ") + + if "elpa" in spec: + elpa = spec["elpa"] + elpa_suffix = "_openmp" if "+openmp" in elpa else "" + elpa_incdir = elpa.headers.directories[0] + libs_arg.append( + "-L{0} -lelpa{1}".format(self.spec["elpa"].prefix.lib, elpa_suffix) + ) + fppflags_arg.append( + "-DSIESTA__ELPA -I{0}".format(join_path(elpa_incdir, "modules")) + ) + + if "mumps" in spec: + libs_arg.append( + "-L{0} -lmumps_common -lzmumps".format( + self.spec["mumps"].prefix.lib + ) + ) + fppflags_arg.append("-DSIESTA__MUMPS ") + + if "+pexsi" in spec: + libs_arg.append( + "-L{0} -lpexsi_linux".format(self.spec["pexsi"].prefix.lib) + ) + fppflags_arg.append("-DSIESTA__PEXSI ") + f.write("INCFLAGS += -I{0}/include".format(self.spec["pexsi"].prefix)) + + arch_make.filter("^LIBS =.*", "LIBS = {0}".format(" ".join(libs_arg))) + f.write("FPPFLAGS = {0}".format(" ".join(fppflags_arg))) def build(self, spec, prefix): with working_dir("Obj"): make(parallel=False) - with working_dir("Obj_trans"): - make("transiesta", parallel=False) - with working_dir("Util"): - sh = which("sh") - sh("build_all.sh") + if spec.satisfies("@:4.0.2"): + with working_dir("Obj_trans"): + make("transiesta", parallel=False) + with working_dir("Util"): + sh = which("sh") + sh("build_all.sh") def install(self, spec, prefix): mkdir(prefix.bin) with working_dir("Obj"): install("siesta", prefix.bin) - with working_dir("Obj_trans"): - install("transiesta", prefix.bin) + if spec.satisfies("@:4.0.2"): + with working_dir("Obj_trans"): + install("transiesta", prefix.bin) for root, _, files in os.walk("Util"): for fname in files: fname = join_path(root, fname) if os.access(fname, os.X_OK): install(fname, prefix.bin) + + +class CMakeBuilder(cmake.CMakeBuilder): + """Use the new CMake build system to build siesta@5.0.0:.""" + + def cmake_args(self): + spec = self.spec + args = [] + + args += ["-DBLAS_LIBRARIES={0}".format(self.spec["blas"].libs.link_flags)] + args += ["-DLAPACK_LIBRARIES={0}".format(self.spec["lapack"].libs.link_flags)] + + if "+mpi" in spec: + args += [ + "-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc, + "-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx, + "-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc, + ] + args += ["-DSIESTA_WITH_MPI=ON"] + args += ["-DSCALAPACK_LIBRARY={0}".format(spec["scalapack"].libs.joined(";"))] + + if "+openmp" in spec: + args += ["-DSIESTA_WITH_OPENMP=ON"] + if "+cray" in spec: + args += ["-DFortran_FLAGS=-fopenmp"] + + if "build_type=Debug" in spec: + args += [ + "-DFortran_FLAGS=-Og -g -Wall -fcheck=all -fbacktrace" + " -Warray-bounds -Wunused -Wuninitialized" + ] + else: + args += ["-DFortran_FLAGS=-O2 -fPIC -ftree-vectorize -fallow-argument-mismatch"] + + if "+netcdf" in spec: + args += ["-DSIESTA_WITH_NETCDF=ON"] + if "+cray" in spec: + args += ["-DNetCDF_PATH={0}".format(os.environ.get("NETCDF_DIR", ""))] + else: + args += ["-DNetCDF_PATH={0}".format(spec["netcdf-fortran"].prefix)] + + if "+elpa" in spec: + args += ["-DSIESTA_WITH_ELPA=ON"] + + if "+mumps" in spec: + args += ["-DSIESTA__MUMPS=ON"] + args += [ + "-DSIESTA_LINKER_FLAGS=-L{0} -lmumps_common -lzmumps".format( + self.spec["mumps"].prefix.lib + ) + ] + + if "+metis" in spec: + args += ["-DSIESTA__METIS=ON"] + args += ["-DSIESTA_LINKER_FLAGS=-L{0} -lmetis".format(self.spec["metis"].prefix.lib)] + + return args From b693987f9579e0c1a07a54692a054a833c981f37 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 13 Aug 2024 14:17:54 +0200 Subject: [PATCH 310/435] cuda: drop preference (#45130) --- .../repos/builtin/packages/cuda/package.py | 9 ++---- .../repos/builtin/packages/xgboost/package.py | 28 +++++++++++++++---- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index dce84006cf45d1..404b85a61cd0c3 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -23,7 +23,6 @@ # - package key must be in the form '{os}-{arch}' where 'os' is in the # format returned by platform.system() and 'arch' by platform.machine() -preferred_ver = "11.8.0" _versions = { "12.5.1": { "Linux-aarch64": ( @@ -629,13 +628,9 @@ class Cuda(Package): skip_version_audit = ["platform=darwin", "platform=windows"] for ver, packages in _versions.items(): - key = "{0}-{1}".format(platform.system(), platform.machine()) - pkg = packages.get(key) + pkg = packages.get(f"{platform.system()}-{platform.machine()}") if pkg: - if ver == preferred_ver: - version(ver, sha256=pkg[0], url=pkg[1], expand=False, preferred=True) - else: - version(ver, sha256=pkg[0], url=pkg[1], expand=False) + version(ver, sha256=pkg[0], url=pkg[1], expand=False) # macOS Mojave drops NVIDIA graphics card support -- official NVIDIA # drivers do not exist for Mojave. See diff --git a/var/spack/repos/builtin/packages/xgboost/package.py b/var/spack/repos/builtin/packages/xgboost/package.py index bfc451f8353336..3451f7af696b74 100644 --- a/var/spack/repos/builtin/packages/xgboost/package.py +++ b/var/spack/repos/builtin/packages/xgboost/package.py @@ -24,6 +24,12 @@ class Xgboost(CMakePackage, CudaPackage): license("Apache-2.0") version("master", branch="master", submodules=True) + version( + "2.1.0", tag="v2.1.0", commit="213ebf7796b757448dfa2cfba532074696fa1524", submodules=True + ) + version( + "1.7.6", tag="v1.7.6", commit="36eb41c960483c8b52b44082663c99e6a0de440a", submodules=True + ) version( "1.6.2", tag="v1.6.2", commit="b9934246faa9a25e10a12339685dfbe56d56f70b", submodules=True ) @@ -43,11 +49,23 @@ class Xgboost(CMakePackage, CudaPackage): variant("nccl", default=False, description="Build with NCCL to enable distributed GPU support") variant("openmp", default=True, description="Build with OpenMP support") - depends_on("cmake@3.13:", type="build") - depends_on("cmake@3.16:", when="platform=darwin", type="build") - depends_on("cuda@10:", when="+cuda") - # https://github.com/dmlc/xgboost/pull/7379 - depends_on("cuda@10:11.4", when="@:1.5.0+cuda") + with default_args(type="build"): + depends_on("cmake@3.16:", when="platform=darwin") # openmp issues + depends_on("cmake@3.13:") + depends_on("cmake@3.14:", when="@1.5:") + depends_on("cmake@3.18:", when="@2:") + + with when("+cuda"): + depends_on("cuda@10:") + # https://github.com/dmlc/xgboost/pull/7379 + depends_on("cuda@:11.4", when="@:1.5.0") + # https://github.com/dmlc/xgboost/commit/ca0547bb65966896254a99f7868943d606a18c53 + depends_on("cuda@:11", when="@:1.6") + # thrust 2.3.1 tuple issues + depends_on("cuda@:12.3", when="@:1.7") + # https://github.com/dmlc/xgboost/issues/10555 + depends_on("cuda@:12.4", when="@:2.1.0") # assuming fix is backported + depends_on("nccl", when="+nccl") depends_on("llvm-openmp", when="%apple-clang +openmp") depends_on("hwloc", when="%clang") From 645c8eeaeb7ebc1d08686edb1bde465aafbcdb84 Mon Sep 17 00:00:00 2001 From: Ganesh Vijayakumar Date: Tue, 13 Aug 2024 08:04:04 -0600 Subject: [PATCH 311/435] Update OpenFAST package.py (#45706) Mandating build of C++ driver program whenever "cxx" option is used. Necessitated by recent change to OpenFAST https://github.com/OpenFAST/openfast/blob/dev/glue-codes/openfast-cpp/CMakeLists.txt#L60 --- var/spack/repos/builtin/packages/openfast/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openfast/package.py b/var/spack/repos/builtin/packages/openfast/package.py index fbe3e8bd47463a..8b99fda2c669e3 100644 --- a/var/spack/repos/builtin/packages/openfast/package.py +++ b/var/spack/repos/builtin/packages/openfast/package.py @@ -75,6 +75,7 @@ def cmake_args(self): self.define_from_variant("DOUBLE_PRECISION", "double-precision"), self.define_from_variant("USE_DLL_INTERFACE", "dll-interface"), self.define_from_variant("BUILD_OPENFAST_CPP_API", "cxx"), + self.define_from_variant("BUILD_OPENFAST_CPP_DRIVER", "cxx"), self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), ] ) From df8507f47081380b585d4eaf1c7eaf7ca2d70c86 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Tue, 13 Aug 2024 18:25:34 +0200 Subject: [PATCH 312/435] bigdft : add v1.9.5 (#45270) --- .../builtin/packages/bigdft-atlab/package.py | 3 +- .../builtin/packages/bigdft-chess/package.py | 13 ++- .../builtin/packages/bigdft-core/package.py | 9 +- .../builtin/packages/bigdft-futile/package.py | 1 + .../packages/bigdft-libabinit/package.py | 5 +- .../packages/bigdft-liborbs/package.py | 93 +++++++++++++++++++ .../packages/bigdft-psolver/package.py | 4 +- .../builtin/packages/bigdft-spred/package.py | 6 +- .../builtin/packages/bigdft-suite/package.py | 5 +- .../repos/builtin/packages/libgain/package.py | 4 + .../repos/builtin/packages/ntpoly/package.py | 1 + .../packages/py-bigdft/bad_string.patch | 22 +++++ .../builtin/packages/py-bigdft/package.py | 20 +++- .../packages/py-bigdft/pyproject_fix.patch | 9 ++ 14 files changed, 182 insertions(+), 13 deletions(-) create mode 100644 var/spack/repos/builtin/packages/bigdft-liborbs/package.py create mode 100644 var/spack/repos/builtin/packages/py-bigdft/bad_string.patch create mode 100644 var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch diff --git a/var/spack/repos/builtin/packages/bigdft-atlab/package.py b/var/spack/repos/builtin/packages/bigdft-atlab/package.py index 77c9236b22b5b7..0c023efc9e03b1 100644 --- a/var/spack/repos/builtin/packages/bigdft-atlab/package.py +++ b/var/spack/repos/builtin/packages/bigdft-atlab/package.py @@ -14,6 +14,7 @@ class BigdftAtlab(AutotoolsPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") @@ -38,7 +39,7 @@ class BigdftAtlab(AutotoolsPackage): depends_on("mpi", when="+mpi") depends_on("openbabel", when="+openbabel") - for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "develop"]: + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]: depends_on(f"bigdft-futile@{vers}", when=f"@{vers}") configure_directory = "atlab" diff --git a/var/spack/repos/builtin/packages/bigdft-chess/package.py b/var/spack/repos/builtin/packages/bigdft-chess/package.py index 319ce8e4327cd5..d407d6f1c3f4ce 100644 --- a/var/spack/repos/builtin/packages/bigdft-chess/package.py +++ b/var/spack/repos/builtin/packages/bigdft-chess/package.py @@ -15,6 +15,9 @@ class BigdftChess(AutotoolsPackage, CudaPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") + version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") + version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41") version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8") @@ -26,7 +29,7 @@ class BigdftChess(AutotoolsPackage, CudaPackage): variant("mpi", default=True, description="Enable MPI support") variant("openmp", default=True, description="Enable OpenMP support") variant("scalapack", default=True, description="Enable SCALAPACK support") - variant("ntpoly", default=False, description="Option to use NTPoly") + variant("ntpoly", default=True, description="Option to use NTPoly") variant( "shared", default=True, description="Build shared libraries" ) # Not default in bigdft, but is typically the default expectation @@ -35,6 +38,7 @@ class BigdftChess(AutotoolsPackage, CudaPackage): depends_on("autoconf", type="build") depends_on("automake", type="build") depends_on("libtool", type="build") + depends_on("pkg-config", type="build") depends_on("python@3.0:", type=("build", "run")) @@ -43,10 +47,11 @@ class BigdftChess(AutotoolsPackage, CudaPackage): depends_on("py-pyyaml") depends_on("mpi", when="+mpi") depends_on("scalapack", when="+scalapack") - depends_on("ntpoly", when="+ntpoly") - # depends_on('netlib-minpack', when='+minpack') - for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]: + depends_on("ntpoly@:2", when="@:1.9.3") + depends_on("ntpoly@3:", when="@1.9.4:") + + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]: depends_on(f"bigdft-futile@{vers}", when=f"@{vers}") depends_on(f"bigdft-atlab@{vers}", when=f"@{vers}") diff --git a/var/spack/repos/builtin/packages/bigdft-core/package.py b/var/spack/repos/builtin/packages/bigdft-core/package.py index 0da285fb0b91f6..2c885fafc2dae9 100644 --- a/var/spack/repos/builtin/packages/bigdft-core/package.py +++ b/var/spack/repos/builtin/packages/bigdft-core/package.py @@ -15,6 +15,9 @@ class BigdftCore(AutotoolsPackage, CudaPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") + version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") + # version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") # broken version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41") version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8") @@ -34,6 +37,7 @@ class BigdftCore(AutotoolsPackage, CudaPackage): depends_on("autoconf", type="build") depends_on("automake", type="build") depends_on("libtool", type="build") + depends_on("pkg-config", type="build") depends_on("python@3.0:", type=("build", "run")) @@ -48,12 +52,15 @@ class BigdftCore(AutotoolsPackage, CudaPackage): depends_on("libxc@:4.3.4", when="@1.9.2:") depends_on("libxc@:4.3.4", when="@develop") - for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]: + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.4", "1.9.5", "develop"]: depends_on(f"bigdft-futile@{vers}", when=f"@{vers}") depends_on(f"bigdft-chess@{vers}", when=f"@{vers}") depends_on(f"bigdft-psolver@{vers}", when=f"@{vers}") depends_on(f"bigdft-libabinit@{vers}", when=f"@{vers}") + for vers in ["1.9.3", "1.9.4", "1.9.5", "develop"]: + depends_on(f"bigdft-liborbs@{vers}", when=f"@{vers}") + configure_directory = "bigdft" def configure_args(self): diff --git a/var/spack/repos/builtin/packages/bigdft-futile/package.py b/var/spack/repos/builtin/packages/bigdft-futile/package.py index 431a42b57befef..94a66f100dd528 100644 --- a/var/spack/repos/builtin/packages/bigdft-futile/package.py +++ b/var/spack/repos/builtin/packages/bigdft-futile/package.py @@ -18,6 +18,7 @@ class BigdftFutile(AutotoolsPackage, CudaPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") diff --git a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py index f1696615bafca2..33e6363d8497e3 100644 --- a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py +++ b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py @@ -17,6 +17,9 @@ class BigdftLibabinit(AutotoolsPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") + version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") + version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41") version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8") @@ -40,7 +43,7 @@ class BigdftLibabinit(AutotoolsPackage): depends_on("libxc@:2.2.2", when="@:1.9.1") depends_on("libxc@:4.3.4", when="@1.9.1:") - for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]: + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]: depends_on(f"bigdft-futile@{vers}", when=f"@{vers}") configure_directory = "libABINIT" diff --git a/var/spack/repos/builtin/packages/bigdft-liborbs/package.py b/var/spack/repos/builtin/packages/bigdft-liborbs/package.py new file mode 100644 index 00000000000000..80545c7db54395 --- /dev/null +++ b/var/spack/repos/builtin/packages/bigdft-liborbs/package.py @@ -0,0 +1,93 @@ +# 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 BigdftLiborbs(AutotoolsPackage, CudaPackage): + """BigDFT-liborbs: a library for orbital treatments in DFT.""" + + homepage = "https://bigdft.org/" + url = "https://gitlab.com/l_sim/bigdft-suite/-/archive/1.9.5/bigdft-suite-1.9.5.tar.gz" + git = "https://gitlab.com/l_sim/bigdft-suite.git" + + version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") + version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") + version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") + + variant("mpi", default=True, description="Enable MPI support") + variant("openmp", default=True, description="Enable OpenMP support") + variant("scalapack", default=True, description="Enable SCALAPACK support") + variant( + "shared", default=True, description="Build shared libraries" + ) # Not default in bigdft, but is typically the default expectation + + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + + depends_on("blas") + depends_on("lapack") + depends_on("mpi", when="+mpi") + depends_on("scalapack", when="+scalapack") + + for vers in ["1.9.3", "1.9.4", "1.9.5", "develop"]: + depends_on(f"bigdft-futile@{vers}", when=f"@{vers}") + depends_on(f"bigdft-atlab@{vers}", when=f"@{vers}") + + configure_directory = "liborbs" + + def configure_args(self): + spec = self.spec + prefix = self.prefix + + openmp_flag = [] + if "+openmp" in spec: + openmp_flag.append(self.compiler.openmp_flag) + + linalg = [] + if "+scalapack" in spec: + linalg.append(spec["scalapack"].libs.ld_flags) + linalg.append(spec["lapack"].libs.ld_flags) + linalg.append(spec["blas"].libs.ld_flags) + + args = [ + f"FCFLAGS={' '.join(openmp_flag)}", + f"--with-ext-linalg={' '.join(linalg)}", + f"--with-moduledir={prefix.include}", + f"--prefix={prefix}", + ] + + if spec.satisfies("+shared"): + args.append("--enable-dynamic-libraries") + + if "+mpi" in spec: + args.append(f"CC={spec['mpi'].mpicc}") + args.append(f"CXX={spec['mpi'].mpicxx}") + args.append(f"FC={spec['mpi'].mpifc}") + args.append(f"F90={spec['mpi'].mpifc}") + args.append(f"F77={spec['mpi'].mpif77}") + else: + args.append("--disable-mpi") + + if "+openmp" in spec: + args.append("--with-openmp") + else: + args.append("--without-openmp") + + if "+cuda" in spec: + args.append("--enable-opencl") + args.append(f"--with-ocl-path={spec['cuda'].prefix}") + args.append("--enable-cuda-gpu") + args.append(f"--with-cuda-path={spec['cuda'].prefix}") + args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}") + + return args + + @property + def libs(self): + shared = "+shared" in self.spec + return find_libraries("libbigdft-*", root=self.prefix, shared=shared, recursive=True) diff --git a/var/spack/repos/builtin/packages/bigdft-psolver/package.py b/var/spack/repos/builtin/packages/bigdft-psolver/package.py index 62a1cf48aef271..dc6f1ceb9dfddd 100644 --- a/var/spack/repos/builtin/packages/bigdft-psolver/package.py +++ b/var/spack/repos/builtin/packages/bigdft-psolver/package.py @@ -16,6 +16,7 @@ class BigdftPsolver(AutotoolsPackage, CudaPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") @@ -36,6 +37,7 @@ class BigdftPsolver(AutotoolsPackage, CudaPackage): depends_on("autoconf", type="build") depends_on("automake", type="build") depends_on("libtool", type="build") + depends_on("pkg-config", type="build") depends_on("python@3.0:", type=("build", "run")) @@ -45,7 +47,7 @@ class BigdftPsolver(AutotoolsPackage, CudaPackage): depends_on("mpi", when="+mpi") depends_on("scalapack", when="+scalapack") - for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "develop"]: + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]: depends_on(f"bigdft-futile@{vers}", when=f"@{vers}") depends_on(f"bigdft-atlab@{vers}", when=f"@{vers}") diff --git a/var/spack/repos/builtin/packages/bigdft-spred/package.py b/var/spack/repos/builtin/packages/bigdft-spred/package.py index 566508aeb00dc9..796c10d98e5724 100644 --- a/var/spack/repos/builtin/packages/bigdft-spred/package.py +++ b/var/spack/repos/builtin/packages/bigdft-spred/package.py @@ -15,6 +15,9 @@ class BigdftSpred(AutotoolsPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") + version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") + # version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") # bigdft-core broken version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41") version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8") @@ -26,6 +29,7 @@ class BigdftSpred(AutotoolsPackage): depends_on("autoconf", type="build") depends_on("automake", type="build") depends_on("libtool", type="build") + depends_on("pkg-config", type="build") variant("mpi", default=True, description="Enable MPI support") variant("openmp", default=True, description="Enable OpenMP support") @@ -42,7 +46,7 @@ class BigdftSpred(AutotoolsPackage): depends_on("mpi", when="+mpi") depends_on("scalapack", when="+scalapack") - for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]: + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.4", "1.9.5", "develop"]: depends_on(f"bigdft-futile@{vers}", when=f"@{vers}") depends_on(f"bigdft-psolver@{vers}", when=f"@{vers}") depends_on(f"bigdft-core@{vers}", when=f"@{vers}") diff --git a/var/spack/repos/builtin/packages/bigdft-suite/package.py b/var/spack/repos/builtin/packages/bigdft-suite/package.py index 7c2abb0c43d85c..7658e885acbbcb 100644 --- a/var/spack/repos/builtin/packages/bigdft-suite/package.py +++ b/var/spack/repos/builtin/packages/bigdft-suite/package.py @@ -15,13 +15,16 @@ class BigdftSuite(BundlePackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5") + version("1.9.4") + # version("1.9.3") # bigdft-core broken version("1.9.2") version("1.9.1") version("1.9.0") depends_on("python@3.0:", type=("run")) - for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]: + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.4", "1.9.5", "develop"]: depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers)) depends_on("bigdft-psolver@{0}".format(vers), when="@{0}".format(vers)) depends_on("bigdft-libabinit@{0}".format(vers), when="@{0}".format(vers)) diff --git a/var/spack/repos/builtin/packages/libgain/package.py b/var/spack/repos/builtin/packages/libgain/package.py index 3f265a9e468a37..13360d0a79bc01 100644 --- a/var/spack/repos/builtin/packages/libgain/package.py +++ b/var/spack/repos/builtin/packages/libgain/package.py @@ -24,6 +24,10 @@ class Libgain(AutotoolsPackage): depends_on("fortran", type="build") # generated + def flag_handler(self, name, flags): + flags.append(self.compiler.fc_pic_flag) + return (None, None, flags) + @property def libs(self): shared = "+shared" in self.spec diff --git a/var/spack/repos/builtin/packages/ntpoly/package.py b/var/spack/repos/builtin/packages/ntpoly/package.py index 57db40ac75b51d..69b22e948bead9 100644 --- a/var/spack/repos/builtin/packages/ntpoly/package.py +++ b/var/spack/repos/builtin/packages/ntpoly/package.py @@ -21,6 +21,7 @@ class Ntpoly(CMakePackage): license("MIT") version("3.1.0", sha256="71cd6827f20c68e384555dbcfc85422d0690e21d21d7b5d4f7375544a2755271") + version("2.7.2", sha256="968571a42e93827617c40c4ceefd29be52447c176309f801bb5a454527fe5f49") version("2.3.1", sha256="af8c7690321607fbdee9671b9cb3acbed945148014e0541435858cf82bfd887e") depends_on("cxx", type="build") # generated diff --git a/var/spack/repos/builtin/packages/py-bigdft/bad_string.patch b/var/spack/repos/builtin/packages/py-bigdft/bad_string.patch new file mode 100644 index 00000000000000..cb945a9759c88f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bigdft/bad_string.patch @@ -0,0 +1,22 @@ +From e12f8694bb40ef4f0d984df67bf2c6e7c6d0a81b Mon Sep 17 00:00:00 2001 +From: Luigi Genovese +Date: Wed, 19 Jun 2024 13:51:33 +0200 +Subject: [PATCH] type corrected + +--- + PyBigDFT/BigDFT/BioQM.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/PyBigDFT/BigDFT/BioQM.py b/PyBigDFT/BigDFT/BioQM.py +index 6bb2985fc..20323c535 100644 +--- a/PyBigDFT/BigDFT/BioQM.py ++++ b/PyBigDFT/BigDFT/BioQM.py +@@ -1,4 +1,4 @@ +-long_ra"""A module to define typical operations that can be done on biological systems ++"""A module to define typical operations that can be done on biological systems + + """ + from BigDFT.Systems import System +-- +2.45.1 + diff --git a/var/spack/repos/builtin/packages/py-bigdft/package.py b/var/spack/repos/builtin/packages/py-bigdft/package.py index 2251438053ed6e..3274c4357535a4 100644 --- a/var/spack/repos/builtin/packages/py-bigdft/package.py +++ b/var/spack/repos/builtin/packages/py-bigdft/package.py @@ -15,6 +15,9 @@ class PyBigdft(PythonPackage): git = "https://gitlab.com/l_sim/bigdft-suite.git" version("develop", branch="devel") + version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741") + version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d") + version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f") version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41") version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8") @@ -23,11 +26,22 @@ class PyBigdft(PythonPackage): depends_on("cxx", type="build") # generated depends_on("fortran", type="build") # generated - depends_on("python@3.0:", type=("build", "run")) - depends_on("py-numpy") + depends_on("python@3.0:", type=("build", "run"), when="@:1.9.3") + depends_on("python@3.6:", type=("build", "run"), when="@1.9.4:") + depends_on("py-setuptools") + depends_on("py-hatchling") + + depends_on("py-numpy", type=("run")) + depends_on("py-ase", when="@1.9.3", type=("run")) + depends_on("py-matplotlib", when="@1.9.3", type=("run")) - for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]: + depends_on("py-scipy", when="@1.9.4:", type=("run")) + + for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]: depends_on("bigdft-futile@{0}".format(vers), type="run", when="@{0}".format(vers)) build_directory = "PyBigDFT" + + patch("pyproject_fix.patch", when="@1.9.4") # based on cb66dd0c4 + patch("bad_string.patch", when="@1.9.5") diff --git a/var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch b/var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch new file mode 100644 index 00000000000000..18b75e8b7fae01 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch @@ -0,0 +1,9 @@ +--- a/PyBigDFT/pyproject.toml ++++ b/PyBigDFT/pyproject.toml +@@ -33,3 +33,6 @@ viz = ["py3dmol", "matplotlib"] + + [tool.hatch.build] + artifacts = ["*.xyz", "psppar*.yaml", "postprocess.yaml"] ++ ++[tool.hatch.build.targets.wheel] ++packages = ["BigDFT"] From 2b95eecb839829f0cb152eacd814fea1bbbf3952 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 13 Aug 2024 18:37:54 +0200 Subject: [PATCH 313/435] Improve external detection tests for compilers (#45709) Extracted from #44419 This adds / modifies some external detection tests for compilers, to reproduce cases that are currently tested in unit tests. The unit tests will later be removed. --- .../builtin/packages/aocc/detection_test.yaml | 26 ++++++------ .../builtin/packages/cce/detection_test.yaml | 13 ++++++ .../builtin/packages/llvm/detection_test.yaml | 42 ++++++++++++++++--- .../builtin/packages/pgi/detection_test.yaml | 22 ++++++++++ 4 files changed, 84 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/aocc/detection_test.yaml b/var/spack/repos/builtin/packages/aocc/detection_test.yaml index 331ba0ba4a3315..b1949ed1558144 100644 --- a/var/spack/repos/builtin/packages/aocc/detection_test.yaml +++ b/var/spack/repos/builtin/packages/aocc/detection_test.yaml @@ -5,9 +5,9 @@ paths: - "bin/clang++" - "bin/flang" script: | - echo "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)(based on LLVM Mirror.Version.12.0.0)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + echo "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)(based on LLVM Mirror.Version.12.0.0)" + echo "Target: x86_64-unknown-linux-gnu" + echo "Thread model: posix" platforms: [linux] results: - spec: aocc@3.1.0 @@ -21,9 +21,9 @@ paths: - "bin/clang" - "bin/clang++" script: | - echo "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)(based on LLVM Mirror.Version.12.0.0)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + echo "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)(based on LLVM Mirror.Version.12.0.0)" + echo "Target: x86_64-unknown-linux-gnu" + echo "Thread model: posix" platforms: [linux] results: - spec: aocc@3.1.0 @@ -37,17 +37,17 @@ paths: - "bin/clang++" - "bin/flang" script: | - echo "AMD clang version 12.0.0 (CLANG: AOCC_3_0_0-Build#78 2020_12_10)(based on LLVM Mirror.Version.12.0.0)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + echo "AMD clang version 12.0.0 (CLANG: AOCC_3_0_0-Build#78 2020_12_10)(based on LLVM Mirror.Version.12.0.0)" + echo "Target: x86_64-unknown-linux-gnu" + echo "Thread model: posix" - executables: - "bin/clang-11" - "bin/clang++-11" - "bin/flang-11" script: | - echo "AMD clang version 11.0.0 (CLANG: AOCC_2_3_0-Build#85 2020_11_10)(based on LLVM Mirror.Version.11.0.0)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + echo "AMD clang version 11.0.0 (CLANG: AOCC_2_3_0-Build#85 2020_11_10)(based on LLVM Mirror.Version.11.0.0)" + echo "Target: x86_64-unknown-linux-gnu" + echo "Thread model: posix" platforms: [linux] results: - spec: aocc@3.0.0 @@ -67,7 +67,7 @@ paths: - "bin/clang" - "bin/clang++" script: | - echo "clang version 8.0.0 (tags/RELEASE_800/final" + echo "clang version 8.0.0 (tags/RELEASE_800/final)" echo "Target: x86_64-unknown-linux-gnu\n" echo "Thread model: posix\n" echo "InstalledDir: /usr/bin" diff --git a/var/spack/repos/builtin/packages/cce/detection_test.yaml b/var/spack/repos/builtin/packages/cce/detection_test.yaml index b425ab439a6bd3..284dee70ff4d3d 100644 --- a/var/spack/repos/builtin/packages/cce/detection_test.yaml +++ b/var/spack/repos/builtin/packages/cce/detection_test.yaml @@ -42,3 +42,16 @@ paths: c: ".*/bin/craycc" cxx: ".*/bin/crayCC" fortran: ".*/bin/crayftn" + +# Apple Clang should not be detected +- layout: + - executables: + - "bin/clang" + - "bin/clang++" + script: | + echo "Apple clang version 11.0.0 (clang-1100.0.33.8)" + echo "Target: x86_64-apple-darwin19.5.0" + echo "Thread model: posix" + echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin" + platforms: ["darwin"] + results: [] diff --git a/var/spack/repos/builtin/packages/llvm/detection_test.yaml b/var/spack/repos/builtin/packages/llvm/detection_test.yaml index c5bf5aff64816f..860b3061d26d32 100644 --- a/var/spack/repos/builtin/packages/llvm/detection_test.yaml +++ b/var/spack/repos/builtin/packages/llvm/detection_test.yaml @@ -2,12 +2,6 @@ paths: - layout: - executables: - "bin/clang-3.9" - script: | - echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)" - echo "Target: x86_64-pc-linux-gnu" - echo "Thread model: posix" - echo "InstalledDir: /usr/bin" - - executables: - "bin/clang++-3.9" script: | echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)" @@ -22,6 +16,42 @@ paths: c: ".*/bin/clang-3.9$" cxx: ".*/bin/clang[+][+]-3.9$" +# `~` and other weird characters in the version string +- layout: + - executables: + - "bin/clang-6.0" + - "bin/clang++-6.0" + script: | + echo "clang version 6.0.1-svn334776-1~exp1~20181018152737.116 (branches/release_60)" + echo "Target: x86_64-pc-linux-gnu" + echo "Thread model: posix" + echo "InstalledDir: /usr/bin", + + platforms: ["darwin", "linux"] + results: + - spec: 'llvm@6.0.1 +clang~lld~lldb' + extra_attributes: + compilers: + c: ".*/bin/clang-6.0$" + cxx: ".*/bin/clang[+][+]-6.0$" +- layout: + - executables: + - "bin/clang-9.0" + - "bin/clang++-9.0" + script: | + echo "clang version 9.0.1-+201911131414230800840845a1eea-1~exp1~20191113231141.78" + echo "Target: x86_64-pc-linux-gnu" + echo "Thread model: posix" + echo "InstalledDir: /usr/bin" + + platforms: ["darwin", "linux"] + results: + - spec: 'llvm@9.0.1 +clang~lld~lldb' + extra_attributes: + compilers: + c: ".*/bin/clang-9.0$" + cxx: ".*/bin/clang[+][+]-9.0$" + # Multiple LLVM packages in the same prefix - layout: - executables: diff --git a/var/spack/repos/builtin/packages/pgi/detection_test.yaml b/var/spack/repos/builtin/packages/pgi/detection_test.yaml index 1a4745fc4c2d42..ec6268282ea7f2 100644 --- a/var/spack/repos/builtin/packages/pgi/detection_test.yaml +++ b/var/spack/repos/builtin/packages/pgi/detection_test.yaml @@ -9,3 +9,25 @@ paths: platforms: [linux] results: - spec: pgi@15.10 + +- layout: + - executables: + - bin/pgcc + script: | + echo "pgcc 17.4-0 linuxpower target on Linuxpower" + echo "PGI Compilers and Tools" + echo "Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved." + platforms: [linux] + results: + - spec: pgi@17.4 + +- layout: + - executables: + - bin/pgcc + script: | + echo "pgcc-llvm 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell" + echo "PGI Compilers and Tools" + echo "Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved." + platforms: [linux] + results: + - spec: pgi@18.4 From 70eb7506df771e4e9a4ce3da7f062f857d26a974 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Tue, 13 Aug 2024 13:27:47 -0600 Subject: [PATCH 314/435] Add `py-dask` and `py-distributed` 2024.7.1 (#45546) * Add dask 2024.3 and distributed 2024.7 * [@spackbot] updating style on behalf of Chrismarsh --------- Co-authored-by: Chrismarsh --- var/spack/repos/builtin/packages/py-dask/package.py | 5 +++++ var/spack/repos/builtin/packages/py-distributed/package.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index 87403780981414..d117823869af28 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -16,6 +16,7 @@ class PyDask(PythonPackage): license("BSD-3-Clause") + version("2024.7.1", sha256="dbaef2d50efee841a9d981a218cfeb50392fc9a95e0403b6d680450e4f50d531") version("2023.4.1", sha256="9dc72ebb509f58f3fe518c12dd5a488c67123fdd66ccb0b968b34fd11e512153") version("2022.10.2", sha256="42cb43f601709575fa46ce09e74bea83fdd464187024f56954e09d9b428ceaab") version("2021.6.2", sha256="8588fcd1a42224b7cfcd2ebc8ad616734abb6b1a4517efd52d89c7dd66eb91f8") @@ -29,6 +30,7 @@ class PyDask(PythonPackage): variant("dataframe", default=True, description="Install requirements for dask.dataframe") variant("distributed", default=True, description="Install requirements for dask.distributed") variant("diagnostics", default=False, description="Install requirements for dask.diagnostics") + variant( "delayed", default=True, @@ -54,6 +56,7 @@ class PyDask(PythonPackage): depends_on("py-toolz@0.10.0:", type=("build", "run"), when="@2023.4.1:") depends_on("py-partd@0.3.10:", type=("build", "run"), when="@2021.3.1:") depends_on("py-partd@1.2.0:", type=("build", "run"), when="@2023.4.0:") + depends_on("py-partd@1.4.0:", type=("build", "run"), when="@2024.7.1:") depends_on("py-click@7.0:", type=("build", "run"), when="@2022.10.2:") depends_on("py-click@8.0:", type=("build", "run"), when="@2023.4.1:") depends_on("py-importlib-metadata@4.13.0:", type=("build", "run"), when="@2023.4.0:") @@ -89,6 +92,7 @@ class PyDask(PythonPackage): depends_on("py-pandas@0.25.0:", type=("build", "run"), when="@2020.12.0: +dataframe") depends_on("py-pandas@1.0:", type=("build", "run"), when="@2022.10.2: +dataframe") depends_on("py-pandas@1.3:", type=("build", "run"), when="@2023.4.0: +dataframe") + depends_on("py-pandas@2.0:", type=("build", "run"), when="@2024.7.1: +dataframe") # The dependency on py-toolz is non-optional starting version 2021.3.1 depends_on("py-toolz@0.8.2:", type=("build", "run"), when="@:2021.3.0 +dataframe") # The dependency on py-partd is non-optional starting version 2021.3.1 @@ -103,6 +107,7 @@ class PyDask(PythonPackage): depends_on("py-distributed@2021.6.2", type=("build", "run"), when="@2021.6.2 +distributed") depends_on("py-distributed@2022.10.2", type=("build", "run"), when="@2022.10.2 +distributed") depends_on("py-distributed@2023.4.1", type=("build", "run"), when="@2023.4.1 +distributed") + depends_on("py-distributed@2024.7.1", type=("build", "run"), when="@2024.7.1 +distributed") # Requirements for dask.diagnostics depends_on("py-bokeh@1.0.0:1,2.0.1:", type=("build", "run"), when="+diagnostics") diff --git a/var/spack/repos/builtin/packages/py-distributed/package.py b/var/spack/repos/builtin/packages/py-distributed/package.py index 2ee3139845a1db..54d53552dd5cdf 100644 --- a/var/spack/repos/builtin/packages/py-distributed/package.py +++ b/var/spack/repos/builtin/packages/py-distributed/package.py @@ -32,6 +32,7 @@ class PyDistributed(PythonPackage): license("BSD-3-Clause") + version("2024.7.1", sha256="7bce7fa745163b55bdd67fd632b3edf57b31827640390b92d0ee3f73436429d3") version("2023.4.1", sha256="0140376338efdcf8db1d03f7c1fdbb5eab2a337b03e955d927c116824ee94ac5") version("2022.10.2", sha256="53f0a5bf6efab9a5ab3345cd913f6d3f3d4ea444ee2edbea331c7fef96fd67d0") version("2022.2.1", sha256="fb62a75af8ef33bbe1aa80a68c01a33a93c1cd5a332dd017ab44955bf7ecf65b") @@ -57,6 +58,7 @@ class PyDistributed(PythonPackage): depends_on("py-packaging@20.0:", type=("build", "run"), when="@2022.2.1:") depends_on("py-psutil@5.0:", type=("build", "run")) depends_on("py-psutil@5.7.0:", type=("build", "run"), when="@2023.4.1:") + depends_on("py-psutil@5.7.2:", type=("build", "run"), when="@2024.7.1:") depends_on("py-sortedcontainers@:1,2.0.2:", type=("build", "run")) depends_on("py-sortedcontainers@2.0.5:", type=("build", "run"), when="@2023.4.1:") depends_on("py-tblib@1.6:", type=("build", "run")) @@ -67,8 +69,10 @@ class PyDistributed(PythonPackage): depends_on("py-tornado@5:", type=("build", "run"), when="^python@:3.7") depends_on("py-tornado@6.0.3:", type=("build", "run"), when="^python@3.8:") depends_on("py-tornado@6.0.3:6.1", type=("build", "run"), when="@2022.10.2:") + depends_on("py-tornado@6.0.4:", type=("build", "run"), when="@2024.7.1:") depends_on("py-zict@0.1.3:", type=("build", "run")) depends_on("py-zict@2.2.0:", type=("build", "run"), when="@2023.4.1:") + depends_on("py-zict@3.0.0:", type=("build", "run"), when="@2024.7.1:") depends_on("py-pyyaml", type=("build", "run")) depends_on("py-pyyaml@5.3.1:", type=("build", "run"), when="@2023.4.1:") depends_on("py-urllib3", type=("build", "run"), when="@2022.10.2:") From 21a2c3a5914d906b24d8d7881a54d127dfffc293 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Tue, 13 Aug 2024 16:39:51 -0400 Subject: [PATCH 315/435] py-htgettoken: add v2.0-2 (#45688) * Add version 2.0.-2 * Newer version at the top * [@spackbot] updating style on behalf of rahmans1 * py-htgettoken: reorder comments * Use sha256sum instead of commit id for version 2.0-2 and above --------- Co-authored-by: rahmans1 Co-authored-by: Wouter Deconinck --- var/spack/repos/builtin/packages/py-htgettoken/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-htgettoken/package.py b/var/spack/repos/builtin/packages/py-htgettoken/package.py index 152da6f44ce982..ba1c0a8c6e7b16 100644 --- a/var/spack/repos/builtin/packages/py-htgettoken/package.py +++ b/var/spack/repos/builtin/packages/py-htgettoken/package.py @@ -22,10 +22,12 @@ class PyHtgettoken(PythonPackage): license("BSD-3-Clause") + version("2.0-2", sha256="80b1b15cc4957f9d1cb5e71a1fbdc5d0ac82de46a888aeb7fa503b1465978b13") # The following versions refer to setuptools-buildable commits after 1.16; # they are special reproducible version numbers from `git describe` version("1.16-33-g3788bb4", commit="3788bb4733e5e8f856cee51566df9a36cbfe097d") version("1.16-20-g8b72f48", commit="8b72f4800ef99923dac99dbe0756a26266a27886") + # Older versions do not have a python build system depends_on("py-setuptools@30.3:", type="build") From e40c10509d949f89e7ff442e8e5954a365550ec7 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:48:25 -0700 Subject: [PATCH 316/435] mptensor: Changed skiptest, test name, and added docstring (#44909) * mptensor: Changed skiptest, test name, and added docstring * mptensor: make stand-alone test method name and docstring more specific --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../builtin/packages/mptensor/package.py | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/var/spack/repos/builtin/packages/mptensor/package.py b/var/spack/repos/builtin/packages/mptensor/package.py index 5e243f1298a3ed..5558ca62427375 100644 --- a/var/spack/repos/builtin/packages/mptensor/package.py +++ b/var/spack/repos/builtin/packages/mptensor/package.py @@ -70,33 +70,41 @@ def cmake_args(self): def setup_build_tests(self): """Copy the build test files after the package is installed to an install test subdirectory for use during `spack test run`.""" + + # Tests only supported when spec built with mpi + if "+mpi" not in self.spec: + print("Skipping copy of stand-alone test files: requires +mpi build") + return + self.cache_extra_test_sources(".") - def test(self): + # Clean cached makefiles now so only done once + print("Converting cached Makefile for stand-alone test use") + with working_dir(join_path(install_test_root(self), "tests")): + make("clean") + makefile = FileFilter("Makefile") + makefile.filter("g++", f"{spack_cxx}", string=True) + + print("Converting cached Makefile.option for stand-alone test use") + with working_dir(join_path(install_test_root(self))): + makefile = FileFilter("Makefile.option") + makefile.filter("CXX =.*", f"CXX ={self.spec['mpi'].mpicxx}") + makefile.filter("CXXFLAGS =.*", f"CXXFLAGS ={self.compiler.cxx11_flag}") + + def test_tensor_test(self): + """build and run tensor_test""" if "+mpi" not in self.spec: - print("Test of mptensor only runs with +mpi option.") - else: - with working_dir(join_path(self.install_test_root, "tests"), create=False): - make("clean") - makefile = FileFilter("Makefile") - makefile.filter("g++", "{0}".format(spack_cxx), string=True) - - with working_dir(join_path(self.install_test_root), create=False): - makefile = FileFilter("Makefile.option") - makefile.filter("CXX =.*", "CXX ={0}".format(self.spec["mpi"].mpicxx)) - makefile.filter("CXXFLAGS =.*", "CXXFLAGS ={0}".format(self.compiler.cxx11_flag)) - - math_libs = ( - self.spec["scalapack"].libs + self.spec["lapack"].libs + self.spec["blas"].libs - ) + raise SkipTest("Package must be installed with +mpi") + + math_libs = self.spec["scalapack"].libs + self.spec["lapack"].libs + self.spec["blas"].libs - with working_dir(join_path(self.install_test_root, "tests"), create=False): - make("LDFLAGS={0}".format(math_libs.ld_flags)) + with working_dir(self.test_suite.current_test_cache_dir.tests): + make = which("make") + make(f"LDFLAGS={math_libs.ld_flags}") - mpirun = self.spec["mpi"].prefix.bin.mpirun - mpiexec = Executable(mpirun) - mpiexec("-n", "1", "tensor_test.out") + mpirun = which(self.spec["mpi"].prefix.bin.mpirun) + mpirun("-n", "1", "tensor_test.out") - # Test of mptensor has checker - # and checker is abort when check detect any errors. - print("Test of mptensor PASSED !") + # Test of mptensor has checker + # and checker is abort when check detect any errors. + print("Test of mptensor PASSED !") From 8ba6e7eed20faacf77314f3532316f6081b1e9cf Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:58:00 -0700 Subject: [PATCH 317/435] Bugfix: allow test_* build-time and stand-alone tests (#45699) --- lib/spack/spack/install_test.py | 4 ++++ var/spack/repos/builtin/packages/py-shapely/package.py | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/spack/spack/install_test.py b/lib/spack/spack/install_test.py index c27e8ea60ada33..559b5b389c1d2c 100644 --- a/lib/spack/spack/install_test.py +++ b/lib/spack/spack/install_test.py @@ -757,6 +757,10 @@ def test_process(pkg: Pb, kwargs): pkg.tester.status(pkg.spec.name, TestStatus.SKIPPED) return + # Make sure properly named build-time test methods actually run as + # stand-alone tests. + pkg.run_tests = True + # run test methods from the package and all virtuals it provides v_names = virtuals(pkg) test_specs = [pkg.spec] + [spack.spec.Spec(v_name) for v_name in sorted(v_names)] diff --git a/var/spack/repos/builtin/packages/py-shapely/package.py b/var/spack/repos/builtin/packages/py-shapely/package.py index 33c75a934e2844..f00f24170e1d0f 100644 --- a/var/spack/repos/builtin/packages/py-shapely/package.py +++ b/var/spack/repos/builtin/packages/py-shapely/package.py @@ -101,6 +101,7 @@ def setup_dependent_build_environment(self, env, dependent_spec): @run_after("install") @on_package_attributes(run_tests=True) def test_install(self): + """Run pytest tests""" # https://shapely.readthedocs.io/en/latest/installation.html#testing-shapely if self.version >= Version("2"): with working_dir("spack-test", create=True): From 827522d82520cf07aab940c980db189ef2013165 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 18:03:26 -0600 Subject: [PATCH 318/435] build(deps): bump docker/build-push-action from 6.6.1 to 6.7.0 (#45730) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.6.1 to 6.7.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/16ebe778df0e7752d2cfcbd924afdbbd89c1a755...5cd11c3a4ced054e52742c5fd54dca954e0edd85) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 8d20d007608b7c..7be61c076dd43a 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -113,7 +113,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & Deploy ${{ matrix.dockerfile[0] }} - uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 + uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 with: context: dockerfiles/${{ matrix.dockerfile[0] }} platforms: ${{ matrix.dockerfile[1] }} From 374d94edf7e41d9b9c091974055eabf4a7de284f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 14 Aug 2024 05:15:00 +0200 Subject: [PATCH 319/435] py-matplotlib: add v3.9.2 (#45710) --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 7d64014779038d..04b5d63447367e 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -26,6 +26,7 @@ class PyMatplotlib(PythonPackage): license("Apache-2.0") maintainers("adamjstewart", "rgommers") + version("3.9.2", sha256="96ab43906269ca64a6366934106fa01534454a69e471b7bf3d79083981aaab92") version("3.9.1", sha256="de06b19b8db95dd33d0dc17c926c7c9ebed9f572074b6fac4f65068a6814d010") version("3.9.0", sha256="e6d29ea6c19e34b30fb7d88b7081f869a03014f66fe06d62cc77d5a6ea88ed7a") version("3.8.4", sha256="8aac397d5e9ec158960e31c381c5ffc52ddd52bd9a47717e2a694038167dffea") @@ -68,8 +69,8 @@ class PyMatplotlib(PythonPackage): version("3.0.1", sha256="70f8782c50ac2c7617aad0fa5ba59fc49f690a851d6afc0178813c49767644dd") version("3.0.0", sha256="b4e2333c98a7c2c1ff6eb930cd2b57d4b818de5437c5048802096b32f66e65f9") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") # https://matplotlib.org/stable/users/explain/figure/backends.html # matplotlib 3.9+: lib/matplotlib/backends/registry.py From b61cd74707fb37bb09f322060fb123b664d7ebe6 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:36:14 -0700 Subject: [PATCH 320/435] raja: new test API (#45184) * raja: new test API * raja: tweak test method names and docstrings * raja: restore running tests under proper directory * raja: cleanup skiptest message and example call * raja: Tweak expected outputs to match current * raja: test_views -> test_stencil_offset_layout --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/raja/package.py | 90 +++++++++++-------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index d235a618518876..0615ea730080a3 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -400,57 +400,69 @@ def cmake_args(self): @property def build_relpath(self): """Relative path to the cmake build subdirectory.""" - return join_path("..", self.build_dirname) + return join_path("..", self.builder.build_dirname) @run_after("install") def setup_build_tests(self): """Copy the build test files after the package is installed to a relative install test subdirectory for use during `spack test run`.""" # Now copy the relative files - self.cache_extra_test_sources(self.build_relpath) + cache_extra_test_sources(self, self.build_relpath) # Ensure the path exists since relying on a relative path at the # same level as the normal stage source path. - mkdirp(self.install_test_root) + mkdirp(install_test_root(self)) @property def _extra_tests_path(self): # TODO: The tests should be converted to re-build and run examples # TODO: using the installed libraries. - return join_path(self.install_test_root, self.build_relpath, "bin") - - def _test_examples(self): - """Perform very basic checks on a subset of copied examples.""" - checks = [ - ( - "ex5_line-of-sight_solution", - [r"RAJA sequential", r"RAJA OpenMP", r"result -- PASS"], - ), - ( - "ex6_stencil-offset-layout_solution", - [r"RAJA Views \(permuted\)", r"result -- PASS"], - ), - ( - "ex8_tiled-matrix-transpose_solution", - [r"parallel top inner loop", r"collapsed inner loops", r"result -- PASS"], - ), - ("kernel-dynamic-tile", [r"Running index", r"(24,24)"]), - ("plugin-example", [r"Launching host kernel for the 10 time"]), - ("tut_batched-matrix-multiply", [r"result -- PASS"]), - ("wave-eqn", [r"Max Error = 2", r"Evolved solution to time"]), - ] - for exe, expected in checks: - reason = "test: checking output of {0} for {1}".format(exe, expected) - self.run_test( - exe, - [], - expected, - installed=False, - purpose=reason, - skip_missing=True, - work_dir=self._extra_tests_path, - ) + return join_path(install_test_root(self), self.build_relpath, "bin") + + def run_example(self, exe, expected): + """run and check outputs of the example""" + with working_dir(self._extra_tests_path): + example = which(exe) + if example is None: + raise SkipTest(f"{exe} was not built") + + out = example(output=str.split, error=str.split) + check_outputs(expected, out) + + def test_line_of_sight(self): + """check line of sight example""" + self.run_example( + "ex5_line-of-sight_solution", + [r"C-style sequential", r"RAJA sequential", r"result -- PASS"], + ) + + def test_stencil_offset_layout(self): + """check stencil offset layout""" + self.run_example( + "ex6_stencil-offset-layout_solution", [r"RAJA Views \(permuted\)", r"result -- PASS"] + ) + + def test_tiled_matrix(self): + """check tiled matrix transpose""" + self.run_example( + "ex8_tiled-matrix-transpose_solution", + [r"C-version", r"RAJA sequential", r"result -- PASS"], + ) + + def test_dynamic_tile(self): + """check kernel dynamic tile""" + self.run_example("kernel-dynamic-tile", [r"Running index", r"(24,24)"]) + + def test_plugin_example(self): + """check plugin example""" + self.run_example("plugin-example", [r"Launching host kernel for the 10 time"]) + + def test_matrix_multiply(self): + """check batched matrix multiple tutorial""" + self.run_example( + "tut_batched-matrix-multiply", [r"batched matrix multiplication", r"result -- PASS"] + ) - def test(self): - """Perform smoke tests.""" - self._test_examples() + def test_wave_equation(self): + """check wave equation""" + self.run_example("wave-eqn", [r"Max Error = 2", r"Evolved solution to time"]) From 7b10aae3560c6b9f0277b498be79dbe536e708c4 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 14 Aug 2024 10:15:15 +0200 Subject: [PATCH 321/435] Show underlying errors on fetch failure (#45714) - unwrap/flatten nested exceptions - improve tests - unify curl lookup --- lib/spack/spack/fetch_strategy.py | 101 ++++++++-------- lib/spack/spack/stage.py | 34 +++--- lib/spack/spack/test/config.py | 1 + lib/spack/spack/test/conftest.py | 8 +- lib/spack/spack/test/packaging.py | 15 +-- lib/spack/spack/test/stage.py | 25 ++-- lib/spack/spack/test/url_fetch.py | 187 +++++++++++++----------------- lib/spack/spack/test/web.py | 2 +- lib/spack/spack/util/web.py | 65 +++++------ 9 files changed, 198 insertions(+), 240 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 4aa7f339de86d1..4bbc143fc9aae5 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -30,6 +30,7 @@ import shutil import urllib.error import urllib.parse +import urllib.request from pathlib import PurePath from typing import List, Optional @@ -273,10 +274,7 @@ def __init__(self, url=None, checksum=None, **kwargs): @property def curl(self): if not self._curl: - try: - self._curl = which("curl", required=True) - except CommandNotFoundError as exc: - tty.error(str(exc)) + self._curl = web_util.require_curl() return self._curl def source_id(self): @@ -297,27 +295,23 @@ def candidate_urls(self): @_needs_stage def fetch(self): if self.archive_file: - tty.debug("Already downloaded {0}".format(self.archive_file)) + tty.debug(f"Already downloaded {self.archive_file}") return - url = None - errors = [] + errors: List[Exception] = [] for url in self.candidate_urls: - if not web_util.url_exists(url): - tty.debug("URL does not exist: " + url) - continue - try: self._fetch_from_url(url) break except FailedDownloadError as e: - errors.append(str(e)) - - for msg in errors: - tty.debug(msg) + errors.extend(e.exceptions) + else: + raise FailedDownloadError(*errors) if not self.archive_file: - raise FailedDownloadError(url) + raise FailedDownloadError( + RuntimeError(f"Missing archive {self.archive_file} after fetching") + ) def _fetch_from_url(self, url): if spack.config.get("config:url_fetch_method") == "curl": @@ -336,19 +330,20 @@ def _check_headers(self, headers): @_needs_stage def _fetch_urllib(self, url): save_file = self.stage.save_filename - tty.msg("Fetching {0}".format(url)) - # Run urllib but grab the mime type from the http headers + request = urllib.request.Request(url, headers={"User-Agent": web_util.SPACK_USER_AGENT}) + try: - url, headers, response = web_util.read_from_url(url) - except web_util.SpackWebError as e: + response = web_util.urlopen(request) + except (TimeoutError, urllib.error.URLError) as e: # clean up archive on failure. if self.archive_file: os.remove(self.archive_file) if os.path.lexists(save_file): os.remove(save_file) - msg = "urllib failed to fetch with error {0}".format(e) - raise FailedDownloadError(url, msg) + raise FailedDownloadError(e) from e + + tty.msg(f"Fetching {url}") if os.path.lexists(save_file): os.remove(save_file) @@ -356,7 +351,7 @@ def _fetch_urllib(self, url): with open(save_file, "wb") as _open_file: shutil.copyfileobj(response, _open_file) - self._check_headers(str(headers)) + self._check_headers(str(response.headers)) @_needs_stage def _fetch_curl(self, url): @@ -365,7 +360,7 @@ def _fetch_curl(self, url): if self.stage.save_filename: save_file = self.stage.save_filename partial_file = self.stage.save_filename + ".part" - tty.msg("Fetching {0}".format(url)) + tty.msg(f"Fetching {url}") if partial_file: save_args = [ "-C", @@ -405,8 +400,8 @@ def _fetch_curl(self, url): try: web_util.check_curl_code(curl.returncode) - except spack.error.FetchError as err: - raise spack.fetch_strategy.FailedDownloadError(url, str(err)) + except spack.error.FetchError as e: + raise FailedDownloadError(e) from e self._check_headers(headers) @@ -560,7 +555,7 @@ def fetch(self): os.remove(self.archive_file) if os.path.lexists(file): os.remove(file) - raise FailedDownloadError(self.url, f"Failed to fetch {self.url}: {e}") from e + raise FailedDownloadError(e) from e if os.path.lexists(file): os.remove(file) @@ -1312,35 +1307,41 @@ def __init__(self, *args, **kwargs): @_needs_stage def fetch(self): if self.archive_file: - tty.debug("Already downloaded {0}".format(self.archive_file)) + tty.debug(f"Already downloaded {self.archive_file}") return parsed_url = urllib.parse.urlparse(self.url) if parsed_url.scheme != "s3": raise spack.error.FetchError("S3FetchStrategy can only fetch from s3:// urls.") - tty.debug("Fetching {0}".format(self.url)) - basename = os.path.basename(parsed_url.path) + request = urllib.request.Request( + self.url, headers={"User-Agent": web_util.SPACK_USER_AGENT} + ) with working_dir(self.stage.path): - _, headers, stream = web_util.read_from_url(self.url) + try: + response = web_util.urlopen(request) + except (TimeoutError, urllib.error.URLError) as e: + raise FailedDownloadError(e) from e + + tty.debug(f"Fetching {self.url}") with open(basename, "wb") as f: - shutil.copyfileobj(stream, f) + shutil.copyfileobj(response, f) - content_type = web_util.get_header(headers, "Content-type") + content_type = web_util.get_header(response.headers, "Content-type") if content_type == "text/html": warn_content_type_mismatch(self.archive_file or "the archive") if self.stage.save_filename: - llnl.util.filesystem.rename( - os.path.join(self.stage.path, basename), self.stage.save_filename - ) + fs.rename(os.path.join(self.stage.path, basename), self.stage.save_filename) if not self.archive_file: - raise FailedDownloadError(self.url) + raise FailedDownloadError( + RuntimeError(f"Missing archive {self.archive_file} after fetching") + ) @fetcher @@ -1366,17 +1367,23 @@ def fetch(self): if parsed_url.scheme != "gs": raise spack.error.FetchError("GCSFetchStrategy can only fetch from gs:// urls.") - tty.debug("Fetching {0}".format(self.url)) - basename = os.path.basename(parsed_url.path) + request = urllib.request.Request( + self.url, headers={"User-Agent": web_util.SPACK_USER_AGENT} + ) with working_dir(self.stage.path): - _, headers, stream = web_util.read_from_url(self.url) + try: + response = web_util.urlopen(request) + except (TimeoutError, urllib.error.URLError) as e: + raise FailedDownloadError(e) from e + + tty.debug(f"Fetching {self.url}") with open(basename, "wb") as f: - shutil.copyfileobj(stream, f) + shutil.copyfileobj(response, f) - content_type = web_util.get_header(headers, "Content-type") + content_type = web_util.get_header(response.headers, "Content-type") if content_type == "text/html": warn_content_type_mismatch(self.archive_file or "the archive") @@ -1385,7 +1392,9 @@ def fetch(self): os.rename(os.path.join(self.stage.path, basename), self.stage.save_filename) if not self.archive_file: - raise FailedDownloadError(self.url) + raise FailedDownloadError( + RuntimeError(f"Missing archive {self.archive_file} after fetching") + ) @fetcher @@ -1722,9 +1731,9 @@ class NoCacheError(spack.error.FetchError): class FailedDownloadError(spack.error.FetchError): """Raised when a download fails.""" - def __init__(self, url, msg=""): - super().__init__("Failed to fetch file from URL: %s" % url, msg) - self.url = url + def __init__(self, *exceptions: Exception): + super().__init__("Failed to download") + self.exceptions = exceptions class NoArchiveFileError(spack.error.FetchError): diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index a635d95aeb1a37..847c64d03fe6cc 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -13,7 +13,7 @@ import stat import sys import tempfile -from typing import Callable, Dict, Iterable, Optional, Set +from typing import Callable, Dict, Iterable, List, Optional, Set import llnl.string import llnl.util.lang @@ -40,6 +40,7 @@ import spack.resource import spack.spec import spack.stage +import spack.util.crypto import spack.util.lock import spack.util.path as sup import spack.util.pattern as pattern @@ -534,32 +535,29 @@ def generate_fetchers(): for fetcher in dynamic_fetchers: yield fetcher - def print_errors(errors): - for msg in errors: - tty.debug(msg) - - errors = [] + errors: List[str] = [] for fetcher in generate_fetchers(): try: fetcher.stage = self self.fetcher = fetcher self.fetcher.fetch() break - except spack.fetch_strategy.NoCacheError: + except fs.NoCacheError: # Don't bother reporting when something is not cached. continue + except fs.FailedDownloadError as f: + errors.extend(f"{fetcher}: {e.__class__.__name__}: {e}" for e in f.exceptions) + continue except spack.error.SpackError as e: - errors.append("Fetching from {0} failed.".format(fetcher)) - tty.debug(e) + errors.append(f"{fetcher}: {e.__class__.__name__}: {e}") continue else: - print_errors(errors) - self.fetcher = self.default_fetcher - default_msg = "All fetchers failed for {0}".format(self.name) - raise spack.error.FetchError(err_msg or default_msg, None) - - print_errors(errors) + if err_msg: + raise spack.error.FetchError(err_msg) + raise spack.error.FetchError( + f"All fetchers failed for {self.name}", "\n".join(f" {e}" for e in errors) + ) def steal_source(self, dest): """Copy the source_path directory in its entirety to directory dest @@ -1188,7 +1186,7 @@ def _fetch_and_checksum(url, options, keep_stage, action_fn=None): # Checksum the archive and add it to the list checksum = spack.util.crypto.checksum(hashlib.sha256, stage.archive_file) return checksum, None - except FailedDownloadError: + except fs.FailedDownloadError: return None, f"[WORKER] Failed to fetch {url}" except Exception as e: return None, f"[WORKER] Something failed on {url}, skipping. ({e})" @@ -1208,7 +1206,3 @@ class RestageError(StageError): class VersionFetchError(StageError): """Raised when we can't determine a URL to fetch a package.""" - - -# Keep this in namespace for convenience -FailedDownloadError = fs.FailedDownloadError diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 7dccdcc1822ab4..7c1c8f365b6f3e 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -18,6 +18,7 @@ import spack.config import spack.directory_layout import spack.environment as ev +import spack.fetch_strategy import spack.main import spack.package_base import spack.paths diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 8a1f887fbec936..cb978b97f3fc80 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -59,6 +59,7 @@ import spack.util.parallel import spack.util.spack_yaml as syaml import spack.util.url as url_util +import spack.util.web import spack.version from spack.fetch_strategy import URLFetchStrategy from spack.util.pattern import Bunch @@ -1812,12 +1813,7 @@ def __call__(self, *args, **kwargs): tty.msg("curl: (22) The requested URL returned error: 404") self.returncode = 22 - def mock_curl(*args): - return MockCurl() - - monkeypatch.setattr(spack.util.web, "_curl", mock_curl) - - yield + monkeypatch.setattr(spack.util.web, "require_curl", MockCurl) @pytest.fixture(scope="function") diff --git a/lib/spack/spack/test/packaging.py b/lib/spack/spack/test/packaging.py index aa1e50468a59b8..e79cdd91c898ca 100644 --- a/lib/spack/spack/test/packaging.py +++ b/lib/spack/spack/test/packaging.py @@ -11,6 +11,7 @@ import pathlib import platform import shutil +import urllib.error from collections import OrderedDict import pytest @@ -21,6 +22,7 @@ import spack.binary_distribution as bindist import spack.cmd.buildcache as buildcache import spack.error +import spack.fetch_strategy import spack.package_base import spack.repo import spack.store @@ -478,7 +480,7 @@ def test_macho_make_paths(): @pytest.fixture() -def mock_download(): +def mock_download(monkeypatch): """Mock a failing download strategy.""" class FailedDownloadStrategy(spack.fetch_strategy.FetchStrategy): @@ -487,19 +489,14 @@ def mirror_id(self): def fetch(self): raise spack.fetch_strategy.FailedDownloadError( - "", "This FetchStrategy always fails" + urllib.error.URLError("This FetchStrategy always fails") ) - fetcher = FailedDownloadStrategy() - @property def fake_fn(self): - return fetcher + return FailedDownloadStrategy() - orig_fn = spack.package_base.PackageBase.fetcher - spack.package_base.PackageBase.fetcher = fake_fn - yield - spack.package_base.PackageBase.fetcher = orig_fn + monkeypatch.setattr(spack.package_base.PackageBase, "fetcher", fake_fn) @pytest.mark.parametrize( diff --git a/lib/spack/spack/test/stage.py b/lib/spack/spack/test/stage.py index 7bb7f3753ac25c..084d95475cf6fe 100644 --- a/lib/spack/spack/test/stage.py +++ b/lib/spack/spack/test/stage.py @@ -18,6 +18,7 @@ from llnl.util.symlink import readlink import spack.error +import spack.fetch_strategy import spack.paths import spack.stage import spack.util.executable @@ -323,17 +324,11 @@ def _mock(): return _mock -@pytest.fixture -def failing_fetch_strategy(): - """Returns a fetch strategy that fails.""" - - class FailingFetchStrategy(spack.fetch_strategy.FetchStrategy): - def fetch(self): - raise spack.fetch_strategy.FailedDownloadError( - "", "This implementation of FetchStrategy always fails" - ) - - return FailingFetchStrategy() +class FailingFetchStrategy(spack.fetch_strategy.FetchStrategy): + def fetch(self): + raise spack.fetch_strategy.FailedDownloadError( + "", "This implementation of FetchStrategy always fails" + ) @pytest.fixture @@ -511,8 +506,8 @@ def test_no_search_if_default_succeeds(self, mock_stage_archive, failing_search_ stage.fetch() check_destroy(stage, self.stage_name) - def test_no_search_mirror_only(self, failing_fetch_strategy, failing_search_fn): - stage = Stage(failing_fetch_strategy, name=self.stage_name, search_fn=failing_search_fn) + def test_no_search_mirror_only(self, failing_search_fn): + stage = Stage(FailingFetchStrategy(), name=self.stage_name, search_fn=failing_search_fn) with stage: try: stage.fetch(mirror_only=True) @@ -527,8 +522,8 @@ def test_no_search_mirror_only(self, failing_fetch_strategy, failing_search_fn): (None, "All fetchers failed"), ], ) - def test_search_if_default_fails(self, failing_fetch_strategy, search_fn, err_msg, expected): - stage = Stage(failing_fetch_strategy, name=self.stage_name, search_fn=search_fn) + def test_search_if_default_fails(self, search_fn, err_msg, expected): + stage = Stage(FailingFetchStrategy(), name=self.stage_name, search_fn=search_fn) with stage: with pytest.raises(spack.error.FetchError, match=expected): diff --git a/lib/spack/spack/test/url_fetch.py b/lib/spack/spack/test/url_fetch.py index 74505b3688081c..96460cd9b37e62 100644 --- a/lib/spack/spack/test/url_fetch.py +++ b/lib/spack/spack/test/url_fetch.py @@ -4,8 +4,10 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import collections +import filecmp import os import sys +import urllib.error import pytest @@ -24,6 +26,14 @@ from spack.util.executable import which +@pytest.fixture +def missing_curl(monkeypatch): + def require_curl(): + raise spack.error.FetchError("curl is required but not found") + + monkeypatch.setattr(web_util, "require_curl", require_curl) + + @pytest.fixture(params=list(crypto.hashes.keys())) def checksum_type(request): return request.param @@ -66,66 +76,62 @@ def fn_urls(v): return factory -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_urlfetchstrategy_sans_url(_fetch_method): +def test_urlfetchstrategy_sans_url(): """Ensure constructor with no URL fails.""" - with spack.config.override("config:url_fetch_method", _fetch_method): - with pytest.raises(ValueError): - with fs.URLFetchStrategy(None): - pass + with pytest.raises(ValueError): + fs.URLFetchStrategy(None) -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_urlfetchstrategy_bad_url(tmpdir, _fetch_method): +@pytest.mark.parametrize("method", ["curl", "urllib"]) +def test_urlfetchstrategy_bad_url(tmp_path, mutable_config, method): """Ensure fetch with bad URL fails as expected.""" - testpath = str(tmpdir) - with spack.config.override("config:url_fetch_method", _fetch_method): - with pytest.raises(fs.FailedDownloadError): - fetcher = fs.URLFetchStrategy(url="file:///does-not-exist") - assert fetcher is not None + mutable_config.set("config:url_fetch_method", method) + fetcher = fs.URLFetchStrategy(url=(tmp_path / "does-not-exist").as_uri()) - with Stage(fetcher, path=testpath) as stage: - assert stage is not None - assert fetcher.archive_file is None - fetcher.fetch() + with Stage(fetcher, path=str(tmp_path / "stage")): + with pytest.raises(fs.FailedDownloadError) as exc: + fetcher.fetch() + assert len(exc.value.exceptions) == 1 + exception = exc.value.exceptions[0] -def test_fetch_options(tmpdir, mock_archive): - testpath = str(tmpdir) + if method == "curl": + assert isinstance(exception, spack.error.FetchError) + assert "Curl failed with error 37" in str(exception) # FILE_COULDNT_READ_FILE + elif method == "urllib": + assert isinstance(exception, urllib.error.URLError) + assert isinstance(exception.reason, FileNotFoundError) + + +def test_fetch_options(tmp_path, mock_archive): with spack.config.override("config:url_fetch_method", "curl"): fetcher = fs.URLFetchStrategy( url=mock_archive.url, fetch_options={"cookie": "True", "timeout": 10} ) - assert fetcher is not None - with Stage(fetcher, path=testpath) as stage: - assert stage is not None + with Stage(fetcher, path=str(tmp_path)): assert fetcher.archive_file is None fetcher.fetch() + assert filecmp.cmp(fetcher.archive_file, mock_archive.archive_file) @pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_archive_file_errors(tmpdir, mock_archive, _fetch_method): +def test_archive_file_errors(tmp_path, mutable_config, mock_archive, _fetch_method): """Ensure FetchStrategy commands may only be used as intended""" - testpath = str(tmpdir) with spack.config.override("config:url_fetch_method", _fetch_method): fetcher = fs.URLFetchStrategy(url=mock_archive.url) - assert fetcher is not None - with pytest.raises(fs.FailedDownloadError): - with Stage(fetcher, path=testpath) as stage: - assert stage is not None - assert fetcher.archive_file is None - with pytest.raises(fs.NoArchiveFileError): - fetcher.archive(testpath) - with pytest.raises(fs.NoArchiveFileError): - fetcher.expand() - with pytest.raises(fs.NoArchiveFileError): - fetcher.reset() - stage.fetch() - with pytest.raises(fs.NoDigestError): - fetcher.check() - assert fetcher.archive_file is not None - fetcher._fetch_from_url("file:///does-not-exist") + with Stage(fetcher, path=str(tmp_path)) as stage: + assert fetcher.archive_file is None + with pytest.raises(fs.NoArchiveFileError): + fetcher.archive(str(tmp_path)) + with pytest.raises(fs.NoArchiveFileError): + fetcher.expand() + with pytest.raises(fs.NoArchiveFileError): + fetcher.reset() + stage.fetch() + with pytest.raises(fs.NoDigestError): + fetcher.check() + assert filecmp.cmp(fetcher.archive_file, mock_archive.archive_file) files = [(".tar.gz", "z"), (".tgz", "z")] @@ -271,16 +277,15 @@ def is_true(): @pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_url_extra_fetch(tmpdir, mock_archive, _fetch_method): +def test_url_extra_fetch(tmp_path, mutable_config, mock_archive, _fetch_method): """Ensure a fetch after downloading is effectively a no-op.""" - with spack.config.override("config:url_fetch_method", _fetch_method): - testpath = str(tmpdir) - fetcher = fs.URLFetchStrategy(mock_archive.url) - with Stage(fetcher, path=testpath) as stage: - assert fetcher.archive_file is None - stage.fetch() - assert fetcher.archive_file is not None - fetcher.fetch() + mutable_config.set("config:url_fetch_method", _fetch_method) + fetcher = fs.URLFetchStrategy(mock_archive.url) + with Stage(fetcher, path=str(tmp_path)) as stage: + assert fetcher.archive_file is None + stage.fetch() + assert filecmp.cmp(fetcher.archive_file, mock_archive.archive_file) + fetcher.fetch() @pytest.mark.parametrize( @@ -316,49 +321,25 @@ def test_candidate_urls(pkg_factory, url, urls, version, expected, _fetch_method @pytest.mark.regression("19673") -def test_missing_curl(tmpdir, monkeypatch): +def test_missing_curl(tmp_path, missing_curl, mutable_config, monkeypatch): """Ensure a fetch involving missing curl package reports the error.""" - err_fmt = "No such command {0}" - - def _which(*args, **kwargs): - err_msg = err_fmt.format(args[0]) - raise spack.util.executable.CommandNotFoundError(err_msg) - - # Patching the 'which' symbol imported by fetch_strategy needed due - # to 'from spack.util.executable import which' in this module. - monkeypatch.setattr(fs, "which", _which) - - testpath = str(tmpdir) - url = "http://github.com/spack/spack" - with spack.config.override("config:url_fetch_method", "curl"): - fetcher = fs.URLFetchStrategy(url=url) - assert fetcher is not None - with pytest.raises(TypeError, match="object is not callable"): - with Stage(fetcher, path=testpath) as stage: - out = stage.fetch() - assert err_fmt.format("curl") in out + mutable_config.set("config:url_fetch_method", "curl") + fetcher = fs.URLFetchStrategy(url="http://example.com/file.tar.gz") + with pytest.raises(spack.error.FetchError, match="curl is required but not found"): + with Stage(fetcher, path=str(tmp_path)) as stage: + stage.fetch() -def test_url_fetch_text_without_url(tmpdir): +def test_url_fetch_text_without_url(): with pytest.raises(spack.error.FetchError, match="URL is required"): web_util.fetch_url_text(None) -def test_url_fetch_text_curl_failures(tmpdir, monkeypatch): +def test_url_fetch_text_curl_failures(mutable_config, missing_curl, monkeypatch): """Check fetch_url_text if URL's curl is missing.""" - err_fmt = "No such command {0}" - - def _which(*args, **kwargs): - err_msg = err_fmt.format(args[0]) - raise spack.util.executable.CommandNotFoundError(err_msg) - - # Patching the 'which' symbol imported by spack.util.web needed due - # to 'from spack.util.executable import which' in this module. - monkeypatch.setattr(spack.util.web, "which", _which) - - with spack.config.override("config:url_fetch_method", "curl"): - with pytest.raises(spack.error.FetchError, match="Missing required curl"): - web_util.fetch_url_text("https://github.com/") + mutable_config.set("config:url_fetch_method", "curl") + with pytest.raises(spack.error.FetchError, match="curl is required but not found"): + web_util.fetch_url_text("https://example.com/") def test_url_check_curl_errors(): @@ -372,24 +353,14 @@ def test_url_check_curl_errors(): web_util.check_curl_code(60) -def test_url_missing_curl(tmpdir, monkeypatch): +def test_url_missing_curl(mutable_config, missing_curl, monkeypatch): """Check url_exists failures if URL's curl is missing.""" - err_fmt = "No such command {0}" - - def _which(*args, **kwargs): - err_msg = err_fmt.format(args[0]) - raise spack.util.executable.CommandNotFoundError(err_msg) - - # Patching the 'which' symbol imported by spack.util.web needed due - # to 'from spack.util.executable import which' in this module. - monkeypatch.setattr(spack.util.web, "which", _which) - - with spack.config.override("config:url_fetch_method", "curl"): - with pytest.raises(spack.error.FetchError, match="Missing required curl"): - web_util.url_exists("https://github.com/") + mutable_config.set("config:url_fetch_method", "curl") + with pytest.raises(spack.error.FetchError, match="curl is required but not found"): + web_util.url_exists("https://example.com/") -def test_url_fetch_text_urllib_bad_returncode(tmpdir, monkeypatch): +def test_url_fetch_text_urllib_bad_returncode(mutable_config, monkeypatch): class response: def getcode(self): return 404 @@ -397,19 +368,19 @@ def getcode(self): def _read_from_url(*args, **kwargs): return None, None, response() - monkeypatch.setattr(spack.util.web, "read_from_url", _read_from_url) + monkeypatch.setattr(web_util, "read_from_url", _read_from_url) + mutable_config.set("config:url_fetch_method", "urllib") - with spack.config.override("config:url_fetch_method", "urllib"): - with pytest.raises(spack.error.FetchError, match="failed with error code"): - web_util.fetch_url_text("https://github.com/") + with pytest.raises(spack.error.FetchError, match="failed with error code"): + web_util.fetch_url_text("https://example.com/") -def test_url_fetch_text_urllib_web_error(tmpdir, monkeypatch): +def test_url_fetch_text_urllib_web_error(mutable_config, monkeypatch): def _raise_web_error(*args, **kwargs): raise web_util.SpackWebError("bad url") - monkeypatch.setattr(spack.util.web, "read_from_url", _raise_web_error) + monkeypatch.setattr(web_util, "read_from_url", _raise_web_error) + mutable_config.set("config:url_fetch_method", "urllib") - with spack.config.override("config:url_fetch_method", "urllib"): - with pytest.raises(spack.error.FetchError, match="fetch failed to verify"): - web_util.fetch_url_text("https://github.com/") + with pytest.raises(spack.error.FetchError, match="fetch failed to verify"): + web_util.fetch_url_text("https://example.com/") diff --git a/lib/spack/spack/test/web.py b/lib/spack/spack/test/web.py index a2b64798d0b42a..cf89e2e3a48196 100644 --- a/lib/spack/spack/test/web.py +++ b/lib/spack/spack/test/web.py @@ -432,7 +432,7 @@ def test_ssl_curl_cert_file(cert_exists, tmpdir, ssl_scrubbed_env, mutable_confi if cert_exists: open(mock_cert, "w").close() assert os.path.isfile(mock_cert) - curl = spack.util.web._curl() + curl = spack.util.web.require_curl() # arbitrary call to query the run env dump_env = {} diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index b681bb4950ce7f..6b27c6ae68676a 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -28,10 +28,11 @@ import spack.config import spack.error +import spack.util.executable import spack.util.path import spack.util.url as url_util -from .executable import CommandNotFoundError, Executable, which +from .executable import CommandNotFoundError, Executable from .gcs import GCSBlob, GCSBucket, GCSHandler from .s3 import UrllibS3Handler, get_s3_session @@ -198,7 +199,7 @@ def read_from_url(url, accept_content_type=None): try: response = urlopen(request) except (TimeoutError, URLError) as e: - raise SpackWebError(f"Download of {url.geturl()} failed: {e}") + raise SpackWebError(f"Download of {url.geturl()} failed: {e.__class__.__name__}: {e}") if accept_content_type: try: @@ -307,45 +308,44 @@ def base_curl_fetch_args(url, timeout=0): return curl_args -def check_curl_code(returncode): +def check_curl_code(returncode: int) -> None: """Check standard return code failures for provided arguments. Arguments: - returncode (int): curl return code + returncode: curl return code Raises FetchError if the curl returncode indicates failure """ - if returncode != 0: - if returncode == 22: - # This is a 404. Curl will print the error. - raise spack.error.FetchError("URL was not found!") - - if returncode == 60: - # This is a certificate error. Suggest spack -k - raise spack.error.FetchError( - "Curl was unable to fetch due to invalid certificate. " - "This is either an attack, or your cluster's SSL " - "configuration is bad. If you believe your SSL " - "configuration is bad, you can try running spack -k, " - "which will not check SSL certificates." - "Use this at your own risk." - ) + if returncode == 0: + return + elif returncode == 22: + # This is a 404. Curl will print the error. + raise spack.error.FetchError("URL was not found!") + elif returncode == 60: + # This is a certificate error. Suggest spack -k + raise spack.error.FetchError( + "Curl was unable to fetch due to invalid certificate. " + "This is either an attack, or your cluster's SSL " + "configuration is bad. If you believe your SSL " + "configuration is bad, you can try running spack -k, " + "which will not check SSL certificates." + "Use this at your own risk." + ) - raise spack.error.FetchError("Curl failed with error {0}".format(returncode)) + raise spack.error.FetchError(f"Curl failed with error {returncode}") -def _curl(curl=None): - if not curl: - try: - curl = which("curl", required=True) - except CommandNotFoundError as exc: - tty.error(str(exc)) - raise spack.error.FetchError("Missing required curl fetch method") +def require_curl() -> Executable: + try: + path = spack.util.executable.which_string("curl", required=True) + except CommandNotFoundError as e: + raise spack.error.FetchError(f"curl is required but not found: {e}") from e + curl = spack.util.executable.Executable(path) set_curl_env_for_ssl_certs(curl) return curl -def fetch_url_text(url, curl=None, dest_dir="."): +def fetch_url_text(url, curl: Optional[Executable] = None, dest_dir="."): """Retrieves text-only URL content using the configured fetch method. It determines the fetch method from: @@ -379,10 +379,7 @@ def fetch_url_text(url, curl=None, dest_dir="."): fetch_method = spack.config.get("config:url_fetch_method") tty.debug("Using '{0}' to fetch {1} into {2}".format(fetch_method, url, path)) if fetch_method == "curl": - curl_exe = _curl(curl) - if not curl_exe: - raise spack.error.FetchError("Missing required fetch method (curl)") - + curl_exe = curl or require_curl() curl_args = ["-O"] curl_args.extend(base_curl_fetch_args(url)) @@ -439,9 +436,7 @@ def url_exists(url, curl=None): "config:url_fetch_method", "urllib" ) == "curl" and url_result.scheme not in ("gs", "s3") if use_curl: - curl_exe = _curl(curl) - if not curl_exe: - return False + curl_exe = curl or require_curl() # Telling curl to fetch the first byte (-r 0-0) is supposed to be # portable. From 97ffe2e5750711d7b713e8a7263720b1fb90de9f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 14 Aug 2024 11:47:36 +0200 Subject: [PATCH 322/435] Add schema for compiler options in packages.yaml (#45738) --- lib/spack/spack/schema/compilers.py | 46 ++++++++++++++--------------- lib/spack/spack/schema/packages.py | 13 +++++++- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/schema/compilers.py b/lib/spack/spack/schema/compilers.py index 1df696cda987cc..976a9777fcd82d 100644 --- a/lib/spack/spack/schema/compilers.py +++ b/lib/spack/spack/schema/compilers.py @@ -11,6 +11,26 @@ import spack.schema.environment +flags: Dict[str, Any] = { + "type": "object", + "additionalProperties": False, + "properties": { + "cflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "cxxflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "fflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "cppflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "ldflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "ldlibs": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + }, +} + + +extra_rpaths: Dict[str, Any] = {"type": "array", "default": [], "items": {"type": "string"}} + +implicit_rpaths: Dict[str, Any] = { + "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "boolean"}] +} + #: Properties for inclusion in other schemas properties: Dict[str, Any] = { "compilers": { @@ -35,18 +55,7 @@ "fc": {"anyOf": [{"type": "string"}, {"type": "null"}]}, }, }, - "flags": { - "type": "object", - "additionalProperties": False, - "properties": { - "cflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "cxxflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "fflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "cppflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "ldflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "ldlibs": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - }, - }, + "flags": flags, "spec": {"type": "string"}, "operating_system": {"type": "string"}, "target": {"type": "string"}, @@ -54,18 +63,9 @@ "modules": { "anyOf": [{"type": "string"}, {"type": "null"}, {"type": "array"}] }, - "implicit_rpaths": { - "anyOf": [ - {"type": "array", "items": {"type": "string"}}, - {"type": "boolean"}, - ] - }, + "implicit_rpaths": implicit_rpaths, "environment": spack.schema.environment.definition, - "extra_rpaths": { - "type": "array", - "default": [], - "items": {"type": "string"}, - }, + "extra_rpaths": extra_rpaths, }, } }, diff --git a/lib/spack/spack/schema/packages.py b/lib/spack/spack/schema/packages.py index 847b15d91385fa..0acf8411fa20ea 100644 --- a/lib/spack/spack/schema/packages.py +++ b/lib/spack/spack/schema/packages.py @@ -11,6 +11,8 @@ import spack.schema.environment +from .compilers import extra_rpaths, flags, implicit_rpaths + permissions = { "type": "object", "additionalProperties": False, @@ -184,7 +186,16 @@ "type": "object", "additionalProperties": True, "properties": { - "environment": spack.schema.environment.definition + "compilers": { + "type": "object", + "patternProperties": { + r"(^\w[\w-]*)": {"type": "string"} + }, + }, + "environment": spack.schema.environment.definition, + "extra_rpaths": extra_rpaths, + "implicit_rpaths": implicit_rpaths, + "flags": flags, }, }, }, From 03a7da1e44a3e1f3552623af86ff5233372677fd Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 14 Aug 2024 13:52:28 +0200 Subject: [PATCH 323/435] Micro-optimize finding executables (#45740) --- lib/spack/spack/detection/common.py | 8 ++++---- lib/spack/spack/detection/path.py | 11 ++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/detection/common.py b/lib/spack/spack/detection/common.py index ae3c1927d29049..e043c6fb8a46b5 100644 --- a/lib/spack/spack/detection/common.py +++ b/lib/spack/spack/detection/common.py @@ -136,10 +136,10 @@ def path_to_dict(search_paths: List[str]): # entry overrides later entries for search_path in reversed(search_paths): try: - for lib in os.listdir(search_path): - lib_path = os.path.join(search_path, lib) - if llnl.util.filesystem.is_readable_file(lib_path): - path_to_lib[lib_path] = lib + with os.scandir(search_path) as entries: + path_to_lib.update( + {entry.path: entry.name for entry in entries if entry.is_file()} + ) except OSError as e: msg = f"cannot scan '{search_path}' for external software: {str(e)}" llnl.util.tty.debug(msg) diff --git a/lib/spack/spack/detection/path.py b/lib/spack/spack/detection/path.py index 943de16ee668ba..01b83b54727319 100644 --- a/lib/spack/spack/detection/path.py +++ b/lib/spack/spack/detection/path.py @@ -335,13 +335,10 @@ def search_patterns(self, *, pkg: Type["spack.package_base.PackageBase"]) -> Lis def candidate_files(self, *, patterns: List[str], paths: List[str]) -> List[str]: executables_by_path = executables_in_path(path_hints=paths) - patterns = [re.compile(x) for x in patterns] - result = [] - for compiled_re in patterns: - for path, exe in executables_by_path.items(): - if compiled_re.search(exe): - result.append(path) - return list(sorted(set(result))) + joined_pattern = re.compile(r"|".join(patterns)) + result = [path for path, exe in executables_by_path.items() if joined_pattern.search(exe)] + result.sort() + return result def prefix_from_path(self, *, path: str) -> str: result = executable_prefix(path) From 94961ffe0a0c12dab154a435a74c8dc9ac1054a8 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 14 Aug 2024 14:34:35 +0200 Subject: [PATCH 324/435] Optimize marshaling of Repo and RepoPath (#45742) When sending Repo and RepoPath over to a child process, we go through a marshaling procedure with pickle. The default behavior for these classes is highly inefficient, as it serializes a lot of specs that can just be reconstructed on the other end of the pipe. Here we write optimized procedures to __reduce__ both classes. --- lib/spack/spack/detection/path.py | 35 ++++++++++++++++---------- lib/spack/spack/repo.py | 37 +++++++++++++++++++++++++--- lib/spack/spack/test/cmd/external.py | 9 +++++-- 3 files changed, 62 insertions(+), 19 deletions(-) diff --git a/lib/spack/spack/detection/path.py b/lib/spack/spack/detection/path.py index 01b83b54727319..96535e7e484099 100644 --- a/lib/spack/spack/detection/path.py +++ b/lib/spack/spack/detection/path.py @@ -12,7 +12,7 @@ import re import sys import warnings -from typing import Dict, List, Optional, Set, Tuple, Type +from typing import Dict, Iterable, List, Optional, Set, Tuple, Type import llnl.util.filesystem import llnl.util.lang @@ -187,7 +187,7 @@ def libraries_in_windows_paths(path_hints: Optional[List[str]] = None) -> Dict[s return path_to_dict(search_paths) -def _group_by_prefix(paths: Set[str]) -> Dict[str, Set[str]]: +def _group_by_prefix(paths: List[str]) -> Dict[str, Set[str]]: groups = collections.defaultdict(set) for p in paths: groups[os.path.dirname(p)].add(p) @@ -243,7 +243,9 @@ def detect_specs( return [] result = [] - for candidate_path, items_in_prefix in sorted(_group_by_prefix(set(paths)).items()): + for candidate_path, items_in_prefix in _group_by_prefix( + llnl.util.lang.dedupe(paths) + ).items(): # TODO: multiple instances of a package can live in the same # prefix, and a package implementation can return multiple specs # for one prefix, but without additional details (e.g. about the @@ -299,19 +301,17 @@ def detect_specs( return result def find( - self, *, pkg_name: str, initial_guess: Optional[List[str]] = None + self, *, pkg_name: str, repository, initial_guess: Optional[List[str]] = None ) -> List[DetectedPackage]: """For a given package, returns a list of detected specs. Args: pkg_name: package being detected - initial_guess: initial list of paths to search from the caller - if None, default paths are searched. If this - is an empty list, nothing will be searched. + repository: repository to retrieve the package + initial_guess: initial list of paths to search from the caller if None, default paths + are searched. If this is an empty list, nothing will be searched. """ - import spack.repo - - pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name) + pkg_cls = repository.get_pkg_class(pkg_name) patterns = self.search_patterns(pkg=pkg_cls) if not patterns: return [] @@ -382,7 +382,7 @@ def prefix_from_path(self, *, path: str) -> str: def by_path( - packages_to_search: List[str], + packages_to_search: Iterable[str], *, path_hints: Optional[List[str]] = None, max_workers: Optional[int] = None, @@ -396,19 +396,28 @@ def by_path( path_hints: initial list of paths to be searched max_workers: maximum number of workers to search for packages in parallel """ + import spack.repo + # TODO: Packages should be able to define both .libraries and .executables in the future # TODO: determine_spec_details should get all relevant libraries and executables in one call executables_finder, libraries_finder = ExecutablesFinder(), LibrariesFinder() detected_specs_by_package: Dict[str, Tuple[concurrent.futures.Future, ...]] = {} result = collections.defaultdict(list) + repository = spack.repo.PATH.ensure_unwrapped() with concurrent.futures.ProcessPoolExecutor(max_workers=max_workers) as executor: for pkg in packages_to_search: executable_future = executor.submit( - executables_finder.find, pkg_name=pkg, initial_guess=path_hints + executables_finder.find, + pkg_name=pkg, + initial_guess=path_hints, + repository=repository, ) library_future = executor.submit( - libraries_finder.find, pkg_name=pkg, initial_guess=path_hints + libraries_finder.find, + pkg_name=pkg, + initial_guess=path_hints, + repository=repository, ) detected_specs_by_package[pkg] = executable_future, library_future diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 4f42ead467be20..1a8f3fb6e875d8 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -149,12 +149,12 @@ def current_repository(self, value): @contextlib.contextmanager def switch_repo(self, substitute: "RepoType"): """Switch the current repository list for the duration of the context manager.""" - old = self.current_repository + old = self._repo try: - self.current_repository = substitute + self._repo = substitute yield finally: - self.current_repository = old + self._repo = old def find_spec(self, fullname, python_path, target=None): # "target" is not None only when calling importlib.reload() @@ -683,7 +683,7 @@ class RepoPath: def __init__( self, *repos: Union[str, "Repo"], - cache: "spack.caches.FileCacheType", + cache: Optional["spack.caches.FileCacheType"], overrides: Optional[Dict[str, Any]] = None, ) -> None: self.repos: List[Repo] = [] @@ -696,6 +696,7 @@ def __init__( for repo in repos: try: if isinstance(repo, str): + assert cache is not None, "cache must hold a value, when repo is a string" repo = Repo(repo, cache=cache, overrides=overrides) repo.finder(self) self.put_last(repo) @@ -707,6 +708,10 @@ def __init__( f" spack repo rm {repo}", ) + def ensure_unwrapped(self) -> "RepoPath": + """Ensure we unwrap this object from any dynamic wrapper (like Singleton)""" + return self + def put_first(self, repo: "Repo") -> None: """Add repo first in the search path.""" if isinstance(repo, RepoPath): @@ -930,6 +935,16 @@ def is_virtual_safe(self, pkg_name: str) -> bool: def __contains__(self, pkg_name): return self.exists(pkg_name) + def marshal(self): + return (self.repos,) + + @staticmethod + def unmarshal(repos): + return RepoPath(*repos, cache=None) + + def __reduce__(self): + return RepoPath.unmarshal, self.marshal() + class Repo: """Class representing a package repository in the filesystem. @@ -1319,6 +1334,20 @@ def __repr__(self) -> str: def __contains__(self, pkg_name: str) -> bool: return self.exists(pkg_name) + @staticmethod + def unmarshal(root, cache, overrides): + """Helper method to unmarshal keyword arguments""" + return Repo(root, cache=cache, overrides=overrides) + + def marshal(self): + cache = self._cache + if isinstance(cache, llnl.util.lang.Singleton): + cache = cache.instance + return self.root, cache, self.overrides + + def __reduce__(self): + return Repo.unmarshal, self.marshal() + RepoType = Union[Repo, RepoPath] diff --git a/lib/spack/spack/test/cmd/external.py b/lib/spack/spack/test/cmd/external.py index 0573bc04ae11da..d911f8adb594fb 100644 --- a/lib/spack/spack/test/cmd/external.py +++ b/lib/spack/spack/test/cmd/external.py @@ -14,6 +14,7 @@ import spack.cmd.external import spack.detection import spack.detection.path +import spack.repo from spack.main import SpackCommand from spack.spec import Spec @@ -55,7 +56,9 @@ def test_find_external_two_instances_same_package(mock_executable): search_paths = [str(cmake1.parent.parent), str(cmake2.parent.parent)] finder = spack.detection.path.ExecutablesFinder() - detected_specs = finder.find(pkg_name="cmake", initial_guess=search_paths) + detected_specs = finder.find( + pkg_name="cmake", initial_guess=search_paths, repository=spack.repo.PATH + ) assert len(detected_specs) == 2 spec_to_path = {e.spec: e.prefix for e in detected_specs} @@ -263,7 +266,9 @@ def _determine_variants(cls, exes, version_str): monkeypatch.setattr(gcc_cls, "determine_variants", _determine_variants) finder = spack.detection.path.ExecutablesFinder() - detected_specs = finder.find(pkg_name="gcc", initial_guess=[str(search_dir)]) + detected_specs = finder.find( + pkg_name="gcc", initial_guess=[str(search_dir)], repository=spack.repo.PATH + ) assert len(detected_specs) == 1 From 29b50527a614862727e4a62f23379d8a13a62ee7 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 14 Aug 2024 17:19:45 +0200 Subject: [PATCH 325/435] spack buildcache push: parallel in general (#45682) Make spack buildcache push for the non-oci case also parallel, and --update-index more efficieny --- lib/spack/spack/binary_distribution.py | 946 ++++++++++++++----- lib/spack/spack/ci.py | 23 +- lib/spack/spack/cmd/buildcache.py | 512 +--------- lib/spack/spack/cmd/gpg.py | 10 +- lib/spack/spack/hooks/autopush.py | 7 +- lib/spack/spack/oci/oci.py | 11 - lib/spack/spack/test/bindist.py | 23 +- lib/spack/spack/test/build_distribution.py | 56 +- lib/spack/spack/test/ci.py | 2 +- lib/spack/spack/test/cmd/buildcache.py | 13 +- lib/spack/spack/test/cmd/ci.py | 10 +- lib/spack/spack/test/install.py | 4 +- lib/spack/spack/test/oci/integration_test.py | 9 +- lib/spack/spack/util/gpg.py | 10 +- share/spack/spack-completion.bash | 2 +- share/spack/spack-completion.fish | 6 +- 16 files changed, 837 insertions(+), 807 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 26b6396f26464b..adcc5f9b5cc9a5 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -5,6 +5,9 @@ import codecs import collections +import concurrent.futures +import contextlib +import copy import hashlib import io import itertools @@ -22,7 +25,7 @@ import urllib.request import warnings from contextlib import closing -from typing import Dict, Iterable, NamedTuple, Optional, Set, Tuple +from typing import Dict, Generator, Iterable, List, NamedTuple, Optional, Set, Tuple, Union import llnl.util.filesystem as fsys import llnl.util.lang @@ -35,6 +38,7 @@ import spack.config as config import spack.database as spack_db import spack.error +import spack.hash_types as ht import spack.hooks import spack.hooks.sbang import spack.mirror @@ -44,19 +48,39 @@ import spack.platforms import spack.relocate as relocate import spack.repo +import spack.spec import spack.stage import spack.store +import spack.user_environment import spack.util.archive import spack.util.crypto import spack.util.file_cache as file_cache import spack.util.gpg +import spack.util.parallel import spack.util.path import spack.util.spack_json as sjson import spack.util.spack_yaml as syaml import spack.util.timer as timer import spack.util.url as url_util import spack.util.web as web_util +from spack import traverse from spack.caches import misc_cache_location +from spack.oci.image import ( + Digest, + ImageReference, + default_config, + default_index_tag, + default_manifest, + default_tag, + tag_is_spec, +) +from spack.oci.oci import ( + copy_missing_layers_with_retry, + get_manifest_and_config_with_retry, + list_tags, + upload_blob_with_retry, + upload_manifest_with_retry, +) from spack.package_prefs import get_package_dir_permissions, get_package_group from spack.relocate_text import utf8_paths_to_single_binary_regex from spack.spec import Spec @@ -744,34 +768,25 @@ def tarball_path_name(spec, ext): return os.path.join(tarball_directory_name(spec), tarball_name(spec, ext)) -def select_signing_key(key=None): - if key is None: - keys = spack.util.gpg.signing_keys() - if len(keys) == 1: - key = keys[0] - - if len(keys) > 1: - raise PickKeyException(str(keys)) - - if len(keys) == 0: - raise NoKeyException( - "No default key available for signing.\n" - "Use spack gpg init and spack gpg create" - " to create a default key." - ) - return key - +def select_signing_key() -> str: + keys = spack.util.gpg.signing_keys() + num = len(keys) + if num > 1: + raise PickKeyException(str(keys)) + elif num == 0: + raise NoKeyException( + "No default key available for signing.\n" + "Use spack gpg init and spack gpg create" + " to create a default key." + ) + return keys[0] -def sign_specfile(key, force, specfile_path): - signed_specfile_path = "%s.sig" % specfile_path - if os.path.exists(signed_specfile_path): - if force: - os.remove(signed_specfile_path) - else: - raise NoOverwriteException(signed_specfile_path) - key = select_signing_key(key) +def sign_specfile(key: str, specfile_path: str) -> str: + """sign and return the path to the signed specfile""" + signed_specfile_path = f"{specfile_path}.sig" spack.util.gpg.sign(key, specfile_path, signed_specfile_path, clearsign=True) + return signed_specfile_path def _read_specs_and_push_index(file_list, read_method, cache_prefix, db, temp_dir, concurrency): @@ -879,7 +894,7 @@ def file_read_method(file_path): return file_list, read_fn -def _specs_from_cache_fallback(cache_prefix): +def _specs_from_cache_fallback(url: str): """Use spack.util.web module to get a list of all the specs at the remote url. Args: @@ -903,25 +918,25 @@ def url_read_method(url): try: file_list = [ - url_util.join(cache_prefix, entry) - for entry in web_util.list_url(cache_prefix) + url_util.join(url, entry) + for entry in web_util.list_url(url) if entry.endswith("spec.json") or entry.endswith("spec.json.sig") ] read_fn = url_read_method except Exception as err: # If we got some kind of S3 (access denied or other connection error), the first non # boto-specific class in the exception is Exception. Just print a warning and return - tty.warn(f"Encountered problem listing packages at {cache_prefix}: {err}") + tty.warn(f"Encountered problem listing packages at {url}: {err}") return file_list, read_fn -def _spec_files_from_cache(cache_prefix): +def _spec_files_from_cache(url: str): """Get a list of all the spec files in the mirror and a function to read them. Args: - cache_prefix (str): Base url of mirror (location of spec files) + url: Base url of mirror (location of spec files) Return: A tuple where the first item is a list of absolute file paths or @@ -930,56 +945,49 @@ def _spec_files_from_cache(cache_prefix): returning the spec read from that location. """ callbacks = [] - if cache_prefix.startswith("s3"): + if url.startswith("s3://"): callbacks.append(_specs_from_cache_aws_cli) callbacks.append(_specs_from_cache_fallback) for specs_from_cache_fn in callbacks: - file_list, read_fn = specs_from_cache_fn(cache_prefix) + file_list, read_fn = specs_from_cache_fn(url) if file_list: return file_list, read_fn - raise ListMirrorSpecsError("Failed to get list of specs from {0}".format(cache_prefix)) + raise ListMirrorSpecsError("Failed to get list of specs from {0}".format(url)) -def generate_package_index(cache_prefix, concurrency=32): +def generate_package_index(url: str, tmpdir: str, concurrency: int = 32): """Create or replace the build cache index on the given mirror. The buildcache index contains an entry for each binary package under the cache_prefix. Args: - cache_prefix(str): Base url of binary mirror. - concurrency: (int): The desired threading concurrency to use when - fetching the spec files from the mirror. + url: Base url of binary mirror. + concurrency: The desired threading concurrency to use when fetching the spec files from + the mirror. Return: None """ + url = url_util.join(url, build_cache_relative_path()) try: - file_list, read_fn = _spec_files_from_cache(cache_prefix) + file_list, read_fn = _spec_files_from_cache(url) except ListMirrorSpecsError as e: raise GenerateIndexError(f"Unable to generate package index: {e}") from e - tty.debug(f"Retrieving spec descriptor files from {cache_prefix} to build index") - - tmpdir = tempfile.mkdtemp() + tty.debug(f"Retrieving spec descriptor files from {url} to build index") db = BuildCacheDatabase(tmpdir) - db.root = None - db_root_dir = db.database_directory try: - _read_specs_and_push_index(file_list, read_fn, cache_prefix, db, db_root_dir, concurrency) + _read_specs_and_push_index(file_list, read_fn, url, db, db.database_directory, concurrency) except Exception as e: - raise GenerateIndexError( - f"Encountered problem pushing package index to {cache_prefix}: {e}" - ) from e - finally: - shutil.rmtree(tmpdir, ignore_errors=True) + raise GenerateIndexError(f"Encountered problem pushing package index to {url}: {e}") from e -def generate_key_index(key_prefix, tmpdir=None): +def generate_key_index(key_prefix: str, tmpdir: str) -> None: """Create the key index page. Creates (or replaces) the "index.json" page at the location given in key_prefix. This page @@ -997,36 +1005,23 @@ def generate_key_index(key_prefix, tmpdir=None): except Exception as e: raise CannotListKeys(f"Encountered problem listing keys at {key_prefix}: {e}") from e - remove_tmpdir = False - - keys_local = url_util.local_file_path(key_prefix) - if keys_local: - target = os.path.join(keys_local, "index.json") - else: - if not tmpdir: - tmpdir = tempfile.mkdtemp() - remove_tmpdir = True - target = os.path.join(tmpdir, "index.json") + target = os.path.join(tmpdir, "index.json") index = {"keys": dict((fingerprint, {}) for fingerprint in sorted(set(fingerprints)))} with open(target, "w") as f: sjson.dump(index, f) - if not keys_local: - try: - web_util.push_to_url( - target, - url_util.join(key_prefix, "index.json"), - keep_original=False, - extra_args={"ContentType": "application/json"}, - ) - except Exception as e: - raise GenerateIndexError( - f"Encountered problem pushing key index to {key_prefix}: {e}" - ) from e - finally: - if remove_tmpdir: - shutil.rmtree(tmpdir, ignore_errors=True) + try: + web_util.push_to_url( + target, + url_util.join(key_prefix, "index.json"), + keep_original=False, + extra_args={"ContentType": "application/json"}, + ) + except Exception as e: + raise GenerateIndexError( + f"Encountered problem pushing key index to {key_prefix}: {e}" + ) from e def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None: @@ -1077,127 +1072,653 @@ def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict): return inner_checksum.hexdigest(), outer_checksum.hexdigest() -class PushOptions(NamedTuple): - #: Overwrite existing tarball/metadata files in buildcache - force: bool = False +class ExistsInBuildcache(NamedTuple): + signed: bool + unsigned: bool + tarball: bool - #: Regenerated indices after pushing - regenerate_index: bool = False - #: Whether to sign or not. - unsigned: bool = False +class BuildcacheFiles: + def __init__(self, spec: Spec, local: str, remote: str): + """ + Args: + spec: The spec whose tarball and specfile are being managed. + local: The local path to the buildcache. + remote: The remote URL to the buildcache. + """ + self.local = local + self.remote = remote + self.spec = spec + + def remote_specfile(self, signed: bool) -> str: + return url_util.join( + self.remote, + build_cache_relative_path(), + tarball_name(self.spec, ".spec.json.sig" if signed else ".spec.json"), + ) - #: What key to use for signing - key: Optional[str] = None + def remote_tarball(self) -> str: + return url_util.join( + self.remote, build_cache_relative_path(), tarball_path_name(self.spec, ".spack") + ) + def local_specfile(self) -> str: + return os.path.join(self.local, f"{self.spec.dag_hash()}.spec.json") -def push_or_raise(spec: Spec, out_url: str, options: PushOptions): - """ - Build a tarball from given spec and put it into the directory structure - used at the mirror (following ). + def local_tarball(self) -> str: + return os.path.join(self.local, f"{self.spec.dag_hash()}.tar.gz") - This method raises :py:class:`NoOverwriteException` when ``force=False`` and the tarball or - spec.json file already exist in the buildcache. It raises :py:class:`PushToBuildCacheError` - when the tarball or spec.json file cannot be pushed to the buildcache. - """ - if not spec.concrete: - raise ValueError("spec must be concrete to build tarball") - with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: - _build_tarball_in_stage_dir(spec, out_url, stage_dir=tmpdir, options=options) +def _exists_in_buildcache(spec: Spec, tmpdir: str, out_url: str) -> ExistsInBuildcache: + """returns a tuple of bools (signed, unsigned, tarball) indicating whether specfiles/tarballs + exist in the buildcache""" + files = BuildcacheFiles(spec, tmpdir, out_url) + signed = web_util.url_exists(files.remote_specfile(signed=True)) + unsigned = web_util.url_exists(files.remote_specfile(signed=False)) + tarball = web_util.url_exists(files.remote_tarball()) + return ExistsInBuildcache(signed, unsigned, tarball) -def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, options: PushOptions): - cache_prefix = build_cache_prefix(stage_dir) - tarfile_name = tarball_name(spec, ".spack") - tarfile_dir = os.path.join(cache_prefix, tarball_directory_name(spec)) - tarfile_path = os.path.join(tarfile_dir, tarfile_name) - spackfile_path = os.path.join(cache_prefix, tarball_path_name(spec, ".spack")) - remote_spackfile_path = url_util.join(out_url, os.path.relpath(spackfile_path, stage_dir)) +def _upload_tarball_and_specfile( + spec: Spec, tmpdir: str, out_url: str, exists: ExistsInBuildcache, signing_key: Optional[str] +): + files = BuildcacheFiles(spec, tmpdir, out_url) + tarball = files.local_tarball() + checksum, _ = _do_create_tarball(tarball, spec.prefix, get_buildinfo_dict(spec)) + spec_dict = spec.to_dict(hash=ht.dag_hash) + spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION + spec_dict["binary_cache_checksum"] = {"hash_algorithm": "sha256", "hash": checksum} - mkdirp(tarfile_dir) - if web_util.url_exists(remote_spackfile_path): - if options.force: - web_util.remove_url(remote_spackfile_path) - else: - raise NoOverwriteException(url_util.format(remote_spackfile_path)) + if exists.tarball: + web_util.remove_url(files.remote_tarball()) + if exists.signed: + web_util.remove_url(files.remote_specfile(signed=True)) + if exists.unsigned: + web_util.remove_url(files.remote_specfile(signed=False)) + web_util.push_to_url(tarball, files.remote_tarball(), keep_original=False) - # need to copy the spec file so the build cache can be downloaded - # without concretizing with the current spack packages - # and preferences + specfile = files.local_specfile() + with open(specfile, "w") as f: + # Note: when using gpg clear sign, we need to avoid long lines (19995 chars). + # If lines are longer, they are truncated without error. Thanks GPG! + # So, here we still add newlines, but no indent, so save on file size and + # line length. + json.dump(spec_dict, f, indent=0, separators=(",", ":")) - spec_file = spack.store.STORE.layout.spec_file_path(spec) - specfile_name = tarball_name(spec, ".spec.json") - specfile_path = os.path.realpath(os.path.join(cache_prefix, specfile_name)) - signed_specfile_path = "{0}.sig".format(specfile_path) + # sign the tarball and spec file with gpg + if signing_key: + specfile = sign_specfile(signing_key, specfile) - remote_specfile_path = url_util.join( - out_url, os.path.relpath(specfile_path, os.path.realpath(stage_dir)) + web_util.push_to_url( + specfile, files.remote_specfile(signed=bool(signing_key)), keep_original=False ) - remote_signed_specfile_path = "{0}.sig".format(remote_specfile_path) - - # If force and exists, overwrite. Otherwise raise exception on collision. - if options.force: - if web_util.url_exists(remote_specfile_path): - web_util.remove_url(remote_specfile_path) - if web_util.url_exists(remote_signed_specfile_path): - web_util.remove_url(remote_signed_specfile_path) - elif web_util.url_exists(remote_specfile_path) or web_util.url_exists( - remote_signed_specfile_path - ): - raise NoOverwriteException(url_util.format(remote_specfile_path)) - binaries_dir = spec.prefix - # create info for later relocation and create tar - buildinfo = get_buildinfo_dict(spec) +def _format_spec(spec: Spec) -> str: + return spec.cformat("{name}{@version}{/hash:7}") + + +@contextlib.contextmanager +def default_push_context() -> Generator[Tuple[str, concurrent.futures.Executor], None, None]: + with tempfile.TemporaryDirectory( + dir=spack.stage.get_stage_root() + ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: + yield tmpdir, executor - checksum, _ = _do_create_tarball(tarfile_path, binaries_dir, buildinfo) - # add sha256 checksum to spec.json - with open(spec_file, "r") as inputfile: - content = inputfile.read() - if spec_file.endswith(".json"): - spec_dict = sjson.load(content) +def push_or_raise( + specs: List[Spec], + out_url: str, + signing_key: Optional[str], + force: bool = False, + update_index: bool = False, +) -> List[Spec]: + """Same as push, but raises an exception on error. Returns a list of skipped specs already + present in the build cache when force=False.""" + skipped, errors = push(specs, out_url, signing_key, force, update_index) + if errors: + raise PushToBuildCacheError( + f"Failed to push {len(errors)} specs to {out_url}:\n" + + "\n".join(f"Failed to push {_format_spec(spec)}: {error}" for spec, error in errors) + ) + return skipped + + +def push( + specs: List[Spec], + out_url: str, + signing_key: Optional[str], + force: bool = False, + update_index: bool = False, +) -> Tuple[List[Spec], List[Tuple[Spec, BaseException]]]: + """Pushes to the provided build cache, and returns a list of skipped specs that were already + present (when force=False). Does not raise on error.""" + with default_push_context() as (tmpdir, executor): + return _push(specs, out_url, signing_key, force, update_index, tmpdir, executor) + + +class FancyProgress: + def __init__(self, total: int): + self.n = 0 + self.total = total + self.running = False + self.enable = sys.stdout.isatty() + self.pretty_spec: str = "" + self.pre = "" + + def _clear(self): + if self.enable and self.running: + sys.stdout.write("\033[F\033[K") + + def _progress(self): + if self.total > 1: + digits = len(str(self.total)) + return f"[{self.n:{digits}}/{self.total}] " + return "" + + def start(self, spec: Spec, running: bool) -> None: + self.n += 1 + self.running = running + self.pre = self._progress() + self.pretty_spec = _format_spec(spec) + if self.enable and self.running: + tty.info(f"{self.pre}Pushing {self.pretty_spec}...") + + def ok(self, msg: Optional[str] = None) -> None: + self._clear() + msg = msg or f"Pushed {self.pretty_spec}" + tty.info(f"{self.pre}{msg}") + + def fail(self) -> None: + self._clear() + tty.info(f"{self.pre}Failed to push {self.pretty_spec}") + + +def _push( + specs: List[Spec], + out_url: str, + signing_key: Optional[str], + force: bool, + update_index: bool, + tmpdir: str, + executor: concurrent.futures.Executor, +) -> Tuple[List[Spec], List[Tuple[Spec, BaseException]]]: + """Pushes to the provided build cache, and returns a list of skipped specs that were already + present (when force=False), and a list of errors. Does not raise on error.""" + skipped: List[Spec] = [] + errors: List[Tuple[Spec, BaseException]] = [] + + exists_futures = [ + executor.submit(_exists_in_buildcache, spec, tmpdir, out_url) for spec in specs + ] + + exists = { + spec.dag_hash(): exists_future.result() + for spec, exists_future in zip(specs, exists_futures) + } + + if not force: + specs_to_upload = [] + + for spec in specs: + signed, unsigned, tarball = exists[spec.dag_hash()] + if (signed or unsigned) and tarball: + skipped.append(spec) + else: + specs_to_upload.append(spec) + else: + specs_to_upload = specs + + if not specs_to_upload: + return skipped, errors + + total = len(specs_to_upload) + + if total != len(specs): + tty.info(f"{total} specs need to be pushed to {out_url}") + + upload_futures = [ + executor.submit( + _upload_tarball_and_specfile, + spec, + tmpdir, + out_url, + exists[spec.dag_hash()], + signing_key, + ) + for spec in specs_to_upload + ] + + uploaded_any = False + fancy_progress = FancyProgress(total) + + for spec, upload_future in zip(specs_to_upload, upload_futures): + fancy_progress.start(spec, upload_future.running()) + error = upload_future.exception() + if error is None: + uploaded_any = True + fancy_progress.ok() else: - raise ValueError("{0} not a valid spec file type".format(spec_file)) - spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION - spec_dict["binary_cache_checksum"] = {"hash_algorithm": "sha256", "hash": checksum} + fancy_progress.fail() + errors.append((spec, error)) - with open(specfile_path, "w") as outfile: - # Note: when using gpg clear sign, we need to avoid long lines (19995 chars). - # If lines are longer, they are truncated without error. Thanks GPG! - # So, here we still add newlines, but no indent, so save on file size and - # line length. - json.dump(spec_dict, outfile, indent=0, separators=(",", ":")) + # don't bother pushing keys / index if all failed to upload + if not uploaded_any: + return skipped, errors + + if signing_key: + keys_tmpdir = os.path.join(tmpdir, "keys") + os.mkdir(keys_tmpdir) + push_keys(out_url, keys=[signing_key], update_index=update_index, tmpdir=keys_tmpdir) + + if update_index: + index_tmpdir = os.path.join(tmpdir, "index") + os.mkdir(index_tmpdir) + generate_package_index(out_url, index_tmpdir) + + return skipped, errors + + +def _oci_upload_success_msg(spec: Spec, digest: Digest, size: int, elapsed: float): + elapsed = max(elapsed, 0.001) # guard against division by zero + return ( + f"Pushed {_format_spec(spec)}: {digest} ({elapsed:.2f}s, " + f"{size / elapsed / 1024 / 1024:.2f} MB/s)" + ) - # sign the tarball and spec file with gpg - if not options.unsigned: - key = select_signing_key(options.key) - sign_specfile(key, options.force, specfile_path) +def _oci_get_blob_info(image_ref: ImageReference) -> Optional[spack.oci.oci.Blob]: + """Get the spack tarball layer digests and size if it exists""" try: - # push tarball and signed spec json to remote mirror - web_util.push_to_url(spackfile_path, remote_spackfile_path, keep_original=False) - web_util.push_to_url( - signed_specfile_path if not options.unsigned else specfile_path, - remote_signed_specfile_path if not options.unsigned else remote_specfile_path, - keep_original=False, + manifest, config = get_manifest_and_config_with_retry(image_ref) + + return spack.oci.oci.Blob( + compressed_digest=Digest.from_string(manifest["layers"][-1]["digest"]), + uncompressed_digest=Digest.from_string(config["rootfs"]["diff_ids"][-1]), + size=manifest["layers"][-1]["size"], ) - except Exception as e: - raise PushToBuildCacheError( - f"Encountered problem pushing binary {remote_spackfile_path}: {e}" - ) from e + except Exception: + return None + + +def _oci_push_pkg_blob( + image_ref: ImageReference, spec: spack.spec.Spec, tmpdir: str +) -> Tuple[spack.oci.oci.Blob, float]: + """Push a package blob to the registry and return the blob info and the time taken""" + filename = os.path.join(tmpdir, f"{spec.dag_hash()}.tar.gz") + + # Create an oci.image.layer aka tarball of the package + compressed_tarfile_checksum, tarfile_checksum = spack.oci.oci.create_tarball(spec, filename) + + blob = spack.oci.oci.Blob( + Digest.from_sha256(compressed_tarfile_checksum), + Digest.from_sha256(tarfile_checksum), + os.path.getsize(filename), + ) + + # Upload the blob + start = time.time() + upload_blob_with_retry(image_ref, file=filename, digest=blob.compressed_digest) + elapsed = time.time() - start + + # delete the file + os.unlink(filename) - # push the key to the build cache's _pgp directory so it can be - # imported - if not options.unsigned: - push_keys(out_url, keys=[key], regenerate_index=options.regenerate_index, tmpdir=stage_dir) + return blob, elapsed - # create an index.json for the build_cache directory so specs can be - # found - if options.regenerate_index: - generate_package_index(url_util.join(out_url, os.path.relpath(cache_prefix, stage_dir))) + +def _oci_retrieve_env_dict_from_config(config: dict) -> dict: + """Retrieve the environment variables from the image config file. + Sets a default value for PATH if it is not present. + + Args: + config (dict): The image config file. + + Returns: + dict: The environment variables. + """ + env = {"PATH": "/bin:/usr/bin"} + + if "Env" in config.get("config", {}): + for entry in config["config"]["Env"]: + key, value = entry.split("=", 1) + env[key] = value + return env + + +def _oci_archspec_to_gooarch(spec: spack.spec.Spec) -> str: + name = spec.target.family.name + name_map = {"aarch64": "arm64", "x86_64": "amd64"} + return name_map.get(name, name) + + +def _oci_put_manifest( + base_images: Dict[str, Tuple[dict, dict]], + checksums: Dict[str, spack.oci.oci.Blob], + image_ref: ImageReference, + tmpdir: str, + extra_config: Optional[dict], + annotations: Optional[dict], + *specs: spack.spec.Spec, +): + architecture = _oci_archspec_to_gooarch(specs[0]) + + expected_blobs: List[Spec] = [ + s + for s in traverse.traverse_nodes(specs, order="topo", deptype=("link", "run"), root=True) + if not s.external + ] + expected_blobs.reverse() + + base_manifest, base_config = base_images[architecture] + env = _oci_retrieve_env_dict_from_config(base_config) + + # If the base image uses `vnd.docker.distribution.manifest.v2+json`, then we use that too. + # This is because Singularity / Apptainer is very strict about not mixing them. + base_manifest_mediaType = base_manifest.get( + "mediaType", "application/vnd.oci.image.manifest.v1+json" + ) + use_docker_format = ( + base_manifest_mediaType == "application/vnd.docker.distribution.manifest.v2+json" + ) + + spack.user_environment.environment_modifications_for_specs(*specs).apply_modifications(env) + + # Create an oci.image.config file + config = copy.deepcopy(base_config) + + # Add the diff ids of the blobs + for s in expected_blobs: + # If a layer for a dependency has gone missing (due to removed manifest in the registry, a + # failed push, or a local forced uninstall), we cannot create a runnable container image. + # If an OCI registry is only used for storage, this is not a hard error, but for now we + # raise an exception unconditionally, until someone requests a more lenient behavior. + checksum = checksums.get(s.dag_hash()) + if not checksum: + raise MissingLayerError(f"missing layer for {_format_spec(s)}") + config["rootfs"]["diff_ids"].append(str(checksum.uncompressed_digest)) + + # Set the environment variables + config["config"]["Env"] = [f"{k}={v}" for k, v in env.items()] + + if extra_config: + # From the OCI v1.0 spec: + # > Any extra fields in the Image JSON struct are considered implementation + # > specific and MUST be ignored by any implementations which are unable to + # > interpret them. + config.update(extra_config) + + config_file = os.path.join(tmpdir, f"{specs[0].dag_hash()}.config.json") + + with open(config_file, "w") as f: + json.dump(config, f, separators=(",", ":")) + + config_file_checksum = Digest.from_sha256( + spack.util.crypto.checksum(hashlib.sha256, config_file) + ) + + # Upload the config file + upload_blob_with_retry(image_ref, file=config_file, digest=config_file_checksum) + + manifest = { + "mediaType": base_manifest_mediaType, + "schemaVersion": 2, + "config": { + "mediaType": base_manifest["config"]["mediaType"], + "digest": str(config_file_checksum), + "size": os.path.getsize(config_file), + }, + "layers": [ + *(layer for layer in base_manifest["layers"]), + *( + { + "mediaType": ( + "application/vnd.docker.image.rootfs.diff.tar.gzip" + if use_docker_format + else "application/vnd.oci.image.layer.v1.tar+gzip" + ), + "digest": str(checksums[s.dag_hash()].compressed_digest), + "size": checksums[s.dag_hash()].size, + } + for s in expected_blobs + ), + ], + } + + if not use_docker_format and annotations: + manifest["annotations"] = annotations + + # Finally upload the manifest + upload_manifest_with_retry(image_ref, manifest=manifest) + + # delete the config file + os.unlink(config_file) + + +def _oci_update_base_images( + *, + base_image: Optional[ImageReference], + target_image: ImageReference, + spec: spack.spec.Spec, + base_image_cache: Dict[str, Tuple[dict, dict]], +): + """For a given spec and base image, copy the missing layers of the base image with matching + arch to the registry of the target image. If no base image is specified, create a dummy + manifest and config file.""" + architecture = _oci_archspec_to_gooarch(spec) + if architecture in base_image_cache: + return + if base_image is None: + base_image_cache[architecture] = ( + default_manifest(), + default_config(architecture, "linux"), + ) + else: + base_image_cache[architecture] = copy_missing_layers_with_retry( + base_image, target_image, architecture + ) + + +def _push_oci( + *, + target_image: ImageReference, + base_image: Optional[ImageReference], + installed_specs_with_deps: List[Spec], + tmpdir: str, + executor: concurrent.futures.Executor, + force: bool = False, +) -> Tuple[ + List[Spec], + Dict[str, Tuple[dict, dict]], + Dict[str, spack.oci.oci.Blob], + List[Tuple[Spec, BaseException]], +]: + + # Spec dag hash -> blob + checksums: Dict[str, spack.oci.oci.Blob] = {} + + # arch -> (manifest, config) + base_images: Dict[str, Tuple[dict, dict]] = {} + + # Specs not uploaded because they already exist + skipped: List[Spec] = [] + + if not force: + tty.info("Checking for existing specs in the buildcache") + blobs_to_upload = [] + + tags_to_check = (target_image.with_tag(default_tag(s)) for s in installed_specs_with_deps) + available_blobs = executor.map(_oci_get_blob_info, tags_to_check) + + for spec, maybe_blob in zip(installed_specs_with_deps, available_blobs): + if maybe_blob is not None: + checksums[spec.dag_hash()] = maybe_blob + skipped.append(spec) + else: + blobs_to_upload.append(spec) + else: + blobs_to_upload = installed_specs_with_deps + + if not blobs_to_upload: + return skipped, base_images, checksums, [] + + if len(blobs_to_upload) != len(installed_specs_with_deps): + tty.info( + f"{len(blobs_to_upload)} specs need to be pushed to " + f"{target_image.domain}/{target_image.name}" + ) + + blob_progress = FancyProgress(len(blobs_to_upload)) + + # Upload blobs + blob_futures = [ + executor.submit(_oci_push_pkg_blob, target_image, spec, tmpdir) for spec in blobs_to_upload + ] + + manifests_to_upload: List[Spec] = [] + errors: List[Tuple[Spec, BaseException]] = [] + + # And update the spec to blob mapping for successful uploads + for spec, blob_future in zip(blobs_to_upload, blob_futures): + blob_progress.start(spec, blob_future.running()) + error = blob_future.exception() + if error is None: + blob, elapsed = blob_future.result() + blob_progress.ok( + _oci_upload_success_msg(spec, blob.compressed_digest, blob.size, elapsed) + ) + manifests_to_upload.append(spec) + checksums[spec.dag_hash()] = blob + else: + blob_progress.fail() + errors.append((spec, error)) + + # Copy base images if necessary + for spec in manifests_to_upload: + _oci_update_base_images( + base_image=base_image, + target_image=target_image, + spec=spec, + base_image_cache=base_images, + ) + + def extra_config(spec: Spec): + spec_dict = spec.to_dict(hash=ht.dag_hash) + spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION + spec_dict["binary_cache_checksum"] = { + "hash_algorithm": "sha256", + "hash": checksums[spec.dag_hash()].compressed_digest.digest, + } + return spec_dict + + # Upload manifests + tty.info("Uploading manifests") + manifest_futures = [ + executor.submit( + _oci_put_manifest, + base_images, + checksums, + target_image.with_tag(default_tag(spec)), + tmpdir, + extra_config(spec), + {"org.opencontainers.image.description": spec.format()}, + spec, + ) + for spec in manifests_to_upload + ] + + manifest_progress = FancyProgress(len(manifests_to_upload)) + + # Print the image names of the top-level specs + for spec, manifest_future in zip(manifests_to_upload, manifest_futures): + error = manifest_future.exception() + manifest_progress.start(spec, manifest_future.running()) + if error is None: + manifest_progress.ok( + f"Tagged {_format_spec(spec)} as {target_image.with_tag(default_tag(spec))}" + ) + else: + manifest_progress.fail() + errors.append((spec, error)) + + return skipped, base_images, checksums, errors + + +def _oci_config_from_tag(image_ref_and_tag: Tuple[ImageReference, str]) -> Optional[dict]: + image_ref, tag = image_ref_and_tag + # Don't allow recursion here, since Spack itself always uploads + # vnd.oci.image.manifest.v1+json, not vnd.oci.image.index.v1+json + _, config = get_manifest_and_config_with_retry(image_ref.with_tag(tag), tag, recurse=0) + + # Do very basic validation: if "spec" is a key in the config, it + # must be a Spec object too. + return config if "spec" in config else None + + +def _oci_update_index( + image_ref: ImageReference, tmpdir: str, pool: concurrent.futures.Executor +) -> None: + tags = list_tags(image_ref) + + # Fetch all image config files in parallel + spec_dicts = pool.map( + _oci_config_from_tag, ((image_ref, tag) for tag in tags if tag_is_spec(tag)) + ) + + # Populate the database + db_root_dir = os.path.join(tmpdir, "db_root") + db = BuildCacheDatabase(db_root_dir) + + for spec_dict in spec_dicts: + spec = Spec.from_dict(spec_dict) + db.add(spec, directory_layout=None) + db.mark(spec, "in_buildcache", True) + + # Create the index.json file + index_json_path = os.path.join(tmpdir, "index.json") + with open(index_json_path, "w") as f: + db._write_to_file(f) + + # Create an empty config.json file + empty_config_json_path = os.path.join(tmpdir, "config.json") + with open(empty_config_json_path, "wb") as f: + f.write(b"{}") + + # Upload the index.json file + index_shasum = Digest.from_sha256(spack.util.crypto.checksum(hashlib.sha256, index_json_path)) + upload_blob_with_retry(image_ref, file=index_json_path, digest=index_shasum) + + # Upload the config.json file + empty_config_digest = Digest.from_sha256( + spack.util.crypto.checksum(hashlib.sha256, empty_config_json_path) + ) + upload_blob_with_retry(image_ref, file=empty_config_json_path, digest=empty_config_digest) + + # Push a manifest file that references the index.json file as a layer + # Notice that we push this as if it is an image, which it of course is not. + # When the ORAS spec becomes official, we can use that instead of a fake image. + # For now we just use the OCI image spec, so that we don't run into issues with + # automatic garbage collection of blobs that are not referenced by any image manifest. + oci_manifest = { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "schemaVersion": 2, + # Config is just an empty {} file for now, and irrelevant + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": str(empty_config_digest), + "size": os.path.getsize(empty_config_json_path), + }, + # The buildcache index is the only layer, and is not a tarball, we lie here. + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": str(index_shasum), + "size": os.path.getsize(index_json_path), + } + ], + } + + upload_manifest_with_retry(image_ref.with_tag(default_index_tag), oci_manifest) def try_verify(specfile_path): @@ -2124,67 +2645,32 @@ def get_keys(install=False, trust=False, force=False, mirrors=None): ) -def push_keys(*mirrors, **kwargs): - """ - Upload pgp public keys to the given mirrors - """ - keys = kwargs.get("keys") - regenerate_index = kwargs.get("regenerate_index", False) - tmpdir = kwargs.get("tmpdir") - remove_tmpdir = False +def push_keys( + *mirrors: Union[spack.mirror.Mirror, str], + keys: List[str], + tmpdir: str, + update_index: bool = False, +): + """Upload pgp public keys to the given mirrors""" + keys = spack.util.gpg.public_keys(*(keys or ())) + files = [os.path.join(tmpdir, f"{key}.pub") for key in keys] - keys = spack.util.gpg.public_keys(*(keys or [])) + for key, file in zip(keys, files): + spack.util.gpg.export_keys(file, [key]) - try: - for mirror in mirrors: - push_url = getattr(mirror, "push_url", mirror) - keys_url = url_util.join( - push_url, BUILD_CACHE_RELATIVE_PATH, BUILD_CACHE_KEYS_RELATIVE_PATH - ) - keys_local = url_util.local_file_path(keys_url) + for mirror in mirrors: + push_url = mirror if isinstance(mirror, str) else mirror.push_url + keys_url = url_util.join( + push_url, BUILD_CACHE_RELATIVE_PATH, BUILD_CACHE_KEYS_RELATIVE_PATH + ) - verb = "Writing" if keys_local else "Uploading" - tty.debug("{0} public keys to {1}".format(verb, url_util.format(push_url))) + tty.debug(f"Pushing public keys to {url_util.format(push_url)}") - if keys_local: # mirror is local, don't bother with the tmpdir - prefix = keys_local - mkdirp(keys_local) - else: - # A tmp dir is created for the first mirror that is non-local. - # On the off-hand chance that all the mirrors are local, then - # we can avoid the need to create a tmp dir. - if tmpdir is None: - tmpdir = tempfile.mkdtemp() - remove_tmpdir = True - prefix = tmpdir - - for fingerprint in keys: - tty.debug(" " + fingerprint) - filename = fingerprint + ".pub" - - export_target = os.path.join(prefix, filename) - - # Export public keys (private is set to False) - spack.util.gpg.export_keys(export_target, [fingerprint]) - - # If mirror is local, the above export writes directly to the - # mirror (export_target points directly to the mirror). - # - # If not, then export_target is a tmpfile that needs to be - # uploaded to the mirror. - if not keys_local: - spack.util.web.push_to_url( - export_target, url_util.join(keys_url, filename), keep_original=False - ) + for key, file in zip(keys, files): + web_util.push_to_url(file, url_util.join(keys_url, os.path.basename(file))) - if regenerate_index: - if keys_local: - generate_key_index(keys_url) - else: - generate_key_index(keys_url, tmpdir) - finally: - if remove_tmpdir: - shutil.rmtree(tmpdir) + if update_index: + generate_key_index(keys_url, tmpdir=tmpdir) def needs_rebuild(spec, mirror_url): @@ -2610,3 +3096,7 @@ class CannotListKeys(GenerateIndexError): class PushToBuildCacheError(spack.error.SpackError): """Raised when unable to push objects to binary mirror""" + + +class MissingLayerError(spack.error.SpackError): + """Raised when a required layer for a dependency is missing in an OCI registry.""" diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 95e23cc64fd616..57a15bbd545a0e 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -38,6 +38,7 @@ import spack.paths import spack.repo import spack.spec +import spack.stage import spack.util.git import spack.util.gpg as gpg_util import spack.util.spack_yaml as syaml @@ -1370,15 +1371,6 @@ def can_verify_binaries(): return len(gpg_util.public_keys()) >= 1 -def _push_to_build_cache(spec: spack.spec.Spec, sign_binaries: bool, mirror_url: str) -> None: - """Unchecked version of the public API, for easier mocking""" - bindist.push_or_raise( - spec, - spack.mirror.Mirror.from_url(mirror_url).push_url, - bindist.PushOptions(force=True, unsigned=not sign_binaries), - ) - - def push_to_build_cache(spec: spack.spec.Spec, mirror_url: str, sign_binaries: bool) -> bool: """Push one or more binary packages to the mirror. @@ -1389,20 +1381,13 @@ def push_to_build_cache(spec: spack.spec.Spec, mirror_url: str, sign_binaries: b sign_binaries: If True, spack will attempt to sign binary package before pushing. """ tty.debug(f"Pushing to build cache ({'signed' if sign_binaries else 'unsigned'})") + signing_key = bindist.select_signing_key() if sign_binaries else None try: - _push_to_build_cache(spec, sign_binaries, mirror_url) + bindist.push_or_raise([spec], out_url=mirror_url, signing_key=signing_key) return True except bindist.PushToBuildCacheError as e: - tty.error(str(e)) + tty.error(f"Problem writing to {mirror_url}: {e}") return False - except Exception as e: - # TODO (zackgalbreath): write an adapter for boto3 exceptions so we can catch a specific - # exception instead of parsing str(e)... - msg = str(e) - if any(x in msg for x in ["Access Denied", "InvalidAccessKeyId"]): - tty.error(f"Permission problem writing to {mirror_url}: {msg}") - return False - raise def remove_other_mirrors(mirrors_to_keep, scope=None): diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 78d8e7a00cec99..2da4a561f013c6 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -3,16 +3,13 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import argparse -import concurrent.futures -import copy import glob -import hashlib import json import os import shutil import sys import tempfile -from typing import Dict, List, Optional, Tuple +from typing import List, Tuple import llnl.util.tty as tty from llnl.string import plural @@ -24,7 +21,6 @@ import spack.deptypes as dt import spack.environment as ev import spack.error -import spack.hash_types as ht import spack.mirror import spack.oci.oci import spack.oci.opener @@ -41,22 +37,7 @@ from spack import traverse from spack.cmd import display_specs from spack.cmd.common import arguments -from spack.oci.image import ( - Digest, - ImageReference, - default_config, - default_index_tag, - default_manifest, - default_tag, - tag_is_spec, -) -from spack.oci.oci import ( - copy_missing_layers_with_retry, - get_manifest_and_config_with_retry, - list_tags, - upload_blob_with_retry, - upload_manifest_with_retry, -) +from spack.oci.image import ImageReference from spack.spec import Spec, save_dependency_specfiles description = "create, download and install binary packages" @@ -340,13 +321,6 @@ def _format_spec(spec: Spec) -> str: return spec.cformat("{name}{@version}{/hash:7}") -def _progress(i: int, total: int): - if total > 1: - digits = len(str(total)) - return f"[{i+1:{digits}}/{total}] " - return "" - - def _skip_no_redistribute_for_public(specs): remaining_specs = list() removed_specs = list() @@ -372,7 +346,7 @@ class PackagesAreNotInstalledError(spack.error.SpackError): def __init__(self, specs: List[Spec]): super().__init__( "Cannot push non-installed packages", - ", ".join(elide_list(list(_format_spec(s) for s in specs), 5)), + ", ".join(elide_list([_format_spec(s) for s in specs], 5)), ) @@ -380,10 +354,6 @@ class PackageNotInstalledError(spack.error.SpackError): """Raised when a spec is not installed but picked to be packaged.""" -class MissingLayerError(spack.error.SpackError): - """Raised when a required layer for a dependency is missing in an OCI registry.""" - - def _specs_to_be_packaged( requested: List[Spec], things_to_install: str, build_deps: bool ) -> List[Spec]: @@ -394,7 +364,7 @@ def _specs_to_be_packaged( deptype = dt.ALL else: deptype = dt.RUN | dt.LINK | dt.TEST - return [ + specs = [ s for s in traverse.traverse_nodes( requested, @@ -405,6 +375,8 @@ def _specs_to_be_packaged( ) if not s.external ] + specs.reverse() + return specs def push_fn(args): @@ -445,6 +417,10 @@ def push_fn(args): "Code signing is currently not supported for OCI images. " "Use --unsigned to silence this warning." ) + unsigned = True + + # Select a signing key, or None if unsigned. + signing_key = None if unsigned else (args.key or bindist.select_signing_key()) specs = _specs_to_be_packaged( roots, @@ -471,13 +447,10 @@ def push_fn(args): (s, PackageNotInstalledError("package not installed")) for s in not_installed ) - # TODO: move into bindist.push_or_raise - if target_image: - base_image = ImageReference.from_string(args.base_image) if args.base_image else None - with tempfile.TemporaryDirectory( - dir=spack.stage.get_stage_root() - ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: - skipped, base_images, checksums, upload_errors = _push_oci( + with bindist.default_push_context() as (tmpdir, executor): + if target_image: + base_image = ImageReference.from_string(args.base_image) if args.base_image else None + skipped, base_images, checksums, upload_errors = bindist._push_oci( target_image=target_image, base_image=base_image, installed_specs_with_deps=specs, @@ -495,46 +468,28 @@ def push_fn(args): tagged_image = target_image.with_tag(args.tag) # _push_oci may not populate base_images if binaries were already in the registry for spec in roots: - _update_base_images( + bindist._oci_update_base_images( base_image=base_image, target_image=target_image, spec=spec, base_image_cache=base_images, ) - _put_manifest(base_images, checksums, tagged_image, tmpdir, None, None, *roots) - tty.info(f"Tagged {tagged_image}") - - else: - skipped = [] - - for i, spec in enumerate(specs): - try: - bindist.push_or_raise( - spec, - push_url, - bindist.PushOptions( - force=args.force, - unsigned=unsigned, - key=args.key, - regenerate_index=args.update_index, - ), + bindist._oci_put_manifest( + base_images, checksums, tagged_image, tmpdir, None, None, *roots ) + tty.info(f"Tagged {tagged_image}") - msg = f"{_progress(i, len(specs))}Pushed {_format_spec(spec)}" - if len(specs) == 1: - msg += f" to {push_url}" - tty.info(msg) - - except bindist.NoOverwriteException: - skipped.append(_format_spec(spec)) - - # Catch any other exception unless the fail fast option is set - except Exception as e: - if args.fail_fast or isinstance( - e, (bindist.PickKeyException, bindist.NoKeyException) - ): - raise - failed.append((spec, e)) + else: + skipped, upload_errors = bindist._push( + specs, + out_url=push_url, + force=args.force, + update_index=args.update_index, + signing_key=signing_key, + tmpdir=tmpdir, + executor=executor, + ) + failed.extend(upload_errors) if skipped: if len(specs) == 1: @@ -567,409 +522,12 @@ def push_fn(args): ), ) - # Update the index if requested - # TODO: remove update index logic out of bindist; should be once after all specs are pushed - # not once per spec. + # Update the OCI index if requested if target_image and len(skipped) < len(specs) and args.update_index: with tempfile.TemporaryDirectory( dir=spack.stage.get_stage_root() ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: - _update_index_oci(target_image, tmpdir, executor) - - -def _get_spack_binary_blob(image_ref: ImageReference) -> Optional[spack.oci.oci.Blob]: - """Get the spack tarball layer digests and size if it exists""" - try: - manifest, config = get_manifest_and_config_with_retry(image_ref) - - return spack.oci.oci.Blob( - compressed_digest=Digest.from_string(manifest["layers"][-1]["digest"]), - uncompressed_digest=Digest.from_string(config["rootfs"]["diff_ids"][-1]), - size=manifest["layers"][-1]["size"], - ) - except Exception: - return None - - -def _push_single_spack_binary_blob(image_ref: ImageReference, spec: spack.spec.Spec, tmpdir: str): - filename = os.path.join(tmpdir, f"{spec.dag_hash()}.tar.gz") - - # Create an oci.image.layer aka tarball of the package - compressed_tarfile_checksum, tarfile_checksum = spack.oci.oci.create_tarball(spec, filename) - - blob = spack.oci.oci.Blob( - Digest.from_sha256(compressed_tarfile_checksum), - Digest.from_sha256(tarfile_checksum), - os.path.getsize(filename), - ) - - # Upload the blob - upload_blob_with_retry(image_ref, file=filename, digest=blob.compressed_digest) - - # delete the file - os.unlink(filename) - - return blob - - -def _retrieve_env_dict_from_config(config: dict) -> dict: - """Retrieve the environment variables from the image config file. - Sets a default value for PATH if it is not present. - - Args: - config (dict): The image config file. - - Returns: - dict: The environment variables. - """ - env = {"PATH": "/bin:/usr/bin"} - - if "Env" in config.get("config", {}): - for entry in config["config"]["Env"]: - key, value = entry.split("=", 1) - env[key] = value - return env - - -def _archspec_to_gooarch(spec: spack.spec.Spec) -> str: - name = spec.target.family.name - name_map = {"aarch64": "arm64", "x86_64": "amd64"} - return name_map.get(name, name) - - -def _put_manifest( - base_images: Dict[str, Tuple[dict, dict]], - checksums: Dict[str, spack.oci.oci.Blob], - image_ref: ImageReference, - tmpdir: str, - extra_config: Optional[dict], - annotations: Optional[dict], - *specs: spack.spec.Spec, -): - architecture = _archspec_to_gooarch(specs[0]) - - expected_blobs: List[Spec] = [ - s - for s in traverse.traverse_nodes(specs, order="topo", deptype=("link", "run"), root=True) - if not s.external - ] - expected_blobs.reverse() - - base_manifest, base_config = base_images[architecture] - env = _retrieve_env_dict_from_config(base_config) - - # If the base image uses `vnd.docker.distribution.manifest.v2+json`, then we use that too. - # This is because Singularity / Apptainer is very strict about not mixing them. - base_manifest_mediaType = base_manifest.get( - "mediaType", "application/vnd.oci.image.manifest.v1+json" - ) - use_docker_format = ( - base_manifest_mediaType == "application/vnd.docker.distribution.manifest.v2+json" - ) - - spack.user_environment.environment_modifications_for_specs(*specs).apply_modifications(env) - - # Create an oci.image.config file - config = copy.deepcopy(base_config) - - # Add the diff ids of the blobs - for s in expected_blobs: - # If a layer for a dependency has gone missing (due to removed manifest in the registry, a - # failed push, or a local forced uninstall), we cannot create a runnable container image. - # If an OCI registry is only used for storage, this is not a hard error, but for now we - # raise an exception unconditionally, until someone requests a more lenient behavior. - checksum = checksums.get(s.dag_hash()) - if not checksum: - raise MissingLayerError(f"missing layer for {_format_spec(s)}") - config["rootfs"]["diff_ids"].append(str(checksum.uncompressed_digest)) - - # Set the environment variables - config["config"]["Env"] = [f"{k}={v}" for k, v in env.items()] - - if extra_config: - # From the OCI v1.0 spec: - # > Any extra fields in the Image JSON struct are considered implementation - # > specific and MUST be ignored by any implementations which are unable to - # > interpret them. - config.update(extra_config) - - config_file = os.path.join(tmpdir, f"{specs[0].dag_hash()}.config.json") - - with open(config_file, "w") as f: - json.dump(config, f, separators=(",", ":")) - - config_file_checksum = Digest.from_sha256( - spack.util.crypto.checksum(hashlib.sha256, config_file) - ) - - # Upload the config file - upload_blob_with_retry(image_ref, file=config_file, digest=config_file_checksum) - - manifest = { - "mediaType": base_manifest_mediaType, - "schemaVersion": 2, - "config": { - "mediaType": base_manifest["config"]["mediaType"], - "digest": str(config_file_checksum), - "size": os.path.getsize(config_file), - }, - "layers": [ - *(layer for layer in base_manifest["layers"]), - *( - { - "mediaType": ( - "application/vnd.docker.image.rootfs.diff.tar.gzip" - if use_docker_format - else "application/vnd.oci.image.layer.v1.tar+gzip" - ), - "digest": str(checksums[s.dag_hash()].compressed_digest), - "size": checksums[s.dag_hash()].size, - } - for s in expected_blobs - ), - ], - } - - if not use_docker_format and annotations: - manifest["annotations"] = annotations - - # Finally upload the manifest - upload_manifest_with_retry(image_ref, manifest=manifest) - - # delete the config file - os.unlink(config_file) - - -def _update_base_images( - *, - base_image: Optional[ImageReference], - target_image: ImageReference, - spec: spack.spec.Spec, - base_image_cache: Dict[str, Tuple[dict, dict]], -): - """For a given spec and base image, copy the missing layers of the base image with matching - arch to the registry of the target image. If no base image is specified, create a dummy - manifest and config file.""" - architecture = _archspec_to_gooarch(spec) - if architecture in base_image_cache: - return - if base_image is None: - base_image_cache[architecture] = ( - default_manifest(), - default_config(architecture, "linux"), - ) - else: - base_image_cache[architecture] = copy_missing_layers_with_retry( - base_image, target_image, architecture - ) - - -def _push_oci( - *, - target_image: ImageReference, - base_image: Optional[ImageReference], - installed_specs_with_deps: List[Spec], - tmpdir: str, - executor: concurrent.futures.Executor, - force: bool = False, -) -> Tuple[ - List[str], - Dict[str, Tuple[dict, dict]], - Dict[str, spack.oci.oci.Blob], - List[Tuple[Spec, BaseException]], -]: - """Push specs to an OCI registry - - Args: - image_ref: The target OCI image - base_image: Optional base image, which will be copied to the target registry. - installed_specs_with_deps: The installed specs to push, excluding externals, - including deps, ordered from roots to leaves. - force: Whether to overwrite existing layers and manifests in the buildcache. - - Returns: - A tuple consisting of the list of skipped specs already in the build cache, - a dictionary mapping architectures to base image manifests and configs, - a dictionary mapping each spec's dag hash to a blob, - and a list of tuples of specs with errors of failed uploads. - """ - - # Reverse the order - installed_specs_with_deps = list(reversed(installed_specs_with_deps)) - - # Spec dag hash -> blob - checksums: Dict[str, spack.oci.oci.Blob] = {} - - # arch -> (manifest, config) - base_images: Dict[str, Tuple[dict, dict]] = {} - - # Specs not uploaded because they already exist - skipped = [] - - if not force: - tty.info("Checking for existing specs in the buildcache") - blobs_to_upload = [] - - tags_to_check = (target_image.with_tag(default_tag(s)) for s in installed_specs_with_deps) - available_blobs = executor.map(_get_spack_binary_blob, tags_to_check) - - for spec, maybe_blob in zip(installed_specs_with_deps, available_blobs): - if maybe_blob is not None: - checksums[spec.dag_hash()] = maybe_blob - skipped.append(_format_spec(spec)) - else: - blobs_to_upload.append(spec) - else: - blobs_to_upload = installed_specs_with_deps - - if not blobs_to_upload: - return skipped, base_images, checksums, [] - - tty.info( - f"{len(blobs_to_upload)} specs need to be pushed to " - f"{target_image.domain}/{target_image.name}" - ) - - # Upload blobs - blob_futures = [ - executor.submit(_push_single_spack_binary_blob, target_image, spec, tmpdir) - for spec in blobs_to_upload - ] - - concurrent.futures.wait(blob_futures) - - manifests_to_upload: List[Spec] = [] - errors: List[Tuple[Spec, BaseException]] = [] - - # And update the spec to blob mapping for successful uploads - for spec, blob_future in zip(blobs_to_upload, blob_futures): - error = blob_future.exception() - if error is None: - manifests_to_upload.append(spec) - checksums[spec.dag_hash()] = blob_future.result() - else: - errors.append((spec, error)) - - # Copy base images if necessary - for spec in manifests_to_upload: - _update_base_images( - base_image=base_image, - target_image=target_image, - spec=spec, - base_image_cache=base_images, - ) - - def extra_config(spec: Spec): - spec_dict = spec.to_dict(hash=ht.dag_hash) - spec_dict["buildcache_layout_version"] = bindist.CURRENT_BUILD_CACHE_LAYOUT_VERSION - spec_dict["binary_cache_checksum"] = { - "hash_algorithm": "sha256", - "hash": checksums[spec.dag_hash()].compressed_digest.digest, - } - return spec_dict - - # Upload manifests - tty.info("Uploading manifests") - manifest_futures = [ - executor.submit( - _put_manifest, - base_images, - checksums, - target_image.with_tag(default_tag(spec)), - tmpdir, - extra_config(spec), - {"org.opencontainers.image.description": spec.format()}, - spec, - ) - for spec in manifests_to_upload - ] - - concurrent.futures.wait(manifest_futures) - - # Print the image names of the top-level specs - for spec, manifest_future in zip(manifests_to_upload, manifest_futures): - error = manifest_future.exception() - if error is None: - tty.info(f"Pushed {_format_spec(spec)} to {target_image.with_tag(default_tag(spec))}") - else: - errors.append((spec, error)) - - return skipped, base_images, checksums, errors - - -def _config_from_tag(image_ref_and_tag: Tuple[ImageReference, str]) -> Optional[dict]: - image_ref, tag = image_ref_and_tag - # Don't allow recursion here, since Spack itself always uploads - # vnd.oci.image.manifest.v1+json, not vnd.oci.image.index.v1+json - _, config = get_manifest_and_config_with_retry(image_ref.with_tag(tag), tag, recurse=0) - - # Do very basic validation: if "spec" is a key in the config, it - # must be a Spec object too. - return config if "spec" in config else None - - -def _update_index_oci( - image_ref: ImageReference, tmpdir: str, pool: concurrent.futures.Executor -) -> None: - tags = list_tags(image_ref) - - # Fetch all image config files in parallel - spec_dicts = pool.map(_config_from_tag, ((image_ref, tag) for tag in tags if tag_is_spec(tag))) - - # Populate the database - db_root_dir = os.path.join(tmpdir, "db_root") - db = bindist.BuildCacheDatabase(db_root_dir) - - for spec_dict in spec_dicts: - spec = Spec.from_dict(spec_dict) - db.add(spec, directory_layout=None) - db.mark(spec, "in_buildcache", True) - - # Create the index.json file - index_json_path = os.path.join(tmpdir, "index.json") - with open(index_json_path, "w") as f: - db._write_to_file(f) - - # Create an empty config.json file - empty_config_json_path = os.path.join(tmpdir, "config.json") - with open(empty_config_json_path, "wb") as f: - f.write(b"{}") - - # Upload the index.json file - index_shasum = Digest.from_sha256(spack.util.crypto.checksum(hashlib.sha256, index_json_path)) - upload_blob_with_retry(image_ref, file=index_json_path, digest=index_shasum) - - # Upload the config.json file - empty_config_digest = Digest.from_sha256( - spack.util.crypto.checksum(hashlib.sha256, empty_config_json_path) - ) - upload_blob_with_retry(image_ref, file=empty_config_json_path, digest=empty_config_digest) - - # Push a manifest file that references the index.json file as a layer - # Notice that we push this as if it is an image, which it of course is not. - # When the ORAS spec becomes official, we can use that instead of a fake image. - # For now we just use the OCI image spec, so that we don't run into issues with - # automatic garbage collection of blobs that are not referenced by any image manifest. - oci_manifest = { - "mediaType": "application/vnd.oci.image.manifest.v1+json", - "schemaVersion": 2, - # Config is just an empty {} file for now, and irrelevant - "config": { - "mediaType": "application/vnd.oci.image.config.v1+json", - "digest": str(empty_config_digest), - "size": os.path.getsize(empty_config_json_path), - }, - # The buildcache index is the only layer, and is not a tarball, we lie here. - "layers": [ - { - "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", - "digest": str(index_shasum), - "size": os.path.getsize(index_json_path), - } - ], - } - - upload_manifest_with_retry(image_ref.with_tag(default_index_tag), oci_manifest) + bindist._oci_update_index(target_image, tmpdir, executor) def install_fn(args): @@ -1251,13 +809,14 @@ def update_index(mirror: spack.mirror.Mirror, update_keys=False): with tempfile.TemporaryDirectory( dir=spack.stage.get_stage_root() ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: - _update_index_oci(image_ref, tmpdir, executor) + bindist._oci_update_index(image_ref, tmpdir, executor) return # Otherwise, assume a normal mirror. url = mirror.push_url - bindist.generate_package_index(url_util.join(url, bindist.build_cache_relative_path())) + with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: + bindist.generate_package_index(url, tmpdir) if update_keys: keys_url = url_util.join( @@ -1265,7 +824,8 @@ def update_index(mirror: spack.mirror.Mirror, update_keys=False): ) try: - bindist.generate_key_index(keys_url) + with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: + bindist.generate_key_index(keys_url, tmpdir) except bindist.CannotListKeys as e: # Do not error out if listing keys went wrong. This usually means that the _gpg path # does not exist. TODO: distinguish between this and other errors. diff --git a/lib/spack/spack/cmd/gpg.py b/lib/spack/spack/cmd/gpg.py index d05db0a61e9493..d16b03b7bcb7f4 100644 --- a/lib/spack/spack/cmd/gpg.py +++ b/lib/spack/spack/cmd/gpg.py @@ -5,10 +5,12 @@ import argparse import os +import tempfile import spack.binary_distribution import spack.mirror import spack.paths +import spack.stage import spack.util.gpg import spack.util.url from spack.cmd.common import arguments @@ -115,6 +117,7 @@ def setup_parser(subparser): help="URL of the mirror where keys will be published", ) publish.add_argument( + "--update-index", "--rebuild-index", action="store_true", default=False, @@ -220,9 +223,10 @@ def gpg_publish(args): elif args.mirror_url: mirror = spack.mirror.Mirror(args.mirror_url, args.mirror_url) - spack.binary_distribution.push_keys( - mirror, keys=args.keys, regenerate_index=args.rebuild_index - ) + with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: + spack.binary_distribution.push_keys( + mirror, keys=args.keys, tmpdir=tmpdir, update_index=args.update_index + ) def gpg(parser, args): diff --git a/lib/spack/spack/hooks/autopush.py b/lib/spack/spack/hooks/autopush.py index 1974c8d3ab4001..cb951b7b4b4ecc 100644 --- a/lib/spack/spack/hooks/autopush.py +++ b/lib/spack/spack/hooks/autopush.py @@ -23,9 +23,6 @@ def post_install(spec, explicit): # Push the package to all autopush mirrors for mirror in spack.mirror.MirrorCollection(binary=True, autopush=True).values(): - bindist.push_or_raise( - spec, - mirror.push_url, - bindist.PushOptions(force=True, regenerate_index=False, unsigned=not mirror.signed), - ) + signing_key = bindist.select_signing_key() if mirror.signed else None + bindist.push_or_raise([spec], out_url=mirror.push_url, signing_key=signing_key, force=True) tty.msg(f"{spec.name}: Pushed to build cache: '{mirror.name}'") diff --git a/lib/spack/spack/oci/oci.py b/lib/spack/spack/oci/oci.py index 09e79df347dcd7..bbe403400bba7d 100644 --- a/lib/spack/spack/oci/oci.py +++ b/lib/spack/spack/oci/oci.py @@ -6,7 +6,6 @@ import hashlib import json import os -import time import urllib.error import urllib.parse import urllib.request @@ -43,11 +42,6 @@ def create_tarball(spec: spack.spec.Spec, tarfile_path): return spack.binary_distribution._do_create_tarball(tarfile_path, spec.prefix, buildinfo) -def _log_upload_progress(digest: Digest, size: int, elapsed: float): - elapsed = max(elapsed, 0.001) # guard against division by zero - tty.info(f"Uploaded {digest} ({elapsed:.2f}s, {size / elapsed / 1024 / 1024:.2f} MB/s)") - - def with_query_param(url: str, param: str, value: str) -> str: """Add a query parameter to a URL @@ -141,8 +135,6 @@ def upload_blob( if not force and blob_exists(ref, digest, _urlopen): return False - start = time.time() - with open(file, "rb") as f: file_size = os.fstat(f.fileno()).st_size @@ -167,7 +159,6 @@ def upload_blob( # Created the blob in one go. if response.status == 201: - _log_upload_progress(digest, file_size, time.time() - start) return True # Otherwise, do another PUT request. @@ -191,8 +182,6 @@ def upload_blob( spack.oci.opener.ensure_status(request, response, 201) - # print elapsed time and # MB/s - _log_upload_progress(digest, file_size, time.time() - start) return True diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index d80ddfe6e5d60e..06cff7f5f7611d 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -337,7 +337,7 @@ def test_relative_rpaths_install_nondefault(mirror_dir): buildcache_cmd("install", "-uf", cspec.name) -def test_push_and_fetch_keys(mock_gnupghome): +def test_push_and_fetch_keys(mock_gnupghome, tmp_path): testpath = str(mock_gnupghome) mirror = os.path.join(testpath, "mirror") @@ -357,7 +357,7 @@ def test_push_and_fetch_keys(mock_gnupghome): assert len(keys) == 1 fpr = keys[0] - bindist.push_keys(mirror, keys=[fpr], regenerate_index=True) + bindist.push_keys(mirror, keys=[fpr], tmpdir=str(tmp_path), update_index=True) # dir 2: import the key from the mirror, and confirm that its fingerprint # matches the one created above @@ -464,7 +464,7 @@ def test_generate_index_missing(monkeypatch, tmpdir, mutable_config): assert "libelf" not in cache_list -def test_generate_key_index_failure(monkeypatch): +def test_generate_key_index_failure(monkeypatch, tmp_path): def list_url(url, recursive=False): if "fails-listing" in url: raise Exception("Couldn't list the directory") @@ -477,13 +477,13 @@ def push_to_url(*args, **kwargs): monkeypatch.setattr(web_util, "push_to_url", push_to_url) with pytest.raises(CannotListKeys, match="Encountered problem listing keys"): - bindist.generate_key_index("s3://non-existent/fails-listing") + bindist.generate_key_index("s3://non-existent/fails-listing", str(tmp_path)) with pytest.raises(GenerateIndexError, match="problem pushing .* Couldn't upload"): - bindist.generate_key_index("s3://non-existent/fails-uploading") + bindist.generate_key_index("s3://non-existent/fails-uploading", str(tmp_path)) -def test_generate_package_index_failure(monkeypatch, capfd): +def test_generate_package_index_failure(monkeypatch, tmp_path, capfd): def mock_list_url(url, recursive=False): raise Exception("Some HTTP error") @@ -492,15 +492,16 @@ def mock_list_url(url, recursive=False): test_url = "file:///fake/keys/dir" with pytest.raises(GenerateIndexError, match="Unable to generate package index"): - bindist.generate_package_index(test_url) + bindist.generate_package_index(test_url, str(tmp_path)) assert ( - f"Warning: Encountered problem listing packages at {test_url}: Some HTTP error" + "Warning: Encountered problem listing packages at " + f"{test_url}/{bindist.BUILD_CACHE_RELATIVE_PATH}: Some HTTP error" in capfd.readouterr().err ) -def test_generate_indices_exception(monkeypatch, capfd): +def test_generate_indices_exception(monkeypatch, tmp_path, capfd): def mock_list_url(url, recursive=False): raise Exception("Test Exception handling") @@ -509,10 +510,10 @@ def mock_list_url(url, recursive=False): url = "file:///fake/keys/dir" with pytest.raises(GenerateIndexError, match=f"Encountered problem listing keys at {url}"): - bindist.generate_key_index(url) + bindist.generate_key_index(url, str(tmp_path)) with pytest.raises(GenerateIndexError, match="Unable to generate package index"): - bindist.generate_package_index(url) + bindist.generate_package_index(url, str(tmp_path)) assert f"Encountered problem listing packages at {url}" in capfd.readouterr().err diff --git a/lib/spack/spack/test/build_distribution.py b/lib/spack/spack/test/build_distribution.py index 6ab68659e613b0..4ad621ab0d0541 100644 --- a/lib/spack/spack/test/build_distribution.py +++ b/lib/spack/spack/test/build_distribution.py @@ -13,34 +13,34 @@ import spack.spec import spack.util.url -install = spack.main.SpackCommand("install") - pytestmark = pytest.mark.not_on_windows("does not run on windows") -def test_build_tarball_overwrite(install_mockery, mock_fetch, monkeypatch, tmpdir): - with tmpdir.as_cwd(): - spec = spack.spec.Spec("trivial-install-test-package").concretized() - install(str(spec)) - - # Runs fine the first time, throws the second time - out_url = spack.util.url.path_to_file_url(str(tmpdir)) - bd.push_or_raise(spec, out_url, bd.PushOptions(unsigned=True)) - with pytest.raises(bd.NoOverwriteException): - bd.push_or_raise(spec, out_url, bd.PushOptions(unsigned=True)) - - # Should work fine with force=True - bd.push_or_raise(spec, out_url, bd.PushOptions(force=True, unsigned=True)) - - # Remove the tarball and try again. - # This must *also* throw, because of the existing .spec.json file - os.remove( - os.path.join( - bd.build_cache_prefix("."), - bd.tarball_directory_name(spec), - bd.tarball_name(spec, ".spack"), - ) - ) - - with pytest.raises(bd.NoOverwriteException): - bd.push_or_raise(spec, out_url, bd.PushOptions(unsigned=True)) +def test_build_tarball_overwrite(install_mockery, mock_fetch, monkeypatch, tmp_path): + spec = spack.spec.Spec("trivial-install-test-package").concretized() + spec.package.do_install(fake=True) + + specs = [spec] + + # Runs fine the first time, second time it's a no-op + out_url = spack.util.url.path_to_file_url(str(tmp_path)) + skipped = bd.push_or_raise(specs, out_url, signing_key=None) + assert not skipped + + skipped = bd.push_or_raise(specs, out_url, signing_key=None) + assert skipped == specs + + # Should work fine with force=True + skipped = bd.push_or_raise(specs, out_url, signing_key=None, force=True) + assert not skipped + + # Remove the tarball, which should cause push to push. + os.remove( + tmp_path + / bd.BUILD_CACHE_RELATIVE_PATH + / bd.tarball_directory_name(spec) + / bd.tarball_name(spec, ".spack") + ) + + skipped = bd.push_or_raise(specs, out_url, signing_key=None) + assert not skipped diff --git a/lib/spack/spack/test/ci.py b/lib/spack/spack/test/ci.py index f2cca09c5a43ee..9eb0d45d2d1b8c 100644 --- a/lib/spack/spack/test/ci.py +++ b/lib/spack/spack/test/ci.py @@ -286,7 +286,7 @@ def _fail(self, args): def test_ci_create_buildcache(tmpdir, working_env, config, mock_packages, monkeypatch): """Test that create_buildcache returns a list of objects with the correct keys and types.""" - monkeypatch.setattr(spack.ci, "_push_to_build_cache", lambda a, b, c: True) + monkeypatch.setattr(ci, "push_to_build_cache", lambda a, b, c: True) results = ci.create_buildcache( None, destination_mirror_urls=["file:///fake-url-one", "file:///fake-url-two"] diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index eee8c160f1fb25..fb56bb7335cd68 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -384,11 +384,14 @@ def test_correct_specs_are_pushed( packages_to_push = [] - def fake_push(node, push_url, options): - assert isinstance(node, Spec) - packages_to_push.append(node.name) - - monkeypatch.setattr(spack.binary_distribution, "push_or_raise", fake_push) + def fake_push(specs, *args, **kwargs): + assert all(isinstance(s, Spec) for s in specs) + packages_to_push.extend(s.name for s in specs) + skipped = [] + errors = [] + return skipped, errors + + monkeypatch.setattr(spack.binary_distribution, "_push", fake_push) buildcache_create_args = ["create", "--unsigned"] diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index c1018050323de9..1747c4a26a3ff8 100644 --- a/lib/spack/spack/test/cmd/ci.py +++ b/lib/spack/spack/test/cmd/ci.py @@ -797,7 +797,7 @@ def test_ci_rebuild_mock_failure_to_push( def mock_success(*args, **kwargs): return 0 - monkeypatch.setattr(spack.ci, "process_command", mock_success) + monkeypatch.setattr(ci, "process_command", mock_success) # Mock failure to push to the build cache def mock_push_or_raise(*args, **kwargs): @@ -1256,15 +1256,15 @@ def test_push_to_build_cache( def test_push_to_build_cache_exceptions(monkeypatch, tmp_path, capsys): - def _push_to_build_cache(spec, sign_binaries, mirror_url): - raise Exception("Error: Access Denied") + def push_or_raise(*args, **kwargs): + raise spack.binary_distribution.PushToBuildCacheError("Error: Access Denied") - monkeypatch.setattr(spack.ci, "_push_to_build_cache", _push_to_build_cache) + monkeypatch.setattr(spack.binary_distribution, "push_or_raise", push_or_raise) # Input doesn't matter, as we are faking exceptional output url = tmp_path.as_uri() ci.push_to_build_cache(None, url, None) - assert f"Permission problem writing to {url}" in capsys.readouterr().err + assert f"Problem writing to {url}: Error: Access Denied" in capsys.readouterr().err @pytest.mark.parametrize("match_behavior", ["first", "merge"]) diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index 02b0c31e0bdc53..b1415830310333 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -612,9 +612,7 @@ def test_install_from_binary_with_missing_patch_succeeds( # Push it to a binary cache build_cache = tmp_path / "my_build_cache" binary_distribution.push_or_raise( - s, - build_cache.as_uri(), - binary_distribution.PushOptions(unsigned=True, regenerate_index=True), + [s], out_url=build_cache.as_uri(), signing_key=None, force=False ) # Now re-install it. diff --git a/lib/spack/spack/test/oci/integration_test.py b/lib/spack/spack/test/oci/integration_test.py index cefd95f92db9f8..fdb149c9f31ecb 100644 --- a/lib/spack/spack/test/oci/integration_test.py +++ b/lib/spack/spack/test/oci/integration_test.py @@ -15,6 +15,7 @@ import pytest +import spack.binary_distribution import spack.cmd.buildcache import spack.database import spack.environment as ev @@ -294,8 +295,8 @@ def test_uploading_with_base_image_in_docker_image_manifest_v2_format( def test_best_effort_upload(mutable_database: spack.database.Database, monkeypatch): """Failure to upload a blob or manifest should not prevent others from being uploaded""" - _push_blob = spack.cmd.buildcache._push_single_spack_binary_blob - _push_manifest = spack.cmd.buildcache._put_manifest + _push_blob = spack.binary_distribution._oci_push_pkg_blob + _push_manifest = spack.binary_distribution._oci_put_manifest def push_blob(image_ref, spec, tmpdir): # fail to upload the blob of mpich @@ -311,8 +312,8 @@ def put_manifest(base_images, checksums, image_ref, tmpdir, extra_config, annota base_images, checksums, image_ref, tmpdir, extra_config, annotations, *specs ) - monkeypatch.setattr(spack.cmd.buildcache, "_push_single_spack_binary_blob", push_blob) - monkeypatch.setattr(spack.cmd.buildcache, "_put_manifest", put_manifest) + monkeypatch.setattr(spack.binary_distribution, "_oci_push_pkg_blob", push_blob) + monkeypatch.setattr(spack.binary_distribution, "_oci_put_manifest", put_manifest) registry = InMemoryOCIRegistry("example.com") with oci_servers(registry): diff --git a/lib/spack/spack/util/gpg.py b/lib/spack/spack/util/gpg.py index 7c5218e23622f1..99263d22d5ddb7 100644 --- a/lib/spack/spack/util/gpg.py +++ b/lib/spack/spack/util/gpg.py @@ -7,6 +7,7 @@ import functools import os import re +from typing import List import llnl.util.filesystem @@ -124,8 +125,8 @@ def gnupghome_override(dir): SOCKET_DIR, GNUPGHOME = _SOCKET_DIR, _GNUPGHOME -def _parse_secret_keys_output(output): - keys = [] +def _parse_secret_keys_output(output: str) -> List[str]: + keys: List[str] = [] found_sec = False for line in output.split("\n"): if found_sec: @@ -195,9 +196,10 @@ def create(**kwargs): @_autoinit -def signing_keys(*args): +def signing_keys(*args) -> List[str]: """Return the keys that can be used to sign binaries.""" - output = GPG("--list-secret-keys", "--with-colons", "--fingerprint", *args, output=str) + assert GPG + output: str = GPG("--list-secret-keys", "--with-colons", "--fingerprint", *args, output=str) return _parse_secret_keys_output(output) diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 0e946f3f1889fc..139715fef79ea3 100644 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1272,7 +1272,7 @@ _spack_gpg_export() { _spack_gpg_publish() { if $list_options then - SPACK_COMPREPLY="-h --help -d --directory -m --mirror-name --mirror-url --rebuild-index" + SPACK_COMPREPLY="-h --help -d --directory -m --mirror-name --mirror-url --update-index --rebuild-index" else _keys fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 6ec431feca8004..ae8f16e7b9ba64 100644 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1908,7 +1908,7 @@ complete -c spack -n '__fish_spack_using_command gpg export' -l secret -f -a sec complete -c spack -n '__fish_spack_using_command gpg export' -l secret -d 'export secret keys' # spack gpg publish -set -g __fish_spack_optspecs_spack_gpg_publish h/help d/directory= m/mirror-name= mirror-url= rebuild-index +set -g __fish_spack_optspecs_spack_gpg_publish h/help d/directory= m/mirror-name= mirror-url= update-index complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gpg publish' -f -a '(__fish_spack_gpg_keys)' complete -c spack -n '__fish_spack_using_command gpg publish' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command gpg publish' -s h -l help -d 'show this help message and exit' @@ -1918,8 +1918,8 @@ complete -c spack -n '__fish_spack_using_command gpg publish' -s m -l mirror-nam complete -c spack -n '__fish_spack_using_command gpg publish' -s m -l mirror-name -r -d 'name of the mirror where keys will be published' complete -c spack -n '__fish_spack_using_command gpg publish' -l mirror-url -r -f -a mirror_url complete -c spack -n '__fish_spack_using_command gpg publish' -l mirror-url -r -d 'URL of the mirror where keys will be published' -complete -c spack -n '__fish_spack_using_command gpg publish' -l rebuild-index -f -a rebuild_index -complete -c spack -n '__fish_spack_using_command gpg publish' -l rebuild-index -d 'regenerate buildcache key index after publishing key(s)' +complete -c spack -n '__fish_spack_using_command gpg publish' -l update-index -l rebuild-index -f -a update_index +complete -c spack -n '__fish_spack_using_command gpg publish' -l update-index -l rebuild-index -d 'regenerate buildcache key index after publishing key(s)' # spack graph set -g __fish_spack_optspecs_spack_graph h/help a/ascii d/dot s/static c/color i/installed deptype= From e01151a200c56133a6742a33ee2ead566fb96e6c Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Wed, 14 Aug 2024 11:46:04 -0400 Subject: [PATCH 326/435] enable asan in remaining rocm packages (#45192) * initial commit to enable asan in remaining rocm packages * remove os import * add rocm-opencl rocm-dbgapi rocm-debug-agent * add libclang path to LD_LIBRARY_PATH * enable asan for rocfft * add f-string and add +asan dependencies for hip and rocm-opencl * add conflicts for centos7/8 and rhel 9 --- .../repos/builtin/packages/hip/package.py | 26 +++++++++++++++++++ .../builtin/packages/llvm-amdgpu/package.py | 8 ++++++ .../builtin/packages/migraphx/package.py | 21 +++++++++++++++ .../builtin/packages/miopen-hip/package.py | 13 ++++++++++ .../builtin/packages/mivisionx/package.py | 14 ++++++++++ .../builtin/packages/rocalution/package.py | 12 +++++++++ .../repos/builtin/packages/rocblas/package.py | 12 +++++++++ .../repos/builtin/packages/rocfft/package.py | 12 +++++++++ .../builtin/packages/rocm-core/package.py | 18 +++++++++++++ .../builtin/packages/rocm-dbgapi/package.py | 16 +++++++++++- .../packages/rocm-debug-agent/package.py | 15 +++++++++++ .../builtin/packages/rocm-opencl/package.py | 26 +++++++++++++++++++ .../repos/builtin/packages/rocprim/package.py | 12 +++++++++ .../repos/builtin/packages/rocrand/package.py | 12 +++++++++ .../builtin/packages/rocsolver/package.py | 12 +++++++++ .../builtin/packages/rocsparse/package.py | 12 +++++++++ .../repos/builtin/packages/rpp/package.py | 21 +++++++++++++++ 17 files changed, 261 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index 7bd920a6b8d886..413984b1992b46 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -46,8 +46,14 @@ class Hip(CMakePackage): variant("rocm", default=True, description="Enable ROCm support") variant("cuda", default=False, description="Build with CUDA") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive") conflicts("~cuda ~rocm", msg="CUDA or ROCm support is required") + conflicts("~rocm +asan", msg="ROCm must be enabled for asan") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") depends_on("cuda", when="+cuda") @@ -60,6 +66,8 @@ class Hip(CMakePackage): with when("+rocm"): depends_on("gl@4.5:") depends_on("py-cppheaderparser", type="build", when="@5.3.3:") + depends_on("libx11", when="+asan") + depends_on("xproto", when="+asan") for ver in [ "5.3.0", "5.3.3", @@ -532,6 +540,24 @@ def cmake_args(self): args.append(self.define("HIP_PLATFORM", "amd")) if self.spec.satisfies("@5.6.0:"): args.append(self.define("HIP_LLVM_ROOT", self.spec["llvm-amdgpu"].prefix)) + if self.spec.satisfies("@6.1.0:") and self.spec.satisfies("+asan"): + args.append(self.define("ADDRESS_SANITIZER", "ON")) + args.append( + self.define("CMAKE_C_COMPILER", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + ) + args.append( + self.define( + "CMAKE_CXX_COMPILER", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++" + ) + ) + args.append( + self.define( + "CMAKE_CXX_FLAGS", + f"-I{self.spec['libx11'].prefix.include} " + f"-I{self.spec['mesa'].prefix.include} " + f"-I{self.spec['xproto'].prefix.include}", + ) + ) if self.spec.satisfies("+cuda"): args.append(self.define("HIP_PLATFORM", "nvidia")) diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index 3e4556dd64d305..fd451f796c6fba 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -275,3 +275,11 @@ def setup_run_environment(self, env): def setup_dependent_run_environment(self, env, dependent_spec): llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/llvm/lib") + + # Required for enabling asan on dependent packages + def setup_dependent_build_environment(self, env, dependent_spec): + for root, _, files in os.walk(self.spec["llvm-amdgpu"].prefix): + if "libclang_rt.asan-x86_64.so" in files: + asan_lib_path = root + env.prepend_path("LD_LIBRARY_PATH", asan_lib_path) + env.prune_duplicate_paths("LD_LIBRARY_PATH") diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index 03a266d1e8073d..a4c8882a79daea 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -37,6 +37,12 @@ class Migraphx(CMakePackage): version("5.3.3", sha256="91d91902bbedd5e1951a231e8e5c9a328360b128c731912ed17c8059df38e02a") version("5.3.0", sha256="d0b7283f42e03fb38b612868b8c94f46f27a6e0b019ae95fde5b9086582a1c69") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") + depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated @@ -117,6 +123,15 @@ def determine_version(cls, lib): ver = None return ver + def setup_build_environment(self, env): + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") + def cmake_args(self): spec = self.spec abspath = spec["abseil-cpp"].prefix.include @@ -134,6 +149,12 @@ def cmake_args(self): args.append( self.define("GPU_TARGETS", "gfx906;gfx908;gfx90a;gfx1030;gfx1100;gfx1101;gfx1102") ) + if self.spec.satisfies("@6.1:") and self.spec.satisfies("+asan"): + args.append( + self.define( + "CMAKE_CXX_FLAGS", "-fsanitize=address -shared-libasan -I{0}".format(abspath) + ) + ) return args def test_unit_tests(self): diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index 84b5f1f0aa39cb..52d9a28c1b1bf3 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -38,6 +38,12 @@ class MiopenHip(CMakePackage): version("5.3.3", sha256="7efc98215d23a2caaf212378c37e9a6484f54a4ed3e9660719286e4f287d3715") version("5.3.0", sha256="c5819f593d71beeda2eb24b89182912240cc40f83b2b8f9de695a8e230aa4ea6") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") + depends_on("cxx", type="build") # generated depends_on("cmake@3.5:", type="build") @@ -112,6 +118,13 @@ class MiopenHip(CMakePackage): def setup_build_environment(self, env): lib_dir = self.spec["zlib-api"].libs.directories[0] env.prepend_path("LIBRARY_PATH", lib_dir) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") if self.spec.satisfies("%gcc@8.0:8.9") and self.spec.satisfies("@6.1:"): env.append_flags("LDFLAGS", "-lstdc++fs") diff --git a/var/spack/repos/builtin/packages/mivisionx/package.py b/var/spack/repos/builtin/packages/mivisionx/package.py index e4e2daae199dce..404b3f98437b24 100644 --- a/var/spack/repos/builtin/packages/mivisionx/package.py +++ b/var/spack/repos/builtin/packages/mivisionx/package.py @@ -53,6 +53,11 @@ def url_for_version(self, version): variant("opencl", default=False, description="Use OPENCL as the backend") variant("hip", default=True, description="Use HIP as backend") variant("add_tests", default=False, description="add tests and samples folder") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") patch("0001-add-half-include-path.patch", when="@5.5") patch("0001-add-half-include-path-5.6.patch", when="@5.6:") @@ -288,6 +293,15 @@ def setup_run_environment(self, env): if self.spec.satisfies("@6.1:"): env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib) + def setup_build_environment(self, env): + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") + def flag_handler(self, name, flags): spec = self.spec protobuf = spec["protobuf"].prefix.include diff --git a/var/spack/repos/builtin/packages/rocalution/package.py b/var/spack/repos/builtin/packages/rocalution/package.py index 94802cd20809dc..02f11b33a883c5 100644 --- a/var/spack/repos/builtin/packages/rocalution/package.py +++ b/var/spack/repos/builtin/packages/rocalution/package.py @@ -54,6 +54,11 @@ class Rocalution(CMakePackage): values=auto_or_any_combination_of(*amdgpu_targets), sticky=True, ) + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") depends_on("cmake@3.5:", type="build") @@ -91,6 +96,13 @@ class Rocalution(CMakePackage): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") def patch(self): with working_dir("src/base/hip"): diff --git a/var/spack/repos/builtin/packages/rocblas/package.py b/var/spack/repos/builtin/packages/rocblas/package.py index 4c91b3bd04eff1..5df351eb629bac 100644 --- a/var/spack/repos/builtin/packages/rocblas/package.py +++ b/var/spack/repos/builtin/packages/rocblas/package.py @@ -53,6 +53,11 @@ class Rocblas(CMakePackage): sticky=True, ) variant("tensile", default=True, description="Use Tensile as a backend") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") # https://reviews.llvm.org/D124866 # https://github.com/ROCm/HIP/issues/2678 @@ -144,6 +149,13 @@ class Rocblas(CMakePackage): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") @classmethod def determine_version(cls, lib): diff --git a/var/spack/repos/builtin/packages/rocfft/package.py b/var/spack/repos/builtin/packages/rocfft/package.py index eb56ae21317801..39c6f295dba621 100644 --- a/var/spack/repos/builtin/packages/rocfft/package.py +++ b/var/spack/repos/builtin/packages/rocfft/package.py @@ -53,6 +53,11 @@ class Rocfft(CMakePackage): values=auto_or_any_combination_of(*amdgpu_targets), sticky=True, ) + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") depends_on("cmake@3.16:", type="build") depends_on("python@3.6:", type="build") @@ -104,6 +109,13 @@ class Rocfft(CMakePackage): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") if self.spec.satisfies("%gcc@8.0:8.9") and self.spec.satisfies("@6.1:"): env.append_flags("LDFLAGS", "-lstdc++fs") diff --git a/var/spack/repos/builtin/packages/rocm-core/package.py b/var/spack/repos/builtin/packages/rocm-core/package.py index c57faf1bd21aaf..fd6f96fe23e6ea 100644 --- a/var/spack/repos/builtin/packages/rocm-core/package.py +++ b/var/spack/repos/builtin/packages/rocm-core/package.py @@ -32,8 +32,26 @@ class RocmCore(CMakePackage): version("5.5.1", sha256="bc73060432ffdc2e210394835d383890b9652476074ef4708d447473f273ce76") version("5.5.0", sha256="684d3312bb14f05dc280cf136f5eddff38ba340cd85c383d6a217d8e27d3d57d") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") + depends_on("cxx", type="build") # generated + for ver in ["6.1.0", "6.1.1", "6.1.2"]: + depends_on("llvm-amdgpu", when=f"@{ver}+asan") + + def setup_build_environment(self, env): + if self.spec.satisfies("+asan"): + env.set("CC", self.spec["llvm-amdgpu"].prefix + "/bin/clang") + env.set("CXX", self.spec["llvm-amdgpu"].prefix + "/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") + def cmake_args(self): args = [self.define("ROCM_VERSION", self.spec.version)] return args diff --git a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py index baca1f2b9f19e4..fa5c8503e14fd8 100644 --- a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py +++ b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py @@ -42,8 +42,13 @@ class RocmDbgapi(CMakePackage): version("5.3.3", sha256="3c81cb23fe671d391557a63c13b6a13d4dc367db5cb5de55592a6758284d8a3f") version("5.3.0", sha256="afffec78e34fe70952cd41efc3d7ba8f64e43acb2ad20aa35c9b8b591bed48ca") - depends_on("cxx", type="build") # generated + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") + depends_on("cxx", type="build") # generated depends_on("cmake@3:", type="build") depends_on("hwdata", when="@5.5.0:") @@ -99,6 +104,15 @@ def patch(self): "CMakeLists.txt", ) + def setup_build_environment(self, env): + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") + def cmake_args(self): args = [] if self.spec.satisfies("@5.3.0:"): diff --git a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py index a40c9523ab6b8f..2cbc7d7f68af5c 100644 --- a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py +++ b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py @@ -35,6 +35,12 @@ class RocmDebugAgent(CMakePackage): version("5.3.3", sha256="7170312d08e91334ee03586aa1f23d67f33d9ec0df25a5556cbfa3f210b15b06") version("5.3.0", sha256="8dfb6aa442ce136207c0c089321c8099042395977b4a488e4ca219661df0cd78") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") + depends_on("cxx", type="build") # generated depends_on("cmake@3:", type="build") @@ -89,6 +95,15 @@ def determine_version(cls, lib): ) return None + def setup_build_environment(self, env): + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") + def cmake_args(self): spec = self.spec args = [self.define("CMAKE_MODULE_PATH", spec["hip"].prefix.lib.cmake.hip)] diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py index ea6e3779bfb384..92d3373effd9b3 100644 --- a/var/spack/repos/builtin/packages/rocm-opencl/package.py +++ b/var/spack/repos/builtin/packages/rocm-opencl/package.py @@ -53,12 +53,20 @@ def url_for_version(self, version): version("5.3.3", sha256="cab394e6ef16c35bab8de29a66b96a7dc0e7d1297aaacba3718fa1d369233c9f") version("5.3.0", sha256="d251e2efe95dc12f536ce119b2587bed64bbda013969fa72be58062788044a9e") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") + depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated depends_on("cmake@3:", type="build") depends_on("gl@4.5:", type="link") depends_on("numactl", type="link") + depends_on("libx11", when="+asan") + depends_on("xproto", when="+asan") for d_version, d_shasum in [ ("5.6.1", "cc9a99c7e4de3d9360c0a471b27d626e84a39c9e60e0aff1e8e1500d82391819"), @@ -152,9 +160,27 @@ def cmake_args(self): if self.spec.satisfies("@5.7:"): args.append(self.define("CLR_BUILD_HIP", False)) args.append(self.define("CLR_BUILD_OCL", True)) + if self.spec.satisfies("+asan"): + args.append( + self.define( + "CMAKE_CXX_FLAGS", + f"-I{self.spec['libx11'].prefix.include} " + f"-I{self.spec['mesa'].prefix.include} " + f"-I{self.spec['xproto'].prefix.include}", + ) + ) return args + def setup_build_environment(self, env): + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") + def setup_run_environment(self, env): env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib), env.set("OCL_ICD_VENDORS", self.prefix.vendors + "/") diff --git a/var/spack/repos/builtin/packages/rocprim/package.py b/var/spack/repos/builtin/packages/rocprim/package.py index db959c565e9991..dd4f2d9cd7e431 100644 --- a/var/spack/repos/builtin/packages/rocprim/package.py +++ b/var/spack/repos/builtin/packages/rocprim/package.py @@ -44,6 +44,11 @@ class Rocprim(CMakePackage): values=auto_or_any_combination_of(*amdgpu_targets), sticky=True, ) + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") depends_on("cmake@3.10.2:", type="build") depends_on("numactl", type="link") @@ -77,6 +82,13 @@ class Rocprim(CMakePackage): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/rocrand/package.py b/var/spack/repos/builtin/packages/rocrand/package.py index b3fb00b0e4ff8f..482d922d1233ed 100644 --- a/var/spack/repos/builtin/packages/rocrand/package.py +++ b/var/spack/repos/builtin/packages/rocrand/package.py @@ -54,6 +54,11 @@ class Rocrand(CMakePackage): sticky=True, ) variant("hiprand", default=True, when="@5.1.0:", description="Build the hiprand library") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") depends_on("cmake@3.10.2:", type="build") @@ -126,6 +131,13 @@ def patch(self): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") @classmethod def determine_version(cls, lib): diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index 4cc1e485ebf481..404adac95dcb23 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -36,6 +36,11 @@ class Rocsolver(CMakePackage): size and compile time by adding specialized kernels \ for small matrix sizes", ) + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") license("BSD-2-Clause") @@ -138,6 +143,13 @@ def cmake_args(self): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") @run_after("build") @on_package_attributes(run_tests=True) diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py index 93b5122b1a6578..d5af36e08c21e2 100644 --- a/var/spack/repos/builtin/packages/rocsparse/package.py +++ b/var/spack/repos/builtin/packages/rocsparse/package.py @@ -32,6 +32,11 @@ class Rocsparse(CMakePackage): sticky=True, ) variant("test", default=False, description="Build rocsparse-test client") + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") license("MIT") version("6.1.2", sha256="e8989c28085275e7c044b19fd2bc86d8493ce6a1b8545126f787722c535fe6eb") @@ -244,6 +249,13 @@ def check_build(self): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") @classmethod def determine_version(cls, lib): diff --git a/var/spack/repos/builtin/packages/rpp/package.py b/var/spack/repos/builtin/packages/rpp/package.py index 957d90bba432d2..9bafc3826dfb03 100644 --- a/var/spack/repos/builtin/packages/rpp/package.py +++ b/var/spack/repos/builtin/packages/rpp/package.py @@ -60,6 +60,11 @@ def url_for_version(self, version): default=False, description="add utilities folder which contains rpp unit tests", ) + variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") patch("0001-include-half-openmp-through-spack-package.patch", when="@:5.7") patch("0002-declare-handle-in-header.patch") @@ -75,6 +80,13 @@ def patch(self): filter_file( "${ROCM_PATH}/llvm", self.spec["llvm-amdgpu"].prefix, "CMakeLists.txt", string=True ) + if self.spec.satisfies("+asan"): + filter_file( + "CMAKE_CXX_COMPILER clang++", + "CMAKE_CXX_COMPILER {0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix), + "CMakeLists.txt", + string=True, + ) if self.spec.satisfies("+opencl"): filter_file( "${ROCM_PATH}", @@ -153,6 +165,15 @@ def setup_run_environment(self, env): if self.spec.satisfies("@6.1:"): env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib) + def setup_build_environment(self, env): + if self.spec.satisfies("+asan"): + env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang") + env.set("ASAN_OPTIONS", "detect_leaks=0") + env.set("CFLAGS", "-fsanitize=address -shared-libasan") + env.set("CXXFLAGS", "-fsanitize=address -shared-libasan") + env.set("LDFLAGS", "-fuse-ld=lld") + def cmake_args(self): spec = self.spec args = [] From 7a8dc36760f1080497fe22cdb2fd3daf48713ead Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Wed, 14 Aug 2024 17:49:04 +0200 Subject: [PATCH 327/435] freefem: add v4.14 (#45687) --- var/spack/repos/builtin/packages/freefem/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/freefem/package.py b/var/spack/repos/builtin/packages/freefem/package.py index 4412a0c4f675fa..a61fea507b070d 100644 --- a/var/spack/repos/builtin/packages/freefem/package.py +++ b/var/spack/repos/builtin/packages/freefem/package.py @@ -19,6 +19,7 @@ class Freefem(AutotoolsPackage): maintainers("corentin-dev") + version("4.14", sha256="931cbfe9ef6f6530756c300c5ae47bfdaca21c560a5407cb33325a376a3b6af8") version("4.10", sha256="957994c8f24cc2a671b8c116ae530796c3a431d4157ee71a3d6aab7122e7570d") version("4.9", sha256="299ba2b73dfff578b7890f693c1e835680bf55eba87263cabd60d81909e1e0e4") version("4.8", sha256="499b1ca24d45088226a238412ea1492d9cc3eb6088866904145511469780180d") From 586a35be4326099734d1c06aaa0360a54020826f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 14 Aug 2024 18:02:09 +0200 Subject: [PATCH 328/435] SpecHashDescriptor: better repr in debugger (#45739) --- lib/spack/spack/hash_types.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/spack/spack/hash_types.py b/lib/spack/spack/hash_types.py index 0684667528b5de..4b1bf627d643b9 100644 --- a/lib/spack/spack/hash_types.py +++ b/lib/spack/spack/hash_types.py @@ -37,6 +37,12 @@ def __call__(self, spec): """Run this hash on the provided spec.""" return spec.spec_hash(self) + def __repr__(self): + return ( + f"SpecHashDescriptor(depflag={self.depflag!r}, " + f"package_hash={self.package_hash!r}, name={self.name!r}, override={self.override!r})" + ) + #: Spack's deployment hash. Includes all inputs that can affect how a package is built. dag_hash = SpecHashDescriptor(depflag=dt.BUILD | dt.LINK | dt.RUN, package_hash=True, name="hash") From 2b6bdc701312b216f0e1ee9ff850a4a87dd9610e Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 14 Aug 2024 09:48:44 -0700 Subject: [PATCH 329/435] OneapiPackage: do not use getpass.getuser (#45727) * OneapiPackage: do not use getpass.getuser --- lib/spack/spack/build_systems/oneapi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/build_systems/oneapi.py b/lib/spack/spack/build_systems/oneapi.py index 999b0a189ab14c..a0c8d4fc47f6b0 100644 --- a/lib/spack/spack/build_systems/oneapi.py +++ b/lib/spack/spack/build_systems/oneapi.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Common utilities for managing intel oneapi packages.""" -import getpass import os import platform import shutil @@ -13,6 +12,7 @@ from llnl.util.filesystem import HeaderList, LibraryList, find_libraries, join_path, mkdirp from llnl.util.link_tree import LinkTree +import spack.util.path from spack.build_environment import dso_suffix from spack.directives import conflicts, license, redistribute, variant from spack.package_base import InstallError @@ -99,7 +99,7 @@ def install_component(self, installer_path): # with other install depends on the userid. For root, we # delete the installercache before and after install. For # non root we redefine the HOME environment variable. - if getpass.getuser() == "root": + if spack.util.path.get_user() == "root": shutil.rmtree("/var/intel/installercache", ignore_errors=True) bash = Executable("bash") @@ -122,7 +122,7 @@ def install_component(self, installer_path): self.prefix, ) - if getpass.getuser() == "root": + if spack.util.path.get_user() == "root": shutil.rmtree("/var/intel/installercache", ignore_errors=True) # Some installers have a bug and do not return an error code when failing From f1114858f5f43a0227d169b31525ff71f020744a Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:54:07 -0700 Subject: [PATCH 330/435] e4s ci: add chapel (#45659) * e4s ci: add chapel * e4s ci: fix gpu target typo Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml | 4 ++++ .../gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 1 + .../gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml | 1 + .../cloud_pipelines/stacks/e4s-rocm-external/spack.yaml | 6 ++++-- share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 4 ++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index ecf7772ad43cb4..38593deab47109 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -66,6 +66,7 @@ spack: - cabana - caliper - chai + - chapel ~cuda ~rocm - charliecloud - conduit - cp2k +mpi @@ -219,6 +220,7 @@ spack: - cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75 - caliper +cuda cuda_arch=75 - chai +cuda cuda_arch=75 ^umpire ~shared + - chapel +cuda cuda_arch=75 - cusz +cuda cuda_arch=75 - dealii +cuda cuda_arch=75 - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=75 # # +paraview: job killed oom? @@ -266,6 +268,7 @@ spack: - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80 - caliper +cuda cuda_arch=80 - chai +cuda cuda_arch=80 ^umpire ~shared + - chapel +cuda cuda_arch=80 - cusz +cuda cuda_arch=80 - dealii +cuda cuda_arch=80 - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=80 # +paraview: job killed oom? @@ -313,6 +316,7 @@ spack: - cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90 - caliper +cuda cuda_arch=90 - chai +cuda cuda_arch=90 ^umpire ~shared + - chapel +cuda cuda_arch=90 - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=90 # +paraview: vtkm/exec/cuda/internal/ThrustPatches.h(213): error: this declaration has no storage class or type specifier - flecsi +cuda cuda_arch=90 - ginkgo +cuda cuda_arch=90 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 0fe9aa55fc0f79..105afcf3550801 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -190,6 +190,7 @@ spack: - vtk-m ~openmp - zfp # -- + # - chapel ~cuda ~rocm # llvm: closures.c:(.text+0x305e): undefined reference to `_intel_fast_memset' # - cp2k +mpi # dbcsr: dbcsr_api.F(973): #error: incomplete macro call DBCSR_ABORT. # - geopm-runtime # libelf: configure: error: installation or configuration problem: C compiler cannot create executables. # - hpctoolkit # dyninst@13.0.0%gcc: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy' diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 8bd991cbbb6eac..24b28513271a24 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -68,6 +68,7 @@ spack: - cabana - caliper - chai + - chapel ~rocm ~cuda - charliecloud - conduit - cp2k +mpi diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index 4ed973ac03e3d9..6344a725c3e754 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -214,6 +214,7 @@ spack: - tau +mpi +rocm +syscall # ROCM 908 + - adios2 +kokkos +rocm amdgpu_target=gfx908 - amrex +rocm amdgpu_target=gfx908 - arborx +rocm amdgpu_target=gfx908 - cabana +rocm amdgpu_target=gfx908 @@ -245,7 +246,7 @@ spack: # - paraview +rocm amdgpu_target=gfx908 # mesa: https://github.com/spack/spack/issues/44745 # - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268 # -- - - adios2 +kokkos +rocm amdgpu_target=gfx908 # adios2:https://github.com/spack/spack/issues/44594 + # - chapel +rocm amdgpu_target=gfx908 # chapel: need chapel >= 2.2 to support ROCm >5.4 # - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908 # raja: https://github.com/spack/spack/issues/44593 # - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807 @@ -256,6 +257,7 @@ spack: # - sundials +rocm amdgpu_target=gfx908 # sundials: https://github.com/spack/spack/issues/44601 # ROCM 90a + - adios2 +kokkos +rocm amdgpu_target=gfx90a - amrex +rocm amdgpu_target=gfx90a - arborx +rocm amdgpu_target=gfx90a - cabana +rocm amdgpu_target=gfx90a @@ -287,7 +289,7 @@ spack: # - paraview +rocm amdgpu_target=gfx90a # mesa: https://github.com/spack/spack/issues/44745 # - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268 # -- - - adios2 +kokkos +rocm amdgpu_target=gfx90a # adios2: https://github.com/spack/spack/issues/44594 + # - chapel +rocm amdgpu_target=gfx9a # chapel: need chapel >= 2.2 to support ROCm >5.4 # - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a # raja: https://github.com/spack/spack/issues/44593 # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 5d25864371695e..c628dd509a946e 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -70,6 +70,7 @@ spack: - cabana - caliper - chai + - chapel ~rocm ~cuda - charliecloud - conduit - cp2k +mpi @@ -231,6 +232,7 @@ spack: - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80 - caliper +cuda cuda_arch=80 - chai +cuda cuda_arch=80 ^umpire ~shared + - chapel +cuda cuda_arch=80 - cusz +cuda cuda_arch=80 - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # +ascent fails because fides fetch error - exago +mpi +python +raja +hiop ~rocm +cuda cuda_arch=80 ~ipopt ^hiop@1.0.0 ~sparse +mpi +raja ~rocm +cuda cuda_arch=80 #^raja@0.14.0 @@ -278,6 +280,7 @@ spack: - cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90 - caliper +cuda cuda_arch=90 - chai +cuda cuda_arch=90 ^umpire ~shared + - chapel +cuda cuda_arch=90 - flecsi +cuda cuda_arch=90 - ginkgo +cuda cuda_arch=90 - gromacs +cuda cuda_arch=90 @@ -354,6 +357,7 @@ spack: # - adios2 +kokkos +rocm amdgpu_target=gfx90a # +kokkos: https://github.com/spack/spack/issues/44832 # - arborx +rocm amdgpu_target=gfx90a # kokkos: https://github.com/spack/spack/issues/44832 # - cabana +rocm amdgpu_target=gfx90a # kokkos: https://github.com/spack/spack/issues/44832 + # - chapel +rocm amdgpu_target=gfx90a # chapel: need chapel >= 2.2 to support ROCm >5.4 # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a # hiop: CMake Error at cmake/FindHiopHipLibraries.cmake:23 (find_package) # - kokkos +rocm amdgpu_target=gfx90a # kokkos: https://github.com/spack/spack/issues/44832 # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 From 44ecea3813f51cc8d817f6d06af5a94f89688215 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Wed, 14 Aug 2024 14:25:57 -0700 Subject: [PATCH 331/435] g2tmpl: add 1.13.0 (#45751) --- var/spack/repos/builtin/packages/g2tmpl/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/g2tmpl/package.py b/var/spack/repos/builtin/packages/g2tmpl/package.py index 7813d9624e2427..b5ad734b014528 100644 --- a/var/spack/repos/builtin/packages/g2tmpl/package.py +++ b/var/spack/repos/builtin/packages/g2tmpl/package.py @@ -18,6 +18,7 @@ class G2tmpl(CMakePackage): maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA") version("develop", branch="develop") + version("1.13.0", sha256="7e52cccc91277bcedbd9e13ee3478480e744eb22d13c5b636bd0ad91bf43d38e") version("1.12.0", sha256="44272be7bde8da05565255a8ecdbd080c659d7f0669e356e1c8fef6bac05e723") version("1.11.0", sha256="00fde3b37c6b4d1f0eaf60f230159298ffcb47349a076c3bd6afa20c7ed791a9") version("1.10.2", sha256="4063361369f3691f75288c801fa9d1a2414908b7d6c07bbf69d4165802e2a7fc") From f42486b68425f977888a0acf04ea02c1383056f9 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 14 Aug 2024 15:00:00 -0700 Subject: [PATCH 332/435] spack info: use spec fullname (#45753) --- lib/spack/spack/cmd/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 3075107d078ace..c5d776212b8bf1 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -502,7 +502,7 @@ def print_licenses(pkg, args): def info(parser, args): spec = spack.spec.Spec(args.package) - pkg_cls = spack.repo.PATH.get_pkg_class(spec.name) + pkg_cls = spack.repo.PATH.get_pkg_class(spec.fullname) pkg = pkg_cls(spec) # Output core package information From dd53eeb32272cb912234382af52c586c1158d65f Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:59:08 -0700 Subject: [PATCH 333/435] libpressio: old to new test API (#45151) * libpressio: old to new test API * libpressio: minor stand-alone test simplifications --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../builtin/packages/libpressio/package.py | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/libpressio/package.py b/var/spack/repos/builtin/packages/libpressio/package.py index 4ae7016e69d89e..564ab385878d93 100644 --- a/var/spack/repos/builtin/packages/libpressio/package.py +++ b/var/spack/repos/builtin/packages/libpressio/package.py @@ -303,7 +303,7 @@ class Libpressio(CMakePackage, CudaPackage): ) for cuda_compressor in ["cusz", "mgard", "zfp", "ndzip"]: conflicts( - "~cuda+{pkg} ^ {pkg}+cuda".format(pkg=cuda_compressor), + f"~cuda+{cuda_compressor} ^ {cuda_compressor}+cuda", msg="compiling a CUDA compressor without a CUDA support makes no sense", ) depends_on("sz3", when="+sz3") @@ -387,7 +387,7 @@ def cmake_args(self): args.append("-DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined") # libpressio needs to know where to install the python libraries if "+python" in self.spec: - args.append("-DLIBPRESSIO_PYTHON_SITELIB={0}".format(python_platlib)) + args.append(f"-DLIBPRESSIO_PYTHON_SITELIB={python_platlib}") # help ensure that libpressio finds the correct HDF5 package if "+hdf5" in self.spec: args.append("-DHDF5_ROOT=" + self.spec["hdf5"].prefix) @@ -410,30 +410,30 @@ def install_docs(self): @run_after("install") def copy_test_sources(self): - if self.version < Version("0.88.3"): + if self.spec.satisfies("@:0.88.2"): return srcs = [ join_path("test", "smoke_test", "smoke_test.cc"), join_path("test", "smoke_test", "CMakeLists.txt"), ] - self.cache_extra_test_sources(srcs) + cache_extra_test_sources(self, srcs) - def test(self): - if self.version < Version("0.88.3"): - return + def test_smoke(self): + """Run smoke test""" + # this works for cmake@3.14: which is required for this package + if self.spec.satisfies("@:0.88.2"): + raise SkipTest("Package must be installed as version @0.88.3 or later") args = self.cmake_args() - args.append( - "-S{}".format(join_path(self.test_suite.current_test_cache_dir, "test", "smoke_test")) - ) - args.append( - "-DCMAKE_PREFIX_PATH={};{}".format(self.spec["libstdcompat"].prefix, self.prefix) - ) + args.append(f"-S{join_path(self.test_suite.current_test_cache_dir, 'test', 'smoke_test')}") + args.append(f"-DCMAKE_PREFIX_PATH={self.spec['libstdcompat'].prefix};{self.prefix}") - self.run_test("cmake", args, purpose="cmake configuration works") + cmake = self.spec["cmake"].command + cmake(*args) + cmake("--build", ".") - # this works for cmake@3.14: which is required for this package - args = ["--build", "."] - self.run_test("cmake", args, purpose="cmake builds works") + exe = which("pressio_smoke_tests") + out = exe(output=str.split, error=str.split) - self.run_test("./pressio_smoke_tests", expected="all passed") + expected = "all passed" + assert expected in out From 4606c8ed686d7ab5ea579a273ad2d9df9915c4df Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Wed, 14 Aug 2024 18:37:12 -0700 Subject: [PATCH 334/435] magma: old to new test API (#45140) * magma: old to new test API * magma: simplify stand-alone test method/part docstrings/purposes --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/magma/package.py | 55 +++++++++++++------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py index 79b1a09d67477f..e7dcd747b74947 100644 --- a/var/spack/repos/builtin/packages/magma/package.py +++ b/var/spack/repos/builtin/packages/magma/package.py @@ -84,7 +84,7 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage): # Many cuda_arch values are not yet recognized by MAGMA's CMakeLists.txt for target in [10, 11, 12, 13, 21, 32, 52, 53, 61, 62, 72, 86]: - conflicts("cuda_arch={}".format(target)) + conflicts(f"cuda_arch={target}") # Some cuda_arch values had support added recently conflicts("cuda_arch=37", when="@:2.5", msg="magma: cuda_arch=37 needs a version > 2.5") @@ -117,14 +117,14 @@ def generate_gpu_config(self): gpu_target = "" if "+cuda" in spec: cuda_archs = spec.variants["cuda_arch"].value - gpu_target = " ".join("sm_{0}".format(i) for i in cuda_archs) + gpu_target = " ".join(f"sm_{i}" for i in cuda_archs) else: gpu_target = spec.variants["amdgpu_target"].value with open("make.inc", "w") as inc: inc.write("FORT = true\n") - inc.write("GPU_TARGET = {0}\n".format(gpu_target)) - inc.write("BACKEND = {0}\n".format(backend)) + inc.write(f"GPU_TARGET = {gpu_target}\n") + inc.write(f"BACKEND = {backend}\n") make("generate") @@ -155,7 +155,7 @@ def cmake_args(self): if "+cuda" in spec: cuda_arch = spec.variants["cuda_arch"].value sep = "" if "@:2.2.0" in spec else "_" - capabilities = " ".join("sm{0}{1}".format(sep, i) for i in cuda_arch) + capabilities = " ".join(f"sm{sep}{i}" for i in cuda_arch) options.append(define("GPU_TARGET", capabilities)) archs = ";".join("%s" % i for i in cuda_arch) options.append(define("CMAKE_CUDA_ARCHITECTURES", archs)) @@ -191,21 +191,40 @@ def post_install(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.test_src_dir]) + cache_extra_test_sources(self, [self.test_src_dir]) - def test(self): + def test_c(self): + """Run C examples""" test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) - with working_dir(test_dir, create=False): - pkg_config_path = "{0}/lib/pkgconfig".format(self.prefix) + with working_dir(test_dir): + pkg_config_path = self.prefix.lib.pkgconfig with spack.util.environment.set_env(PKG_CONFIG_PATH=pkg_config_path): + make("c") - self.run_test("./example_sparse", purpose="MAGMA smoke test - sparse solver") - self.run_test( - "./example_sparse_operator", purpose="MAGMA smoke test - sparse operator" - ) - self.run_test("./example_v1", purpose="MAGMA smoke test - legacy v1 interface") - self.run_test("./example_v2", purpose="MAGMA smoke test - v2 interface") - if "+fortran" in self.spec: - make("fortran") - self.run_test("./example_f", purpose="MAGMA smoke test - Fortran interface") + tests = [ + ("example_sparse", "sparse solver"), + ("example_sparse_operator", "sparse operator"), + ("example_v1", "legacy v1 interface"), + ("example_v2", "v2 interface"), + ] + + for test, desc in tests: + with test_part(self, f"test_c_{test}", purpose=f"Run {desc} example"): + exe = which(test) + exe() + + make("clean") + + def test_fortran(self): + """Run Fortran example""" + if "+fortran" not in self.spec: + raise SkipTest("Package must be installed with +fortran") + + test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) + with working_dir(test_dir): + pkg_config_path = self.prefix.lib.pkgconfig + with spack.util.environment.set_env(PKG_CONFIG_PATH=pkg_config_path): + make("fortran") + example_f = which("example_f") + example_f() make("clean") From 55b1b0f3f039d35c71fd775be5bbed0f071c0bb2 Mon Sep 17 00:00:00 2001 From: Evan Parker Date: Wed, 14 Aug 2024 23:14:02 -0600 Subject: [PATCH 335/435] py-fortranformat: update to version 2.0.0 (#45748) * Feature update py-fortranformat Add more recent versions of py-fortranformat. The currently included release (0.2.5) is from 2014. I've added the latest point release of each of the major versions from the last 4 years. * update homepage --- .../repos/builtin/packages/py-fortranformat/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-fortranformat/package.py b/var/spack/repos/builtin/packages/py-fortranformat/package.py index c08935be4066ac..2480bbe47383da 100644 --- a/var/spack/repos/builtin/packages/py-fortranformat/package.py +++ b/var/spack/repos/builtin/packages/py-fortranformat/package.py @@ -9,11 +9,14 @@ class PyFortranformat(PythonPackage): """Mimics Fortran textual IO in Python""" - homepage = "http://bitbucket.org/brendanarnold/py-fortranformat" - pypi = "fortranformat/fortranformat-0.2.5.tar.gz" + homepage = "https://github.com/brendanarnold/py-fortranformat" + pypi = "fortranformat/fortranformat-2.0.0.tar.gz" license("MIT") + version("2.0.0", sha256="52473831d6f6bad7c2de0f26ad51856ea5d0ef097bcba5af3b855b871b815b0d") + version("1.2.2", sha256="a8c41ab39bb40444e6ca17f38755d64df51799b064206833c137a28bbdca1b2b") + version("1.1.1", sha256="9b7aa2148af7a5f4f5fd955d121bd6869d44b82ac2182d459813b849aa87d831") version("0.2.5", sha256="6b5fbc1f129c7a70543c3a81f334fb4d57f07df2834b22ce69f6d7e8539cd3f9") # pip silently replaces distutils with setuptools From 1b82779087ed4bb7b90d30da02ffff9b655d6fcc Mon Sep 17 00:00:00 2001 From: psakievich Date: Wed, 14 Aug 2024 23:28:34 -0600 Subject: [PATCH 336/435] Add options for sparse checkout in GitFetcher (#45473) * Add options for sparse checkout in GitFetcher Newer versions of git have a beta feature called sparse checkout that allow users to check out a portion of a large repo. This feature will be ideal for monolithic repo projects that want to model their infrastructure via spack. This PR implements an addition to the GitFetcher that allows users to add a `git_sparse_paths` attribute to package classes or versions which will then use sparse checkout on those directories/files for the package. * Style * Split git clone into multiple functions * Add sparse-checkout impl * Internalize src clone functions * Docs * Adding sparse clone test * Add test for partial clone * [@spackbot] updating style on behalf of psakievich * Small fixes * Restore default branch status * Fix attributes for package * Update lib/spack/docs/packaging_guide.rst Co-authored-by: Matthew Mosby <44072882+mdmosby@users.noreply.github.com> * Extend unit test to multiple git versions * style --------- Co-authored-by: psakievich Co-authored-by: Matthew Mosby <44072882+mdmosby@users.noreply.github.com> --- lib/spack/docs/packaging_guide.rst | 40 ++++++ lib/spack/spack/fetch_strategy.py | 132 +++++++++++++++--- lib/spack/spack/test/conftest.py | 23 +++ lib/spack/spack/test/git_fetch.py | 35 +++++ lib/spack/spack/test/packages.py | 12 ++ lib/spack/spack/version/git_ref_lookup.py | 2 +- .../packages/git-sparsepaths-pkg/package.py | 17 +++ 7 files changed, 242 insertions(+), 19 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 629b87e8e0f941..a736ff8c793005 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1263,6 +1263,11 @@ Git fetching supports the following parameters to ``version``: option ``--depth 1`` will be used if the version of git and the specified transport protocol support it, and ``--single-branch`` will be used if the version of git supports it. +* ``git_sparse_paths``: Use ``sparse-checkout`` to only clone these relative paths. + This feature requires ``git`` to be version ``2.25.0`` or later but is useful for + large repositories that have separate portions that can be built independently. + If paths provided are directories then all the subdirectories and associated files + will also be cloned. Only one of ``tag``, ``branch``, or ``commit`` can be used at a time. @@ -1361,6 +1366,41 @@ Submodules For more information about git submodules see the manpage of git: ``man git-submodule``. +Sparse-Checkout + You can supply ``git_sparse_paths`` at the package or version level to utilize git's + sparse-checkout feature. This will only clone the paths that are specified in the + ``git_sparse_paths`` attribute for the package along with the files in the top level directory. + This feature allows you to only clone what you need from a large repository. + Note that this is a newer feature in git and requries git ``2.25.0`` or greater. + If ``git_sparse_paths`` is supplied and the git version is too old + then a warning will be issued and that package will use the standard cloning operations instead. + ``git_sparse_paths`` should be supplied as a list of paths, a callable function for versions, + or a more complex package attribute using the ``@property`` decorator. The return value should be + a list for a callable implementation of ``git_sparse_paths``. + + .. code-block:: python + + def sparse_path_function(package) + """a callable function that can be used in side a version""" + # paths can be directories or functions, all subdirectories and files are included + paths = ["doe", "rae", "me/file.cpp"] + if package.spec.version > Version("1.2.0"): + paths.extend(["fae"]) + return paths + + class MyPackage(package): + # can also be a package attribute that will be used if not specified in versions + git_sparse_paths = ["doe", "rae"] + + # use the package attribute + version("1.0.0") + version("1.1.0") + # use the function + version("1.1.5", git_sparse_paths=sparse_path_func) + version("1.2.0", git_sparse_paths=sparse_path_func) + version("1.2.5", git_sparse_paths=sparse_path_func) + version("1.1.5", git_sparse_paths=sparse_path_func) + .. _github-fetch: ^^^^^^ diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 4bbc143fc9aae5..589b341f5c0cb8 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -720,6 +720,7 @@ class GitFetchStrategy(VCSFetchStrategy): "submodules", "get_full_repo", "submodules_delete", + "git_sparse_paths", ] git_version_re = r"git version (\S+)" @@ -735,6 +736,7 @@ def __init__(self, **kwargs): self.submodules = kwargs.get("submodules", False) self.submodules_delete = kwargs.get("submodules_delete", False) self.get_full_repo = kwargs.get("get_full_repo", False) + self.git_sparse_paths = kwargs.get("git_sparse_paths", None) @property def git_version(self): @@ -802,38 +804,50 @@ def fetch(self): tty.debug("Already fetched {0}".format(self.stage.source_path)) return - self.clone(commit=self.commit, branch=self.branch, tag=self.tag) + if self.git_sparse_paths: + self._sparse_clone_src(commit=self.commit, branch=self.branch, tag=self.tag) + else: + self._clone_src(commit=self.commit, branch=self.branch, tag=self.tag) + self.submodule_operations() - def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False): + def bare_clone(self, dest): """ - Clone a repository to a path. + Execute a bare clone for metadata only - This method handles cloning from git, but does not require a stage. + Requires a destination since bare cloning does not provide source + and shouldn't be used for staging. + """ + # Default to spack source path + tty.debug("Cloning git repository: {0}".format(self._repo_info())) + + git = self.git + debug = spack.config.get("config:debug") + + # We don't need to worry about which commit/branch/tag is checked out + clone_args = ["clone", "--bare"] + if not debug: + clone_args.append("--quiet") + clone_args.extend([self.url, dest]) + git(*clone_args) + + def _clone_src(self, commit=None, branch=None, tag=None): + """ + Clone a repository to a path using git. Arguments: - dest (str or None): The path into which the code is cloned. If None, - requires a stage and uses the stage's source path. commit (str or None): A commit to fetch from the remote. Only one of commit, branch, and tag may be non-None. branch (str or None): A branch to fetch from the remote. tag (str or None): A tag to fetch from the remote. - bare (bool): Execute a "bare" git clone (--bare option to git) """ # Default to spack source path - dest = dest or self.stage.source_path + dest = self.stage.source_path tty.debug("Cloning git repository: {0}".format(self._repo_info())) git = self.git debug = spack.config.get("config:debug") - if bare: - # We don't need to worry about which commit/branch/tag is checked out - clone_args = ["clone", "--bare"] - if not debug: - clone_args.append("--quiet") - clone_args.extend([self.url, dest]) - git(*clone_args) - elif commit: + if commit: # Need to do a regular clone and check out everything if # they asked for a particular commit. clone_args = ["clone", self.url] @@ -912,6 +926,85 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False): git(*pull_args, ignore_errors=1) git(*co_args) + def _sparse_clone_src(self, commit=None, branch=None, tag=None, **kwargs): + """ + Use git's sparse checkout feature to clone portions of a git repository + + Arguments: + commit (str or None): A commit to fetch from the remote. Only one of + commit, branch, and tag may be non-None. + branch (str or None): A branch to fetch from the remote. + tag (str or None): A tag to fetch from the remote. + """ + dest = self.stage.source_path + git = self.git + + if self.git_version < spack.version.Version("2.25.0.0"): + # code paths exist where the package is not set. Assure some indentifier for the + # package that was configured for sparse checkout exists in the error message + identifier = str(self.url) + if self.package: + identifier += f" ({self.package.name})" + tty.warn( + ( + f"{identifier} is configured for git sparse-checkout " + "but the git version is too old to support sparse cloning. " + "Cloning the full repository instead." + ) + ) + self._clone_src(commit, branch, tag) + else: + # default to depth=2 to allow for retention of some git properties + depth = kwargs.get("depth", 2) + needs_fetch = branch or tag + git_ref = branch or tag or commit + + assert git_ref + + clone_args = ["clone"] + + if needs_fetch: + clone_args.extend(["--branch", git_ref]) + + if self.get_full_repo: + clone_args.append("--no-single-branch") + else: + clone_args.append("--single-branch") + + clone_args.extend( + [f"--depth={depth}", "--no-checkout", "--filter=blob:none", self.url] + ) + + sparse_args = ["sparse-checkout", "set"] + + if callable(self.git_sparse_paths): + sparse_args.extend(self.git_sparse_paths()) + else: + sparse_args.extend([p for p in self.git_sparse_paths]) + + sparse_args.append("--cone") + + checkout_args = ["checkout", git_ref] + + if not spack.config.get("config:debug"): + clone_args.insert(1, "--quiet") + checkout_args.insert(1, "--quiet") + + with temp_cwd(): + git(*clone_args) + repo_name = get_single_file(".") + if self.stage: + self.stage.srcdir = repo_name + shutil.move(repo_name, dest) + + with working_dir(dest): + git(*sparse_args) + git(*checkout_args) + + def submodule_operations(self): + dest = self.stage.source_path + git = self.git + if self.submodules_delete: with working_dir(dest): for submodule_to_delete in self.submodules_delete: @@ -1541,8 +1634,11 @@ def _from_merged_attrs(fetcher, pkg, version): attrs["fetch_options"] = pkg.fetch_options attrs.update(pkg.versions[version]) - if fetcher.url_attr == "git" and hasattr(pkg, "submodules"): - attrs.setdefault("submodules", pkg.submodules) + if fetcher.url_attr == "git": + pkg_attr_list = ["submodules", "git_sparse_paths"] + for pkg_attr in pkg_attr_list: + if hasattr(pkg, pkg_attr): + attrs.setdefault(pkg_attr, getattr(pkg, pkg_attr)) return fetcher(**attrs) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index cb978b97f3fc80..c3926c67abeb95 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -1418,6 +1418,24 @@ def mock_git_repository(git, tmpdir_factory): r1 = rev_hash(branch) r1_file = branch_file + multiple_directories_branch = "many_dirs" + num_dirs = 3 + num_files = 2 + dir_files = [] + for i in range(num_dirs): + for j in range(num_files): + dir_files.append(f"dir{i}/file{j}") + + git("checkout", "-b", multiple_directories_branch) + for f in dir_files: + repodir.ensure(f, file=True) + git("add", f) + + git("-c", "commit.gpgsign=false", "commit", "-m", "many_dirs add files") + + # restore default + git("checkout", default_branch) + # Map of version -> bunch. Each bunch includes; all the args # that must be specified as part of a version() declaration (used to # manufacture a version for the 'git-test' package); the associated @@ -1437,6 +1455,11 @@ def mock_git_repository(git, tmpdir_factory): "default-no-per-version-git": Bunch( revision=default_branch, file=r0_file, args={"branch": default_branch} ), + "many-directories": Bunch( + revision=multiple_directories_branch, + file=dir_files[0], + args={"git": url, "branch": multiple_directories_branch}, + ), } t = Bunch( diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py index 52b164e422e4af..b709780651b07b 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -390,3 +390,38 @@ def submodules_callback(package): assert not os.path.isfile(file_path) file_path = os.path.join(s.package.stage.source_path, "third_party/submodule1/r0_file_1") assert not os.path.isfile(file_path) + + +@pytest.mark.disable_clean_stage_check +def test_git_sparse_paths_partial_clone( + mock_git_repository, git_version, default_mock_concretization, mutable_mock_repo, monkeypatch +): + """ + Test partial clone of repository when using git_sparse_paths property + """ + type_of_test = "many-directories" + sparse_paths = ["dir0"] + omitted_paths = ["dir1", "dir2"] + t = mock_git_repository.checks[type_of_test] + args = copy.copy(t.args) + args["git_sparse_paths"] = sparse_paths + s = default_mock_concretization("git-test") + monkeypatch.setitem(s.package.versions, Version("git"), args) + s.package.do_stage() + with working_dir(s.package.stage.source_path): + # top level directory files are cloned via sparse-checkout + assert os.path.isfile("r0_file") + + for p in sparse_paths: + assert os.path.isdir(p) + + if git_version < Version("2.25.0.0"): + # older versions of git should fall back to a full clone + for p in omitted_paths: + assert os.path.isdir(p) + else: + for p in omitted_paths: + assert not os.path.isdir(p) + + # fixture file is in the sparse-path expansion tree + assert os.path.isfile(t.file) diff --git a/lib/spack/spack/test/packages.py b/lib/spack/spack/test/packages.py index d00db3ed0cffa1..4f16fb71e83abe 100644 --- a/lib/spack/spack/test/packages.py +++ b/lib/spack/spack/test/packages.py @@ -259,6 +259,7 @@ def test_git_url_top_level_git_versions(version_str, tag, commit, branch): assert fetcher.tag == tag assert fetcher.commit == commit assert fetcher.branch == branch + assert fetcher.url == pkg_factory("git-url-top-level").git @pytest.mark.usefixtures("mock_packages", "config") @@ -319,3 +320,14 @@ def test_package_deprecated_version(mock_packages, mock_fetch, mock_stage): assert spack.package_base.deprecated_version(pkg_cls, "1.1.0") assert not spack.package_base.deprecated_version(pkg_cls, "1.0.0") + + +def test_package_can_have_sparse_checkout_properties(mock_packages, mock_fetch, mock_stage): + spec = Spec("git-sparsepaths-pkg") + pkg_cls = spack.repo.PATH.get_pkg_class(spec.name) + assert hasattr(pkg_cls, "git_sparse_paths") + + fetcher = spack.fetch_strategy.for_package_version(pkg_cls(spec), "1.0") + assert isinstance(fetcher, spack.fetch_strategy.GitFetchStrategy) + assert hasattr(fetcher, "git_sparse_paths") + assert fetcher.git_sparse_paths == pkg_cls.git_sparse_paths diff --git a/lib/spack/spack/version/git_ref_lookup.py b/lib/spack/spack/version/git_ref_lookup.py index e6c47194fee33b..6168fc44a5266e 100644 --- a/lib/spack/spack/version/git_ref_lookup.py +++ b/lib/spack/spack/version/git_ref_lookup.py @@ -138,7 +138,7 @@ def lookup_ref(self, ref) -> Tuple[Optional[str], int]: # Only clone if we don't have it! if not os.path.exists(dest): - self.fetcher.clone(dest, bare=True) + self.fetcher.bare_clone(dest) # Lookup commit info with working_dir(dest): diff --git a/var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py b/var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py new file mode 100644 index 00000000000000..b37aba8660d5ee --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py @@ -0,0 +1,17 @@ +# 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 GitSparsepathsPkg(Package): + """Mock package with git_sparse_paths attribute""" + + homepage = "http://www.git-fetch-example.com" + git = "https://a/really.com/big/repo.git" + + version("1.0", tag="v1.0") + + git_sparse_paths = ["foo", "bar", "bing/bang"] From cba2fe914c0b59aeaf6947c8b1cc933ebd6eacb4 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Wed, 14 Aug 2024 22:43:40 -0700 Subject: [PATCH 337/435] g2: add 3.5.0 and 3.5.1 (#45750) --- var/spack/repos/builtin/packages/g2/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/g2/package.py b/var/spack/repos/builtin/packages/g2/package.py index d53f7a8cf294dc..3f64de93c2e953 100644 --- a/var/spack/repos/builtin/packages/g2/package.py +++ b/var/spack/repos/builtin/packages/g2/package.py @@ -20,6 +20,8 @@ class G2(CMakePackage): maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett") version("develop", branch="develop") + version("3.5.1", sha256="a9acdb5d23eca532838f21c4a917727ac85851fc9e1f100d65a6f27c1a563998") + version("3.5.0", sha256="3ff59a705bedf56061bba2d667a04391d82701847f93ea5fa1c1d3bd335d07da") version("3.4.9", sha256="6edc33091f6bd2acb191182831499c226a1c3992c3acc104d6363528b12dfbae") version("3.4.8", sha256="071a6f799c4c4fdfd5d0478152a0cbb9d668d12d71c78d5bda71845fc5580a7f") version("3.4.7", sha256="d6530611e3a515122f11ed4aeede7641f6f8932ef9ee0d4828786572767304dc") From aa3c62d936a632bc2836b6111e1b5a5904a53673 Mon Sep 17 00:00:00 2001 From: David Gardner Date: Thu, 15 Aug 2024 06:08:24 -0700 Subject: [PATCH 338/435] limit patch range (#45756) --- var/spack/repos/builtin/packages/zlib-ng/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/zlib-ng/package.py b/var/spack/repos/builtin/packages/zlib-ng/package.py index c8d8a98addd9c9..45e7282e2f73a2 100644 --- a/var/spack/repos/builtin/packages/zlib-ng/package.py +++ b/var/spack/repos/builtin/packages/zlib-ng/package.py @@ -45,7 +45,7 @@ class ZlibNg(AutotoolsPackage, CMakePackage): build_system("autotools", "cmake", default="autotools") # fix building with NVHPC, see https://github.com/zlib-ng/zlib-ng/pull/1698 - patch("pr-1698.patch", when="@2.1.4:%nvhpc+opt") + patch("pr-1698.patch", when="@2.1.4:2.1.6%nvhpc+opt") with when("build_system=cmake"): depends_on("cmake@3.5.1:", type="build") From 165c1716592f07af42afc5b46a5fd9c361d962da Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 15 Aug 2024 19:49:07 +0200 Subject: [PATCH 339/435] Update archspec to v0.2.5-dev (7e6740012b897ae4a950f0bba7e9726b767e921f) (#45721) --- lib/spack/external/__init__.py | 2 +- lib/spack/external/archspec/cpu/detect.py | 12 +- .../archspec/cpu/microarchitecture.py | 26 ++- .../archspec/json/cpu/microarchitectures.json | 160 +++++++++++++++--- .../json/cpu/microarchitectures_schema.json | 5 +- 5 files changed, 168 insertions(+), 37 deletions(-) diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py index 26ac1f63d00080..f6f481a6ae47c3 100644 --- a/lib/spack/external/__init__.py +++ b/lib/spack/external/__init__.py @@ -18,7 +18,7 @@ * Homepage: https://pypi.python.org/pypi/archspec * Usage: Labeling, comparison and detection of microarchitectures -* Version: 0.2.4 (commit 48b92512b9ce203ded0ebd1ac41b42593e931f7c) +* Version: 0.2.5-dev (commit 7e6740012b897ae4a950f0bba7e9726b767e921f) astunparse ---------------- diff --git a/lib/spack/external/archspec/cpu/detect.py b/lib/spack/external/archspec/cpu/detect.py index d99295d90719bd..f9f095f78a6c05 100644 --- a/lib/spack/external/archspec/cpu/detect.py +++ b/lib/spack/external/archspec/cpu/detect.py @@ -47,7 +47,11 @@ def decorator(factory): def partial_uarch( - name: str = "", vendor: str = "", features: Optional[Set[str]] = None, generation: int = 0 + name: str = "", + vendor: str = "", + features: Optional[Set[str]] = None, + generation: int = 0, + cpu_part: str = "", ) -> Microarchitecture: """Construct a partial microarchitecture, from information gathered during system scan.""" return Microarchitecture( @@ -57,6 +61,7 @@ def partial_uarch( features=features or set(), compilers={}, generation=generation, + cpu_part=cpu_part, ) @@ -90,6 +95,7 @@ def proc_cpuinfo() -> Microarchitecture: return partial_uarch( vendor=_canonicalize_aarch64_vendor(data), features=_feature_set(data, key="Features"), + cpu_part=data.get("CPU part", ""), ) if architecture in (PPC64LE, PPC64): @@ -345,6 +351,10 @@ def sorting_fn(item): generic_candidates = [c for c in candidates if c.vendor == "generic"] best_generic = max(generic_candidates, key=sorting_fn) + # Relevant for AArch64. Filter on "cpu_part" if we have any match + if info.cpu_part != "" and any(c for c in candidates if info.cpu_part == c.cpu_part): + candidates = [c for c in candidates if info.cpu_part == c.cpu_part] + # Filter the candidates to be descendant of the best generic candidate. # This is to avoid that the lack of a niche feature that can be disabled # from e.g. BIOS prevents detection of a reasonably performant architecture diff --git a/lib/spack/external/archspec/cpu/microarchitecture.py b/lib/spack/external/archspec/cpu/microarchitecture.py index 7a251b905e26bf..1ffe51d9184087 100644 --- a/lib/spack/external/archspec/cpu/microarchitecture.py +++ b/lib/spack/external/archspec/cpu/microarchitecture.py @@ -2,9 +2,7 @@ # Archspec Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -"""Types and functions to manage information -on CPU microarchitectures. -""" +"""Types and functions to manage information on CPU microarchitectures.""" import functools import platform import re @@ -65,21 +63,24 @@ class Microarchitecture: passed in as argument above. * versions: versions that support this micro-architecture. - generation (int): generation of the micro-architecture, if - relevant. + generation (int): generation of the micro-architecture, if relevant. + cpu_part (str): cpu part of the architecture, if relevant. """ - # pylint: disable=too-many-arguments + # pylint: disable=too-many-arguments,too-many-instance-attributes #: Aliases for micro-architecture's features feature_aliases = FEATURE_ALIASES - def __init__(self, name, parents, vendor, features, compilers, generation=0): + def __init__(self, name, parents, vendor, features, compilers, generation=0, cpu_part=""): self.name = name self.parents = parents self.vendor = vendor self.features = features self.compilers = compilers + # Only relevant for PowerPC self.generation = generation + # Only relevant for AArch64 + self.cpu_part = cpu_part # Cache the ancestor computation self._ancestors = None @@ -111,6 +112,7 @@ def __eq__(self, other): and self.parents == other.parents # avoid ancestors here and self.compilers == other.compilers and self.generation == other.generation + and self.cpu_part == other.cpu_part ) @coerce_target_names @@ -143,7 +145,8 @@ def __repr__(self): cls_name = self.__class__.__name__ fmt = ( cls_name + "({0.name!r}, {0.parents!r}, {0.vendor!r}, " - "{0.features!r}, {0.compilers!r}, {0.generation!r})" + "{0.features!r}, {0.compilers!r}, generation={0.generation!r}, " + "cpu_part={0.cpu_part!r})" ) return fmt.format(self) @@ -190,6 +193,7 @@ def to_dict(self): "generation": self.generation, "parents": [str(x) for x in self.parents], "compilers": self.compilers, + "cpupart": self.cpu_part, } @staticmethod @@ -202,6 +206,7 @@ def from_dict(data) -> "Microarchitecture": features=set(data["features"]), compilers=data.get("compilers", {}), generation=data.get("generation", 0), + cpu_part=data.get("cpupart", ""), ) def optimization_flags(self, compiler, version): @@ -360,8 +365,11 @@ def fill_target_from_dict(name, data, targets): features = set(values["features"]) compilers = values.get("compilers", {}) generation = values.get("generation", 0) + cpu_part = values.get("cpupart", "") - targets[name] = Microarchitecture(name, parents, vendor, features, compilers, generation) + targets[name] = Microarchitecture( + name, parents, vendor, features, compilers, generation=generation, cpu_part=cpu_part + ) known_targets = {} data = archspec.cpu.schema.TARGETS_JSON["microarchitectures"] diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures.json b/lib/spack/external/archspec/json/cpu/microarchitectures.json index 1e8a8caa35ca77..5e1b2851e80125 100644 --- a/lib/spack/external/archspec/json/cpu/microarchitectures.json +++ b/lib/spack/external/archspec/json/cpu/microarchitectures.json @@ -2225,10 +2225,14 @@ ], "nvhpc": [ { - "versions": "21.11:", + "versions": "21.11:23.8", "name": "zen3", "flags": "-tp {name}", - "warnings": "zen4 is not fully supported by nvhpc yet, falling back to zen3" + "warnings": "zen4 is not fully supported by nvhpc versions < 23.9, falling back to zen3" + }, + { + "versions": "23.9:", + "flags": "-tp {name}" } ] } @@ -2711,7 +2715,8 @@ "flags": "-mcpu=thunderx2t99" } ] - } + }, + "cpupart": "0x0af" }, "a64fx": { "from": ["armv8.2a"], @@ -2779,7 +2784,8 @@ "flags": "-march=armv8.2-a+crc+crypto+fp16+sve" } ] - } + }, + "cpupart": "0x001" }, "cortex_a72": { "from": ["aarch64"], @@ -2816,7 +2822,8 @@ "flags" : "-mcpu=cortex-a72" } ] - } + }, + "cpupart": "0xd08" }, "neoverse_n1": { "from": ["cortex_a72", "armv8.2a"], @@ -2902,7 +2909,8 @@ "flags": "-tp {name}" } ] - } + }, + "cpupart": "0xd0c" }, "neoverse_v1": { "from": ["neoverse_n1", "armv8.4a"], @@ -2926,8 +2934,6 @@ "lrcpc", "dcpop", "sha3", - "sm3", - "sm4", "asimddp", "sha512", "sve", @@ -3028,7 +3034,8 @@ "flags": "-tp {name}" } ] - } + }, + "cpupart": "0xd40" }, "neoverse_v2": { "from": ["neoverse_n1", "armv9.0a"], @@ -3052,13 +3059,10 @@ "lrcpc", "dcpop", "sha3", - "sm3", - "sm4", "asimddp", "sha512", "sve", "asimdfhm", - "dit", "uscat", "ilrcpc", "flagm", @@ -3066,18 +3070,12 @@ "sb", "dcpodp", "sve2", - "sveaes", - "svepmull", - "svebitperm", - "svesha3", - "svesm4", "flagm2", "frint", "svei8mm", "svebf16", "i8mm", - "bf16", - "dgh" + "bf16" ], "compilers" : { "gcc": [ @@ -3102,15 +3100,19 @@ "flags" : "-march=armv8.5-a+sve -mtune=cortex-a76" }, { - "versions": "10.0:11.99", + "versions": "10.0:11.3.99", "flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16 -mtune=cortex-a77" }, + { + "versions": "11.4:11.99", + "flags" : "-mcpu=neoverse-v2" + }, { - "versions": "12.0:12.99", + "versions": "12.0:12.2.99", "flags" : "-march=armv9-a+i8mm+bf16 -mtune=cortex-a710" }, { - "versions": "13.0:", + "versions": "12.3:", "flags" : "-mcpu=neoverse-v2" } ], @@ -3145,7 +3147,113 @@ "flags": "-tp {name}" } ] - } + }, + "cpupart": "0xd4f" + }, + "neoverse_n2": { + "from": ["neoverse_n1", "armv9.0a"], + "vendor": "ARM", + "features": [ + "fp", + "asimd", + "evtstrm", + "aes", + "pmull", + "sha1", + "sha2", + "crc32", + "atomics", + "fphp", + "asimdhp", + "cpuid", + "asimdrdm", + "jscvt", + "fcma", + "lrcpc", + "dcpop", + "sha3", + "asimddp", + "sha512", + "sve", + "asimdfhm", + "uscat", + "ilrcpc", + "flagm", + "ssbs", + "sb", + "dcpodp", + "sve2", + "flagm2", + "frint", + "svei8mm", + "svebf16", + "i8mm", + "bf16" + ], + "compilers" : { + "gcc": [ + { + "versions": "4.8:5.99", + "flags": "-march=armv8-a" + }, + { + "versions": "6:6.99", + "flags" : "-march=armv8.1-a" + }, + { + "versions": "7.0:7.99", + "flags" : "-march=armv8.2-a -mtune=cortex-a72" + }, + { + "versions": "8.0:8.99", + "flags" : "-march=armv8.4-a+sve -mtune=cortex-a72" + }, + { + "versions": "9.0:9.99", + "flags" : "-march=armv8.5-a+sve -mtune=cortex-a76" + }, + { + "versions": "10.0:10.99", + "flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16 -mtune=cortex-a77" + }, + { + "versions": "11.0:", + "flags" : "-mcpu=neoverse-n2" + } + ], + "clang" : [ + { + "versions": "9.0:10.99", + "flags" : "-march=armv8.5-a+sve" + }, + { + "versions": "11.0:13.99", + "flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16" + }, + { + "versions": "14.0:15.99", + "flags" : "-march=armv9-a+i8mm+bf16" + }, + { + "versions": "16.0:", + "flags" : "-mcpu=neoverse-n2" + } + ], + "arm" : [ + { + "versions": "23.04.0:", + "flags" : "-mcpu=neoverse-n2" + } + ], + "nvhpc" : [ + { + "versions": "23.3:", + "name": "neoverse-n1", + "flags": "-tp {name}" + } + ] + }, + "cpupart": "0xd49" }, "m1": { "from": ["armv8.4a"], @@ -3211,7 +3319,8 @@ "flags" : "-mcpu=apple-m1" } ] - } + }, + "cpupart": "0x022" }, "m2": { "from": ["m1", "armv8.5a"], @@ -3289,7 +3398,8 @@ "flags" : "-mcpu=apple-m2" } ] - } + }, + "cpupart": "0x032" }, "arm": { "from": [], diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json b/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json index c21a3a1b372088..085e5b95772e6a 100644 --- a/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json +++ b/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json @@ -52,6 +52,9 @@ } } } + }, + "cpupart": { + "type": "string" } }, "required": [ @@ -107,4 +110,4 @@ "additionalProperties": false } } -} +} \ No newline at end of file From 4d0b04cf34da308d1ebccc8cb87b6333283e3f44 Mon Sep 17 00:00:00 2001 From: Derek Ryan Strong Date: Thu, 15 Aug 2024 11:10:10 -0700 Subject: [PATCH 340/435] hwloc: add v2.11.1 (#45767) * Add hwloc v2.11.1 --- var/spack/repos/builtin/packages/hwloc/package.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index 4643d86ec6d648..f7b0581a844aee 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -36,12 +36,9 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage): executables = ["^hwloc-bind$"] version("master", branch="master") + version("2.11.1", sha256="9f320925cfd0daeaf3a3d724c93e127ecac63750c623654dca0298504aac4c2c") version("2.10.0", sha256="c7fd8a1404a9719c76aadc642864b9f77aed1dc1fc8882d6af861a9260ba240d") - version( - "2.9.3", - sha256="5985db3a30bbe51234c2cd26ebe4ae9b4c3352ab788b1a464c40c0483bf4de59", - preferred=True, - ) + version("2.9.3", sha256="5985db3a30bbe51234c2cd26ebe4ae9b4c3352ab788b1a464c40c0483bf4de59") version("2.9.2", sha256="ffb554d5735e0e0a19d1fd4b2b86e771d3b58b2d97f257eedacae67ade5054b3") version("2.9.1", sha256="a440e2299f7451dc10a57ddbfa3f116c2a6c4be1bb97c663edd3b9c7b3b3b4cf") version("2.9.0", sha256="9d7d3450e0a5fea4cb80ca07dc8db939abb7ab62e2a7bb27f9376447658738ec") @@ -75,9 +72,6 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage): version("1.11.1", sha256="b41f877d79b6026640943d57ef25311299378450f2995d507a5e633da711be61") version("1.9", sha256="9fb572daef35a1c8608d1a6232a4a9f56846bab2854c50562dfb9a7be294f4e8") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - variant("nvml", default=False, description="Support NVML device discovery") variant("gl", default=False, description="Support GL device discovery") variant("libxml2", default=True, description="Build with libxml2") @@ -106,6 +100,8 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage): "oneapi-level-zero", default=False, description="Support Intel OneAPI Level Zero devices" ) + depends_on("c", type="build") + depends_on("cxx", type="build") depends_on("pkgconfig", type="build") depends_on("m4", type="build", when="@master") depends_on("autoconf", type="build", when="@master") From b11bd6b7453047fc33afbec1752abc476e6907d5 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Thu, 15 Aug 2024 20:11:19 +0200 Subject: [PATCH 341/435] pika: add 0.27.0 (#45772) --- var/spack/repos/builtin/packages/pika/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index d63db3e2934386..3739ff9cca6b94 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -19,6 +19,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): license("BSL-1.0") + version("0.27.0", sha256="4a58dc4014edc2074399e4a6ecfa244537c89ce1319b3e14ff3dfe617fb9f9e8") version("0.26.1", sha256="d7cc842238754019abdb536e22325e9a57186cd2ac8cc9c7140a5385f9d730f6") version("0.26.0", sha256="bbec5472c71006c1f55e7946c8dc517dae76c41cacb36fa98195312c74a1bb9a") version("0.25.0", sha256="6646e12f88049116d84ce0caeedaa039a13caaa0431964caea4660b739767b2e") From 7112a49d1e45e107236da73704478048c715caeb Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 15 Aug 2024 12:28:21 -0600 Subject: [PATCH 342/435] libmesh: explicitly disable metis in ~metis case (#45781) --- var/spack/repos/builtin/packages/libmesh/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/libmesh/package.py b/var/spack/repos/builtin/packages/libmesh/package.py index f7e1980d2da8fd..53c41d9c33117b 100644 --- a/var/spack/repos/builtin/packages/libmesh/package.py +++ b/var/spack/repos/builtin/packages/libmesh/package.py @@ -261,6 +261,8 @@ def configure_args(self): if "+petsc" in self.spec: options.append("--with-metis=PETSc") options.append("--with-parmetis=PETSc") + else: + options.append("--disable-metis") if "+petsc" in self.spec or "+slepc" in self.spec: options.append("--enable-petsc=yes") From 10b6d7282ae086a7d03361da205499fd1229977a Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:55:16 -0700 Subject: [PATCH 343/435] Cache extra test sources update (#45493) * stand-alone test API update: self.cache_extra_test_sources(...) -> cache_extra_test_sources(self, ...) * superlu: switch to new cache_extra_test_sources API --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/adios2/package.py | 2 +- .../repos/builtin/packages/aml/package.py | 2 +- .../repos/builtin/packages/amrex/package.py | 2 +- .../repos/builtin/packages/arborx/package.py | 2 +- .../repos/builtin/packages/archer/package.py | 2 +- .../builtin/packages/biobambam2/package.py | 2 +- .../repos/builtin/packages/bolt/package.py | 2 +- .../repos/builtin/packages/bricks/package.py | 2 +- .../repos/builtin/packages/caliper/package.py | 2 +- .../packages/darshan-runtime/package.py | 2 +- .../builtin/packages/darshan-util/package.py | 2 +- .../repos/builtin/packages/dssp/package.py | 2 +- .../builtin/packages/eigenexa/package.py | 2 +- .../repos/builtin/packages/flibcpp/package.py | 2 +- .../builtin/packages/formetis/package.py | 2 +- .../builtin/packages/fortrilinos/package.py | 2 +- .../repos/builtin/packages/genesis/package.py | 2 +- .../repos/builtin/packages/ginkgo/package.py | 2 +- .../repos/builtin/packages/hdf/package.py | 2 +- .../repos/builtin/packages/hip/package.py | 4 ++-- .../repos/builtin/packages/kokkos/package.py | 2 +- .../repos/builtin/packages/legion/package.py | 2 +- .../builtin/packages/libsigsegv/package.py | 2 +- .../repos/builtin/packages/mfem/package.py | 2 +- .../repos/builtin/packages/mpich/package.py | 2 +- .../repos/builtin/packages/openmpi/package.py | 2 +- .../repos/builtin/packages/papi/package.py | 2 +- .../repos/builtin/packages/papyrus/package.py | 2 +- .../repos/builtin/packages/petsc/package.py | 5 +++-- .../builtin/packages/py-chainer/package.py | 2 +- .../packages/py-libensemble/package.py | 4 +++- .../builtin/packages/qthreads/package.py | 2 +- .../packages/rocm-clang-ocl/package.py | 2 +- .../builtin/packages/rocm-cmake/package.py | 2 +- .../repos/builtin/packages/slate/package.py | 2 +- .../builtin/packages/strumpack/package.py | 2 +- .../builtin/packages/superlu-dist/package.py | 2 +- .../repos/builtin/packages/superlu/package.py | 2 +- .../repos/builtin/packages/tau/package.py | 20 +++++++++---------- 39 files changed, 53 insertions(+), 50 deletions(-) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index c70a7b166006bc..a5baeb0cbde5ad 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -364,7 +364,7 @@ def setup_install_tests(self): install test subdirectory for use during `spack test run`. """ extra_install_tests = [join_path("testing", "install", "C")] - self.cache_extra_test_sources(extra_install_tests) + cache_extra_test_sources(self, extra_install_tests) def test_run_executables(self): """Run installed adios2 executables""" diff --git a/var/spack/repos/builtin/packages/aml/package.py b/var/spack/repos/builtin/packages/aml/package.py index 3974d2689a6e58..cdf45388e6322a 100644 --- a/var/spack/repos/builtin/packages/aml/package.py +++ b/var/spack/repos/builtin/packages/aml/package.py @@ -115,7 +115,7 @@ def configure_args(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(self.smoke_test_src) + cache_extra_test_sources(self, self.smoke_test_src) def test_check_tutorial(self): """Compile and run the tutorial tests as install checks""" diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index dee3897fd772e6..ac79ae0c603064 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -357,7 +357,7 @@ def setup_standalone_test(self): if self.spec.satisfies("@:21.11"): return - self.cache_extra_test_sources(["Tests"]) + cache_extra_test_sources(self, ["Tests"]) def test_run_install_test(self): """build and run AmrCore test""" diff --git a/var/spack/repos/builtin/packages/arborx/package.py b/var/spack/repos/builtin/packages/arborx/package.py index b49328a32fdfc6..6a1ac398bf54bc 100644 --- a/var/spack/repos/builtin/packages/arborx/package.py +++ b/var/spack/repos/builtin/packages/arborx/package.py @@ -129,7 +129,7 @@ def cmake_args(self): def setup_build_tests(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.examples_src_dir]) + cache_extra_test_sources(self, [self.examples_src_dir]) @property def cached_tests_work_dir(self): diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py index d414ce5cdd7253..87bd4ea79d8ad9 100644 --- a/var/spack/repos/builtin/packages/archer/package.py +++ b/var/spack/repos/builtin/packages/archer/package.py @@ -50,7 +50,7 @@ def cmake_args(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(["test"]) + cache_extra_test_sources(self, ["test"]) def test_run_parallel_example(self): """build and run parallel-simple""" diff --git a/var/spack/repos/builtin/packages/biobambam2/package.py b/var/spack/repos/builtin/packages/biobambam2/package.py index 1ea3a3a0886b41..1b5acd325341e2 100644 --- a/var/spack/repos/builtin/packages/biobambam2/package.py +++ b/var/spack/repos/builtin/packages/biobambam2/package.py @@ -38,7 +38,7 @@ def configure_args(self): def cache_test_sources(self): """Copy the test source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(self.test_src_dir) + cache_extra_test_sources(self, self.test_src_dir) # Fix test scripts to run installed binaries scripts_dir = join_path(install_test_root(self), self.test_src_dir) diff --git a/var/spack/repos/builtin/packages/bolt/package.py b/var/spack/repos/builtin/packages/bolt/package.py index a5486cb1a756a6..ab1be415bee5e2 100644 --- a/var/spack/repos/builtin/packages/bolt/package.py +++ b/var/spack/repos/builtin/packages/bolt/package.py @@ -56,7 +56,7 @@ def cmake_args(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(["examples"]) + cache_extra_test_sources(self, ["examples"]) def test_sample_nested_example(self): """build and run sample_nested""" diff --git a/var/spack/repos/builtin/packages/bricks/package.py b/var/spack/repos/builtin/packages/bricks/package.py index 64962089bebb2a..d74bebb55a1fa5 100644 --- a/var/spack/repos/builtin/packages/bricks/package.py +++ b/var/spack/repos/builtin/packages/bricks/package.py @@ -76,7 +76,7 @@ def copy_test_sources(self): join_path("examples", "external", "main.cpp"), join_path("examples", "external", "7pt.py"), ] - self.cache_extra_test_sources(srcs) + cache_extra_test_sources(self, srcs) def test_bricklib_example(self): """build and run pre-built example""" diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py index af82c89b901310..01857c5f333a3d 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -202,7 +202,7 @@ def cmake_args(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([join_path("examples", "apps")]) + cache_extra_test_sources(self, [join_path("examples", "apps")]) def test_cxx_example(self): """build and run cxx-example""" diff --git a/var/spack/repos/builtin/packages/darshan-runtime/package.py b/var/spack/repos/builtin/packages/darshan-runtime/package.py index 54d65cf7474481..9cfa189ab9ccdc 100644 --- a/var/spack/repos/builtin/packages/darshan-runtime/package.py +++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py @@ -149,7 +149,7 @@ def basepath(self): @run_after("install") def _copy_test_inputs(self): test_inputs = [join_path(self.basepath, "mpi-io-test.c")] - self.cache_extra_test_sources(test_inputs) + cache_extra_test_sources(self, test_inputs) def test_mpi_io_test(self): """build, run, and check outputs""" diff --git a/var/spack/repos/builtin/packages/darshan-util/package.py b/var/spack/repos/builtin/packages/darshan-util/package.py index 53899df259b10c..3c6e9353609f83 100644 --- a/var/spack/repos/builtin/packages/darshan-util/package.py +++ b/var/spack/repos/builtin/packages/darshan-util/package.py @@ -113,7 +113,7 @@ def tests_log_path(self): @run_after("install") def _copy_test_inputs(self): test_inputs = [self.tests_log_path] - self.cache_extra_test_sources(test_inputs) + cache_extra_test_sources(self, test_inputs) def test_parser(self): """process example log and check counters""" diff --git a/var/spack/repos/builtin/packages/dssp/package.py b/var/spack/repos/builtin/packages/dssp/package.py index cfd40cc00822f6..bc63e22b6e2f56 100644 --- a/var/spack/repos/builtin/packages/dssp/package.py +++ b/var/spack/repos/builtin/packages/dssp/package.py @@ -53,7 +53,7 @@ def edit(self): @run_after("install") def cache_test_sources(self): """Save off the pdb sources for stand-alone testing.""" - self.cache_extra_test_sources("pdb") + cache_extra_test_sources(self, "pdb") def test_mkdssp(self): """calculate structure for example""" diff --git a/var/spack/repos/builtin/packages/eigenexa/package.py b/var/spack/repos/builtin/packages/eigenexa/package.py index 44d7b939d846f6..8eb21e6f37a071 100644 --- a/var/spack/repos/builtin/packages/eigenexa/package.py +++ b/var/spack/repos/builtin/packages/eigenexa/package.py @@ -74,7 +74,7 @@ def setup_build_environment(self, env): @run_after("install") def cache_test_sources(self): """Save off benchmark files for stand-alone tests.""" - self.cache_extra_test_sources("benchmark") + cache_extra_test_sources(self, "benchmark") def test_benchmarks(self): """run benchmark checks""" diff --git a/var/spack/repos/builtin/packages/flibcpp/package.py b/var/spack/repos/builtin/packages/flibcpp/package.py index 7e439a3bce2259..e13cbf754564dd 100644 --- a/var/spack/repos/builtin/packages/flibcpp/package.py +++ b/var/spack/repos/builtin/packages/flibcpp/package.py @@ -73,7 +73,7 @@ def cmake_args(self): def setup_smoke_tests(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.examples_src_dir]) + cache_extra_test_sources(self, [self.examples_src_dir]) @property def cached_tests_work_dir(self): diff --git a/var/spack/repos/builtin/packages/formetis/package.py b/var/spack/repos/builtin/packages/formetis/package.py index ce0239f6ef6182..db2401871a4f86 100644 --- a/var/spack/repos/builtin/packages/formetis/package.py +++ b/var/spack/repos/builtin/packages/formetis/package.py @@ -53,7 +53,7 @@ def cmake_args(self): def setup_smoke_tests(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.examples_src_dir]) + cache_extra_test_sources(self, [self.examples_src_dir]) @property def cached_tests_work_dir(self): diff --git a/var/spack/repos/builtin/packages/fortrilinos/package.py b/var/spack/repos/builtin/packages/fortrilinos/package.py index 738937cbdf9c4c..c1871ab528e799 100644 --- a/var/spack/repos/builtin/packages/fortrilinos/package.py +++ b/var/spack/repos/builtin/packages/fortrilinos/package.py @@ -96,7 +96,7 @@ def cached_tests_work_dir(self): def setup_smoke_tests(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.examples_src_dir]) + cache_extra_test_sources(self, [self.examples_src_dir]) def test_installation(self): """build and run ctest against the installed software""" diff --git a/var/spack/repos/builtin/packages/genesis/package.py b/var/spack/repos/builtin/packages/genesis/package.py index 4ff56e4be14324..d12d5c900663bc 100644 --- a/var/spack/repos/builtin/packages/genesis/package.py +++ b/var/spack/repos/builtin/packages/genesis/package.py @@ -117,4 +117,4 @@ def cached_tests_work_dir(self): def cache_test_sources(self): """Copy test files after the package is installed for test().""" if self.spec.satisfies("@master"): - self.cache_extra_test_sources(["tests"]) + cache_extra_test_sources(self, ["tests"]) diff --git a/var/spack/repos/builtin/packages/ginkgo/package.py b/var/spack/repos/builtin/packages/ginkgo/package.py index 998573ce62aa4c..5c132f12e7fd46 100644 --- a/var/spack/repos/builtin/packages/ginkgo/package.py +++ b/var/spack/repos/builtin/packages/ginkgo/package.py @@ -214,7 +214,7 @@ def extra_install_tests(self): @run_after("install") def cache_test_sources(self): - self.cache_extra_test_sources(self.extra_install_tests) + cache_extra_test_sources(self, self.extra_install_tests) def _cached_tests_src_dir(self, script): """The cached smoke test source directory for the script.""" diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index 75e1ee3a2fd6cc..6fea882e220fa0 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -218,7 +218,7 @@ def cached_tests_work_dir(self): def setup_build_tests(self): """Copy the build test files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(self.extra_install_tests) + cache_extra_test_sources(self, self.extra_install_tests) def _check_version_match(self, exe): """Ensure exe version check yields spec version.""" diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index 413984b1992b46..6cc74196acce8f 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -594,9 +594,9 @@ def cache_test_sources(self): """Copy the tests source files after the package is installed to an install test subdirectory for use during `spack test run`.""" if self.spec.satisfies("@5.1:5.5"): - self.cache_extra_test_sources([self.test_src_dir_old]) + cache_extra_test_sources(self, [self.test_src_dir_old]) elif self.spec.satisfies("@5.6:"): - self.cache_extra_test_sources([self.test_src_dir]) + cache_extra_test_sources(self, [self.test_src_dir]) def test_samples(self): # configure, build and run all hip samples diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 810e9527bcce84..3267815c139e59 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -395,7 +395,7 @@ def setup_build_tests(self): "-DSPACK_PACKAGE_INSTALL_DIR:PATH={0}".format(self.prefix), ] cmake(*cmake_args) - self.cache_extra_test_sources(cmake_out_path) + cache_extra_test_sources(self, cmake_out_path) def test_run(self): """Test if kokkos builds and runs""" diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index 0663518d2ea6c4..fbbbcf9a7f5c0e 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -495,7 +495,7 @@ def install(self, spec, prefix): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([join_path("examples", "local_function_tasks")]) + cache_extra_test_sources(self, [join_path("examples", "local_function_tasks")]) def test_run_local_function_tasks(self): """Build and run external application example""" diff --git a/var/spack/repos/builtin/packages/libsigsegv/package.py b/var/spack/repos/builtin/packages/libsigsegv/package.py index 253ab41b798b31..66e78612fec0a9 100644 --- a/var/spack/repos/builtin/packages/libsigsegv/package.py +++ b/var/spack/repos/builtin/packages/libsigsegv/package.py @@ -36,7 +36,7 @@ def configure_args(self): def setup_tests(self): """Copy the build test files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(self.extra_install_tests) + cache_extra_test_sources(self, self.extra_install_tests) def test_smoke_test(self): """build and run smoke test""" diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 05c59675b6f973..53ec9e54de7731 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -1223,7 +1223,7 @@ def cache_test_sources(self): # Clean the 'examples' directory -- at least one example is always built # and we do not want to cache executables. make("examples/clean", parallel=False) - self.cache_extra_test_sources([self.examples_src_dir, self.examples_data_dir]) + cache_extra_test_sources(self, [self.examples_src_dir, self.examples_data_dir]) def test_ex10(self): """build and run ex10(p)""" diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 5711ed72ff9949..60554b53d0f80c 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -649,7 +649,7 @@ def configure_args(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(["examples", join_path("test", "mpi")]) + cache_extra_test_sources(self, ["examples", join_path("test", "mpi")]) def mpi_launcher(self): """Determine the appropriate launcher.""" diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 5b2fb93783aec6..22bc36c360fa01 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -1298,7 +1298,7 @@ def setup_install_tests(self): Copy the example files after the package is installed to an install test subdirectory for use during `spack test run`. """ - self.cache_extra_test_sources(self.extra_install_tests) + cache_extra_test_sources(self, self.extra_install_tests) def run_installed_binary(self, bin, options, expected): """run and check outputs for the installed binary""" diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 7fb31bc920a094..b1c869f7bada03 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -209,7 +209,7 @@ def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" if os.path.exists(self.test_src_dir): - self.cache_extra_test_sources([self.test_src_dir]) + cache_extra_test_sources(self, [self.test_src_dir]) def test_smoke(self): """Compile and run simple code against the installed papi library.""" diff --git a/var/spack/repos/builtin/packages/papyrus/package.py b/var/spack/repos/builtin/packages/papyrus/package.py index 76703751c487b0..166dbee53f916e 100644 --- a/var/spack/repos/builtin/packages/papyrus/package.py +++ b/var/spack/repos/builtin/packages/papyrus/package.py @@ -42,7 +42,7 @@ def setup_run_environment(self, env): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(join_path("kv", "tests")) + cache_extra_test_sources(self, join_path("kv", "tests")) @property def _lib_dir(self): diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 59a265649f18f3..32a40ce2816a47 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -697,8 +697,9 @@ def setup_build_tests(self): tty.warn("Stand-alone tests only available for v3.13:") return - self.cache_extra_test_sources( - [join_path("src", "ksp", "ksp", "tutorials"), join_path("src", "snes", "tutorials")] + cache_extra_test_sources( + self, + [join_path("src", "ksp", "ksp", "tutorials"), join_path("src", "snes", "tutorials")], ) def get_runner(self): diff --git a/var/spack/repos/builtin/packages/py-chainer/package.py b/var/spack/repos/builtin/packages/py-chainer/package.py index 77167c0b363ed0..538a5604f71ce2 100644 --- a/var/spack/repos/builtin/packages/py-chainer/package.py +++ b/var/spack/repos/builtin/packages/py-chainer/package.py @@ -52,7 +52,7 @@ class PyChainer(PythonPackage): @run_after("install") def cache_test_sources(self): if "+mn" in self.spec: - self.cache_extra_test_sources("examples") + cache_extra_test_sources(self, "examples") def test_chainermn(self): """run the ChainerMN test""" diff --git a/var/spack/repos/builtin/packages/py-libensemble/package.py b/var/spack/repos/builtin/packages/py-libensemble/package.py index 5f16432252fb5a..b80d1d692f4d3a 100644 --- a/var/spack/repos/builtin/packages/py-libensemble/package.py +++ b/var/spack/repos/builtin/packages/py-libensemble/package.py @@ -92,7 +92,9 @@ class PyLibensemble(PythonPackage): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(join_path("examples", "calling_scripts", "regression_tests")) + cache_extra_test_sources( + self, join_path("examples", "calling_scripts", "regression_tests") + ) def run_tutorial_script(self, script): """run the tutorial example regression test""" diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index 51f83c2b8f9e2f..d840c19ffd76bd 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -114,7 +114,7 @@ def configure_args(self): def setup_build_tests(self): """Copy the build test files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([join_path("test", "argparsing.h"), self.test_base_path]) + cache_extra_test_sources(self, [join_path("test", "argparsing.h"), self.test_base_path]) def _build_and_run_test(self, test): """Build and run the test.""" diff --git a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py index 4197bf22898499..6c23a9e084eaf7 100644 --- a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py +++ b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py @@ -83,7 +83,7 @@ class RocmClangOcl(CMakePackage): def cache_test_sources(self): """Copy the tests source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.test_src_dir]) + cache_extra_test_sources(self, [self.test_src_dir]) def test_make(self): """Test make""" diff --git a/var/spack/repos/builtin/packages/rocm-cmake/package.py b/var/spack/repos/builtin/packages/rocm-cmake/package.py index 21cab81467347b..3be1f426ba1398 100644 --- a/var/spack/repos/builtin/packages/rocm-cmake/package.py +++ b/var/spack/repos/builtin/packages/rocm-cmake/package.py @@ -63,7 +63,7 @@ class RocmCmake(CMakePackage): def cache_test_sources(self): """Copy the tests source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.test_src_dir]) + cache_extra_test_sources(self, [self.test_src_dir]) def test_cmake(self): """Test cmake""" diff --git a/var/spack/repos/builtin/packages/slate/package.py b/var/spack/repos/builtin/packages/slate/package.py index aa303ed17d5add..9a89c50bcc0ecc 100644 --- a/var/spack/repos/builtin/packages/slate/package.py +++ b/var/spack/repos/builtin/packages/slate/package.py @@ -158,7 +158,7 @@ def cache_test_sources(self): return """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(["examples"]) + cache_extra_test_sources(self, ["examples"]) def mpi_launcher(self): searchpath = [self.spec["mpi"].prefix.bin] diff --git a/var/spack/repos/builtin/packages/strumpack/package.py b/var/spack/repos/builtin/packages/strumpack/package.py index 5f729961516bf6..cb1428dcff8a0b 100644 --- a/var/spack/repos/builtin/packages/strumpack/package.py +++ b/var/spack/repos/builtin/packages/strumpack/package.py @@ -208,7 +208,7 @@ def test_data_dir(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.test_data_dir, self.test_src_dir]) + cache_extra_test_sources(self, [self.test_data_dir, self.test_src_dir]) def _test_example(self, test_prog, test_cmd, pre_args=[]): test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 1a2809eb0df62d..1440da388a4b66 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -169,7 +169,7 @@ def flag_handler(self, name, flags): def cache_test_sources(self): """Copy the example matrices after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.examples_src_dir]) + cache_extra_test_sources(self, [self.examples_src_dir]) def test_pddrive(self): """run cached pddrive""" diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py index 5528378c80cc9a..6a62ae9e1744c4 100644 --- a/var/spack/repos/builtin/packages/superlu/package.py +++ b/var/spack/repos/builtin/packages/superlu/package.py @@ -116,7 +116,7 @@ def setup_standalone_tests(self): filter_file(r"include \.\./" + filename, "include ./" + filename, makefile) # Cache the examples directory for use by stand-alone tests - self.pkg.cache_extra_test_sources(self.pkg.examples_src_dir) + cache_extra_test_sources(self.pkg, self.pkg.examples_src_dir) def _make_hdr_for_test(self, lib): """Standard configure arguments for make.inc""" diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index ed3aaafe405ae8..4b944cc027312e 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -462,23 +462,23 @@ def setup_run_environment(self, env): def setup_build_tests(self): """Copy the build test files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(self.matmult_test) - self.cache_extra_test_sources(self.makefile_test) - self.cache_extra_test_sources(self.makefile_inc_test) + cache_extra_test_sources(self, self.matmult_test) + cache_extra_test_sources(self, self.makefile_test) + cache_extra_test_sources(self, self.makefile_inc_test) if "+dyninst" in self.spec: - self.cache_extra_test_sources(self.dyninst_test) + cache_extra_test_sources(self, self.dyninst_test) if "+cuda" in self.spec: - self.cache_extra_test_sources(self.cuda_test) + cache_extra_test_sources(self, self.cuda_test) if "+level_zero" in self.spec: - self.cache_extra_test_sources(self.level_zero_test) + cache_extra_test_sources(self, self.level_zero_test) if "+rocm" in self.spec: - self.cache_extra_test_sources(self.rocm_test) + cache_extra_test_sources(self, self.rocm_test) if "+syscall" in self.spec: - self.cache_extra_test_sources(self.syscall_test) + cache_extra_test_sources(self, self.syscall_test) if "+ompt" in self.spec: - self.cache_extra_test_sources(self.ompt_test) + cache_extra_test_sources(self, self.ompt_test) if "+python" in self.spec: - self.cache_extra_test_sources(self.python_test) + cache_extra_test_sources(self, self.python_test) def _run_python_test(self, test_name, purpose, work_dir): tau_python = which(self.prefix.bin.tau_python) From 904d43f0e69c18e1cefa52cd14a7cc00090acdcf Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Thu, 15 Aug 2024 14:21:26 -0600 Subject: [PATCH 344/435] seacas: new version (#45777) Update fmt dependency to support fmt@11: Use an adios2 release instead of master New release of seacas --- var/spack/repos/builtin/packages/seacas/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py index 58423ae981ba94..3b90a9fe3fcae6 100644 --- a/var/spack/repos/builtin/packages/seacas/package.py +++ b/var/spack/repos/builtin/packages/seacas/package.py @@ -35,7 +35,9 @@ class Seacas(CMakePackage): # ###################### Versions ########################## version("master", branch="master") - # note: if next release supports fmt@11, update dependencies below + version( + "2024-08-15", sha256="c85130b0dac5ab9a08dcb53c8ccff478122d72b08bd41d99c0adfddc5eb18a52" + ) version( "2024-07-10", sha256="b2ba6ca80359fed8ed2a8a210052582c7a3b7b837253bd1e9be941047dcab3ff" ) @@ -237,7 +239,8 @@ class Seacas(CMakePackage): depends_on("hdf5+hl~mpi", when="~mpi") depends_on("hdf5+hl+mpi", when="+mpi") - depends_on("fmt@10.2.1:10", when="@2024-03-11:") + depends_on("fmt@10:", when="@2024-08-15:") + depends_on("fmt@10.2.1:10", when="@2024-03-11:2024-07-10") depends_on("fmt@10.1.0:10", when="@2023-10-24:2023-11-27") depends_on("fmt@9.1.0", when="@2022-10-14:2023-05-30") depends_on("fmt@8.1.0:9", when="@2022-03-04:2022-05-16") @@ -263,7 +266,7 @@ class Seacas(CMakePackage): depends_on("cgns@4.2.0:~mpi+scoping", when="~mpi") with when("+adios2"): - depends_on("adios2@master") + depends_on("adios2@2.10.1") depends_on("adios2~mpi", when="~mpi") depends_on("adios2+mpi", when="+mpi") From a965c7c5c881748b084a5b8d116906a065f63456 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:52:31 -0700 Subject: [PATCH 345/435] Open3d: Reinstate re-use of stand-alone test method (#45755) * open3d: Reinstate re-use of stand-alone test method * open3d: ignore test_open3d_import when ~python --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/open3d/package.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/open3d/package.py b/var/spack/repos/builtin/packages/open3d/package.py index cd77d5290e721e..25fca442400e76 100644 --- a/var/spack/repos/builtin/packages/open3d/package.py +++ b/var/spack/repos/builtin/packages/open3d/package.py @@ -120,11 +120,11 @@ def install(self, spec, prefix): @run_after("install") @on_package_attributes(run_tests=True) - def check_import(self): - if "+python" in self.spec: - self.run_test( - python.path, - ["-c", "import open3d"], - purpose="checking import of open3d", - work_dir="spack-test", - ) + def test_open3d_import(self): + """Checking import of open3d""" + if "+python" not in self.spec: + return + + with working_dir("spack-test"): + python = which(python.path) + python("-c", "import open3d") From c624088a7b77abef56be5280ca4a9de7c4fdf211 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:47:55 -0700 Subject: [PATCH 346/435] n2p2: convert from old to new test API (#45141) * n2p2: convert from old to new test API * n2p2: Enhance stand-alone testing checks to reduce unnecessary processing --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/n2p2/package.py | 68 ++++++++++++------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/var/spack/repos/builtin/packages/n2p2/package.py b/var/spack/repos/builtin/packages/n2p2/package.py index 3bb4f0d42db63c..8d27028eda3022 100644 --- a/var/spack/repos/builtin/packages/n2p2/package.py +++ b/var/spack/repos/builtin/packages/n2p2/package.py @@ -2,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os from spack.package import * from spack.pkg.builtin.boost import Boost @@ -59,16 +60,15 @@ class N2p2(MakefilePackage): def edit(self, spec, prefix): makefile = FileFilter(join_path("src", "makefile")) - makefile.filter("MODE=.*", "MODE={0}".format("shared" if "+shared" in spec else "static")) + makefile.filter("MODE=.*", f"MODE={'shared' if '+shared' in spec else 'static'}") makefile = FileFilter(join_path("src", "makefile.gnu")) blas_libs = self.spec["blas"].libs - makefile.filter("PROJECT_CC=.*", "PROJECT_CC={0}".format(spack_cxx)) - makefile.filter("PROJECT_MPICC=.*", "PROJECT_MPICC={0}".format(self.spec["mpi"].mpicxx)) - makefile.filter("PROJECT_CFLAGS=.*", "PROJECT_CFLAGS={0}".format(self.compiler.cxx11_flag)) + makefile.filter("PROJECT_CC=.*", f"PROJECT_CC={spack_cxx}") + makefile.filter("PROJECT_MPICC=.*", f"PROJECT_MPICC={self.spec['mpi'].mpicxx}") + makefile.filter("PROJECT_CFLAGS=.*", f"PROJECT_CFLAGS={self.compiler.cxx11_flag}") makefile.filter( - "PROJECT_LDFLAGS_BLAS.*", - "PROJECT_LDFLAGS_BLAS={0} -lgsl -lgslcblas".format(blas_libs.ld_flags), + "PROJECT_LDFLAGS_BLAS.*", f"PROJECT_LDFLAGS_BLAS={blas_libs.ld_flags} -lgsl -lgslcblas" ) def build(self, spec, prefix): @@ -94,46 +94,62 @@ def install(self, spec, prefix): def setup_build_tests(self): """Copy the build test files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources(".") + cache_extra_test_sources(self, ["."]) + + def test_result_check(self): + """Build and run result-check.sh""" + # The results cannot be verified with the script without an expected + # results file added to the test subdirectory of the package repository. + expected_file = join_path( + self.test_suite.current_test_data_dir, f"expected-result-{self.version}.txt" + ) + if not os.path.exists(expected_file): + raise SkipTest( + f"The expected results file is missing from the repository for {self.version}" + ) - def test(self): - with working_dir(join_path(self.install_test_root, "test"), create=False): + result_check_script = join_path(self.test_suite.current_test_data_dir, "result-check.sh") + if not os.path.exists(result_check_script): + raise SkipTest("Required result-check.sh is missing from the repository directory") + + make = which("make") + with working_dir(self.test_suite.current_test_cache_dir.test): make("clean") - with working_dir(join_path(self.install_test_root, "src"), create=False): + with working_dir(self.test_suite.current_test_cache_dir.src): make("clean") make( "MODE=test", - "PROJECT_GSL={0}".format(self.spec["gsl"].prefix.include), - "PROJECT_EIGEN={0}".format(self.spec["eigen"].prefix.include.eigen3), + f"PROJECT_GSL={self.spec['gsl'].prefix.include}", + f"PROJECT_EIGEN={self.spec['eigen'].prefix.include.eigen3}", ) make( "MODE=test", "lammps-nnp", - "PROJECT_GSL={0}".format(self.spec["gsl"].prefix.include), - "PROJECT_EIGEN={0}".format(self.spec["eigen"].prefix.include.eigen3), + f"PROJECT_GSL={self.spec['gsl'].prefix.include}", + f"PROJECT_EIGEN={self.spec['eigen'].prefix.include.eigen3}", ) make("pynnp", "MODE=test") - with working_dir(join_path(self.install_test_root, "test"), create=False): + with working_dir(self.test_suite.current_test_cache_dir.test): if self.spec.satisfies("%fj"): f = FileFilter(join_path("cpp", "nnp_test.h")) - f.filter( - "(example.co", - '("{0} -n 1 " + example.co'.format(self.spec["mpi"].prefix.bin.mpirun), - string=True, - ) + mpirun = self.spec["mpi"].prefix.bin.mpirun + f.filter("(example.co", f'("{mpirun} -n 1 " + example.co', string=True) + cpp_output = "output_cpp.txt" f = FileFilter(join_path("cpp", "makefile")) - f.filter("log_level=.*", "log_level=$(LOG_LEVEL) 2>&1 | tee -a ../output_cpp.txt") + f.filter("log_level=.*", f"log_level=$(LOG_LEVEL) 2>&1 | tee -a ../{cpp_output}") + python_output = "output_python.txt" f = FileFilter(join_path("python", "makefile")) - f.filter("term\\s-v.*", "term -v | tee -a ../output_python.txt") + f.filter("term\\s-v.*", f"term -v | tee -a ../{python_output}") make("cpp", parallel=False) + assert os.path.isfile(cpp_output), f"{cpp_output} was not produced" + make("python", parallel=False) + assert os.path.isfile(python_output), f"{python_output} was not produced" - test_dir = self.test_suite.current_test_data_dir - expected_file = join_path(test_dir, "expected-result-{0}.txt".format(self.version)) - check_n2p2 = Executable(join_path(test_dir, "result-check.sh")) - check_n2p2("./output_cpp.txt", "./output_python.txt", expected_file) + result_check = which(result_check_script) + result_check(cpp_output, python_output, expected_file) From b1b0c108bbc6daa5d3154b19a3d15507db60e4d3 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:22:55 -0700 Subject: [PATCH 347/435] parsec: old to new test API (#45122) * parsec: old to new test API * parsec: restore stand-alone test subparts; preliminary test build fixes --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/parsec/package.py | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/parsec/package.py b/var/spack/repos/builtin/packages/parsec/package.py index c98ba1336f42ca..faba983eea22ae 100644 --- a/var/spack/repos/builtin/packages/parsec/package.py +++ b/var/spack/repos/builtin/packages/parsec/package.py @@ -104,17 +104,29 @@ def check(self): warn += "https://bitbucket.org/icldistcomp/parsec/issues" tty.msg(warn) - def test(self): - """Compile and run a user program with the installed library""" - with working_dir(join_path(self.install_test_root, "contrib/build_with_parsec")): - self.run_test( - "cmake", options=["."], purpose="Check if CMake can find PaRSEC and its targets" - ) - self.run_test("make", purpose="Check if tests can compile") - self.run_test("./dtd_test_allreduce") - self.run_test("./write_check") + contrib_dir = join_path("contrib", "build_with_parsec") + + def test_contrib(self): + """build and run contrib examples""" + with working_dir(join_path(self.test_suite.current_test_cache_dir, self.contrib_dir)): + cmake = self.spec["cmake"].command + args = [ + "-Wno-dev", + f"-DCMAKE_C_COMPILER={self.spec['mpi'].mpicc}", + f"-DCMAKE_PREFIX_PATH={self.prefix}", + ".", + ] + if "+cuda" in self.spec: + args.append("-DCUDA_TOOLKIT_ROOT_DIR:STRING=" + self.spec["cuda"].prefix) + + cmake(*args) + make() + + for name in ["dtd_test_allreduce", "write_check"]: + with test_part(self, f"test_contrib_{name}", f"run {name}"): + exe = which(name) + exe() @run_after("install") def cache_test_sources(self): - srcs = ["contrib/build_with_parsec"] - self.cache_extra_test_sources(srcs) + cache_extra_test_sources(self, self.contrib_dir) From 067da09b464981de33db6149d1d354f9a983095b Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 15 Aug 2024 19:37:39 -0700 Subject: [PATCH 348/435] hypre: get rid of use of deprecated run_test method (#45762) * hypre: get rid of depreciated run_test method * hypre: use mkdirp directly * hypre: use install() for ij for addition of permissions fix --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- var/spack/repos/builtin/packages/hypre/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 9b908b4465445a..ad0659072de0c6 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -374,8 +374,8 @@ def install(self, spec, prefix): make("install") if spec.satisfies("+gptune"): make("test") - self.run_test("mkdir", options=["-p", self.prefix.bin]) - self.run_test("cp", options=["test/ij", self.prefix.bin + "/."]) + mkdirp(self.prefix.bin) + install(join_path("test", "ij"), self.prefix.bin) extra_install_tests = join_path("src", "examples") From a2fd26bbcc26b04064c2079c2fa8897fe4893212 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 15 Aug 2024 21:03:05 -0700 Subject: [PATCH 349/435] rccl: new test API (#45241) * rccl: new test API * rccl: stand-alone test docstring tweak --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- var/spack/repos/builtin/packages/rccl/package.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/rccl/package.py b/var/spack/repos/builtin/packages/rccl/package.py index 9b886e264107d4..49b9e4081ede08 100644 --- a/var/spack/repos/builtin/packages/rccl/package.py +++ b/var/spack/repos/builtin/packages/rccl/package.py @@ -126,8 +126,7 @@ def cmake_args(self): args.append(self.define("BUILD_TESTS", "ON")) return args - def test(self): - test_dir = join_path(self.spec["rccl"].prefix, "bin") - with working_dir(test_dir, create=True): - exe = Executable("rccl-UnitTests") - exe() + def test_unit(self): + """Run unit tests""" + unit_tests = which(join_path(self.prefix.bin, "rccl-UnitTests")) + unit_tests() From 4e9fbca0337babd47e69c685700cb870653cf2f5 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 16 Aug 2024 13:42:01 +0200 Subject: [PATCH 350/435] Clean up `test/cmd/ci.py` (#45774) * Use absolute paths instead of https:// fake mirrors (this speed-up tests by avoiding requests) * Add a fixture to gather in a single place code that is copy/pasted in a lot of tests * General clean-up of tests and repeated code Co-authored-by: Harmen Stoppels --- lib/spack/spack/ci.py | 4 - lib/spack/spack/test/cmd/ci.py | 1635 ++++++++++++-------------------- 2 files changed, 603 insertions(+), 1036 deletions(-) diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 57a15bbd545a0e..842e944a9a0254 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -1433,10 +1433,6 @@ def copy_stage_logs_to_artifacts(job_spec: spack.spec.Spec, job_log_dir: str) -> job_log_dir: path into which build log should be copied """ tty.debug(f"job spec: {job_spec}") - if not job_spec: - msg = f"Cannot copy stage logs: job spec ({job_spec}) is required" - tty.error(msg) - return try: pkg_cls = spack.repo.PATH.get_pkg_class(job_spec.name) diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index 1747c4a26a3ff8..012c119ad7f519 100644 --- a/lib/spack/spack/test/cmd/ci.py +++ b/lib/spack/spack/test/cmd/ci.py @@ -2,11 +2,12 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - import filecmp import json import os +import pathlib import shutil +from typing import NamedTuple import jsonschema import pytest @@ -25,13 +26,11 @@ import spack.repo as repo import spack.util.gpg import spack.util.spack_yaml as syaml -import spack.util.url as url_util from spack.cmd.ci import FAILED_CREATE_BUILDCACHE_CODE from spack.schema.buildcache_spec import schema as specfile_schema from spack.schema.ci import schema as ci_schema from spack.schema.database_index import schema as db_idx_schema from spack.spec import Spec -from spack.util.pattern import Bunch config_cmd = spack.main.SpackCommand("config") ci_cmd = spack.main.SpackCommand("ci") @@ -42,7 +41,11 @@ uninstall_cmd = spack.main.SpackCommand("uninstall") buildcache_cmd = spack.main.SpackCommand("buildcache") -pytestmark = [pytest.mark.not_on_windows("does not run on windows"), pytest.mark.maybeslow] +pytestmark = [ + pytest.mark.usefixtures("mock_packages"), + pytest.mark.not_on_windows("does not run on windows"), + pytest.mark.maybeslow, +] @pytest.fixture() @@ -89,6 +92,35 @@ def mock_git_repo(git, tmpdir): yield repo_path +@pytest.fixture() +def ci_generate_test(tmp_path, mutable_mock_env_path, install_mockery, ci_base_environment): + """Returns a function that creates a new test environment, and runs 'spack generate' + on it, given the content of the spack.yaml file. + + Additional positional arguments will be added to the 'spack generate' call. + """ + + def _func(spack_yaml_content, *args, fail_on_error=True): + spack_yaml = tmp_path / "spack.yaml" + spack_yaml.write_text(spack_yaml_content) + + env_cmd("create", "test", str(spack_yaml)) + outputfile = tmp_path / ".gitlab-ci.yml" + with ev.read("test"): + output = ci_cmd( + "generate", + "--output-file", + str(outputfile), + *args, + output=str, + fail_on_error=fail_on_error, + ) + + return spack_yaml, outputfile, output + + return _func + + def test_specs_staging(config, tmpdir): """Make sure we achieve the best possible staging for the following spec DAG:: @@ -145,21 +177,13 @@ def test_specs_staging(config, tmpdir): assert spec_a_label in stages[3] -def test_ci_generate_with_env( - tmpdir, - mutable_mock_env_path, - install_mockery, - mock_packages, - ci_base_environment, - mock_binary_index, -): +def test_ci_generate_with_env(ci_generate_test, tmp_path, mock_binary_index): """Make sure we can get a .gitlab-ci.yml from an environment file - which has the gitlab-ci, cdash, and mirrors sections.""" - mirror_url = "https://my.fake.mirror" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + which has the gitlab-ci, cdash, and mirrors sections. + """ + mirror_url = tmp_path / "ci-mirror" + spack_yaml, outputfile, _ = ci_generate_test( + f"""\ spack: definitions: - old-gcc-pkgs: @@ -174,7 +198,7 @@ def test_ci_generate_with_env( - matrix: - [$old-gcc-pkgs] mirrors: - some-mirror: {0} + some-mirror: {mirror_url} ci: pipeline-gen: - submapping: @@ -201,92 +225,54 @@ def test_ci_generate_with_env( url: https://my.fake.cdash project: Not used site: Nothing -""".format( - mirror_url - ) - ) - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) +""" + ) + yaml_contents = syaml.load(outputfile.read_text()) - with open(outputfile) as f: - contents = f.read() - yaml_contents = syaml.load(contents) - assert "workflow" in yaml_contents - assert "rules" in yaml_contents["workflow"] - assert yaml_contents["workflow"]["rules"] == [{"when": "always"}] + assert "workflow" in yaml_contents + assert "rules" in yaml_contents["workflow"] + assert yaml_contents["workflow"]["rules"] == [{"when": "always"}] - assert "stages" in yaml_contents - assert len(yaml_contents["stages"]) == 5 - assert yaml_contents["stages"][0] == "stage-0" - assert yaml_contents["stages"][4] == "stage-rebuild-index" + assert "stages" in yaml_contents + assert len(yaml_contents["stages"]) == 5 + assert yaml_contents["stages"][0] == "stage-0" + assert yaml_contents["stages"][4] == "stage-rebuild-index" - assert "rebuild-index" in yaml_contents - rebuild_job = yaml_contents["rebuild-index"] - expected = "spack buildcache update-index --keys {0}".format(mirror_url) - assert rebuild_job["script"][0] == expected - assert rebuild_job["custom_attribute"] == "custom!" + assert "rebuild-index" in yaml_contents + rebuild_job = yaml_contents["rebuild-index"] + assert rebuild_job["script"][0] == f"spack buildcache update-index --keys {mirror_url}" + assert rebuild_job["custom_attribute"] == "custom!" - assert "variables" in yaml_contents - assert "SPACK_ARTIFACTS_ROOT" in yaml_contents["variables"] - artifacts_root = yaml_contents["variables"]["SPACK_ARTIFACTS_ROOT"] - assert artifacts_root == "jobs_scratch_dir" + assert "variables" in yaml_contents + assert "SPACK_ARTIFACTS_ROOT" in yaml_contents["variables"] + assert yaml_contents["variables"]["SPACK_ARTIFACTS_ROOT"] == "jobs_scratch_dir" -def test_ci_generate_with_env_missing_section( - tmpdir, - working_env, - mutable_mock_env_path, - install_mockery, - mock_packages, - ci_base_environment, - mock_binary_index, -): +def test_ci_generate_with_env_missing_section(ci_generate_test, tmp_path, mock_binary_index): """Make sure we get a reasonable message if we omit gitlab-ci section""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + _, _, output = ci_generate_test( + f"""\ spack: specs: - archive-files mirrors: - some-mirror: https://my.fake.mirror -""" - ) - - expect_out = "Environment does not have `ci` a configuration" - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - - with ev.read("test"): - output = ci_cmd("generate", fail_on_error=False, output=str) - assert expect_out in output + some-mirror: {tmp_path / 'ci-mirror'} +""", + fail_on_error=False, + ) + assert "Environment does not have `ci` a configuration" in output -def test_ci_generate_with_cdash_token( - tmpdir, - mutable_mock_env_path, - install_mockery, - mock_packages, - ci_base_environment, - mock_binary_index, -): +def test_ci_generate_with_cdash_token(ci_generate_test, tmp_path, mock_binary_index, monkeypatch): """Make sure we it doesn't break if we configure cdash""" - os.environ.update({"SPACK_CDASH_AUTH_TOKEN": "notreallyatokenbutshouldnotmatter"}) - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + monkeypatch.setenv("SPACK_CDASH_AUTH_TOKEN", "notreallyatokenbutshouldnotmatter") + backup_file = tmp_path / "backup-ci.yml" + spack_yaml_content = f"""\ spack: specs: - archive-files mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {tmp_path / "ci-mirror"} ci: enable-artifacts-buildcache: True pipeline-gen: @@ -299,53 +285,35 @@ def test_ci_generate_with_cdash_token( image: donotcare cdash: build-group: Not important - url: https://my.fake.cdash + url: {(tmp_path / "cdash").as_uri()} project: Not used site: Nothing """ - ) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - - with ev.read("test"): - copy_to_file = str(tmpdir.join("backup-ci.yml")) - output = ci_cmd("generate", "--copy-to", copy_to_file, output=str) - # That fake token should still have resulted in being unable to - # register build group with cdash, but the workload should - # still have been generated. - expect = "Problem populating buildgroup" - assert expect in output - - dir_contents = os.listdir(tmpdir.strpath) - - assert "backup-ci.yml" in dir_contents - - orig_file = str(tmpdir.join(".gitlab-ci.yml")) + spack_yaml, original_file, output = ci_generate_test( + spack_yaml_content, "--copy-to", str(backup_file) + ) - assert filecmp.cmp(orig_file, copy_to_file) is True + # That fake token should still have resulted in being unable to + # register build group with cdash, but the workload should + # still have been generated. + assert "Problem populating buildgroup" in output + assert backup_file.exists() + assert filecmp.cmp(str(original_file), str(backup_file)) def test_ci_generate_with_custom_settings( - tmpdir, - working_env, - mutable_mock_env_path, - install_mockery, - mock_packages, - monkeypatch, - ci_base_environment, - mock_binary_index, + ci_generate_test, tmp_path, mock_binary_index, monkeypatch ): """Test use of user-provided scripts and attributes""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + monkeypatch.setattr(spack.main, "get_version", lambda: "0.15.3") + monkeypatch.setattr(spack.main, "get_spack_commit", lambda: "big ol commit sha") + spack_yaml, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - archive-files mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {tmp_path / "ci-mirror"} ci: pipeline-gen: - submapping: @@ -356,13 +324,13 @@ def test_ci_generate_with_custom_settings( - donotcare variables: ONE: plain-string-value - TWO: ${INTERP_ON_BUILD} + TWO: ${{INTERP_ON_BUILD}} before_script: - mkdir /some/path - pushd /some/path - - git clone ${SPACK_REPO} + - git clone ${{SPACK_REPO}} - cd spack - - git checkout ${SPACK_REF} + - git checkout ${{SPACK_REF}} - popd script: - spack -d ci rebuild @@ -373,76 +341,54 @@ def test_ci_generate_with_custom_settings( paths: - some/custom/artifact """ - ) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - with ev.read("test"): - monkeypatch.setattr(spack.main, "get_version", lambda: "0.15.3") - monkeypatch.setattr(spack.main, "get_spack_commit", lambda: "big ol commit sha") - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as f: - contents = f.read() - yaml_contents = syaml.load(contents) + ) + yaml_contents = syaml.load(outputfile.read_text()) + + assert yaml_contents["variables"]["SPACK_VERSION"] == "0.15.3" + assert yaml_contents["variables"]["SPACK_CHECKOUT_VERSION"] == "big ol commit sha" + + assert any("archive-files" in key for key in yaml_contents) + for ci_key, ci_obj in yaml_contents.items(): + if "archive-files" not in ci_key: + continue + + # Ensure we have variables, possibly interpolated + assert ci_obj["variables"]["ONE"] == "plain-string-value" + assert ci_obj["variables"]["TWO"] == "${INTERP_ON_BUILD}" + + # Ensure we have scripts verbatim + assert ci_obj["before_script"] == [ + "mkdir /some/path", + "pushd /some/path", + "git clone ${SPACK_REPO}", + "cd spack", + "git checkout ${SPACK_REF}", + "popd", + ] + assert ci_obj["script"][1].startswith("cd ") + ci_obj["script"][1] = "cd ENV" + assert ci_obj["script"] == [ + "spack -d ci rebuild", + "cd ENV", + "spack env activate --without-view .", + "spack ci rebuild", + ] + assert ci_obj["after_script"] == ["rm -rf /some/path/spack"] - found_it = False + # Ensure we have the custom attributes + assert "some/custom/artifact" in ci_obj["artifacts"]["paths"] + assert ci_obj["custom_attribute"] == "custom!" - global_vars = yaml_contents["variables"] - assert global_vars["SPACK_VERSION"] == "0.15.3" - assert global_vars["SPACK_CHECKOUT_VERSION"] == "big ol commit sha" - for ci_key in yaml_contents.keys(): - ci_obj = yaml_contents[ci_key] - if "archive-files" in ci_key: - # Ensure we have variables, possibly interpolated - var_d = ci_obj["variables"] - assert var_d["ONE"] == "plain-string-value" - assert var_d["TWO"] == "${INTERP_ON_BUILD}" - - # Ensure we have scripts verbatim - assert ci_obj["before_script"] == [ - "mkdir /some/path", - "pushd /some/path", - "git clone ${SPACK_REPO}", - "cd spack", - "git checkout ${SPACK_REF}", - "popd", - ] - assert ci_obj["script"][1].startswith("cd ") - ci_obj["script"][1] = "cd ENV" - assert ci_obj["script"] == [ - "spack -d ci rebuild", - "cd ENV", - "spack env activate --without-view .", - "spack ci rebuild", - ] - assert ci_obj["after_script"] == ["rm -rf /some/path/spack"] - - # Ensure we have the custom attributes - assert "some/custom/artifact" in ci_obj["artifacts"]["paths"] - assert ci_obj["custom_attribute"] == "custom!" - - found_it = True - - assert found_it - - -def test_ci_generate_pkg_with_deps( - tmpdir, working_env, mutable_mock_env_path, install_mockery, mock_packages, ci_base_environment -): +def test_ci_generate_pkg_with_deps(ci_generate_test, tmp_path, ci_base_environment): """Test pipeline generation for a package w/ dependencies""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + spack_yaml, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - flatten-deps mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {tmp_path / 'ci-mirror'} ci: enable-artifacts-buildcache: True pipeline-gen: @@ -458,58 +404,40 @@ def test_ci_generate_pkg_with_deps( tags: - donotcare """ - ) + ) + yaml_contents = syaml.load(outputfile.read_text()) - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) + found = [] + for ci_key, ci_obj in yaml_contents.items(): + if "dependency-install" in ci_key: + assert "stage" in ci_obj + assert ci_obj["stage"] == "stage-0" + found.append("dependency-install") + if "flatten-deps" in ci_key: + assert "stage" in ci_obj + assert ci_obj["stage"] == "stage-1" + found.append("flatten-deps") - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as f: - contents = f.read() - yaml_contents = syaml.load(contents) - found = [] - for ci_key in yaml_contents.keys(): - ci_obj = yaml_contents[ci_key] - if "dependency-install" in ci_key: - assert "stage" in ci_obj - assert ci_obj["stage"] == "stage-0" - found.append("dependency-install") - if "flatten-deps" in ci_key: - assert "stage" in ci_obj - assert ci_obj["stage"] == "stage-1" - found.append("flatten-deps") - - assert "flatten-deps" in found - assert "dependency-install" in found - - -def test_ci_generate_for_pr_pipeline( - tmpdir, - working_env, - mutable_mock_env_path, - install_mockery, - mock_packages, - monkeypatch, - ci_base_environment, -): + assert "flatten-deps" in found + assert "dependency-install" in found + + +def test_ci_generate_for_pr_pipeline(ci_generate_test, tmp_path, monkeypatch): """Test that PR pipelines do not include a final stage job for rebuilding the mirror index, even if that job is specifically - configured""" - os.environ.update( - {"SPACK_PIPELINE_TYPE": "spack_pull_request", "SPACK_PR_BRANCH": "fake-test-branch"} - ) - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + configured. + """ + monkeypatch.setenv("SPACK_PIPELINE_TYPE", "spack_pull_request") + monkeypatch.setenv("SPACK_PR_BRANCH", "fake-test-branch") + monkeypatch.setattr(spack.ci, "SHARED_PR_MIRROR_URL", f"{tmp_path / 'shared-pr-mirror'}") + + spack_yaml, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - flatten-deps mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {tmp_path / 'ci-mirror'} ci: enable-artifacts-buildcache: True pipeline-gen: @@ -529,49 +457,25 @@ def test_ci_generate_for_pr_pipeline( tags: [donotcare] rebuild-index: False """ - ) - - monkeypatch.setattr(spack.ci, "SHARED_PR_MIRROR_URL", "https://fake.shared.pr.mirror") - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as f: - contents = f.read() - yaml_contents = syaml.load(contents) - - assert "rebuild-index" not in yaml_contents + ) + yaml_contents = syaml.load(outputfile.read_text()) - assert "variables" in yaml_contents - pipeline_vars = yaml_contents["variables"] - assert "SPACK_PIPELINE_TYPE" in pipeline_vars - assert pipeline_vars["SPACK_PIPELINE_TYPE"] == "spack_pull_request" + assert "rebuild-index" not in yaml_contents + assert "variables" in yaml_contents + assert "SPACK_PIPELINE_TYPE" in yaml_contents["variables"] + assert yaml_contents["variables"]["SPACK_PIPELINE_TYPE"] == "spack_pull_request" -def test_ci_generate_with_external_pkg( - tmpdir, - working_env, - mutable_mock_env_path, - install_mockery, - mock_packages, - monkeypatch, - ci_base_environment, -): +def test_ci_generate_with_external_pkg(ci_generate_test, tmp_path, monkeypatch): """Make sure we do not generate jobs for external pkgs""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + spack_yaml, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - archive-files - externaltest mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {tmp_path / "ci-mirror"} ci: pipeline-gen: - submapping: @@ -583,86 +487,84 @@ def test_ci_generate_with_external_pkg( - donotcare image: donotcare """ - ) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as f: - yaml_contents = syaml.load(f) - - # Check that the "externaltool" package was not erroneously staged - assert not any("externaltool" in key for key in yaml_contents) - - -def test_ci_rebuild_missing_config(tmpdir, working_env, mutable_mock_env_path): - spack_yaml_contents = """ -spack: - specs: - - archive-files -""" - - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - env_cmd("activate", "--without-view", "--sh", "test") - out = ci_cmd("rebuild", fail_on_error=False) - assert "env containing ci" in out + ) + yaml_contents = syaml.load(outputfile.read_text()) + # Check that the "externaltool" package was not erroneously staged + assert all("externaltool" not in key for key in yaml_contents) + + +def test_ci_rebuild_missing_config(tmp_path, working_env, mutable_mock_env_path): + spack_yaml = tmp_path / "spack.yaml" + spack_yaml.write_text( + """ + spack: + specs: + - archive-files + """ + ) - env_cmd("deactivate") + env_cmd("create", "test", str(spack_yaml)) + env_cmd("activate", "--without-view", "--sh", "test") + out = ci_cmd("rebuild", fail_on_error=False) + assert "env containing ci" in out + env_cmd("deactivate") def _signing_key(): - signing_key_dir = spack_paths.mock_gpg_keys_path - signing_key_path = os.path.join(signing_key_dir, "package-signing-key") - with open(signing_key_path) as fd: - key = fd.read() - return key - - -def create_rebuild_env(tmpdir, pkg_name, broken_tests=False): - working_dir = tmpdir.join("working_dir") - - log_dir = os.path.join(working_dir.strpath, "logs") - repro_dir = os.path.join(working_dir.strpath, "repro") - test_dir = os.path.join(working_dir.strpath, "test") - env_dir = working_dir.join("concrete_env") - - mirror_dir = working_dir.join("mirror") - mirror_url = url_util.path_to_file_url(mirror_dir.strpath) - - broken_specs_path = os.path.join(working_dir.strpath, "naughty-list") - broken_specs_url = url_util.path_to_file_url(broken_specs_path) - temp_storage_url = "file:///path/to/per/pipeline/storage" - - broken_tests_packages = [pkg_name] if broken_tests else [] + signing_key_path = pathlib.Path(spack_paths.mock_gpg_keys_path) / "package-signing-key" + return signing_key_path.read_text() + + +class RebuildEnv(NamedTuple): + broken_spec_file: pathlib.Path + ci_job_url: str + ci_pipeline_url: str + env_dir: pathlib.Path + log_dir: pathlib.Path + mirror_dir: pathlib.Path + mirror_url: str + repro_dir: pathlib.Path + root_spec_dag_hash: str + test_dir: pathlib.Path + working_dir: pathlib.Path + + +def create_rebuild_env( + tmp_path: pathlib.Path, pkg_name: str, broken_tests: bool = False +) -> RebuildEnv: + scratch = tmp_path / "working_dir" + log_dir = scratch / "logs" + repro_dir = scratch / "repro" + test_dir = scratch / "test" + env_dir = scratch / "concrete_env" + mirror_dir = scratch / "mirror" + broken_specs_path = scratch / "naughty-list" + + mirror_url = mirror_dir.as_uri() + temp_storage_url = (tmp_path / "temp-storage").as_uri() ci_job_url = "https://some.domain/group/project/-/jobs/42" ci_pipeline_url = "https://some.domain/group/project/-/pipelines/7" - spack_yaml_contents = """ + env_dir.mkdir(parents=True) + with open(env_dir / "spack.yaml", "w") as f: + f.write( + f""" spack: definitions: - - packages: [{0}] + - packages: [{pkg_name}] specs: - $packages mirrors: - test-mirror: {1} + test-mirror: {mirror_dir} ci: - broken-specs-url: {2} - broken-tests-packages: {3} - temporary-storage-url-prefix: {4} + broken-specs-url: {broken_specs_path.as_uri()} + broken-tests-packages: {json.dumps([pkg_name] if broken_tests else [])} + temporary-storage-url-prefix: {temp_storage_url} pipeline-gen: - submapping: - match: - - {0} + - {pkg_name} build-job: tags: - donotcare @@ -672,37 +574,19 @@ def create_rebuild_env(tmpdir, pkg_name, broken_tests=False): url: https://my.fake.cdash project: Not used site: Nothing -""".format( - pkg_name, mirror_url, broken_specs_url, broken_tests_packages, temp_storage_url - ) - - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - with ev.read("test") as env: - with env.write_transaction(): - env.concretize() - env.write() - - if not os.path.exists(env_dir.strpath): - os.makedirs(env_dir.strpath) - - shutil.copyfile(env.manifest_path, os.path.join(env_dir.strpath, "spack.yaml")) - shutil.copyfile(env.lock_path, os.path.join(env_dir.strpath, "spack.lock")) +""" + ) - root_spec_dag_hash = None + with ev.Environment(env_dir) as env: + env.concretize() + env.write() - for h, s in env.specs_by_hash.items(): - if s.name == pkg_name: - root_spec_dag_hash = h + shutil.copy(env_dir / "spack.yaml", tmp_path / "spack.yaml") - assert root_spec_dag_hash + root_spec_dag_hash = env.concrete_roots()[0].dag_hash() - return Bunch( - broken_spec_file=os.path.join(broken_specs_path, root_spec_dag_hash), + return RebuildEnv( + broken_spec_file=broken_specs_path / root_spec_dag_hash, ci_job_url=ci_job_url, ci_pipeline_url=ci_pipeline_url, env_dir=env_dir, @@ -712,22 +596,22 @@ def create_rebuild_env(tmpdir, pkg_name, broken_tests=False): repro_dir=repro_dir, root_spec_dag_hash=root_spec_dag_hash, test_dir=test_dir, - working_dir=working_dir, + working_dir=scratch, ) -def activate_rebuild_env(tmpdir, pkg_name, rebuild_env): +def activate_rebuild_env(tmp_path: pathlib.Path, pkg_name: str, rebuild_env: RebuildEnv): env_cmd("activate", "--without-view", "--sh", "-d", ".") # Create environment variables as gitlab would do it os.environ.update( { - "SPACK_ARTIFACTS_ROOT": rebuild_env.working_dir.strpath, - "SPACK_JOB_LOG_DIR": rebuild_env.log_dir, - "SPACK_JOB_REPRO_DIR": rebuild_env.repro_dir, - "SPACK_JOB_TEST_DIR": rebuild_env.test_dir, - "SPACK_LOCAL_MIRROR_DIR": rebuild_env.mirror_dir.strpath, - "SPACK_CONCRETE_ENV_DIR": rebuild_env.env_dir.strpath, + "SPACK_ARTIFACTS_ROOT": str(rebuild_env.working_dir), + "SPACK_JOB_LOG_DIR": str(rebuild_env.log_dir), + "SPACK_JOB_REPRO_DIR": str(rebuild_env.repro_dir), + "SPACK_JOB_TEST_DIR": str(rebuild_env.test_dir), + "SPACK_LOCAL_MIRROR_DIR": str(rebuild_env.mirror_dir), + "SPACK_CONCRETE_ENV_DIR": str(rebuild_env.env_dir), "CI_PIPELINE_ID": "7192", "SPACK_SIGNING_KEY": _signing_key(), "SPACK_JOB_SPEC_DAG_HASH": rebuild_env.root_spec_dag_hash, @@ -738,31 +622,30 @@ def activate_rebuild_env(tmpdir, pkg_name, rebuild_env): "SPACK_PIPELINE_TYPE": "spack_protected_branch", "CI_JOB_URL": rebuild_env.ci_job_url, "CI_PIPELINE_URL": rebuild_env.ci_pipeline_url, - "CI_PROJECT_DIR": tmpdir.join("ci-project").strpath, + "CI_PROJECT_DIR": str(tmp_path / "ci-project"), } ) @pytest.mark.parametrize("broken_tests", [True, False]) def test_ci_rebuild_mock_success( - tmpdir, + tmp_path: pathlib.Path, working_env, mutable_mock_env_path, install_mockery, mock_gnupghome, - mock_stage, mock_fetch, mock_binary_index, monkeypatch, broken_tests, ): pkg_name = "archive-files" - rebuild_env = create_rebuild_env(tmpdir, pkg_name, broken_tests) + rebuild_env = create_rebuild_env(tmp_path, pkg_name, broken_tests) monkeypatch.setattr(spack.cmd.ci, "SPACK_COMMAND", "echo") - with rebuild_env.env_dir.as_cwd(): - activate_rebuild_env(tmpdir, pkg_name, rebuild_env) + with working_dir(rebuild_env.env_dir): + activate_rebuild_env(tmp_path, pkg_name, rebuild_env) out = ci_cmd("rebuild", "--tests", fail_on_error=False) @@ -779,19 +662,18 @@ def test_ci_rebuild_mock_success( def test_ci_rebuild_mock_failure_to_push( - tmpdir, + tmp_path: pathlib.Path, working_env, mutable_mock_env_path, install_mockery, mock_gnupghome, - mock_stage, mock_fetch, mock_binary_index, ci_base_environment, monkeypatch, ): pkg_name = "trivial-install-test-package" - rebuild_env = create_rebuild_env(tmpdir, pkg_name) + rebuild_env = create_rebuild_env(tmp_path, pkg_name) # Mock the install script succuess def mock_success(*args, **kwargs): @@ -807,103 +689,30 @@ def mock_push_or_raise(*args, **kwargs): monkeypatch.setattr(spack.binary_distribution, "push_or_raise", mock_push_or_raise) - with rebuild_env.env_dir.as_cwd(): - activate_rebuild_env(tmpdir, pkg_name, rebuild_env) + with working_dir(rebuild_env.env_dir): + activate_rebuild_env(tmp_path, pkg_name, rebuild_env) expect = f"Command exited with code {FAILED_CREATE_BUILDCACHE_CODE}" with pytest.raises(spack.main.SpackCommandError, match=expect): ci_cmd("rebuild", fail_on_error=True) -@pytest.mark.skip(reason="fails intermittently and covered by gitlab ci") -def test_ci_rebuild( - tmpdir, +def test_ci_require_signing( + tmp_path: pathlib.Path, working_env, mutable_mock_env_path, - install_mockery, - mock_packages, - monkeypatch, mock_gnupghome, - mock_fetch, ci_base_environment, - mock_binary_index, -): - pkg_name = "archive-files" - rebuild_env = create_rebuild_env(tmpdir, pkg_name) - - # Create job directories to be removed before processing (for coverage) - os.makedirs(rebuild_env.log_dir) - os.makedirs(rebuild_env.repro_dir) - os.makedirs(rebuild_env.test_dir) - - with rebuild_env.env_dir.as_cwd(): - activate_rebuild_env(tmpdir, pkg_name, rebuild_env) - - ci_cmd("rebuild", "--tests", fail_on_error=False) - - monkeypatch.setattr(spack.cmd.ci, "SPACK_COMMAND", "notcommand") - monkeypatch.setattr(spack.cmd.ci, "INSTALL_FAIL_CODE", 127) - - with rebuild_env.env_dir.as_cwd(): - activate_rebuild_env(tmpdir, pkg_name, rebuild_env) - - expected_repro_files = [ - "install.sh", - "root.json", - "archive-files.json", - "spack.yaml", - "spack.lock", - ] - repro_files = os.listdir(rebuild_env.repro_dir) - assert all([f in repro_files for f in expected_repro_files]) - - install_script_path = os.path.join(rebuild_env.repro_dir, "install.sh") - install_line = None - with open(install_script_path) as fd: - for line in fd: - if line.startswith('"notcommand"'): - install_line = line - - assert install_line - - def mystrip(s): - return s.strip('"').rstrip("\n").rstrip('"') - - install_parts = [mystrip(s) for s in install_line.split(" ")] - - assert "--keep-stage" in install_parts - assert "--no-check-signature" not in install_parts - assert "-f" in install_parts - flag_index = install_parts.index("-f") - assert "archive-files.json" in install_parts[flag_index + 1] - - with open(rebuild_env.broken_spec_file) as fd: - broken_spec_content = fd.read() - assert rebuild_env.ci_job_url in broken_spec_content - assert rebuild_env.ci_pipeline_url in broken_spec_content - - # Ensure also produce CDash output for skipped (or notrun) tests - test_files = os.listdir(rebuild_env.test_dir) - with open(os.path.join(rebuild_env.test_dir, test_files[0]), "r") as f: - have = False - for line in f: - if "notrun" in line: - have = True - break - assert have - - env_cmd("deactivate") - - -def test_ci_require_signing( - tmpdir, working_env, mutable_mock_env_path, mock_gnupghome, ci_base_environment + monkeypatch, ): - spack_yaml_contents = """ + spack_yaml = tmp_path / "spack.yaml" + spack_yaml.write_text( + f""" spack: specs: - archive-files mirrors: - test-mirror: file:///no-such-mirror + test-mirror: {tmp_path / "ci-mirror"} ci: pipeline-gen: - submapping: @@ -914,50 +723,46 @@ def test_ci_require_signing( - donotcare image: donotcare """ - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) - - with tmpdir.as_cwd(): - env_cmd("activate", "--without-view", "--sh", "-d", ".") - - # Run without the variable to make sure we don't accidentally require signing - output = ci_cmd("rebuild", output=str, fail_on_error=False) - assert "spack must have exactly one signing key" not in output + ) + env_cmd("activate", "--without-view", "--sh", "-d", str(spack_yaml.parent)) - # Now run with the variable to make sure it works - os.environ.update({"SPACK_REQUIRE_SIGNING": "True"}) - output = ci_cmd("rebuild", output=str, fail_on_error=False) + # Run without the variable to make sure we don't accidentally require signing + output = ci_cmd("rebuild", output=str, fail_on_error=False) + assert "spack must have exactly one signing key" not in output - assert "spack must have exactly one signing key" in output + # Now run with the variable to make sure it works + monkeypatch.setenv("SPACK_REQUIRE_SIGNING", "True") + output = ci_cmd("rebuild", output=str, fail_on_error=False) + assert "spack must have exactly one signing key" in output + env_cmd("deactivate") def test_ci_nothing_to_rebuild( - tmpdir, + tmp_path: pathlib.Path, working_env, mutable_mock_env_path, install_mockery, - mock_packages, monkeypatch, mock_fetch, ci_base_environment, mock_binary_index, ): - working_dir = tmpdir.join("working_dir") - - mirror_dir = working_dir.join("mirror") - mirror_url = "file://{0}".format(mirror_dir.strpath) + scratch = tmp_path / "working_dir" + mirror_dir = scratch / "mirror" + mirror_url = mirror_dir.as_uri() - spack_yaml_contents = """ + with open(tmp_path / "spack.yaml", "w") as f: + f.write( + f""" spack: definitions: - packages: [archive-files] specs: - $packages mirrors: - test-mirror: {0} + test-mirror: {mirror_url} ci: - enable-artifacts-buildcache: True + enable-artifacts-buildcache: true pipeline-gen: - submapping: - match: @@ -966,37 +771,27 @@ def test_ci_nothing_to_rebuild( tags: - donotcare image: donotcare -""".format( - mirror_url - ) +""" + ) install_cmd("archive-files") buildcache_cmd("push", "-f", "-u", mirror_url, "archive-files") - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) - - with tmpdir.as_cwd(): + with working_dir(tmp_path): env_cmd("create", "test", "./spack.yaml") with ev.read("test") as env: env.concretize() - root_spec_dag_hash = None - - for h, s in env.specs_by_hash.items(): - if s.name == "archive-files": - root_spec_dag_hash = h # Create environment variables as gitlab would do it os.environ.update( { - "SPACK_ARTIFACTS_ROOT": working_dir.strpath, + "SPACK_ARTIFACTS_ROOT": str(scratch), "SPACK_JOB_LOG_DIR": "log_dir", "SPACK_JOB_REPRO_DIR": "repro_dir", "SPACK_JOB_TEST_DIR": "test_dir", - "SPACK_LOCAL_MIRROR_DIR": mirror_dir.strpath, - "SPACK_CONCRETE_ENV_DIR": tmpdir.strpath, - "SPACK_JOB_SPEC_DAG_HASH": root_spec_dag_hash, + "SPACK_LOCAL_MIRROR_DIR": str(mirror_dir), + "SPACK_CONCRETE_ENV_DIR": str(tmp_path), + "SPACK_JOB_SPEC_DAG_HASH": env.concrete_roots()[0].dag_hash(), "SPACK_JOB_SPEC_PKG_NAME": "archive-files", "SPACK_COMPILER_ACTION": "NONE", "SPACK_REMOTE_MIRROR_URL": mirror_url, @@ -1017,12 +812,10 @@ def fake_dl_method(spec, *args, **kwargs): def test_ci_generate_mirror_override( - tmpdir, + tmp_path: pathlib.Path, mutable_mock_env_path, install_mockery, - mock_packages, mock_fetch, - mock_stage, mock_binary_index, ci_base_environment, ): @@ -1030,20 +823,18 @@ def test_ci_generate_mirror_override( skip building specs that are not in the override mirror when they are found in the main mirror.""" os.environ.update({"SPACK_PIPELINE_TYPE": "spack_protected_branch"}) + mirror_url = (tmp_path / "mirror").as_uri() - working_dir = tmpdir.join("working_dir") - - mirror_dir = working_dir.join("mirror") - mirror_url = "file://{0}".format(mirror_dir.strpath) - - spack_yaml_contents = """ + with open(tmp_path / "spack.yaml", "w") as f: + f.write( + f""" spack: definitions: - packages: [patchelf] specs: - $packages mirrors: - test-mirror: {0} + test-mirror: {mirror_url} ci: pipeline-gen: - submapping: @@ -1057,18 +848,13 @@ def test_ci_generate_mirror_override( tags: - nonbuildtag image: basicimage -""".format( - mirror_url - ) - - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) +""" + ) - with tmpdir.as_cwd(): + with working_dir(tmp_path): env_cmd("create", "test", "./spack.yaml") - first_ci_yaml = str(tmpdir.join(".gitlab-ci-1.yml")) - second_ci_yaml = str(tmpdir.join(".gitlab-ci-2.yml")) + first_ci_yaml = str(tmp_path / ".gitlab-ci-1.yml") + second_ci_yaml = str(tmp_path / ".gitlab-ci-2.yml") with ev.read("test"): install_cmd() buildcache_cmd("push", "-u", mirror_url, "patchelf") @@ -1088,7 +874,7 @@ def test_ci_generate_mirror_override( "--output-file", second_ci_yaml, "--buildcache-destination", - "file:///mirror/not/exist", + (tmp_path / "does-not-exist").as_uri(), ) with open(first_ci_yaml) as fd1: @@ -1102,24 +888,21 @@ def test_ci_generate_mirror_override( @pytest.mark.disable_clean_stage_check def test_push_to_build_cache( - tmpdir, + tmp_path: pathlib.Path, mutable_mock_env_path, install_mockery, - mock_packages, mock_fetch, - mock_stage, mock_gnupghome, ci_base_environment, mock_binary_index, ): - working_dir = tmpdir.join("working_dir") - - mirror_dir = working_dir.join("mirror") - mirror_url = url_util.path_to_file_url(mirror_dir.strpath) + scratch = tmp_path / "working_dir" + mirror_dir = scratch / "mirror" + mirror_url = mirror_dir.as_uri() ci.import_signing_key(_signing_key()) - with tmpdir.as_cwd(): + with working_dir(tmp_path): with open("spack.yaml", "w") as f: f.write( f"""\ @@ -1155,7 +938,7 @@ def test_push_to_build_cache( with ev.read("test"): concrete_spec = Spec("patchelf").concretized() spec_json = concrete_spec.to_json(hash=ht.dag_hash) - json_path = str(tmpdir.join("spec.json")) + json_path = str(tmp_path / "spec.json") with open(json_path, "w") as ypfd: ypfd.write(spec_json) @@ -1164,12 +947,10 @@ def test_push_to_build_cache( for s in concrete_spec.traverse(): ci.push_to_build_cache(s, mirror_url, True) - buildcache_path = os.path.join(mirror_dir.strpath, "build_cache") - # Now test the --prune-dag (default) option of spack ci generate mirror_cmd("add", "test-ci", mirror_url) - outputfile_pruned = str(tmpdir.join("pruned_pipeline.yml")) + outputfile_pruned = str(tmp_path / "pruned_pipeline.yml") ci_cmd("generate", "--output-file", outputfile_pruned) with open(outputfile_pruned) as f: @@ -1188,7 +969,7 @@ def test_push_to_build_cache( assert "rules" in yaml_contents["workflow"] assert yaml_contents["workflow"]["rules"] == [{"when": "always"}] - outputfile_not_pruned = str(tmpdir.join("unpruned_pipeline.yml")) + outputfile_not_pruned = str(tmp_path / "unpruned_pipeline.yml") ci_cmd("generate", "--no-prune-dag", "--output-file", outputfile_not_pruned) # Test the --no-prune-dag option of spack ci generate @@ -1214,45 +995,27 @@ def test_push_to_build_cache( # Test generating buildcache index while we have bin mirror buildcache_cmd("update-index", mirror_url) - index_path = os.path.join(buildcache_path, "index.json") - with open(index_path) as idx_fd: + with open(mirror_dir / "build_cache" / "index.json") as idx_fd: index_object = json.load(idx_fd) jsonschema.validate(index_object, db_idx_schema) # Now that index is regenerated, validate "buildcache list" output - buildcache_list_output = buildcache_cmd("list", output=str) - assert "patchelf" in buildcache_list_output + assert "patchelf" in buildcache_cmd("list", output=str) # Also test buildcache_spec schema - bc_files_list = os.listdir(buildcache_path) - for file_name in bc_files_list: + for file_name in os.listdir(mirror_dir / "build_cache"): if file_name.endswith(".spec.json.sig"): - spec_json_path = os.path.join(buildcache_path, file_name) - with open(spec_json_path) as json_fd: - json_object = Spec.extract_json_from_clearsig(json_fd.read()) - jsonschema.validate(json_object, specfile_schema) - - logs_dir = working_dir.join("logs_dir") - if not os.path.exists(logs_dir.strpath): - os.makedirs(logs_dir.strpath) - - ci.copy_stage_logs_to_artifacts(concrete_spec, logs_dir.strpath) - - logs_dir_list = os.listdir(logs_dir.strpath) - - assert "spack-build-out.txt" in logs_dir_list + with open(mirror_dir / "build_cache" / file_name) as f: + spec_dict = Spec.extract_json_from_clearsig(f.read()) + jsonschema.validate(spec_dict, specfile_schema) - # Also just make sure that if something goes wrong with the - # stage logs copy, no exception is thrown - ci.copy_stage_logs_to_artifacts(concrete_spec, None) - ci.copy_stage_logs_to_artifacts(None, logs_dir.strpath) + logs_dir = scratch / "logs_dir" + logs_dir.mkdir() + ci.copy_stage_logs_to_artifacts(concrete_spec, str(logs_dir)) + assert "spack-build-out.txt" in os.listdir(logs_dir) - dl_dir = working_dir.join("download_dir") - if not os.path.exists(dl_dir.strpath): - os.makedirs(dl_dir.strpath) - buildcache_cmd("download", "--spec-file", json_path, "--path", dl_dir.strpath) - dl_dir_list = os.listdir(dl_dir.strpath) - - assert len(dl_dir_list) == 2 + dl_dir = scratch / "download_dir" + buildcache_cmd("download", "--spec-file", json_path, "--path", str(dl_dir)) + assert len(os.listdir(dl_dir)) == 2 def test_push_to_build_cache_exceptions(monkeypatch, tmp_path, capsys): @@ -1270,32 +1033,26 @@ def push_or_raise(*args, **kwargs): @pytest.mark.parametrize("match_behavior", ["first", "merge"]) @pytest.mark.parametrize("git_version", ["big ol commit sha", None]) def test_ci_generate_override_runner_attrs( - tmpdir, - mutable_mock_env_path, - install_mockery, - mock_packages, - monkeypatch, - ci_base_environment, - match_behavior, - git_version, + ci_generate_test, tmp_path, monkeypatch, match_behavior, git_version ): """Test that we get the behavior we want with respect to the provision of runner attributes like tags, variables, and scripts, both when we inherit them from the top level, as well as when we override one or more at the runner level""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + monkeypatch.setattr(spack, "spack_version", "0.20.0.test0") + monkeypatch.setattr(spack.main, "get_version", lambda: "0.20.0.test0 (blah)") + monkeypatch.setattr(spack.main, "get_spack_commit", lambda: git_version) + spack_yaml, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - flatten-deps - pkg-a mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {tmp_path / "ci-mirror"} ci: pipeline-gen: - - match_behavior: {0} + - match_behavior: {match_behavior} submapping: - match: - flatten-deps @@ -1345,109 +1102,89 @@ def test_ci_generate_override_runner_attrs( - cleanup-job: image: donotcare tags: [donotcare] -""".format( - match_behavior - ) - ) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - with ev.read("test"): - monkeypatch.setattr(spack, "spack_version", "0.20.0.test0") - monkeypatch.setattr(spack.main, "get_version", lambda: "0.20.0.test0 (blah)") - monkeypatch.setattr(spack.main, "get_spack_commit", lambda: git_version) - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as f: - contents = f.read() - yaml_contents = syaml.load(contents) +""" + ) - assert "variables" in yaml_contents - global_vars = yaml_contents["variables"] - assert "SPACK_VERSION" in global_vars - assert global_vars["SPACK_VERSION"] == "0.20.0.test0 (blah)" - assert "SPACK_CHECKOUT_VERSION" in global_vars - assert global_vars["SPACK_CHECKOUT_VERSION"] == git_version or "v0.20.0.test0" - - for ci_key in yaml_contents.keys(): - if ci_key.startswith("pkg-a"): - # Make sure pkg-a's attributes override variables, and all the - # scripts. Also, make sure the 'toplevel' tag doesn't - # appear twice, but that a's specific extra tag does appear - the_elt = yaml_contents[ci_key] - assert the_elt["variables"]["ONE"] == "specificvarone" - assert the_elt["variables"]["TWO"] == "specificvartwo" - assert "THREE" not in the_elt["variables"] - assert len(the_elt["tags"]) == (2 if match_behavior == "first" else 3) - assert "specific-a" in the_elt["tags"] - if match_behavior == "merge": - assert "specific-a-2" in the_elt["tags"] - assert "toplevel" in the_elt["tags"] - assert "toplevel2" not in the_elt["tags"] - assert len(the_elt["before_script"]) == 1 - assert the_elt["before_script"][0] == "custom pre step one" - assert len(the_elt["script"]) == 1 - assert the_elt["script"][0] == "custom main step" - assert len(the_elt["after_script"]) == 1 - assert the_elt["after_script"][0] == "custom post step one" - if "dependency-install" in ci_key: - # Since the dependency-install match omits any - # runner-attributes, make sure it inherited all the - # top-level attributes. - the_elt = yaml_contents[ci_key] - assert the_elt["variables"]["ONE"] == "toplevelvarone" - assert the_elt["variables"]["TWO"] == "toplevelvartwo" - assert "THREE" not in the_elt["variables"] - assert len(the_elt["tags"]) == 2 - assert "toplevel" in the_elt["tags"] - assert "toplevel2" in the_elt["tags"] - assert len(the_elt["before_script"]) == 2 - assert the_elt["before_script"][0] == "pre step one" - assert the_elt["before_script"][1] == "pre step two" - assert len(the_elt["script"]) == 1 - assert the_elt["script"][0] == "main step" - assert len(the_elt["after_script"]) == 1 - assert the_elt["after_script"][0] == "post step one" - if "flatten-deps" in ci_key: - # The flatten-deps match specifies that we keep the two - # top level variables, but add a third specifc one. It - # also adds a custom tag which should be combined with - # the top-level tag. - the_elt = yaml_contents[ci_key] - assert the_elt["variables"]["ONE"] == "toplevelvarone" - assert the_elt["variables"]["TWO"] == "toplevelvartwo" - assert the_elt["variables"]["THREE"] == "specificvarthree" - assert len(the_elt["tags"]) == 3 - assert "specific-one" in the_elt["tags"] - assert "toplevel" in the_elt["tags"] - assert "toplevel2" in the_elt["tags"] - assert len(the_elt["before_script"]) == 2 - assert the_elt["before_script"][0] == "pre step one" - assert the_elt["before_script"][1] == "pre step two" - assert len(the_elt["script"]) == 1 - assert the_elt["script"][0] == "main step" - assert len(the_elt["after_script"]) == 1 - assert the_elt["after_script"][0] == "post step one" + yaml_contents = syaml.load(outputfile.read_text()) + + assert "variables" in yaml_contents + global_vars = yaml_contents["variables"] + assert "SPACK_VERSION" in global_vars + assert global_vars["SPACK_VERSION"] == "0.20.0.test0 (blah)" + assert "SPACK_CHECKOUT_VERSION" in global_vars + assert global_vars["SPACK_CHECKOUT_VERSION"] == git_version or "v0.20.0.test0" + + for ci_key in yaml_contents.keys(): + if ci_key.startswith("pkg-a"): + # Make sure pkg-a's attributes override variables, and all the + # scripts. Also, make sure the 'toplevel' tag doesn't + # appear twice, but that a's specific extra tag does appear + the_elt = yaml_contents[ci_key] + assert the_elt["variables"]["ONE"] == "specificvarone" + assert the_elt["variables"]["TWO"] == "specificvartwo" + assert "THREE" not in the_elt["variables"] + assert len(the_elt["tags"]) == (2 if match_behavior == "first" else 3) + assert "specific-a" in the_elt["tags"] + if match_behavior == "merge": + assert "specific-a-2" in the_elt["tags"] + assert "toplevel" in the_elt["tags"] + assert "toplevel2" not in the_elt["tags"] + assert len(the_elt["before_script"]) == 1 + assert the_elt["before_script"][0] == "custom pre step one" + assert len(the_elt["script"]) == 1 + assert the_elt["script"][0] == "custom main step" + assert len(the_elt["after_script"]) == 1 + assert the_elt["after_script"][0] == "custom post step one" + if "dependency-install" in ci_key: + # Since the dependency-install match omits any + # runner-attributes, make sure it inherited all the + # top-level attributes. + the_elt = yaml_contents[ci_key] + assert the_elt["variables"]["ONE"] == "toplevelvarone" + assert the_elt["variables"]["TWO"] == "toplevelvartwo" + assert "THREE" not in the_elt["variables"] + assert len(the_elt["tags"]) == 2 + assert "toplevel" in the_elt["tags"] + assert "toplevel2" in the_elt["tags"] + assert len(the_elt["before_script"]) == 2 + assert the_elt["before_script"][0] == "pre step one" + assert the_elt["before_script"][1] == "pre step two" + assert len(the_elt["script"]) == 1 + assert the_elt["script"][0] == "main step" + assert len(the_elt["after_script"]) == 1 + assert the_elt["after_script"][0] == "post step one" + if "flatten-deps" in ci_key: + # The flatten-deps match specifies that we keep the two + # top level variables, but add a third specifc one. It + # also adds a custom tag which should be combined with + # the top-level tag. + the_elt = yaml_contents[ci_key] + assert the_elt["variables"]["ONE"] == "toplevelvarone" + assert the_elt["variables"]["TWO"] == "toplevelvartwo" + assert the_elt["variables"]["THREE"] == "specificvarthree" + assert len(the_elt["tags"]) == 3 + assert "specific-one" in the_elt["tags"] + assert "toplevel" in the_elt["tags"] + assert "toplevel2" in the_elt["tags"] + assert len(the_elt["before_script"]) == 2 + assert the_elt["before_script"][0] == "pre step one" + assert the_elt["before_script"][1] == "pre step two" + assert len(the_elt["script"]) == 1 + assert the_elt["script"][0] == "main step" + assert len(the_elt["after_script"]) == 1 + assert the_elt["after_script"][0] == "post step one" -@pytest.mark.disable_clean_stage_check def test_ci_rebuild_index( - tmpdir, - working_env, - mutable_mock_env_path, - install_mockery, - mock_packages, - mock_fetch, - mock_stage, + tmp_path: pathlib.Path, working_env, mutable_mock_env_path, install_mockery, mock_fetch ): - working_dir = tmpdir.join("working_dir") - - mirror_dir = working_dir.join("mirror") - mirror_url = url_util.path_to_file_url(str(mirror_dir)) + scratch = tmp_path / "working_dir" + mirror_dir = scratch / "mirror" + mirror_url = mirror_dir.as_uri() - spack_yaml_contents = f""" + with open(tmp_path / "spack.yaml", "w") as f: + f.write( + f""" spack: specs: - callpath @@ -1463,29 +1200,21 @@ def test_ci_rebuild_index( - donotcare image: donotcare """ + ) - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) - - with tmpdir.as_cwd(): + with working_dir(tmp_path): env_cmd("create", "test", "./spack.yaml") with ev.read("test"): concrete_spec = Spec("callpath").concretized() - spec_json = concrete_spec.to_json(hash=ht.dag_hash) - json_path = str(tmpdir.join("spec.json")) - with open(json_path, "w") as ypfd: - ypfd.write(spec_json) + with open(tmp_path / "spec.json", "w") as f: + f.write(concrete_spec.to_json(hash=ht.dag_hash)) - install_cmd("--add", "--keep-stage", "-f", json_path) + install_cmd("--add", "-f", str(tmp_path / "spec.json")) buildcache_cmd("push", "-u", "-f", mirror_url, "callpath") ci_cmd("rebuild-index") - buildcache_path = os.path.join(mirror_dir.strpath, "build_cache") - index_path = os.path.join(buildcache_path, "index.json") - with open(index_path) as idx_fd: - index_object = json.load(idx_fd) - jsonschema.validate(index_object, db_idx_schema) + with open(mirror_dir / "build_cache" / "index.json") as f: + jsonschema.validate(json.load(f), db_idx_schema) def test_ci_get_stack_changed(mock_git_repo, monkeypatch): @@ -1495,148 +1224,68 @@ def test_ci_get_stack_changed(mock_git_repo, monkeypatch): assert ci.get_stack_changed("/no/such/env/path") is True -def test_ci_generate_prune_untouched( - tmpdir, mutable_mock_env_path, install_mockery, mock_packages, ci_base_environment, monkeypatch -): +def test_ci_generate_prune_untouched(ci_generate_test, tmp_path, monkeypatch): """Test pipeline generation with pruning works to eliminate specs that were not affected by a change""" - os.environ.update({"SPACK_PRUNE_UNTOUCHED": "TRUE"}) # enables pruning of untouched specs - mirror_url = "https://my.fake.mirror" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + monkeypatch.setenv("SPACK_PRUNE_UNTOUCHED", "TRUE") # enables pruning of untouched specs + + def fake_compute_affected(r1=None, r2=None): + return ["libdwarf"] + + def fake_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"): + return False + + monkeypatch.setattr(ci, "compute_affected_packages", fake_compute_affected) + monkeypatch.setattr(ci, "get_stack_changed", fake_stack_changed) + + spack_yaml, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - archive-files - callpath mirrors: - some-mirror: {0} + some-mirror: {tmp_path / 'ci-mirror'} ci: pipeline-gen: - build-job: tags: - donotcare image: donotcare -""".format( - mirror_url - ) - ) +""" + ) # Dependency graph rooted at callpath # callpath -> dyninst -> libelf # -> libdwarf -> libelf # -> mpich + env_hashes = {} + with ev.read("test") as active_env: + active_env.concretize() + for s in active_env.all_specs(): + env_hashes[s.name] = s.dag_hash() - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - def fake_compute_affected(r1=None, r2=None): - return ["libdwarf"] - - def fake_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"): - return False - - env_hashes = {} - - with ev.read("test") as active_env: - monkeypatch.setattr(ci, "compute_affected_packages", fake_compute_affected) - monkeypatch.setattr(ci, "get_stack_changed", fake_stack_changed) + yaml_contents = syaml.load(outputfile.read_text()) - active_env.concretize() + generated_hashes = [] + for ci_key in yaml_contents.keys(): + if "variables" in yaml_contents[ci_key]: + generated_hashes.append(yaml_contents[ci_key]["variables"]["SPACK_JOB_SPEC_DAG_HASH"]) - for s in active_env.all_specs(): - env_hashes[s.name] = s.dag_hash() - - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as f: - contents = f.read() - print(contents) - yaml_contents = syaml.load(contents) - - generated_hashes = [] - - for ci_key in yaml_contents.keys(): - if "variables" in yaml_contents[ci_key]: - generated_hashes.append( - yaml_contents[ci_key]["variables"]["SPACK_JOB_SPEC_DAG_HASH"] - ) - - assert env_hashes["archive-files"] not in generated_hashes - for spec_name in ["callpath", "dyninst", "mpich", "libdwarf", "libelf"]: - assert env_hashes[spec_name] in generated_hashes - - -def test_ci_generate_prune_env_vars( - tmpdir, mutable_mock_env_path, install_mockery, mock_packages, ci_base_environment, monkeypatch -): - """Make sure environment variables controlling untouched spec - pruning behave as expected.""" - os.environ.update({"SPACK_PRUNE_UNTOUCHED": "TRUE"}) # enables pruning of untouched specs - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ -spack: - specs: - - libelf - gitlab-ci: - mappings: - - match: - - arch=test-debian6-core2 - runner-attributes: - tags: - - donotcare - image: donotcare -""" - ) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - - def fake_compute_affected(r1=None, r2=None): - return ["libdwarf"] - - def fake_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"): - return False - - expected_depth_param = None - - def check_get_spec_filter_list(env, affected_pkgs, dependent_traverse_depth=None): - assert dependent_traverse_depth == expected_depth_param - return set() - - monkeypatch.setattr(ci, "compute_affected_packages", fake_compute_affected) - monkeypatch.setattr(ci, "get_stack_changed", fake_stack_changed) - monkeypatch.setattr(ci, "get_spec_filter_list", check_get_spec_filter_list) - - expectations = {"-1": -1, "0": 0, "True": None} - - for key, val in expectations.items(): - with ev.read("test"): - os.environ.update({"SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH": key}) - expected_depth_param = val - # Leaving out the mirror in the spack.yaml above means the - # pipeline generation command will fail, pretty much immediately. - # But for this test, we only care how the environment variables - # for pruning are handled, the faster the better. So allow the - # spack command to fail. - ci_cmd("generate", fail_on_error=False) + assert env_hashes["archive-files"] not in generated_hashes + for spec_name in ["callpath", "dyninst", "mpich", "libdwarf", "libelf"]: + assert env_hashes[spec_name] in generated_hashes def test_ci_subcommands_without_mirror( - tmpdir, + tmp_path: pathlib.Path, mutable_mock_env_path, - mock_packages, install_mockery, ci_base_environment, mock_binary_index, ): """Make sure we catch if there is not a mirror and report an error""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: + with open(tmp_path / "spack.yaml", "w") as f: f.write( """\ spack: @@ -1654,22 +1303,23 @@ def test_ci_subcommands_without_mirror( """ ) - with tmpdir.as_cwd(): + with working_dir(tmp_path): env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) with ev.read("test"): # Check the 'generate' subcommand output = ci_cmd( - "generate", "--output-file", outputfile, output=str, fail_on_error=False + "generate", + "--output-file", + str(tmp_path / ".gitlab-ci.yml"), + output=str, + fail_on_error=False, ) - ex = "spack ci generate requires an env containing a mirror" - assert ex in output + assert "spack ci generate requires an env containing a mirror" in output # Also check the 'rebuild-index' subcommand output = ci_cmd("rebuild-index", output=str, fail_on_error=False) - ex = "spack ci rebuild-index requires an env containing a mirror" - assert ex in output + assert "spack ci rebuild-index requires an env containing a mirror" in output def test_ensure_only_one_temporary_storage(): @@ -1689,11 +1339,8 @@ def test_ensure_only_one_temporary_storage(): enable_artifacts = "enable-artifacts-buildcache: True" temp_storage = "temporary-storage-url-prefix: file:///temp/mirror" - specify_both = """{0} - {1} -""".format( - enable_artifacts, temp_storage - ) + specify_both = f"{enable_artifacts}\n {temp_storage}" + specify_neither = "" # User can specify "enable-artifacts-buildcache" (boolean) @@ -1715,27 +1362,17 @@ def test_ensure_only_one_temporary_storage(): jsonschema.validate(yaml_obj, ci_schema) -def test_ci_generate_temp_storage_url( - tmpdir, - mutable_mock_env_path, - install_mockery, - mock_packages, - monkeypatch, - ci_base_environment, - mock_binary_index, -): +def test_ci_generate_temp_storage_url(ci_generate_test, tmp_path, mock_binary_index): """Verify correct behavior when using temporary-storage-url-prefix""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + _, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - archive-files mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {(tmp_path / "ci-mirror").as_uri()} ci: - temporary-storage-url-prefix: file:///work/temp/mirror + temporary-storage-url-prefix: {(tmp_path / "temp-mirror").as_uri()} pipeline-gen: - submapping: - match: @@ -1747,38 +1384,32 @@ def test_ci_generate_temp_storage_url( - cleanup-job: custom_attribute: custom! """ - ) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as of: - pipeline_doc = syaml.load(of.read()) - - assert "cleanup" in pipeline_doc - cleanup_job = pipeline_doc["cleanup"] - - assert cleanup_job["custom_attribute"] == "custom!" + ) + yaml_contents = syaml.load(outputfile.read_text()) - assert "script" in cleanup_job - cleanup_task = cleanup_job["script"][0] + assert "cleanup" in yaml_contents - assert cleanup_task.startswith("spack -d mirror destroy") + cleanup_job = yaml_contents["cleanup"] + assert cleanup_job["custom_attribute"] == "custom!" + assert "script" in cleanup_job - assert "stages" in pipeline_doc - stages = pipeline_doc["stages"] + cleanup_task = cleanup_job["script"][0] + assert cleanup_task.startswith("spack -d mirror destroy") - # Cleanup job should be 2nd to last, just before rebuild-index - assert "stage" in cleanup_job - assert cleanup_job["stage"] == stages[-2] + assert "stages" in yaml_contents + stages = yaml_contents["stages"] + # Cleanup job should be 2nd to last, just before rebuild-index + assert "stage" in cleanup_job + assert cleanup_job["stage"] == stages[-2] def test_ci_generate_read_broken_specs_url( - tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, ci_base_environment + tmp_path: pathlib.Path, + mutable_mock_env_path, + install_mockery, + mock_packages, + monkeypatch, + ci_base_environment, ): """Verify that `broken-specs-url` works as intended""" spec_a = Spec("pkg-a") @@ -1789,7 +1420,7 @@ def test_ci_generate_read_broken_specs_url( spec_flattendeps.concretize() flattendeps_dag_hash = spec_flattendeps.dag_hash() - broken_specs_url = "file://{0}".format(tmpdir.strpath) + broken_specs_url = tmp_path.as_uri() # Mark 'a' as broken (but not 'flatten-deps') broken_spec_a_url = "{0}/{1}".format(broken_specs_url, a_dag_hash) @@ -1800,18 +1431,17 @@ def test_ci_generate_read_broken_specs_url( ) # Test that `spack ci generate` notices this broken spec and fails. - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: + with open(tmp_path / "spack.yaml", "w") as f: f.write( - """\ + f"""\ spack: specs: - flatten-deps - pkg-a mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {(tmp_path / "ci-mirror").as_uri()} ci: - broken-specs-url: "{0}" + broken-specs-url: "{broken_specs_url}" pipeline-gen: - submapping: - match: @@ -1823,45 +1453,40 @@ def test_ci_generate_read_broken_specs_url( tags: - donotcare image: donotcare -""".format( - broken_specs_url - ) +""" ) - with tmpdir.as_cwd(): + with working_dir(tmp_path): env_cmd("create", "test", "./spack.yaml") with ev.read("test"): # Check output of the 'generate' subcommand output = ci_cmd("generate", output=str, fail_on_error=False) assert "known to be broken" in output - expected = "{0}/{1} (in stack {2}) was reported broken here: {3}".format( - spec_a.name, a_dag_hash[:7], job_stack, a_job_url + expected = ( + f"{spec_a.name}/{a_dag_hash[:7]} (in stack {job_stack}) was " + f"reported broken here: {a_job_url}" ) assert expected in output - not_expected = "flatten-deps/{0} (in stack".format(flattendeps_dag_hash[:7]) + not_expected = f"flatten-deps/{flattendeps_dag_hash[:7]} (in stack" assert not_expected not in output -def test_ci_generate_external_signing_job( - tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, ci_base_environment -): +def test_ci_generate_external_signing_job(ci_generate_test, tmp_path, monkeypatch): """Verify that in external signing mode: 1) each rebuild jobs includes the location where the binary hash information is written and 2) we properly generate a final signing job in the pipeline.""" - os.environ.update({"SPACK_PIPELINE_TYPE": "spack_protected_branch"}) - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + monkeypatch.setenv("SPACK_PIPELINE_TYPE", "spack_protected_branch") + _, outputfile, _ = ci_generate_test( + f"""\ spack: specs: - archive-files mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {(tmp_path / "ci-mirror").as_uri()} ci: - temporary-storage-url-prefix: file:///work/temp/mirror + temporary-storage-url-prefix: {(tmp_path / "temp-mirror").as_uri()} pipeline-gen: - submapping: - match: @@ -1883,48 +1508,40 @@ def test_ci_generate_external_signing_job( - echo hello custom_attribute: custom! """ - ) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) - - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) - - with open(outputfile) as of: - pipeline_doc = syaml.load(of.read()) + ) + yaml_contents = syaml.load(outputfile.read_text()) - assert "sign-pkgs" in pipeline_doc - signing_job = pipeline_doc["sign-pkgs"] - assert "tags" in signing_job - signing_job_tags = signing_job["tags"] - for expected_tag in ["notary", "protected", "aws"]: - assert expected_tag in signing_job_tags - assert signing_job["custom_attribute"] == "custom!" + assert "sign-pkgs" in yaml_contents + signing_job = yaml_contents["sign-pkgs"] + assert "tags" in signing_job + signing_job_tags = signing_job["tags"] + for expected_tag in ["notary", "protected", "aws"]: + assert expected_tag in signing_job_tags + assert signing_job["custom_attribute"] == "custom!" def test_ci_reproduce( - tmpdir, + tmp_path: pathlib.Path, mutable_mock_env_path, install_mockery, - mock_packages, monkeypatch, last_two_git_commits, ci_base_environment, mock_binary_index, ): - working_dir = tmpdir.join("repro_dir") + repro_dir = tmp_path / "repro_dir" image_name = "org/image:tag" - spack_yaml_contents = """ + with open(tmp_path / "spack.yaml", "w") as f: + f.write( + f""" spack: definitions: - packages: [archive-files] specs: - $packages mirrors: - test-mirror: file:///some/fake/mirror + test-mirror: {tmp_path / "ci-mirror"} ci: pipeline-gen: - submapping: @@ -1933,65 +1550,49 @@ def test_ci_reproduce( build-job: tags: - donotcare - image: {0} -""".format( - image_name - ) - - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) - - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - with ev.read("test") as env: - with env.write_transaction(): - env.concretize() - env.write() - - if not os.path.exists(working_dir.strpath): - os.makedirs(working_dir.strpath) - - shutil.copyfile(env.manifest_path, os.path.join(working_dir.strpath, "spack.yaml")) - shutil.copyfile(env.lock_path, os.path.join(working_dir.strpath, "spack.lock")) + image: {image_name} +""" + ) - job_spec = None + with working_dir(tmp_path), ev.Environment(".") as env: + env.concretize() + env.write() - for h, s in env.specs_by_hash.items(): - if s.name == "archive-files": - job_spec = s + repro_dir.mkdir() - job_spec_json_path = os.path.join(working_dir.strpath, "archivefiles.json") - with open(job_spec_json_path, "w") as fd: - fd.write(job_spec.to_json(hash=ht.dag_hash)) + job_spec = env.concrete_roots()[0] + with open(repro_dir / "archivefiles.json", "w") as f: + f.write(job_spec.to_json(hash=ht.dag_hash)) - artifacts_root = os.path.join(working_dir.strpath, "scratch_dir") - pipeline_path = os.path.join(artifacts_root, "pipeline.yml") + artifacts_root = repro_dir / "scratch_dir" + pipeline_path = artifacts_root / "pipeline.yml" - ci_cmd("generate", "--output-file", pipeline_path, "--artifacts-root", artifacts_root) + ci_cmd( + "generate", + "--output-file", + str(pipeline_path), + "--artifacts-root", + str(artifacts_root), + ) - job_name = ci.get_job_name(job_spec) + job_name = ci.get_job_name(job_spec) - repro_file = os.path.join(working_dir.strpath, "repro.json") - repro_details = { - "job_name": job_name, - "job_spec_json": "archivefiles.json", - "ci_project_dir": working_dir.strpath, - } - with open(repro_file, "w") as fd: - fd.write(json.dumps(repro_details)) + with open(repro_dir / "repro.json", "w") as f: + f.write( + json.dumps( + { + "job_name": job_name, + "job_spec_json": "archivefiles.json", + "ci_project_dir": str(repro_dir), + } + ) + ) - install_script = os.path.join(working_dir.strpath, "install.sh") - with open(install_script, "w") as fd: - fd.write("#!/bin/sh\n\n#fake install\nspack install blah\n") + with open(repro_dir / "install.sh", "w") as f: + f.write("#!/bin/sh\n\n#fake install\nspack install blah\n") - spack_info_file = os.path.join(working_dir.strpath, "spack_info.txt") - with open(spack_info_file, "w") as fd: - fd.write( - "\nMerge {0} into {1}\n\n".format( - last_two_git_commits[1], last_two_git_commits[0] - ) - ) + with open(repro_dir / "spack_info.txt", "w") as f: + f.write(f"\nMerge {last_two_git_commits[1]} into {last_two_git_commits[0]}\n\n") def fake_download_and_extract_artifacts(url, work_dir): pass @@ -1999,16 +1600,16 @@ def fake_download_and_extract_artifacts(url, work_dir): monkeypatch.setattr(ci, "download_and_extract_artifacts", fake_download_and_extract_artifacts) rep_out = ci_cmd( "reproduce-build", - "https://some.domain/api/v1/projects/1/jobs/2/artifacts", + "https://example.com/api/v1/projects/1/jobs/2/artifacts", "--working-dir", - working_dir.strpath, + str(repro_dir), output=str, ) # Make sure the script was generated - assert os.path.exists(os.path.join(os.path.realpath(working_dir.strpath), "start.sh")) - # Make sure we tell the suer where it is when not in interactive mode - expect_out = "$ {0}/start.sh".format(os.path.realpath(working_dir.strpath)) - assert expect_out in rep_out + assert (repro_dir / "start.sh").exists() + + # Make sure we tell the user where it is when not in interactive mode + assert f"$ {repro_dir}/start.sh" in rep_out @pytest.mark.parametrize( @@ -2086,8 +1687,8 @@ def test_cmd_first_line(): - matrix: - [$old-gcc-pkgs] mirrors: - test-mirror: file:///some/fake/mirror - {0}: + test-mirror: {mirror_url} + {key}: match_behavior: first mappings: - match: @@ -2115,29 +1716,23 @@ def test_cmd_first_line(): @pytest.mark.regression("36409") def test_gitlab_ci_deprecated( - tmpdir, + tmp_path: pathlib.Path, mutable_mock_env_path, install_mockery, - mock_packages, monkeypatch, ci_base_environment, mock_binary_index, ): - mirror_url = "file:///some/fake/mirror" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(legacy_spack_yaml_contents.format("gitlab-ci")) + mirror_url = (tmp_path / "ci-mirror").as_uri() + with open(tmp_path / "spack.yaml", "w") as f: + f.write(legacy_spack_yaml_contents.format(mirror_url=mirror_url, key="gitlab-ci")) - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = "generated-pipeline.yaml" - - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) + with working_dir(tmp_path): + with ev.Environment("."): + ci_cmd("generate", "--output-file", "generated-pipeline.yaml") - with open(outputfile) as f: - contents = f.read() - yaml_contents = syaml.load(contents) + with open("generated-pipeline.yaml") as f: + yaml_contents = syaml.load(f) assert "stages" in yaml_contents assert len(yaml_contents["stages"]) == 5 @@ -2146,7 +1741,7 @@ def test_gitlab_ci_deprecated( assert "rebuild-index" in yaml_contents rebuild_job = yaml_contents["rebuild-index"] - expected = "spack buildcache update-index --keys {0}".format(mirror_url) + expected = f"spack buildcache update-index --keys {mirror_url}" assert rebuild_job["script"][0] == expected assert "variables" in yaml_contents @@ -2157,100 +1752,82 @@ def test_gitlab_ci_deprecated( @pytest.mark.regression("36045") def test_gitlab_ci_update( - tmpdir, + tmp_path: pathlib.Path, mutable_mock_env_path, install_mockery, - mock_packages, monkeypatch, ci_base_environment, mock_binary_index, ): - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(legacy_spack_yaml_contents.format("ci")) - - with tmpdir.as_cwd(): - env_cmd("update", "-y", ".") - - with open("spack.yaml") as f: - contents = f.read() - yaml_contents = syaml.load(contents) + with open(tmp_path / "spack.yaml", "w") as f: + f.write( + legacy_spack_yaml_contents.format(mirror_url=(tmp_path / "mirror").as_uri(), key="ci") + ) - ci_root = yaml_contents["spack"]["ci"] + env_cmd("update", "-y", str(tmp_path)) - assert "pipeline-gen" in ci_root + with open(tmp_path / "spack.yaml") as f: + yaml_contents = syaml.load(f) + ci_root = yaml_contents["spack"]["ci"] + assert "pipeline-gen" in ci_root -def test_gitlab_config_scopes( - tmpdir, working_env, mutable_mock_env_path, mock_packages, ci_base_environment -): +def test_gitlab_config_scopes(ci_generate_test, tmp_path): """Test pipeline generation with real configs included""" configs_path = os.path.join(spack_paths.share_path, "gitlab", "cloud_pipelines", "configs") - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ + _, outputfile, _ = ci_generate_test( + f"""\ spack: config: - install_tree: {0} - include: [{1}] + install_tree: {tmp_path / "opt"} + include: [{configs_path}] view: false specs: - flatten-deps mirrors: - some-mirror: https://my.fake.mirror + some-mirror: {tmp_path / "ci-mirror"} ci: pipeline-gen: - build-job: image: "ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01" tags: ["some_tag"] -""".format( - tmpdir.strpath, configs_path - ) - ) +""" + ) - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) + yaml_contents = syaml.load(outputfile.read_text()) - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) + assert "rebuild-index" in yaml_contents - with open(outputfile) as f: - contents = f.read() - yaml_contents = syaml.load(contents) + rebuild_job = yaml_contents["rebuild-index"] + assert "tags" in rebuild_job + assert "variables" in rebuild_job - assert "rebuild-index" in yaml_contents - rebuild_job = yaml_contents["rebuild-index"] - assert "tags" in rebuild_job - assert "variables" in rebuild_job - rebuild_tags = rebuild_job["tags"] - rebuild_vars = rebuild_job["variables"] - assert all([t in rebuild_tags for t in ["spack", "service"]]) - expected_vars = ["CI_JOB_SIZE", "KUBERNETES_CPU_REQUEST", "KUBERNETES_MEMORY_REQUEST"] - assert all([v in rebuild_vars for v in expected_vars]) + rebuild_tags = rebuild_job["tags"] + rebuild_vars = rebuild_job["variables"] + assert all([t in rebuild_tags for t in ["spack", "service"]]) + expected_vars = ["CI_JOB_SIZE", "KUBERNETES_CPU_REQUEST", "KUBERNETES_MEMORY_REQUEST"] + assert all([v in rebuild_vars for v in expected_vars]) def test_ci_generate_mirror_config( - tmpdir, + tmp_path: pathlib.Path, mutable_mock_env_path, install_mockery, - mock_packages, monkeypatch, ci_base_environment, mock_binary_index, ): """Make sure the correct mirror gets used as the buildcache destination""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: + fst, snd = (tmp_path / "first").as_uri(), (tmp_path / "second").as_uri() + with open(tmp_path / "spack.yaml", "w") as f: f.write( - """\ + f"""\ spack: specs: - archive-files mirrors: - some-mirror: file:///this/is/a/source/mirror - buildcache-destination: file:///push/binaries/here + some-mirror: {fst} + buildcache-destination: {snd} ci: pipeline-gen: - submapping: @@ -2263,16 +1840,10 @@ def test_ci_generate_mirror_config( """ ) - with tmpdir.as_cwd(): - env_cmd("create", "test", "./spack.yaml") - outputfile = str(tmpdir.join(".gitlab-ci.yml")) + with ev.Environment(tmp_path): + ci_cmd("generate", "--output-file", str(tmp_path / ".gitlab-ci.yml")) - with ev.read("test"): - ci_cmd("generate", "--output-file", outputfile) - with open(outputfile) as of: - pipeline_doc = syaml.load(of.read()) - assert "rebuild-index" in pipeline_doc - reindex_job = pipeline_doc["rebuild-index"] - assert "script" in reindex_job - reindex_step = reindex_job["script"][0] - assert "file:///push/binaries/here" in reindex_step + with open(tmp_path / ".gitlab-ci.yml") as f: + pipeline_doc = syaml.load(f) + assert fst not in pipeline_doc["rebuild-index"]["script"][0] + assert snd in pipeline_doc["rebuild-index"]["script"][0] From 64774f30155f701fb1961e11e38ea3af6d8513b3 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 16 Aug 2024 10:11:05 +0200 Subject: [PATCH 351/435] Skip test_foreground_background + other minor cleanups The test_foreground_background unit test has been marked xfail for a while, meaning: - Nobody looks at the results of the test - It still runs every time That test happens to hang frequently on some Apple M1 I have access to, so here I mark it as skip. Also went through other xfailing and skipped tests, and applied minor changes. --- lib/spack/spack/test/cmd/commands.py | 17 ------------- lib/spack/spack/test/cmd/external.py | 2 +- lib/spack/spack/test/cmd/help.py | 16 ------------ lib/spack/spack/test/cmd/style.py | 26 ++++++++++++-------- lib/spack/spack/test/container/cli.py | 2 +- lib/spack/spack/test/installer.py | 2 +- lib/spack/spack/test/llnl/util/filesystem.py | 2 +- lib/spack/spack/test/llnl/util/tty/log.py | 4 +-- lib/spack/spack/test/make_executable.py | 5 +--- lib/spack/spack/test/spack_yaml.py | 4 +-- 10 files changed, 24 insertions(+), 56 deletions(-) diff --git a/lib/spack/spack/test/cmd/commands.py b/lib/spack/spack/test/cmd/commands.py index 68d28f5684352d..b7cc59e1153edf 100644 --- a/lib/spack/spack/test/cmd/commands.py +++ b/lib/spack/spack/test/cmd/commands.py @@ -6,7 +6,6 @@ import filecmp import os import shutil -import subprocess import pytest @@ -156,22 +155,6 @@ def test_update_with_header(tmpdir): commands("--update", str(update_file), "--header", str(filename)) -@pytest.mark.xfail -def test_no_pipe_error(): - """Make sure we don't see any pipe errors when piping output.""" - - proc = subprocess.Popen( - ["spack", "commands", "--format=rst"], stdout=subprocess.PIPE, stderr=subprocess.PIPE - ) - - # Call close() on stdout to cause a broken pipe - proc.stdout.close() - proc.wait() - stderr = proc.stderr.read().decode("utf-8") - - assert "Broken pipe" not in stderr - - def test_bash_completion(): """Test the bash completion writer.""" out1 = commands("--format=bash") diff --git a/lib/spack/spack/test/cmd/external.py b/lib/spack/spack/test/cmd/external.py index d911f8adb594fb..86e6f41389a961 100644 --- a/lib/spack/spack/test/cmd/external.py +++ b/lib/spack/spack/test/cmd/external.py @@ -100,7 +100,7 @@ def test_get_executables(working_env, mock_executable): # TODO: this test should be made to work, but in the meantime it is # causing intermittent (spurious) CI failures on all PRs -@pytest.mark.skipif(sys.platform == "win32", reason="Test fails intermittently on Windows") +@pytest.mark.not_on_windows("Test fails intermittently on Windows") def test_find_external_cmd_not_buildable(mutable_config, working_env, mock_executable): """When the user invokes 'spack external find --not-buildable', the config for any package where Spack finds an external version should be marked as diff --git a/lib/spack/spack/test/cmd/help.py b/lib/spack/spack/test/cmd/help.py index 688675be68c0b7..91303dbb6eba94 100644 --- a/lib/spack/spack/test/cmd/help.py +++ b/lib/spack/spack/test/cmd/help.py @@ -2,29 +2,13 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import pytest - from spack.main import SpackCommand -@pytest.mark.xfail def test_reuse_after_help(): """Test `spack help` can be called twice with the same SpackCommand.""" help_cmd = SpackCommand("help", subprocess=True) help_cmd() - - # This second invocation will somehow fail because the parser no - # longer works after add_all_commands() is called in - # SpackArgumentParser.format_help_sections(). - # - # TODO: figure out why this doesn't work properly and change this - # test to use a single SpackCommand. - # - # It seems that parse_known_args() finds "too few arguments" the - # second time through b/c add_all_commands() ends up leaving extra - # positionals in the parser. But this used to work before we loaded - # commands lazily. help_cmd() diff --git a/lib/spack/spack/test/cmd/style.py b/lib/spack/spack/test/cmd/style.py index 560518160444c4..7444c970c1916e 100644 --- a/lib/spack/spack/test/cmd/style.py +++ b/lib/spack/spack/test/cmd/style.py @@ -24,6 +24,12 @@ style = spack.main.SpackCommand("style") +ISORT = which("isort") +BLACK = which("black") +FLAKE8 = which("flake8") +MYPY = which("mypy") + + @pytest.fixture(autouse=True) def has_develop_branch(git): """spack style requires git and a develop branch to run -- skip if we're missing either.""" @@ -190,8 +196,8 @@ def external_style_root(git, flake8_package_with_errors, tmpdir): yield tmpdir, py_file -@pytest.mark.skipif(not which("isort"), reason="isort is not installed.") -@pytest.mark.skipif(not which("black"), reason="black is not installed.") +@pytest.mark.skipif(not ISORT, reason="isort is not installed.") +@pytest.mark.skipif(not BLACK, reason="black is not installed.") def test_fix_style(external_style_root): """Make sure spack style --fix works.""" tmpdir, py_file = external_style_root @@ -209,10 +215,10 @@ def test_fix_style(external_style_root): assert filecmp.cmp(broken_py, fixed_py) -@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.") -@pytest.mark.skipif(not which("isort"), reason="isort is not installed.") -@pytest.mark.skipif(not which("mypy"), reason="mypy is not installed.") -@pytest.mark.skipif(not which("black"), reason="black is not installed.") +@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.") +@pytest.mark.skipif(not ISORT, reason="isort is not installed.") +@pytest.mark.skipif(not MYPY, reason="mypy is not installed.") +@pytest.mark.skipif(not BLACK, reason="black is not installed.") def test_external_root(external_style_root, capfd): """Ensure we can run in a separate root directory w/o configuration files.""" tmpdir, py_file = external_style_root @@ -238,7 +244,7 @@ def test_external_root(external_style_root, capfd): assert "lib/spack/spack/dummy.py:7: [F401] 'os' imported but unused" in output -@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.") +@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.") def test_style(flake8_package, tmpdir): root_relative = os.path.relpath(flake8_package, spack.paths.prefix) @@ -264,7 +270,7 @@ def test_style(flake8_package, tmpdir): assert "spack style checks were clean" in output -@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.") +@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.") def test_style_with_errors(flake8_package_with_errors): root_relative = os.path.relpath(flake8_package_with_errors, spack.paths.prefix) output = style( @@ -275,8 +281,8 @@ def test_style_with_errors(flake8_package_with_errors): assert "spack style found errors" in output -@pytest.mark.skipif(not which("black"), reason="black is not installed.") -@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.") +@pytest.mark.skipif(not BLACK, reason="black is not installed.") +@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.") def test_style_with_black(flake8_package_with_errors): output = style("--tool", "black,flake8", flake8_package_with_errors, fail_on_error=False) assert "black found errors" in output diff --git a/lib/spack/spack/test/container/cli.py b/lib/spack/spack/test/container/cli.py index 3cb4ed05a8b8bc..fa57eac723bfc0 100644 --- a/lib/spack/spack/test/container/cli.py +++ b/lib/spack/spack/test/container/cli.py @@ -27,7 +27,7 @@ def test_listing_possible_os(): assert expected_os in output -@pytest.mark.skipif(str(spack.platforms.host()) == "windows", reason="test unsupported on Windows") +@pytest.mark.not_on_windows("test unsupported on Windows") @pytest.mark.maybeslow @pytest.mark.requires_executables("git") def test_bootstrap_phase(minimal_configuration, config_dumper, capsys): diff --git a/lib/spack/spack/test/installer.py b/lib/spack/spack/test/installer.py index 1ca3982dd6ca5d..1af1fb1d90f39c 100644 --- a/lib/spack/spack/test/installer.py +++ b/lib/spack/spack/test/installer.py @@ -582,7 +582,7 @@ def test_clear_failures_success(tmpdir): assert os.path.isfile(failures.locker.lock_path) -@pytest.mark.xfail(sys.platform == "win32", reason="chmod does not prevent removal on Win") +@pytest.mark.not_on_windows("chmod does not prevent removal on Win") def test_clear_failures_errs(tmpdir, capsys): """Test the clear_failures exception paths.""" failures = spack.database.FailureTracker(str(tmpdir), default_timeout=0.1) diff --git a/lib/spack/spack/test/llnl/util/filesystem.py b/lib/spack/spack/test/llnl/util/filesystem.py index d9e34d50096094..7803ecaf8c56b6 100644 --- a/lib/spack/spack/test/llnl/util/filesystem.py +++ b/lib/spack/spack/test/llnl/util/filesystem.py @@ -274,7 +274,7 @@ def test_symlinks_false(self, stage): assert not os.path.islink("dest/2") check_added_exe_permissions("source/2", "dest/2") - @pytest.mark.skipif(sys.platform == "win32", reason="Broken symlinks not allowed on Windows") + @pytest.mark.not_on_windows("Broken symlinks not allowed on Windows") def test_allow_broken_symlinks(self, stage): """Test installing with a broken symlink.""" with fs.working_dir(str(stage)): diff --git a/lib/spack/spack/test/llnl/util/tty/log.py b/lib/spack/spack/test/llnl/util/tty/log.py index 3ff3ee995c165b..ea03fd2689846b 100644 --- a/lib/spack/spack/test/llnl/util/tty/log.py +++ b/lib/spack/spack/test/llnl/util/tty/log.py @@ -348,7 +348,7 @@ def no_termios(): (mock_shell_tstp_tstp_cont_cont, no_termios), ], ) -@pytest.mark.xfail(reason="Fails almost consistently when run with coverage and xdist") +@pytest.mark.skip(reason="Fails almost consistently when run with coverage and xdist") def test_foreground_background(test_fn, termios_on_or_off, tmpdir): """Functional tests for foregrounding and backgrounding a logged process. @@ -465,7 +465,7 @@ def mock_shell_v_v_no_termios(proc, ctl, **kwargs): "test_fn,termios_on_or_off", [(mock_shell_v_v, lang.nullcontext), (mock_shell_v_v_no_termios, no_termios)], ) -@pytest.mark.xfail(reason="Fails almost consistently when run with coverage and xdist") +@pytest.mark.skip(reason="Fails almost consistently when run with coverage and xdist") def test_foreground_background_output(test_fn, capfd, termios_on_or_off, tmpdir): """Tests hitting 'v' toggles output, and that force_echo works.""" if sys.version_info >= (3, 8) and sys.platform == "darwin" and termios_on_or_off == no_termios: diff --git a/lib/spack/spack/test/make_executable.py b/lib/spack/spack/test/make_executable.py index 0dd0109e90bff5..3090f7be5bed87 100644 --- a/lib/spack/spack/test/make_executable.py +++ b/lib/spack/spack/test/make_executable.py @@ -9,16 +9,13 @@ This just tests whether the right args are getting passed to make. """ import os -import sys import pytest from spack.build_environment import MakeExecutable from spack.util.environment import path_put_first -pytestmark = pytest.mark.skipif( - sys.platform == "win32", reason="MakeExecutable not supported on Windows" -) +pytestmark = pytest.mark.not_on_windows("MakeExecutable not supported on Windows") @pytest.fixture(autouse=True) diff --git a/lib/spack/spack/test/spack_yaml.py b/lib/spack/spack/test/spack_yaml.py index 4f3c035724ccd9..738d5f91b8ca40 100644 --- a/lib/spack/spack/test/spack_yaml.py +++ b/lib/spack/spack/test/spack_yaml.py @@ -2,10 +2,8 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - """Test Spack's custom YAML format.""" import io -import sys import pytest @@ -126,7 +124,7 @@ def test_yaml_aliases(): ), ], ) -@pytest.mark.xfail(sys.platform == "win32", reason="fails on Windows") +@pytest.mark.not_on_windows(reason="fails on Windows") def test_round_trip_configuration(initial_content, expected_final_content, tmp_path): """Test that configuration can be loaded and dumped without too many changes""" file = tmp_path / "test.yaml" From 4f0e336ed09408809df1b570422a64b3e02e9eb2 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 16 Aug 2024 13:14:58 +0200 Subject: [PATCH 352/435] Remove "test_foreground_background" --- lib/spack/spack/test/llnl/util/tty/log.py | 345 ---------------------- 1 file changed, 345 deletions(-) diff --git a/lib/spack/spack/test/llnl/util/tty/log.py b/lib/spack/spack/test/llnl/util/tty/log.py index ea03fd2689846b..61879fc4108167 100644 --- a/lib/spack/spack/test/llnl/util/tty/log.py +++ b/lib/spack/spack/test/llnl/util/tty/log.py @@ -4,19 +4,13 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import contextlib -import multiprocessing -import os -import signal import sys -import time from types import ModuleType from typing import Optional import pytest -import llnl.util.lang as lang import llnl.util.tty.log as log -import llnl.util.tty.pty as pty from spack.util.executable import which @@ -173,342 +167,3 @@ def test_log_subproc_and_echo_output_capfd(capfd, tmpdir): print("logged") assert capfd.readouterr()[0] == "echo\n" - - -# -# Tests below use a pseudoterminal to test llnl.util.tty.log -# -def simple_logger(**kwargs): - """Mock logger (minion) process for testing log.keyboard_input.""" - running = [True] - - def handler(signum, frame): - running[0] = False - - signal.signal(signal.SIGUSR1, handler) - - log_path = kwargs["log_path"] - with log.log_output(log_path): - while running[0]: - print("line") - time.sleep(1e-3) - - -def mock_shell_fg(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.fg() - ctl.status() - ctl.wait_enabled() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_fg_no_termios(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.fg() - ctl.status() - ctl.wait_disabled_fg() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_bg(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.bg() - ctl.status() - ctl.wait_disabled() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_tstp_cont(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.tstp() - ctl.wait_stopped() - - ctl.cont() - ctl.wait_running() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_tstp_tstp_cont(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.tstp() - ctl.wait_stopped() - - ctl.tstp() - ctl.wait_stopped() - - ctl.cont() - ctl.wait_running() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_tstp_tstp_cont_cont(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.tstp() - ctl.wait_stopped() - - ctl.tstp() - ctl.wait_stopped() - - ctl.cont() - ctl.wait_running() - - ctl.cont() - ctl.wait_running() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_bg_fg(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.bg() - ctl.status() - ctl.wait_disabled() - - ctl.fg() - ctl.status() - ctl.wait_enabled() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_bg_fg_no_termios(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.bg() - ctl.status() - ctl.wait_disabled() - - ctl.fg() - ctl.status() - ctl.wait_disabled_fg() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_fg_bg(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.fg() - ctl.status() - ctl.wait_enabled() - - ctl.bg() - ctl.status() - ctl.wait_disabled() - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_fg_bg_no_termios(proc, ctl, **kwargs): - """PseudoShell controller function for test_foreground_background.""" - ctl.fg() - ctl.status() - ctl.wait_disabled_fg() - - ctl.bg() - ctl.status() - ctl.wait_disabled() - - os.kill(proc.pid, signal.SIGUSR1) - - -@contextlib.contextmanager -def no_termios(): - saved = log.termios - log.termios = None - try: - yield - finally: - log.termios = saved - - -@pytest.mark.skipif(not which("ps"), reason="requires ps utility") -@pytest.mark.skipif(not termios, reason="requires termios support") -@pytest.mark.parametrize( - "test_fn,termios_on_or_off", - [ - # tests with termios - (mock_shell_fg, lang.nullcontext), - (mock_shell_bg, lang.nullcontext), - (mock_shell_bg_fg, lang.nullcontext), - (mock_shell_fg_bg, lang.nullcontext), - (mock_shell_tstp_cont, lang.nullcontext), - (mock_shell_tstp_tstp_cont, lang.nullcontext), - (mock_shell_tstp_tstp_cont_cont, lang.nullcontext), - # tests without termios - (mock_shell_fg_no_termios, no_termios), - (mock_shell_bg, no_termios), - (mock_shell_bg_fg_no_termios, no_termios), - (mock_shell_fg_bg_no_termios, no_termios), - (mock_shell_tstp_cont, no_termios), - (mock_shell_tstp_tstp_cont, no_termios), - (mock_shell_tstp_tstp_cont_cont, no_termios), - ], -) -@pytest.mark.skip(reason="Fails almost consistently when run with coverage and xdist") -def test_foreground_background(test_fn, termios_on_or_off, tmpdir): - """Functional tests for foregrounding and backgrounding a logged process. - - This ensures that things like SIGTTOU are not raised and that - terminal settings are corrected on foreground/background and on - process stop and start. - - """ - shell = pty.PseudoShell(test_fn, simple_logger) - log_path = str(tmpdir.join("log.txt")) - - # run the shell test - with termios_on_or_off(): - shell.start(log_path=log_path, debug=True) - exitcode = shell.join() - - # processes completed successfully - assert exitcode == 0 - - # assert log was created - assert os.path.exists(log_path) - - -def synchronized_logger(**kwargs): - """Mock logger (minion) process for testing log.keyboard_input. - - This logger synchronizes with the parent process to test that 'v' can - toggle output. It is used in ``test_foreground_background_output`` below. - - """ - running = [True] - - def handler(signum, frame): - running[0] = False - - signal.signal(signal.SIGUSR1, handler) - - log_path = kwargs["log_path"] - write_lock = kwargs["write_lock"] - v_lock = kwargs["v_lock"] - - sys.stderr.write(os.getcwd() + "\n") - with log.log_output(log_path) as logger: - with logger.force_echo(): - print("forced output") - - while running[0]: - with write_lock: - if v_lock.acquire(False): # non-blocking acquire - print("off") - v_lock.release() - else: - print("on") # lock held; v is toggled on - time.sleep(1e-2) - - -def mock_shell_v_v(proc, ctl, **kwargs): - """Controller function for test_foreground_background_output.""" - write_lock = kwargs["write_lock"] - v_lock = kwargs["v_lock"] - - ctl.fg() - ctl.wait_enabled() - time.sleep(0.1) - - write_lock.acquire() # suspend writing - v_lock.acquire() # enable v lock - ctl.write(b"v") # toggle v on stdin - time.sleep(0.1) - write_lock.release() # resume writing - - time.sleep(0.1) - - write_lock.acquire() # suspend writing - ctl.write(b"v") # toggle v on stdin - time.sleep(0.1) - v_lock.release() # disable v lock - write_lock.release() # resume writing - time.sleep(0.1) - - os.kill(proc.pid, signal.SIGUSR1) - - -def mock_shell_v_v_no_termios(proc, ctl, **kwargs): - """Controller function for test_foreground_background_output.""" - write_lock = kwargs["write_lock"] - v_lock = kwargs["v_lock"] - - ctl.fg() - ctl.wait_disabled_fg() - time.sleep(0.1) - - write_lock.acquire() # suspend writing - v_lock.acquire() # enable v lock - ctl.write(b"v\n") # toggle v on stdin - time.sleep(0.1) - write_lock.release() # resume writing - - time.sleep(0.1) - - write_lock.acquire() # suspend writing - ctl.write(b"v\n") # toggle v on stdin - time.sleep(0.1) - v_lock.release() # disable v lock - write_lock.release() # resume writing - time.sleep(0.1) - - os.kill(proc.pid, signal.SIGUSR1) - - -@pytest.mark.skipif(not which("ps"), reason="requires ps utility") -@pytest.mark.skipif(not termios, reason="requires termios support") -@pytest.mark.parametrize( - "test_fn,termios_on_or_off", - [(mock_shell_v_v, lang.nullcontext), (mock_shell_v_v_no_termios, no_termios)], -) -@pytest.mark.skip(reason="Fails almost consistently when run with coverage and xdist") -def test_foreground_background_output(test_fn, capfd, termios_on_or_off, tmpdir): - """Tests hitting 'v' toggles output, and that force_echo works.""" - if sys.version_info >= (3, 8) and sys.platform == "darwin" and termios_on_or_off == no_termios: - return - - shell = pty.PseudoShell(test_fn, synchronized_logger) - log_path = str(tmpdir.join("log.txt")) - - # Locks for synchronizing with minion - write_lock = multiprocessing.Lock() # must be held by minion to write - v_lock = multiprocessing.Lock() # held while controller is in v mode - - with termios_on_or_off(): - shell.start(write_lock=write_lock, v_lock=v_lock, debug=True, log_path=log_path) - - exitcode = shell.join() - out, err = capfd.readouterr() - print(err) # will be shown if something goes wrong - print(out) - - # processes completed successfully - assert exitcode == 0 - - # split output into lines - output = out.strip().split("\n") - - # also get lines of log file - assert os.path.exists(log_path) - with open(log_path) as logfile: - log_data = logfile.read().strip().split("\n") - - # Controller and minion process coordinate with locks such that the - # minion writes "off" when echo is off, and "on" when echo is on. The - # output should contain mostly "on" lines, but may contain "off" - # lines if the controller is slow. The important thing to observe - # here is that we started seeing 'on' in the end. - assert ["forced output", "on"] == lang.uniq(output) or [ - "forced output", - "off", - "on", - ] == lang.uniq(output) - - # log should be off for a while, then on, then off - assert ["forced output", "off", "on", "off"] == lang.uniq(log_data) and log_data.count( - "off" - ) > 2 # ensure some "off" lines were omitted From f51a9a9107f145021fb89e9447ea06be522cb20d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 16 Aug 2024 15:21:47 +0200 Subject: [PATCH 353/435] stage: provide mirrors in constructor (#45792) Stage objects create mirrors ad-hoc from current config. - There is no way to prevent mirrors from being used - There is no way to restrict mirrors to source/binary, which is of course context dependent. - Stage is also used in build caches, where iterating over mirrors is already implemented differently, and wouldn't work anyways cause it's source only, and in particular it makes no sense for OCI build caches. This commit: 1. Injects the sensible mirrors into the stage object from contexts where it is relevant 2. Separates mirrors from cache, so that w/o mirrors download cache can still be used --- lib/spack/spack/mirror.py | 50 ++++++-------- lib/spack/spack/oci/oci.py | 5 +- lib/spack/spack/package_base.py | 2 + lib/spack/spack/patch.py | 1 + lib/spack/spack/stage.py | 114 ++++++++++++++++---------------- lib/spack/spack/test/mirror.py | 5 +- 6 files changed, 83 insertions(+), 94 deletions(-) diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index 45681be85395dd..af2a179dd01742 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -426,48 +426,36 @@ def _determine_extension(fetcher): return ext -class MirrorReference: - """A ``MirrorReference`` stores the relative paths where you can store a - package/resource in a mirror directory. - - The appropriate storage location is given by ``storage_path``. The - ``cosmetic_path`` property provides a reference that a human could generate - themselves based on reading the details of the package. - - A user can iterate over a ``MirrorReference`` object to get all the - possible names that might be used to refer to the resource in a mirror; - this includes names generated by previous naming schemes that are no-longer - reported by ``storage_path`` or ``cosmetic_path``. - """ +class MirrorLayout: + """A ``MirrorLayout`` stores the relative locations of files in a mirror directory. The main + storage location is ``storage_path``. An additional, human-readable path may be obtained as the + second entry when iterating this object.""" + + def __init__(self, storage_path: str) -> None: + self.storage_path = storage_path + + def __iter__(self): + yield self.storage_path + - def __init__(self, cosmetic_path, global_path=None): +class DefaultLayout(MirrorLayout): + def __init__(self, cosmetic_path: str, global_path: Optional[str] = None) -> None: + super().__init__(global_path or cosmetic_path) self.global_path = global_path self.cosmetic_path = cosmetic_path - @property - def storage_path(self): - if self.global_path: - return self.global_path - else: - return self.cosmetic_path - def __iter__(self): if self.global_path: yield self.global_path yield self.cosmetic_path -class OCIImageLayout: - """Follow the OCI Image Layout Specification to archive blobs - - Paths are of the form `blobs//` - """ +class OCILayout(MirrorLayout): + """Follow the OCI Image Layout Specification to archive blobs where paths are of the form + ``blobs//``""" def __init__(self, digest: spack.oci.image.Digest) -> None: - self.storage_path = os.path.join("blobs", digest.algorithm, digest.digest) - - def __iter__(self): - yield self.storage_path + super().__init__(os.path.join("blobs", digest.algorithm, digest.digest)) def mirror_archive_paths(fetcher, per_package_ref, spec=None): @@ -494,7 +482,7 @@ def mirror_archive_paths(fetcher, per_package_ref, spec=None): if global_ref and ext: global_ref += ".%s" % ext - return MirrorReference(per_package_ref, global_ref) + return DefaultLayout(per_package_ref, global_ref) def get_all_versions(specs): diff --git a/lib/spack/spack/oci/oci.py b/lib/spack/spack/oci/oci.py index bbe403400bba7d..cd6ac1dad93b6e 100644 --- a/lib/spack/spack/oci/oci.py +++ b/lib/spack/spack/oci/oci.py @@ -397,8 +397,5 @@ def make_stage( # is the `oci-layout` and `index.json` files, which are # required by the spec. return spack.stage.Stage( - fetch_strategy, - mirror_paths=spack.mirror.OCIImageLayout(digest), - name=digest.digest, - keep=keep, + fetch_strategy, mirror_paths=spack.mirror.OCILayout(digest), name=digest.digest, keep=keep ) diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 63aa02cc62a76b..9b594f7f398219 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -1101,6 +1101,7 @@ def _make_resource_stage(self, root_stage, resource): mirror_paths=spack.mirror.mirror_archive_paths( resource.fetcher, os.path.join(self.name, pretty_resource_name) ), + mirrors=spack.mirror.MirrorCollection(source=True).values(), path=self.path, ) @@ -1121,6 +1122,7 @@ def _make_root_stage(self, fetcher): stage = Stage( fetcher, mirror_paths=mirror_paths, + mirrors=spack.mirror.MirrorCollection(source=True).values(), name=stage_name, path=self.path, search_fn=self._download_search, diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index 795a274243aae1..0c7fa45ff4c8b7 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -331,6 +331,7 @@ def stage(self) -> "spack.stage.Stage": fetcher, name=f"{spack.stage.stage_prefix}patch-{fetch_digest}", mirror_paths=mirror_ref, + mirrors=spack.mirror.MirrorCollection(source=True).values(), ) return self._stage diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 847c64d03fe6cc..fd550fb0cc64cc 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -13,7 +13,7 @@ import stat import sys import tempfile -from typing import Callable, Dict, Iterable, List, Optional, Set +from typing import Callable, Dict, Generator, Iterable, List, Optional, Set import llnl.string import llnl.util.lang @@ -352,8 +352,10 @@ class Stage(LockableStagingDir): def __init__( self, url_or_fetch_strategy, + *, name=None, - mirror_paths=None, + mirror_paths: Optional[spack.mirror.MirrorLayout] = None, + mirrors: Optional[Iterable[spack.mirror.Mirror]] = None, keep=False, path=None, lock=True, @@ -407,12 +409,18 @@ def __init__( # self.fetcher can change with mirrors. self.default_fetcher = self.fetcher self.search_fn = search_fn - # used for mirrored archives of repositories. - self.skip_checksum_for_mirror = True + # If we fetch from a mirror, but the original data is from say git, we can currently not + # prove that they are equal (we don't even have a tree hash in package.py). This bool is + # used to skip checksum verification and instead warn the user. + if isinstance(self.default_fetcher, fs.URLFetchStrategy): + self.skip_checksum_for_mirror = not bool(self.default_fetcher.digest) + else: + self.skip_checksum_for_mirror = True self.srcdir = None self.mirror_paths = mirror_paths + self.mirrors = list(mirrors) if mirrors else [] @property def expected_archive_files(self): @@ -467,76 +475,66 @@ def disable_mirrors(self): """The Stage will not attempt to look for the associated fetcher target in any of Spack's mirrors (including the local download cache). """ - self.mirror_paths = [] - - def fetch(self, mirror_only=False, err_msg=None): - """Retrieves the code or archive + self.mirror_paths = None - Args: - mirror_only (bool): only fetch from a mirror - err_msg (str or None): the error message to display if all fetchers - fail or ``None`` for the default fetch failure message - """ + def _generate_fetchers(self, mirror_only=False) -> Generator[fs.FetchStrategy, None, None]: fetchers = [] if not mirror_only: fetchers.append(self.default_fetcher) + # If this archive is normally fetched from a URL, then use the same digest. + if isinstance(self.default_fetcher, fs.URLFetchStrategy): + digest = self.default_fetcher.digest + expand = self.default_fetcher.expand_archive + extension = self.default_fetcher.extension + else: + digest = None + expand = True + extension = None + # TODO: move mirror logic out of here and clean it up! # TODO: Or @alalazo may have some ideas about how to use a # TODO: CompositeFetchStrategy here. - self.skip_checksum_for_mirror = True - if self.mirror_paths: - # Join URLs of mirror roots with mirror paths. Because - # urljoin() will strip everything past the final '/' in - # the root, so we add a '/' if it is not present. - mirror_urls = [ - url_util.join(mirror.fetch_url, rel_path) - for mirror in spack.mirror.MirrorCollection(source=True).values() + if self.mirror_paths and self.mirrors: + # Add URL strategies for all the mirrors with the digest + # Insert fetchers in the order that the URLs are provided. + fetchers[:0] = ( + fs.from_url_scheme( + url_util.join(mirror.fetch_url, rel_path), + digest, + expand=expand, + extension=extension, + ) + for mirror in self.mirrors if not mirror.fetch_url.startswith("oci://") for rel_path in self.mirror_paths - ] + ) - # If this archive is normally fetched from a tarball URL, - # then use the same digest. `spack mirror` ensures that - # the checksum will be the same. - digest = None - expand = True - extension = None - if isinstance(self.default_fetcher, fs.URLFetchStrategy): - digest = self.default_fetcher.digest - expand = self.default_fetcher.expand_archive - extension = self.default_fetcher.extension + if self.mirror_paths and self.default_fetcher.cachable: + fetchers[:0] = ( + spack.caches.FETCH_CACHE.fetcher( + rel_path, digest, expand=expand, extension=extension + ) + for rel_path in self.mirror_paths + ) - # Have to skip the checksum for things archived from - # repositories. How can this be made safer? - self.skip_checksum_for_mirror = not bool(digest) + yield from fetchers - # Add URL strategies for all the mirrors with the digest - # Insert fetchers in the order that the URLs are provided. - for url in reversed(mirror_urls): - fetchers.insert( - 0, fs.from_url_scheme(url, digest, expand=expand, extension=extension) - ) + # The search function may be expensive, so wait until now to call it so the user can stop + # if a prior fetcher succeeded + if self.search_fn and not mirror_only: + yield from self.search_fn() - if self.default_fetcher.cachable: - for rel_path in reversed(list(self.mirror_paths)): - cache_fetcher = spack.caches.FETCH_CACHE.fetcher( - rel_path, digest, expand=expand, extension=extension - ) - fetchers.insert(0, cache_fetcher) - - def generate_fetchers(): - for fetcher in fetchers: - yield fetcher - # The search function may be expensive, so wait until now to - # call it so the user can stop if a prior fetcher succeeded - if self.search_fn and not mirror_only: - dynamic_fetchers = self.search_fn() - for fetcher in dynamic_fetchers: - yield fetcher + def fetch(self, mirror_only=False, err_msg=None): + """Retrieves the code or archive + Args: + mirror_only (bool): only fetch from a mirror + err_msg (str or None): the error message to display if all fetchers + fail or ``None`` for the default fetch failure message + """ errors: List[str] = [] - for fetcher in generate_fetchers(): + for fetcher in self._generate_fetchers(mirror_only): try: fetcher.stage = self self.fetcher = fetcher diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py index 1379ad92cf9661..518ade892d2b12 100644 --- a/lib/spack/spack/test/mirror.py +++ b/lib/spack/spack/test/mirror.py @@ -10,7 +10,10 @@ from llnl.util.symlink import resolve_link_target_relative_to_the_link +import spack.caches +import spack.fetch_strategy import spack.mirror +import spack.patch import spack.repo import spack.util.executable import spack.util.spack_json as sjson @@ -273,7 +276,7 @@ def test_mirror_cache_symlinks(tmpdir): cosmetic_path = "zlib/zlib-1.2.11.tar.gz" global_path = "_source-cache/archive/c3/c3e5.tar.gz" cache = spack.caches.MirrorCache(str(tmpdir), False) - reference = spack.mirror.MirrorReference(cosmetic_path, global_path) + reference = spack.mirror.DefaultLayout(cosmetic_path, global_path) cache.store(MockFetcher(), reference.storage_path) cache.symlink(reference) From 725ef8f5c8065baddbdc559c1acb793d7ec43740 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 16 Aug 2024 15:24:04 +0200 Subject: [PATCH 354/435] oci: support --only=package (#45775) Previously `spack buildcache push --only=package` errored in the OCI case, but it's been requested that OCI can be used as pure storage w/o the need for runnable container images. This commit makes it so that 1. manifests refer only to runtime dependencies that were selected to be pushed 2. failure to upload a blob among the selected specs does not prevent a manifest/tag to be created for dependents: they just don't refer to the missing blob as a layer/dependency This fixes the following issues: 1. dependents of non-redistributable specs can now be pushed to oci build caches without error 2. failure to upload one tarball does not cause cascading failures for dependents whose tarballs do upload succesfully -- so it's better best-effort behavior 3. for some people uploading with deps caused a massive amount of fetches of their manifests (which certain registries count as a download of an image, even though their layers are not fetched) -- being able to specify --only=package reduces the number of fetches. --- lib/spack/spack/binary_distribution.py | 12 +--- lib/spack/spack/cmd/buildcache.py | 2 - lib/spack/spack/test/oci/integration_test.py | 73 +++++++++++++------- 3 files changed, 51 insertions(+), 36 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index adcc5f9b5cc9a5..182b45e33e8237 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -1431,12 +1431,9 @@ def _oci_put_manifest( for s in expected_blobs: # If a layer for a dependency has gone missing (due to removed manifest in the registry, a # failed push, or a local forced uninstall), we cannot create a runnable container image. - # If an OCI registry is only used for storage, this is not a hard error, but for now we - # raise an exception unconditionally, until someone requests a more lenient behavior. checksum = checksums.get(s.dag_hash()) - if not checksum: - raise MissingLayerError(f"missing layer for {_format_spec(s)}") - config["rootfs"]["diff_ids"].append(str(checksum.uncompressed_digest)) + if checksum: + config["rootfs"]["diff_ids"].append(str(checksum.uncompressed_digest)) # Set the environment variables config["config"]["Env"] = [f"{k}={v}" for k, v in env.items()] @@ -1481,6 +1478,7 @@ def _oci_put_manifest( "size": checksums[s.dag_hash()].size, } for s in expected_blobs + if s.dag_hash() in checksums ), ], } @@ -3096,7 +3094,3 @@ class CannotListKeys(GenerateIndexError): class PushToBuildCacheError(spack.error.SpackError): """Raised when unable to push objects to binary mirror""" - - -class MissingLayerError(spack.error.SpackError): - """Raised when a required layer for a dependency is missing in an OCI registry.""" diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 2da4a561f013c6..d08c0fa78359db 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -410,8 +410,6 @@ def push_fn(args): # For OCI images, we require dependencies to be pushed for now. if target_image: - if "dependencies" not in args.things_to_install: - tty.die("Dependencies must be pushed for OCI images.") if not unsigned: tty.warn( "Code signing is currently not supported for OCI images. " diff --git a/lib/spack/spack/test/oci/integration_test.py b/lib/spack/spack/test/oci/integration_test.py index fdb149c9f31ecb..10ec12e406ed1c 100644 --- a/lib/spack/spack/test/oci/integration_test.py +++ b/lib/spack/spack/test/oci/integration_test.py @@ -11,6 +11,7 @@ import os import pathlib import re +import urllib.error from contextlib import contextmanager import pytest @@ -293,7 +294,10 @@ def test_uploading_with_base_image_in_docker_image_manifest_v2_format( def test_best_effort_upload(mutable_database: spack.database.Database, monkeypatch): - """Failure to upload a blob or manifest should not prevent others from being uploaded""" + """Failure to upload a blob or manifest should not prevent others from being uploaded -- it + should be a best-effort operation. If any runtime dep fails to upload, it results in a missing + layer for dependents. But we do still create manifests for dependents, so that the build cache + is maximally useful. (The downside is that container images are not runnable).""" _push_blob = spack.binary_distribution._oci_push_pkg_blob _push_manifest = spack.binary_distribution._oci_put_manifest @@ -315,32 +319,51 @@ def put_manifest(base_images, checksums, image_ref, tmpdir, extra_config, annota monkeypatch.setattr(spack.binary_distribution, "_oci_push_pkg_blob", push_blob) monkeypatch.setattr(spack.binary_distribution, "_oci_put_manifest", put_manifest) + mirror("add", "oci-test", "oci://example.com/image") registry = InMemoryOCIRegistry("example.com") - with oci_servers(registry): - mirror("add", "oci-test", "oci://example.com/image") + image = ImageReference.from_string("example.com/image") - with pytest.raises(spack.error.SpackError, match="The following 4 errors occurred") as e: + with oci_servers(registry): + with pytest.raises(spack.error.SpackError, match="The following 2 errors occurred") as e: buildcache("push", "--update-index", "oci-test", "mpileaks^mpich") - error = str(e.value) - - # mpich's blob failed to upload - assert re.search("mpich.+: Exception: Blob Server Error", error) - - # libdwarf's manifest failed to upload - assert re.search("libdwarf.+: Exception: Manifest Server Error", error) - - # since there is no blob for mpich, runtime dependents cannot refer to it in their - # manifests, which is a transitive error. - assert re.search("callpath.+: MissingLayerError: missing layer for mpich", error) - assert re.search("mpileaks.+: MissingLayerError: missing layer for mpich", error) - - mpileaks: spack.spec.Spec = mutable_database.query_local("mpileaks^mpich")[0] - - # ensure that packages not affected by errors were uploaded still. - uploaded_tags = {tag for _, tag in registry.manifests.keys()} - failures = {"mpich", "libdwarf", "callpath", "mpileaks"} - expected_tags = {default_tag(s) for s in mpileaks.traverse() if s.name not in failures} + # mpich's blob failed to upload and libdwarf's manifest failed to upload + assert re.search("mpich.+: Exception: Blob Server Error", e.value) + assert re.search("libdwarf.+: Exception: Manifest Server Error", e.value) + + mpileaks: spack.spec.Spec = mutable_database.query_local("mpileaks^mpich")[0] + + without_manifest = ("mpich", "libdwarf") + + # Verify that manifests of mpich/libdwarf are missing due to upload failure. + for name in without_manifest: + tagged_img = image.with_tag(default_tag(mpileaks[name])) + with pytest.raises(urllib.error.HTTPError, match="404"): + get_manifest_and_config(tagged_img) + + # Collect the layer digests of successfully uploaded packages. Every package should refer + # to its own tarballs and those of its runtime deps that were uploaded. + pkg_to_all_digests = {} + pkg_to_own_digest = {} + for s in mpileaks.traverse(): + if s.name in without_manifest: + continue + # This should not raise a 404. + manifest, _ = get_manifest_and_config(image.with_tag(default_tag(s))) + + # Collect layer digests + pkg_to_all_digests[s.name] = {layer["digest"] for layer in manifest["layers"]} + pkg_to_own_digest[s.name] = manifest["layers"][-1]["digest"] + + # Verify that all packages reference blobs of their runtime deps that uploaded fine. + for s in mpileaks.traverse(): + if s.name in without_manifest: + continue + expected_digests = { + pkg_to_own_digest[t.name] + for t in s.traverse(deptype=("link", "run"), root=True) + if t.name not in without_manifest + } - assert expected_tags - assert uploaded_tags == expected_tags + # Test with issubset, cause we don't have the blob of libdwarf as it has no manifest. + assert expected_digests and expected_digests.issubset(pkg_to_all_digests[s.name]) From 54b57c5d1e122124f516dc10658a36ba380c3fc6 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 16 Aug 2024 17:32:48 +0200 Subject: [PATCH 355/435] Revert "Change environment modifications to escape with double quotes (#36789)" (#42780) This reverts commit 690394fabc29908bbc4188ec29fd187fbb3ba13b, as it causes arbitrary code execution. --- lib/spack/spack/test/util/environment.py | 29 ++++++++------------- lib/spack/spack/util/environment.py | 32 +++++------------------- 2 files changed, 16 insertions(+), 45 deletions(-) diff --git a/lib/spack/spack/test/util/environment.py b/lib/spack/spack/test/util/environment.py index ef7c151fee1a0c..adf82aa83f4e52 100644 --- a/lib/spack/spack/test/util/environment.py +++ b/lib/spack/spack/test/util/environment.py @@ -160,22 +160,13 @@ def test_reverse_environment_modifications(working_env): assert os.environ == start_env -def test_escape_double_quotes_in_shell_modifications(): - to_validate = envutil.EnvironmentModifications() - - to_validate.set("VAR", "$PATH") - to_validate.append_path("VAR", "$ANOTHER_PATH") - - to_validate.set("QUOTED_VAR", '"MY_VAL"') - - if sys.platform == "win32": - cmds = to_validate.shell_modifications(shell="bat") - assert r'set "VAR=$PATH;$ANOTHER_PATH"' in cmds - assert r'set "QUOTED_VAR="MY_VAL"' in cmds - cmds = to_validate.shell_modifications(shell="pwsh") - assert "$Env:VAR='$PATH;$ANOTHER_PATH'" in cmds - assert "$Env:QUOTED_VAR='\"MY_VAL\"'" in cmds - else: - cmds = to_validate.shell_modifications() - assert 'export VAR="$PATH:$ANOTHER_PATH"' in cmds - assert r'export QUOTED_VAR="\"MY_VAL\""' in cmds +def test_shell_modifications_are_properly_escaped(): + """Test that variable values are properly escaped so that they can safely be eval'd.""" + changes = envutil.EnvironmentModifications() + changes.set("VAR", "$PATH") + changes.append_path("VAR", "$ANOTHER_PATH") + changes.set("RM_RF", "$(rm -rf /)") + + script = changes.shell_modifications(shell="sh") + assert f"export VAR='$PATH{os.pathsep}$ANOTHER_PATH'" in script + assert "export RM_RF='$(rm -rf /)'" in script diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 0c5ac769c03f03..12b2bbb1d0b1e1 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -11,6 +11,7 @@ import os.path import pickle import re +import shlex import sys from functools import wraps from typing import Any, Callable, Dict, List, MutableMapping, Optional, Tuple, Union @@ -63,26 +64,6 @@ ModificationList = List[Union["NameModifier", "NameValueModifier"]] -_find_unsafe = re.compile(r"[^\w@%+=:,./-]", re.ASCII).search - - -def double_quote_escape(s): - """Return a shell-escaped version of the string *s*. - - This is similar to how shlex.quote works, but it escapes with double quotes - instead of single quotes, to allow environment variable expansion within - quoted strings. - """ - if not s: - return '""' - if _find_unsafe(s) is None: - return s - - # use double quotes, and escape double quotes in the string - # the string $"b is then quoted as "$\"b" - return '"' + s.replace('"', r"\"") + '"' - - def system_env_normalize(func): """Decorator wrapping calls to system env modifications, converting all env variable names to all upper case on Windows, no-op @@ -182,7 +163,7 @@ def _nix_env_var_to_source_line(var: str, val: str) -> str: fname=BASH_FUNCTION_FINDER.sub(r"\1", var), decl=val ) else: - source_line = f"{var}={double_quote_escape(val)}; export {var}" + source_line = f"{var}={shlex.quote(val)}; export {var}" return source_line @@ -691,11 +672,10 @@ def shell_modifications( if new is None: cmds += _SHELL_UNSET_STRINGS[shell].format(name) else: - if sys.platform != "win32": - new_env_name = double_quote_escape(new_env[name]) - else: - new_env_name = new_env[name] - cmd = _SHELL_SET_STRINGS[shell].format(name, new_env_name) + value = new_env[name] + if shell not in ("bat", "pwsh"): + value = shlex.quote(value) + cmd = _SHELL_SET_STRINGS[shell].format(name, value) cmds += cmd return cmds From f5e934f2dcde3e6ddc861191bb4058e84462e2ac Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 16 Aug 2024 10:35:04 -0500 Subject: [PATCH 356/435] *: avoid js redirect for homepages on sourceforge (#45783) --- var/spack/repos/builtin/packages/7zip/package.py | 2 +- var/spack/repos/builtin/packages/iperf2/package.py | 2 +- var/spack/repos/builtin/packages/kaks-calculator/package.py | 2 +- var/spack/repos/builtin/packages/lesstif/package.py | 2 +- var/spack/repos/builtin/packages/libcerf/package.py | 2 +- var/spack/repos/builtin/packages/libexif/package.py | 2 +- var/spack/repos/builtin/packages/poamsa/package.py | 2 +- var/spack/repos/builtin/packages/procps-ng/package.py | 2 +- var/spack/repos/builtin/packages/pwgen/package.py | 2 +- var/spack/repos/builtin/packages/py-pyke/package.py | 2 +- var/spack/repos/builtin/packages/quota/package.py | 2 +- var/spack/repos/builtin/packages/sblim-sfcc/package.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/7zip/package.py b/var/spack/repos/builtin/packages/7zip/package.py index 089e8f54e6ce22..9ffc2a2d7d6953 100644 --- a/var/spack/repos/builtin/packages/7zip/package.py +++ b/var/spack/repos/builtin/packages/7zip/package.py @@ -15,7 +15,7 @@ class _7zip(SourceforgePackage, Package): """7-Zip is a file archiver for Windows""" - homepage = "https://sourceforge.net/projects/sevenzip" + homepage = "https://sourceforge.net/projects/sevenzip/" sourceforge_mirror_path = "sevenzip/files/7z2107-src.tar.xz" tags = ["windows"] diff --git a/var/spack/repos/builtin/packages/iperf2/package.py b/var/spack/repos/builtin/packages/iperf2/package.py index 6d7379ee50a7f2..15896021a464b1 100644 --- a/var/spack/repos/builtin/packages/iperf2/package.py +++ b/var/spack/repos/builtin/packages/iperf2/package.py @@ -11,7 +11,7 @@ class Iperf2(AutotoolsPackage, SourceforgePackage): 2.0.5 code base. Iperf 2.0.5 is still widely deployed and used by many for testing networks and for qualifying networking products.""" - homepage = "https://sourceforge.net/projects/iperf2" + homepage = "https://sourceforge.net/projects/iperf2/" sourceforge_mirror_path = "iperf2/iperf-2.0.12.tar.gz" version("2.1.9", sha256="5c0771aab00ef14520013aef01675977816e23bb8f5d9fde016f90eb2f1be788") diff --git a/var/spack/repos/builtin/packages/kaks-calculator/package.py b/var/spack/repos/builtin/packages/kaks-calculator/package.py index 520a388a2b7189..ceb29bc7a078bf 100644 --- a/var/spack/repos/builtin/packages/kaks-calculator/package.py +++ b/var/spack/repos/builtin/packages/kaks-calculator/package.py @@ -12,7 +12,7 @@ class KaksCalculator(MakefilePackage, SourceforgePackage): include as many features as needed for accurately capturing evolutionary information in protein-coding sequences.""" - homepage = "https://sourceforge.net/projects/kakscalculator2" + homepage = "https://sourceforge.net/projects/kakscalculator2/" sourceforge_mirror_path = "kakscalculator2/KaKs_Calculator2.0.tar.gz" version("2.0", sha256="e2df719a2fecc549d8ddc4e6d8f5cfa4b248282dca319c1928eaf886d68ec3c5") diff --git a/var/spack/repos/builtin/packages/lesstif/package.py b/var/spack/repos/builtin/packages/lesstif/package.py index 214cfe2336e2ce..ddeb248a41e134 100644 --- a/var/spack/repos/builtin/packages/lesstif/package.py +++ b/var/spack/repos/builtin/packages/lesstif/package.py @@ -9,7 +9,7 @@ class Lesstif(AutotoolsPackage): """LessTif is the Hungry Programmers' version of OSF/Motif.""" - homepage = "https://sourceforge.net/projects/lesstif" + homepage = "https://sourceforge.net/projects/lesstif/" url = "https://sourceforge.net/projects/lesstif/files/lesstif/0.95.2/lesstif-0.95.2.tar.bz2/download" license("LGPL-2.0-only") diff --git a/var/spack/repos/builtin/packages/libcerf/package.py b/var/spack/repos/builtin/packages/libcerf/package.py index f4bac7710014b7..a00b140f9e9aaa 100644 --- a/var/spack/repos/builtin/packages/libcerf/package.py +++ b/var/spack/repos/builtin/packages/libcerf/package.py @@ -14,7 +14,7 @@ class Libcerf(AutotoolsPackage, SourceforgePackage): """ - homepage = "https://sourceforge.net/projects/libcerf" + homepage = "https://sourceforge.net/projects/libcerf/" sourceforge_mirror_path = "libcerf/libcerf-1.3.tgz" version("1.3", sha256="d7059e923d3f370c89fb4d19ed4f827d381bc3f0e36da5595a04aeaaf3e6a859") diff --git a/var/spack/repos/builtin/packages/libexif/package.py b/var/spack/repos/builtin/packages/libexif/package.py index 553b406e2ac522..1ca6eb2ca5bfbb 100644 --- a/var/spack/repos/builtin/packages/libexif/package.py +++ b/var/spack/repos/builtin/packages/libexif/package.py @@ -8,7 +8,7 @@ class Libexif(AutotoolsPackage, SourceforgePackage): """A library to parse an EXIF file and read the data from those tags""" - homepage = "https://sourceforge.net/projects/libexif" + homepage = "https://sourceforge.net/projects/libexif/" sourceforge_mirror_path = "libexif/libexif-0.6.21.tar.bz2" maintainers("TheQueasle") diff --git a/var/spack/repos/builtin/packages/poamsa/package.py b/var/spack/repos/builtin/packages/poamsa/package.py index 244eece6331626..cf9deefd35ecf7 100644 --- a/var/spack/repos/builtin/packages/poamsa/package.py +++ b/var/spack/repos/builtin/packages/poamsa/package.py @@ -12,7 +12,7 @@ class Poamsa(MakefilePackage): sensitivity, and the superior ability to handle branching / indels in the alignment.""" - homepage = "https://sourceforge.net/projects/poamsa" + homepage = "https://sourceforge.net/projects/poamsa/" url = "https://downloads.sourceforge.net/project/poamsa/poamsa/2.0/poaV2.tar.gz" version("2.0", sha256="d98d8251af558f442d909a6527694825ef6f79881b7636cad4925792559092c2") diff --git a/var/spack/repos/builtin/packages/procps-ng/package.py b/var/spack/repos/builtin/packages/procps-ng/package.py index e66eb53b17b429..25624f8ea307d2 100644 --- a/var/spack/repos/builtin/packages/procps-ng/package.py +++ b/var/spack/repos/builtin/packages/procps-ng/package.py @@ -9,7 +9,7 @@ class ProcpsNg(AutotoolsPackage): """Utilities that provide system information.""" - homepage = "https://sourceforge.net/projects/procps-ng" + homepage = "https://sourceforge.net/projects/procps-ng/" url = "https://udomain.dl.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.16.tar.xz" license("GPL-2.0-or-later AND LGPL-2.1-or-later", checked_by="tgamblin") diff --git a/var/spack/repos/builtin/packages/pwgen/package.py b/var/spack/repos/builtin/packages/pwgen/package.py index fd402bba2f2899..6c36e5119a8f4b 100644 --- a/var/spack/repos/builtin/packages/pwgen/package.py +++ b/var/spack/repos/builtin/packages/pwgen/package.py @@ -10,7 +10,7 @@ class Pwgen(AutotoolsPackage): """Pwgen is a small, GPL'ed password generator which creates passwords which can be easily memorized by a human.""" - homepage = "https://sourceforge.net/projects/pwgen" + homepage = "https://sourceforge.net/projects/pwgen/" url = "https://downloads.sourceforge.net/project/pwgen/pwgen/2.08/pwgen-2.08.tar.gz" maintainers("cessenat") diff --git a/var/spack/repos/builtin/packages/py-pyke/package.py b/var/spack/repos/builtin/packages/py-pyke/package.py index 1368dd718573c6..865c03ce9b77be 100644 --- a/var/spack/repos/builtin/packages/py-pyke/package.py +++ b/var/spack/repos/builtin/packages/py-pyke/package.py @@ -12,7 +12,7 @@ class PyPyke(PythonPackage): engine (expert system) written in 100% Python. """ - homepage = "https://sourceforge.net/projects/pyke" + homepage = "https://sourceforge.net/projects/pyke/" url = "https://sourceforge.net/projects/pyke/files/pyke/1.1.1/pyke-1.1.1.zip" license("MIT") diff --git a/var/spack/repos/builtin/packages/quota/package.py b/var/spack/repos/builtin/packages/quota/package.py index 0235a9e4fae586..0b41bbfbea6695 100644 --- a/var/spack/repos/builtin/packages/quota/package.py +++ b/var/spack/repos/builtin/packages/quota/package.py @@ -9,7 +9,7 @@ class Quota(AutotoolsPackage): """Linux Diskquota system as part of the Linux kernel.""" - homepage = "https://sourceforge.net/projects/linuxquota" + homepage = "https://sourceforge.net/projects/linuxquota/" url = ( "https://udomain.dl.sourceforge.net/project/linuxquota/quota-tools/4.05/quota-4.05.tar.gz" ) diff --git a/var/spack/repos/builtin/packages/sblim-sfcc/package.py b/var/spack/repos/builtin/packages/sblim-sfcc/package.py index a3c7cfd052c4ac..400a98409b88f5 100644 --- a/var/spack/repos/builtin/packages/sblim-sfcc/package.py +++ b/var/spack/repos/builtin/packages/sblim-sfcc/package.py @@ -9,7 +9,7 @@ class SblimSfcc(AutotoolsPackage): """Small Footprint CIM Client Library""" - homepage = "https://sourceforge.net/projects/sblim" + homepage = "https://sourceforge.net/projects/sblim/" url = "https://github.com/kkaempf/sblim-sfcc/archive/SFCC_2_2_1.tar.gz" license("EPL-1.0") From a7e8080784138ba00d6b066b17066f51f6d0a6b5 Mon Sep 17 00:00:00 2001 From: bk <8865247+bicquet@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:59:27 -0500 Subject: [PATCH 357/435] harfbuzz: enable freetype in MesonBuilder (#45654) * harfbuzz: enable freetype in MesonBuilder to facilitate depends_on("freetype") * spack style fix * freetype is defined as a depends_on(), so set as enabled in MesonBuilder rather than an option/flag/variant * add back depends_on($lang) lines for new test api * keep original order --- var/spack/repos/builtin/packages/harfbuzz/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py index d5d2a068365b0f..ca7db7be1f9a2c 100644 --- a/var/spack/repos/builtin/packages/harfbuzz/package.py +++ b/var/spack/repos/builtin/packages/harfbuzz/package.py @@ -11,7 +11,7 @@ class Harfbuzz(MesonPackage, AutotoolsPackage): """The Harfbuzz package contains an OpenType text shaping engine.""" homepage = "https://github.com/harfbuzz/harfbuzz" - url = "https://github.com/harfbuzz/harfbuzz/releases/download/2.9.1/harfbuzz-2.9.1.tar.xz" + url = "https://github.com/harfbuzz/harfbuzz/releases/download/9.0.0/harfbuzz-9.0.0.tar.xz" git = "https://github.com/harfbuzz/harfbuzz.git" build_system( @@ -23,6 +23,7 @@ class Harfbuzz(MesonPackage, AutotoolsPackage): version("9.0.0", sha256="a41b272ceeb920c57263ec851604542d9ec85ee3030506d94662067c7b6ab89e") version("8.5.0", sha256="77e4f7f98f3d86bf8788b53e6832fb96279956e1c3961988ea3d4b7ca41ddc27") version("8.4.0", sha256="af4ea73e25ab748c8c063b78c2f88e48833db9b2ac369e29bd115702e789755e") + version("8.3.1", sha256="f73e1eacd7e2ffae687bc3f056bb0c705b7a05aee86337686e09da8fc1c2030c") version("8.3.0", sha256="109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847") version("7.3.0", sha256="20770789749ac9ba846df33983dbda22db836c70d9f5d050cb9aa5347094a8fb") version("7.2.0", sha256="fc5560c807eae0efd5f95b5aa4c65800c7a8eed6642008a6b1e7e3ffff7873cc") @@ -139,6 +140,7 @@ def meson_args(self): return [ # disable building of gtk-doc files following #9885 and #9771 "-Ddocs=disabled", + "-Dfreetype=enabled", f"-Dgraphite2={graphite2}", f"-Dcoretext={coretext}", ] From e5f53a62509452227bc84cdd2b96bb8d89d684b2 Mon Sep 17 00:00:00 2001 From: "Paul R. C. Kent" Date: Fri, 16 Aug 2024 12:04:29 -0400 Subject: [PATCH 358/435] py-lxml: add v5.2.2 (#45785) * add v5.2.2 * py-lxml dependency improvements Co-authored-by: Wouter Deconinck --------- Co-authored-by: Wouter Deconinck --- var/spack/repos/builtin/packages/py-lxml/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-lxml/package.py b/var/spack/repos/builtin/packages/py-lxml/package.py index dacbaeed4793f5..50f136cbe5bbc9 100644 --- a/var/spack/repos/builtin/packages/py-lxml/package.py +++ b/var/spack/repos/builtin/packages/py-lxml/package.py @@ -16,6 +16,7 @@ class PyLxml(PythonPackage): license("BSD-3-Clause") + version("5.2.2", sha256="bb2dc4898180bea79863d5487e5f9c7c34297414bad54bcd0f0852aee9cfdb87") version("4.9.2", sha256="2455cfaeb7ac70338b3257f41e21f0724f4b5b0c0e7702da67ee6c3640835b67") version("4.9.1", sha256="fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f") version("4.9.0", sha256="520461c36727268a989790aef08884347cd41f2d8ae855489ccf40b50321d8d7") @@ -44,3 +45,7 @@ class PyLxml(PythonPackage): depends_on("py-html5lib", when="+html5", type=("build", "run")) depends_on("py-beautifulsoup4", when="+htmlsoup", type=("build", "run")) depends_on("py-cssselect@0.7:", when="+cssselect", type=("build", "run")) + depends_on("py-cython@3.0.10:", type="build", when="@5.2:") + depends_on("py-cython@3.0.9:", type="build", when="@5.1.1:") + depends_on("py-cython@3.0.8:", type="build", when="@5:") + depends_on("py-cython@0.29.7:", type="build") From fe3bfa482e630a336787cbf4df62ea848b4ac374 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 16 Aug 2024 18:11:08 +0200 Subject: [PATCH 359/435] Run unit test in parallel again in CI (#45793) The --trace-config option was failing for linux unit-tests, so we were running serial. --- share/spack/qa/run-unit-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests index 3c889bc8881d31..ca9b0752f1bb68 100755 --- a/share/spack/qa/run-unit-tests +++ b/share/spack/qa/run-unit-tests @@ -47,7 +47,7 @@ $coverage_run $(which spack) python -c "import spack.pkg.builtin.mpileaks; repr( # Run unit tests with code coverage #----------------------------------------------------------- # Check if xdist is available -if python -m pytest --trace-config 2>&1 | grep xdist; then +if python -m pytest -VV 2>&1 | grep xdist; then export PYTEST_ADDOPTS="$PYTEST_ADDOPTS --dist loadfile --tx '${SPACK_TEST_PARALLEL:=3}*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python'" fi From 61b0f4f84dda320fd93d287f50e773b2037e9ca3 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Fri, 16 Aug 2024 09:57:46 -0700 Subject: [PATCH 360/435] e4s ci: add wrf (#45719) * e4s ci: add wrf * e4s ci: also add wrf companion/adjacent package wps * e4s oneapi: comment out wps: %oneapi not supported? --- .../gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index 38593deab47109..7e9b7ae11b2a94 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -157,6 +157,8 @@ spack: - umpire - upcxx - wannier90 + - wps + - wrf - xyce +mpi +shared +pymi +pymi_static_tpls # INCLUDED IN ECP DAV CPU - adios2 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 105afcf3550801..8f164ac7f11bf4 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -171,6 +171,7 @@ spack: - upcxx - variorum - wannier90 + - wrf - xyce +mpi +shared +pymi +pymi_static_tpls # INCLUDED IN ECP DAV CPU - adios2 @@ -197,6 +198,7 @@ spack: # - lbann # 2024.2 internal compiler error # - plasma # 2024.2 internal compiler error # - quantum-espresso # quantum-espresso: external/mbd/src/mbd_c_api.F90(392): error #6645: The name of the module procedure conflicts with a name in the encompassing scoping unit. [F_C_STRING] + # - wps # wps: InstallError: Compiler not recognized nor supported. # PYTHON PACKAGES - opencv +python3 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 24b28513271a24..ea6682d20490b5 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -160,6 +160,8 @@ spack: - umpire - upcxx - wannier90 + - wps + - wrf - xyce +mpi +shared +pymi +pymi_static_tpls # INCLUDED IN ECP DAV CPU - adios2 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index c628dd509a946e..712b9872d0190c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -171,6 +171,8 @@ spack: - upcxx - variorum - wannier90 + - wps + - wrf - xyce +mpi +shared +pymi +pymi_static_tpls # INCLUDED IN ECP DAV CPU - adios2 From cc7a29c55a9fcd9fb15aa6ec37e045c03e6e77d9 Mon Sep 17 00:00:00 2001 From: James Smillie <83249606+jamessmillie@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:16:13 -0600 Subject: [PATCH 361/435] Windows: fix stage cleaning for long paths (#45786) Paths over 260 characters in length are not handled by `shutil.rmtree` unless they use the extended-length path syntax (using a prefix of "\\?\"). This fixes an issue where stage cleaning fails when paths in a stage exceed the normal 260-character limit. This indicates that other parts of the codebase should be examined/ refactored to handle long paths. --- lib/spack/llnl/util/filesystem.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 6b2ba50c0ec206..308c6154e1a789 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -1624,6 +1624,12 @@ def remove_linked_tree(path): shutil.rmtree(os.path.realpath(path), **kwargs) os.unlink(path) else: + if sys.platform == "win32": + # Adding this prefix allows shutil to remove long paths on windows + # https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry + long_path_pfx = "\\\\?\\" + if not path.startswith(long_path_pfx): + path = long_path_pfx + path shutil.rmtree(path, **kwargs) From 00182b19dc2ddeb3b23d98d6862a2208455cf126 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 16 Aug 2024 22:26:35 +0200 Subject: [PATCH 362/435] GDAL: add v3.9.2 (#45794) --- var/spack/repos/builtin/packages/gdal/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index 38ca6555569725..386ea879544964 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -32,6 +32,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): license("MIT") + version("3.9.2", sha256="bfbcc9f087f012c36151c20c79f8eac9529e1e5298fbded79cd5a1365f0b113a") version("3.9.1", sha256="aff3086fee75f5773e33a5598df98d8a4d10be411f777d3ce23584b21d8171ca") version("3.9.0", sha256="577f80e9d14ff7c90b6bfbc34201652b4546700c01543efb4f4c3050e0b3fda2") version("3.8.5", sha256="e8b4df2a8a7d25272f867455c0c230459545972f81f0eff2ddbf6a6f60dcb1e4") From 9ec8eaa0d3ff172738de46efc3edccb82c372e3f Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 16 Aug 2024 13:40:41 -0700 Subject: [PATCH 363/435] include_concrete: read from older env formats properly (#45766) * include_concrete: read from older env formats properly * spack env rm: fix logic for checking env includes * regression test Signed-off-by: Todd Gamblin --- lib/spack/spack/cmd/env.py | 24 +++++------ lib/spack/spack/environment/environment.py | 47 ++++++++++------------ lib/spack/spack/test/cmd/env.py | 11 +++++ 3 files changed, 43 insertions(+), 39 deletions(-) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index 2ccb88fd1af9a4..b943f3d3bd3b81 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -468,32 +468,30 @@ def env_remove(args): This removes an environment managed by Spack. Directory environments and manifests embedded in repositories should be removed manually. """ - read_envs = [] + remove_envs = [] valid_envs = [] bad_envs = [] - invalid_envs = [] for env_name in ev.all_environment_names(): try: env = ev.read(env_name) - valid_envs.append(env_name) + valid_envs.append(env) if env_name in args.rm_env: - read_envs.append(env) + remove_envs.append(env) except (spack.config.ConfigFormatError, ev.SpackEnvironmentConfigError): - invalid_envs.append(env_name) - if env_name in args.rm_env: bad_envs.append(env_name) - # Check if env is linked to another before trying to remove - for name in valid_envs: + # Check if remove_env is included from another env before trying to remove + for env in valid_envs: + for remove_env in remove_envs: # don't check if environment is included to itself - if name == env_name: + if env.name == remove_env.name: continue - environ = ev.Environment(ev.root(name)) - if ev.root(env_name) in environ.included_concrete_envs: - msg = f'Environment "{env_name}" is being used by environment "{name}"' + + if remove_env.path in env.included_concrete_envs: + msg = f'Environment "{remove_env.name}" is being used by environment "{env.name}"' if args.force: tty.warn(msg) else: @@ -506,7 +504,7 @@ def env_remove(args): if not answer: tty.die("Will not remove any environments") - for env in read_envs: + for env in remove_envs: name = env.name if env.active: tty.die(f"Environment {name} can't be removed while activated.") diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index ef51cb38d60435..4114a1cdb95a76 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1214,7 +1214,6 @@ def scope_name(self): def include_concrete_envs(self): """Copy and save the included envs' specs internally""" - lockfile_meta = None root_hash_seen = set() concrete_hash_seen = set() self.included_concrete_spec_data = {} @@ -1225,37 +1224,26 @@ def include_concrete_envs(self): raise SpackEnvironmentError(f"Unable to find env at {env_path}") env = Environment(env_path) - - with open(env.lock_path) as f: - lockfile_as_dict = env._read_lockfile(f) - - # Lockfile_meta must match each env and use at least format version 5 - if lockfile_meta is None: - lockfile_meta = lockfile_as_dict["_meta"] - elif lockfile_meta != lockfile_as_dict["_meta"]: - raise SpackEnvironmentError("All lockfile _meta values must match") - elif lockfile_meta["lockfile-version"] < 5: - raise SpackEnvironmentError("The lockfile format must be at version 5 or higher") + self.included_concrete_spec_data[env_path] = {"roots": [], "concrete_specs": {}} # Copy unique root specs from env - self.included_concrete_spec_data[env_path] = {"roots": []} - for root_dict in lockfile_as_dict["roots"]: + for root_dict in env._concrete_roots_dict(): if root_dict["hash"] not in root_hash_seen: self.included_concrete_spec_data[env_path]["roots"].append(root_dict) root_hash_seen.add(root_dict["hash"]) # Copy unique concrete specs from env - for concrete_spec in lockfile_as_dict["concrete_specs"]: - if concrete_spec not in concrete_hash_seen: - self.included_concrete_spec_data[env_path].update( - {"concrete_specs": lockfile_as_dict["concrete_specs"]} + for dag_hash, spec_details in env._concrete_specs_dict().items(): + if dag_hash not in concrete_hash_seen: + self.included_concrete_spec_data[env_path]["concrete_specs"].update( + {dag_hash: spec_details} ) - concrete_hash_seen.add(concrete_spec) + concrete_hash_seen.add(dag_hash) - if "include_concrete" in lockfile_as_dict.keys(): - self.included_concrete_spec_data[env_path]["include_concrete"] = lockfile_as_dict[ - "include_concrete" - ] + # Copy transitive include data + transitive = env.included_concrete_spec_data + if transitive: + self.included_concrete_spec_data[env_path]["include_concrete"] = transitive self._read_lockfile_dict(self._to_lockfile_dict()) self.write() @@ -2173,16 +2161,23 @@ def _get_environment_specs(self, recurse_dependencies=True): return specs - def _to_lockfile_dict(self): - """Create a dictionary to store a lockfile for this environment.""" + def _concrete_specs_dict(self): concrete_specs = {} for s in traverse.traverse_nodes(self.specs_by_hash.values(), key=traverse.by_dag_hash): spec_dict = s.node_dict_with_hashes(hash=ht.dag_hash) # Assumes no legacy formats, since this was just created. spec_dict[ht.dag_hash.name] = s.dag_hash() concrete_specs[s.dag_hash()] = spec_dict + return concrete_specs + def _concrete_roots_dict(self): hash_spec_list = zip(self.concretized_order, self.concretized_user_specs) + return [{"hash": h, "spec": str(s)} for h, s in hash_spec_list] + + def _to_lockfile_dict(self): + """Create a dictionary to store a lockfile for this environment.""" + concrete_specs = self._concrete_specs_dict() + root_specs = self._concrete_roots_dict() spack_dict = {"version": spack.spack_version} spack_commit = spack.main.get_spack_commit() @@ -2203,7 +2198,7 @@ def _to_lockfile_dict(self): # spack version information "spack": spack_dict, # users specs + hashes are the 'roots' of the environment - "roots": [{"hash": h, "spec": str(s)} for h, s in hash_spec_list], + "roots": root_specs, # Concrete specs by hash, including dependencies "concrete_specs": concrete_specs, } diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 77fa41d54fb677..9c32ab7610eb01 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -1734,6 +1734,17 @@ def test_env_include_concrete_env_yaml(env_name): assert test.path in combined_yaml["include_concrete"] +@pytest.mark.regression("45766") +@pytest.mark.parametrize("format", ["v1", "v2", "v3"]) +def test_env_include_concrete_old_env(format, tmpdir): + lockfile = os.path.join(spack.paths.test_path, "data", "legacy_env", f"{format}.lock") + # create an env from old .lock file -- this does not update the format + env("create", "old-env", lockfile) + env("create", "--include-concrete", "old-env", "test") + + assert ev.read("old-env").all_specs() == ev.read("test").all_specs() + + def test_env_bad_include_concrete_env(): with pytest.raises(ev.SpackEnvironmentError): env("create", "--include-concrete", "nonexistant_env", "combined_env") From f0f9a16e4fc4e5e7dcdfaa36a44ec0ab66779532 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Fri, 16 Aug 2024 16:02:50 -0600 Subject: [PATCH 364/435] esmf package: add (optional) Python bindings (#45504) * Add `+python` variant * `esmf` package installs Python bindings when `+python` is set Note: this does not inherit `PythonPackage`, which force an either/or choice between the Makefile and Pip builder: it instantiates a `PythonPipBuilder` as needed (when `+python` is set). --- .../repos/builtin/packages/esmf/package.py | 82 +++++++++++++++---- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py index 42ef7a52b2ca62..bc82047fc12967 100644 --- a/var/spack/repos/builtin/packages/esmf/package.py +++ b/var/spack/repos/builtin/packages/esmf/package.py @@ -10,7 +10,7 @@ from spack.package import * -class Esmf(MakefilePackage): +class Esmf(MakefilePackage, PythonExtension): """The Earth System Modeling Framework (ESMF) is high-performance, flexible software infrastructure for building and coupling weather, climate, and related Earth science applications. The ESMF defines an architecture for @@ -97,6 +97,10 @@ class Esmf(MakefilePackage): description="Named variant for snapshots versions (e.g., 'b09')", ) + # The way python is handled here is only avialable >=8.4.0 + # https://github.com/esmf-org/esmf/releases/tag/v8.4.0 + variant("python", default=False, description="Build python bindings", when="@8.4.0:") + # Optional dependencies depends_on("mpi", when="+mpi") depends_on("lapack@3:", when="+external-lapack") @@ -112,6 +116,20 @@ class Esmf(MakefilePackage): depends_on("parallelio@2.5.10: ~mpi", when="@8.5:+external-parallelio~mpi") depends_on("cmake@3.5.2:", type="build", when="~external-parallelio") + # python library + with when("+python"): + extends("python") + depends_on("py-pip") + depends_on("py-setuptools", type="build") + depends_on("py-wheel", type="build") + depends_on("py-mpi4py", when="+mpi") + depends_on("py-numpy") + + # In esmf@8.4.0, esmx was introduced which depends on py-pyyaml + with when("@8.4.0:"): + depends_on("python", type="run") + depends_on("py-pyyaml", type="run") + # Testing dependencies depends_on("perl", type="test") @@ -143,6 +161,29 @@ class Esmf(MakefilePackage): # https://github.com/spack/spack/issues/35957 patch("esmf_cpp_info.patch") + @when("+python") + def patch(self): + # The pyproject.toml file uses a dynamically generated version from git + # However, this results in a version of 0.0.0 and a mismatch with the loaded version + # so this hardcodes it to match the library's version + filter_file( + """dynamic = \\[\\s+"version"\\s+\\]""", + f"""version = "{self.version}" """, + os.path.join("src/addon/esmpy/pyproject.toml"), + ) + + def setup_run_environment(self, env): + env.set("ESMFMKFILE", os.path.join(self.prefix.lib, "esmf.mk")) + + +class PythonPipBuilder(spack.build_systems.python.PythonPipBuilder): + + @property + def build_directory(self): + return os.path.join(self.stage.source_path, "src/addon/esmpy") + + +class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder): # This is strictly required on Cray systems that use # the Cray compiler wrappers, where we need to swap # out the spack compiler wrappers in esmf.mk with the @@ -214,38 +255,38 @@ def setup_build_environment(self, env): # ESMF_COMPILER must be set to select which Fortran and # C++ compilers are being used to build the ESMF library. - if self.compiler.name == "gcc": + if self.pkg.compiler.name == "gcc": env.set("ESMF_COMPILER", "gfortran") - with self.compiler.compiler_environment(): + with self.pkg.compiler.compiler_environment(): gfortran_major_version = int( spack.compiler.get_compiler_version_output( - self.compiler.fc, "-dumpversion" + self.pkg.compiler.fc, "-dumpversion" ).split(".")[0] ) - elif self.compiler.name == "intel" or self.compiler.name == "oneapi": + elif self.pkg.compiler.name == "intel" or self.pkg.compiler.name == "oneapi": env.set("ESMF_COMPILER", "intel") - elif self.compiler.name in ["clang", "apple-clang"]: + elif self.pkg.compiler.name in ["clang", "apple-clang"]: env.set("ESMF_COMPILER", "gfortranclang") - with self.compiler.compiler_environment(): + with self.pkg.compiler.compiler_environment(): gfortran_major_version = int( spack.compiler.get_compiler_version_output( - self.compiler.fc, "-dumpversion" + self.pkg.compiler.fc, "-dumpversion" ).split(".")[0] ) - elif self.compiler.name == "nag": + elif self.pkg.compiler.name == "nag": env.set("ESMF_COMPILER", "nag") - elif self.compiler.name == "pgi": + elif self.pkg.compiler.name == "pgi": env.set("ESMF_COMPILER", "pgi") - elif self.compiler.name == "nvhpc": + elif self.pkg.compiler.name == "nvhpc": env.set("ESMF_COMPILER", "nvhpc") - elif self.compiler.name == "cce": + elif self.pkg.compiler.name == "cce": env.set("ESMF_COMPILER", "cce") - elif self.compiler.name == "aocc": + elif self.pkg.compiler.name == "aocc": env.set("ESMF_COMPILER", "aocc") else: msg = "The compiler you are building with, " msg += '"{0}", is not supported by ESMF.' - raise InstallError(msg.format(self.compiler.name)) + raise InstallError(msg.format(self.pkg.compiler.name)) if "+mpi" in spec: env.set("ESMF_CXX", spec["mpi"].mpicxx) @@ -265,7 +306,7 @@ def setup_build_environment(self, env): env.set("ESMF_BOPT", "O") if ( - self.compiler.name in ["gcc", "clang", "apple-clang"] + self.pkg.compiler.name in ["gcc", "clang", "apple-clang"] and gfortran_major_version >= 10 and (self.spec.satisfies("@:8.2.99") or self.spec.satisfies("@8.3.0b09")) ): @@ -277,7 +318,7 @@ def setup_build_environment(self, env): # ESMF_OS must be set for Cray systems # But spack no longer gives arch == cray - if self.compiler.name == "cce" or "^cray-mpich" in self.spec: + if self.pkg.compiler.name == "cce" or "^cray-mpich" in self.spec: env.set("ESMF_OS", "Unicos") # Allow override of ESMF_OS: @@ -430,5 +471,10 @@ def check(self): def setup_dependent_build_environment(self, env, dependent_spec): env.set("ESMFMKFILE", os.path.join(self.prefix.lib, "esmf.mk")) - def setup_run_environment(self, env): - env.set("ESMFMKFILE", os.path.join(self.prefix.lib, "esmf.mk")) + def install(self, pkg, spec, prefix): + make("install") + + if "+python" in spec: + # build the python library + python_builder = PythonPipBuilder(pkg) + python_builder.install(pkg, spec, prefix) From 553cc3b70a4c126e612145e3e48acff321cedecb Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 17 Aug 2024 02:02:03 -0500 Subject: [PATCH 365/435] util/web.py: parse new GitLab JS dropdown links (#45764) Co-authored-by: Harmen Stoppels --- .../test/data/web/index_with_javascript.html | 10 ++++++++++ lib/spack/spack/test/web.py | 6 ++++++ lib/spack/spack/util/web.py | 19 +++++++++++++++---- 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 lib/spack/spack/test/data/web/index_with_javascript.html diff --git a/lib/spack/spack/test/data/web/index_with_javascript.html b/lib/spack/spack/test/data/web/index_with_javascript.html new file mode 100644 index 00000000000000..89882ba4319c92 --- /dev/null +++ b/lib/spack/spack/test/data/web/index_with_javascript.html @@ -0,0 +1,10 @@ + + + This is the root page. + + + This is a page with a Vue javascript drop down with links as used in GitLab. + +
+ + diff --git a/lib/spack/spack/test/web.py b/lib/spack/spack/test/web.py index cf89e2e3a48196..1ae76c6e8dbf7f 100644 --- a/lib/spack/spack/test/web.py +++ b/lib/spack/spack/test/web.py @@ -37,6 +37,7 @@ def _create_url(relative_url): page_4 = _create_url("4.html") root_with_fragment = _create_url("index_with_fragment.html") +root_with_javascript = _create_url("index_with_javascript.html") @pytest.mark.parametrize( @@ -148,6 +149,11 @@ def test_find_versions_of_archive_with_fragment(): assert Version("5.0.0") in versions +def test_find_versions_of_archive_with_javascript(): + versions = spack.url.find_versions_of_archive(root_tarball, root_with_javascript, list_depth=0) + assert Version("5.0.0") in versions + + def test_get_header(): headers = {"Content-type": "text/plain"} diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index 6b27c6ae68676a..9a0f1d6e4b6ed5 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -7,6 +7,7 @@ import concurrent.futures import email.message import errno +import json import os import os.path import re @@ -152,7 +153,8 @@ class HTMLParseError(Exception): class LinkParser(HTMLParser): """This parser just takes an HTML page and strips out the hrefs on the - links. Good enough for a really simple spider.""" + links, as well as some javascript tags used on GitLab servers. + Good enough for a really simple spider.""" def __init__(self): super().__init__() @@ -160,9 +162,18 @@ def __init__(self): def handle_starttag(self, tag, attrs): if tag == "a": - for attr, val in attrs: - if attr == "href": - self.links.append(val) + self.links.extend(val for key, val in attrs if key == "href") + + # GitLab uses a javascript function to place dropdown links: + #
+ if tag == "div" and ("class", "js-source-code-dropdown") in attrs: + try: + links_str = next(val for key, val in attrs if key == "data-download-links") + links = json.loads(links_str) + self.links.extend(x["path"] for x in links) + except Exception: + pass class ExtractMetadataParser(HTMLParser): From f316068b27d69e90b6ba89b5e59b9d7c81371ccf Mon Sep 17 00:00:00 2001 From: Stephen Hudson Date: Sat, 17 Aug 2024 08:25:00 -0500 Subject: [PATCH 366/435] libEnsemble: add v1.4.2 (#45760) --- var/spack/repos/builtin/packages/py-libensemble/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-libensemble/package.py b/var/spack/repos/builtin/packages/py-libensemble/package.py index b80d1d692f4d3a..7c472b0b153d68 100644 --- a/var/spack/repos/builtin/packages/py-libensemble/package.py +++ b/var/spack/repos/builtin/packages/py-libensemble/package.py @@ -12,7 +12,7 @@ class PyLibensemble(PythonPackage): """Library for managing ensemble-like collections of computations.""" homepage = "https://libensemble.readthedocs.io" - pypi = "libensemble/libensemble-1.4.1.tar.gz" + pypi = "libensemble/libensemble-1.4.2.tar.gz" git = "https://github.com/Libensemble/libensemble.git" maintainers("shuds13", "jlnav") @@ -21,6 +21,7 @@ class PyLibensemble(PythonPackage): license("BSD-3-Clause") version("develop", branch="develop") + version("1.4.2", sha256="d283935594333793112f65cec1070137e0a87e31cd2bf1baec4a1261ac06ab63") version("1.4.1", sha256="fd39d5c4010f9cb1728af1666d0f10d0da7dd43c12e411badcbc53aab42ab183") version("1.4.0", sha256="0d9f76175dcd5ca7a5e0076a8e64ea59b504055779100d259114468630e82fa2") version("1.3.0", sha256="4a2f47de9ab57c577f3de5dd849ec1b621effde7206a54b2aa29aaf309c87532") From 52ab0c66fea2719d325ef5428d5a49d96dfa14af Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Sat, 17 Aug 2024 09:24:28 -0700 Subject: [PATCH 367/435] xorgproto: new package (#45569) * xorgproto: new package Signed-off-by: Teague Sterling * adding providers for xorgprotos Signed-off-by: Teague Sterling * Update var/spack/repos/builtin/packages/xorgproto/package.py Co-authored-by: Wouter Deconinck * Update etc/spack/defaults/packages.yaml Co-authored-by: Wouter Deconinck * Update etc/spack/defaults/packages.yaml Co-authored-by: Wouter Deconinck * Update var/spack/repos/builtin/packages/xorgproto/package.py Co-authored-by: Wouter Deconinck * Update var/spack/repos/builtin/packages/xorgproto/package.py Co-authored-by: Wouter Deconinck * Update var/spack/repos/builtin/packages/xorgproto/package.py Co-authored-by: Wouter Deconinck * Update var/spack/repos/builtin/packages/xorgproto/package.py Co-authored-by: Wouter Deconinck * [@spackbot] updating style on behalf of teaguesterling * xorgproto: depends_on meson type build --------- Signed-off-by: Teague Sterling Co-authored-by: Wouter Deconinck --- .../builtin/packages/xorgproto/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/xorgproto/package.py diff --git a/var/spack/repos/builtin/packages/xorgproto/package.py b/var/spack/repos/builtin/packages/xorgproto/package.py new file mode 100644 index 00000000000000..b27d1e2a409e2a --- /dev/null +++ b/var/spack/repos/builtin/packages/xorgproto/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.package import * + + +class Xorgproto(MesonPackage, XorgPackage): + """X Window System unified protocol definitions replacing standalone protos""" + + homepage = "https://gitlab.freedesktop.org/xorg/proto/xorgproto" + xorg_mirror_path = "proto/xorgproto-2024.1.tar.gz" + + maintainers("teaguesterling") + + license("OTHER", checked_by="teaguesterling") + + version("2024.1", sha256="4f6b9b4faf91e5df8265b71843a91fc73dc895be6210c84117a996545df296ce") + + depends_on("meson@0.56:", type="build") + depends_on("util-macros", type="build") From 66e2836ba1af5ea8b3ff079eb7ef4334f1d0cd05 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 17 Aug 2024 19:18:32 +0200 Subject: [PATCH 368/435] py-torchaudio: upperbound on cuda (#45773) * py-torchaudio: upperbound on cuda * actually get bound right * make adam happy --- var/spack/repos/builtin/packages/py-torchaudio/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py index cf4894cbfd7716..52370110d7bbd7 100644 --- a/var/spack/repos/builtin/packages/py-torchaudio/package.py +++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py @@ -103,6 +103,9 @@ class PyTorchaudio(PythonPackage): depends_on("pkgconfig", type="build") depends_on("sox") + # https://github.com/pytorch/audio/pull/3811 + depends_on("cuda@:12.4", when="^py-torch+cuda") + def setup_build_environment(self, env): # tools/setup_helpers/extension.py env.set("BUILD_SOX", 0) From d4a892f200800650c13e71457d685b69b81371ed Mon Sep 17 00:00:00 2001 From: "Auriane R." <48684432+aurianer@users.noreply.github.com> Date: Sun, 18 Aug 2024 21:16:58 +0200 Subject: [PATCH 369/435] py-torch-nvidia-apex: Add 24.04.01 and variants from the readme (#45019) Co-authored-by: Bernhard Kaindl --- .../packages/py-torch-nvidia-apex/package.py | 147 ++++++++++++++++-- 1 file changed, 133 insertions(+), 14 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py b/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py index d1591b578c09df..a0ca87cd8b725a 100644 --- a/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py +++ b/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py @@ -13,11 +13,12 @@ class PyTorchNvidiaApex(PythonPackage, CudaPackage): homepage = "https://github.com/nvidia/apex/" git = "https://github.com/nvidia/apex/" + url = "https://github.com/NVIDIA/apex/archive/refs/tags/24.04.01.tar.gz" license("BSD-3-Clause") version("master", branch="master") - version("24.04.01", tag="24.04.01") + version("24.04.01", sha256="065bc5c0146ee579d5db2b38ca3949da4dc799b871961a2c9eb19e18892166ce") version("23.08", tag="23.08") version("23.07", tag="23.07") version("23.06", tag="23.06") @@ -25,40 +26,158 @@ class PyTorchNvidiaApex(PythonPackage, CudaPackage): version("22.03", tag="22.03") version("2020-10-19", commit="8a1ed9e8d35dfad26fb973996319965e4224dcdd") - depends_on("cxx", type="build") # generated - - depends_on("python@3:", type=("build", "run")) - depends_on("py-setuptools", type="build") - depends_on("py-packaging", type="build") - depends_on("py-torch@0.4:", type=("build", "run")) - depends_on("cuda@9:", when="+cuda") - depends_on("py-pybind11", type=("build", "link", "run")) + depends_on("cxx", type="build") variant("cuda", default=True, description="Build with CUDA") + # Based on the table of the readme on github + variant( + "permutation_search_cuda", default=False, description="Build permutation search module" + ) + variant("bnp", default=False, description="Build batch norm module") + variant("xentropy", default=False, description="Build cross entropy module") + variant("focal_loss_cuda", default=False, description="Build focal loss module") + variant("fused_index_mul_2d", default=False, description="Build fused_index_mul_2d module") + variant("fast_layer_norm", default=False, description="Build fast layer norm module") + variant("fmhalib", default=False, description="Build fmha module") + variant( + "fast_multihead_attn", default=False, description="Build fast multihead attention module" + ) + variant("transducer", default=False, description="Build transducer module") + variant("cudnn_gbn_lib", default=False, description="Build cudnn gbn module") + variant("peer_memory_cuda", default=False, description="Build peer memory module") + variant("nccl_p2p_cuda", default=False, description="Build with nccl p2p") + variant("fast_bottleneck", default=False, description="Build fast_bottleneck module") + variant("fused_conv_bias_relu", default=False, description="Build fused_conv_bias_relu moduel") + + requires( + "+peer_memory_cuda+nccl_p2p_cuda", + when="+fast_bottleneck", + msg="+fast_bottleneck requires both +peer_memory_cuda and +nccl_p2p_cuda to be enabled.", + ) + requires("^cudnn@8.5:", when="+cudnn_gbn_lib") + requires("^cudnn@8.4:", when="+fused_conv_bias_relu") + requires("^nccl@2.10:", when="+nccl_p2p_cuda") + + with default_args(type=("build")): + depends_on("py-setuptools") + depends_on("py-packaging") + depends_on("py-pip") + with default_args(type=("build", "run")): + depends_on("python@3:") + depends_on("py-torch@0.4:") + for _arch in CudaPackage.cuda_arch_values: + depends_on(f"py-torch+cuda cuda_arch={_arch}", when=f"+cuda cuda_arch={_arch}") + + depends_on("py-pybind11", type=("build", "link", "run")) + depends_on("cuda@9:", when="+cuda") + # https://github.com/NVIDIA/apex/issues/1498 # https://github.com/NVIDIA/apex/pull/1499 patch("1499.patch", when="@2020-10-19") + conflicts( + "cuda_arch=none", + when="+cuda", + msg="Must specify CUDA compute capabilities of your GPU, see " + "https://developer.nvidia.com/cuda-gpus", + ) + + def torch_cuda_arch_list(self, env): + if self.spec.satisfies("+cuda"): + torch_cuda_arch = ";".join( + "{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value + ) + env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch) + def setup_build_environment(self, env): - if "+cuda" in self.spec: + if self.spec.satisfies("+cuda"): env.set("CUDA_HOME", self.spec["cuda"].prefix) + self.torch_cuda_arch_list(env) else: env.unset("CUDA_HOME") - @when("^python@:3.10") + def setup_run_environment(self, env): + self.torch_cuda_arch_list(env) + + @when("^py-pip@:23.0") def global_options(self, spec, prefix): args = [] if spec.satisfies("^py-torch@1.0:"): args.append("--cpp_ext") - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("--cuda_ext") + + if spec.satisfies("+permutation_search_cuda"): + args.append("--permutation_search") + if spec.satisfies("+bnp"): + args.append("--bnp") + if spec.satisfies("+xentropy"): + args.append("--xentropy") + if spec.satisfies("+focal_loss_cuda"): + args.append("--focal_loss") + if spec.satisfies("+fused_index_mul_2d"): + args.append("--index_mul_2d") + if spec.satisfies("+fast_layer_norm"): + args.append("--fast_layer_norm") + if spec.satisfies("+fmhalib"): + args.append("--fmha") + if spec.satisfies("+fast_multihead_attn"): + args.append("--fast_multihead_attn") + if spec.satisfies("+transducer"): + args.append("--transducer") + if spec.satisfies("+cudnn_gbn_lib"): + args.append("--cudnn_gbn") + if spec.satisfies("+peer_memory_cuda"): + args.append("--peer_memory") + if spec.satisfies("+nccl_p2p_cuda"): + args.append("--nccl_p2p") + if spec.satisfies("+fast_bottleneck"): + args.append("--fast_bottleneck") + if spec.satisfies("+fused_conv_bias_relu"): + args.append("--fused_conv_bias_relu") + return args - @when("^python@3.11:") + @when("^py-pip@23.1:") def config_settings(self, spec, prefix): + global_options = "" + if spec.satisfies("^py-torch@1.0:"): + global_options += "--cpp_ext" + if spec.satisfies("+cuda"): + global_options += " --cuda_ext" + + if spec.satisfies("+permutation_search_cuda"): + global_options += " --permutation_search" + if spec.satisfies("+bnp"): + global_options += " --bnp" + if spec.satisfies("+xentropy"): + global_options += " --xentropy" + if spec.satisfies("+focal_loss_cuda"): + global_options += " --focal_loss" + if spec.satisfies("+fused_index_mul_2d"): + global_options += " --index_mul_2d" + if spec.satisfies("+fast_layer_norm"): + global_options += " --fast_layer_norm" + if spec.satisfies("+fmhalib"): + global_options += " --fmha" + if spec.satisfies("+fast_multihead_attn"): + global_options += " --fast_multihead_attn" + if spec.satisfies("+transducer"): + global_options += " --transducer" + if spec.satisfies("+cudnn_gbn_lib"): + global_options += " --cudnn_gbn" + if spec.satisfies("+peer_memory_cuda"): + global_options += " --peer_memory" + if spec.satisfies("+nccl_p2p_cuda"): + global_options += " --nccl_p2p" + if spec.satisfies("+fast_bottleneck"): + global_options += " --fast_bottleneck" + if spec.satisfies("+fused_conv_bias_relu"): + global_options += " --fused_conv_bias_relu" + return { "builddir": "build", "compile-args": f"-j{make_jobs}", - "--global-option": "--cpp_ext --cuda_ext", + "--global-option": global_options, } From 855a8476e417b7ef10b0541e7095f96e4b92c4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lacroix?= Date: Sun, 18 Aug 2024 21:18:00 +0200 Subject: [PATCH 370/435] Scotch: Fix sha256 for some older versions. (#44494) Most likely caused by a change in Inria's Gitlab. --- var/spack/repos/builtin/packages/scotch/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 54f21c3b483490..e470491d84759c 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -25,12 +25,12 @@ class Scotch(CMakePackage, MakefilePackage): version("7.0.1", sha256="0618e9bc33c02172ea7351600fce4fccd32fe00b3359c4aabb5e415f17c06fed") version("6.1.3", sha256="4e54f056199e6c23d46581d448fcfe2285987e5554a0aa527f7931684ef2809e") version("6.1.2", sha256="9c2c75c75f716914a2bd1c15dffac0e29a2f8069b2df1ad2b6207c984b699450") - version("6.1.1", sha256="39052f59ff474a4a69cefc25cf3caf8429400889deba010ee6403ca188f8b311") - version("6.1.0", sha256="a3bc3fa3b243fcb52f8d68de4272562a0328afb18a96f535724d284e36730485") - version("6.0.10", sha256="fd8b707b8200823312a1571d97d3776ff3dfd3280cfa4b6e38987153cea5dbda") - version("6.0.9", sha256="622b4143cf01c480bb15708b3651b29c25e4aeb00c8c6447ff196aca2eca5c93") - version("6.0.8", sha256="0ba3f145026174304f910c8770a3cbb034f213c91d939573751cfbb4fd46d45e") - version("6.0.6", sha256="686f0cad88d033fe71c8b781735ff742b73a1d82a65b8b1586526d69729ac4cf") + version("6.1.1", sha256="14daf151399fc67f83fd3ff2933854f5e8d2207c7d35dd66a05660bf0bbd583c") + version("6.1.0", sha256="4fe537f608f0fe39ec78807f90203f9cca1181deb16bfa93b7d4cd440e01bbd1") + version("6.0.10", sha256="e5542b6102b5616f0f5c6619e3e9d52f9d0e48cb991e9b30670f598deeac0553") + version("6.0.9", sha256="b9bc86c50b65781eb416663e938d57555373c2517ea8b9acf680fd3acde0cb0c") + version("6.0.8", sha256="9457c1e7c30f073686cc217345b5a96af4166d6abbf148af84cdbab4e144b299") + version("6.0.6", sha256="e932b4c04636fcf5d21b9a76376868de052c9b000bdaf96f8967dcec61bdaa10") version("6.0.5a", sha256="5b21b95e33acd5409d682fa7253cefbdffa8db82875549476c006d8cbe7c556f") version("6.0.4", sha256="f53f4d71a8345ba15e2dd4e102a35fd83915abf50ea73e1bf6efe1bc2b4220c7") version("6.0.3", sha256="6461cc9f28319a9dbe6cc10e28c0cbe90b4b25e205723c3edcde9a3ff974d6d8") From c1852e3706eeac32429ae7852dfef0704c3a8afd Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 18 Aug 2024 21:14:04 -0700 Subject: [PATCH 371/435] WarpX: Python on pyAMReX (#45251) * WarpX: Python on pyAMReX Long overdue update for WarpX: in 2024, we updated our Python bindings to rely on the new pyAMReX package. This deprecates the old `py-warpx` package and adds a new dependency and variant to WarpX. Also deprecates old versions that we will not continue to support. * Update Cloud/E4S Pipelines for WarpX `py-warpx` is replaced by `warpx +python` oneAPI does not support IPO/LTO: diable for `py-amrex` even though pybind11 strongly encourages it. --- .../cloud_pipelines/configs/linux/ci.yaml | 2 +- .../stacks/e4s-cray-rhel/spack.yaml | 2 +- .../stacks/e4s-cray-sles/spack.yaml | 2 +- .../stacks/e4s-neoverse-v2/spack.yaml | 2 +- .../stacks/e4s-neoverse_v1/spack.yaml | 2 +- .../stacks/e4s-oneapi/spack.yaml | 6 +- .../stacks/e4s-power/spack.yaml | 2 +- .../cloud_pipelines/stacks/e4s/spack.yaml | 2 +- .../builtin/packages/py-amrex/package.py | 97 ++++-- .../packages/py-picmistandard/package.py | 38 ++- .../builtin/packages/py-pybind11/package.py | 4 + .../builtin/packages/py-warpx/package.py | 128 ++++++-- .../repos/builtin/packages/warpx/package.py | 309 +++++++++++++++--- 13 files changed, 474 insertions(+), 122 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml index 923e9a400da323..b6e41a9af095fb 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml @@ -258,7 +258,6 @@ ci: - py-scipy - py-statsmodels - py-warlock - - py-warpx - raja - slepc - slurm @@ -272,6 +271,7 @@ ci: - vtk - vtk-h - vtk-m + - warpx +python - zfp build-job: tags: [ "spack", "medium" ] diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml index 37834d60f6e3fd..1f4e526dcac8bd 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml @@ -169,13 +169,13 @@ spack: # - phist # fortran_bindings/CMakeFiles/phist_fort.dir/phist_testing.F90.o: ftn-78 ftn: ERROR in command line. The -f option has an invalid argument, "no-math-errno". # - plasma # %cce conflict # - py-jupyterhub # rust: ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC'; defined in /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o, referenced by /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o:(__no_mmap_for_malloc) - # - py-warpx # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']] # - quantum-espresso # quantum-espresso: CMake Error at cmake/FindSCALAPACK.cmake:503 (message): A required library with SCALAPACK API not found. Please specify library # - scr # scr: make[2]: *** [examples/CMakeFiles/test_ckpt_F.dir/build.make:112: examples/test_ckpt_F] Error 1: /opt/cray/pe/cce/15.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: /opt/cray/pe/mpich/8.1.25/ofi/cray/10.0/lib/libmpi_cray.so: undefined reference to `PMI_Barrier' # - strumpack ~slate # strumpack: [test/CMakeFiles/test_HSS_seq.dir/build.make:117: test/test_HSS_seq] Error 1: ld.lld: error: undefined reference due to --no-allow-shlib-undefined: mpi_abort_ # - upcxx # upcxx: configure error: User requested --enable-ofi but I don't know how to build ofi programs for your system # - variorum # variorum: /opt/cray/pe/cce/15.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: /opt/cray/pe/lib64/libpals.so.0: undefined reference to `json_array_append_new@@libjansson.so.4' # - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu # openblas: ftn-2307 ftn: ERROR in command line: The "-m" option must be followed by 0, 1, 2, 3 or 4.; make[2]: *** [: spotrf2.o] Error 1; make[1]: *** [Makefile:27: lapacklib] Error 2; make: *** [Makefile:250: netlib] Error 2 + # - warpx +python # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']] cdash: build-group: E4S Cray diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml index 376ad7d0864bb1..d7ca80212ac7f5 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml @@ -163,13 +163,13 @@ spack: # - phist # - plasma # - py-jupyterhub - # - py-warpx # - quantum-espresso # - scr # - strumpack ~slate # - upcxx # - variorum # - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu + # - warpx +python cdash: build-group: E4S Cray SLES diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml index c0074bdd80a908..a0b5cec5b6966b 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml @@ -133,7 +133,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -157,6 +156,7 @@ spack: - upcxx # - veloc - wannier90 + - warpx +python - xyce +mpi +shared +pymi +pymi_static_tpls # INCLUDED IN ECP DAV CPU # - adios2 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index 7e9b7ae11b2a94..0b5de6cf163d65 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -134,7 +134,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -157,6 +156,7 @@ spack: - umpire - upcxx - wannier90 + - warpx +python - wps - wrf - xyce +mpi +shared +pymi +pymi_static_tpls diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 8f164ac7f11bf4..991fa002128391 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -143,12 +143,11 @@ spack: - precice - pruners-ninja - pumi - - py-amrex + - py-amrex ~ipo # oneAPI 2024.2.0 builds do not support IPO/LTO says CMake, even though pybind11 strongly encourages it - py-h5py - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - raja - rempi @@ -189,6 +188,7 @@ spack: - veloc # - visit # visit: +visit: visit_vtk/lightweight/vtkSkewLookupTable.C:32:10: error: cannot initialize return object of type 'unsigned char *' with an rvalue of type 'const unsigned char *' - vtk-m ~openmp + - warpx +python ~python_ipo ^py-amrex ~ipo # oneAPI 2024.2.0 builds do not support IPO/LTO says CMake, even though pybind11 strongly encourages it - zfp # -- # - chapel ~cuda ~rocm # llvm: closures.c:(.text+0x305e): undefined reference to `_intel_fast_memset' @@ -234,10 +234,10 @@ spack: - sundials +sycl cxxstd=17 +examples-install - tau +mpi +opencl +level_zero ~pdt +syscall # requires libdrm.so to be installed - upcxx +level_zero + - warpx ~qed +python ~python_ipo compute=sycl ^py-amrex ~ipo # qed for https://github.com/ECP-WarpX/picsar/pull/53 prior to 24.09 release; ~ipo for oneAPI 2024.2.0 GPU builds do not support IPO/LTO says CMake, even though pybind11 strongly encourages it # -- # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc # - slate +sycl # slate: ifx: error #10426: option '-fopenmp-targets' requires '-fiopenmp' - # - warpx compute=sycl # warpx: fetchedamrex-src/Src/Base/AMReX_RandomEngine.H:18:10: fatal error: 'oneapi/mkl/rng/device.hpp' file not found ci: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index ea6682d20490b5..9cc3f8cc8fcf2a 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -137,7 +137,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -160,6 +159,7 @@ spack: - umpire - upcxx - wannier90 + - warpx +python - wps - wrf - xyce +mpi +shared +pymi +pymi_static_tpls diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 712b9872d0190c..d6ecfe74f91fda 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -147,7 +147,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -190,6 +189,7 @@ spack: - veloc - visit # silo: https://github.com/spack/spack/issues/39538 - vtk-m + - warpx +python - zfp # -- # - geopm # geopm: https://github.com/spack/spack/issues/38795 diff --git a/var/spack/repos/builtin/packages/py-amrex/package.py b/var/spack/repos/builtin/packages/py-amrex/package.py index aa3e6d87c55523..0aed56737352d4 100644 --- a/var/spack/repos/builtin/packages/py-amrex/package.py +++ b/var/spack/repos/builtin/packages/py-amrex/package.py @@ -3,14 +3,15 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.build_systems.python import PythonPipBuilder from spack.package import * -class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): +class PyAmrex(CMakePackage, PythonExtension, CudaPackage, ROCmPackage): """AMReX Python Bindings with pybind11""" homepage = "https://amrex-codes.github.io/amrex/" - url = "https://github.com/AMReX-Codes/pyamrex/archive/refs/tags/24.04.tar.gz" + url = "https://github.com/AMReX-Codes/pyamrex/archive/refs/tags/24.08.tar.gz" git = "https://github.com/AMReX-Codes/pyamrex.git" maintainers("ax3l", "RTSandberg", "sayerhs", "WeiqunZhang") @@ -18,12 +19,20 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): license("BSD-3-Clause-LBNL") version("develop", branch="development") - version("24.04", sha256="ab85695bb9644b702d0fc84e77205d264d27ba94999cab912c8a3212a7eb77fc") - version("24.03", sha256="bf85b4ad35b623278cbaae2c07e22138545dec0732d15c4ab7c53be76a7f2315") + version("24.08", sha256="e7179d88261f64744f392a2194ff2744fe323fe0e21d0742ba60458709a1b47e") + version( + "24.04", + sha256="ab85695bb9644b702d0fc84e77205d264d27ba94999cab912c8a3212a7eb77fc", + deprecated=True, + ) - depends_on("cxx", type="build") # generated + version( + "24.03", + sha256="bf85b4ad35b623278cbaae2c07e22138545dec0732d15c4ab7c53be76a7f2315", + deprecated=True, + ) - for v in ["24.04", "24.03"]: + for v in ["24.08", "24.04", "24.03"]: depends_on("amrex@{0}".format(v), when="@{0}".format(v), type=("build", "link")) variant( @@ -33,6 +42,9 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): multi=True, description="Dimensionality", ) + # Spack defaults to False but pybind11 defaults to True (and IPO is highly + # encouraged to be used with pybind11 projects) + variant("ipo", default=True, description="CMake interprocedural optimization") variant("mpi", default=True, description="Build with MPI support") variant("openmp", default=False, description="Build with OpenMP support") variant( @@ -42,14 +54,21 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): values=("single", "double"), ) variant("tiny_profile", default=False, description="Enable tiny profiling") + variant("sycl", default=False, description="Enable SYCL backend") + + extends("python") + depends_on("cxx", type="build") + + depends_on("cmake@3.20:", type="build") depends_on("python@3.8:", type=("build", "run")) - depends_on("py-numpy@1.15.0:1", type=("build", "run")) depends_on("py-mpi4py@2.1.0:", type=("build", "run"), when="+mpi") + depends_on("py-numpy@1.15.0:1", type=("build", "run")) depends_on("py-packaging@23:", type="build") + depends_on("py-pip@23:", type="build") depends_on("py-setuptools@42:", type="build") - depends_on("cmake@3.20:3", type="build") - depends_on("py-pybind11@2.11.1:", type="link") + depends_on("py-pybind11@2.12.0:", type=("build", "link")) + depends_on("py-wheel@0.40:", type="build") # AMReX options # required variants @@ -63,53 +82,65 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): depends_on("amrex dimensions=3") with when("+mpi"): depends_on("amrex +mpi") + with when("~mpi"): + depends_on("amrex ~mpi") with when("+openmp"): depends_on("amrex +openmp") + with when("~openmp"): + depends_on("amrex ~openmp") with when("+tiny_profile"): depends_on("amrex +tiny_profile") with when("+cuda"): depends_on("amrex +cuda") # todo: how to forward cuda_arch? + with when("~cuda"): + depends_on("amrex ~cuda") with when("+rocm"): depends_on("amrex +rocm") # todo: how to forward amdgpu_target? + with when("~rocm"): + depends_on("amrex ~rocm") + with when("+sycl"): + depends_on("amrex +sycl") + with when("~sycl"): + depends_on("amrex ~sycl") depends_on("py-pytest", type="test") depends_on("py-pandas", type="test") depends_on("py-cupy", type="test", when="+cuda") + phases = ("cmake", "build", "install", "pip_install_nodeps") + build_targets = ["all", "pip_wheel"] + tests_src_dir = "tests/" - def setup_build_environment(self, env): - spec = self.spec - - # disable superbuilds: use external dependencies - env.set("AMREX_INTERNAL", "OFF") - env.set("PYAMREX_CCACHE", "OFF") - env.set("PYAMREX_IPO", "ON") - env.set("PYBIND11_INTERNAL", "OFF") - - # configure to require the exact AMReX configs provided by Spack - env.set("AMREX_SPACEDIM", ";".join(spec.variants["dimensions"].value)) - env.set("AMREX_MPI", "ON" if spec.satisfies("+mpi") else "OFF") - env.set("AMREX_OMP", "ON" if spec.satisfies("+omp") else "OFF") - env.set("AMREX_PRECISION", spec.variants["precision"].value.upper()) - with when("+cuda"): - env.set("AMREX_GPU_BACKEND", "CUDA") - with when("+rocm"): - env.set("AMREX_GPU_BACKEND", "HIP") - # with when("+sycl"): - # env.set("AMREX_GPU_BACKEND", "SYCL") - - # control build parallelism - env.set("CMAKE_BUILD_PARALLEL_LEVEL", make_jobs) + def cmake_args(self): + args = ["-DpyAMReX_amrex_internal=OFF", "-DpyAMReX_pybind11_internal=OFF"] + return args + + def pip_install_nodeps(self, spec, prefix): + """Install everything from build directory.""" + pip = spec["python"].command + pip.add_default_arg("-m", "pip") + + args = PythonPipBuilder.std_args(self) + [ + f"--prefix={prefix}", + "--find-links=amrex-whl", + "amrex", + ] + + with working_dir(self.build_directory): + pip(*args) + + # todo: from PythonPipBuilder + # ....execute_install_time_tests() def check(self): """Checks after the build phase""" pytest = which("pytest") pytest(join_path(self.stage.source_path, self.tests_src_dir)) - @run_after("install") + @run_after("pip_install_nodeps") def copy_test_sources(self): """Copy the example test files after the package is installed to an install test subdirectory for use during `spack test run`.""" diff --git a/var/spack/repos/builtin/packages/py-picmistandard/package.py b/var/spack/repos/builtin/packages/py-picmistandard/package.py index bdcf00d81cd63a..fd0998176f95d0 100644 --- a/var/spack/repos/builtin/packages/py-picmistandard/package.py +++ b/var/spack/repos/builtin/packages/py-picmistandard/package.py @@ -11,25 +11,47 @@ class PyPicmistandard(PythonPackage): homepage = "https://picmi-standard.github.io" git = "https://github.com/picmi-standard/picmi.git" - pypi = "picmistandard/picmistandard-0.26.0.tar.gz" + pypi = "picmistandard/picmistandard-0.29.0.tar.gz" maintainers("ax3l", "dpgrote", "RemiLehe") version("master", branch="master") + version("0.29.0", sha256="dc0bf3ddd3635df9935ac569b3085de387150c4f8e9851897078bb12d123dde8") + version("0.28.0", sha256="aa980b0fb49fc3ff9c7e32b5927b3700c4660aefbf96567bac1f8c9c93bb7831") version("0.26.0", sha256="b22689f576d064bf0cd8f435621e912359fc2ee9347350eab845d2d36ebb62eb") version("0.25.0", sha256="3fe6a524822d382e52bfc9d3378249546075d28620969954c5ffb43e7968fb02") version("0.24.0", sha256="55a82adcc14b41eb612caf0d9e47b0e2a56ffc196a58b41fa0cc395c6924be9a") version("0.23.2", sha256="2853fcfaf2f226a88bb6063ae564832b7e69965294fd652cd2ac04756fa4599a") version("0.23.1", sha256="c7375010b7a3431b519bc0accf097f2aafdb520e2a0126f42895cb96dcc7dcf1") - version("0.0.22", sha256="e234a431274254b22cd70be64d6555b383d98426b2763ea0c174cf77bf4d0890") - version("0.0.21", sha256="930056a23ed92dac7930198f115b6248606b57403bffebce3d84579657c8d10b") - version("0.0.20", sha256="9c1822eaa2e4dd543b5afcfa97940516267dda3890695a6cf9c29565a41e2905") - version("0.0.19", sha256="4b7ba1330964fbfd515e8ea2219966957c1386e0896b92d36bd9e134afb02f5a") - version("0.0.18", sha256="68c208c0c54b4786e133bb13eef0dd4824998da4906285987ddee84e6d195e71") + version( + "0.0.22", + sha256="e234a431274254b22cd70be64d6555b383d98426b2763ea0c174cf77bf4d0890", + deprecated=True, + ) + version( + "0.0.21", + sha256="930056a23ed92dac7930198f115b6248606b57403bffebce3d84579657c8d10b", + deprecated=True, + ) + version( + "0.0.20", + sha256="9c1822eaa2e4dd543b5afcfa97940516267dda3890695a6cf9c29565a41e2905", + deprecated=True, + ) + version( + "0.0.19", + sha256="4b7ba1330964fbfd515e8ea2219966957c1386e0896b92d36bd9e134afb02f5a", + deprecated=True, + ) + version( + "0.0.18", + sha256="68c208c0c54b4786e133bb13eef0dd4824998da4906285987ddee84e6d195e71", + deprecated=True, + ) depends_on("python@3.6:", type=("build", "run")) - depends_on("py-numpy@1.15:1", type=("build", "run")) - depends_on("py-scipy@1.5:1", type=("build", "run")) + depends_on("py-numpy@1.15:", type=("build", "run")) + depends_on("py-scipy@1.5:", type=("build", "run")) depends_on("py-setuptools", type="build") @property diff --git a/var/spack/repos/builtin/packages/py-pybind11/package.py b/var/spack/repos/builtin/packages/py-pybind11/package.py index 46db4dc9d1cfb7..887f2b8d311ec6 100644 --- a/var/spack/repos/builtin/packages/py-pybind11/package.py +++ b/var/spack/repos/builtin/packages/py-pybind11/package.py @@ -61,6 +61,10 @@ class PyPybind11(CMakePackage, PythonExtension): depends_on("py-wheel", type="build") extends("python") + # Spack defaults to False but pybind11 defaults to True (and IPO is highly + # encouraged to be used) + variant("ipo", default=True, description="CMake interprocedural optimization") + with when("build_system=cmake"): generator("ninja") depends_on("cmake@3.13:", type="build") diff --git a/var/spack/repos/builtin/packages/py-warpx/package.py b/var/spack/repos/builtin/packages/py-warpx/package.py index beea6bdce7fe9b..6119ba4e8191d4 100644 --- a/var/spack/repos/builtin/packages/py-warpx/package.py +++ b/var/spack/repos/builtin/packages/py-warpx/package.py @@ -7,7 +7,9 @@ class PyWarpx(PythonPackage): - """WarpX is an advanced electromagnetic Particle-In-Cell code. It supports + """This package is deprecated. Please use `warpx +python`. + + WarpX is an advanced electromagnetic Particle-In-Cell code. It supports many features including Perfectly-Matched Layers (PML) and mesh refinement. In addition, WarpX is a highly-parallel and highly-optimized code and features hybrid OpenMP/MPI parallelization, advanced vectorization @@ -21,34 +23,114 @@ class PyWarpx(PythonPackage): url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.08.tar.gz" git = "https://github.com/ECP-WarpX/WarpX.git" - maintainers("ax3l", "dpgrote", "RemiLehe") + maintainers("ax3l", "dpgrote", "EZoni", "RemiLehe") tags = ["e4s", "ecp"] license("BSD-3-Clause-LBNL") # NOTE: if you update the versions here, also see warpx - version("develop", branch="development") - version("23.08", sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc") - version("23.07", sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945") - version("23.06", sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b") - version("23.05", sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73") - version("23.04", sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823") - version("23.03", sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718") - version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1") - version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c") - version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062") - version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e") - version("22.10", sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e") - version("22.09", sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3") - version("22.08", sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4") - version("22.07", sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b") - version("22.06", sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9") - version("22.05", sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479") - version("22.04", sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f") - version("22.03", sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564") - version("22.02", sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42") - version("22.01", sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28") + version("develop", branch="development", deprecated=True) + version( + "23.08", + sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc", + deprecated=True, + ) + version( + "23.07", + sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945", + deprecated=True, + ) + version( + "23.06", + sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b", + deprecated=True, + ) + version( + "23.05", + sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73", + deprecated=True, + ) + version( + "23.04", + sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823", + deprecated=True, + ) + version( + "23.03", + sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718", + deprecated=True, + ) + version( + "23.02", + sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1", + deprecated=True, + ) + version( + "23.01", + sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c", + deprecated=True, + ) + version( + "22.12", + sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062", + deprecated=True, + ) + version( + "22.11", + sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e", + deprecated=True, + ) + version( + "22.10", + sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e", + deprecated=True, + ) + version( + "22.09", + sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3", + deprecated=True, + ) + version( + "22.08", + sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4", + deprecated=True, + ) + version( + "22.07", + sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b", + deprecated=True, + ) + version( + "22.06", + sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9", + deprecated=True, + ) + version( + "22.05", + sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479", + deprecated=True, + ) + version( + "22.04", + sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f", + deprecated=True, + ) + version( + "22.03", + sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564", + deprecated=True, + ) + version( + "22.02", + sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42", + deprecated=True, + ) + version( + "22.01", + sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28", + deprecated=True, + ) depends_on("cxx", type="build") # generated diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py index fb7d66384ffcca..5b13827d25a84e 100644 --- a/var/spack/repos/builtin/packages/warpx/package.py +++ b/var/spack/repos/builtin/packages/warpx/package.py @@ -3,62 +3,176 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.build_systems.python import PythonPipBuilder from spack.package import * -class Warpx(CMakePackage): +class Warpx(CMakePackage, PythonExtension): """WarpX is an advanced electromagnetic Particle-In-Cell code. It supports many features including Perfectly-Matched Layers (PML) and mesh refinement. - In addition, WarpX is a highly-parallel and highly-optimized code and - features hybrid OpenMP/MPI parallelization, advanced vectorization - techniques and load balancing capabilities. - For WarpX' Python bindings and PICMI input support, see the 'py-warpx' package. + In addition, WarpX is a highly-parallel and highly-optimized code and + features hybrid GPU/OpenMP/MPI parallelization and load balancing capabilities. """ homepage = "https://ecp-warpx.github.io" - url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.08.tar.gz" + url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/24.08.tar.gz" git = "https://github.com/ECP-WarpX/WarpX.git" - maintainers("ax3l", "dpgrote", "MaxThevenet", "RemiLehe") + maintainers("ax3l", "dpgrote", "EZoni", "RemiLehe") tags = ["e4s", "ecp"] license("BSD-3-Clause-LBNL") # NOTE: if you update the versions here, also see py-warpx version("develop", branch="development") - version("23.08", sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc") - version("23.07", sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945") - version("23.06", sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b") - version("23.05", sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73") - version("23.04", sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823") - version("23.03", sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718") - version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1") - version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c") - version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062") - version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e") - version("22.10", sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e") - version("22.09", sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3") - version("22.08", sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4") - version("22.07", sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b") - version("22.06", sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9") - version("22.05", sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479") - version("22.04", sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f") - version("22.03", sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564") - version("22.02", sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42") - version("22.01", sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28") + version("24.08", sha256="8da1f2967f613a65a295260260aa4f081ac1d1b7c1d6987d294e02b86099df08") + version( + "23.08", + sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc", + deprecated=True, + ) + version( + "23.07", + sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945", + deprecated=True, + ) + version( + "23.06", + sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b", + deprecated=True, + ) + version( + "23.05", + sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73", + deprecated=True, + ) + version( + "23.04", + sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823", + deprecated=True, + ) + version( + "23.03", + sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718", + deprecated=True, + ) + version( + "23.02", + sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1", + deprecated=True, + ) + version( + "23.01", + sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c", + deprecated=True, + ) + version( + "22.12", + sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062", + deprecated=True, + ) + version( + "22.11", + sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e", + deprecated=True, + ) + version( + "22.10", + sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e", + deprecated=True, + ) + version( + "22.09", + sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3", + deprecated=True, + ) + version( + "22.08", + sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4", + deprecated=True, + ) + version( + "22.07", + sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b", + deprecated=True, + ) + version( + "22.06", + sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9", + deprecated=True, + ) + version( + "22.05", + sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479", + deprecated=True, + ) + version( + "22.04", + sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f", + deprecated=True, + ) + version( + "22.03", + sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564", + deprecated=True, + ) + version( + "22.02", + sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42", + deprecated=True, + ) + version( + "22.01", + sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28", + deprecated=True, + ) # 22.01+ requires C++17 or newer - version("21.12", sha256="847c98aac20c73d94c823378803c82be9a14139f1c14ea483757229b452ce4c1") - version("21.11", sha256="ce60377771c732033a77351cd3500b24b5d14b54a5adc7a622767b9251c10d0b") - version("21.10", sha256="d372c573f0360094d5982d64eceeb0149d6620eb75e8fdbfdc6777f3328fb454") - version("21.09", sha256="861a65f11846541c803564db133c8678b9e8779e69902ef1637b21399d257eab") - version("21.08", sha256="6128a32cfd075bc63d08eebea6d4f62d33ce0570f4fd72330a71023ceacccc86") - version("21.07", sha256="a8740316d813c365715f7471201499905798b50bd94950d33f1bd91478d49561") - version("21.06", sha256="a26039dc4061da45e779dd5002467c67a533fc08d30841e01e7abb3a890fbe30") - version("21.05", sha256="f835f0ae6c5702550d23191aa0bb0722f981abb1460410e3d8952bc3d945a9fc") - version("21.04", sha256="51d2d8b4542eada96216e8b128c0545c4b7527addc2038efebe586c32c4020a0") - - depends_on("cxx", type="build") # generated + version( + "21.12", + sha256="847c98aac20c73d94c823378803c82be9a14139f1c14ea483757229b452ce4c1", + deprecated=True, + ) + version( + "21.11", + sha256="ce60377771c732033a77351cd3500b24b5d14b54a5adc7a622767b9251c10d0b", + deprecated=True, + ) + version( + "21.10", + sha256="d372c573f0360094d5982d64eceeb0149d6620eb75e8fdbfdc6777f3328fb454", + deprecated=True, + ) + version( + "21.09", + sha256="861a65f11846541c803564db133c8678b9e8779e69902ef1637b21399d257eab", + deprecated=True, + ) + version( + "21.08", + sha256="6128a32cfd075bc63d08eebea6d4f62d33ce0570f4fd72330a71023ceacccc86", + deprecated=True, + ) + version( + "21.07", + sha256="a8740316d813c365715f7471201499905798b50bd94950d33f1bd91478d49561", + deprecated=True, + ) + version( + "21.06", + sha256="a26039dc4061da45e779dd5002467c67a533fc08d30841e01e7abb3a890fbe30", + deprecated=True, + ) + version( + "21.05", + sha256="f835f0ae6c5702550d23191aa0bb0722f981abb1460410e3d8952bc3d945a9fc", + deprecated=True, + ) + version( + "21.04", + sha256="51d2d8b4542eada96216e8b128c0545c4b7527addc2038efebe586c32c4020a0", + deprecated=True, + ) # 20.01+ requires C++14 or newer variant("app", default=True, description="Build the WarpX executable application") @@ -88,6 +202,13 @@ class Warpx(CMakePackage): when="@23.06:", ) variant("eb", default=False, description="Embedded boundary support (in development)") + # Spack defaults to False but pybind11 defaults to True (and IPO is highly + # encouraged to be used) + variant( + "python_ipo", + default=True, + description="CMake interprocedural optimization for Python bindings (recommended)", + ) variant("lib", default=True, description="Build WarpX as a shared library") variant("mpi", default=True, description="Enable MPI support") variant( @@ -103,14 +224,22 @@ class Warpx(CMakePackage): multi=False, description="Floating point precision (single/double)", ) - variant("psatd", default=True, description="Enable PSATD solver support") + variant("fft", default=True, description="Enable support for FFT-based solvers") + variant("python", default=False, description="Enable Python bindings") variant("qed", default=True, description="Enable QED support") variant("qedtablegen", default=False, description="QED table generation support") variant("shared", default=True, description="Build a shared version of the library") variant("tprof", default=True, description="Enable tiny profiling features") - depends_on("sensei@4.0.0:", when="@22.07: +sensei") - conflicts("+sensei", when="@:22.06", msg="WarpX supports SENSEI 4.0+ with 22.07 and newer") + depends_on("cxx", type="build") + + for v in ["24.08", "develop"]: + depends_on( + f"amrex@{v} build_system=cmake +linear_solvers +pic +particles +shared +tiny_profile", + when=f"@{v}", + type=("build", "link"), + ) + depends_on("py-amrex@{0}".format(v), when="@{0} +python".format(v), type=("build", "run")) depends_on("ascent", when="+ascent") depends_on("ascent +cuda", when="+ascent compute=cuda") @@ -119,27 +248,53 @@ class Warpx(CMakePackage): depends_on("cmake@3.15.0:", type="build") depends_on("cmake@3.18.0:", type="build", when="@22.01:") depends_on("cmake@3.20.0:", type="build", when="@22.08:") + with when("dims=1"): + depends_on("amrex dimensions=1") + with when("dims=2"): + depends_on("amrex dimensions=2") + with when("dims=rz"): + depends_on("amrex dimensions=2") + with when("dims=3"): + depends_on("amrex dimensions=3") + with when("+eb"): + depends_on("amrex +eb") depends_on("mpi", when="+mpi") + with when("+mpi"): + depends_on("amrex +mpi") + depends_on("py-amrex +mpi", when="+python") + with when("~mpi"): + depends_on("amrex ~mpi") + depends_on("py-amrex ~mpi", when="~python") + with when("precision=single"): + depends_on("amrex precision=single") + with when("precision=double"): + depends_on("amrex precision=double") + depends_on("py-pybind11@2.12.0:", when="@24.04: +python", type=("build", "link")) + depends_on("sensei@4.0.0:", when="@22.07: +sensei") with when("compute=cuda"): + depends_on("amrex +cuda") depends_on("cuda@9.2.88:") depends_on("cuda@11.0:", when="@22.01:") with when("compute=hip"): - depends_on("rocfft", when="+psatd") + depends_on("amrex +rocm") + depends_on("rocfft", when="+fft") depends_on("rocprim") depends_on("rocrand") with when("compute=noacc"): - with when("+psatd"): + depends_on("amrex ~cuda ~openmp ~rocm ~sycl") + with when("+fft"): depends_on("fftw@3: ~mpi", when="~mpi") depends_on("fftw@3: +mpi", when="+mpi") depends_on("pkgconfig", type="build") with when("compute=omp"): + depends_on("amrex +openmp") depends_on("llvm-openmp", when="%apple-clang") - with when("+psatd"): + with when("+fft"): depends_on("fftw@3: +openmp") depends_on("fftw ~mpi", when="~mpi") depends_on("fftw +mpi", when="+mpi") depends_on("pkgconfig", type="build") - with when("+psatd dims=rz"): + with when("+fft dims=rz"): depends_on("lapackpp") depends_on("blaspp") depends_on("blaspp +cuda", when="compute=cuda") @@ -150,13 +305,30 @@ class Warpx(CMakePackage): depends_on("openpmd-api ~mpi", when="~mpi") depends_on("openpmd-api +mpi", when="+mpi") + # Python bindings + # note: in Spack, we only need the cmake package, not py-cmake + with when("+python"): + extends("python") + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-numpy@1.15.0:", type=("build", "run")) + depends_on("py-mpi4py@2.1.0:", type=("build", "run"), when="+mpi") + depends_on("py-periodictable@1.5:1", type=("build", "run")) + depends_on("py-picmistandard@0.28.0", type=("build", "run"), when="@23.11:24.07") + depends_on("py-picmistandard@0.29.0", type=("build", "run"), when="@24.08:") + depends_on("py-pip@23:", type="build") + depends_on("py-setuptools@42:", type="build") + depends_on("py-pybind11@2.12.0:", type=("build", "link")) + depends_on("py-wheel@0.40:", type="build") + + conflicts("+python", when="@:24.04", msg="Python bindings only supported in 24.04+") conflicts("dims=1", when="@:21.12", msg="WarpX 1D support starts in 22.01+") conflicts("~qed +qedtablegen", msg="WarpX PICSAR QED table generation needs +qed") conflicts( "compute=sycl", - when="+psatd", - msg="WarpX spectral solvers are not yet tested with SYCL " '(use "warpx ~psatd")', + when="+fft", + msg="WarpX spectral solvers are not yet tested with SYCL " '(use "warpx ~fft")', ) + conflicts("+sensei", when="@:22.06", msg="WarpX supports SENSEI 4.0+ with 22.07 and newer") # The symbolic aliases for our +lib target were missing in the install # location @@ -210,11 +382,17 @@ def cmake_args(self): self.define_from_variant("WarpX_MPI_THREAD_MULTIPLE", "mpithreadmultiple"), self.define_from_variant("WarpX_OPENPMD", "openpmd"), "-DWarpX_PRECISION={0}".format(spec.variants["precision"].value.upper()), - self.define_from_variant("WarpX_PSATD", "psatd"), + self.define_from_variant("WarpX_PYTHON", "python"), self.define_from_variant("WarpX_QED", "qed"), self.define_from_variant("WarpX_QED_TABLE_GEN", "qedtablegen"), ] + if spec.satisfies("@24.08:"): + args.append("-DWarpX_amrex_internal=OFF") + args.append(self.define_from_variant("WarpX_FFT", "fft")) + else: + args.append(self.define_from_variant("WarpX_PSATD", "fft")) + # FindMPI needs an extra hint sometimes, particularly on cray systems if "+mpi" in spec: args.append(self.define("MPI_C_COMPILER", spec["mpi"].mpicc)) @@ -223,6 +401,12 @@ def cmake_args(self): if "+openpmd" in spec: args.append("-DWarpX_openpmd_internal=OFF") + if "+python" in spec: + if spec.satisfies("@24.08:"): + args.append("-DWarpX_pyamrex_internal=OFF") + args.append("-DWarpX_pybind11_internal=OFF") + args.append(self.define_from_variant("WarpX_PYTHON_IPO", "python_ipo")) + # Work-around for SENSEI 4.0: wrong install location for CMake config # https://github.com/SENSEI-insitu/SENSEI/issues/79 if "+sensei" in spec: @@ -234,6 +418,28 @@ def cmake_args(self): return args + phases = ("cmake", "build", "install", "pip_install_nodeps") + build_targets = ["all"] + with when("+python"): + build_targets += ["pip_wheel"] + + def pip_install_nodeps(self, spec, prefix): + """Install everything from build directory.""" + pip = spec["python"].command + pip.add_default_arg("-m", "pip") + + args = PythonPipBuilder.std_args(self) + [ + f"--prefix={prefix}", + "--find-links=warpx-whl", + "pywarpx", + ] + + with working_dir(self.build_directory): + pip(*args) + + # todo: from PythonPipBuilder + # ....execute_install_time_tests() + @property def libs(self): libsuffix = {"1": "1d", "2": "2d", "3": "3d", "rz": "rz"} @@ -294,7 +500,14 @@ def copy_test_sources(self): install test subdirectory for use during `spack test run`.""" cache_extra_test_sources(self, [self.examples_src_dir]) + # TODO: remove installed static ablastr lib + # (if build as static lib - Spack default is shared) + # @run_after("install") + # def remove_unwanted_library(self): + # ... libablastr_{1d,2d,3d,rz}.a ... + def run_warpx(self, dim): + """Perform smoke tests on the installed package.""" if "+app" not in self.spec: raise SkipTest("Package must be installed with +app") if dim not in self.spec.variants["dims"].value: From cd682613cfca8d39598383aece17afd565f33e70 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 19 Aug 2024 07:35:33 +0200 Subject: [PATCH 372/435] dbcsr: avoid using a set in a message (#45804) --- var/spack/repos/builtin/packages/dbcsr/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dbcsr/package.py b/var/spack/repos/builtin/packages/dbcsr/package.py index 8f7df9adabcf77..f9c7581fc75fee 100644 --- a/var/spack/repos/builtin/packages/dbcsr/package.py +++ b/var/spack/repos/builtin/packages/dbcsr/package.py @@ -97,8 +97,8 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage): conflicts("+cuda", when="cuda_arch=none", msg=cuda_msg) - dbcsr_amdgpu_targets = {"gfx906", "gfx910", "gfx90a", "gfx90a:xnack-", "gfx90a:xnack+"} - amd_msg = "DBCSR only supports amdgpu_target {0}".format(dbcsr_amdgpu_targets) + dbcsr_amdgpu_targets = ("gfx906", "gfx910", "gfx90a", "gfx90a:xnack-", "gfx90a:xnack+") + amd_msg = f"DBCSR supports these AMD gpu targets: {', '.join(dbcsr_amdgpu_targets)}" for arch in ROCmPackage.amdgpu_targets: if arch not in dbcsr_amdgpu_targets: From 20bf239a6acb9b17e0578bb8065a215ac7e4d7a8 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 01:07:56 -0500 Subject: [PATCH 373/435] xorg-server: add variants dri and glx (#45787) Co-authored-by: wdconinc --- .../builtin/packages/xorg-server/package.py | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/xorg-server/package.py b/var/spack/repos/builtin/packages/xorg-server/package.py index 7f423d44c01540..55a7496827b05c 100644 --- a/var/spack/repos/builtin/packages/xorg-server/package.py +++ b/var/spack/repos/builtin/packages/xorg-server/package.py @@ -15,10 +15,16 @@ class XorgServer(AutotoolsPackage, XorgPackage): license("MIT") + version( + "1.18.99.902", sha256="fe5a312f7bdc6762c97f01b7a1d3c7a8691997255be6fbf7598c180abf384ea3" + ) version( "1.18.99.901", sha256="c8425163b588de2ee7e5c8e65b0749f2710f55a7e02a8d1dc83b3630868ceb21" ) + variant("glx", default=True, description="Build GLX extension") + variant("dri", default=True, description="Build DRI, DRI2, DRI3 extensions") + # glibc stopped declaring major()/minor() macros in # https://gitlab.freedesktop.org/xorg/xserver/-/commit/d732c36597fab2e9bc4f2aa72cf1110997697557 patch("sysmacros.patch", when="@:1.18 ^glibc@2.25:") @@ -35,14 +41,17 @@ def patch(self): depends_on("pixman@0.27.2:") depends_on("font-util") depends_on("libxshmfence@1.1:") - depends_on("libdrm@2.3.0:") + depends_on("libdrm@2.3.0:", when="+dri") depends_on("libx11") - depends_on("gl") + depends_on("gl", when="+dri") + depends_on("gl", when="+glx") - depends_on("dri2proto@2.8:", type="build") - depends_on("dri3proto@1.0:", type="build") - depends_on("glproto@1.4.17:", type="build") + depends_on("xf86driproto@2.1.0:", type="build", when="+dri") + depends_on("dri2proto@2.8:", type="build", when="+dri") + depends_on("dri3proto@1.0:", type="build", when="+dri") + depends_on("glproto@1.4.17:", type="build", when="+dri") + depends_on("glproto@1.4.17:", type="build", when="+glx") depends_on("flex", type="build") depends_on("bison", type="build") @@ -66,8 +75,6 @@ def patch(self): depends_on("recordproto@1.13.99.1:", type="build") depends_on("scrnsaverproto@1.1:", type="build") depends_on("resourceproto@1.2.0:", type="build") - depends_on("xf86driproto@2.1.0:", type="build") - depends_on("glproto@1.4.17:", type="build") depends_on("presentproto@1.0:", type="build") depends_on("xineramaproto", type="build") depends_on("libxkbfile") @@ -76,6 +83,7 @@ def patch(self): depends_on("libxdamage") depends_on("libxfixes") depends_on("libepoxy") + depends_on("libpciaccess") @when("@:1.19") def setup_build_environment(self, env): @@ -89,16 +97,27 @@ def setup_build_environment(self, env): def configure_args(self): args = [] + if self.spec.satisfies("+glx ^[virtuals=gl] osmesa"): + args.append("--enable-glx") + else: + args.append("--disable-glx") + + if self.spec.satisfies("+dri"): + args.append("--disable-dri") # dri requires libdri, not libdrm + args.append("--enable-dri2") + args.append("--enable-dri3") + args.append("--enable-drm") + else: + args.append("--disable-dri") + args.append("--disable-dri2") + args.append("--disable-dri3") + args.append("--disable-drm") + if self.spec.satisfies("^[virtuals=gl] osmesa"): args.append("--enable-glx") else: args.append("--disable-glx") - args.extend( - [ - "--disable-dri", # dri >= 7.8.0 - "--disable-glamor", # Glamor for Xorg requires gbm >= 10.2.0 - ] - ) + args.extend(["--disable-glamor"]) # Glamor for Xorg requires gbm >= 10.2.0 return args From 428b4e340a61610fb10f9843e4a66fca99a661a7 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sun, 18 Aug 2024 23:28:19 -0700 Subject: [PATCH 374/435] Remove deprecated `--safe-only` in spack version cmd (#45765) --- lib/spack/spack/cmd/versions.py | 15 +++------------ lib/spack/spack/test/cmd/versions.py | 7 ------- share/spack/spack-completion.bash | 2 +- share/spack/spack-completion.fish | 4 +--- 4 files changed, 5 insertions(+), 23 deletions(-) diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py index fb1a303713cd9f..2735b6a31f93bb 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -23,11 +23,6 @@ def setup_parser(subparser): output.add_argument( "-s", "--safe", action="store_true", help="only list safe versions of the package" ) - output.add_argument( - "--safe-only", - action="store_true", - help="[deprecated] only list safe versions of the package", - ) output.add_argument( "-r", "--remote", action="store_true", help="only list remote versions of the package" ) @@ -47,17 +42,13 @@ def versions(parser, args): safe_versions = pkg.versions - if args.safe_only: - tty.warn('"--safe-only" is deprecated. Use "--safe" instead.') - args.safe = args.safe_only - if not (args.remote or args.new): if sys.stdout.isatty(): tty.msg("Safe versions (already checksummed):") if not safe_versions: if sys.stdout.isatty(): - tty.warn("Found no versions for {0}".format(pkg.name)) + tty.warn(f"Found no versions for {pkg.name}") tty.debug("Manually add versions to the package.") else: colify(sorted(safe_versions, reverse=True), indent=2) @@ -83,12 +74,12 @@ def versions(parser, args): if not remote_versions: if sys.stdout.isatty(): if not fetched_versions: - tty.warn("Found no versions for {0}".format(pkg.name)) + tty.warn(f"Found no versions for {pkg.name}") tty.debug( "Check the list_url and list_depth attributes of " "the package to help Spack find versions." ) else: - tty.warn("Found no unchecksummed versions for {0}".format(pkg.name)) + tty.warn(f"Found no unchecksummed versions for {pkg.name}") else: colify(sorted(remote_versions, reverse=True), indent=2) diff --git a/lib/spack/spack/test/cmd/versions.py b/lib/spack/spack/test/cmd/versions.py index 8506be82216dbc..542365dacbba5e 100644 --- a/lib/spack/spack/test/cmd/versions.py +++ b/lib/spack/spack/test/cmd/versions.py @@ -11,13 +11,6 @@ versions = SpackCommand("versions") -def test_safe_only_versions(): - """Only test the safe versions of a package. - (Using the deprecated command line argument) - """ - versions("--safe-only", "zlib") - - def test_safe_versions(): """Only test the safe versions of a package.""" diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 139715fef79ea3..eba6b5a96d59be 100644 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -2022,7 +2022,7 @@ _spack_verify() { _spack_versions() { if $list_options then - SPACK_COMPREPLY="-h --help -s --safe --safe-only -r --remote -n --new -j --jobs" + SPACK_COMPREPLY="-h --help -s --safe -r --remote -n --new -j --jobs" else _all_packages fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index ae8f16e7b9ba64..4a905d2ddd226b 100644 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -3103,14 +3103,12 @@ complete -c spack -n '__fish_spack_using_command verify' -s f -l files -f -a typ complete -c spack -n '__fish_spack_using_command verify' -s f -l files -d 'treat entries as absolute filenames' # spack versions -set -g __fish_spack_optspecs_spack_versions h/help s/safe safe-only r/remote n/new j/jobs= +set -g __fish_spack_optspecs_spack_versions h/help s/safe r/remote n/new j/jobs= complete -c spack -n '__fish_spack_using_command_pos 0 versions' -f -a '(__fish_spack_packages)' complete -c spack -n '__fish_spack_using_command versions' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command versions' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command versions' -s s -l safe -f -a safe complete -c spack -n '__fish_spack_using_command versions' -s s -l safe -d 'only list safe versions of the package' -complete -c spack -n '__fish_spack_using_command versions' -l safe-only -f -a safe_only -complete -c spack -n '__fish_spack_using_command versions' -l safe-only -d '[deprecated] only list safe versions of the package' complete -c spack -n '__fish_spack_using_command versions' -s r -l remote -f -a remote complete -c spack -n '__fish_spack_using_command versions' -s r -l remote -d 'only list remote versions of the package' complete -c spack -n '__fish_spack_using_command versions' -s n -l new -f -a new From 1c081611ea95efd366f689afa82420c97e39cae0 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 01:33:02 -0500 Subject: [PATCH 375/435] graphviz: add v8.1.0 -> v12.1.0 (#45675) --- var/spack/repos/builtin/packages/graphviz/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 7dc85e89815ec2..7e5c1a30635abc 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -21,6 +21,11 @@ class Graphviz(AutotoolsPackage): license("EPL-1.0") + version("12.1.0", sha256="ad2023c23935397d4b5a34c14682f8098d2f20d2144c63d20d05be372757fdb1") + version("11.0.0", sha256="95173d21922082b0b2649fb24c1dc4bbc1e39504a92903b88df39804778cbb9d") + version("10.0.1", sha256="eaa60fea2b3ad904e3bf6919710c1ba3207ce31b5d7da1687dd3b734de8736f6") + version("9.0.0", sha256="5c0a6e60761e2e0f6cbb8baca958b643a06b9bb74ed5a2e4937ee7dbb49dead3") + version("8.1.0", sha256="ce8911695752aa2c3929147e3dee016e58aa624d81d7c18dd16f895ae79460de") version("8.0.5", sha256="c1901fe52483fad55fbf893ccd59a3dcaedd53f0d50b5aebbbf3deaba93b674d") version("8.0.1", sha256="19928f09f759676578b50101420b24475eb35f712ffbe8a97254f64b20fdbd03") version("7.1.0", sha256="7943c3fa0c55c779f595259f3b9e41c7ea6ed92f0aca0d24df917f631322dc01") @@ -44,7 +49,7 @@ class Graphviz(AutotoolsPackage): # Additional language bindings are nominally supported by GraphViz via SWIG # but are untested and need the proper dependencies added: - # language_bindings += ['sharp', 'go', 'guile', 'io', 'lua', 'ocaml', + # language_bindings += ['sharp', 'go', 'guile', 'io', 'lua', # 'perl', 'php', 'python', 'r', 'ruby', 'tcl'] for lang in language_bindings: @@ -198,8 +203,9 @@ def configure_args(self): "x", ]: args += self.with_or_without(var) - for var in ("expat", "java"): - if "+" + var in spec: + + for var, when in [("expat", "@:8.0"), ("java", "@:")]: + if spec.satisfies("+" + var + when): args.append("--with-{0}includedir={1}".format(var, spec[var].prefix.include)) args.append("--with-{0}libdir={1}".format(var, spec[var].prefix.lib)) From f63261dc6504aa157be86234e196bd8efb743ed4 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 01:40:56 -0500 Subject: [PATCH 376/435] ghostscript: add v10.01.2, v10.02.1, v10.03.1 (#45780) --- .../builtin/packages/ghostscript/package.py | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index 619264271e1a0a..843de73ad7861b 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -14,11 +14,15 @@ class Ghostscript(AutotoolsPackage): homepage = "https://ghostscript.com/" url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/ghostscript-9.26.tar.gz" + git = "https://git.ghostscript.com/ghostpdl.git" executables = [r"^gs$"] - license("AGPL-3.0-or-later") + license("AGPL-3.0-or-later", checked_by="wdconinc") + version("10.03.1", sha256="31cd01682ad23a801cc3bbc222a55f07c4ea3e068bdfb447792d54db21a2e8ad") + version("10.02.1", sha256="e429e4f5b01615a4f0f93a4128e8a1a4d932dff983b1774174c79c0630717ad9") + version("10.01.2", sha256="a4cd61a07fec161bee35da0211a5e5cde8ff8a0aaf942fc0176715e499d21661") version("10.0.0", sha256="a57764d70caf85e2fc0b0f59b83b92e25775631714dcdb97cc6e0cea414bb5a3") version("9.56.1", sha256="1598b9a38659cce8448d42a73054b2f9cbfcc40a9b97eeec5f22d4d6cd1de8e6") version("9.54.0", sha256="0646bb97f6f4d10a763f4919c54fa28b4fbdd3dff8e7de3410431c81762cade0") @@ -29,8 +33,11 @@ class Ghostscript(AutotoolsPackage): version("9.21", sha256="02bceadbc4dddeb6f2eec9c8b1623d945d355ca11b8b4df035332b217d58ce85") version("9.18", sha256="5fc93079749a250be5404c465943850e3ed5ffbc0d5c07e10c7c5ee8afbbdb1b") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + + # --enable-dynamic is deprecated, but kept as a variant since it used to be default + # https://github.com/ArtifexSoftware/ghostpdl/commit/fe0f842da782b097ce13c31fccacce2374ed6d4b + variant("dynamic", default=False, description="Enable dynamically loaded drivers") # https://www.ghostscript.com/ocr.html variant("tesseract", default=False, description="Use the Tesseract library for OCR") @@ -64,6 +71,9 @@ class Ghostscript(AutotoolsPackage): sha256="f3c2e56aa552a030c6db2923276ff2d140e39c511f92d9ef6c74a24776940af7", ) + build_targets = ["default", "so"] + install_targets = ["install", "soinstall"] + def url_for_version(self, version): baseurl = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs{0}/ghostscript-{1}.tar.gz" return baseurl.format(version.joined, version.dotted) @@ -93,20 +103,19 @@ def patch(self): ) def configure_args(self): - args = ["--disable-compile-inits", "--enable-dynamic", "--with-system-libtiff"] + args = ["--disable-compile-inits", "--with-system-libtiff"] if self.spec.satisfies("@9.53:"): args.extend(self.with_or_without("tesseract")) - return args - - def build(self, spec, prefix): - make() - make("so") + if self.spec.satisfies("+dynamic"): + args.append("--enable-dynamic") + if self.spec.satisfies("@10.01.0:"): + args.append("--disable-hidden-visibility") + else: + args.append("--disable-dynamic") - def install(self, spec, prefix): - make("install") - make("soinstall") + return args @classmethod def determine_version(cls, exe): From c260da5127a740255f256476776be067362ce4dc Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 01:42:03 -0500 Subject: [PATCH 377/435] shared-mime-info: fix url for certificate name mismatch (#45779) --- var/spack/repos/builtin/packages/shared-mime-info/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/shared-mime-info/package.py b/var/spack/repos/builtin/packages/shared-mime-info/package.py index 72ec9447bed4e0..e19a5cded12a1f 100644 --- a/var/spack/repos/builtin/packages/shared-mime-info/package.py +++ b/var/spack/repos/builtin/packages/shared-mime-info/package.py @@ -10,7 +10,7 @@ class SharedMimeInfo(AutotoolsPackage): """Database of common MIME types.""" homepage = "https://freedesktop.org/wiki/Software/shared-mime-info" - url = "http://freedesktop.org/~hadess/shared-mime-info-1.8.tar.xz" + url = "https://people.freedesktop.org/~hadess/shared-mime-info-1.8.tar.xz" license("GPL-2.0-or-later") From 0b3e1fd41289d84d005452595b2e2abf34d84a28 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 01:52:09 -0500 Subject: [PATCH 378/435] openssh: add v9.8p1 (#45736) Co-authored-by: wdconinc --- var/spack/repos/builtin/packages/openssh/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openssh/package.py b/var/spack/repos/builtin/packages/openssh/package.py index b39e33aee7be32..07ea7c9599b192 100755 --- a/var/spack/repos/builtin/packages/openssh/package.py +++ b/var/spack/repos/builtin/packages/openssh/package.py @@ -25,6 +25,7 @@ class Openssh(AutotoolsPackage): license("SSH-OpenSSH") + version("9.8p1", sha256="dd8bd002a379b5d499dfb050dd1fa9af8029e80461f4bb6c523c49973f5a39f3") version("9.7p1", sha256="490426f766d82a2763fcacd8d83ea3d70798750c7bd2aff2e57dc5660f773ffd") version("9.6p1", sha256="910211c07255a8c5ad654391b40ee59800710dd8119dd5362de09385aa7a777c") version("9.5p1", sha256="f026e7b79ba7fb540f75182af96dc8a8f1db395f922bbc9f6ca603672686086b") @@ -96,7 +97,13 @@ class Openssh(AutotoolsPackage): patch( "https://raw.githubusercontent.com/Homebrew/patches/d8b2d8c2612fd251ac6de17bf0cc5174c3aab94c/openssh/patch-sshd.c-apple-sandbox-named-external.diff", sha256="3505c58bf1e584c8af92d916fe5f3f1899a6b15cc64a00ddece1dc0874b2f78f", - when="platform=darwin", + when="@:9.7p1 platform=darwin", + ) + # same as above, but against sshd-session.c instead of sshd.c + patch( + "https://raw.githubusercontent.com/Homebrew/patches/aa6c71920318f97370d74f2303d6aea387fb68e4/openssh/patch-sshd.c-apple-sandbox-named-external.diff", + sha256="3f06fc03bcbbf3e6ba6360ef93edd2301f73efcd8069e516245aea7c4fb21279", + when="@9.8p1: platform=darwin", ) @classmethod From 6501705de2b5a154d4c54ab7d6819602cf174b2f Mon Sep 17 00:00:00 2001 From: dslarm <38504854+dslarm@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:01:09 +0100 Subject: [PATCH 379/435] armpl-gcc - finish enabling debian12 (#45744) --- .../repos/builtin/packages/armpl-gcc/package.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/armpl-gcc/package.py b/var/spack/repos/builtin/packages/armpl-gcc/package.py index 5afe7013520bc8..b6dffafb85a671 100644 --- a/var/spack/repos/builtin/packages/armpl-gcc/package.py +++ b/var/spack/repos/builtin/packages/armpl-gcc/package.py @@ -432,16 +432,10 @@ def install(self, spec, prefix): with when("@23:"): armpl_version = spec.version.string.split("_")[0] - if spec.satisfies("@:23"): - exe = Executable( - f"./arm-performance-libraries_{armpl_version}_" - + f"{get_os_or_pkg_manager(armpl_version)}.sh" - ) - else: - package_type = ( - "deb" if spack.platforms.host().default_os.startswith("ubuntu") else "rpm" - ) - exe = Executable(f"./arm-performance-libraries_{armpl_version}_{package_type}.sh") + exe = Executable( + f"./arm-performance-libraries_{armpl_version}_" + + f"{get_os_or_pkg_manager(armpl_version)}.sh" + ) exe("--accept", "--force", "--install-to", prefix) @property From 8561c89c254a0b56166ebc57d8037539556cb5c9 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 02:05:26 -0500 Subject: [PATCH 380/435] hadoop: add v3.3.3 -> v3.4.0 (#45735) --- var/spack/repos/builtin/packages/hadoop/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hadoop/package.py b/var/spack/repos/builtin/packages/hadoop/package.py index 6d34ce298fd9bc..3dfd038f016cee 100644 --- a/var/spack/repos/builtin/packages/hadoop/package.py +++ b/var/spack/repos/builtin/packages/hadoop/package.py @@ -14,9 +14,16 @@ class Hadoop(Package): homepage = "https://hadoop.apache.org/" url = "https://archive.apache.org/dist/hadoop/common/hadoop-3.3.2/hadoop-3.3.2.tar.gz" + list_url = "https://archive.apache.org/dist/hadoop/common" + list_depth = 1 - license("Apache-2.0") + license("Apache-2.0", checked_by="wdconinc") + version("3.4.0", sha256="e311a78480414030f9ec63549a5d685e69e26f207103d9abf21a48b9dd03c86c") + version("3.3.6", sha256="f5195059c0d4102adaa7fff17f7b2a85df906bcb6e19948716319f9978641a04") + version("3.3.5", sha256="446e05ca92fa23a60617a8b17946dede47281af1504041617cb7d5f62e74252a") + version("3.3.4", sha256="6a483d1a0b123490ebd8df3f71b64eb39f333f78b95f090aeb58e433cbc2416d") + version("3.3.3", sha256="fa71c61bbaa427129aef09fec028b34dd542c65ad90fdccec5e7ef93d83b8764") version("3.3.2", sha256="b341587495b12eec0b244b517f21df88eb46ef634dc7dc3e5969455b80ce2ce5") version("3.3.0", sha256="ea1a0f0afcdfb9b6b9d261cdce5a99023d7e8f72d26409e87f69bda65c663688") version("3.2.2", sha256="97e73b46c3972cd3c40c2295bd9488843c24e8503c36e7c57f6e6ecc4e12b8c3") @@ -29,8 +36,6 @@ class Hadoop(Package): version("2.7.7", sha256="d129d08a2c9dafec32855a376cbd2ab90c6a42790898cabbac6be4d29f9c2026") version("2.7.5", sha256="0bfc4d9b04be919be2fdf36f67fa3b4526cdbd406c512a7a1f5f1b715661f831") - depends_on("cxx", type="build") # generated - depends_on("java", type="run") def install(self, spec, prefix): From 22e40541c75ae952c0afb1011082f3220e3ae2a9 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Mon, 19 Aug 2024 09:19:17 +0200 Subject: [PATCH 381/435] CP2K: add 2024.2, fix dbcsr+g2g+plumed (#45614) --- var/spack/repos/builtin/packages/cp2k/package.py | 11 +++++++++-- var/spack/repos/builtin/packages/dbcsr/package.py | 1 + .../builtin/packages/dla-future-fortran/package.py | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 8c7dae2b7cf074..98f0d98327f75f 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -20,6 +20,7 @@ "60": "P100", "70": "V100", "80": "A100", + "90": "H100", "gfx906": "Mi50", "gfx908": "Mi100", "gfx90a": "Mi250", @@ -45,6 +46,7 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): license("GPL-2.0-or-later") + version("2024.2", sha256="cc3e56c971dee9e89b705a1103765aba57bf41ad39a11c89d3de04c8b8cdf473") version("2024.1", sha256="a7abf149a278dfd5283dc592a2c4ae803b37d040df25d62a5e35af5c4557668f") version("2023.2", sha256="adbcc903c1a78cba98f49fe6905a62b49f12e3dfd7cedea00616d1a5f50550db") version("2023.1", sha256="dff343b4a80c3a79363b805429bdb3320d3e1db48e0ff7d20a3dfd1c946a51ce") @@ -235,7 +237,7 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): depends_on("dla-future +cuda", when="+cuda") depends_on("dla-future +rocm", when="+rocm") - with when("@master"): + with when("@2024.2:"): depends_on("dla-future-fortran@0.1.0:") # Use a direct dependency on dla-future so that constraints can be expressed @@ -246,6 +248,11 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): depends_on("dla-future +cuda", when="+cuda") depends_on("dla-future +rocm", when="+rocm") + conflicts( + "+plumed", + when="@:2024.1 build_system=cmake", + msg="PLUMED support is broken in cp2k@:2024.1 with CMake", + ) with when("+plumed"): depends_on("plumed+shared") depends_on("plumed+mpi", when="+mpi") @@ -315,7 +322,7 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): # from the parent class, since the parent class defines constraints for all # versions. Instead just mark all unsupported cuda archs as conflicting. - supported_cuda_arch_list = ("35", "37", "60", "70", "80") + supported_cuda_arch_list = ("35", "37", "60", "70", "80", "90") supported_rocm_arch_list = ("gfx906", "gfx908", "gfx90a", "gfx90a:xnack-", "gfx90a:xnack+") cuda_msg = "cp2k only supports cuda_arch {0}".format(supported_cuda_arch_list) rocm_msg = "cp2k only supports amdgpu_target {0}".format(supported_rocm_arch_list) diff --git a/var/spack/repos/builtin/packages/dbcsr/package.py b/var/spack/repos/builtin/packages/dbcsr/package.py index f9c7581fc75fee..68c52540c5ae60 100644 --- a/var/spack/repos/builtin/packages/dbcsr/package.py +++ b/var/spack/repos/builtin/packages/dbcsr/package.py @@ -147,6 +147,7 @@ def cmake_args(self): "-DLAPACK_LIBRARIES=%s" % (spec["lapack"].libs.joined(";")), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("WITH_EXAMPLES", "examples"), + self.define_from_variant("WITH_G2G", "g2g"), ] # Switch necessary as a result of a bug. diff --git a/var/spack/repos/builtin/packages/dla-future-fortran/package.py b/var/spack/repos/builtin/packages/dla-future-fortran/package.py index ea6a50c7425626..184c2a4db25411 100644 --- a/var/spack/repos/builtin/packages/dla-future-fortran/package.py +++ b/var/spack/repos/builtin/packages/dla-future-fortran/package.py @@ -31,6 +31,7 @@ class DlaFutureFortran(CMakePackage): generator("ninja") depends_on("cmake@3.22:", type="build") + depends_on("pkgconfig", type="build") depends_on("dla-future@0.4.1:0.5 +scalapack", when="@0.1.0") depends_on("dla-future@0.6.0: +scalapack", when="@0.2.0:") From eed7a1af2478314911665acee0538f2afebaaca9 Mon Sep 17 00:00:00 2001 From: Alex Leute <36964815+alex391@users.noreply.github.com> Date: Mon, 19 Aug 2024 03:33:00 -0400 Subject: [PATCH 382/435] mlc-llm: new package and dependency (#44726) --- .../builtin/packages/apache-tvm/package.py | 36 ++++++++ .../repos/builtin/packages/mlc-llm/package.py | 89 +++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 var/spack/repos/builtin/packages/apache-tvm/package.py create mode 100644 var/spack/repos/builtin/packages/mlc-llm/package.py diff --git a/var/spack/repos/builtin/packages/apache-tvm/package.py b/var/spack/repos/builtin/packages/apache-tvm/package.py new file mode 100644 index 00000000000000..1c689da1a09388 --- /dev/null +++ b/var/spack/repos/builtin/packages/apache-tvm/package.py @@ -0,0 +1,36 @@ +# 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 ApacheTvm(CMakePackage, CudaPackage): + """Apache TVM is an open source machine learning compiler framework for + CPUs, GPUs, and machine learning accelerators. It aims to enable machine + learning engineers to optimize and run computations efficiently on any + hardware backend.""" + + homepage = "https://tvm.apache.org/" + url = "https://dlcdn.apache.org/tvm/tvm-v0.16.0/apache-tvm-src-v0.16.0.tar.gz" + + license("Apache-2.0", checked_by="alex391") + + version("0.16.0", sha256="55e2629c39248ef3b1ee280e34a960182bd17bea7ae0d0fa132bbdaaf5aba1ac") + + variant("llvm", default=True, description="Build with llvm for CPU codegen") + + depends_on("c", type="build") + depends_on("cxx", type="build") + depends_on("cmake@3.18:", type="build") + depends_on("python@3.7:3.8", type=("build", "run")) + depends_on("llvm@4:", type="build", when="+llvm") + depends_on("cuda@8:", when="+cuda") + + def cmake_args(self): + return [ + self.define_from_variant("USE_CUDA", "cuda"), + self.define_from_variant("USE_LLVM", "llvm"), + ] diff --git a/var/spack/repos/builtin/packages/mlc-llm/package.py b/var/spack/repos/builtin/packages/mlc-llm/package.py new file mode 100644 index 00000000000000..c2e1194ddf692c --- /dev/null +++ b/var/spack/repos/builtin/packages/mlc-llm/package.py @@ -0,0 +1,89 @@ +# 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 MlcLlm(CMakePackage, CudaPackage): + """MLC LLM is a machine learning compiler and high-performance deployment + engine for large language models. The mission of this project is to enable + everyone to develop, optimize, and deploy AI models natively on everyone's + platforms.""" + + homepage = "https://github.com/mlc-ai/mlc-llm" + git = "https://github.com/mlc-ai/mlc-llm.git" + url = "https://github.com/mlc-ai/mlc-llm/archive/refs/tags/v0.1.dev0.tar.gz" + + license("Apache-2.0", checked_by="alex391") + + version("2024-06-13", commit="ceba9511df3da06a8541916522d57fdc99cb6f54", submodules=True) + + depends_on("cmake@3.24:", type="build") + depends_on("rust", type="build") + depends_on("cxx", type="build") + depends_on("python@3.11", type="build") + depends_on("apache-tvm") + + depends_on("cuda@11.8:", when="+cuda") + + variant( + "flash-infer", + default=False, + description="Use FlashInfer? (need CUDA w/ compute capability 80;86;89;90)", + when="+cuda", + ) + conflicts("cuda_arch=none", when="+flash-infer") + + unsupported_flash_infer_cuda_archs = filter( + lambda arch: arch not in ["80", "86", "89", "90"], CudaPackage.cuda_arch_values + ) + for arch in unsupported_flash_infer_cuda_archs: + conflicts( + f"cuda_arch={arch}", + when="+flash-infer", + msg=f"CUDA architecture {arch} is not supported when +flash-infer", + ) + + def patch(self): + with open("cmake/config.cmake", "w") as f: + f.write(self._gen_cmake_config()) + + def _gen_cmake_config(self) -> str: + """ + Generate string for cmake/config.cmake (based on cmake/gen_cmake_config.py) + """ + + tvm_home = self.spec["apache-tvm"].prefix + + cmake_config_str = f"set(TVM_SOURCE_DIR {tvm_home})\n" + cmake_config_str += "set(CMAKE_BUILD_TYPE RelWithDebInfo)\n" + + if self.spec.satisfies("+cuda"): + cmake_config_str += "set(USE_CUDA ON)\n" + cmake_config_str += "set(USE_THRUST ON)\n" + else: + cmake_config_str += "set(USE_CUDA OFF)\n" + + # FlashInfer related + if self.spec.satisfies("+flash-infer"): + cmake_config_str += "set(USE_FLASHINFER ON)\n" + cmake_config_str += "set(FLASHINFER_ENABLE_FP8 OFF)\n" + cmake_config_str += "set(FLASHINFER_ENABLE_BF16 OFF)\n" + cmake_config_str += "set(FLASHINFER_GEN_GROUP_SIZES 1 4 6 8)\n" + cmake_config_str += "set(FLASHINFER_GEN_PAGE_SIZES 16)\n" + cmake_config_str += "set(FLASHINFER_GEN_HEAD_DIMS 128)\n" + cmake_config_str += "set(FLASHINFER_GEN_KV_LAYOUTS 0 1)\n" + cmake_config_str += "set(FLASHINFER_GEN_POS_ENCODING_MODES 0 1)\n" + cmake_config_str += 'set(FLASHINFER_GEN_ALLOW_FP16_QK_REDUCTIONS "false")\n' + cmake_config_str += 'set(FLASHINFER_GEN_CASUALS "false" "true")\n' + + cuda_archs = ";".join(self.spec.variants["cuda_arch"].value) + cmake_config_str += f"set(FLASHINFER_CUDA_ARCHITECTURES {cuda_archs})\n" + cmake_config_str += f"set(CMAKE_CUDA_ARCHITECTURES {cuda_archs})\n" + else: + cmake_config_str += "set(USE_FLASHINFER OFF)\n" + + return cmake_config_str From e49c6f68bc957553af92cb9f67d54dc9861f6506 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 02:44:00 -0500 Subject: [PATCH 383/435] maven: add v3.8.8, v3.9.8 (#45732) --- var/spack/repos/builtin/packages/maven/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/maven/package.py b/var/spack/repos/builtin/packages/maven/package.py index 348e88d521a81d..08fc690658e862 100644 --- a/var/spack/repos/builtin/packages/maven/package.py +++ b/var/spack/repos/builtin/packages/maven/package.py @@ -13,9 +13,13 @@ class Maven(Package): homepage = "https://maven.apache.org/index.html" url = "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.tar.gz" + list_url = "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/" + list_depth = 1 - license("Apache-2.0") + license("Apache-2.0", checked_by="wdconinc") + version("3.9.8", sha256="067672629075b740e3d0a928e21021dd615a53287af36d4ccca44e87e081d102") + version("3.8.8", sha256="17811e108701af5985bf5167abbd47c06e92c6c6bd1c13a1a1c095c9b4ecc32a") version("3.8.4", sha256="2cdc9c519427bb20fdc25bef5a9063b790e4abd930e7b14b4e9f4863d6f9f13c") version("3.6.3", sha256="26ad91d751b3a9a53087aefa743f4e16a17741d3915b219cf74112bf87a438c5") version("3.6.2", sha256="3fbc92d1961482d6fbd57fbf3dd6d27a4de70778528ee3fb44aa7d27eb32dfdc") From 856dd3417b609cefa785203b12f896e4d0923597 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 02:44:45 -0500 Subject: [PATCH 384/435] gradle: add through v8.9 (#45731) --- var/spack/repos/builtin/packages/gradle/package.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gradle/package.py b/var/spack/repos/builtin/packages/gradle/package.py index 10b69e7849baeb..5b78f6325c846c 100644 --- a/var/spack/repos/builtin/packages/gradle/package.py +++ b/var/spack/repos/builtin/packages/gradle/package.py @@ -17,8 +17,17 @@ class Gradle(Package): homepage = "https://gradle.org" url = "https://services.gradle.org/distributions/gradle-3.4-all.zip" - license("Apache-2.0") + license("Apache-2.0", checked_by="wdconinc") + version("8.9", sha256="258e722ec21e955201e31447b0aed14201765a3bfbae296a46cf60b70e66db70") + version("8.8", sha256="f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961") + version("8.7", sha256="194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0") + version("8.6", sha256="85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d") + version("8.5", sha256="c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b") + version("8.4", sha256="f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419") + version("8.3", sha256="bb09982fdf52718e4c7b25023d10df6d35a5fff969860bdf5a5bd27a3ab27a9e") + version("8.2.1", sha256="7c3ad722e9b0ce8205b91560fd6ce8296ac3eadf065672242fd73c06b8eeb6ee") + version("8.2", sha256="5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640") version("8.1.1", sha256="5625a0ae20fe000d9225d000b36909c7a0e0e8dda61c19b12da769add847c975") version("8.0.2", sha256="47a5bfed9ef814f90f8debcbbb315e8e7c654109acd224595ea39fca95c5d4da") version("7.3", sha256="00b273629df4ce46e68df232161d5a7c4e495b9a029ce6e0420f071e21316867") From e1ede9c04bb579b24d8d0b397560a0f2795a4f59 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 02:47:16 -0500 Subject: [PATCH 385/435] bind9: add v9.18.28, v9.20.0 (#45728) --- .../repos/builtin/packages/bind9/package.py | 26 ++++++++++--------- .../repos/builtin/packages/liburcu/package.py | 26 +++++++++++++++++++ 2 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 var/spack/repos/builtin/packages/liburcu/package.py diff --git a/var/spack/repos/builtin/packages/bind9/package.py b/var/spack/repos/builtin/packages/bind9/package.py index c80109971bf27b..ca6b6a995d2792 100644 --- a/var/spack/repos/builtin/packages/bind9/package.py +++ b/var/spack/repos/builtin/packages/bind9/package.py @@ -11,22 +11,24 @@ class Bind9(AutotoolsPackage): BIND 9 has evolved to be a very flexible, full-featured DNS system. """ - homepage = "https://github.com/isc-projects/bind9" - url = "https://github.com/isc-projects/bind9/archive/v9_14_6.tar.gz" + homepage = "https://www.isc.org" + url = "https://downloads.isc.org/isc/bind9/9.18.28/bind-9.18.28.tar.xz" + list_url = "https://downloads.isc.org/isc/bind9/" + git = "https://gitlab.isc.org/isc-projects/bind9" - license("Apache-2.0") + license("MPL-2.0", checked_by="wdconinc") - version("9_14_6", sha256="98be7a7b6d614b519f6c8d6ec7a8a39759ae9604d87228d9dc7c034471e5433e") + # Only even minor releases are stable + version("9.20.0", sha256="cc580998017b51f273964058e8cb3aa5482bc785243dea71e5556ec565a13347") + version("9.18.28", sha256="e7cce9a165f7b619eefc4832f0a8dc16b005d29e3890aed6008c506ea286a5e7") - depends_on("libuv", type="link") depends_on("pkgconfig", type="build") - depends_on("openssl", type="link") - depends_on("iconv", type="link") + + depends_on("libuv@1.34,1.37:", type="link") + depends_on("openssl@1.1.1:", type="link") + depends_on("libcap", type="link") + depends_on("liburcu@0.14:", type="link", when="@9.20:") def configure_args(self): - args = [ - "--without-python", - "--disable-linux-caps", - "--with-openssl={0}".format(self.spec["openssl"].prefix), - ] + args = ["--without-python", "--disable-doh"] return args diff --git a/var/spack/repos/builtin/packages/liburcu/package.py b/var/spack/repos/builtin/packages/liburcu/package.py new file mode 100644 index 00000000000000..31206595f3ca00 --- /dev/null +++ b/var/spack/repos/builtin/packages/liburcu/package.py @@ -0,0 +1,26 @@ +# 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 Liburcu(AutotoolsPackage): + """liburcu is a LGPLv2.1 userspace RCU (read-copy-update) library. + This data synchronization library provides read-side access which + scales linearly with the number of cores.""" + + homepage = "https://liburcu.org" + url = "https://lttng.org/files/urcu/userspace-rcu-0.14.0.tar.bz2" + git = "https://git.lttng.org/userspace-rcu.git" + + license("LGPL-2.1", checked_by="wdconinc") + + version("0.14.0", sha256="ca43bf261d4d392cff20dfae440836603bf009fce24fdc9b2697d837a2239d4f") + + depends_on("autoconf@2.69:", type="build") + depends_on("automake@1.12:", type="build") + + def patch(self): + filter_file("-Wl,-rpath ", "-Wl,-rpath,", "doc/examples/Makefile.in") From 430ba496d1989d4869c8f8a544f61e3b90f06850 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Mon, 19 Aug 2024 02:48:47 -0500 Subject: [PATCH 386/435] liftoff: add new package (#45726) Signed-off-by: Shane Nehring --- .../repos/builtin/packages/liftoff/package.py | 39 +++++++++++++++++++ .../builtin/packages/py-interlap/package.py | 21 ++++++++++ .../builtin/packages/py-pyfaidx/package.py | 15 ++++++- 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/liftoff/package.py create mode 100644 var/spack/repos/builtin/packages/py-interlap/package.py diff --git a/var/spack/repos/builtin/packages/liftoff/package.py b/var/spack/repos/builtin/packages/liftoff/package.py new file mode 100644 index 00000000000000..cbe9eb0f8893ed --- /dev/null +++ b/var/spack/repos/builtin/packages/liftoff/package.py @@ -0,0 +1,39 @@ +# 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 Liftoff(PythonPackage): + """Liftoff is a tool that accurately maps annotations in GFF or + GTF between assemblies of the same, or closely-related species. + """ + + homepage = "https://github.com/agshumate/Liftoff" + + pypi = "liftoff/Liftoff-1.6.3.2.tar.gz" + + git = "https://github.com/agshumate/Liftoff.git" + + maintainers("snehring") + + license("GPL-3.0-only", checked_by="snehring") + + version("1.6.3.2", sha256="7070a861144d0f043533893d39f95589a64d63f0365a99d06d71f1700b7fb758") + + depends_on("python@3:", type=("build", "run")) + + depends_on("py-setuptools", type="build") + + depends_on("py-numpy@1.22:", type=("build", "run")) + depends_on("py-biopython@1.76:", type=("build", "run")) + depends_on("py-gffutils@0.10.1:", type=("build", "run")) + depends_on("py-networkx@2.4:", type=("build", "run")) + depends_on("py-pysam@0.19.1:", type=("build", "run")) + depends_on("py-pyfaidx@0.5.8:", type=("build", "run")) + depends_on("py-interlap@0.2.6:", type=("build", "run")) + depends_on("py-ujson@3:", type=("build", "run")) + depends_on("py-parasail@1.2.1:", type=("build", "run")) + depends_on("minimap2", type="run") diff --git a/var/spack/repos/builtin/packages/py-interlap/package.py b/var/spack/repos/builtin/packages/py-interlap/package.py new file mode 100644 index 00000000000000..0990810990bf59 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-interlap/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyInterlap(PythonPackage): + """interlap: fast, simple interval overlap""" + + homepage = "https://brentp.github.io/interlap/index.html" + pypi = "interlap/interlap-0.2.7.tar.gz" + + maintainers("snehring") + + license("MIT", checked_by="snehring") + + version("0.2.7", sha256="31e4f30c54b067c4939049f5d8131ae5e2fa682ec71aa56f89c0e5b900806ec9") + + depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-pyfaidx/package.py b/var/spack/repos/builtin/packages/py-pyfaidx/package.py index 205f4e6a7f5619..3c3ebf2bf76b72 100644 --- a/var/spack/repos/builtin/packages/py-pyfaidx/package.py +++ b/var/spack/repos/builtin/packages/py-pyfaidx/package.py @@ -11,9 +11,20 @@ class PyPyfaidx(PythonPackage): pypi = "pyfaidx/pyfaidx-0.5.5.2.tar.gz" + maintainers("snehring") + license("BSD-3-Clause") + version("0.8.1.2", sha256="d8452470455b1e778f93969447db8ea24deb4624c7c40769516459cb6f87bc33") + version("0.6.4", sha256="7ba3bdcb1df4ba749f7665b34e6a052aa4e842406a0df95e6df4717cc123f392") version("0.5.5.2", sha256="9ac22bdc7b9c5d995d32eb9dc278af9ba970481636ec75c0d687d38c26446caa") - depends_on("py-setuptools@0.7:", type=("build", "run")) - depends_on("py-six", type=("build", "run")) + depends_on("python@3.7:", type=("build", "run"), when="@0.8.1.2:") + + depends_on("py-setuptools@0.7:", type="build") + depends_on("py-setuptools@45:", type="build", when="@0.8.1.2:") + depends_on("py-setuptools-scm", type="build", when="@0.8.1.2:") + depends_on("py-importlib-metadata", type="build", when="@0.8.1.2:") + depends_on("py-packaging", type=("build", "run"), when="@0.8.1.2:") + + depends_on("py-six", type=("build", "run"), when="@:0.6.4") From 6de51fdc58461ff70af1de29e9c8f95c54746dd7 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 02:55:28 -0500 Subject: [PATCH 387/435] librsvg: depends_on cairo +png (#45729) --- var/spack/repos/builtin/packages/librsvg/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/librsvg/package.py b/var/spack/repos/builtin/packages/librsvg/package.py index 71a0a90d75d641..f1d7437538ad94 100644 --- a/var/spack/repos/builtin/packages/librsvg/package.py +++ b/var/spack/repos/builtin/packages/librsvg/package.py @@ -37,9 +37,9 @@ class Librsvg(AutotoolsPackage): depends_on("gtk-doc", type="build", when="+doc") # requirements according to `configure` file - depends_on("cairo@1.16:+gobject", when="@2.50:") - depends_on("cairo@1.15.12:+gobject", when="@2.44.14:") - depends_on("cairo@1.2.0:+gobject") + depends_on("cairo@1.16:+gobject+png", when="@2.50:") + depends_on("cairo@1.15.12:+gobject+png", when="@2.44.14:") + depends_on("cairo@1.2.0:+gobject+png") depends_on("libcroco@0.6.1:", when="@:2.44.14") depends_on("gdk-pixbuf@2.20:") depends_on("glib@2.50:", when="@2.50:") From 78fc25ec125288862430a5226ac1c3815c553d6d Mon Sep 17 00:00:00 2001 From: Pranav Sivaraman Date: Mon, 19 Aug 2024 04:04:09 -0400 Subject: [PATCH 388/435] magic-enum: fix minimum compiler versions conflicts (#45705) --- .../repos/builtin/packages/magic-enum/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/magic-enum/package.py b/var/spack/repos/builtin/packages/magic-enum/package.py index faa5b67ec2c3f3..fbd65c3d907023 100644 --- a/var/spack/repos/builtin/packages/magic-enum/package.py +++ b/var/spack/repos/builtin/packages/magic-enum/package.py @@ -21,24 +21,24 @@ class MagicEnum(CMakePackage): version("0.9.6", sha256="814791ff32218dc869845af7eb89f898ebbcfa18e8d81aa4d682d18961e13731") variant("examples", default=False, description="Enable examples") - variant("tests", default=True, description="Enable tests") - # minimum supported versions - conflicts("%clang@:5") - conflicts("%gcc@:9") - conflicts("%msvc@:14.11") - conflicts("%apple-clang@:10") + with default_args(msg="Compiler version is too old"): + conflicts("%clang@:4") + conflicts("%gcc@:8") + conflicts("%msvc@:14.10") + conflicts("%apple-clang@:9") depends_on("cxx", type="build") depends_on("cmake@3.14:", type="build") def cmake_args(self): + define = self.define from_variant = self.define_from_variant args = [ + define("MAGIC_ENUM_OPT_BUILD_TESTS", self.run_tests), from_variant("MAGIC_ENUM_OPT_BUILD_EXAMPLES", "examples"), - from_variant("MAGIC_ENUM_OPT_BUILD_TESTS", "tests"), ] return args From 796617054de961ab9c2e5ed581d78b545470fd34 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Mon, 19 Aug 2024 04:05:39 -0400 Subject: [PATCH 389/435] py-pyyaml: add v6.0.2 (#45716) --- .../builtin/packages/py-pyyaml/package.py | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py index 1e995439a2dbaf..7093ec8dd88f76 100644 --- a/var/spack/repos/builtin/packages/py-pyyaml/package.py +++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py @@ -10,11 +10,19 @@ class PyPyyaml(PythonPackage): """PyYAML is a YAML parser and emitter for Python.""" homepage = "https://pyyaml.org/wiki/PyYAML" - pypi = "PyYAML/PyYAML-5.3.1.tar.gz" + pypi = "pyyaml/pyyaml-6.0.2.tar.gz" git = "https://github.com/yaml/pyyaml.git" + maintainers("mathomp4") + license("MIT") + # Advice for Maintainers: + # PyYAML went from a mixed case tarfile name to a lowercase one in 6.0.2 + # (see url_for_version below). Since "spack checksum" does not use url_for_version, + # for versions older than 6.0.2, you'll need to use "spack checksum py-pyyaml x.y.z" + # as we changed the pypi url above to lowercase. + version("6.0.2", sha256="d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e") version("6.0.1", sha256="bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43") version("6.0", sha256="68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2") version("5.4.1", sha256="607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e") @@ -38,7 +46,16 @@ class PyPyyaml(PythonPackage): conflicts("^python@3.11:", when="@:5.3") # https://github.com/yaml/pyyaml/issues/601 - conflicts("^py-cython@3:") + # 6.0.2+ do now support Cython 3 per release notes + conflicts("^py-cython@3:", when="@:6.0.1") + + # With pyyaml 6.0.2, the tarfile changed from PyYAML-6.0.1.tar.gz to pyyaml-6.0.2.tar.gz + def url_for_version(self, version): + if version >= Version("6.0.2"): + url = "https://pypi.io/packages/source/p/pyyaml/pyyaml-{0}.tar.gz" + else: + url = "https://pypi.io/packages/source/P/PyYAML/PyYAML-{0}.tar.gz" + return url.format(version.dotted) @property def import_modules(self): From 3798b16a29e4d56cea4a4fa5326373795ca4262b Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Mon, 19 Aug 2024 10:09:43 +0200 Subject: [PATCH 390/435] py-brain-indexer: new package (#44718) --- .../packages/py-brain-indexer/package.py | 37 +++++++++++++++++++ .../builtin/packages/py-docopt-ng/package.py | 19 ++++++++++ .../packages/py-pdm-backend/package.py | 19 ++++++++++ 3 files changed, 75 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-brain-indexer/package.py create mode 100644 var/spack/repos/builtin/packages/py-docopt-ng/package.py create mode 100644 var/spack/repos/builtin/packages/py-pdm-backend/package.py diff --git a/var/spack/repos/builtin/packages/py-brain-indexer/package.py b/var/spack/repos/builtin/packages/py-brain-indexer/package.py new file mode 100644 index 00000000000000..28381e6f95dcb1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-brain-indexer/package.py @@ -0,0 +1,37 @@ +# 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 PyBrainIndexer(PythonPackage): + """Spatial indexer for geometries and morphologies""" + + homepage = "https://github.com/BlueBrain/brain-indexer" + pypi = "brain-indexer/brain_indexer-3.0.0.tar.gz" + + license("Apache-2.0", checked_by="matz-e") + + maintainers("matz-e") + + version("3.0.0", sha256="23947519df5f87c65781d1776f02e8e17798c40c617399b02e6ecae8e09a0a72") + + variant("mpi", default=True, description="Enable MPI parallelism") + + depends_on("py-scikit-build-core+pyproject@:0.7", type="build") + depends_on("py-setuptools-scm@8.0:", type="build") + depends_on("cmake@3.5:") + depends_on("boost@1.79.0: +filesystem+serialization") + depends_on("py-docopt-ng", type=("build", "run")) + depends_on("py-libsonata", type=("build", "run")) + depends_on("py-morphio", type=("build", "run")) + depends_on("py-numpy-quaternion", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) + depends_on("py-tqdm", type=("build", "run")) + + depends_on("mpi", when="+mpi") + depends_on("py-mpi4py", type=("build", "run"), when="+mpi") + + def config_settings(self, spec, prefix): + return {"cmake.define.CMAKE_INSTALL_RPATH_USE_LINK_PATH": "ON"} diff --git a/var/spack/repos/builtin/packages/py-docopt-ng/package.py b/var/spack/repos/builtin/packages/py-docopt-ng/package.py new file mode 100644 index 00000000000000..7a0c927469edba --- /dev/null +++ b/var/spack/repos/builtin/packages/py-docopt-ng/package.py @@ -0,0 +1,19 @@ +# 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 PyDocoptNg(PythonPackage): + """Command-line interface description language.""" + + homepage = "https://github.com/jazzband/docopt-ng" + pypi = "docopt-ng/docopt_ng-0.6.2.tar.gz" + + license("MIT", checked_by="matz-e") + + version("0.9.0", sha256="91c6da10b5bb6f2e9e25345829fb8278c78af019f6fc40887ad49b060483b1d7") + + depends_on("py-pdm-backend", type="build") diff --git a/var/spack/repos/builtin/packages/py-pdm-backend/package.py b/var/spack/repos/builtin/packages/py-pdm-backend/package.py new file mode 100644 index 00000000000000..c3aebb38b76f76 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pdm-backend/package.py @@ -0,0 +1,19 @@ +# 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 PyPdmBackend(PythonPackage): + """The build backend used by PDM that supports latest packaging standards""" + + homepage = "https://backend.pdm-project.org/" + pypi = "pdm_backend/pdm_backend-2.3.0.tar.gz" + + license("MIT", checked_by="matz-e") + + version("2.3.0", sha256="e39ed2da206d90d4a6e9eb62f6dce54ed4fa65ddf172a7d5700960d0f8a09e09") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-importlib-metadata@3.6:", type=("build", "run"), when="^python@:3.9") From 886c9504237677be369be78d8e7d25f129df603e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Aug 2024 10:11:08 +0200 Subject: [PATCH 391/435] py-keras: add v3.5 (#45711) --- .../builtin/packages/py-keras/package.py | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-keras/package.py b/var/spack/repos/builtin/packages/py-keras/package.py index e2456f9e66a4db..548e1a01449f82 100644 --- a/var/spack/repos/builtin/packages/py-keras/package.py +++ b/var/spack/repos/builtin/packages/py-keras/package.py @@ -22,6 +22,7 @@ class PyKeras(PythonPackage): maintainers("adamjstewart") license("Apache-2.0") + version("3.5.0", sha256="53ae4f9472ec9d9c6941c82a3fda86969724ace3b7630a94ba0a1f17ba1065c3") version("3.4.1", sha256="34cd9aeaa008914715149234c215657ca758e1b473bd2aab2e211ac967d1f8fe") version("3.4.0", sha256="c4b05b150b1c4df27b4a17efd137b2d5e20f385f146fd48636791d675e75059d") version("3.3.3", sha256="f2fdffc8434fd77045cf8fb21816dbaa2308d5f76974ca924b2f60b40433b1a0") @@ -79,8 +80,6 @@ class PyKeras(PythonPackage): depends_on("python@3.8:", when="@2.12:") depends_on("py-absl-py", when="@2.6:") depends_on("py-numpy") - # https://github.com/keras-team/keras/issues/19691 - depends_on("py-numpy@:1") depends_on("py-rich", when="@3:") depends_on("py-namex@0.0.8:", when="@3.3.3:") depends_on("py-namex", when="@3:") @@ -96,21 +95,27 @@ class PyKeras(PythonPackage): depends_on("py-protobuf", when="@3:") # requirements-tensorflow-cuda.txt - depends_on("py-tensorflow@2.16.1:2.16", when="@3.0: backend=tensorflow") + with when("backend=tensorflow"): + depends_on("py-tensorflow@2.17", when="@3.5:") + depends_on("py-tensorflow@2.16.1:2.16", when="@3.0:3.4") # requirements-jax-cuda.txt - depends_on("py-jax@0.4.23", when="@3.0.5: backend=jax") - depends_on("py-jax", when="@3: backend=jax") + with when("backend=jax"): + depends_on("py-jax@0.4.23", when="@3.0.5:") + depends_on("py-jax", when="@3:") # requirements-torch-cuda.txt - depends_on("py-torch@2.2.1", when="@3.1.0: backend=torch") - depends_on("py-torch@2.1.2", when="@3.0.3:3.0.5 backend=torch") - depends_on("py-torch@2.1.1", when="@3.0.1:3.0.2 backend=torch") - depends_on("py-torch@2.1.0", when="@3.0.0 backend=torch") - depends_on("py-torchvision@0.17.1", when="@3.1.0: backend=torch") - depends_on("py-torchvision@0.16.2", when="@3.0.3:3.0.5 backend=torch") - depends_on("py-torchvision@0.16.1", when="@3.0.1:3.0.2 backend=torch") - depends_on("py-torchvision@0.16.0", when="@3.0.0 backend=torch") + with when("backend=torch"): + depends_on("py-torch@2.4.0", when="@3.5:") + depends_on("py-torch@2.2.1", when="@3.1:3.4") + depends_on("py-torch@2.1.2", when="@3.0.3:3.0.5") + depends_on("py-torch@2.1.1", when="@3.0.1:3.0.2") + depends_on("py-torch@2.1.0", when="@3.0.0") + depends_on("py-torchvision@0.19.0", when="@3.5:") + depends_on("py-torchvision@0.17.1", when="@3.1:3.4") + 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") # Historical dependencies with default_args(type="build"): @@ -120,6 +125,8 @@ class PyKeras(PythonPackage): with default_args(type=("build", "run")): depends_on("pil", when="@:2") depends_on("py-dm-tree", when="@3.0") + # https://github.com/keras-team/keras/issues/19691 + depends_on("py-numpy@:1", when="@:3.4") depends_on("py-portpicker", when="@2.10:2") depends_on("py-pydot", when="@:2") depends_on("py-pyyaml", when="@:2") From 382ba0d041264e9ce30a28f6180a5928264ca163 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 03:26:10 -0500 Subject: [PATCH 392/435] mlpack: add through v4.4.0 (#45707) --- var/spack/repos/builtin/packages/mlpack/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mlpack/package.py b/var/spack/repos/builtin/packages/mlpack/package.py index f6432688957c41..a716e05cd1fd3d 100644 --- a/var/spack/repos/builtin/packages/mlpack/package.py +++ b/var/spack/repos/builtin/packages/mlpack/package.py @@ -18,8 +18,11 @@ class Mlpack(CMakePackage): maintainers("wdconinc") - license("BSD-3-Clause") + license("BSD-3-Clause", checked_by="wdconinc") + version("4.4.0", sha256="61c604026d05af26c244b0e47024698bbf150dfcc9d77b64057941d7d64d6cf6") + version("4.3.0", sha256="08cd54f711fde66fc3b6c9db89dc26776f9abf1a6256c77cfa3556e2a56f1a3d") + version("4.2.1", sha256="2d2b8d61dc2e3179e0b6fefd5c217c57aa168c4d0b9c6868ddb94f6395a80dd5") version("4.2.0", sha256="f780df984a71029e62eeecdd145fb95deb71b133cefc7840de0ec706d116dd60") version("4.1.0", sha256="e0c760baf15fd0af5601010b7cbc536e469115e9dd45f96712caa3b651b1852a") version("4.0.1", sha256="4c746936ed9da9f16744240ed7b9f2815d3abb90c904071a1d1a628a9bbfb3a5") @@ -39,6 +42,10 @@ class Mlpack(CMakePackage): depends_on("ensmallen@2.10.0:") depends_on("cereal@1.1.2:") + # Compiler conflicts + conflicts("%gcc@:4", when="@4.0:", msg="mlpack 4.0+ requires at least gcc-5 with C++14") + conflicts("%gcc@:7", when="@4.4:", msg="mlpack 4.4+ requires at least gcc-8 with C++17") + # TODO: Go bindings are not supported due to the absence of gonum in spack # with when("+go"): # # ref: src/mlpack/bindings/go/CMakeLists.txt From 31477d5dc76d789875ae3b5e7f470fa349923cc7 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 03:28:57 -0500 Subject: [PATCH 393/435] activeharmony: replace dead links (#45704) --- var/spack/repos/builtin/packages/activeharmony/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py index caaaafa58534e8..d9954d44d2c516 100644 --- a/var/spack/repos/builtin/packages/activeharmony/package.py +++ b/var/spack/repos/builtin/packages/activeharmony/package.py @@ -10,13 +10,13 @@ class Activeharmony(MakefilePackage): """Active Harmony: a framework for auto-tuning (the automated search for values to improve the performance of a target application).""" - homepage = "https://www.dyninst.org/harmony" - url = "https://www.dyninst.org/sites/default/files/downloads/harmony/ah-4.5.tar.gz" + homepage = "https://github.com/ActiveHarmony/harmony" + url = "https://github.com/ActiveHarmony/harmony/archive/refs/tags/v4.5.tar.gz" license("LGPL-3.0-only") - version("4.6.0", sha256="9ce5009cfd8e2f4cf5f3536e1fea9993414fc25920fc90d0a2cb56f044787dbb") - version("4.5", sha256="31d9990c8dd36724d336707d260aa4d976e11eaa899c4c7cc11f80a56cdac684") + version("4.6.0", sha256="01011c0c455fca31e5806b03743e27a12161c152253370894876f851242ccd51") + version("4.5", sha256="74bde94f6c4f710a5003b0111f27fe3ba98161505e0155a87e94dd209b586951") patch( "fix_logical_bug_in_slave_list_parsing.patch", From a7313dc407b55bf0799fcc8aca0b1b5f362cd7f8 Mon Sep 17 00:00:00 2001 From: Luke Robison <108305344+lrbison@users.noreply.github.com> Date: Mon, 19 Aug 2024 03:30:18 -0500 Subject: [PATCH 394/435] WRF: add -fpermissive when using gcc@14: (#45438) --- var/spack/repos/builtin/packages/wrf/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/wrf/package.py b/var/spack/repos/builtin/packages/wrf/package.py index 6ffc1a42eacf6e..bbc5aabd0b6e30 100644 --- a/var/spack/repos/builtin/packages/wrf/package.py +++ b/var/spack/repos/builtin/packages/wrf/package.py @@ -402,6 +402,12 @@ def do_configure_fixup(self): if self.spec.satisfies("@:4.0.3 %intel@2018:"): config.filter(r"-openmp", "-qopenmp") + if self.spec.satisfies("%gcc@14:"): + config.filter( + "^CFLAGS_LOCAL(.*?)=([^#\n\r]*)(.*)$", r"CFLAGS_LOCAL\1= \2 -fpermissive \3" + ) + config.filter("^CC_TOOLS(.*?)=([^#\n\r]*)(.*)$", r"CC_TOOLS\1=\2 -fpermissive \3") + @run_before("configure") def fortran_check(self): if not self.compiler.fc: From c71d7788750ee008a289fd59030b158911cd1a93 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Mon, 19 Aug 2024 03:38:56 -0500 Subject: [PATCH 395/435] salmon: add v1.10.3 (#45695) Signed-off-by: Shane Nehring --- .../repos/builtin/packages/salmon/package.py | 19 ++++++++++-- .../builtin/packages/staden-io-lib/package.py | 29 ++++++++++++++----- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/salmon/package.py b/var/spack/repos/builtin/packages/salmon/package.py index 13d9b718657a30..b4dccd0497da20 100644 --- a/var/spack/repos/builtin/packages/salmon/package.py +++ b/var/spack/repos/builtin/packages/salmon/package.py @@ -15,6 +15,7 @@ class Salmon(CMakePackage): license("GPL-3.0-only") + version("1.10.3", sha256="a053fba63598efc4ade3684aa2c8e8e2294186927d4fcdf1041c36edc2aa0871") version("1.10.2", sha256="976989182160fef3afb4429ee8b85d8dd39ed6ca212bb14d6a65cde0e985fb98") version("1.9.0", sha256="450d953a5c43fe63fd745733f478d3fbaf24d926cb52731fd38ee21c4990d613") version("1.4.0", sha256="6d3e25387450710f0aa779a1e9aaa9b4dec842324ff8551d66962d7c7606e71d") @@ -23,8 +24,8 @@ class Salmon(CMakePackage): version("0.9.1", sha256="3a32c28d217f8f0af411c77c04144b1fa4e6fd3c2f676661cc875123e4f53520") version("0.8.2", sha256="299168e873e71e9b07d63a84ae0b0c41b0876d1ad1d434b326a5be2dce7c4b91") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") variant( "build_type", @@ -58,6 +59,8 @@ class Salmon(CMakePackage): depends_on("bzip2") depends_on("libdivsufsort") depends_on("staden-io-lib~curl") + # docs suggest libdeflate is slightly faster + depends_on("staden-io-lib~curl+libdeflate~shared@1.15:", when="@1.10.3:") depends_on("libgff") depends_on("pkgconfig") depends_on("curl", when="@0.14.1:") @@ -68,6 +71,11 @@ class Salmon(CMakePackage): conflicts("%gcc@:5.1", when="@0.14.1:") resources = [ + ( + "1.10.3", + "pufferfish", + "52b6699de0d33814b73edb3455175568c2330d8014be017dce7b564e54134860", + ), ( "1.10.2", "pufferfish", @@ -91,7 +99,7 @@ class Salmon(CMakePackage): for ver, repo, checksum in resources: resource( - name="rapmap", + name=repo, url="https://github.com/COMBINE-lab/{0}/archive/salmon-v{1}.zip".format(repo, ver), sha256=checksum, placement="external", @@ -135,6 +143,11 @@ def patch(self): ) filter_file("curl -k.*", "", "scripts/fetchPufferfish.sh") + if self.spec.satisfies("@1.10.3:"): + findstadenio_module = join_path("cmake", "Modules", "Findlibstadenio.cmake") + filter_file("PACKAGE_VERSION", "IOLIB_VERSION", findstadenio_module, string=True) + filter_file("io_lib_config.h", "version.h", findstadenio_module, string=True) + def cmake_args(self): args = ["-DBOOST_ROOT=%s" % self.spec["boost"].prefix] diff --git a/var/spack/repos/builtin/packages/staden-io-lib/package.py b/var/spack/repos/builtin/packages/staden-io-lib/package.py index ef539eed36af98..36bd498913f067 100644 --- a/var/spack/repos/builtin/packages/staden-io-lib/package.py +++ b/var/spack/repos/builtin/packages/staden-io-lib/package.py @@ -10,24 +10,37 @@ class StadenIoLib(AutotoolsPackage): """Io_lib is a library for reading/writing various bioinformatics file formats.""" - homepage = "https://staden.sourceforge.net/" - url = ( - "https://sourceforge.net/projects/staden/files/io_lib/1.14.8/io_lib-1.14.8.tar.gz/download" - ) + homepage = "https://github.com/jkbonfield/io_lib" license("BSD-3-Clause") - version("1.14.8", sha256="3bd560309fd6d70b14bbb8230e1baf8706b804eb6201220bb6c3d6db72003d1b") + maintainers("snehring") + + version("1.15.0", sha256="ad343dac7c77086db1b54585c5887b26eda6430d1639d111dd3304c3b749494f") + version("1.14.9", sha256="8d0732f3d37abba1633731bfacac5fd7f8172eccb1cef224e8ced904d3b242f4") + version( + "1.14.8", + sha256="3bd560309fd6d70b14bbb8230e1baf8706b804eb6201220bb6c3d6db72003d1b", + url="https://sourceforge.net/projects/staden/files/io_lib/1.14.8/io_lib-1.14.8.tar.gz/download", + ) - depends_on("c", type="build") # generated + depends_on("c", type="build") + variant("libdeflate", default=False, description="Build with libdeflate") variant("curl", default=False, description="Build with curl support") + variant("shared", default=True, description="Build shared libraries") - depends_on("zlib-api") + depends_on("zlib-api", when="~libdeflate") + depends_on("libdeflate", when="+libdeflate") + depends_on("bzip2") + depends_on("xz") depends_on("curl", when="+curl") + def url_for_version(self, version): + return f"https://github.com/jkbonfield/io_lib/releases/download/io_lib-{version.dashed}/io_lib-{version.dotted}.tar.gz" + def configure_args(self): - args = [] + args = self.enable_or_disable("shared") if self.spec.satisfies("~curl"): args.append("--without-libcurl") From c65fd7e12df57348a0eb6407200a9a7eb17630ba Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 19 Aug 2024 03:45:49 -0500 Subject: [PATCH 396/435] apfel: add v3.1.1 (now CMakePackage) (#45661) Co-authored-by: wdconinc Co-authored-by: Massimiliano Culpo --- .../repos/builtin/packages/apfel/package.py | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/apfel/package.py b/var/spack/repos/builtin/packages/apfel/package.py index 29fe90c04b8554..790f0c97b87a78 100644 --- a/var/spack/repos/builtin/packages/apfel/package.py +++ b/var/spack/repos/builtin/packages/apfel/package.py @@ -3,10 +3,11 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.build_systems import autotools, cmake from spack.package import * -class Apfel(AutotoolsPackage): +class Apfel(AutotoolsPackage, CMakePackage): """APFEL is a library able to perform DGLAP evolution up to NNLO in QCD and to NLO in QED, both with pole and MSbar masses. The coupled DGLAP QCD+QED evolution equations are solved in x-space by means of higher @@ -19,25 +20,44 @@ class Apfel(AutotoolsPackage): license("GPL-3.0-or-later") + build_system( + conditional("autotools", when="@:3.0"), conditional("cmake", when="@3.1:"), default="cmake" + ) + + version("3.1.1", sha256="9006b2a9544e504e8f6b5047f665054151870c3c3a4a05db3d4fb46f21908d4b") version("3.0.6", sha256="7063c9eee457e030b97926ac166cdaedd84625b31397e1dfd01ae47371fb9f61") version("3.0.4", sha256="c7bfae7fe2dc0185981850f2fe6ae4842749339d064c25bf525b4ef412bbb224") - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("cxx", type="build") + depends_on("fortran", type="build") + + with when("build_system=cmake"): + depends_on("cmake@03.15:") + extends("python", when="+python") depends_on("swig", when="+python") - depends_on("python", type=("build", "run")) + depends_on("python", when="+python", type=("build", "run")) depends_on("lhapdf", when="+lhapdf", type=("build", "run")) variant("python", description="Build python wrapper", default=False) variant("lhapdf", description="Link to LHAPDF", default=False) + +class CMakeBuilder(cmake.CMakeBuilder): + def cmake_args(self): + args = [ + self.define_from_variant("APFEL_ENABLE_PYTHON", "python"), + self.define_from_variant("APFEL_ENABLE_LHAPDF", "lhapdf"), + ] + # ensure installation of python module under CMAKE_INSTALL_PREFIX + if self.spec.satisfies("+python"): + args.append(self.define("APFEL_Python_SITEARCH", "autoprefix")) + return args + + +class AutotoolsBuilder(autotools.AutotoolsBuilder): def configure_args(self): args = [] - if self.spec.satisfies("~python"): - args.append("--disable-pywrap") - else: - args.append("--enable-pywrap") - + args += self.enable_or_disable("pywrap", variant="python") args += self.enable_or_disable("lhapdf") return args From 57769fac7d57b55394b2ed8cc07f631904e7538b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 19 Aug 2024 11:34:13 +0200 Subject: [PATCH 397/435] Simplify URLFetchStrategy (#45741) --- lib/spack/spack/fetch_strategy.py | 171 +++++++++--------------------- lib/spack/spack/oci/oci.py | 2 +- lib/spack/spack/patch.py | 2 +- lib/spack/spack/stage.py | 31 +++--- lib/spack/spack/test/conftest.py | 2 +- lib/spack/spack/test/gcs_fetch.py | 51 ++------- lib/spack/spack/test/mirror.py | 2 +- lib/spack/spack/test/packaging.py | 2 +- lib/spack/spack/test/s3_fetch.py | 53 ++------- lib/spack/spack/test/url_fetch.py | 10 +- 10 files changed, 93 insertions(+), 233 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 589b341f5c0cb8..fd313e0463c304 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -54,7 +54,7 @@ import spack.version import spack.version.git_ref_lookup from spack.util.compression import decompressor_for -from spack.util.executable import CommandNotFoundError, which +from spack.util.executable import CommandNotFoundError, Executable, which #: List of all fetch strategies, created by FetchStrategy metaclass. all_strategies = [] @@ -246,33 +246,28 @@ class URLFetchStrategy(FetchStrategy): # these are checksum types. The generic 'checksum' is deprecated for # specific hash names, but we need it for backward compatibility - optional_attrs = list(crypto.hashes.keys()) + ["checksum"] + optional_attrs = [*crypto.hashes.keys(), "checksum"] - def __init__(self, url=None, checksum=None, **kwargs): + def __init__(self, *, url: str, checksum: Optional[str] = None, **kwargs) -> None: super().__init__(**kwargs) - # Prefer values in kwargs to the positionals. - self.url = kwargs.get("url", url) + self.url = url self.mirrors = kwargs.get("mirrors", []) # digest can be set as the first argument, or from an explicit # kwarg by the hash name. - self.digest = kwargs.get("checksum", checksum) + self.digest: Optional[str] = checksum for h in self.optional_attrs: if h in kwargs: self.digest = kwargs[h] - self.expand_archive = kwargs.get("expand", True) - self.extra_options = kwargs.get("fetch_options", {}) - self._curl = None - - self.extension = kwargs.get("extension", None) - - if not self.url: - raise ValueError("URLFetchStrategy requires a url for fetching.") + self.expand_archive: bool = kwargs.get("expand", True) + self.extra_options: dict = kwargs.get("fetch_options", {}) + self._curl: Optional[Executable] = None + self.extension: Optional[str] = kwargs.get("extension", None) @property - def curl(self): + def curl(self) -> Executable: if not self._curl: self._curl = web_util.require_curl() return self._curl @@ -348,8 +343,8 @@ def _fetch_urllib(self, url): if os.path.lexists(save_file): os.remove(save_file) - with open(save_file, "wb") as _open_file: - shutil.copyfileobj(response, _open_file) + with open(save_file, "wb") as f: + shutil.copyfileobj(response, f) self._check_headers(str(response.headers)) @@ -468,7 +463,7 @@ def check(self): """Check the downloaded archive against a checksum digest. No-op if this stage checks code out of a repository.""" if not self.digest: - raise NoDigestError("Attempt to check URLFetchStrategy with no digest.") + raise NoDigestError(f"Attempt to check {self.__class__.__name__} with no digest.") verify_checksum(self.archive_file, self.digest) @@ -479,8 +474,8 @@ def reset(self): """ if not self.archive_file: raise NoArchiveFileError( - "Tried to reset URLFetchStrategy before fetching", - "Failed on reset() for URL %s" % self.url, + f"Tried to reset {self.__class__.__name__} before fetching", + f"Failed on reset() for URL{self.url}", ) # Remove everything but the archive from the stage @@ -493,14 +488,10 @@ def reset(self): self.expand() def __repr__(self): - url = self.url if self.url else "no url" - return "%s<%s>" % (self.__class__.__name__, url) + return f"{self.__class__.__name__}<{self.url}>" def __str__(self): - if self.url: - return self.url - else: - return "[no url]" + return self.url @fetcher @@ -513,7 +504,7 @@ def fetch(self): # check whether the cache file exists. if not os.path.isfile(path): - raise NoCacheError("No cache of %s" % path) + raise NoCacheError(f"No cache of {path}") # remove old symlink if one is there. filename = self.stage.save_filename @@ -523,8 +514,8 @@ def fetch(self): # Symlink to local cached archive. symlink(path, filename) - # Remove link if checksum fails, or subsequent fetchers - # will assume they don't need to download. + # Remove link if checksum fails, or subsequent fetchers will assume they don't need to + # download. if self.digest: try: self.check() @@ -533,12 +524,12 @@ def fetch(self): raise # Notify the user how we fetched. - tty.msg("Using cached archive: {0}".format(path)) + tty.msg(f"Using cached archive: {path}") class OCIRegistryFetchStrategy(URLFetchStrategy): - def __init__(self, url=None, checksum=None, **kwargs): - super().__init__(url, checksum, **kwargs) + def __init__(self, *, url: str, checksum: Optional[str] = None, **kwargs): + super().__init__(url=url, checksum=checksum, **kwargs) self._urlopen = kwargs.get("_urlopen", spack.oci.opener.urlopen) @@ -1381,7 +1372,7 @@ def reset(self): shutil.move(scrubbed, source_path) def __str__(self): - return "[hg] %s" % self.url + return f"[hg] {self.url}" @fetcher @@ -1390,47 +1381,16 @@ class S3FetchStrategy(URLFetchStrategy): url_attr = "s3" - def __init__(self, *args, **kwargs): - try: - super().__init__(*args, **kwargs) - except ValueError: - if not kwargs.get("url"): - raise ValueError("S3FetchStrategy requires a url for fetching.") - @_needs_stage def fetch(self): + if not self.url.startswith("s3://"): + raise spack.error.FetchError( + f"{self.__class__.__name__} can only fetch from s3:// urls." + ) if self.archive_file: tty.debug(f"Already downloaded {self.archive_file}") return - - parsed_url = urllib.parse.urlparse(self.url) - if parsed_url.scheme != "s3": - raise spack.error.FetchError("S3FetchStrategy can only fetch from s3:// urls.") - - basename = os.path.basename(parsed_url.path) - request = urllib.request.Request( - self.url, headers={"User-Agent": web_util.SPACK_USER_AGENT} - ) - - with working_dir(self.stage.path): - try: - response = web_util.urlopen(request) - except (TimeoutError, urllib.error.URLError) as e: - raise FailedDownloadError(e) from e - - tty.debug(f"Fetching {self.url}") - - with open(basename, "wb") as f: - shutil.copyfileobj(response, f) - - content_type = web_util.get_header(response.headers, "Content-type") - - if content_type == "text/html": - warn_content_type_mismatch(self.archive_file or "the archive") - - if self.stage.save_filename: - fs.rename(os.path.join(self.stage.path, basename), self.stage.save_filename) - + self._fetch_urllib(self.url) if not self.archive_file: raise FailedDownloadError( RuntimeError(f"Missing archive {self.archive_file} after fetching") @@ -1443,46 +1403,17 @@ class GCSFetchStrategy(URLFetchStrategy): url_attr = "gs" - def __init__(self, *args, **kwargs): - try: - super().__init__(*args, **kwargs) - except ValueError: - if not kwargs.get("url"): - raise ValueError("GCSFetchStrategy requires a url for fetching.") - @_needs_stage def fetch(self): + if not self.url.startswith("gs"): + raise spack.error.FetchError( + f"{self.__class__.__name__} can only fetch from gs:// urls." + ) if self.archive_file: - tty.debug("Already downloaded {0}".format(self.archive_file)) + tty.debug(f"Already downloaded {self.archive_file}") return - parsed_url = urllib.parse.urlparse(self.url) - if parsed_url.scheme != "gs": - raise spack.error.FetchError("GCSFetchStrategy can only fetch from gs:// urls.") - - basename = os.path.basename(parsed_url.path) - request = urllib.request.Request( - self.url, headers={"User-Agent": web_util.SPACK_USER_AGENT} - ) - - with working_dir(self.stage.path): - try: - response = web_util.urlopen(request) - except (TimeoutError, urllib.error.URLError) as e: - raise FailedDownloadError(e) from e - - tty.debug(f"Fetching {self.url}") - - with open(basename, "wb") as f: - shutil.copyfileobj(response, f) - - content_type = web_util.get_header(response.headers, "Content-type") - - if content_type == "text/html": - warn_content_type_mismatch(self.archive_file or "the archive") - - if self.stage.save_filename: - os.rename(os.path.join(self.stage.path, basename), self.stage.save_filename) + self._fetch_urllib(self.url) if not self.archive_file: raise FailedDownloadError( @@ -1496,7 +1427,7 @@ class FetchAndVerifyExpandedFile(URLFetchStrategy): as well as after expanding it.""" def __init__(self, url, archive_sha256: str, expanded_sha256: str): - super().__init__(url, archive_sha256) + super().__init__(url=url, checksum=archive_sha256) self.expanded_sha256 = expanded_sha256 def expand(self): @@ -1538,14 +1469,14 @@ def stable_target(fetcher): return False -def from_url(url): +def from_url(url: str) -> URLFetchStrategy: """Given a URL, find an appropriate fetch strategy for it. Currently just gives you a URLFetchStrategy that uses curl. TODO: make this return appropriate fetch strategies for other types of URLs. """ - return URLFetchStrategy(url) + return URLFetchStrategy(url=url) def from_kwargs(**kwargs): @@ -1614,10 +1545,12 @@ def _check_version_attributes(fetcher, pkg, version): def _extrapolate(pkg, version): """Create a fetcher from an extrapolated URL for this version.""" try: - return URLFetchStrategy(pkg.url_for_version(version), fetch_options=pkg.fetch_options) + return URLFetchStrategy(url=pkg.url_for_version(version), fetch_options=pkg.fetch_options) except spack.package_base.NoURLError: - msg = "Can't extrapolate a URL for version %s " "because package %s defines no URLs" - raise ExtrapolationError(msg % (version, pkg.name)) + raise ExtrapolationError( + f"Can't extrapolate a URL for version {version} because " + f"package {pkg.name} defines no URLs" + ) def _from_merged_attrs(fetcher, pkg, version): @@ -1733,11 +1666,9 @@ def for_package_version(pkg, version=None): raise InvalidArgsError(pkg, version, **args) -def from_url_scheme(url, *args, **kwargs): +def from_url_scheme(url: str, **kwargs): """Finds a suitable FetchStrategy by matching its url_attr with the scheme in the given url.""" - - url = kwargs.get("url", url) parsed_url = urllib.parse.urlparse(url, scheme="file") scheme_mapping = kwargs.get("scheme_mapping") or { @@ -1754,11 +1685,9 @@ def from_url_scheme(url, *args, **kwargs): for fetcher in all_strategies: url_attr = getattr(fetcher, "url_attr", None) if url_attr and url_attr == scheme: - return fetcher(url, *args, **kwargs) + return fetcher(url=url, **kwargs) - raise ValueError( - 'No FetchStrategy found for url with scheme: "{SCHEME}"'.format(SCHEME=parsed_url.scheme) - ) + raise ValueError(f'No FetchStrategy found for url with scheme: "{parsed_url.scheme}"') def from_list_url(pkg): @@ -1783,7 +1712,9 @@ def from_list_url(pkg): ) # construct a fetcher - return URLFetchStrategy(url_from_list, checksum, fetch_options=pkg.fetch_options) + return URLFetchStrategy( + url=url_from_list, checksum=checksum, fetch_options=pkg.fetch_options + ) except KeyError as e: tty.debug(e) tty.msg("Cannot find version %s in url_list" % pkg.version) @@ -1811,10 +1742,10 @@ def store(self, fetcher, relative_dest): mkdirp(os.path.dirname(dst)) fetcher.archive(dst) - def fetcher(self, target_path, digest, **kwargs): + def fetcher(self, target_path: str, digest: Optional[str], **kwargs) -> CacheURLFetchStrategy: path = os.path.join(self.root, target_path) url = url_util.path_to_file_url(path) - return CacheURLFetchStrategy(url, digest, **kwargs) + return CacheURLFetchStrategy(url=url, checksum=digest, **kwargs) def destroy(self): shutil.rmtree(self.root, ignore_errors=True) diff --git a/lib/spack/spack/oci/oci.py b/lib/spack/spack/oci/oci.py index cd6ac1dad93b6e..cacb53e08c0baf 100644 --- a/lib/spack/spack/oci/oci.py +++ b/lib/spack/spack/oci/oci.py @@ -390,7 +390,7 @@ def make_stage( ) -> spack.stage.Stage: _urlopen = _urlopen or spack.oci.opener.urlopen fetch_strategy = spack.fetch_strategy.OCIRegistryFetchStrategy( - url, checksum=digest.digest, _urlopen=_urlopen + url=url, checksum=digest.digest, _urlopen=_urlopen ) # Use blobs// as the cache path, which follows # the OCI Image Layout Specification. What's missing though, diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index 0c7fa45ff4c8b7..b2630f7c00e88f 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -319,7 +319,7 @@ def stage(self) -> "spack.stage.Stage": self.url, archive_sha256=self.archive_sha256, expanded_sha256=self.sha256 ) else: - fetcher = fs.URLFetchStrategy(self.url, sha256=self.sha256, expand=False) + fetcher = fs.URLFetchStrategy(url=self.url, sha256=self.sha256, expand=False) # The same package can have multiple patches with the same name but # with different contents, therefore apply a subset of the hash. diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index fd550fb0cc64cc..26f29572b3d818 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -501,7 +501,7 @@ def _generate_fetchers(self, mirror_only=False) -> Generator[fs.FetchStrategy, N fetchers[:0] = ( fs.from_url_scheme( url_util.join(mirror.fetch_url, rel_path), - digest, + checksum=digest, expand=expand, extension=extension, ) @@ -525,13 +525,13 @@ def _generate_fetchers(self, mirror_only=False) -> Generator[fs.FetchStrategy, N if self.search_fn and not mirror_only: yield from self.search_fn() - def fetch(self, mirror_only=False, err_msg=None): + def fetch(self, mirror_only: bool = False, err_msg: Optional[str] = None) -> None: """Retrieves the code or archive Args: - mirror_only (bool): only fetch from a mirror - err_msg (str or None): the error message to display if all fetchers - fail or ``None`` for the default fetch failure message + mirror_only: only fetch from a mirror + err_msg: the error message to display if all fetchers fail or ``None`` for the default + fetch failure message """ errors: List[str] = [] for fetcher in self._generate_fetchers(mirror_only): @@ -593,16 +593,19 @@ def steal_source(self, dest): self.destroy() def check(self): - """Check the downloaded archive against a checksum digest. - No-op if this stage checks code out of a repository.""" + """Check the downloaded archive against a checksum digest.""" if self.fetcher is not self.default_fetcher and self.skip_checksum_for_mirror: + cache = isinstance(self.fetcher, fs.CacheURLFetchStrategy) + if cache: + secure_msg = "your download cache is in a secure location" + else: + secure_msg = "you trust this mirror and have a secure connection" tty.warn( - "Fetching from mirror without a checksum!", - "This package is normally checked out from a version " - "control system, but it has been archived on a spack " - "mirror. This means we cannot know a checksum for the " - "tarball in advance. Be sure that your connection to " - "this mirror is secure!", + f"Using {'download cache' if cache else 'a mirror'} instead of version control", + "The required sources are normally checked out from a version control system, " + f"but have been archived {'in download cache' if cache else 'on a mirror'}: " + f"{self.fetcher}. Spack lacks a tree hash to verify the integrity of this " + f"archive. Make sure {secure_msg}.", ) elif spack.config.get("config:checksum"): self.fetcher.check() @@ -1171,7 +1174,7 @@ def _fetch_and_checksum(url, options, keep_stage, action_fn=None): try: url_or_fs = url if options: - url_or_fs = fs.URLFetchStrategy(url, fetch_options=options) + url_or_fs = fs.URLFetchStrategy(url=url, fetch_options=options) with Stage(url_or_fs, keep=keep_stage) as stage: # Fetch the archive diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index c3926c67abeb95..2db0206bec5de8 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -1003,7 +1003,7 @@ def temporary_store(tmpdir, request): def mock_fetch(mock_archive, monkeypatch): """Fake the URL for a package so it downloads from a file.""" monkeypatch.setattr( - spack.package_base.PackageBase, "fetcher", URLFetchStrategy(mock_archive.url) + spack.package_base.PackageBase, "fetcher", URLFetchStrategy(url=mock_archive.url) ) diff --git a/lib/spack/spack/test/gcs_fetch.py b/lib/spack/spack/test/gcs_fetch.py index 3689e5780c17a4..ec53f0b633c33a 100644 --- a/lib/spack/spack/test/gcs_fetch.py +++ b/lib/spack/spack/test/gcs_fetch.py @@ -3,54 +3,21 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import os - -import pytest - import spack.config import spack.error import spack.fetch_strategy import spack.stage -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_gcsfetchstrategy_without_url(_fetch_method): - """Ensure constructor with no URL fails.""" - with spack.config.override("config:url_fetch_method", _fetch_method): - with pytest.raises(ValueError): - spack.fetch_strategy.GCSFetchStrategy(None) - - -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_gcsfetchstrategy_bad_url(tmpdir, _fetch_method): - """Ensure fetch with bad URL fails as expected.""" - testpath = str(tmpdir) - - with spack.config.override("config:url_fetch_method", _fetch_method): - fetcher = spack.fetch_strategy.GCSFetchStrategy(url="file:///does-not-exist") - assert fetcher is not None - - with spack.stage.Stage(fetcher, path=testpath) as stage: - assert stage is not None - assert fetcher.archive_file is None - with pytest.raises(spack.error.FetchError): - fetcher.fetch() - - -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_gcsfetchstrategy_downloaded(tmpdir, _fetch_method): +def test_gcsfetchstrategy_downloaded(tmp_path): """Ensure fetch with archive file already downloaded is a noop.""" - testpath = str(tmpdir) - archive = os.path.join(testpath, "gcs.tar.gz") - - with spack.config.override("config:url_fetch_method", _fetch_method): + archive = tmp_path / "gcs.tar.gz" - class Archived_GCSFS(spack.fetch_strategy.GCSFetchStrategy): - @property - def archive_file(self): - return archive + class Archived_GCSFS(spack.fetch_strategy.GCSFetchStrategy): + @property + def archive_file(self): + return str(archive) - url = "gcs:///{0}".format(archive) - fetcher = Archived_GCSFS(url=url) - with spack.stage.Stage(fetcher, path=testpath): - fetcher.fetch() + fetcher = Archived_GCSFS(url="gs://example/gcs.tar.gz") + with spack.stage.Stage(fetcher, path=str(tmp_path)): + fetcher.fetch() diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py index 518ade892d2b12..5cb92822259e27 100644 --- a/lib/spack/spack/test/mirror.py +++ b/lib/spack/spack/test/mirror.py @@ -205,7 +205,7 @@ def test_invalid_json_mirror_collection(invalid_json, error_message): def test_mirror_archive_paths_no_version(mock_packages, mock_archive): spec = Spec("trivial-install-test-package@=nonexistingversion").concretized() - fetcher = spack.fetch_strategy.URLFetchStrategy(mock_archive.url) + fetcher = spack.fetch_strategy.URLFetchStrategy(url=mock_archive.url) spack.mirror.mirror_archive_paths(fetcher, "per-package-ref", spec) diff --git a/lib/spack/spack/test/packaging.py b/lib/spack/spack/test/packaging.py index e79cdd91c898ca..2356515c05916d 100644 --- a/lib/spack/spack/test/packaging.py +++ b/lib/spack/spack/test/packaging.py @@ -48,7 +48,7 @@ def test_buildcache(mock_archive, tmp_path, monkeypatch, mutable_config): # Install a test package spec = Spec("trivial-install-test-package").concretized() - monkeypatch.setattr(spec.package, "fetcher", URLFetchStrategy(mock_archive.url)) + monkeypatch.setattr(spec.package, "fetcher", URLFetchStrategy(url=mock_archive.url)) spec.package.do_install() pkghash = "/" + str(spec.dag_hash(7)) diff --git a/lib/spack/spack/test/s3_fetch.py b/lib/spack/spack/test/s3_fetch.py index 66c4cd7bc4b15a..5177c3f90da804 100644 --- a/lib/spack/spack/test/s3_fetch.py +++ b/lib/spack/spack/test/s3_fetch.py @@ -3,54 +3,19 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import os - -import pytest - -import spack.config as spack_config -import spack.error import spack.fetch_strategy as spack_fs import spack.stage as spack_stage -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_s3fetchstrategy_sans_url(_fetch_method): - """Ensure constructor with no URL fails.""" - with spack_config.override("config:url_fetch_method", _fetch_method): - with pytest.raises(ValueError): - spack_fs.S3FetchStrategy(None) - - -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_s3fetchstrategy_bad_url(tmpdir, _fetch_method): - """Ensure fetch with bad URL fails as expected.""" - testpath = str(tmpdir) - - with spack_config.override("config:url_fetch_method", _fetch_method): - fetcher = spack_fs.S3FetchStrategy(url="file:///does-not-exist") - assert fetcher is not None - - with spack_stage.Stage(fetcher, path=testpath) as stage: - assert stage is not None - assert fetcher.archive_file is None - with pytest.raises(spack.error.FetchError): - fetcher.fetch() - - -@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"]) -def test_s3fetchstrategy_downloaded(tmpdir, _fetch_method): +def test_s3fetchstrategy_downloaded(tmp_path): """Ensure fetch with archive file already downloaded is a noop.""" - testpath = str(tmpdir) - archive = os.path.join(testpath, "s3.tar.gz") - - with spack_config.override("config:url_fetch_method", _fetch_method): + archive = tmp_path / "s3.tar.gz" - class Archived_S3FS(spack_fs.S3FetchStrategy): - @property - def archive_file(self): - return archive + class Archived_S3FS(spack_fs.S3FetchStrategy): + @property + def archive_file(self): + return archive - url = "s3:///{0}".format(archive) - fetcher = Archived_S3FS(url=url) - with spack_stage.Stage(fetcher, path=testpath): - fetcher.fetch() + fetcher = Archived_S3FS(url="s3://example/s3.tar.gz") + with spack_stage.Stage(fetcher, path=str(tmp_path)): + fetcher.fetch() diff --git a/lib/spack/spack/test/url_fetch.py b/lib/spack/spack/test/url_fetch.py index 96460cd9b37e62..b86a2f5cce1956 100644 --- a/lib/spack/spack/test/url_fetch.py +++ b/lib/spack/spack/test/url_fetch.py @@ -76,12 +76,6 @@ def fn_urls(v): return factory -def test_urlfetchstrategy_sans_url(): - """Ensure constructor with no URL fails.""" - with pytest.raises(ValueError): - fs.URLFetchStrategy(None) - - @pytest.mark.parametrize("method", ["curl", "urllib"]) def test_urlfetchstrategy_bad_url(tmp_path, mutable_config, method): """Ensure fetch with bad URL fails as expected.""" @@ -267,7 +261,7 @@ def is_true(): monkeypatch.setattr(sys.stdout, "isatty", is_true) monkeypatch.setattr(tty, "msg_enabled", is_true) with spack.config.override("config:url_fetch_method", "curl"): - fetcher = fs.URLFetchStrategy(mock_archive.url) + fetcher = fs.URLFetchStrategy(url=mock_archive.url) with Stage(fetcher, path=testpath) as stage: assert fetcher.archive_file is None stage.fetch() @@ -280,7 +274,7 @@ def is_true(): def test_url_extra_fetch(tmp_path, mutable_config, mock_archive, _fetch_method): """Ensure a fetch after downloading is effectively a no-op.""" mutable_config.set("config:url_fetch_method", _fetch_method) - fetcher = fs.URLFetchStrategy(mock_archive.url) + fetcher = fs.URLFetchStrategy(url=mock_archive.url) with Stage(fetcher, path=str(tmp_path)) as stage: assert fetcher.archive_file is None stage.fetch() From ac9398ed2144d9c364c771e638b9e098420b96e9 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 19 Aug 2024 13:49:38 +0200 Subject: [PATCH 398/435] build_environment: explicitly disable ccache if disabled (#45275) --- lib/spack/spack/build_environment.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index c02c3bc81850b2..7b02dbcae2e5d3 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -457,9 +457,12 @@ def set_wrapper_variables(pkg, env): env.set(SPACK_DEBUG_LOG_ID, pkg.spec.format("{name}-{hash:7}")) env.set(SPACK_DEBUG_LOG_DIR, spack.main.spack_working_dir) - # Find ccache binary and hand it to build environment if spack.config.get("config:ccache"): + # Enable ccache in the compiler wrapper env.set(SPACK_CCACHE_BINARY, spack.util.executable.which_string("ccache", required=True)) + else: + # Avoid cache pollution if a build system forces `ccache `. + env.set("CCACHE_DISABLE", "1") # Gather information about various types of dependencies link_deps = set(pkg.spec.traverse(root=False, deptype=("link"))) From de754c7a4749297557120c8ff51ab1464e7a4b3a Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Mon, 19 Aug 2024 08:14:49 -0700 Subject: [PATCH 399/435] perl-bio-bigfile: new package (#44505) * Adding the perl-bio-db-bigfile package * Update package.py * Update package.py * Update package.py * Updating dependent package handling Signed-off-by: Teague Sterling * Updating dependent package handling Signed-off-by: Teague Sterling * Reverting variants Signed-off-by: Teague Sterling * Rename package.py to package.py * Update package.py * Removing unneeded dependencies Signed-off-by: Teague Sterling --------- Signed-off-by: Teague Sterling --- .../packages/perl-bio-bigfile/package.py | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-bio-bigfile/package.py diff --git a/var/spack/repos/builtin/packages/perl-bio-bigfile/package.py b/var/spack/repos/builtin/packages/perl-bio-bigfile/package.py new file mode 100644 index 00000000000000..b43d7ec1de7301 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-bio-bigfile/package.py @@ -0,0 +1,80 @@ +# 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 PerlBioBigfile(PerlPackage): + """Bio::DB::BigFile -- Low-level interface to BigWig & BigBed files for perl""" + + homepage = "https://metacpan.org/pod/Bio::DB::BigFile" + url = "https://cpan.metacpan.org/authors/id/L/LD/LDS/Bio-BigFile-1.07.tar.gz" + + maintainers("teaguesterling") + + license("Artistic-1.0-Perl OR GPL-1.0-or-later", checked_by="teaguesterling") + + version("1.07", sha256="277b66ce8acbdd52399e2c5a0cf4e3bd5c74c12b94877cd383d0c4c97740d16d") + version("1.06", sha256="15f1ece2563096a301cff533a9ac91b8fc31af7643b4c4d7fd5d4fa75d4cb5ef") + version("1.05", sha256="1675662cfeff05a4e7289132481fd6cf8a15578bef0552b614047a03048fd057") + version("1.04", sha256="aef1db4cc4f4fb5b4d629719e16b50ec8d0b471d90e894060a88bd379647c4fa") + version("1.03", sha256="cb4c61c4d880661580f1964280a3731e31c952a3f7e973e7096b2377a6c62d29") + version("1.02", sha256="baab5010d2b1121c9f84fb1a8c873ced6e24882ef9bece1c3a2b455ed90925fd") + version("1.01", sha256="662310df5cad45f916c341e6b9a888323bd7b2d6a96957fdf8b0be73de7c3877") + version("1.00", sha256="925c9b94d5ea10db59911556fe87d4566e12032d13c70c574e74dc009cf73b91") + + depends_on("perl-module-build", type="build") + depends_on("gmake", type="build") + + with default_args(type=("build", "link")): + depends_on("kentutils") + depends_on("htslib+pic", when="^kentutils~builtin_htslib") + depends_on("openssl") + + with default_args(type=("build", "run")): + depends_on("perl-bioperl") + depends_on("perl-io-string") + + def build_pl_args(self): + # Need to tell the linker exactly where to find these + # dependencies as the perl build system hasn't been told + # they are needed. It explicitly searches for kentutils + # The includes will be recongized by CFLAGS but not the + # LIBS, which results in failures only once you try to + # to run the tests + incs = [ + # This is usually set by Build.PL from KENT_SRC + f"-I{kentutils_include_dir}", + # Build system looks for tbx.h instead of htslib/tbx.h + # so we need to give it some special help for HTSLIB + f"-I{kentutils_htslib_include_dir.htslib}", + ] + libs = [ + # This is usually set by Build.PL from KENT_SRC + join_path(kentutils_lib_dir, "jkweb.a"), + # These are being set in Build.PL so we need to reset here + "-lz", + "-lssl", + # This is an undocumented dependency from kentutils + "-lhts", + ] + + return [ + f"--extra_compiler_flags={' '.join(incs)}", + f"--extra_linker_flags={' '.join(libs)}", + ] + + def setup_build_environment(self, env): + # These variables are exected by by the Build.PL file + # even though we override the results via PERL_MB_OPT + kent = self.spec["kentutils"] + env.set("KENT_SRC", kent.prefix) + env.set("MACHTYPE", kent.package.machtype) + + # Overriding this explicitly as an environmental variable + # as the Build.PL script doesn't honnor the command line + # args and needs some extra coaxing to pass tests + # (The package builds fine without this but the tests fail) + args = [f"'{arg}'" for arg in self.build_pl_args()] + env.set("PERL_MB_OPT", " ".join(args)) From 15413c725863209f6f2d00d3186d6eb11dc2cfec Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 19 Aug 2024 17:28:37 +0200 Subject: [PATCH 400/435] llvm based compilers: filter out non-compilers (#45805) --- .../repos/builtin/packages/aocc/package.py | 6 +-- .../builtin/packages/apple-clang/package.py | 7 +--- .../repos/builtin/packages/llvm/package.py | 39 ++++++++++--------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/var/spack/repos/builtin/packages/aocc/package.py b/var/spack/repos/builtin/packages/aocc/package.py index 09ca523fff43fe..d3d16c0fc682b7 100644 --- a/var/spack/repos/builtin/packages/aocc/package.py +++ b/var/spack/repos/builtin/packages/aocc/package.py @@ -6,9 +6,10 @@ from llnl.util import tty from spack.package import * +from spack.pkg.builtin.llvm import LlvmDetection -class Aocc(Package, CompilerPackage): +class Aocc(Package, LlvmDetection, CompilerPackage): """ The AOCC compiler system is a high performance, production quality code generation tool. The AOCC environment provides various options to developers @@ -107,8 +108,5 @@ def cfg_files(self): with open(join_path(self.prefix.bin, "{}.cfg".format(compiler)), "w") as f: f.write(compiler_options) - compiler_version_argument = "--version" compiler_version_regex = r"AOCC_(\d+[._]\d+[._]\d+)" - c_names = ["clang"] - cxx_names = ["clang++"] fortran_names = ["flang"] diff --git a/var/spack/repos/builtin/packages/apple-clang/package.py b/var/spack/repos/builtin/packages/apple-clang/package.py index 95c3eb54c01a37..ba87604cd2e3bf 100644 --- a/var/spack/repos/builtin/packages/apple-clang/package.py +++ b/var/spack/repos/builtin/packages/apple-clang/package.py @@ -3,9 +3,10 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * +from spack.pkg.builtin.llvm import LlvmDetection -class AppleClang(BundlePackage, CompilerPackage): +class AppleClang(BundlePackage, LlvmDetection, CompilerPackage): """Apple's Clang compiler""" homepage = "https://developer.apple.com/videos/developer-tools/compiler-and-llvm" @@ -14,11 +15,7 @@ class AppleClang(BundlePackage, CompilerPackage): maintainers("alalazo") compiler_languages = ["c", "cxx"] - c_names = ["clang"] - cxx_names = ["clang++"] - compiler_version_regex = r"^Apple (?:LLVM|clang) version ([^ )]+)" - compiler_version_argument = "--version" @classmethod def validate_detected_spec(cls, spec, extra_attributes): diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 8ece089a507402..cc75f8019a9a05 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -13,9 +13,29 @@ import spack.build_environment import spack.util.executable from spack.package import * +from spack.package_base import PackageBase -class Llvm(CMakePackage, CudaPackage, CompilerPackage): +class LlvmDetection(PackageBase): + """Base class to detect LLVM based compilers""" + + compiler_version_argument = "--version" + c_names = ["clang"] + cxx_names = ["clang++"] + + @classmethod + def filter_detected_exes(cls, prefix, exes_in_prefix): + # Executables like lldb-vscode-X are daemon listening on some port and would hang Spack + # during detection. clang-cl, clang-cpp, etc. are dev tools that we don't need to test + reject = re.compile( + r"-(vscode|cpp|cl|gpu|tidy|rename|scan-deps|format|refactor|offload|" + r"check|query|doc|move|extdef|apply|reorder|change-namespace|" + r"include-fixer|import-test)" + ) + return [x for x in exes_in_prefix if not reject.search(x)] + + +class Llvm(CMakePackage, CudaPackage, LlvmDetection, CompilerPackage): """The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful @@ -615,10 +635,6 @@ def patch(self): # LLD r"LLD ([^ )\n]+) \(compatible with GNU linkers\)" ) - compiler_version_argument = "--version" - compiler_languages = ["c", "cxx", "fortran"] - c_names = ["clang"] - cxx_names = ["clang++"] fortran_names = ["flang"] @property @@ -634,19 +650,6 @@ def supported_languages(self): def executables(cls): return super().executables + ["ld.lld", "lldb"] - @classmethod - def filter_detected_exes(cls, prefix, exes_in_prefix): - result = [] - for exe in exes_in_prefix: - # Executables like lldb-vscode-X are daemon listening - # on some port and would hang Spack during detection. - # clang-cl and clang-cpp are dev tools that we don't - # need to test - if any(x in exe for x in ("vscode", "cpp", "-cl", "-gpu")): - continue - result.append(exe) - return result - @classmethod def determine_version(cls, exe): try: From d49f3a0960fd34b3cdbeff8225731231bc7103e6 Mon Sep 17 00:00:00 2001 From: Vicente Bolea Date: Mon, 19 Aug 2024 12:04:09 -0400 Subject: [PATCH 401/435] diy: add smoke test (#45749) Installing examples for running smoke tests for the DIY project. --- .../repos/builtin/packages/diy/package.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/var/spack/repos/builtin/packages/diy/package.py b/var/spack/repos/builtin/packages/diy/package.py index 7b2311d37c0976..3c8b272c73cfa0 100644 --- a/var/spack/repos/builtin/packages/diy/package.py +++ b/var/spack/repos/builtin/packages/diy/package.py @@ -10,6 +10,8 @@ class Diy(CMakePackage): """Data-parallel out-of-core library""" homepage = "https://github.com/diatomic/diy" + maintainers("vicentebolea") + url = "https://github.com/diatomic/diy/archive/3.6.0.tar.gz" git = "https://github.com/diatomic/diy.git" @@ -23,10 +25,42 @@ class Diy(CMakePackage): depends_on("mpi") + # https://gitlab.kitware.com/diatomic/diy/-/merge_requests/82 + patch( + "https://gitlab.kitware.com/diatomic/diy/-/commit/1d85dd5205b9f0035840e1840a49ea7028618d16.diff", + sha256="047bed205c905064923d7ecf1d03e38c07f3ae0baa0f4afe1b234f68315472d3", + when="@3.6:", + ) + def cmake_args(self): args = [ "-Dbuild_examples=off", "-Dbuild_tests=off", + "-Dinstall_examples=on", "-DCMAKE_CXX_COMPILER=%s" % self.spec["mpi"].mpicxx, ] return args + + def test_smoke_test(self): + """Build and run ctests""" + spec = self.spec + + if spec.satisfies("@:3.5"): + raise SkipTest("Smoke test requires DIY>=3.6") + + with working_dir("smoke_test_build", create=True): + cmake = Executable(spec["cmake"].prefix.bin.cmake) + ctest = Executable(spec["cmake"].prefix.bin.ctest) + + cmake( + spec["diy"].prefix.share.DIY.examples.smoke_test, + f"-DMPI_HOME={spec['mpi'].prefix}", + f"-DCMAKE_PREFIX_PATH={spec['diy'].prefix}", + ) + cmake("--build", ".") + ctest("--verbose") + + @run_after("install") + @on_package_attributes(run_tests=True) + def build_test(self): + self.test_smoke_test() From cb8878aaf4278d665ff7c0d730de1554d67e9fa4 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:38:19 -0700 Subject: [PATCH 402/435] hipsolver: remove use of deprecated `run_test` method (#45761) * hipsolver: new test API --- var/spack/repos/builtin/packages/hipsolver/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hipsolver/package.py b/var/spack/repos/builtin/packages/hipsolver/package.py index 26ab14eb0c02d9..1b53a6b04cbb70 100644 --- a/var/spack/repos/builtin/packages/hipsolver/package.py +++ b/var/spack/repos/builtin/packages/hipsolver/package.py @@ -115,8 +115,9 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): patch("0001-suite-sparse-include-path-6.1.1.patch", when="@6.1.1:") def check(self): - exe = join_path(self.build_directory, "clients", "staging", "hipsolver-test") - self.run_test(exe, options=["--gtest_filter=-*known_bug*"]) + exe = join_path(self.builder.build_directory, "clients", "staging", "hipsolver-test") + exe = which(exe) + exe(["--gtest_filter=-*known_bug*"]) @classmethod def determine_version(cls, lib): From 4a4f156d999aaa30949773f2b4212b6871cb4496 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:39:42 -0700 Subject: [PATCH 403/435] parallel-netcdf: new test API (#45170) * parallel-netcdf: new test API * parallel-netcdf: fix test args and tweak docstring and variables --------- Co-authored-by: Tamara Dahlgren --- .../packages/parallel-netcdf/package.py | 81 ++++++++++--------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index aed8d43d6fe17f..f7bf6935779342 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -5,6 +5,8 @@ import os +import llnl.util.tty as tty + from spack.package import * @@ -27,11 +29,11 @@ class ParallelNetcdf(AutotoolsPackage): def url_for_version(self, version): if version >= Version("1.11.0"): - url = "https://parallel-netcdf.github.io/Release/pnetcdf-{0}.tar.gz" + url = f"https://parallel-netcdf.github.io/Release/pnetcdf-{version.dotted}.tar.gz" else: - url = "https://parallel-netcdf.github.io/Release/parallel-netcdf-{0}.tar.gz" + url = f"https://parallel-netcdf.github.io/Release/parallel-netcdf-{version.dotted}.tar.gz" - return url.format(version.dotted) + return url version("master", branch="master") version("1.12.3", sha256="439e359d09bb93d0e58a6e3f928f39c2eae965b6c97f64e67cd42220d6034f77") @@ -101,10 +103,9 @@ def libs(self): if libs: return libs - msg = "Unable to recursively locate {0} {1} libraries in {2}" - raise spack.error.NoLibrariesError( - msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix) - ) + msg = f"Unable to recursively locate {'shared' if shared else 'static'} \ +{self.spec.name} libraries in {self.spec.prefix}" + raise spack.error.NoLibrariesError(msg) @when("@master") def autoreconf(self, spec, prefix): @@ -134,7 +135,7 @@ def configure_args(self): for key, value in sorted(flags.items()): if value: - args.append("{0}={1}".format(key, " ".join(value))) + args.append(f"{key}={' '.join(value)}") if self.version >= Version("1.8"): args.append("--enable-relax-coord-bound") @@ -157,46 +158,46 @@ def configure_args(self): def cache_test_sources(self): """Copy the example source files after the package is installed to an install test subdirectory for use during `spack test run`.""" - self.cache_extra_test_sources([self.examples_src_dir]) + cache_extra_test_sources(self, [self.examples_src_dir]) - def test(self): + def test_column_wise(self): + """build and run column_wise""" test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir) # pnetcdf has many examples to serve as a suitable smoke check. # column_wise was chosen based on the E4S test suite. Other # examples should work as well. test_exe = "column_wise" options = [ - "{0}.cpp".format(test_exe), + f"{test_exe}.cpp", "-o", test_exe, "-lpnetcdf", - "-L{0}".format(self.prefix.lib), - "-I{0}".format(self.prefix.include), - ] - reason = "test: compiling and linking pnetcdf example" - self.run_test( - self.spec["mpi"].mpicxx, - options, - [], - installed=False, - purpose=reason, - work_dir=test_dir, - ) - mpiexe_list = [ - self.spec["mpi"].prefix.bin.srun, - self.spec["mpi"].prefix.bin.mpirun, - self.spec["mpi"].prefix.bin.mpiexec, + f"-L{self.prefix.lib}", + f"-I{self.prefix.include}", ] - for mpiexe in mpiexe_list: - if os.path.isfile(mpiexe): - self.run_test( - mpiexe, - ["-n", "1", test_exe], - [], - installed=False, - purpose="test: pnetcdf smoke test", - skip_missing=True, - work_dir=test_dir, - ) - break - self.run_test("rm", ["-f", test_exe], work_dir=test_dir) + + with working_dir(test_dir): + mpicxx = which(self.spec["mpi"].prefix.bin.mpicxx) + mpicxx(*options) + + mpiexe_list = [ + "srun", + self.spec["mpi"].prefix.bin.mpirun, + self.spec["mpi"].prefix.bin.mpiexec, + ] + + for mpiexe in mpiexe_list: + tty.info(f"Attempting to build and launch with {os.path.basename(mpiexe)}") + try: + args = ["--immediate=30"] if mpiexe == "srun" else [] + args += ["-n", "1", test_exe] + exe = which(mpiexe) + exe(*args) + rm = which("rm") + rm("-f", "column_wise") + return + + except (Exception, ProcessError) as err: + tty.info(f"Skipping {mpiexe}: {str(err)}") + + assert False, "No MPI executable was found" From c064a30765d1c3b3cea4639955956b66e15dfb25 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Aug 2024 19:25:37 +0200 Subject: [PATCH 404/435] py-numpy: add v2.1.0 (#45807) --- var/spack/repos/builtin/packages/py-numpy/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 83554f5561888f..39df9f2f1aafe3 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -22,6 +22,7 @@ class PyNumpy(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + version("2.1.0", sha256="7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2") version("2.0.1", sha256="485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3") version("2.0.0", sha256="cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864") version("1.26.4", sha256="2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010") @@ -80,7 +81,8 @@ class PyNumpy(PythonPackage): # Based on PyPI wheel availability with default_args(type=("build", "link", "run")): - depends_on("python@3.9:3.12", when="@1.26:") + depends_on("python@3.10:3.13", when="@2.1:") + depends_on("python@3.9:3.12", when="@1.26:2.0") depends_on("python@3.9:3.11", when="@1.25") depends_on("python@3.8:3.11", when="@1.23.2:1.24") depends_on("python@3.8:3.10", when="@1.22:1.23.1") @@ -106,7 +108,7 @@ class PyNumpy(PythonPackage): depends_on("blas") depends_on("lapack") - # test_requirements.txt + # requirements/test_requirements.txt with default_args(type="test"): depends_on("py-pytest") depends_on("py-hypothesis", when="@1.19:") From ad6c7380c57b359facff4143463e637f7271d71b Mon Sep 17 00:00:00 2001 From: David Gardner Date: Mon, 19 Aug 2024 10:56:44 -0700 Subject: [PATCH 405/435] silo: add python variant (#45757) * add python variant * use enable_or_disable * use extend --- .../repos/builtin/packages/silo/package.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index df4617244a9281..993c0c7ff8370c 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -54,6 +54,7 @@ class Silo(AutotoolsPackage): depends_on("cxx", type="build") # generated depends_on("fortran", type="build") # generated + variant("python", default=True, description="Enable Python support") variant("fortran", default=True, description="Enable Fortran support") variant("shared", default=True, description="Build shared libraries") variant("silex", default=False, description="Builds Silex, a GUI for viewing Silo files") @@ -198,14 +199,14 @@ def force_autoreconf(self): def configure_args(self): spec = self.spec - config_args = [ - "--enable-install-lite-headers", - "--enable-fortran" if "+fortran" in spec else "--disable-fortran", - "--enable-silex" if "+silex" in spec else "--disable-silex", - "--enable-shared" if "+shared" in spec else "--disable-shared", - "--enable-hzip" if "+hzip" in spec else "--disable-hzip", - "--enable-fpzip" if "+fpzip" in spec else "--disable-fpzip", - ] + config_args = ["--enable-install-lite-headers"] + + config_args.extend(self.enable_or_disable("pythonmodule", variant="python")) + config_args.extend(self.enable_or_disable("fortran")) + config_args.extend(self.enable_or_disable("silex")) + config_args.extend(self.enable_or_disable("shared")) + config_args.extend(self.enable_or_disable("hzip")) + config_args.extend(self.enable_or_disable("fpzip")) # Do not specify the prefix of zlib if it is in a system directory # (see https://github.com/spack/spack/pull/21900). From 0d668e4e92b8bf9ee76daa761a3c9e455e3e253e Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Mon, 19 Aug 2024 12:20:54 -0700 Subject: [PATCH 406/435] hsakmt-roct: remove use of deprecated run_test method (#45763) * hsakmt-roct: new test API * hsakmt-roct: minor change to check_install script variable name --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/hsakmt-roct/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py index fe256e862550ae..8ef1d97e1da12f 100644 --- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py +++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py @@ -89,9 +89,9 @@ def cmake_args(self): @run_after("install") @on_package_attributes(run_tests=True) def check_install(self): - test_dir = "tests/kfdtest" + """Check if package is installed correctly""" + test_dir = join_path("tests", "kfdtest") with working_dir(test_dir, create=True): - cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake") prefixes = ";".join( [ self.spec["libdrm"].prefix, @@ -109,9 +109,12 @@ def check_install(self): "-DLIBHSAKMT_PATH=" + hsakmt_path, ".", ] - self.run_test(cmake_bin, cc_options) + cmake = self.spec["cmake"].command + cmake(*cc_options) + make = which("make") make() os.environ["LD_LIBRARY_PATH"] = hsakmt_path os.environ["BIN_DIR"] = os.getcwd() - self.run_test("scripts/run_kfdtest.sh") + run_kfdtest = which(join_path("scripts", "run_kfdtest.sh")) + run_kfdtest() make("clean") From e3cce2bd9617a079ab6a874bb9eba31928c8ea8e Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 19 Aug 2024 21:40:51 +0200 Subject: [PATCH 407/435] binutils: add v2.43.1 (#45806) --- var/spack/repos/builtin/packages/binutils/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index fea8631c8e6cd4..10f4752f10b703 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -27,6 +27,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): checked_by="tgamblin", ) + version("2.43.1", sha256="becaac5d295e037587b63a42fad57fe3d9d7b83f478eb24b67f9eec5d0f1872f") version("2.43", sha256="fed3c3077f0df7a4a1aa47b080b8c53277593ccbb4e5e78b73ffb4e3f265e750") version("2.42", sha256="aa54850ebda5064c72cd4ec2d9b056c294252991486350d9a97ab2a6dfdfaf12") version("2.41", sha256="a4c4bec052f7b8370024e60389e194377f3f48b56618418ea51067f67aaab30b") From a69c5b3e32a9430799fa47bf0c515724ff239e79 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Mon, 19 Aug 2024 22:21:10 +0200 Subject: [PATCH 408/435] freefem: add v4.13, v4.12 and v4.11 (#45808) --- var/spack/repos/builtin/packages/freefem/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/freefem/package.py b/var/spack/repos/builtin/packages/freefem/package.py index a61fea507b070d..1f3f36d5449523 100644 --- a/var/spack/repos/builtin/packages/freefem/package.py +++ b/var/spack/repos/builtin/packages/freefem/package.py @@ -20,6 +20,9 @@ class Freefem(AutotoolsPackage): maintainers("corentin-dev") version("4.14", sha256="931cbfe9ef6f6530756c300c5ae47bfdaca21c560a5407cb33325a376a3b6af8") + version("4.13", sha256="aefd4ff02333209f7433abef2e74acb621b6946063ff27e81cf2da43120b6ae4") + version("4.12", sha256="291c5f46761711d6303914f9c4f165fd85a7b7b69141f7473e0b6484ce6ab0f5") + version("4.11", sha256="d0c6921791e5f94646d8dde4d9ed3c11b979e47e7bbb3c0a66467b04dd56983a") version("4.10", sha256="957994c8f24cc2a671b8c116ae530796c3a431d4157ee71a3d6aab7122e7570d") version("4.9", sha256="299ba2b73dfff578b7890f693c1e835680bf55eba87263cabd60d81909e1e0e4") version("4.8", sha256="499b1ca24d45088226a238412ea1492d9cc3eb6088866904145511469780180d") From da079ed06f2e0e5198dfb7662fd29db977e2b673 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 20 Aug 2024 01:14:13 +0200 Subject: [PATCH 409/435] ninja: add 1.12.1 (#45789) --- var/spack/repos/builtin/packages/ninja/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index c63972d0484558..64e9eb36030f2d 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -26,6 +26,7 @@ class Ninja(Package): version("kitware", branch="features-for-fortran", git="https://github.com/Kitware/ninja.git") version("master", branch="master") + version("1.12.1", sha256="821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a") version("1.12.0", sha256="8b2c86cd483dc7fcb7975c5ec7329135d210099a89bc7db0590a07b0bbfe49a5") version("1.11.1", sha256="31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea") version("1.11.0", sha256="3c6ba2e66400fe3f1ae83deb4b235faf3137ec20bd5b08c29bfc368db143e4c6") From 9d0b9f086f9b490bfdb7361ea549ca5574a254af Mon Sep 17 00:00:00 2001 From: Sajid Ali Date: Tue, 20 Aug 2024 00:09:55 -0400 Subject: [PATCH 410/435] Fix linking for python with external ncurses (#45803) Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/python/package.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 0392cda87b5303..34c1547cd2eded 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -641,10 +641,11 @@ def configure_args(self): else: config_args.append("--without-system-expat") - if "+ctypes" in spec: - config_args.append("--with-system-ffi") - else: - config_args.append("--without-system-ffi") + if self.version < Version("3.12.0"): + if "+ctypes" in spec: + config_args.append("--with-system-ffi") + else: + config_args.append("--without-system-ffi") if "+tkinter" in spec: config_args.extend( @@ -668,6 +669,9 @@ def configure_args(self): if cflags: config_args.append("CFLAGS={0}".format(" ".join(cflags))) + if self.version >= Version("3.12.0") and sys.platform == "darwin": + config_args.append("CURSES_LIBS={0}".format(spec["ncurses"].libs.link_flags)) + return config_args def configure(self, spec, prefix): From 2ae5596e921d386761d96f52784d526ad8ce082b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 20 Aug 2024 13:17:49 +0200 Subject: [PATCH 411/435] Unify url and oci buildcache push code paths (#45776) --- lib/spack/spack/binary_distribution.py | 180 ++++++++++++++++----- lib/spack/spack/ci.py | 4 +- lib/spack/spack/cmd/buildcache.py | 84 +++------- lib/spack/spack/cmd/gpg.py | 2 +- lib/spack/spack/hooks/autopush.py | 3 +- lib/spack/spack/test/bindist.py | 6 +- lib/spack/spack/test/build_distribution.py | 28 ++-- lib/spack/spack/test/cmd/buildcache.py | 28 ++-- lib/spack/spack/test/cmd/ci.py | 4 +- lib/spack/spack/test/install.py | 9 +- 10 files changed, 206 insertions(+), 142 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 182b45e33e8237..2862f5e7cbb025 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -6,7 +6,6 @@ import codecs import collections import concurrent.futures -import contextlib import copy import hashlib import io @@ -25,7 +24,7 @@ import urllib.request import warnings from contextlib import closing -from typing import Dict, Generator, Iterable, List, NamedTuple, Optional, Set, Tuple, Union +from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, Union import llnl.util.filesystem as fsys import llnl.util.lang @@ -958,7 +957,7 @@ def _spec_files_from_cache(url: str): raise ListMirrorSpecsError("Failed to get list of specs from {0}".format(url)) -def generate_package_index(url: str, tmpdir: str, concurrency: int = 32): +def _url_generate_package_index(url: str, tmpdir: str, concurrency: int = 32): """Create or replace the build cache index on the given mirror. The buildcache index contains an entry for each binary package under the cache_prefix. @@ -1119,7 +1118,7 @@ def _exists_in_buildcache(spec: Spec, tmpdir: str, out_url: str) -> ExistsInBuil return ExistsInBuildcache(signed, unsigned, tarball) -def _upload_tarball_and_specfile( +def _url_upload_tarball_and_specfile( spec: Spec, tmpdir: str, out_url: str, exists: ExistsInBuildcache, signing_key: Optional[str] ): files = BuildcacheFiles(spec, tmpdir, out_url) @@ -1154,47 +1153,144 @@ def _upload_tarball_and_specfile( ) -def _format_spec(spec: Spec) -> str: - return spec.cformat("{name}{@version}{/hash:7}") +class Uploader: + def __init__(self, mirror: spack.mirror.Mirror, force: bool, update_index: bool): + self.mirror = mirror + self.force = force + self.update_index = update_index + self.tmpdir: str + self.executor: concurrent.futures.Executor -@contextlib.contextmanager -def default_push_context() -> Generator[Tuple[str, concurrent.futures.Executor], None, None]: - with tempfile.TemporaryDirectory( - dir=spack.stage.get_stage_root() - ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: - yield tmpdir, executor + def __enter__(self): + self._tmpdir = tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) + self._executor = spack.util.parallel.make_concurrent_executor() + self.tmpdir = self._tmpdir.__enter__() + self.executor = self.executor = self._executor.__enter__() -def push_or_raise( - specs: List[Spec], - out_url: str, - signing_key: Optional[str], - force: bool = False, - update_index: bool = False, -) -> List[Spec]: - """Same as push, but raises an exception on error. Returns a list of skipped specs already - present in the build cache when force=False.""" - skipped, errors = push(specs, out_url, signing_key, force, update_index) - if errors: - raise PushToBuildCacheError( - f"Failed to push {len(errors)} specs to {out_url}:\n" - + "\n".join(f"Failed to push {_format_spec(spec)}: {error}" for spec, error in errors) + return self + + def __exit__(self, *args): + self._executor.__exit__(*args) + self._tmpdir.__exit__(*args) + + def push_or_raise(self, specs: List[spack.spec.Spec]) -> List[spack.spec.Spec]: + skipped, errors = self.push(specs) + if errors: + raise PushToBuildCacheError( + f"Failed to push {len(errors)} specs to {self.mirror.push_url}:\n" + + "\n".join( + f"Failed to push {_format_spec(spec)}: {error}" for spec, error in errors + ) + ) + return skipped + + def push( + self, specs: List[spack.spec.Spec] + ) -> Tuple[List[spack.spec.Spec], List[Tuple[spack.spec.Spec, BaseException]]]: + raise NotImplementedError + + def tag(self, tag: str, roots: List[spack.spec.Spec]): + """Make a list of selected specs together available under the given tag""" + pass + + +class OCIUploader(Uploader): + def __init__( + self, + mirror: spack.mirror.Mirror, + force: bool, + update_index: bool, + base_image: Optional[str], + ) -> None: + super().__init__(mirror, force, update_index) + self.target_image = spack.oci.oci.image_from_mirror(mirror) + self.base_image = ImageReference.from_string(base_image) if base_image else None + + def push( + self, specs: List[spack.spec.Spec] + ) -> Tuple[List[spack.spec.Spec], List[Tuple[spack.spec.Spec, BaseException]]]: + skipped, base_images, checksums, upload_errors = _oci_push( + target_image=self.target_image, + base_image=self.base_image, + installed_specs_with_deps=specs, + force=self.force, + tmpdir=self.tmpdir, + executor=self.executor, ) - return skipped + self._base_images = base_images + self._checksums = checksums -def push( - specs: List[Spec], - out_url: str, - signing_key: Optional[str], + # only update index if any binaries were uploaded + if self.update_index and len(skipped) + len(upload_errors) < len(specs): + _oci_update_index(self.target_image, self.tmpdir, self.executor) + + return skipped, upload_errors + + def tag(self, tag: str, roots: List[spack.spec.Spec]): + tagged_image = self.target_image.with_tag(tag) + + # _push_oci may not populate self._base_images if binaries were already in the registry + for spec in roots: + _oci_update_base_images( + base_image=self.base_image, + target_image=self.target_image, + spec=spec, + base_image_cache=self._base_images, + ) + _oci_put_manifest( + self._base_images, self._checksums, tagged_image, self.tmpdir, None, None, *roots + ) + + +class URLUploader(Uploader): + def __init__( + self, + mirror: spack.mirror.Mirror, + force: bool, + update_index: bool, + signing_key: Optional[str], + ) -> None: + super().__init__(mirror, force, update_index) + self.url = mirror.push_url + self.signing_key = signing_key + + def push( + self, specs: List[spack.spec.Spec] + ) -> Tuple[List[spack.spec.Spec], List[Tuple[spack.spec.Spec, BaseException]]]: + return _url_push( + specs, + out_url=self.url, + force=self.force, + update_index=self.update_index, + signing_key=self.signing_key, + tmpdir=self.tmpdir, + executor=self.executor, + ) + + +def make_uploader( + mirror: spack.mirror.Mirror, force: bool = False, update_index: bool = False, -) -> Tuple[List[Spec], List[Tuple[Spec, BaseException]]]: - """Pushes to the provided build cache, and returns a list of skipped specs that were already - present (when force=False). Does not raise on error.""" - with default_push_context() as (tmpdir, executor): - return _push(specs, out_url, signing_key, force, update_index, tmpdir, executor) + signing_key: Optional[str] = None, + base_image: Optional[str] = None, +) -> Uploader: + """Builder for the appropriate uploader based on the mirror type""" + if mirror.push_url.startswith("oci://"): + return OCIUploader( + mirror=mirror, force=force, update_index=update_index, base_image=base_image + ) + else: + return URLUploader( + mirror=mirror, force=force, update_index=update_index, signing_key=signing_key + ) + + +def _format_spec(spec: Spec) -> str: + return spec.cformat("{name}{@version}{/hash:7}") class FancyProgress: @@ -1234,7 +1330,7 @@ def fail(self) -> None: tty.info(f"{self.pre}Failed to push {self.pretty_spec}") -def _push( +def _url_push( specs: List[Spec], out_url: str, signing_key: Optional[str], @@ -1279,7 +1375,7 @@ def _push( upload_futures = [ executor.submit( - _upload_tarball_and_specfile, + _url_upload_tarball_and_specfile, spec, tmpdir, out_url, @@ -1309,12 +1405,12 @@ def _push( if signing_key: keys_tmpdir = os.path.join(tmpdir, "keys") os.mkdir(keys_tmpdir) - push_keys(out_url, keys=[signing_key], update_index=update_index, tmpdir=keys_tmpdir) + _url_push_keys(out_url, keys=[signing_key], update_index=update_index, tmpdir=keys_tmpdir) if update_index: index_tmpdir = os.path.join(tmpdir, "index") os.mkdir(index_tmpdir) - generate_package_index(out_url, index_tmpdir) + _url_generate_package_index(out_url, index_tmpdir) return skipped, errors @@ -1517,7 +1613,7 @@ def _oci_update_base_images( ) -def _push_oci( +def _oci_push( *, target_image: ImageReference, base_image: Optional[ImageReference], @@ -2643,7 +2739,7 @@ def get_keys(install=False, trust=False, force=False, mirrors=None): ) -def push_keys( +def _url_push_keys( *mirrors: Union[spack.mirror.Mirror, str], keys: List[str], tmpdir: str, diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 842e944a9a0254..fc847d18e600e5 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -1382,8 +1382,10 @@ def push_to_build_cache(spec: spack.spec.Spec, mirror_url: str, sign_binaries: b """ tty.debug(f"Pushing to build cache ({'signed' if sign_binaries else 'unsigned'})") signing_key = bindist.select_signing_key() if sign_binaries else None + mirror = spack.mirror.Mirror.from_url(mirror_url) try: - bindist.push_or_raise([spec], out_url=mirror_url, signing_key=signing_key) + with bindist.make_uploader(mirror, signing_key=signing_key) as uploader: + uploader.push_or_raise([spec]) return True except bindist.PushToBuildCacheError as e: tty.error(f"Problem writing to {mirror_url}: {e}") diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index d08c0fa78359db..fb0ffbd78f5d82 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -37,7 +37,6 @@ from spack import traverse from spack.cmd import display_specs from spack.cmd.common import arguments -from spack.oci.image import ImageReference from spack.spec import Spec, save_dependency_specfiles description = "create, download and install binary packages" @@ -392,13 +391,8 @@ def push_fn(args): else: roots = spack.cmd.require_active_env(cmd_name="buildcache push").concrete_roots() - mirror: spack.mirror.Mirror = args.mirror - - # Check if this is an OCI image. - try: - target_image = spack.oci.oci.image_from_mirror(mirror) - except ValueError: - target_image = None + mirror = args.mirror + assert isinstance(mirror, spack.mirror.Mirror) push_url = mirror.push_url @@ -409,12 +403,11 @@ def push_fn(args): unsigned = not (args.key or args.signed) # For OCI images, we require dependencies to be pushed for now. - if target_image: - if not unsigned: - tty.warn( - "Code signing is currently not supported for OCI images. " - "Use --unsigned to silence this warning." - ) + if mirror.push_url.startswith("oci://") and not unsigned: + tty.warn( + "Code signing is currently not supported for OCI images. " + "Use --unsigned to silence this warning." + ) unsigned = True # Select a signing key, or None if unsigned. @@ -445,49 +438,17 @@ def push_fn(args): (s, PackageNotInstalledError("package not installed")) for s in not_installed ) - with bindist.default_push_context() as (tmpdir, executor): - if target_image: - base_image = ImageReference.from_string(args.base_image) if args.base_image else None - skipped, base_images, checksums, upload_errors = bindist._push_oci( - target_image=target_image, - base_image=base_image, - installed_specs_with_deps=specs, - force=args.force, - tmpdir=tmpdir, - executor=executor, - ) - - if upload_errors: - failed.extend(upload_errors) - - # Apart from creating manifests for each individual spec, we allow users to create a - # separate image tag for all root specs and their runtime dependencies. - elif args.tag: - tagged_image = target_image.with_tag(args.tag) - # _push_oci may not populate base_images if binaries were already in the registry - for spec in roots: - bindist._oci_update_base_images( - base_image=base_image, - target_image=target_image, - spec=spec, - base_image_cache=base_images, - ) - bindist._oci_put_manifest( - base_images, checksums, tagged_image, tmpdir, None, None, *roots - ) - tty.info(f"Tagged {tagged_image}") - - else: - skipped, upload_errors = bindist._push( - specs, - out_url=push_url, - force=args.force, - update_index=args.update_index, - signing_key=signing_key, - tmpdir=tmpdir, - executor=executor, - ) - failed.extend(upload_errors) + with bindist.make_uploader( + mirror=mirror, + force=args.force, + update_index=args.update_index, + signing_key=signing_key, + base_image=args.base_image, + ) as uploader: + skipped, upload_errors = uploader.push(specs=specs) + failed.extend(upload_errors) + if not upload_errors and args.tag: + uploader.tag(args.tag, roots) if skipped: if len(specs) == 1: @@ -520,13 +481,6 @@ def push_fn(args): ), ) - # Update the OCI index if requested - if target_image and len(skipped) < len(specs) and args.update_index: - with tempfile.TemporaryDirectory( - dir=spack.stage.get_stage_root() - ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor: - bindist._oci_update_index(target_image, tmpdir, executor) - def install_fn(args): """install from a binary package""" @@ -814,7 +768,7 @@ def update_index(mirror: spack.mirror.Mirror, update_keys=False): url = mirror.push_url with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: - bindist.generate_package_index(url, tmpdir) + bindist._url_generate_package_index(url, tmpdir) if update_keys: keys_url = url_util.join( diff --git a/lib/spack/spack/cmd/gpg.py b/lib/spack/spack/cmd/gpg.py index d16b03b7bcb7f4..288212b51fc6c1 100644 --- a/lib/spack/spack/cmd/gpg.py +++ b/lib/spack/spack/cmd/gpg.py @@ -224,7 +224,7 @@ def gpg_publish(args): mirror = spack.mirror.Mirror(args.mirror_url, args.mirror_url) with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: - spack.binary_distribution.push_keys( + spack.binary_distribution._url_push_keys( mirror, keys=args.keys, tmpdir=tmpdir, update_index=args.update_index ) diff --git a/lib/spack/spack/hooks/autopush.py b/lib/spack/spack/hooks/autopush.py index cb951b7b4b4ecc..05fad82ef9cda8 100644 --- a/lib/spack/spack/hooks/autopush.py +++ b/lib/spack/spack/hooks/autopush.py @@ -24,5 +24,6 @@ def post_install(spec, explicit): # Push the package to all autopush mirrors for mirror in spack.mirror.MirrorCollection(binary=True, autopush=True).values(): signing_key = bindist.select_signing_key() if mirror.signed else None - bindist.push_or_raise([spec], out_url=mirror.push_url, signing_key=signing_key, force=True) + with bindist.make_uploader(mirror=mirror, force=True, signing_key=signing_key) as uploader: + uploader.push_or_raise([spec]) tty.msg(f"{spec.name}: Pushed to build cache: '{mirror.name}'") diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index 06cff7f5f7611d..996428ce59f513 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -357,7 +357,7 @@ def test_push_and_fetch_keys(mock_gnupghome, tmp_path): assert len(keys) == 1 fpr = keys[0] - bindist.push_keys(mirror, keys=[fpr], tmpdir=str(tmp_path), update_index=True) + bindist._url_push_keys(mirror, keys=[fpr], tmpdir=str(tmp_path), update_index=True) # dir 2: import the key from the mirror, and confirm that its fingerprint # matches the one created above @@ -492,7 +492,7 @@ def mock_list_url(url, recursive=False): test_url = "file:///fake/keys/dir" with pytest.raises(GenerateIndexError, match="Unable to generate package index"): - bindist.generate_package_index(test_url, str(tmp_path)) + bindist._url_generate_package_index(test_url, str(tmp_path)) assert ( "Warning: Encountered problem listing packages at " @@ -513,7 +513,7 @@ def mock_list_url(url, recursive=False): bindist.generate_key_index(url, str(tmp_path)) with pytest.raises(GenerateIndexError, match="Unable to generate package index"): - bindist.generate_package_index(url, str(tmp_path)) + bindist._url_generate_package_index(url, str(tmp_path)) assert f"Encountered problem listing packages at {url}" in capfd.readouterr().err diff --git a/lib/spack/spack/test/build_distribution.py b/lib/spack/spack/test/build_distribution.py index 4ad621ab0d0541..cdfd961e3a293e 100644 --- a/lib/spack/spack/test/build_distribution.py +++ b/lib/spack/spack/test/build_distribution.py @@ -10,6 +10,7 @@ import spack.binary_distribution as bd import spack.main +import spack.mirror import spack.spec import spack.util.url @@ -22,17 +23,21 @@ def test_build_tarball_overwrite(install_mockery, mock_fetch, monkeypatch, tmp_p specs = [spec] - # Runs fine the first time, second time it's a no-op - out_url = spack.util.url.path_to_file_url(str(tmp_path)) - skipped = bd.push_or_raise(specs, out_url, signing_key=None) - assert not skipped + # populate cache, everything is new + mirror = spack.mirror.Mirror.from_local_path(str(tmp_path)) + with bd.make_uploader(mirror) as uploader: + skipped = uploader.push_or_raise(specs) + assert not skipped - skipped = bd.push_or_raise(specs, out_url, signing_key=None) - assert skipped == specs + # should skip all + with bd.make_uploader(mirror) as uploader: + skipped = uploader.push_or_raise(specs) + assert skipped == specs - # Should work fine with force=True - skipped = bd.push_or_raise(specs, out_url, signing_key=None, force=True) - assert not skipped + # with force=True none should be skipped + with bd.make_uploader(mirror, force=True) as uploader: + skipped = uploader.push_or_raise(specs) + assert not skipped # Remove the tarball, which should cause push to push. os.remove( @@ -42,5 +47,6 @@ def test_build_tarball_overwrite(install_mockery, mock_fetch, monkeypatch, tmp_p / bd.tarball_name(spec, ".spack") ) - skipped = bd.push_or_raise(specs, out_url, signing_key=None) - assert not skipped + with bd.make_uploader(mirror) as uploader: + skipped = uploader.push_or_raise(specs) + assert not skipped diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index fb56bb7335cd68..8b8cff175ce82a 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -7,6 +7,7 @@ import json import os import shutil +from typing import List import pytest @@ -16,6 +17,7 @@ import spack.environment as ev import spack.error import spack.main +import spack.mirror import spack.spec import spack.util.url from spack.spec import Spec @@ -380,18 +382,22 @@ def test_correct_specs_are_pushed( # Concretize dttop and add it to the temporary database (without prefixes) spec = default_mock_concretization("dttop") temporary_store.db.add(spec, directory_layout=None) - slash_hash = "/{0}".format(spec.dag_hash()) + slash_hash = f"/{spec.dag_hash()}" - packages_to_push = [] + class DontUpload(spack.binary_distribution.Uploader): + def __init__(self): + super().__init__(spack.mirror.Mirror.from_local_path(str(tmpdir)), False, False) + self.pushed = [] - def fake_push(specs, *args, **kwargs): - assert all(isinstance(s, Spec) for s in specs) - packages_to_push.extend(s.name for s in specs) - skipped = [] - errors = [] - return skipped, errors + def push(self, specs: List[spack.spec.Spec]): + self.pushed.extend(s.name for s in specs) + return [], [] # nothing skipped, nothing errored - monkeypatch.setattr(spack.binary_distribution, "_push", fake_push) + uploader = DontUpload() + + monkeypatch.setattr( + spack.binary_distribution, "make_uploader", lambda *args, **kwargs: uploader + ) buildcache_create_args = ["create", "--unsigned"] @@ -403,10 +409,10 @@ def fake_push(specs, *args, **kwargs): buildcache(*buildcache_create_args) # Order is not guaranteed, so we can't just compare lists - assert set(packages_to_push) == set(expected) + assert set(uploader.pushed) == set(expected) # Ensure no duplicates - assert len(set(packages_to_push)) == len(packages_to_push) + assert len(set(uploader.pushed)) == len(uploader.pushed) @pytest.mark.parametrize("signed", [True, False]) diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index 012c119ad7f519..0eaabfd5a718ed 100644 --- a/lib/spack/spack/test/cmd/ci.py +++ b/lib/spack/spack/test/cmd/ci.py @@ -687,7 +687,7 @@ def mock_push_or_raise(*args, **kwargs): "Encountered problem pushing binary : " ) - monkeypatch.setattr(spack.binary_distribution, "push_or_raise", mock_push_or_raise) + monkeypatch.setattr(spack.binary_distribution.Uploader, "push_or_raise", mock_push_or_raise) with working_dir(rebuild_env.env_dir): activate_rebuild_env(tmp_path, pkg_name, rebuild_env) @@ -1022,7 +1022,7 @@ def test_push_to_build_cache_exceptions(monkeypatch, tmp_path, capsys): def push_or_raise(*args, **kwargs): raise spack.binary_distribution.PushToBuildCacheError("Error: Access Denied") - monkeypatch.setattr(spack.binary_distribution, "push_or_raise", push_or_raise) + monkeypatch.setattr(spack.binary_distribution.Uploader, "push_or_raise", push_or_raise) # Input doesn't matter, as we are faking exceptional output url = tmp_path.as_uri() diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index b1415830310333..35bdba232615f5 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -610,10 +610,9 @@ def test_install_from_binary_with_missing_patch_succeeds( temporary_store.db.add(s, directory_layout=temporary_store.layout, explicit=True) # Push it to a binary cache - build_cache = tmp_path / "my_build_cache" - binary_distribution.push_or_raise( - [s], out_url=build_cache.as_uri(), signing_key=None, force=False - ) + mirror = spack.mirror.Mirror.from_local_path(str(tmp_path / "my_build_cache")) + with binary_distribution.make_uploader(mirror=mirror) as uploader: + uploader.push_or_raise([s]) # Now re-install it. s.package.do_uninstall() @@ -624,7 +623,7 @@ def test_install_from_binary_with_missing_patch_succeeds( s.package.do_install() # Binary install: succeeds, we don't need the patch. - spack.mirror.add(spack.mirror.Mirror.from_local_path(str(build_cache))) + spack.mirror.add(mirror) s.package.do_install(package_cache_only=True, dependencies_cache_only=True, unsigned=True) assert temporary_store.db.query_local_by_spec_hash(s.dag_hash()) From 85905959dc40df71924c3445d9aca23825b24f6d Mon Sep 17 00:00:00 2001 From: psakievich Date: Tue, 20 Aug 2024 07:04:23 -0600 Subject: [PATCH 412/435] Increase min version for sparse_checkout (#45818) * Increase min version for sparse_checkout * Update git_fetch.py * style --- lib/spack/spack/fetch_strategy.py | 4 +++- lib/spack/spack/test/git_fetch.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index fd313e0463c304..3b22cfb94ce9a3 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -930,7 +930,9 @@ def _sparse_clone_src(self, commit=None, branch=None, tag=None, **kwargs): dest = self.stage.source_path git = self.git - if self.git_version < spack.version.Version("2.25.0.0"): + if self.git_version < spack.version.Version("2.26.0"): + # technically this should be supported for 2.25, but bumping for OS issues + # see https://github.com/spack/spack/issues/45771 # code paths exist where the package is not set. Assure some indentifier for the # package that was configured for sparse checkout exists in the error message identifier = str(self.url) diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py index b709780651b07b..eb2e03db078966 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -415,7 +415,7 @@ def test_git_sparse_paths_partial_clone( for p in sparse_paths: assert os.path.isdir(p) - if git_version < Version("2.25.0.0"): + if git_version < Version("2.26.0.0"): # older versions of git should fall back to a full clone for p in omitted_paths: assert os.path.isdir(p) From c1736077bb9e32a99b116f471d12a4941771d9ab Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Tue, 20 Aug 2024 06:04:39 -0700 Subject: [PATCH 413/435] spack bootstrap status --dev: function call for new interface (#45822) --- lib/spack/spack/bootstrap/status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/bootstrap/status.py b/lib/spack/spack/bootstrap/status.py index 37b6bc37da925e..582927af6ead95 100644 --- a/lib/spack/spack/bootstrap/status.py +++ b/lib/spack/spack/bootstrap/status.py @@ -124,7 +124,7 @@ def _development_requirements() -> List[RequiredResponseType]: # Ensure we trigger environment modifications if we have an environment if BootstrapEnvironment.spack_yaml().exists(): with BootstrapEnvironment() as env: - env.update_syspath_and_environ() + env.load() return [ _required_executable( From 6c268234ba2dea75bb4551199fc6663c7f972a2b Mon Sep 17 00:00:00 2001 From: Vicente Bolea Date: Tue, 20 Aug 2024 11:46:45 -0400 Subject: [PATCH 414/435] paraview: add smoke tests (#45759) --- .../builtin/packages/paraview/package.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 8edec4e3f33b37..e185592972d6de 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -6,6 +6,7 @@ import itertools import os import sys +from subprocess import Popen from spack.package import * @@ -706,3 +707,54 @@ def use_x11(): cmake_args.append(self.define_from_variant("VTKOSPRAY_ENABLE_DENOISER", "raytracing")) return cmake_args + + def test_smoke_test(self): + """Simple smoke test for ParaView""" + spec = self.spec + + pvserver = Executable(spec["paraview"].prefix.bin.pvserver) + pvserver("--help") + + def test_pvpython(self): + """Test pvpython""" + spec = self.spec + + if "~python" in spec: + raise SkipTest("Package must be installed with +python") + + pvpython = Executable(spec["paraview"].prefix.bin.pvpython) + pvpython("-c", "import paraview") + + def test_mpi_ensemble(self): + """Test MPI ParaView Client/Server ensemble""" + spec = self.spec + + if "~mpi" in spec or "~python" in spec: + raise SkipTest("Package must be installed with +mpi and +python") + + mpirun = spec["mpi"].prefix.bin.mpirun + pvserver = spec["paraview"].prefix.bin.pvserver + pvpython = Executable(spec["paraview"].prefix.bin.pvpython) + + with working_dir("smoke_test_build", create=True): + with Popen( + [mpirun, "-np", "3", pvserver, "--mpi", "--force-offscreen-rendering"] + ) as servers: + pvpython( + "--force-offscreen-rendering", + "-c", + "from paraview.simple import *;" + "Connect('127.0.0.1');" + "sphere = Sphere(ThetaResolution=16, PhiResolution=32);" + "sphere_remote = servermanager.Fetch(sphere);" + "Show(sphere);" + "Render()", + ) + servers.terminate() + + @run_after("install") + @on_package_attributes(run_tests=True) + def build_test(self): + self.test_smoke_test() + self.test_pvpython() + self.test_mpi_ensemble() From 3699a0ec9b4550e066a7c7a8265f2fe9aaa97cbf Mon Sep 17 00:00:00 2001 From: Vicente Bolea Date: Tue, 20 Aug 2024 11:52:35 -0400 Subject: [PATCH 415/435] paraview: add new v5.13.0-RC2 release (#45754) --- var/spack/repos/builtin/packages/paraview/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index e185592972d6de..6eb986df7fc70d 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -32,7 +32,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master", submodules=True) version( - "5.13.0-RC1", sha256="00aea2bbaf2eacd288a6cc95c1f4ed1a8a4965f27548b53ae473c1ee7caec30e" + "5.13.0-RC2", sha256="d10d0cec48c662d8c78470726af1b28cd39cbe434aef7fd0f75eec0112fa3f89" ) version( "5.12.1", From f596a8cdad601bb226723c551624d86abe3a6237 Mon Sep 17 00:00:00 2001 From: Marcel Koch Date: Tue, 20 Aug 2024 18:36:51 +0200 Subject: [PATCH 416/435] ginkgo: add v1.8.0 (#45791) * bump[Ginkgo]: add version 1.8.0 * [Ginkgo] add patch for rocthrust * [Ginkgo] change maintainer * [Ginkgo] use patch from PR * [Ginkgo] fix style issues --------- Co-authored-by: Terry Cojean --- .../repos/builtin/packages/ginkgo/package.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/ginkgo/package.py b/var/spack/repos/builtin/packages/ginkgo/package.py index 5c132f12e7fd46..b4638d9666f1b4 100644 --- a/var/spack/repos/builtin/packages/ginkgo/package.py +++ b/var/spack/repos/builtin/packages/ginkgo/package.py @@ -18,14 +18,15 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): test_requires_compiler = True - maintainers("tcojean", "hartwiganzt") + maintainers("MarcelKoch", "hartwiganzt") tags = ["e4s"] - license("MIT") + license("BSD-3-Clause") version("develop", branch="develop") version("master", branch="master") + version("1.8.0", commit="586b1754058d7a32d4bd1b650f9603484c2a8927") # v1.8.0 version("1.7.0", commit="49242ff89af1e695d7794f6d50ed9933024b66fe") # v1.7.0 version("1.6.0", commit="1f1ed46e724334626f016f105213c047e16bc1ae") # v1.6.0 version("1.5.0", commit="234594c92b58e2384dfb43c2d08e7f43e2b58e7a") # v1.5.0 @@ -57,10 +58,11 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.13:", type="build", when="@1.4.0:1.6.0") depends_on("cmake@3.16:", type="build", when="@1.7.0:") depends_on("cmake@3.18:", type="build", when="+cuda@1.7.0:") + depends_on("cmake@3.21:", type="build", when="+rocm@1.8.0:") depends_on("cuda@9:", when="+cuda @:1.4.0") depends_on("cuda@9.2:", when="+cuda @1.5.0:") depends_on("cuda@10.1:", when="+cuda @1.7.0:") - depends_on("mpi", when="+mpi") + depends_on("mpi@3.1:", when="+mpi") depends_on("rocthrust", when="+rocm") depends_on("hipsparse", when="+rocm") @@ -118,6 +120,13 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): # Add missing include statement patch("thrust-count-header.patch", when="+rocm @1.5.0") + # Correctly find rocthrust through CMake + patch( + "https://github.com/ginkgo-project/ginkgo/pull/1668.patch?full_index=1", + sha256="27d6ae6c87bec15464d20a963c336e89eac92625d07e3f9548e33cd7b952a496", + when="+rocm @1.8.0", + ) + def setup_build_environment(self, env): spec = self.spec if "+sycl" in spec: @@ -150,6 +159,8 @@ def cmake_args(self): raise InstallError("ginkgo +sycl requires %oneapi@2021.3.0:") elif self.spec.satisfies("@1.7.0: +sycl") and not self.spec.satisfies("%oneapi@2022.1.0:"): raise InstallError("ginkgo +sycl requires %oneapi@2022.1.0:") + elif self.spec.satisfies("@1.8.0: +sycl") and not self.spec.satisfies("%oneapi@2023.1.0:"): + raise InstallError("ginkgo +sycl requires %oneapi@2023.1.0:") spec = self.spec from_variant = self.define_from_variant From d714a9b2233d663229668d9b7f81a4fb095e7dbc Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Tue, 20 Aug 2024 16:10:09 -0400 Subject: [PATCH 417/435] mapl: add 2.47.2, 2.46.3 (#45795) --- var/spack/repos/builtin/packages/mapl/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/mapl/package.py b/var/spack/repos/builtin/packages/mapl/package.py index 2f9c2be678e991..e82a5eb49897f5 100644 --- a/var/spack/repos/builtin/packages/mapl/package.py +++ b/var/spack/repos/builtin/packages/mapl/package.py @@ -38,8 +38,10 @@ class Mapl(CMakePackage): version("develop", branch="develop") version("main", branch="main") + version("2.47.2", sha256="d4ca384bf249b755454cd486a26bae76944a7cae3a706b9a7c9298825077cac0") version("2.47.1", sha256="ca3e94c0caa78a91591fe63603d1836196f5294d4baad7cf1d83b229b3a85916") version("2.47.0", sha256="66c862d2ab8bcd6969e9728091dbca54f1f420e97e41424c4ba93ef606088459") + version("2.46.3", sha256="333e1382ab744302d28b6f39e7f5504c7919d77d2443d70af952f60cbd8f27e7") version("2.46.2", sha256="6d397ad73042355967de8ef5b521d6135c004f96e93ae7b215f9ee325e75c6f0") version("2.46.1", sha256="f3090281de6293b484259d58f852c45b98759de8291d36a4950e6d348ece6573") version("2.46.0", sha256="726d9588b724bd43e5085d1a2f8d806d548f185ed6b22a1b13c0ed06212d7be2") From c29652580a8d719b25afa80af98ccc9799ca4f5b Mon Sep 17 00:00:00 2001 From: Victor Brunini Date: Tue, 20 Aug 2024 15:48:42 -0700 Subject: [PATCH 418/435] arborx: Enable use of Kokkos from Trilinos for cuda/rocm. (#45220) --- .../repos/builtin/packages/arborx/package.py | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/arborx/package.py b/var/spack/repos/builtin/packages/arborx/package.py index 6a1ac398bf54bc..a4c1b7249c514d 100644 --- a/var/spack/repos/builtin/packages/arborx/package.py +++ b/var/spack/repos/builtin/packages/arborx/package.py @@ -81,14 +81,17 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage): depends_on("kokkos+%s" % backend.lower(), when="~trilinos+%s" % backend.lower()) for arch in CudaPackage.cuda_arch_values: - cuda_dep = "+cuda cuda_arch={0}".format(arch) - depends_on("kokkos {0}".format(cuda_dep), when=cuda_dep) + cuda_dep = f"+cuda cuda_arch={arch}" + depends_on(f"kokkos {cuda_dep}", when=f"~trilinos {cuda_dep}") + depends_on(f"trilinos {cuda_dep}", when=f"+trilinos {cuda_dep}") for arch in ROCmPackage.amdgpu_targets: - rocm_dep = "+rocm amdgpu_target={0}".format(arch) - depends_on("kokkos {0}".format(rocm_dep), when=rocm_dep) + rocm_dep = f"+rocm amdgpu_target={arch}" + depends_on(f"kokkos {rocm_dep}", when=f"~trilinos {rocm_dep}") + depends_on(f"trilinos {rocm_dep}", when=f"+trilinos {rocm_dep}") conflicts("+cuda", when="cuda_arch=none") + conflicts("^kokkos", when="+trilinos") depends_on("kokkos+cuda_lambda", when="~trilinos+cuda") # Trilinos/Kokkos @@ -104,20 +107,22 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage): depends_on("trilinos@14.4.0:", when="@1.6:+trilinos") patch("trilinos14.0-kokkos-major-version.patch", when="@1.4+trilinos ^trilinos@14.0.0") conflicts("~serial", when="+trilinos") - conflicts("+cuda", when="+trilinos") def cmake_args(self): spec = self.spec + if "~trilinos" in spec: + kokkos_spec = spec["kokkos"] + else: + kokkos_spec = spec["trilinos"] + options = [ - "-DKokkos_ROOT=%s" - % (spec["kokkos"].prefix if "~trilinos" in spec else spec["trilinos"].prefix), + f"-DKokkos_ROOT={kokkos_spec.prefix}", self.define_from_variant("ARBORX_ENABLE_MPI", "mpi"), ] if spec.satisfies("+cuda"): - # Only Kokkos allows '+cuda' for now - options.append("-DCMAKE_CXX_COMPILER=%s" % spec["kokkos"].kokkos_cxx) + options.append(f"-DCMAKE_CXX_COMPILER={kokkos_spec.kokkos_cxx}") if spec.satisfies("+rocm"): options.append("-DCMAKE_CXX_COMPILER=%s" % spec["hip"].hipcc) From dc3c96dd2fdf88cb5eb990bcfc748c314bb2e1f1 Mon Sep 17 00:00:00 2001 From: Lin Guo Date: Tue, 20 Aug 2024 18:41:30 -0700 Subject: [PATCH 419/435] orca: add 6.0.0 avx2 version (#45824) The avx2 version can be downloaded from the ORCA [forum](https://orcaforum.kofo.mpg.de/app.php/dlext/?view=detail&df_id=214#). The version is named `avx2-6.0.0` (as opposed to the more natural-looking `6.0.0-avx2`) to avoid the avx2 version shadowing the non-avx2 one. Definitely open for better suggestion. --- var/spack/repos/builtin/packages/orca/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/orca/package.py b/var/spack/repos/builtin/packages/orca/package.py index f0abb62569f255..00021a970d73b1 100644 --- a/var/spack/repos/builtin/packages/orca/package.py +++ b/var/spack/repos/builtin/packages/orca/package.py @@ -23,6 +23,9 @@ class Orca(Package): license("LGPL-2.1-or-later") + version( + "avx2-6.0.0", sha256="02c21294efe7b1b721e26cb90f98ee15ad682d02807201b7d217dfe67905a2fd" + ) version("6.0.0", sha256="219bd1deb6d64a63cb72471926cb81665cbbcdec19f9c9549761be67d49a29c6") version("5.0.4", sha256="c4ea5aea60da7bcb18a6b7042609206fbeb2a765c6fa958c5689d450b588b036") version("5.0.3", sha256="b8b9076d1711150a6d6cb3eb30b18e2782fa847c5a86d8404b9339faef105043") @@ -40,6 +43,7 @@ class Orca(Package): "5.0.3": "4.1.2", "5.0.4": "4.1.2", "6.0.0": "4.1.6", + "avx2-6.0.0": "4.1.6", } for orca_version, openmpi_version in openmpi_versions.items(): depends_on( @@ -47,10 +51,14 @@ class Orca(Package): ) def url_for_version(self, version): - openmpi_version = self.openmpi_versions[str(version.dotted)].replace(".", "") + openmpi_version = self.openmpi_versions[version.string].replace(".", "") if openmpi_version == "412": openmpi_version = "411" - return f"file://{os.getcwd()}/orca_{version.underscored}_linux_x86-64_shared_openmpi{openmpi_version}.tar.xz" + ver_parts = version.string.split("-") + ver_underscored = ver_parts[-1].replace(".", "_") + features = ver_parts[:-1] + ["shared"] + feature_text = "_".join(features) + return f"file://{os.getcwd()}/orca_{ver_underscored}_linux_x86-64_{feature_text}_openmpi{openmpi_version}.tar.xz" def install(self, spec, prefix): mkdirp(prefix.bin) From e8a13642a090bb5cef31412d389364891e89f225 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 21 Aug 2024 02:18:24 -0500 Subject: [PATCH 420/435] packages/*: http -> https where permanent redirect (#45835) * *: http -> https where permanent redirect * fix: style --- var/spack/repos/builtin/packages/ape/package.py | 4 ++-- .../builtin/packages/aperture-photometry/package.py | 2 +- var/spack/repos/builtin/packages/camx/package.py | 6 +++--- var/spack/repos/builtin/packages/cdd/package.py | 2 +- var/spack/repos/builtin/packages/cram/package.py | 2 +- var/spack/repos/builtin/packages/ddt/package.py | 9 +++++++-- var/spack/repos/builtin/packages/flink/package.py | 2 +- var/spack/repos/builtin/packages/geoip/package.py | 2 +- var/spack/repos/builtin/packages/gffread/package.py | 2 +- var/spack/repos/builtin/packages/git/package.py | 2 +- var/spack/repos/builtin/packages/graphviz/package.py | 2 +- var/spack/repos/builtin/packages/hpctoolkit/package.py | 2 +- var/spack/repos/builtin/packages/hto4l/package.py | 2 +- var/spack/repos/builtin/packages/hypre-cmake/package.py | 6 ++---- var/spack/repos/builtin/packages/itstool/package.py | 4 ++-- var/spack/repos/builtin/packages/ldsc/package.py | 2 +- var/spack/repos/builtin/packages/libnftnl/package.py | 2 +- var/spack/repos/builtin/packages/libtheora/package.py | 2 +- var/spack/repos/builtin/packages/lua-bitlib/package.py | 2 +- var/spack/repos/builtin/packages/lua-lpeg/package.py | 2 +- var/spack/repos/builtin/packages/minigmg/package.py | 2 +- var/spack/repos/builtin/packages/ocaml/package.py | 2 +- var/spack/repos/builtin/packages/ompt-openmp/package.py | 2 +- var/spack/repos/builtin/packages/open3d/package.py | 2 +- var/spack/repos/builtin/packages/openfst/package.py | 8 ++++---- .../repos/builtin/packages/perl-alien-svn/package.py | 2 +- var/spack/repos/builtin/packages/pism/package.py | 2 +- var/spack/repos/builtin/packages/pixman/package.py | 2 +- var/spack/repos/builtin/packages/pocl/package.py | 4 ++-- var/spack/repos/builtin/packages/py-croniter/package.py | 2 +- var/spack/repos/builtin/packages/py-doit/package.py | 2 +- var/spack/repos/builtin/packages/py-downhill/package.py | 2 +- .../repos/builtin/packages/py-fastcluster/package.py | 2 +- .../repos/builtin/packages/py-flawfinder/package.py | 2 +- var/spack/repos/builtin/packages/py-glob2/package.py | 2 +- .../packages/py-jupyter-server-mathjax/package.py | 2 +- var/spack/repos/builtin/packages/py-lhsmdu/package.py | 2 +- var/spack/repos/builtin/packages/py-mne/package.py | 2 +- var/spack/repos/builtin/packages/py-myhdl/package.py | 2 +- var/spack/repos/builtin/packages/py-mypy/package.py | 2 +- var/spack/repos/builtin/packages/py-netpyne/package.py | 2 +- var/spack/repos/builtin/packages/py-opentuner/package.py | 2 +- .../builtin/packages/py-orbax-checkpoint/package.py | 2 +- var/spack/repos/builtin/packages/py-outdated/package.py | 2 +- var/spack/repos/builtin/packages/py-panel/package.py | 2 +- var/spack/repos/builtin/packages/py-pyfr/package.py | 2 +- var/spack/repos/builtin/packages/py-pygresql/package.py | 4 ++-- var/spack/repos/builtin/packages/py-pylev/package.py | 2 +- var/spack/repos/builtin/packages/py-pymorph/package.py | 2 +- var/spack/repos/builtin/packages/py-pyqtgraph/package.py | 2 +- .../repos/builtin/packages/py-pysimdjson/package.py | 2 +- .../repos/builtin/packages/py-python-jose/package.py | 2 +- .../repos/builtin/packages/py-python-pptx/package.py | 2 +- .../repos/builtin/packages/py-requests-file/package.py | 2 +- var/spack/repos/builtin/packages/py-rx/package.py | 2 +- var/spack/repos/builtin/packages/py-seekpath/package.py | 2 +- .../builtin/packages/py-sqlalchemy-migrate/package.py | 2 +- .../repos/builtin/packages/py-stack-data/package.py | 2 +- var/spack/repos/builtin/packages/py-tuspy/package.py | 2 +- .../repos/builtin/packages/py-xrootdpyfs/package.py | 2 +- var/spack/repos/builtin/packages/rabbitmq/package.py | 2 +- var/spack/repos/builtin/packages/repeatmasker/package.py | 4 ++-- var/spack/repos/builtin/packages/rrdtool/package.py | 2 +- var/spack/repos/builtin/packages/survey/package.py | 2 +- var/spack/repos/builtin/packages/swig/package.py | 2 +- var/spack/repos/builtin/packages/thrift/package.py | 4 ++-- var/spack/repos/builtin/packages/ucx/package.py | 2 +- var/spack/repos/builtin/packages/unixodbc/package.py | 4 ++-- var/spack/repos/builtin/packages/voropp/package.py | 4 ++-- var/spack/repos/builtin/packages/wannier90/package.py | 4 ++-- .../repos/builtin/packages/xsdk-examples/package.py | 2 +- var/spack/repos/builtin/packages/yambo/package.py | 2 +- 72 files changed, 93 insertions(+), 90 deletions(-) diff --git a/var/spack/repos/builtin/packages/ape/package.py b/var/spack/repos/builtin/packages/ape/package.py index 0164ef29f1ecd6..44f98545aa8f4e 100644 --- a/var/spack/repos/builtin/packages/ape/package.py +++ b/var/spack/repos/builtin/packages/ape/package.py @@ -11,9 +11,9 @@ class Ape(Package): Theory framework""" homepage = "https://www.tddft.org/programs/APE/" - url = "http://www.tddft.org/programs/APE/sites/default/files/ape-2.2.1.tar.gz" + url = "https://gitlab.com/ape/ape/-/archive/2.2.1/ape-2.2.1.tar.gz" - version("2.2.1", sha256="1bdb7f987fde81f8a5f335da6b59fa884e6d185d4a0995c90fde7c04376ce9e3") + version("2.2.1", sha256="3f5125182e308ab49338cad791e175ce158526a56c6ca88ac6582c1e5d7435d4") depends_on("gsl") depends_on("libxc@:4", when="@2.3.0:") diff --git a/var/spack/repos/builtin/packages/aperture-photometry/package.py b/var/spack/repos/builtin/packages/aperture-photometry/package.py index cb32ba52a75025..0a53de64372520 100644 --- a/var/spack/repos/builtin/packages/aperture-photometry/package.py +++ b/var/spack/repos/builtin/packages/aperture-photometry/package.py @@ -11,7 +11,7 @@ class AperturePhotometry(Package): """Aperture Photometry Tool APT is software for astronomical research""" - homepage = "http://www.aperturephotometry.org/" + homepage = "https://www.aperturephotometry.org/" url = "https://web.ipac.caltech.edu/staff/laher/apt/APT_v2.8.4.tar.gz" maintainers("snehring") diff --git a/var/spack/repos/builtin/packages/camx/package.py b/var/spack/repos/builtin/packages/camx/package.py index 08249b3e8ebd56..3f4b285cfc842f 100644 --- a/var/spack/repos/builtin/packages/camx/package.py +++ b/var/spack/repos/builtin/packages/camx/package.py @@ -18,13 +18,13 @@ class Camx(MakefilePackage): version( "6.50", - url="http://www.camx.com/getmedia/caaf7983-616b-4207-bd10-c2b404bda78d/CAMx_v6-50-src-180430.tgz", + url="https://www.camx.com/getmedia/caaf7983-616b-4207-bd10-c2b404bda78d/CAMx_v6-50-src-180430.tgz", sha256="4a53f78e0722d85a9c7d8ed6732aff55163a4ce06f69b6bbc9e00a3bf36a756c", ) resource( when="@6.50", name="user_manual", - url="http://www.camx.com/files/camxusersguide_v6-50.pdf", + url="https://www.camx.com/files/camxusersguide_v6-50.pdf", sha256="b02d9826d59f22f9daa5955bb7b9fd3e0ca86eb73017c5845896d40391c64588", expand=False, placement="doc", @@ -32,7 +32,7 @@ class Camx(MakefilePackage): resource( when="@6.50", name="input_data", - url="http://www.camx.com/getmedia/77ad8028-9388-4f5d-bcab-a418e15dde68/v6-50-specific-inputs-180430.tgz", + url="https://www.camx.com/getmedia/77ad8028-9388-4f5d-bcab-a418e15dde68/v6-50-specific-inputs-180430.tgz", sha256="89b58283e37b8e2bd550a8ec62208f241be72c78dc26da9c42ad63c34f54ebfb", placement="data", ) diff --git a/var/spack/repos/builtin/packages/cdd/package.py b/var/spack/repos/builtin/packages/cdd/package.py index e061ceff6b8aa1..bfdf84ca7a9809 100644 --- a/var/spack/repos/builtin/packages/cdd/package.py +++ b/var/spack/repos/builtin/packages/cdd/package.py @@ -28,7 +28,7 @@ class Cdd(Package): patch("Makefile.spack.patch") def url_for_version(self, version): - url = "http://www.cs.mcgill.ca/~fukuda/download/cdd/cdd-{0}.tar.gz" + url = "https://www.cs.mcgill.ca/~fukuda/download/cdd/cdd-{0}.tar.gz" return url.format(version.joined) def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/cram/package.py b/var/spack/repos/builtin/packages/cram/package.py index 0869adb08d09ed..71b49c2e24c02f 100644 --- a/var/spack/repos/builtin/packages/cram/package.py +++ b/var/spack/repos/builtin/packages/cram/package.py @@ -10,7 +10,7 @@ class Cram(CMakePackage): """Cram runs many small MPI jobs inside one large MPI job.""" homepage = "https://github.com/llnl/cram" - url = "http://github.com/llnl/cram/archive/v1.0.1.tar.gz" + url = "https://github.com/llnl/cram/archive/v1.0.1.tar.gz" version("1.0.1", sha256="985888018f6481c3e9ab4f1d1788e25725d8b92a1cf52b1366ee93793614709a") diff --git a/var/spack/repos/builtin/packages/ddt/package.py b/var/spack/repos/builtin/packages/ddt/package.py index 11dd8fb2c947a4..33bd0933d64421 100644 --- a/var/spack/repos/builtin/packages/ddt/package.py +++ b/var/spack/repos/builtin/packages/ddt/package.py @@ -14,7 +14,7 @@ class Ddt(Package): behavior to achieve lightning-fast performance at all scales.""" homepage = "https://arm.com" - url = "http://content.allinea.com/downloads/arm-forge-22.0.2-linux-x86_64.tar" + url = "https://downloads.linaroforge.com/22.1.3/arm-forge-22.1.3-linux-x86_64.tar" maintainers("robgics") @@ -22,7 +22,12 @@ class Ddt(Package): license_files = ["./licences/ddt.lic"] # Versions before 22.0 have a security vulnerability. Do not install them. - version("22.0.2", sha256="3db0c3993d1db617f850c48d25c9239f06a018c895ea305786a7ad836a44496d") + version("22.1.3", sha256="4f8a8b1df6ad712e89c82eedf4bd85b93b57b3c8d5b37d13480ff058fa8f4467") + version( + "22.0.2", + sha256="3db0c3993d1db617f850c48d25c9239f06a018c895ea305786a7ad836a44496d", + deprecated=True, + ) def setup_run_environment(self, env): env.prepend_path("PATH", join_path(self.prefix, "bin")) diff --git a/var/spack/repos/builtin/packages/flink/package.py b/var/spack/repos/builtin/packages/flink/package.py index d8d351ad73fb69..f94f97a91044eb 100644 --- a/var/spack/repos/builtin/packages/flink/package.py +++ b/var/spack/repos/builtin/packages/flink/package.py @@ -26,7 +26,7 @@ class Flink(Package): depends_on("java@8:", type="run") def url_for_version(self, version): - url = "http://archive.apache.org/dist/flink/flink-{0}/flink-{0}-bin-scala_2.11.tgz" + url = "https://archive.apache.org/dist/flink/flink-{0}/flink-{0}-bin-scala_2.11.tgz" return url.format(version) def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/geoip/package.py b/var/spack/repos/builtin/packages/geoip/package.py index 525ad60cbf7743..262a64f8cca9ba 100644 --- a/var/spack/repos/builtin/packages/geoip/package.py +++ b/var/spack/repos/builtin/packages/geoip/package.py @@ -10,7 +10,7 @@ class Geoip(AutotoolsPackage): """Library for country/city/organization to IP address or hostname mapping.""" - homepage = "http://www.maxmind.com/app/c" + homepage = "https://www.maxmind.com/app/c" url = "https://github.com/maxmind/geoip-api-c/releases/download/v1.6.12/GeoIP-1.6.12.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/gffread/package.py b/var/spack/repos/builtin/packages/gffread/package.py index 98ba8aef1a6bbf..c289d8a0e6c5b9 100644 --- a/var/spack/repos/builtin/packages/gffread/package.py +++ b/var/spack/repos/builtin/packages/gffread/package.py @@ -10,7 +10,7 @@ class Gffread(MakefilePackage): """gffread: GFF/GTF utility providing format conversions, region filtering, FASTA sequence extraction and more""" - homepage = "http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread" + homepage = "https://ccb.jhu.edu/software/stringtie/gff.shtml#gffread" url = "https://github.com/gpertea/gffread/releases/download/v0.12.7/gffread-0.12.7.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index f4ebee09221d49..bc4803a6b20be5 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -16,7 +16,7 @@ class Git(AutotoolsPackage): projects with speed and efficiency. """ - homepage = "http://git-scm.com" + homepage = "https://git-scm.com" url = "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.12.0.tar.gz" maintainers("jennfshr") diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 7e5c1a30635abc..573c8abef5f0d2 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -15,7 +15,7 @@ class Graphviz(AutotoolsPackage): """Graph Visualization Software""" - homepage = "http://www.graphviz.org" + homepage = "https://www.graphviz.org" git = "https://gitlab.com/graphviz/graphviz.git" url = "https://gitlab.com/graphviz/graphviz/-/archive/2.46.0/graphviz-2.46.0.tar.bz2" diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index 18690a512f940c..0c6d77b65f3db6 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -20,7 +20,7 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): measurements of a program's work, resource consumption, and inefficiency and attributes them to the full calling context in which they occur.""" - homepage = "http://hpctoolkit.org" + homepage = "https://hpctoolkit.org" git = "https://gitlab.com/hpctoolkit/hpctoolkit.git" maintainers("mwkrentel") diff --git a/var/spack/repos/builtin/packages/hto4l/package.py b/var/spack/repos/builtin/packages/hto4l/package.py index 921af275c6be08..4a8d6571d8272f 100644 --- a/var/spack/repos/builtin/packages/hto4l/package.py +++ b/var/spack/repos/builtin/packages/hto4l/package.py @@ -11,7 +11,7 @@ class Hto4l(MakefilePackage): up to NLOPS electroweak accuracy and in presence of dimension-6 operators.""" homepage = "https://www2.pv.infn.it/~hepcomplex/hto4l.html" - url = "http://www2.pv.infn.it/~hepcomplex/releases/hto4l/Hto4l-v2.02.tar.bz2" + url = "https://www2.pv.infn.it/hepcomplex/releases/hto4l/Hto4l-v2.02.tar.bz2" maintainers("haralmha") diff --git a/var/spack/repos/builtin/packages/hypre-cmake/package.py b/var/spack/repos/builtin/packages/hypre-cmake/package.py index 0a6bd38f6e1870..f794658cf77db4 100644 --- a/var/spack/repos/builtin/packages/hypre-cmake/package.py +++ b/var/spack/repos/builtin/packages/hypre-cmake/package.py @@ -13,7 +13,7 @@ class HypreCmake(CMakePackage, CudaPackage): features parallel multigrid methods for both structured and unstructured grid problems.""" - homepage = "http://computing.llnl.gov/project/linear_solvers/software.php" + homepage = "https://computing.llnl.gov/project/linear_solvers/software.php" url = "https://github.com/hypre-space/hypre/archive/v2.14.0.tar.gz" git = "https://github.com/hypre-space/hypre.git" @@ -58,9 +58,7 @@ def url_for_version(self, version): if version >= Version("2.12.0"): url = f"https://github.com/hypre-space/hypre/archive/v{version}.tar.gz" else: - url = ( - f"http://computing.llnl.gov/project/linear_solvers/download/hypre-{version}.tar.gz" - ) + url = f"https://computing.llnl.gov/project/linear_solvers/download/hypre-{version}.tar.gz" return url diff --git a/var/spack/repos/builtin/packages/itstool/package.py b/var/spack/repos/builtin/packages/itstool/package.py index 1847302407d53c..69c45b6d88bdb1 100644 --- a/var/spack/repos/builtin/packages/itstool/package.py +++ b/var/spack/repos/builtin/packages/itstool/package.py @@ -11,8 +11,8 @@ class Itstool(AutotoolsPackage): rules from the W3C Internationalization Tag Set (ITS) to determine what to translate and how to separate it into PO file messages.""" - homepage = "http://itstool.org/" - url = "http://files.itstool.org/itstool/itstool-2.0.2.tar.bz2" + homepage = "https://itstool.org/" + url = "https://files.itstool.org/itstool/itstool-2.0.2.tar.bz2" maintainers("agoodLANL") diff --git a/var/spack/repos/builtin/packages/ldsc/package.py b/var/spack/repos/builtin/packages/ldsc/package.py index aa3defd512d9a9..00f7bc60607063 100644 --- a/var/spack/repos/builtin/packages/ldsc/package.py +++ b/var/spack/repos/builtin/packages/ldsc/package.py @@ -10,7 +10,7 @@ class Ldsc(PythonPackage): """ldsc is a command line tool for estimating heritability and genetic correlation from GWAS summary statistics. ldsc also computes LD scores""" - homepage = "http://github.com/bulik/ldsc" + homepage = "https://github.com/bulik/ldsc" pypi = "ldsc/ldsc-2.0.1.tar.gz" license("GPL-3.0-only", checked_by="A-N-Other") diff --git a/var/spack/repos/builtin/packages/libnftnl/package.py b/var/spack/repos/builtin/packages/libnftnl/package.py index b3ad7b0531854d..3d136f7b5443fa 100644 --- a/var/spack/repos/builtin/packages/libnftnl/package.py +++ b/var/spack/repos/builtin/packages/libnftnl/package.py @@ -11,7 +11,7 @@ class Libnftnl(AutotoolsPackage): over libmnl.""" homepage = "https://git.netfilter.org/libnftnl/" - url = "http://ftp.netfilter.org/pub/libnftnl/libnftnl-1.1.5.tar.bz2" + url = "https://ftp.netfilter.org/pub/libnftnl/libnftnl-1.1.5.tar.bz2" license("GPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/libtheora/package.py b/var/spack/repos/builtin/packages/libtheora/package.py index a6aede4da7172f..b3da2e71034cea 100644 --- a/var/spack/repos/builtin/packages/libtheora/package.py +++ b/var/spack/repos/builtin/packages/libtheora/package.py @@ -16,7 +16,7 @@ class Libtheora(AutotoolsPackage, MSBuildPackage): """Theora Video Compression.""" homepage = "https://www.theora.org" - url = "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz" + url = "https://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz" git = "https://gitlab.xiph.org/xiph/theora.git" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/lua-bitlib/package.py b/var/spack/repos/builtin/packages/lua-bitlib/package.py index a125690f45e309..d17ac20be3d9c0 100644 --- a/var/spack/repos/builtin/packages/lua-bitlib/package.py +++ b/var/spack/repos/builtin/packages/lua-bitlib/package.py @@ -10,7 +10,7 @@ class LuaBitlib(LuaPackage): """Lua-jit-like bitwise operations for lua""" - homepage = "http://luaforge.net/projects/bitlib" + homepage = "https://luaforge.net/projects/bitlib" url = "https://luarocks.org/manifests/luarocks/bitlib-23-2.src.rock" version( diff --git a/var/spack/repos/builtin/packages/lua-lpeg/package.py b/var/spack/repos/builtin/packages/lua-lpeg/package.py index 3bc9d379457d4e..c15539ae83f2d6 100644 --- a/var/spack/repos/builtin/packages/lua-lpeg/package.py +++ b/var/spack/repos/builtin/packages/lua-lpeg/package.py @@ -10,7 +10,7 @@ class LuaLpeg(LuaPackage): """pattern-matching for lua""" - homepage = "http://www.inf.puc-rio.br/~roberto/lpeg/" + homepage = "https://www.inf.puc-rio.br/~roberto/lpeg/" url = "https://luarocks.org/manifests/gvvaughan/lpeg-1.0.2-1.src.rock" license("MIT") diff --git a/var/spack/repos/builtin/packages/minigmg/package.py b/var/spack/repos/builtin/packages/minigmg/package.py index f29580c9c721d5..f7da002cdf08ee 100644 --- a/var/spack/repos/builtin/packages/minigmg/package.py +++ b/var/spack/repos/builtin/packages/minigmg/package.py @@ -23,7 +23,7 @@ class Minigmg(Package): Note, miniGMG code has been supersceded by HPGMG.""" homepage = ( - "http://crd.lbl.gov/departments/computer-science/PAR/research/previous-projects/miniGMG/" + "https://crd.lbl.gov/departments/computer-science/PAR/research/previous-projects/miniGMG/" ) url = "https://crd.lbl.gov/assets/Uploads/FTG/Projects/miniGMG/miniGMG.tar.gz" diff --git a/var/spack/repos/builtin/packages/ocaml/package.py b/var/spack/repos/builtin/packages/ocaml/package.py index 7fb887965a2322..6da730dc53740f 100644 --- a/var/spack/repos/builtin/packages/ocaml/package.py +++ b/var/spack/repos/builtin/packages/ocaml/package.py @@ -46,7 +46,7 @@ class Ocaml(Package): variant("force-safe-string", default=True, description="Enforce safe (immutable) strings") def url_for_version(self, version): - url = "http://caml.inria.fr/pub/distrib/ocaml-{0}/ocaml-{1}.tar.gz" + url = "https://caml.inria.fr/pub/distrib/ocaml-{0}/ocaml-{1}.tar.gz" return url.format(str(version)[:-2], version) def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py index 4d452d103f4893..dbb7113ff07900 100644 --- a/var/spack/repos/builtin/packages/ompt-openmp/package.py +++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py @@ -15,7 +15,7 @@ class OmptOpenmp(CMakePackage): """ homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp" - url = "http://github.com/khuck/LLVM-openmp/archive/v0.1.tar.gz" + url = "https://github.com/khuck/LLVM-openmp/archive/v0.1.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/open3d/package.py b/var/spack/repos/builtin/packages/open3d/package.py index 25fca442400e76..01220d0c1b85dd 100644 --- a/var/spack/repos/builtin/packages/open3d/package.py +++ b/var/spack/repos/builtin/packages/open3d/package.py @@ -11,7 +11,7 @@ class Open3d(CMakePackage, CudaPackage): """Open3D: A Modern Library for 3D Data Processing.""" - homepage = "http://www.open3d.org/" + homepage = "https://www.open3d.org/" url = "https://github.com/isl-org/Open3D/archive/refs/tags/v0.13.0.tar.gz" git = "https://github.com/isl-org/Open3D.git" diff --git a/var/spack/repos/builtin/packages/openfst/package.py b/var/spack/repos/builtin/packages/openfst/package.py index 03dcd04925aada..de50be11357a02 100644 --- a/var/spack/repos/builtin/packages/openfst/package.py +++ b/var/spack/repos/builtin/packages/openfst/package.py @@ -12,9 +12,9 @@ class Openfst(AutotoolsPackage): finite-state transducers are automata where each transition has an input label, an output label, and a weight.""" - homepage = "http://www.openfst.org" - url = "http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.6.1.tar.gz" - list_url = "http://www.openfst.org/twiki/bin/view/FST/FstDownload" + homepage = "https://www.openfst.org" + url = "https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.6.1.tar.gz" + list_url = "https://www.openfst.org/twiki/bin/view/FST/FstDownload" license("Apache-2.0") @@ -33,7 +33,7 @@ class Openfst(AutotoolsPackage): version( "1.4.1-patch", sha256="e671bf6bd4425a1fed4e7543a024201b74869bfdd029bdf9d10c53a3c2818277", - url="http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.4.1.tar.gz", + url="https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.4.1.tar.gz", ) version("1.4.1", sha256="e671bf6bd4425a1fed4e7543a024201b74869bfdd029bdf9d10c53a3c2818277") version("1.4.0", sha256="eb557f37560438f03912b4e43335c4c9e72aa486d4f2046127131185eb88f17a") diff --git a/var/spack/repos/builtin/packages/perl-alien-svn/package.py b/var/spack/repos/builtin/packages/perl-alien-svn/package.py index f75341d10c354b..18b06469d5fbe8 100644 --- a/var/spack/repos/builtin/packages/perl-alien-svn/package.py +++ b/var/spack/repos/builtin/packages/perl-alien-svn/package.py @@ -11,7 +11,7 @@ class PerlAlienSvn(PerlPackage): """Perl SVN extension.""" - homepage = "http://metacpan.org/source/MSCHWERN/Alien-SVN-v1.8.11.0" + homepage = "https://metacpan.org/source/MSCHWERN/Alien-SVN-v1.8.11.0" url = "https://cpan.metacpan.org/authors/id/M/MS/MSCHWERN/Alien-SVN-v1.8.11.0.tar.gz" version("1.8.11.0", sha256="acf8ebce1cb6958ef24611a453abee32b8e4dfe767563834362891ef3f30fc68") diff --git a/var/spack/repos/builtin/packages/pism/package.py b/var/spack/repos/builtin/packages/pism/package.py index 85b45cec32ddc7..d7c7be75be77ca 100644 --- a/var/spack/repos/builtin/packages/pism/package.py +++ b/var/spack/repos/builtin/packages/pism/package.py @@ -9,7 +9,7 @@ class Pism(CMakePackage): """Parallel Ice Sheet Model""" - homepage = "http://pism-docs.org/wiki/doku.php:=" + homepage = "https://pism-docs.org/wiki/doku.php:=" url = "https://github.com/pism/pism/archive/v1.1.4.tar.gz" git = "https://github.com/pism/pism.git" diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index 499b313c815aba..a1abb45bba7744 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -13,7 +13,7 @@ class Pixman(AutotoolsPackage): pixel manipulation features such as image compositing and trapezoid rasterization.""" - homepage = "http://www.pixman.org" + homepage = "https://www.pixman.org" url = "https://cairographics.org/releases/pixman-0.32.6.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/pocl/package.py b/var/spack/repos/builtin/packages/pocl/package.py index 7a139a624a6bf5..31fc0b3574cf92 100644 --- a/var/spack/repos/builtin/packages/pocl/package.py +++ b/var/spack/repos/builtin/packages/pocl/package.py @@ -15,7 +15,7 @@ class Pocl(CMakePackage): and devices, both for homogeneous CPU and heterogeneous GPUs/accelerators.""" - homepage = "http://portablecl.org" + homepage = "https://portablecl.org" url = "https://github.com/pocl/pocl/archive/v1.1.tar.gz" git = "https://github.com/pocl/pocl.git" @@ -80,7 +80,7 @@ def url_for_version(self, version): if version >= Version("1.0"): url = "https://github.com/pocl/pocl/archive/v{0}.tar.gz" else: - url = "http://portablecl.org/downloads/pocl-{0}.tar.gz" + url = "https://portablecl.org/downloads/pocl-{0}.tar.gz" return url.format(version.up_to(2)) diff --git a/var/spack/repos/builtin/packages/py-croniter/package.py b/var/spack/repos/builtin/packages/py-croniter/package.py index f0763e4ab78bc5..29eecc2c6d4462 100644 --- a/var/spack/repos/builtin/packages/py-croniter/package.py +++ b/var/spack/repos/builtin/packages/py-croniter/package.py @@ -9,7 +9,7 @@ class PyCroniter(PythonPackage): """croniter provides iteration for datetime object with cron like format.""" - homepage = "http://github.com/kiorky/croniter" + homepage = "https://github.com/kiorky/croniter" pypi = "croniter/croniter-1.3.8.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-doit/package.py b/var/spack/repos/builtin/packages/py-doit/package.py index 43b6d0fe6174e6..c99091254fb651 100644 --- a/var/spack/repos/builtin/packages/py-doit/package.py +++ b/var/spack/repos/builtin/packages/py-doit/package.py @@ -9,7 +9,7 @@ class PyDoit(PythonPackage): """doit - Automation Tool.""" - homepage = "http://pydoit.org/" + homepage = "https://pydoit.org/" pypi = "doit/doit-0.36.0.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-downhill/package.py b/var/spack/repos/builtin/packages/py-downhill/package.py index 26fdfb33648a50..601a8bd82163d4 100644 --- a/var/spack/repos/builtin/packages/py-downhill/package.py +++ b/var/spack/repos/builtin/packages/py-downhill/package.py @@ -9,7 +9,7 @@ class PyDownhill(PythonPackage): """Stochastic optimization routines for Theano""" - homepage = "http://github.com/lmjohns3/downhill" + homepage = "https://github.com/lmjohns3/downhill" pypi = "downhill/downhill-0.4.0.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-fastcluster/package.py b/var/spack/repos/builtin/packages/py-fastcluster/package.py index ce605e2e250d61..824913fb23289d 100644 --- a/var/spack/repos/builtin/packages/py-fastcluster/package.py +++ b/var/spack/repos/builtin/packages/py-fastcluster/package.py @@ -9,7 +9,7 @@ class PyFastcluster(PythonPackage): """Fast hierarchical clustering routines for R and Python.""" - homepage = "http://danifold.net/" + homepage = "https://danifold.net/" pypi = "fastcluster/fastcluster-1.1.26.tar.gz" license("BSD-2-Clause") diff --git a/var/spack/repos/builtin/packages/py-flawfinder/package.py b/var/spack/repos/builtin/packages/py-flawfinder/package.py index 1d4d0d768b1317..c566daa7a2d224 100644 --- a/var/spack/repos/builtin/packages/py-flawfinder/package.py +++ b/var/spack/repos/builtin/packages/py-flawfinder/package.py @@ -9,7 +9,7 @@ class PyFlawfinder(PythonPackage, SourceforgePackage): """a program that examines source code looking for security weaknesses""" - homepage = "http://dwheeler.com/flawfinder/" + homepage = "https://dwheeler.com/flawfinder/" sourceforge_mirror_path = "project/flawfinder/flawfinder-2.0.19.tar.gz" license("GPL-2.0+") diff --git a/var/spack/repos/builtin/packages/py-glob2/package.py b/var/spack/repos/builtin/packages/py-glob2/package.py index 03bc375a98ce32..ef2efd23df6073 100644 --- a/var/spack/repos/builtin/packages/py-glob2/package.py +++ b/var/spack/repos/builtin/packages/py-glob2/package.py @@ -10,7 +10,7 @@ class PyGlob2(PythonPackage): """Version of the glob module that can capture patterns and supports recursive wildcards.""" - homepage = "http://github.com/miracle2k/python-glob2/" + homepage = "https://github.com/miracle2k/python-glob2/" pypi = "glob2/glob2-0.7.tar.gz" version("0.7", sha256="85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c") diff --git a/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py b/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py index 18cf66199606a3..8a5da89cde2ade 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py @@ -9,7 +9,7 @@ class PyJupyterServerMathjax(PythonPackage): """MathJax resources as a Jupyter Server Extension.""" - homepage = "http://jupyter.org/" + homepage = "https://jupyter.org/" pypi = "jupyter_server_mathjax/jupyter_server_mathjax-0.2.3.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/py-lhsmdu/package.py b/var/spack/repos/builtin/packages/py-lhsmdu/package.py index b6386e0b7e328c..39ee3a8bc2a94b 100644 --- a/var/spack/repos/builtin/packages/py-lhsmdu/package.py +++ b/var/spack/repos/builtin/packages/py-lhsmdu/package.py @@ -13,7 +13,7 @@ class PyLhsmdu(PythonPackage): from Deutsch and Deutsch, Latin hypercube sampling with multidimensional uniformity.""" - homepage = "http://github.com/sahilm89/lhsmdu" + homepage = "https://github.com/sahilm89/lhsmdu" pypi = "lhsmdu/lhsmdu-1.1.tar.gz" maintainers("liuyangzhuan") diff --git a/var/spack/repos/builtin/packages/py-mne/package.py b/var/spack/repos/builtin/packages/py-mne/package.py index 942680c8d778bc..05255703b51a8e 100644 --- a/var/spack/repos/builtin/packages/py-mne/package.py +++ b/var/spack/repos/builtin/packages/py-mne/package.py @@ -9,7 +9,7 @@ class PyMne(PythonPackage): """MNE python project for MEG and EEG data analysis.""" - homepage = "http://mne.tools/" + homepage = "https://mne.tools/" pypi = "mne/mne-0.23.4.tar.gz" git = "https://github.com/mne-tools/mne-python.git" diff --git a/var/spack/repos/builtin/packages/py-myhdl/package.py b/var/spack/repos/builtin/packages/py-myhdl/package.py index e0066613682f7e..2716d8b9d24925 100644 --- a/var/spack/repos/builtin/packages/py-myhdl/package.py +++ b/var/spack/repos/builtin/packages/py-myhdl/package.py @@ -10,7 +10,7 @@ class PyMyhdl(PythonPackage): """Python as a Hardware Description Language""" - homepage = "http://www.myhdl.org" + homepage = "https://www.myhdl.org" pypi = "myhdl/myhdl-0.9.0.tar.gz" license("LGPL-2.1-or-later") diff --git a/var/spack/repos/builtin/packages/py-mypy/package.py b/var/spack/repos/builtin/packages/py-mypy/package.py index f00d50faac66b8..b1b54e5491866f 100644 --- a/var/spack/repos/builtin/packages/py-mypy/package.py +++ b/var/spack/repos/builtin/packages/py-mypy/package.py @@ -9,7 +9,7 @@ class PyMypy(PythonPackage): """Optional static typing for Python.""" - homepage = "http://www.mypy-lang.org/" + homepage = "https://www.mypy-lang.org/" pypi = "mypy/mypy-0.740.tar.gz" git = "https://github.com/python/mypy.git" diff --git a/var/spack/repos/builtin/packages/py-netpyne/package.py b/var/spack/repos/builtin/packages/py-netpyne/package.py index 1b4c0bb01e5c3a..4eee7c0c7350aa 100644 --- a/var/spack/repos/builtin/packages/py-netpyne/package.py +++ b/var/spack/repos/builtin/packages/py-netpyne/package.py @@ -11,7 +11,7 @@ class PyNetpyne(PythonPackage): parallel simulation, optimization and analysis of multiscale biological neuronal networks in NEURON.""" - homepage = "http://www.netpyne.org/" + homepage = "https://www.netpyne.org/" url = "https://github.com/suny-downstate-medical-center/netpyne/archive/refs/tags/v1.0.3.1.tar.gz" git = "https://github.com/suny-downstate-medical-center/netpyne.git" diff --git a/var/spack/repos/builtin/packages/py-opentuner/package.py b/var/spack/repos/builtin/packages/py-opentuner/package.py index dcf344929e43a4..f96bc803b4f966 100644 --- a/var/spack/repos/builtin/packages/py-opentuner/package.py +++ b/var/spack/repos/builtin/packages/py-opentuner/package.py @@ -9,7 +9,7 @@ class PyOpentuner(PythonPackage): """An extensible framework for program autotuning.""" - homepage = "http://opentuner.org/" + homepage = "https://opentuner.org/" git = "https://github.com/jansel/opentuner.git" maintainers("matthiasdiener") diff --git a/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py b/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py index a74a1198f017f1..99d1af70c9812d 100644 --- a/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py +++ b/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py @@ -13,7 +13,7 @@ class PyOrbaxCheckpoint(PythonPackage): composable API which maximizes flexibility for diverse use cases. """ - homepage = "http://github.com/google/orbax" + homepage = "https://github.com/google/orbax" pypi = "orbax_checkpoint/orbax_checkpoint-0.5.3.tar.gz" license("Apache-2.0") diff --git a/var/spack/repos/builtin/packages/py-outdated/package.py b/var/spack/repos/builtin/packages/py-outdated/package.py index f7137d0288336e..f5203a22ce2270 100644 --- a/var/spack/repos/builtin/packages/py-outdated/package.py +++ b/var/spack/repos/builtin/packages/py-outdated/package.py @@ -10,7 +10,7 @@ class PyOutdated(PythonPackage): """This is a mini-library which, given a package name and a version, checks if it's the latest version available on PyPI.""" - homepage = "http://github.com/alexmojaki/outdated" + homepage = "https://github.com/alexmojaki/outdated" pypi = "outdated/outdated-0.2.2.tar.gz" maintainers("meyersbs") diff --git a/var/spack/repos/builtin/packages/py-panel/package.py b/var/spack/repos/builtin/packages/py-panel/package.py index 52bff696fcc7de..4444026be7f50d 100644 --- a/var/spack/repos/builtin/packages/py-panel/package.py +++ b/var/spack/repos/builtin/packages/py-panel/package.py @@ -9,7 +9,7 @@ class PyPanel(PythonPackage): """A high level app and dashboarding solution for Python.""" - homepage = "http://panel.holoviz.org/" + homepage = "https://panel.holoviz.org/" pypi = "panel/panel-0.14.4.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/py-pyfr/package.py b/var/spack/repos/builtin/packages/py-pyfr/package.py index 482a64854e936d..e1a9962c1c02be 100644 --- a/var/spack/repos/builtin/packages/py-pyfr/package.py +++ b/var/spack/repos/builtin/packages/py-pyfr/package.py @@ -12,7 +12,7 @@ class PyPyfr(PythonPackage, CudaPackage, ROCmPackage): advection-diffusion type problems on streaming architectures using the Flux Reconstruction approach of Huynh.""" - homepage = "http://www.pyfr.org/" + homepage = "https://www.pyfr.org/" pypi = "pyfr/pyfr-1.13.0.tar.gz" git = "https://github.com/PyFR/PyFR/" maintainers("MichaelLaufer") diff --git a/var/spack/repos/builtin/packages/py-pygresql/package.py b/var/spack/repos/builtin/packages/py-pygresql/package.py index ef723799c38ba0..6e9fe6d7da6c83 100644 --- a/var/spack/repos/builtin/packages/py-pygresql/package.py +++ b/var/spack/repos/builtin/packages/py-pygresql/package.py @@ -10,8 +10,8 @@ class PyPygresql(PythonPackage): """PyGreSQL is an open-source Python module that interfaces to a PostgreSQL database""" - homepage = "http://www.pygresql.org" - url = "http://www.pygresql.org/files/PyGreSQL-5.0.5.tar.gz" + homepage = "https://www.pygresql.org" + url = "https://www.pygresql.org/files/PyGreSQL-5.0.5.tar.gz" version("5.0.5", sha256="ff5e76b840600d4912b79daf347b44274a1c0368663e7b57529c406f8426479c") diff --git a/var/spack/repos/builtin/packages/py-pylev/package.py b/var/spack/repos/builtin/packages/py-pylev/package.py index 5eebc9e1094c5c..cc005f40ceb899 100644 --- a/var/spack/repos/builtin/packages/py-pylev/package.py +++ b/var/spack/repos/builtin/packages/py-pylev/package.py @@ -9,7 +9,7 @@ class PyPylev(PythonPackage): """A pure Python Levenshtein implementation that's not freaking GPL'd.""" - homepage = "http://github.com/toastdriven/pylev" + homepage = "https://github.com/toastdriven/pylev" pypi = "pylev/pylev-1.4.0.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/py-pymorph/package.py b/var/spack/repos/builtin/packages/py-pymorph/package.py index 3931bab4953d5c..4284aec21d4247 100644 --- a/var/spack/repos/builtin/packages/py-pymorph/package.py +++ b/var/spack/repos/builtin/packages/py-pymorph/package.py @@ -11,7 +11,7 @@ class PyPymorph(PythonPackage): morphology functions. """ - homepage = "http://luispedro.org/software/pymorph/" + homepage = "https://luispedro.org/software/pymorph/" pypi = "pymorph/pymorph-0.96.tar.gz" version("0.96", sha256="5dd648e4cb4c3495ee6031bc8020ed8216f3d6cb8c0dcd0427b215b75d7d29ad") diff --git a/var/spack/repos/builtin/packages/py-pyqtgraph/package.py b/var/spack/repos/builtin/packages/py-pyqtgraph/package.py index 8b82f99a5ff50a..a457935443bfce 100644 --- a/var/spack/repos/builtin/packages/py-pyqtgraph/package.py +++ b/var/spack/repos/builtin/packages/py-pyqtgraph/package.py @@ -10,7 +10,7 @@ class PyPyqtgraph(PythonPackage): """PyQtGraph is a pure-python graphics and GUI library intended for use in mathematics, scientific, and engineering applications""" - homepage = "http://www.pyqtgraph.org/" + homepage = "https://www.pyqtgraph.org/" pypi = "pyqtgraph/pyqtgraph-0.13.3.tar.gz" license("MIT", checked_by="A-N-Other") diff --git a/var/spack/repos/builtin/packages/py-pysimdjson/package.py b/var/spack/repos/builtin/packages/py-pysimdjson/package.py index d046150ddb52bf..885b96721c929b 100644 --- a/var/spack/repos/builtin/packages/py-pysimdjson/package.py +++ b/var/spack/repos/builtin/packages/py-pysimdjson/package.py @@ -11,7 +11,7 @@ class PyPysimdjson(PythonPackage): JSON parser. If SIMD instructions are unavailable a fallback parser is used, making pysimdjson safe to use anywhere.""" - homepage = "http://github.com/TkTech/pysimdjson" + homepage = "https://github.com/TkTech/pysimdjson" pypi = "pysimdjson/pysimdjson-4.0.3.tar.gz" maintainers("haralmha") diff --git a/var/spack/repos/builtin/packages/py-python-jose/package.py b/var/spack/repos/builtin/packages/py-python-jose/package.py index f418761f49532a..5447a212f927df 100644 --- a/var/spack/repos/builtin/packages/py-python-jose/package.py +++ b/var/spack/repos/builtin/packages/py-python-jose/package.py @@ -10,7 +10,7 @@ class PyPythonJose(PythonPackage): """JOSE implementation in Python""" - homepage = "http://github.com/mpdavis/python-jose" + homepage = "https://github.com/mpdavis/python-jose" pypi = "python-jose/python-jose-3.3.0.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-python-pptx/package.py b/var/spack/repos/builtin/packages/py-python-pptx/package.py index fa83144501b468..db22fec768ec86 100644 --- a/var/spack/repos/builtin/packages/py-python-pptx/package.py +++ b/var/spack/repos/builtin/packages/py-python-pptx/package.py @@ -9,7 +9,7 @@ class PyPythonPptx(PythonPackage): """Generate and manipulate Open XML PowerPoint (.pptx) files.""" - homepage = "http://github.com/scanny/python-pptx" + homepage = "https://github.com/scanny/python-pptx" pypi = "python-pptx/python-pptx-0.6.21.tar.gz" maintainers("LydDeb") diff --git a/var/spack/repos/builtin/packages/py-requests-file/package.py b/var/spack/repos/builtin/packages/py-requests-file/package.py index 3c35eb0e0f22a8..a104a57ec19ec1 100644 --- a/var/spack/repos/builtin/packages/py-requests-file/package.py +++ b/var/spack/repos/builtin/packages/py-requests-file/package.py @@ -9,7 +9,7 @@ class PyRequestsFile(PythonPackage): """File transport adapter for Requests.""" - homepage = "http://github.com/dashea/requests-file" + homepage = "https://github.com/dashea/requests-file" pypi = "requests-file/requests-file-1.5.1.tar.gz" maintainers("LydDeb") diff --git a/var/spack/repos/builtin/packages/py-rx/package.py b/var/spack/repos/builtin/packages/py-rx/package.py index 206b2387cfd077..565f22c630ec0d 100644 --- a/var/spack/repos/builtin/packages/py-rx/package.py +++ b/var/spack/repos/builtin/packages/py-rx/package.py @@ -9,7 +9,7 @@ class PyRx(PythonPackage): """Reactive Extensions (Rx) for Python""" - homepage = "http://reactivex.io/" + homepage = "https://reactivex.io/" pypi = "Rx/Rx-3.2.0.tar.gz" maintainers("dorton21") diff --git a/var/spack/repos/builtin/packages/py-seekpath/package.py b/var/spack/repos/builtin/packages/py-seekpath/package.py index b001a1960cee97..ad772ca833dc68 100644 --- a/var/spack/repos/builtin/packages/py-seekpath/package.py +++ b/var/spack/repos/builtin/packages/py-seekpath/package.py @@ -10,7 +10,7 @@ class PySeekpath(PythonPackage): """SeeK-path is a python module to obtain band paths in the Brillouin zone of crystal structures.""" - homepage = "http://github.com/giovannipizzi/seekpath" + homepage = "https://github.com/giovannipizzi/seekpath" pypi = "seekpath/seekpath-2.0.1.tar.gz" maintainers("meyersbs") diff --git a/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py b/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py index 1666f904ebcc37..d6f4acc1222c30 100644 --- a/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py +++ b/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py @@ -10,7 +10,7 @@ class PySqlalchemyMigrate(PythonPackage): """Database schema migration for SQLAlchemy""" - homepage = "http://www.openstack.org/" + homepage = "https://www.openstack.org/" pypi = "sqlalchemy-migrate/sqlalchemy-migrate-0.13.0.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-stack-data/package.py b/var/spack/repos/builtin/packages/py-stack-data/package.py index def3f0f10dd2f0..765803aab0a338 100644 --- a/var/spack/repos/builtin/packages/py-stack-data/package.py +++ b/var/spack/repos/builtin/packages/py-stack-data/package.py @@ -10,7 +10,7 @@ class PyStackData(PythonPackage): """Extract data from python stack frames and tracebacks for informative displays.""" - homepage = "http://github.com/alexmojaki/stack_data" + homepage = "https://github.com/alexmojaki/stack_data" pypi = "stack_data/stack_data-0.2.0.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-tuspy/package.py b/var/spack/repos/builtin/packages/py-tuspy/package.py index 9b38e896687261..56424091a3dbca 100644 --- a/var/spack/repos/builtin/packages/py-tuspy/package.py +++ b/var/spack/repos/builtin/packages/py-tuspy/package.py @@ -10,7 +10,7 @@ class PyTuspy(PythonPackage): """A Python client for the tus resumable upload protocol -> http://tus.io""" - homepage = "http://github.com/tus/tus-py-client/" + homepage = "https://github.com/tus/tus-py-client/" pypi = "tuspy/tuspy-1.0.0.tar.gz" license("MIT") diff --git a/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py b/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py index fe82333f2d02f1..f2020a984b8d3e 100644 --- a/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py +++ b/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py @@ -9,7 +9,7 @@ class PyXrootdpyfs(PythonPackage): """XRootDPyFS is a PyFilesystem interface to XRootD.""" - homepage = "http://github.com/inveniosoftware/xrootdpyfs/" + homepage = "https://github.com/inveniosoftware/xrootdpyfs/" pypi = "xrootdpyfs/xrootdpyfs-0.2.2.tar.gz" version("0.2.2", sha256="43698c260f3ec52320c6bfac8dd3e7c2be7d28e9e9f58edf4f916578114e82bf") diff --git a/var/spack/repos/builtin/packages/rabbitmq/package.py b/var/spack/repos/builtin/packages/rabbitmq/package.py index 754b272f068346..9d226f01c863c5 100644 --- a/var/spack/repos/builtin/packages/rabbitmq/package.py +++ b/var/spack/repos/builtin/packages/rabbitmq/package.py @@ -15,7 +15,7 @@ class Rabbitmq(Package): """ homepage = "https://www.rabbitmq.com/" - url = "http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-generic-unix-3.6.15.tar.xz" + url = "https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-generic-unix-3.6.15.tar.xz" license("BSD-2-Clause") diff --git a/var/spack/repos/builtin/packages/repeatmasker/package.py b/var/spack/repos/builtin/packages/repeatmasker/package.py index 385a40198b79d5..b59f04b22ee128 100644 --- a/var/spack/repos/builtin/packages/repeatmasker/package.py +++ b/var/spack/repos/builtin/packages/repeatmasker/package.py @@ -37,10 +37,10 @@ class Repeatmasker(Package): def url_for_version(self, version): if version >= Version("4.1.0"): - url = "http://www.repeatmasker.org/RepeatMasker/RepeatMasker-{0}.tar.gz" + url = "https://www.repeatmasker.org/RepeatMasker/RepeatMasker-{0}.tar.gz" return url.format(version) else: - url = "http://www.repeatmasker.org/RepeatMasker/RepeatMasker-open-{0}.tar.gz" + url = "https://www.repeatmasker.org/RepeatMasker/RepeatMasker-open-{0}.tar.gz" return url.format(version.dashed) def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/rrdtool/package.py b/var/spack/repos/builtin/packages/rrdtool/package.py index a7827fa6dbfd52..559acdf9100db8 100644 --- a/var/spack/repos/builtin/packages/rrdtool/package.py +++ b/var/spack/repos/builtin/packages/rrdtool/package.py @@ -10,7 +10,7 @@ class Rrdtool(AutotoolsPackage): """RA tool for data logging and analysis.""" homepage = "https://oss.oetiker.ch/rrdtool" - url = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.7.0.tar.gz" + url = "https://oss.oetiker.ch/rrdtool/pub/rrdtool-1.7.0.tar.gz" license("GPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/survey/package.py b/var/spack/repos/builtin/packages/survey/package.py index 5ad6e6bb6c4fd1..1de6c410db8a2a 100644 --- a/var/spack/repos/builtin/packages/survey/package.py +++ b/var/spack/repos/builtin/packages/survey/package.py @@ -27,7 +27,7 @@ class Survey(CMakePackage): jeg@trenzasynergy.com """ - homepage = "http://www.trenzasynergy.com" + homepage = "https://www.trenzasynergy.com" git = "ssh://git@gitlab.com/trenza/survey.git" maintainers("jgalarowicz") diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index 93893d8ddaf6b6..8e2230f1762e04 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -19,7 +19,7 @@ class Swig(AutotoolsPackage, SourceforgePackage): features that let you tailor the wrapping process to suit your application.""" - homepage = "http://www.swig.org" + homepage = "https://www.swig.org" sourceforge_mirror_path = "swig/swig-3.0.12.tar.gz" maintainers("sethrj") diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py index 8c6f6aaeecff87..14631e80bfa387 100644 --- a/var/spack/repos/builtin/packages/thrift/package.py +++ b/var/spack/repos/builtin/packages/thrift/package.py @@ -18,8 +18,8 @@ class Thrift(Package): """ homepage = "https://thrift.apache.org" - url = "http://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz" - list_url = "http://archive.apache.org/dist/thrift/" + url = "https://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz" + list_url = "https://archive.apache.org/dist/thrift/" list_depth = 1 maintainers("thomas-bouvier") diff --git a/var/spack/repos/builtin/packages/ucx/package.py b/var/spack/repos/builtin/packages/ucx/package.py index d3c40aaa74d82a..c61e097c4eb251 100644 --- a/var/spack/repos/builtin/packages/ucx/package.py +++ b/var/spack/repos/builtin/packages/ucx/package.py @@ -11,7 +11,7 @@ class Ucx(AutotoolsPackage, CudaPackage): """a communication library implementing high-performance messaging for MPI/PGAS frameworks""" - homepage = "http://www.openucx.org" + homepage = "https://www.openucx.org" url = "https://github.com/openucx/ucx/releases/download/v1.3.1/ucx-1.3.1.tar.gz" git = "https://github.com/openucx/ucx.git" diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py index 13cded541f84d1..a972c9f02c4586 100644 --- a/var/spack/repos/builtin/packages/unixodbc/package.py +++ b/var/spack/repos/builtin/packages/unixodbc/package.py @@ -11,8 +11,8 @@ class Unixodbc(AutotoolsPackage): a predictable API with which to access Data Sources. Data Sources include SQL Servers and any Data Source with an ODBC Driver.""" - homepage = "http://www.unixodbc.org/" - url = "http://www.unixodbc.org/unixODBC-2.3.4.tar.gz" + homepage = "https://www.unixodbc.org/" + url = "https://www.unixodbc.org/unixODBC-2.3.4.tar.gz" license("LGPL-2.0-or-later") diff --git a/var/spack/repos/builtin/packages/voropp/package.py b/var/spack/repos/builtin/packages/voropp/package.py index 641e2c5ec47d9a..683cf8acaeb392 100644 --- a/var/spack/repos/builtin/packages/voropp/package.py +++ b/var/spack/repos/builtin/packages/voropp/package.py @@ -11,8 +11,8 @@ class Voropp(MakefilePackage): Voronoi diagram, a widely-used tessellation that has applications in many scientific fields.""" - homepage = "http://math.lbl.gov/voro++/about.html" - url = "http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz" + homepage = "https://math.lbl.gov/voro++/about.html" + url = "https://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz" variant("pic", default=True, description="Position independent code") diff --git a/var/spack/repos/builtin/packages/wannier90/package.py b/var/spack/repos/builtin/packages/wannier90/package.py index 0e1e71fed100d0..54f0f7f6d1261a 100644 --- a/var/spack/repos/builtin/packages/wannier90/package.py +++ b/var/spack/repos/builtin/packages/wannier90/package.py @@ -15,7 +15,7 @@ class Wannier90(MakefilePackage): Wannier90 is released under the GNU General Public License. """ - homepage = "http://wannier.org" + homepage = "https://wannier.org" url = "https://github.com/wannier-developers/wannier90/archive/v3.1.0.tar.gz" git = "https://github.com/wannier-developers/wannier90.git" @@ -54,7 +54,7 @@ def url_for_version(self, version): if version > Version("2"): url = "https://github.com/wannier-developers/wannier90/archive/v{0}.tar.gz" else: - url = "http://wannier.org/code/wannier90-{0}.tar.gz" + url = "https://wannier.org/code/wannier90-{0}.tar.gz" return url.format(version) @property diff --git a/var/spack/repos/builtin/packages/xsdk-examples/package.py b/var/spack/repos/builtin/packages/xsdk-examples/package.py index 6a08c12b04c7aa..f69c57b4464b97 100644 --- a/var/spack/repos/builtin/packages/xsdk-examples/package.py +++ b/var/spack/repos/builtin/packages/xsdk-examples/package.py @@ -10,7 +10,7 @@ class XsdkExamples(CMakePackage, CudaPackage, ROCmPackage): """xSDK Examples show usage of libraries in the xSDK package.""" - homepage = "http://xsdk.info" + homepage = "https://xsdk.info" url = "https://github.com/xsdk-project/xsdk-examples/archive/v0.1.0.tar.gz" git = "https://github.com/xsdk-project/xsdk-examples" diff --git a/var/spack/repos/builtin/packages/yambo/package.py b/var/spack/repos/builtin/packages/yambo/package.py index 8b9609b7346059..f8a24d2d125f22 100644 --- a/var/spack/repos/builtin/packages/yambo/package.py +++ b/var/spack/repos/builtin/packages/yambo/package.py @@ -17,7 +17,7 @@ class Yambo(AutotoolsPackage): to its release under the GPL license, yambo was known as SELF. """ - homepage = "http://www.yambo-code.org/index.php" + homepage = "https://www.yambo-code.org/index.php" url = "https://github.com/yambo-code/yambo/archive/4.2.2.tar.gz" license("GPL-2.0-or-later") From 34df21b62ccf023e672ca6cb9f8fcda4586df627 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 21 Aug 2024 11:31:52 +0200 Subject: [PATCH 421/435] gcc: restore old detection (#45810) --- .../builtin/packages/gcc/detection_test.yaml | 43 ++++++++-------- .../repos/builtin/packages/gcc/package.py | 49 ++++++------------- 2 files changed, 37 insertions(+), 55 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/detection_test.yaml b/var/spack/repos/builtin/packages/gcc/detection_test.yaml index 7269c0301c1740..ced4af1590f86a 100644 --- a/var/spack/repos/builtin/packages/gcc/detection_test.yaml +++ b/var/spack/repos/builtin/packages/gcc/detection_test.yaml @@ -52,27 +52,6 @@ paths: cxx: ".*/bin/g[+][+]-5$" fortran: ".*/bin/gfortran-5$" -# Multiple compilers present at the same time -- layout: - - executables: - - "bin/x86_64-linux-gnu-gcc-6" - script: 'echo 6.5.0' - - executables: - - "bin/x86_64-linux-gnu-gcc-10" - - "bin/x86_64-linux-gnu-g++-10" - script: "echo 10.1.0" - platforms: [darwin, linux] - results: - - spec: "gcc@6.5.0 languages=c" - extra_attributes: - compilers: - c: ".*/bin/x86_64-linux-gnu-gcc-6$" - - spec: "gcc@10.1.0 languages=c,c++" - extra_attributes: - compilers: - c: ".*/bin/x86_64-linux-gnu-gcc-10$" - cxx: ".*/bin/x86_64-linux-gnu-g[+][+]-10$" - # Apple clang under disguise as gcc should not be detected - layout: - executables: @@ -94,3 +73,25 @@ paths: fi platforms: ["darwin"] results: [] + +# Mingw cross compiler on linux should not be detected +- layout: + - executables: + - "bin/i686-w64-mingw32-gcc" + script: | + if [ "$1" = "-dumpversion" ] ; then + echo "9.3-win32" + elif [ "$1" = "-dumpfullversion" ] ; then + echo "9.3-win32" >&2 + exit 1 + elif [ "$1" = "--version" ] ; then + echo "i686-w64-mingw32-gcc (GCC) 9.3-win32 20200320" + echo "Copyright (C) 2019 Free Software Foundation, Inc." + echo "This is free software; see the source for copying conditions. There is NO" + echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + else + echo "mock executable got an unexpected flag: $1" + exit 1 + fi + platforms: [linux] + results: [] diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index d28209f04fbd3f..b4ca1891591efb 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -7,7 +7,7 @@ import os import sys -from archspec.cpu import UnsupportedMicroarchitecture +import archspec.cpu import llnl.util.tty as tty from llnl.util.symlink import readlink @@ -535,45 +535,26 @@ def supported_languages(self): fortran_names = ["gfortran"] d_names = ["gdc"] go_names = ["gccgo"] - compiler_prefixes = [r"\w+-\w+-\w+-"] compiler_suffixes = [r"-mp-\d+(?:\.\d+)?", r"-\d+(?:\.\d+)?", r"\d\d"] compiler_version_regex = r"(? clan[g++] - ] - if any(x in basename for x in substring_to_be_filtered): - continue - - result.append(exe) + # Apple's gcc is actually apple clang, so skip it. + if str(spack.platforms.host()) == "darwin": + not_apple_clang = [] + for exe in exes_in_prefix: + try: + output = spack.compiler.get_compiler_version_output(exe, "--version") + except Exception: + output = "" + if "Apple" in output: + continue + not_apple_clang.append(exe) + return not_apple_clang - return result + return exes_in_prefix @classmethod def determine_variants(cls, exes, version_str): @@ -702,7 +683,7 @@ def get_common_target_flags(self, spec): for uarch in microarchitectures: try: return uarch.optimization_flags("gcc", str(spec.version)) - except UnsupportedMicroarchitecture: + except archspec.cpu.UnsupportedMicroarchitecture: pass # no arch specific flags in common, unlikely to happen. return "" From d3cdb2a3447d148066355535fef4e81f6e8450db Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:41:18 +0200 Subject: [PATCH 422/435] sherpa: add v3.0.0, remove deprecated @:2.2.10 (#45101) * Remove deprecated versions * Add sherpa 3.0.0 and CMake builds * Address comments in #45101 * Add builder classes for cmake and autotools --------- Co-authored-by: jmcarcell --- .../repos/builtin/packages/sherpa/package.py | 183 ++++++------------ 1 file changed, 58 insertions(+), 125 deletions(-) diff --git a/var/spack/repos/builtin/packages/sherpa/package.py b/var/spack/repos/builtin/packages/sherpa/package.py index f132fb06788778..f8d0ffa7933196 100644 --- a/var/spack/repos/builtin/packages/sherpa/package.py +++ b/var/spack/repos/builtin/packages/sherpa/package.py @@ -6,7 +6,7 @@ from spack.package import * -class Sherpa(AutotoolsPackage): +class Sherpa(CMakePackage, AutotoolsPackage): """Sherpa is a Monte Carlo event generator for the Simulation of High-Energy Reactions of PArticles in lepton-lepton, lepton-photon, photon-photon, lepton-hadron and hadron-hadron collisions.""" @@ -22,100 +22,15 @@ class Sherpa(AutotoolsPackage): license("GPL-3.0-only") + version("3.0.0", sha256="e460d8798b323c4ef663293a2c918b1463e9641b35703a54d70d25c852c67d36") version("2.2.15", sha256="0300fd719bf6a089b7dc5441f720e669ac1cb030045d87034a4733bee98e7bbc") version("2.2.14", sha256="f17d88d7f3bc4234a9db3872e8a3c1f3ef99e1e2dc881ada5ddf848715dc82da") version("2.2.13", sha256="ed1fd1372923c191ca44897802d950702b810382260e7464d36ac3234c5c8a64") version("2.2.12", sha256="4ba78098e45aaac0bc303d1b5abdc15809f30b407abf9457d99b55e63384c83d") version("2.2.11", sha256="5e12761988b41429f1d104f84fdf352775d233cde7a165eb64e14dcc20c3e1bd") - version( - "2.2.10", - sha256="ae23bc8fdcc9f8c26becc41692822233b62203cd72a7e0dab2ca19316aa0aad7", - deprecated=True, - ) - version( - "2.2.9", - sha256="ebc836d42269a0c4049d3fc439a983d19d12595d9a06db2d18765bd1e301923e", - deprecated=True, - ) - version( - "2.2.8", - sha256="ff198cbae5de445e6fe383151021ef24b1628dffc0da6bf3737753f6672a0091", - deprecated=True, - ) - version( - "2.0.0", - sha256="0e873b27bb1be46ca5ed451d1b8514ca84c10221057b11be5952180076e6f848", - deprecated=True, - ) - version( - "1.3.1", - sha256="31881207838d341358db64e3fdadfeee1ea2f6d1cb42f370014f622f579159ae", - deprecated=True, - ) - version( - "1.3.0", - sha256="08b13c65b66f2edde6996d2a06762a12a0682ffb64bca43654df47321e5039a0", - deprecated=True, - ) - version( - "1.2.3", - sha256="029727337a430d6675a1a12dce3ced0411041e79ddaf4ce3b9466035cf6c8804", - deprecated=True, - ) - version( - "1.2.2", - sha256="6e7b5ea80b99f1378519009e494030d6cf4c4491f91218d749eabb8ffaad9ac1", - deprecated=True, - ) - version( - "1.2.1", - sha256="838462f4a1e8768135363aa6b8532fd8f5e5789a269b858f8e3728ab37f6a1d1", - deprecated=True, - ) - version( - "1.2.0", - sha256="509508fd0ad72aaf55ab484da8b6bc0b31688c955adcda62a3e8f94689cebf99", - deprecated=True, - ) - version( - "1.1.3", - sha256="6335e5eb1fc304e9618496d3ddb198b3591e57b27db6e876af8fd649a8b98c93", - deprecated=True, - ) - version( - "1.1.2", - sha256="e1689cad6700dc013af0afb0d33729ac2b5e9841d2f325c85b10d773e7f8a80e", - deprecated=True, - ) - version( - "1.1.1", - sha256="b80e1d75934be79b73400d2c95d96e88651626ea29ddcb9d8fde9c1812039e29", - deprecated=True, - ) - version( - "1.1.0", - sha256="8052d137d668353dc710f8691b921e772820d39e20361f0d616ee2da1ac798f2", - deprecated=True, - ) - version( - "1.0.9", - sha256="fe28db91ea8264364395c7e5efeeae3e5c01ea1343e0db7fe13924c6f17fb963", - deprecated=True, - ) - version( - "1.0.8", - sha256="6e346bafd13b5b05ad566a73759da6d5e64d65c5036780cc4911d93277e891fa", - deprecated=True, - ) - version( - "1.0.7", - sha256="d1eeefd96c6822ea8eb926447ca91ec4a1c714e4746323e92b1e17764e51ff0b", - deprecated=True, - ) - version( - "1.0.6", - sha256="358d417ec3afde24618c222bc9b742bc5102d435622b3cd6f2e3f72d03656255", - deprecated=True, + + build_system( + conditional("cmake", when="@3:"), conditional("autotools", when="@:2"), default="cmake" ) depends_on("c", type="build") # generated @@ -134,11 +49,11 @@ class Sherpa(AutotoolsPackage): variant("analysis", default=True, description="Enable analysis components") variant("mpi", default=False, description="Enable MPI") variant("python", default=False, description="Enable Python API") - variant("hepmc2", default=True, description="Enable HepMC (version 2.x) support") + variant("hepmc2", default=True, when="@:2", description="Enable HepMC (version 2.x) support") variant("hepmc3", default=True, description="Enable HepMC (version 3.x) support") variant("hepmc3root", default=False, description="Enable HepMC (version 3.1+) ROOT support") variant("rivet", default=False, description="Enable Rivet support") - variant("fastjet", default=True, description="Enable FASTJET") + variant("fastjet", default=True, when="@:2", description="Enable FASTJET") variant("openloops", default=False, description="Enable OpenLoops") variant("recola", default=False, description="Enable Recola") variant("lhole", default=False, description="Enable Les Houches One-Loop Generator interface") @@ -148,7 +63,7 @@ class Sherpa(AutotoolsPackage): variant("pythia", default=True, description="Enable fragmentation/decay interface to Pythia") variant("blackhat", default=False, description="Enable BLACKHAT support") variant("ufo", default=False, description="Enable UFO support") - variant("hztool", default=False, description="Enable HZTOOL support") + variant("hztool", default=False, when="@:2", description="Enable HZTOOL support") variant( "libs", default="shared,static", @@ -164,11 +79,10 @@ class Sherpa(AutotoolsPackage): # Note that the delphes integration seems utterly broken: https://sherpa.hepforge.org/trac/ticket/305 # autotools dependencies are needed at runtime to compile processes - # at least as long as sherpa is an autotools package - depends_on("autoconf") - depends_on("automake") - depends_on("libtool") - depends_on("m4") + depends_on("autoconf", when="@:2") + depends_on("automake", when="@:2") + depends_on("libtool", when="@:2") + depends_on("m4", when="@:2") depends_on("texinfo", type="build") depends_on("sqlite") @@ -188,10 +102,12 @@ class Sherpa(AutotoolsPackage): depends_on("root", when="+root") depends_on("lhapdf", when="+lhapdf") depends_on("gzip", when="+gzip") - depends_on("pythia6", when="+pythia") + depends_on("pythia6", when="+pythia @:2") + depends_on("pythia8", when="+pythia @3:") depends_on("blackhat", when="+blackhat") depends_on("hztool", when="+hztool") # depends_on('cernlib', when='+cernlib') + depends_on("libzip", when="@3:") filter_compiler_wrappers("share/SHERPA-MC/makelibs") @@ -213,6 +129,42 @@ def patch(self): string=True, ) + def flag_handler(self, name, flags): + flags = list(flags) + if name == "cxxflags": + flags.append("-std=c++" + self.spec.variants["cxxstd"].value) + + if "+cms" in self.spec: + flags.extend(["-fuse-cxa-atexit", "-O2"]) + if self.spec.target.family == "x86_64": + flags.append("-m64") + + return (None, None, flags) + + +class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): + def cmake_args(self): + args = [ + self.define_from_variant("SHERPA_ENABLE_ANALYSIS", "analysis"), + self.define_from_variant("SHERPA_ENABLE_BLACKHAT", "blackhat"), + self.define_from_variant("SHERPA_ENABLE_GZIP", "gzip"), + self.define_from_variant("SHERPA_ENABLE_HEPMC3", "hepmc3"), + self.define_from_variant("SHERPA_ENABLE_HEPMC3_ROOT", "hepmc3root"), + self.define_from_variant("SHERPA_ENABLE_LHAPDF", "lhapdf"), + self.define_from_variant("SHERPA_ENABLE_LHOLE", "lhole"), + self.define_from_variant("SHERPA_ENABLE_MPI", "mpi"), + self.define_from_variant("SHERPA_ENABLE_OPENLOOPS", "openloops"), + self.define_from_variant("SHERPA_ENABLE_PYTHIA8", "pythia"), + self.define_from_variant("SHERPA_ENABLE_PYTHON", "python"), + self.define_from_variant("SHERPA_ENABLE_RECOLA", "recola"), + self.define_from_variant("SHERPA_ENABLE_RIVET", "rivet"), + self.define_from_variant("SHERPA_ENABLE_ROOT", "root"), + self.define_from_variant("SHERPA_ENABLE_UFO", "ufo"), + ] + return args + + +class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): def configure_args(self): args = [] args.append("--enable-binreloc") @@ -227,18 +179,13 @@ def configure_args(self): args.extend(self.enable_or_disable("pythia")) hepmc_root = lambda x: self.spec["hepmc"].prefix args.extend(self.enable_or_disable("hepmc2", activation_value=hepmc_root)) - if self.spec.satisfies("@3:"): - args.extend(self.enable_or_disable("hepmc3", activation_value="prefix")) - args.extend(self.enable_or_disable("rivet", activation_value="prefix")) - args.extend(self.enable_or_disable("lhapdf", activation_value="prefix")) - else: - # See https://gitlab.com/sherpa-team/sherpa/-/issues/348 - if self.spec.satisfies("+hepmc3"): - args.append("--enable-hepmc3=" + self.spec["hepmc3"].prefix) - if self.spec.satisfies("+rivet"): - args.append("--enable-rivet=" + self.spec["rivet"].prefix) - if self.spec.satisfies("+lhapdf"): - args.append("--enable-lhapdf=" + self.spec["lhapdf"].prefix) + # See https://gitlab.com/sherpa-team/sherpa/-/issues/348 + if self.spec.satisfies("+hepmc3"): + args.append("--enable-hepmc3=" + self.spec["hepmc3"].prefix) + if self.spec.satisfies("+rivet"): + args.append("--enable-rivet=" + self.spec["rivet"].prefix) + if self.spec.satisfies("+lhapdf"): + args.append("--enable-lhapdf=" + self.spec["lhapdf"].prefix) args.extend(self.enable_or_disable("fastjet", activation_value="prefix")) args.extend(self.enable_or_disable("openloops", activation_value="prefix")) @@ -258,20 +205,6 @@ def configure_args(self): return args - def flag_handler(self, name, flags): - flags = list(flags) - if name == "cxxflags": - flags.append("-std=c++" + self.spec.variants["cxxstd"].value) - - if "+cms" in self.spec: - flags.extend(["-fuse-cxa-atexit", "-O2"]) - if self.spec.target.family == "x86_64": - flags.append("-m64") - - return (None, None, flags) - - # This may not be needed when this package is changed to be a CMake package - # since it's specific to makelibs def install(self, spec, prefix): # Make sure the path to the provided libtool is used instead of the system one filter_file( From 33464a70383556663e42e9a036c7da06bf517490 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 21 Aug 2024 16:36:07 +0200 Subject: [PATCH 423/435] gcc: simplify version_regex, change string to filter out Apple clang (#45852) --- .../builtin/packages/gcc/detection_test.yaml | 28 +++++++++++++++++-- .../repos/builtin/packages/gcc/package.py | 4 +-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/detection_test.yaml b/var/spack/repos/builtin/packages/gcc/detection_test.yaml index ced4af1590f86a..c0195bb8ca1b7b 100644 --- a/var/spack/repos/builtin/packages/gcc/detection_test.yaml +++ b/var/spack/repos/builtin/packages/gcc/detection_test.yaml @@ -82,8 +82,7 @@ paths: if [ "$1" = "-dumpversion" ] ; then echo "9.3-win32" elif [ "$1" = "-dumpfullversion" ] ; then - echo "9.3-win32" >&2 - exit 1 + echo "9.3-win32" elif [ "$1" = "--version" ] ; then echo "i686-w64-mingw32-gcc (GCC) 9.3-win32 20200320" echo "Copyright (C) 2019 Free Software Foundation, Inc." @@ -95,3 +94,28 @@ paths: fi platforms: [linux] results: [] + +# Homebrew GCC should be detected +- layout: + - executables: + - "bin/gcc-14" + script: | + if [ "$1" = "-dumpversion" ] ; then + echo "14" + elif [ "$1" = "-dumpfullversion" ] ; then + echo "14.1.0" + elif [ "$1" = "--version" ] ; then + echo "gcc-14 (Homebrew GCC 14.1.0_2) 14.1.0" + echo "Copyright (C) 2024 Free Software Foundation, Inc." + echo "This is free software; see the source for copying conditions. There is NO" + echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + else + echo "mock executable got an unexpected flag: $1" + exit 1 + fi + platforms: [darwin] + results: + - spec: "gcc@14.1.0 languages=c" + extra_attributes: + compilers: + c: ".*/bin/gcc-14$" diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index b4ca1891591efb..ba0379bf37e3f9 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -536,7 +536,7 @@ def supported_languages(self): d_names = ["gdc"] go_names = ["gccgo"] compiler_suffixes = [r"-mp-\d+(?:\.\d+)?", r"-\d+(?:\.\d+)?", r"\d\d"] - compiler_version_regex = r"(? Date: Wed, 21 Aug 2024 10:01:54 -0600 Subject: [PATCH 424/435] Added latest version of eckit (#45834) --- var/spack/repos/builtin/packages/eckit/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/eckit/package.py b/var/spack/repos/builtin/packages/eckit/package.py index 5b24350f4ac3ae..25789ba3f0368b 100644 --- a/var/spack/repos/builtin/packages/eckit/package.py +++ b/var/spack/repos/builtin/packages/eckit/package.py @@ -20,6 +20,7 @@ class Eckit(CMakePackage): license("Apache-2.0") + version("1.27.0", sha256="499f3f8c9aec8d3f42369e3ceedc98b2b09ac04993cfd38dfdf7d38931703fe7") version("1.25.2", sha256="a611d26d50a9f2133b75100567a890eb0e0a48a96669b8c8475baf9d6f359397") version("1.24.5", sha256="2fd74e04c20a59f9e13635828d9da880e18f8a2cb7fd3bfd0201e07071d6ec41") version("1.24.4", sha256="b6129eb4f7b8532aa6905033e4cf7d09aadc8547c225780fea3db196e34e4671") From 7d5ad1857350343851d8d7cee08837cfac46dc61 Mon Sep 17 00:00:00 2001 From: Alex Seaton <1802137+agseaton@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:30:01 -0600 Subject: [PATCH 425/435] heyoka: add v5.1.0 (#45841) --- var/spack/repos/builtin/packages/heyoka/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/heyoka/package.py b/var/spack/repos/builtin/packages/heyoka/package.py index 9472f184f63b53..ee4ef5be62dbc4 100644 --- a/var/spack/repos/builtin/packages/heyoka/package.py +++ b/var/spack/repos/builtin/packages/heyoka/package.py @@ -18,6 +18,7 @@ class Heyoka(CMakePackage): # SPDX identifier of the project's license. license("MPL-2.0") + version("5.1.0", sha256="dd405328ace718865ae2690384fbf5f7ee4d03ab6821b908e7d0ca0a02c35e14") version("5.0.0", sha256="e9a4b5683a08706addc1b448e232f1e269d78586859fe3f4d93d4c5eee3bc8ae") version("4.0.3", sha256="47608e785607782d896ae2347a29a143cdb7e5c602f48f5ea795cf682051dbee") version("4.0.2", sha256="8eba8fe0626c3d48affad3055e490e5d21430a420af867d7d52c18ed6b602ae0") From c7b693a0dff27c47d44cafca1ff242008633c141 Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Wed, 21 Aug 2024 18:41:36 +0200 Subject: [PATCH 426/435] geomodel: add versions 5.1.0-6.4.0 (#45858) * geomodel: add versions 5.1.0-6.4.0 This PR adds new versions 5.1.0 through 6.4.0 of the geomodel package. It also updates the CMake configuration to use the `define_from_variant` mechanism and it adds me as a maintainer. * Undo cmake change --- var/spack/repos/builtin/packages/geomodel/package.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/geomodel/package.py b/var/spack/repos/builtin/packages/geomodel/package.py index 80027510041f17..2fc531fbf870ed 100644 --- a/var/spack/repos/builtin/packages/geomodel/package.py +++ b/var/spack/repos/builtin/packages/geomodel/package.py @@ -14,10 +14,19 @@ class Geomodel(CMakePackage): url = "https://gitlab.cern.ch/GeoModelDev/GeoModel/-/archive/4.6.0/GeoModel-4.6.0.tar.bz2" git = "https://gitlab.cern.ch/GeoModelDev/GeoModel" - maintainers("wdconinc") + maintainers("wdconinc", "stephenswat") license("Apache-2.0", checked_by="wdconinc") + version("6.4.0", sha256="369f91f021be83d294ba6a9bdbe00077625e9fe798a396aceece8970e7dd5838") + version("6.3.0", sha256="d2b101e06d20a8a3b638e6021f517a939f49ea6d8347ce40c927c27efe66b28c") + version("6.2.0", sha256="99bb3908bf710ce5ba0bcdd192942705a183a9f2886079df091dc69423b7bdf1") + version("6.1.0", sha256="2974f0e35e07cd44170d29ef106ec1ee50cb3fa3ba88382bea7394eb341dcd32") + version("6.0.0", sha256="7263d44ae2b99da9bc45cf0bbda64b2d8bdce1b350328fe41fce001d5266c3a1") + version("5.6.0", sha256="51e6570e119c2d3037b594779bb78d78b524c41132fac38d83ae162b5b6ffe54") + version("5.4.0", sha256="82cd08bea5791d862244211f8367cd6f5698b311e4862b2eb5584f835d551821") + version("5.3.0", sha256="d30c31f387716415542f3424a7f64ab62ef640a4e6f832243944918f7daca080") + version("5.1.0", sha256="bbe7d6ea46fe750d9421fb741b2340d16afcddbf5d6aeafab09d60577d55f93d") version("4.6.0", sha256="d827dc79a5555fd7b09d1b670fc6f01f91476d0edf98ccd644c624f18fb729ca") depends_on("cxx", type="build") # generated From 84f680239e55a068e8c8dfe6d42784f73efc1975 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 21 Aug 2024 11:42:54 -0500 Subject: [PATCH 427/435] geoip: deprecate due to duplication (#45840) * geoip: deprecate due to duplication * geoip-api-c: fixed hashes; checked license; verified c code --------- Co-authored-by: wdconinc --- .../builtin/packages/geoip-api-c/package.py | 8 ++++---- .../repos/builtin/packages/geoip/package.py | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/geoip-api-c/package.py b/var/spack/repos/builtin/packages/geoip-api-c/package.py index b971d4be00b98e..ee49ea2f5d36b2 100644 --- a/var/spack/repos/builtin/packages/geoip-api-c/package.py +++ b/var/spack/repos/builtin/packages/geoip-api-c/package.py @@ -13,13 +13,13 @@ class GeoipApiC(AutotoolsPackage): homepage = "https://github.com/maxmind/geoip-api-c" url = "https://github.com/maxmind/geoip-api-c/archive/v1.6.12.tar.gz" - license("LGPL-2.1-or-later") + license("LGPL-2.1-or-later", checked_by="wdconinc") version("1.6.12", sha256="99b119f8e21e94f1dfd6d49fbeed29a70df1544896e76cd456f25e397b07d476") - version("1.6.11", sha256="b0e5a92200b5ab540d118983f7b7191caf4faf1ae879c44afa3ff2a2abcdb0f5") - version("1.6.10", sha256="cb44e0d0dbc45efe2e399e695864e58237ce00026fba8a74b31d85888c89c67a") + version("1.6.11", sha256="8859cb7c9cb63e77f4aedb40a4622024359b956b251aba46b255acbe190c34e0") + version("1.6.10", sha256="de0d6d037d5e0ad9f7110e7f3b82eb20a24616712d29be0019e28ba7364cdc3e") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("autoconf", type="build") depends_on("automake", type="build") diff --git a/var/spack/repos/builtin/packages/geoip/package.py b/var/spack/repos/builtin/packages/geoip/package.py index 262a64f8cca9ba..9a34a6953e8837 100644 --- a/var/spack/repos/builtin/packages/geoip/package.py +++ b/var/spack/repos/builtin/packages/geoip/package.py @@ -8,15 +8,23 @@ class Geoip(AutotoolsPackage): """Library for country/city/organization to IP address - or hostname mapping.""" + or hostname mapping. This package has been deprecated. Use geoip-api-c instead.""" homepage = "https://www.maxmind.com/app/c" url = "https://github.com/maxmind/geoip-api-c/releases/download/v1.6.12/GeoIP-1.6.12.tar.gz" license("LGPL-2.1-or-later") - version("1.6.12", sha256="1dfb748003c5e4b7fd56ba8c4cd786633d5d6f409547584f6910398389636f80") - version("1.6.11", sha256="b0e5a92200b5ab540d118983f7b7191caf4faf1ae879c44afa3ff2a2abcdb0f5") - version("1.6.10", sha256="cb44e0d0dbc45efe2e399e695864e58237ce00026fba8a74b31d85888c89c67a") + with default_args(deprecated=True): + # Note: use geoip-api-c instead + version( + "1.6.12", sha256="1dfb748003c5e4b7fd56ba8c4cd786633d5d6f409547584f6910398389636f80" + ) + version( + "1.6.11", sha256="b0e5a92200b5ab540d118983f7b7191caf4faf1ae879c44afa3ff2a2abcdb0f5" + ) + version( + "1.6.10", sha256="cb44e0d0dbc45efe2e399e695864e58237ce00026fba8a74b31d85888c89c67a" + ) depends_on("c", type="build") # generated From eb5a1d3b4ca399a13ef998cd4b2ed61ac4074474 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 21 Aug 2024 10:44:40 -0600 Subject: [PATCH 428/435] Add fms@2024.02 (#45838) --- var/spack/repos/builtin/packages/fms/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/fms/package.py b/var/spack/repos/builtin/packages/fms/package.py index f1004c375a56b5..c546c315e3a737 100644 --- a/var/spack/repos/builtin/packages/fms/package.py +++ b/var/spack/repos/builtin/packages/fms/package.py @@ -19,6 +19,7 @@ class Fms(CMakePackage): license("LGPL-3.0-or-later") maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett", "rem1776", "climbfuji") + version("2024.02", sha256="47e5740bb066f5eb032e1de163eb762c7258880a2932f4cc4e34e769e0cc2b0e") version( "2024.01.01", sha256="41c8686bad2b1aed76275e35cbe1af855f7dfce9b6d8907744ea2e8174758f6a" ) From aa5b17ceb5bdbe4a41d6c0b5d5a8c96192c2dc16 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 21 Aug 2024 18:47:24 +0200 Subject: [PATCH 429/435] py-shapely: add v2.0.6 (#45833) --- .../builtin/packages/py-shapely/package.py | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-shapely/package.py b/var/spack/repos/builtin/packages/py-shapely/package.py index f00f24170e1d0f..56b8ad26c407ef 100644 --- a/var/spack/repos/builtin/packages/py-shapely/package.py +++ b/var/spack/repos/builtin/packages/py-shapely/package.py @@ -21,6 +21,7 @@ class PyShapely(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + version("2.0.6", sha256="997f6159b1484059ec239cacaa53467fd8b5564dabe186cd84ac2944663b0bf6") version("2.0.5", sha256="bff2366bc786bfa6cb353d6b47d0443c570c32776612e527ee47b6df63fcfe32") version("2.0.4", sha256="5dc736127fac70009b8d309a0eeb74f3e08979e530cf7017f2f507ef62e6cfb8") version("2.0.3", sha256="4d65d0aa7910af71efa72fd6447e02a8e5dd44da81a983de9d736d6e6ccbe674") @@ -35,22 +36,29 @@ class PyShapely(PythonPackage): version("1.8.0", sha256="f5307ee14ba4199f8bbcf6532ca33064661c1433960c432c84f0daa73b47ef9c") version("1.7.1", sha256="1641724c1055459a7e2b8bbe47ba25bdc89554582e62aec23cb3f3ca25f9b129") version("1.7.0", sha256="e21a9fe1a416463ff11ae037766fe410526c95700b9e545372475d2361cc951e") - version("1.6.4", sha256="b10bc4199cfefcf1c0e5d932eac89369550320ca4bdf40559328d85f1ca4f655") + version( + "1.6.4", + sha256="b10bc4199cfefcf1c0e5d932eac89369550320ca4bdf40559328d85f1ca4f655", + deprecated=True, + ) - depends_on("c", type="build") # generated + depends_on("c", type="build") # pyproject.toml - depends_on("py-cython", when="@2.0.2:", type="build") - depends_on("py-cython@0.29:0", when="@2.0.0:2.0.1", type="build") - depends_on("py-cython@0.29.24:2", when="@:1", type="build") - depends_on("py-setuptools@61:", when="@2:", type="build") - depends_on("py-setuptools@:63", when="@:1", type="build") - depends_on("py-numpy@1.14:2", when="@2.0.4:", type=("build", "link", "run")) - # https://github.com/shapely/shapely/issues/1972 - depends_on("py-numpy@1.14:1", when="@2.0.0:2.0.3", type=("build", "link", "run")) - depends_on("py-numpy@:1", when="@1", type=("build", "link", "run")) - depends_on("py-pytest", type="test") - depends_on("py-pytest-cov", type="test") + with default_args(type="build"): + depends_on("py-cython", when="@2.0.2:") + depends_on("py-cython@0.29:0", when="@2.0.0:2.0.1") + depends_on("py-cython@0.29.24:2", when="@:1") + depends_on("py-setuptools@61:", when="@2:") + depends_on("py-setuptools@:63", when="@:1") + + with default_args(type=("build", "link", "run")): + depends_on("py-numpy@1.14:2", when="@2.0.6:") + # https://github.com/shapely/shapely/issues/2098 + depends_on("py-numpy@1.14:2.0", when="@2.0.4:2.0.5") + # https://github.com/shapely/shapely/issues/1972 + depends_on("py-numpy@1.14:1", when="@2.0.0:2.0.3") + depends_on("py-numpy@:1", when="@1") # setup.py depends_on("geos@3.5:", when="@2:") @@ -71,7 +79,7 @@ def url_for_version(self, version): letter = "S" return url.format(letter, version) - @when("^python@3.7:") + @when("@:1.8.1") def patch(self): # Python 3.7 changed the thread storage API, precompiled *.c files # need to be re-cythonized @@ -97,14 +105,3 @@ def setup_run_environment(self, env): def setup_dependent_build_environment(self, env, dependent_spec): self.setup_build_environment(env) - - @run_after("install") - @on_package_attributes(run_tests=True) - def test_install(self): - """Run pytest tests""" - # https://shapely.readthedocs.io/en/latest/installation.html#testing-shapely - if self.version >= Version("2"): - with working_dir("spack-test", create=True): - python("-m", "pytest", "--pyargs", "shapely.tests") - else: - python("-m", "pytest") From f93595ba2f7f20d1f581f58bbfd7e3094223df82 Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Wed, 21 Aug 2024 19:27:54 +0200 Subject: [PATCH 430/435] acts: add GeoModel dependency (#45859) This commit adds a dependency on GeoModel 4.6.0 when the GeoModel plugin is enabled. Note that the dependency is upgraded to 6.3.0 in Acts 36.1.0, but that will need to be covered in #45851. --- var/spack/repos/builtin/packages/acts/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index fcd2c9e57696eb..bcb4465c0a3d66 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -343,6 +343,7 @@ class Acts(CMakePackage, CudaPackage): depends_on("eigen @3.3.7:3.3.99", when="@:15.0") depends_on("geant4", when="+fatras_geant4") depends_on("geant4", when="+geant4") + depends_on("geomodel @4.6.0:", when="+geomodel") depends_on("git-lfs", when="@12.0.0:") depends_on("gperftools", when="+profilecpu") depends_on("gperftools", when="+profilemem") From 182bc87fe10e24dcd3560f4231b51cacfb869c1c Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Wed, 21 Aug 2024 18:08:57 -0400 Subject: [PATCH 431/435] Windows: Port icu4c; define cxx std flags for MSVC (#45547) * Adds an MSBuild system + Builder to the icu4c package * Adds custom install method as MSBuild system does not vendor an install target * The cxxstd variant is not supported on Windows (there are no config options you use to tell the build system what cxx standard to build against), so the variant definition was updated to occur everywhere except Windows Also, this commit defines the c/cxx..._flag properties of the MSVC compiler (although they are not used by `icu4c` and not strictly necessary to bundle with this PR). --- lib/spack/spack/compilers/msvc.py | 24 +++++++ .../repos/builtin/packages/icu4c/package.py | 64 ++++++++++++++++--- 2 files changed, 78 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/compilers/msvc.py b/lib/spack/spack/compilers/msvc.py index f6e86f831a875c..e74bb4e307afaf 100644 --- a/lib/spack/spack/compilers/msvc.py +++ b/lib/spack/spack/compilers/msvc.py @@ -223,6 +223,30 @@ def get_oneapi_root(pth: str): ) self.msvc_compiler_environment = CmdCall(*env_cmds) + @property + def cxx11_flag(self): + return "/std:c++11" + + @property + def cxx14_flag(self): + return "/std:c++14" + + @property + def cxx17_flag(self): + return "/std:c++17" + + @property + def cxx20_flag(self): + return "/std:c++20" + + @property + def c11_flag(self): + return "/std:c11" + + @property + def c17_flag(self): + return "/std:c17" + @property def msvc_version(self): """This is the VCToolset version *NOT* the actual version of the cl compiler diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py index 3dddb270105619..3cb4eb1d98ba77 100644 --- a/var/spack/repos/builtin/packages/icu4c/package.py +++ b/var/spack/repos/builtin/packages/icu4c/package.py @@ -3,10 +3,12 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import pathlib + from spack.package import * -class Icu4c(AutotoolsPackage): +class Icu4c(AutotoolsPackage, MSBuildPackage): """ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU4C is the C/C++ interface.""" @@ -31,15 +33,22 @@ class Icu4c(AutotoolsPackage): depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated - variant( - "cxxstd", - default="11", - values=("11", "14", "17"), - multi=False, - description="Use the specified C++ standard when building", - ) + build_system("autotools", "msbuild", default="autotools") + for plat in ["linux", "darwin", "freebsd"]: + with when(f"platform={plat}"): + variant( + "cxxstd", + default="11", + values=("11", "14", "17"), + multi=False, + description="Use the specified C++ standard when building", + ) depends_on("python", type="build", when="@64.1:") + with when("build_system=autotools"): + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") conflicts( "%intel@:16", @@ -55,8 +64,6 @@ class Icu4c(AutotoolsPackage): when="@58.0:59", ) - configure_directory = "source" - def url_for_version(self, version): url = "https://github.com/unicode-org/icu/releases/download/release-{0}/icu4c-{1}-src.tgz" return url.format(version.dashed, version.underscored) @@ -68,12 +75,19 @@ def flag_handler(self, name, flags): flags.append(getattr(self.compiler, f"cxx{self.spec.variants['cxxstd'].value}_flag")) return (None, flags, None) + +class BuildEnvironment: # Need to make sure that locale is UTF-8 in order to process source # files in UTF-8. @when("@59:") def setup_build_environment(self, env): env.set("LC_ALL", "en_US.UTF-8") + +class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder, BuildEnvironment): + + configure_directory = "source" + def configure_args(self): args = [] @@ -88,3 +102,33 @@ def configure_args(self): args.append("--enable-rpath") return args + + +class MSBuildBuilder(spack.build_systems.msbuild.MSBuildBuilder, BuildEnvironment): + def msbuild_args(self): + return [ + "allinone.sln", + self.define("OutputPath", self.spec.prefix), + self.define("Configuration", "Release"), + self.define("SkipUWP", "true"), + ] + + @property + def build_directory(self): + solution_path = pathlib.Path(self.pkg.stage.source_path) + if self.spec.satsifies("@:67"): + solution_path = solution_path / "icu" + solution_path = solution_path / "source" / "allinone" + return str(solution_path) + + def install(self, pkg, spec, prefix): + mkdirp(prefix.lib) + mkdirp(prefix.bin) + mkdirp(prefix.include) + with working_dir(self.pkg.stage.source_path): + # install bin + install_tree("bin64", prefix.bin) + # install lib + install_tree("lib64", prefix.lib) + # intstall headers + install_tree("include", prefix.include) From b623f58782c53bc465d14b84b44e91ffc2b872cd Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Thu, 22 Aug 2024 01:43:48 +0200 Subject: [PATCH 432/435] root: add version 6.32.04 (#45850) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/root/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index bf037c87004c95..aec5af27372aef 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -34,6 +34,7 @@ class Root(CMakePackage): version("develop", branch="master") # Production version + version("6.32.04", sha256="132f126aae7d30efbccd7dcd991b7ada1890ae57980ef300c16421f9d4d07ea8") version("6.32.02", sha256="3d0f76bf05857e1807ccfb2c9e014f525bcb625f94a2370b455f4b164961602d") version("6.32.00", sha256="12f203681a59041c474ce9523761e6f0e8861b3bee78df5f799a8db55189e5d2") version("6.30.08", sha256="8bb8594867b9ded20a65e59f2cb6da965aa30851b8960f8cbf76293aec046b69") From 836be2364ca62e01e89ac07c8e18b19949fc43b4 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 22 Aug 2024 12:13:08 +0200 Subject: [PATCH 433/435] Make spack compiler find use external find (#45784) so that there is no duplicate detection logic for compilers --- lib/spack/llnl/util/tty/log.py | 1 + lib/spack/spack/bootstrap/config.py | 6 +- lib/spack/spack/cmd/compiler.py | 23 +- lib/spack/spack/compilers/__init__.py | 642 +++++++----------- lib/spack/spack/detection/common.py | 2 +- lib/spack/spack/detection/path.py | 4 +- lib/spack/spack/environment/environment.py | 2 +- lib/spack/spack/installer.py | 4 +- lib/spack/spack/solver/asp.py | 14 +- lib/spack/spack/spec.py | 4 +- lib/spack/spack/test/bindist.py | 114 ++-- lib/spack/spack/test/cmd/compiler.py | 39 +- lib/spack/spack/test/compilers/basics.py | 89 +-- lib/spack/spack/test/compilers/detection.py | 471 ------------- lib/spack/spack/test/cray_manifest.py | 1 + lib/spack/spack/test/installer.py | 27 +- share/spack/spack-completion.bash | 4 +- share/spack/spack-completion.fish | 8 +- .../builtin.mock/packages/gcc/package.py | 12 + .../intel-oneapi-compilers/package.py | 9 +- 20 files changed, 363 insertions(+), 1113 deletions(-) delete mode 100644 lib/spack/spack/test/compilers/detection.py diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index aeb1114c5af634..56139843407977 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -10,6 +10,7 @@ import errno import io import multiprocessing +import multiprocessing.connection import os import re import select diff --git a/lib/spack/spack/bootstrap/config.py b/lib/spack/spack/bootstrap/config.py index 067e884b503cd6..3feaef1d374888 100644 --- a/lib/spack/spack/bootstrap/config.py +++ b/lib/spack/spack/bootstrap/config.py @@ -143,11 +143,7 @@ def _bootstrap_config_scopes() -> Sequence["spack.config.ConfigScope"]: def _add_compilers_if_missing() -> None: arch = spack.spec.ArchSpec.frontend_arch() if not spack.compilers.compilers_for_arch(arch): - new_compilers = spack.compilers.find_new_compilers( - mixed_toolchain=sys.platform == "darwin" - ) - if new_compilers: - spack.compilers.add_compilers_to_config(new_compilers) + spack.compilers.find_compilers() @contextlib.contextmanager diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 860f0a9ee0b91c..2eb23bf7143760 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -50,6 +50,7 @@ def setup_parser(subparser): default=lambda: spack.config.default_modify_scope("compilers"), help="configuration scope to modify", ) + arguments.add_common_arguments(find_parser, ["jobs"]) # Remove remove_parser = sp.add_parser("remove", aliases=["rm"], help="remove compiler by spec") @@ -78,25 +79,21 @@ def setup_parser(subparser): def compiler_find(args): """Search either $PATH or a list of paths OR MODULES for compilers and add them to Spack's configuration. - """ - # None signals spack.compiler.find_compilers to use its default logic paths = args.add_paths or None - - # Below scope=None because we want new compilers that don't appear - # in any other configuration. - new_compilers = spack.compilers.find_new_compilers( - paths, scope=None, mixed_toolchain=args.mixed_toolchain + new_compilers = spack.compilers.find_compilers( + path_hints=paths, + scope=args.scope, + mixed_toolchain=args.mixed_toolchain, + max_workers=args.jobs, ) if new_compilers: - spack.compilers.add_compilers_to_config(new_compilers, scope=args.scope) n = len(new_compilers) s = "s" if n > 1 else "" - - config = spack.config.CONFIG - filename = config.get_config_filename(args.scope, "compilers") - tty.msg("Added %d new compiler%s to %s" % (n, s, filename)) - colify(reversed(sorted(c.spec.display_str for c in new_compilers)), indent=4) + filename = spack.config.CONFIG.get_config_filename(args.scope, "compilers") + tty.msg(f"Added {n:d} new compiler{s} to {filename}") + compiler_strs = sorted(f"{c.spec.name}@{c.spec.version}" for c in new_compilers) + colify(reversed(compiler_strs), indent=4) else: tty.msg("Found no new compilers") tty.msg("Compilers are defined in the following files:") diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 9712b63077bdcb..a42cd82d9d2e69 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -7,11 +7,10 @@ system and configuring Spack to use multiple compilers. """ import collections -import itertools -import multiprocessing.pool import os +import sys import warnings -from typing import Dict, List, Optional, Tuple +from typing import Dict, List, Optional import archspec.cpu @@ -22,11 +21,12 @@ import spack.compiler import spack.config import spack.error -import spack.operating_systems import spack.paths import spack.platforms +import spack.repo import spack.spec import spack.version +from spack.operating_systems import windows_os from spack.util.environment import get_path from spack.util.naming import mod_to_class @@ -63,6 +63,10 @@ } +#: Tag used to identify packages providing a compiler +COMPILER_TAG = "compiler" + + def pkg_spec_for_compiler(cspec): """Return the spec of the package that provides the compiler.""" for spec, package in _compiler_to_pkg.items(): @@ -127,7 +131,7 @@ def get_compiler_config( # Do not init config because there is a non-empty scope return config - _init_compiler_config(configuration, scope=scope) + find_compilers(scope=scope) config = configuration.get("compilers", scope=scope) return config @@ -136,125 +140,8 @@ def get_compiler_config_from_packages( configuration: "spack.config.Configuration", *, scope: Optional[str] = None ) -> List[Dict]: """Return the compiler configuration from packages.yaml""" - config = configuration.get("packages", scope=scope) - if not config: - return [] - - packages = [] - compiler_package_names = supported_compilers() + list(package_name_to_compiler_name.keys()) - for name, entry in config.items(): - if name not in compiler_package_names: - continue - externals_config = entry.get("externals", None) - if not externals_config: - continue - packages.extend(_compiler_config_from_package_config(externals_config)) - - return packages - - -def _compiler_config_from_package_config(config): - compilers = [] - for entry in config: - compiler = _compiler_config_from_external(entry) - if compiler: - compilers.append(compiler) - - return compilers - - -def _compiler_config_from_external(config): - extra_attributes_key = "extra_attributes" - compilers_key = "compilers" - c_key, cxx_key, fortran_key = "c", "cxx", "fortran" - - # Allow `@x.y.z` instead of `@=x.y.z` - spec = spack.spec.parse_with_version_concrete(config["spec"]) - - compiler_spec = spack.spec.CompilerSpec( - package_name_to_compiler_name.get(spec.name, spec.name), spec.version - ) - - err_header = f"The external spec '{spec}' cannot be used as a compiler" - - # If extra_attributes is not there I might not want to use this entry as a compiler, - # therefore just leave a debug message, but don't be loud with a warning. - if extra_attributes_key not in config: - tty.debug(f"[{__file__}] {err_header}: missing the '{extra_attributes_key}' key") - return None - extra_attributes = config[extra_attributes_key] - - # If I have 'extra_attributes' warn if 'compilers' is missing, or we don't have a C compiler - if compilers_key not in extra_attributes: - warnings.warn( - f"{err_header}: missing the '{compilers_key}' key under '{extra_attributes_key}'" - ) - return None - attribute_compilers = extra_attributes[compilers_key] - - if c_key not in attribute_compilers: - warnings.warn( - f"{err_header}: missing the C compiler path under " - f"'{extra_attributes_key}:{compilers_key}'" - ) - return None - c_compiler = attribute_compilers[c_key] - - # C++ and Fortran compilers are not mandatory, so let's just leave a debug trace - if cxx_key not in attribute_compilers: - tty.debug(f"[{__file__}] The external spec {spec} does not have a C++ compiler") - - if fortran_key not in attribute_compilers: - tty.debug(f"[{__file__}] The external spec {spec} does not have a Fortran compiler") - - # compilers format has cc/fc/f77, externals format has "c/fortran" - paths = { - "cc": c_compiler, - "cxx": attribute_compilers.get(cxx_key, None), - "fc": attribute_compilers.get(fortran_key, None), - "f77": attribute_compilers.get(fortran_key, None), - } - - if not spec.architecture: - host_platform = spack.platforms.host() - operating_system = host_platform.operating_system("default_os") - target = host_platform.target("default_target").microarchitecture - else: - target = spec.architecture.target - if not target: - target = spack.platforms.host().target("default_target") - target = target.microarchitecture - - operating_system = spec.os - if not operating_system: - host_platform = spack.platforms.host() - operating_system = host_platform.operating_system("default_os") - - compiler_entry = { - "compiler": { - "spec": str(compiler_spec), - "paths": paths, - "flags": extra_attributes.get("flags", {}), - "operating_system": str(operating_system), - "target": str(target.family), - "modules": config.get("modules", []), - "environment": extra_attributes.get("environment", {}), - "extra_rpaths": extra_attributes.get("extra_rpaths", []), - "implicit_rpaths": extra_attributes.get("implicit_rpaths", None), - } - } - return compiler_entry - - -def _init_compiler_config( - configuration: "spack.config.Configuration", *, scope: Optional[str] -) -> None: - """Compiler search used when Spack has no compilers.""" - compilers = find_compilers() - compilers_dict = [] - for compiler in compilers: - compilers_dict.append(_to_dict(compiler)) - configuration.set("compilers", compilers_dict, scope=scope) + packages_yaml = configuration.get("packages", scope=scope) + return CompilerConfigFactory.from_packages_yaml(packages_yaml) def compiler_config_files(): @@ -278,9 +165,7 @@ def add_compilers_to_config(compilers, scope=None): compilers: a list of Compiler objects. scope: configuration scope to modify. """ - compiler_config = get_compiler_config( - configuration=spack.config.CONFIG, scope=scope, init_config=False - ) + compiler_config = get_compiler_config(configuration=spack.config.CONFIG, scope=scope) for compiler in compilers: if not compiler.cc: tty.debug(f"{compiler.spec} does not have a C compiler") @@ -329,9 +214,7 @@ def _remove_compiler_from_scope(compiler_spec, scope): True if one or more compiler entries were actually removed, False otherwise """ assert scope is not None, "a specific scope is needed when calling this function" - compiler_config = get_compiler_config( - configuration=spack.config.CONFIG, scope=scope, init_config=False - ) + compiler_config = get_compiler_config(configuration=spack.config.CONFIG, scope=scope) filtered_compiler_config = [ compiler_entry for compiler_entry in compiler_config @@ -380,79 +263,77 @@ def all_compiler_specs(scope=None, init_config=True): def find_compilers( - path_hints: Optional[List[str]] = None, *, mixed_toolchain=False + path_hints: Optional[List[str]] = None, + *, + scope: Optional[str] = None, + mixed_toolchain: bool = False, + max_workers: Optional[int] = None, ) -> List["spack.compiler.Compiler"]: - """Return the list of compilers found in the paths given as arguments. + """Searches for compiler in the paths given as argument. If any new compiler is found, the + configuration is updated, and the list of new compiler objects is returned. Args: path_hints: list of path hints where to look for. A sensible default based on the ``PATH`` environment variable will be used if the value is None + scope: configuration scope to modify mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for a certain language + max_workers: number of processes used to search for compilers """ + import spack.detection + + known_compilers = set(all_compilers(init_config=False)) + if path_hints is None: path_hints = get_path("PATH") default_paths = fs.search_paths_for_executables(*path_hints) + if sys.platform == "win32": + default_paths.extend(windows_os.WindowsOs().compiler_search_paths) + compiler_pkgs = spack.repo.PATH.packages_with_tags(COMPILER_TAG, full=True) - # To detect the version of the compilers, we dispatch a certain number - # of function calls to different workers. Here we construct the list - # of arguments for each call. - arguments = [] - for o in all_os_classes(): - search_paths = getattr(o, "compiler_search_paths", default_paths) - arguments.extend(arguments_to_detect_version_fn(o, search_paths)) - - # Here we map the function arguments to the corresponding calls - tp = multiprocessing.pool.ThreadPool() - try: - detected_versions = tp.map(detect_version, arguments) - finally: - tp.close() - - def valid_version(item: Tuple[Optional[DetectVersionArgs], Optional[str]]) -> bool: - value, error = item - if error is None: - return True - try: - # This will fail on Python 2.6 if a non ascii - # character is in the error - tty.debug(error) - except UnicodeEncodeError: - pass - return False - - def remove_errors( - item: Tuple[Optional[DetectVersionArgs], Optional[str]] - ) -> DetectVersionArgs: - value, _ = item - assert value is not None - return value - - return make_compiler_list( - [remove_errors(detected) for detected in detected_versions if valid_version(detected)], - mixed_toolchain=mixed_toolchain, + detected_packages = spack.detection.by_path( + compiler_pkgs, path_hints=default_paths, max_workers=max_workers ) + valid_compilers = {} + for name, detected in detected_packages.items(): + compilers = [x for x in detected if CompilerConfigFactory.from_external_spec(x.spec)] + if not compilers: + continue + valid_compilers[name] = compilers -def find_new_compilers( - path_hints: Optional[List[str]] = None, - scope: Optional[str] = None, - *, - mixed_toolchain: bool = False, -): - """Same as ``find_compilers`` but return only the compilers that are not - already in compilers.yaml. + def _has_fortran_compilers(x): + if "compilers" not in x.spec.extra_attributes: + return False - Args: - path_hints: list of path hints where to look for. A sensible default based on the ``PATH`` - environment variable will be used if the value is None - scope: scope to look for a compiler. If None consider the merged configuration. - mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for - a certain language - """ - compilers = find_compilers(path_hints, mixed_toolchain=mixed_toolchain) + return "fortran" in x.spec.extra_attributes["compilers"] - return select_new_compilers(compilers, scope) + if mixed_toolchain: + gccs = [x for x in valid_compilers.get("gcc", []) if _has_fortran_compilers(x)] + if gccs: + best_gcc = sorted( + gccs, key=lambda x: spack.spec.parse_with_version_concrete(x.spec).version + )[-1] + gfortran = best_gcc.spec.extra_attributes["compilers"]["fortran"] + for name in ("llvm", "apple-clang"): + if name not in valid_compilers: + continue + candidates = valid_compilers[name] + for candidate in candidates: + if _has_fortran_compilers(candidate): + continue + candidate.spec.extra_attributes["compilers"]["fortran"] = gfortran + + new_compilers = [] + for name, detected in valid_compilers.items(): + for config in CompilerConfigFactory.from_specs([x.spec for x in detected]): + c = _compiler_from_config_entry(config["compiler"]) + if c in known_compilers: + continue + new_compilers.append(c) + + add_compilers_to_config(new_compilers, scope=scope) + return new_compilers def select_new_compilers(compilers, scope=None): @@ -462,7 +343,9 @@ def select_new_compilers(compilers, scope=None): compilers_not_in_config = [] for c in compilers: arch_spec = spack.spec.ArchSpec((None, c.operating_system, c.target)) - same_specs = compilers_for_spec(c.spec, arch_spec, scope=scope, init_config=False) + same_specs = compilers_for_spec( + c.spec, arch_spec=arch_spec, scope=scope, init_config=False + ) if not same_specs: compilers_not_in_config.append(c) @@ -531,7 +414,12 @@ def find(compiler_spec, scope=None, init_config=True): def find_specs_by_arch(compiler_spec, arch_spec, scope=None, init_config=True): """Return specs of available compilers that match the supplied compiler spec. Return an empty list if nothing found.""" - return [c.spec for c in compilers_for_spec(compiler_spec, arch_spec, scope, True, init_config)] + return [ + c.spec + for c in compilers_for_spec( + compiler_spec, arch_spec=arch_spec, scope=scope, init_config=init_config + ) + ] def all_compilers(scope=None, init_config=True): @@ -553,14 +441,11 @@ def all_compilers_from(configuration, scope=None, init_config=True): @_auto_compiler_spec -def compilers_for_spec( - compiler_spec, arch_spec=None, scope=None, use_cache=True, init_config=True -): +def compilers_for_spec(compiler_spec, *, arch_spec=None, scope=None, init_config=True): """This gets all compilers that satisfy the supplied CompilerSpec. Returns an empty list if none are found. """ config = all_compilers_config(spack.config.CONFIG, scope=scope, init_config=init_config) - matches = set(find(compiler_spec, scope, init_config)) compilers = [] for cspec in matches: @@ -569,7 +454,7 @@ def compilers_for_spec( def compilers_for_arch(arch_spec, scope=None): - config = all_compilers_config(spack.config.CONFIG, scope=scope) + config = all_compilers_config(spack.config.CONFIG, scope=scope, init_config=False) return list(get_compilers(config, arch_spec=arch_spec)) @@ -819,228 +704,6 @@ def all_compiler_types(): ) -def arguments_to_detect_version_fn( - operating_system: spack.operating_systems.OperatingSystem, paths: List[str] -) -> List[DetectVersionArgs]: - """Returns a list of DetectVersionArgs tuples to be used in a - corresponding function to detect compiler versions. - - The ``operating_system`` instance can customize the behavior of this - function by providing a method called with the same name. - - Args: - operating_system: the operating system on which we are looking for compilers - paths: paths to search for compilers - - Returns: - List of DetectVersionArgs tuples. Each item in the list will be later - mapped to the corresponding function call to detect the version of the - compilers in this OS. - """ - - def _default(search_paths: List[str]) -> List[DetectVersionArgs]: - command_arguments: List[DetectVersionArgs] = [] - files_to_be_tested = fs.files_in(*search_paths) - for compiler_name in supported_compilers_for_host_platform(): - compiler_cls = class_for_compiler_name(compiler_name) - - for language in ("cc", "cxx", "f77", "fc"): - # Select only the files matching a regexp - for (file, full_path), regexp in itertools.product( - files_to_be_tested, compiler_cls.search_regexps(language) - ): - match = regexp.match(file) - if match: - compiler_id = CompilerID(operating_system, compiler_name, None) - detect_version_args = DetectVersionArgs( - id=compiler_id, - variation=NameVariation(*match.groups()), - language=language, - path=full_path, - ) - command_arguments.append(detect_version_args) - - return command_arguments - - fn = getattr(operating_system, "arguments_to_detect_version_fn", _default) - return fn(paths) - - -def detect_version( - detect_version_args: DetectVersionArgs, -) -> Tuple[Optional[DetectVersionArgs], Optional[str]]: - """Computes the version of a compiler and adds it to the information - passed as input. - - As this function is meant to be executed by worker processes it won't - raise any exception but instead will return a (value, error) tuple that - needs to be checked by the code dispatching the calls. - - Args: - detect_version_args: information on the compiler for which we should detect the version. - - Returns: - A ``(DetectVersionArgs, error)`` tuple. If ``error`` is ``None`` the - version of the compiler was computed correctly and the first argument - of the tuple will contain it. Otherwise ``error`` is a string - containing an explanation on why the version couldn't be computed. - """ - - def _default(fn_args): - compiler_id = fn_args.id - language = fn_args.language - compiler_cls = class_for_compiler_name(compiler_id.compiler_name) - path = fn_args.path - - # Get compiler names and the callback to detect their versions - callback = getattr(compiler_cls, f"{language}_version") - - try: - version = callback(path) - if version and str(version).strip() and version != "unknown": - value = fn_args._replace(id=compiler_id._replace(version=version)) - return value, None - - error = f"Couldn't get version for compiler {path}".format(path) - except spack.util.executable.ProcessError as e: - error = f"Couldn't get version for compiler {path}\n" + str(e) - except spack.util.executable.ProcessTimeoutError as e: - error = f"Couldn't get version for compiler {path}\n" + str(e) - except Exception as e: - # Catching "Exception" here is fine because it just - # means something went wrong running a candidate executable. - error = "Error while executing candidate compiler {0}" "\n{1}: {2}".format( - path, e.__class__.__name__, str(e) - ) - return None, error - - operating_system = detect_version_args.id.os - fn = getattr(operating_system, "detect_version", _default) - return fn(detect_version_args) - - -def make_compiler_list( - detected_versions: List[DetectVersionArgs], mixed_toolchain: bool = False -) -> List["spack.compiler.Compiler"]: - """Process a list of detected versions and turn them into a list of - compiler specs. - - Args: - detected_versions: list of DetectVersionArgs containing a valid version - mixed_toolchain: allow mixing compilers from different toolchains if langauge is missing - - Returns: - list: list of Compiler objects - """ - group_fn = lambda x: (x.id, x.variation, x.language) - sorted_compilers = sorted(detected_versions, key=group_fn) - - # Gather items in a dictionary by the id, name variation and language - compilers_d: Dict[CompilerID, Dict[NameVariation, dict]] = {} - for sort_key, group in itertools.groupby(sorted_compilers, key=group_fn): - compiler_id, name_variation, language = sort_key - by_compiler_id = compilers_d.setdefault(compiler_id, {}) - by_name_variation = by_compiler_id.setdefault(name_variation, {}) - by_name_variation[language] = next(x.path for x in group) - - def _default_make_compilers(cmp_id, paths): - operating_system, compiler_name, version = cmp_id - compiler_cls = class_for_compiler_name(compiler_name) - spec = spack.spec.CompilerSpec(compiler_cls.name, f"={version}") - paths = [paths.get(x, None) for x in ("cc", "cxx", "f77", "fc")] - # TODO: johnwparent - revist the following line as per discussion at: - # https://github.com/spack/spack/pull/33385/files#r1040036318 - target = archspec.cpu.host() - compiler = compiler_cls(spec, operating_system, str(target.family), paths) - return [compiler] - - # For compilers with the same compiler id: - # - # - Prefer with C compiler to without - # - Prefer with C++ compiler to without - # - Prefer no variations to variations (e.g., clang to clang-gpu) - # - sort_fn = lambda variation: ( - "cc" not in by_compiler_id[variation], # None last - "cxx" not in by_compiler_id[variation], # None last - getattr(variation, "prefix", None), - getattr(variation, "suffix", None), - ) - - # Flatten to a list of compiler id, primary variation and compiler dictionary - flat_compilers: List[Tuple[CompilerID, NameVariation, dict]] = [] - for compiler_id, by_compiler_id in compilers_d.items(): - ordered = sorted(by_compiler_id, key=sort_fn) - selected_variation = ordered[0] - selected = by_compiler_id[selected_variation] - - # Fill any missing parts from subsequent entries (without mixing toolchains) - for lang in ["cxx", "f77", "fc"]: - if lang not in selected: - next_lang = next( - (by_compiler_id[v][lang] for v in ordered if lang in by_compiler_id[v]), None - ) - if next_lang: - selected[lang] = next_lang - - flat_compilers.append((compiler_id, selected_variation, selected)) - - # Next, fill out the blanks of missing compilers by creating a mixed toolchain (if requested) - if mixed_toolchain: - make_mixed_toolchain(flat_compilers) - - # Finally, create the compiler list - compilers: List["spack.compiler.Compiler"] = [] - for compiler_id, _, compiler in flat_compilers: - make_compilers = getattr(compiler_id.os, "make_compilers", _default_make_compilers) - candidates = make_compilers(compiler_id, compiler) - compilers.extend(x for x in candidates if x.cc is not None) - - return compilers - - -def make_mixed_toolchain(compilers: List[Tuple[CompilerID, NameVariation, dict]]) -> None: - """Add missing compilers across toolchains when they are missing for a particular language. - This currently only adds the most sensible gfortran to (apple)-clang if it doesn't have a - fortran compiler (no flang).""" - - # First collect the clangs that are missing a fortran compiler - clangs_without_flang = [ - (id, variation, compiler) - for id, variation, compiler in compilers - if id.compiler_name in ("clang", "apple-clang") - and "f77" not in compiler - and "fc" not in compiler - ] - if not clangs_without_flang: - return - - # Filter on GCCs with fortran compiler - gccs_with_fortran = [ - (id, variation, compiler) - for id, variation, compiler in compilers - if id.compiler_name == "gcc" and "f77" in compiler and "fc" in compiler - ] - - # Sort these GCCs by "best variation" (no prefix / suffix first) - gccs_with_fortran.sort( - key=lambda x: (getattr(x[1], "prefix", None), getattr(x[1], "suffix", None)) - ) - - # Attach the optimal GCC fortran compiler to the clangs that don't have one - for clang_id, _, clang_compiler in clangs_without_flang: - gcc_compiler = next( - (gcc[2] for gcc in gccs_with_fortran if gcc[0].os == clang_id.os), None - ) - - if not gcc_compiler: - continue - - # Update the fc / f77 entries - clang_compiler["f77"] = gcc_compiler["f77"] - clang_compiler["fc"] = gcc_compiler["fc"] - - def is_mixed_toolchain(compiler): """Returns True if the current compiler is a mixed toolchain, False otherwise. @@ -1087,6 +750,155 @@ def name_matches(name, name_list): return False +_EXTRA_ATTRIBUTES_KEY = "extra_attributes" +_COMPILERS_KEY = "compilers" +_C_KEY = "c" +_CXX_KEY, _FORTRAN_KEY = "cxx", "fortran" + + +class CompilerConfigFactory: + """Class aggregating all ways of constructing a list of compiler config entries.""" + + @staticmethod + def from_specs(specs: List["spack.spec.Spec"]) -> List[dict]: + result = [] + compiler_package_names = supported_compilers() + list(package_name_to_compiler_name.keys()) + for s in specs: + if s.name not in compiler_package_names: + continue + + candidate = CompilerConfigFactory.from_external_spec(s) + if candidate is None: + continue + + result.append(candidate) + return result + + @staticmethod + def from_packages_yaml(packages_yaml) -> List[dict]: + compiler_specs = [] + compiler_package_names = supported_compilers() + list(package_name_to_compiler_name.keys()) + for name, entry in packages_yaml.items(): + if name not in compiler_package_names: + continue + + externals_config = entry.get("externals", None) + if not externals_config: + continue + + current_specs = [] + for current_external in externals_config: + compiler = CompilerConfigFactory._spec_from_external_config(current_external) + if compiler: + current_specs.append(compiler) + compiler_specs.extend(current_specs) + + return CompilerConfigFactory.from_specs(compiler_specs) + + @staticmethod + def _spec_from_external_config(config): + # Allow `@x.y.z` instead of `@=x.y.z` + err_header = f"The external spec '{config['spec']}' cannot be used as a compiler" + # If extra_attributes is not there I might not want to use this entry as a compiler, + # therefore just leave a debug message, but don't be loud with a warning. + if _EXTRA_ATTRIBUTES_KEY not in config: + tty.debug(f"[{__file__}] {err_header}: missing the '{_EXTRA_ATTRIBUTES_KEY}' key") + return None + extra_attributes = config[_EXTRA_ATTRIBUTES_KEY] + result = spack.spec.Spec( + str(spack.spec.parse_with_version_concrete(config["spec"])), + external_modules=config.get("modules"), + ) + result.extra_attributes = extra_attributes + return result + + @staticmethod + def from_external_spec(spec: "spack.spec.Spec") -> Optional[dict]: + spec = spack.spec.parse_with_version_concrete(spec) + extra_attributes = getattr(spec, _EXTRA_ATTRIBUTES_KEY, None) + if extra_attributes is None: + return None + + paths = CompilerConfigFactory._extract_compiler_paths(spec) + if paths is None: + return None + + compiler_spec = spack.spec.CompilerSpec( + package_name_to_compiler_name.get(spec.name, spec.name), spec.version + ) + + operating_system, target = CompilerConfigFactory._extract_os_and_target(spec) + + compiler_entry = { + "compiler": { + "spec": str(compiler_spec), + "paths": paths, + "flags": extra_attributes.get("flags", {}), + "operating_system": str(operating_system), + "target": str(target.family), + "modules": getattr(spec, "external_modules", []), + "environment": extra_attributes.get("environment", {}), + "extra_rpaths": extra_attributes.get("extra_rpaths", []), + "implicit_rpaths": extra_attributes.get("implicit_rpaths", None), + } + } + return compiler_entry + + @staticmethod + def _extract_compiler_paths(spec: "spack.spec.Spec") -> Optional[Dict[str, str]]: + err_header = f"The external spec '{spec}' cannot be used as a compiler" + extra_attributes = spec.extra_attributes + # If I have 'extra_attributes' warn if 'compilers' is missing, + # or we don't have a C compiler + if _COMPILERS_KEY not in extra_attributes: + warnings.warn( + f"{err_header}: missing the '{_COMPILERS_KEY}' key under '{_EXTRA_ATTRIBUTES_KEY}'" + ) + return None + attribute_compilers = extra_attributes[_COMPILERS_KEY] + + if _C_KEY not in attribute_compilers: + warnings.warn( + f"{err_header}: missing the C compiler path under " + f"'{_EXTRA_ATTRIBUTES_KEY}:{_COMPILERS_KEY}'" + ) + return None + c_compiler = attribute_compilers[_C_KEY] + + # C++ and Fortran compilers are not mandatory, so let's just leave a debug trace + if _CXX_KEY not in attribute_compilers: + tty.debug(f"[{__file__}] The external spec {spec} does not have a C++ compiler") + + if _FORTRAN_KEY not in attribute_compilers: + tty.debug(f"[{__file__}] The external spec {spec} does not have a Fortran compiler") + + # compilers format has cc/fc/f77, externals format has "c/fortran" + return { + "cc": c_compiler, + "cxx": attribute_compilers.get(_CXX_KEY, None), + "fc": attribute_compilers.get(_FORTRAN_KEY, None), + "f77": attribute_compilers.get(_FORTRAN_KEY, None), + } + + @staticmethod + def _extract_os_and_target(spec: "spack.spec.Spec"): + if not spec.architecture: + host_platform = spack.platforms.host() + operating_system = host_platform.operating_system("default_os") + target = host_platform.target("default_target").microarchitecture + else: + target = spec.architecture.target + if not target: + target = spack.platforms.host().target("default_target") + target = target.microarchitecture + + operating_system = spec.os + if not operating_system: + host_platform = spack.platforms.host() + operating_system = host_platform.operating_system("default_os") + return operating_system, target + + class InvalidCompilerConfigurationError(spack.error.SpackError): def __init__(self, compiler_spec): super().__init__( diff --git a/lib/spack/spack/detection/common.py b/lib/spack/spack/detection/common.py index e043c6fb8a46b5..596d2ccd7ef979 100644 --- a/lib/spack/spack/detection/common.py +++ b/lib/spack/spack/detection/common.py @@ -239,7 +239,7 @@ def update_configuration( external_entries = pkg_config.get("externals", []) assert not isinstance(external_entries, bool), "unexpected value for external entry" - all_new_specs.extend([spack.spec.Spec(x["spec"]) for x in external_entries]) + all_new_specs.extend([x.spec for x in new_entries]) if buildable is False: pkg_config["buildable"] = False pkg_to_cfg[package_name] = pkg_config diff --git a/lib/spack/spack/detection/path.py b/lib/spack/spack/detection/path.py index 96535e7e484099..75d29fe1dbd524 100644 --- a/lib/spack/spack/detection/path.py +++ b/lib/spack/spack/detection/path.py @@ -62,7 +62,7 @@ def common_windows_package_paths(pkg_cls=None) -> List[str]: def file_identifier(path): s = os.stat(path) - return (s.st_dev, s.st_ino) + return s.st_dev, s.st_ino def executables_in_path(path_hints: List[str]) -> Dict[str, str]: @@ -80,6 +80,8 @@ def executables_in_path(path_hints: List[str]) -> Dict[str, str]: constructed based on the PATH environment variable. """ search_paths = llnl.util.filesystem.search_paths_for_executables(*path_hints) + # Make use we don't doubly list /usr/lib and /lib etc + search_paths = list(llnl.util.lang.dedupe(search_paths, key=file_identifier)) return path_to_dict(search_paths) diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 4114a1cdb95a76..877e294b743e60 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1644,7 +1644,7 @@ def _concretize_separately(self, tests=False): # Ensure we have compilers in compilers.yaml to avoid that # processes try to write the config file in parallel - _ = spack.compilers.get_compiler_config(spack.config.CONFIG, init_config=True) + _ = spack.compilers.all_compilers_config(spack.config.CONFIG) # Early return if there is nothing to do if len(args) == 0: diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index dc94c95926aa1f..9039a3738f51c0 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -1611,9 +1611,7 @@ def _add_tasks(self, request: BuildRequest, all_deps): def _add_compiler_package_to_config(self, pkg: "spack.package_base.PackageBase") -> None: compiler_search_prefix = getattr(pkg, "compiler_search_prefix", pkg.spec.prefix) - spack.compilers.add_compilers_to_config( - spack.compilers.find_compilers([compiler_search_prefix]) - ) + spack.compilers.find_compilers([compiler_search_prefix]) def _install_task(self, task: BuildTask, install_status: InstallStatus) -> None: """ diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index e12789055c90be..b3f1248ce7ed23 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -285,16 +285,14 @@ def _create_counter(specs: List[spack.spec.Spec], tests: bool): return NoDuplicatesCounter(specs, tests=tests) -def all_compilers_in_config(configuration): - return spack.compilers.all_compilers_from(configuration) - - def all_libcs() -> Set[spack.spec.Spec]: """Return a set of all libc specs targeted by any configured compiler. If none, fall back to libc determined from the current Python process if dynamically linked.""" libcs = { - c.default_libc for c in all_compilers_in_config(spack.config.CONFIG) if c.default_libc + c.default_libc + for c in spack.compilers.all_compilers_from(spack.config.CONFIG) + if c.default_libc } if libcs: @@ -613,7 +611,7 @@ def _external_config_with_implicit_externals(configuration): if not using_libc_compatibility(): return packages_yaml - for compiler in all_compilers_in_config(configuration): + for compiler in spack.compilers.all_compilers_from(configuration): libc = compiler.default_libc if libc: entry = {"spec": f"{libc} %{compiler.spec}", "prefix": libc.external_path} @@ -3002,7 +3000,7 @@ class CompilerParser: def __init__(self, configuration) -> None: self.compilers: Set[KnownCompiler] = set() - for c in all_compilers_in_config(configuration): + for c in spack.compilers.all_compilers_from(configuration): if using_libc_compatibility() and not c_compiler_runs(c): tty.debug( f"the C compiler {c.cc} does not exist, or does not run correctly." @@ -3466,7 +3464,7 @@ def reorder_flags(self): """ # reverse compilers so we get highest priority compilers that share a spec compilers = dict( - (c.spec, c) for c in reversed(all_compilers_in_config(spack.config.CONFIG)) + (c.spec, c) for c in reversed(spack.compilers.all_compilers_from(spack.config.CONFIG)) ) cmd_specs = dict((s.name, s) for spec in self._command_line_specs for s in spec.traverse()) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index ccdc498214c2d4..eddbbf934ca67c 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -4341,9 +4341,9 @@ def attach_git_version_lookup(self): v.attach_lookup(spack.version.git_ref_lookup.GitRefLookup(self.fullname)) -def parse_with_version_concrete(string: str, compiler: bool = False): +def parse_with_version_concrete(spec_like: Union[str, Spec], compiler: bool = False): """Same as Spec(string), but interprets @x as @=x""" - s: Union[CompilerSpec, Spec] = CompilerSpec(string) if compiler else Spec(string) + s: Union[CompilerSpec, Spec] = CompilerSpec(spec_like) if compiler else Spec(spec_like) interpreted_version = s.versions.concrete_range_as_version if interpreted_version: s.versions = vn.VersionList([interpreted_version]) diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index 996428ce59f513..fcc781b1422655 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -8,7 +8,9 @@ import io import json import os +import pathlib import platform +import shutil import sys import tarfile import urllib.error @@ -16,12 +18,11 @@ import urllib.response from pathlib import Path, PurePath -import py import pytest import archspec.cpu -from llnl.util.filesystem import join_path, visit_directory_tree +from llnl.util.filesystem import copy_tree, join_path, visit_directory_tree from llnl.util.symlink import readlink import spack.binary_distribution as bindist @@ -81,72 +82,67 @@ def test_mirror(mirror_dir): @pytest.fixture(scope="module") -def config_directory(tmpdir_factory): - tmpdir = tmpdir_factory.mktemp("test_configs") - # restore some sane defaults for packages and config - config_path = py.path.local(spack.paths.etc_path) - modules_yaml = config_path.join("defaults", "modules.yaml") - os_modules_yaml = config_path.join( - "defaults", "%s" % platform.system().lower(), "modules.yaml" - ) - packages_yaml = config_path.join("defaults", "packages.yaml") - config_yaml = config_path.join("defaults", "config.yaml") - repos_yaml = config_path.join("defaults", "repos.yaml") - tmpdir.ensure("site", dir=True) - tmpdir.ensure("user", dir=True) - tmpdir.ensure("site/%s" % platform.system().lower(), dir=True) - modules_yaml.copy(tmpdir.join("site", "modules.yaml")) - os_modules_yaml.copy(tmpdir.join("site/%s" % platform.system().lower(), "modules.yaml")) - packages_yaml.copy(tmpdir.join("site", "packages.yaml")) - config_yaml.copy(tmpdir.join("site", "config.yaml")) - repos_yaml.copy(tmpdir.join("site", "repos.yaml")) - yield tmpdir - tmpdir.remove() +def config_directory(tmp_path_factory): + # Copy defaults to a temporary "site" scope + defaults_dir = tmp_path_factory.mktemp("test_configs") + config_path = pathlib.Path(spack.paths.etc_path) + copy_tree(str(config_path / "defaults"), str(defaults_dir / "site")) + + # Create a "user" scope + (defaults_dir / "user").mkdir() + + # Detect compilers + cfg_scopes = [ + spack.config.DirectoryConfigScope(name, str(defaults_dir / name)) + for name in [f"site/{platform.system().lower()}", "site", "user"] + ] + with spack.config.use_configuration(*cfg_scopes): + _ = spack.compilers.find_compilers(scope="site") + + yield defaults_dir + + shutil.rmtree(str(defaults_dir)) @pytest.fixture(scope="function") -def default_config(tmpdir, config_directory, monkeypatch, install_mockery): +def default_config(tmp_path, config_directory, monkeypatch, install_mockery): # This fixture depends on install_mockery to ensure # there is a clear order of initialization. The substitution of the # config scopes here is done on top of the substitution that comes with # install_mockery - mutable_dir = tmpdir.mkdir("mutable_config").join("tmp") - config_directory.copy(mutable_dir) - - cfg = spack.config.Configuration( - *[ - spack.config.DirectoryConfigScope(name, str(mutable_dir)) - for name in [f"site/{platform.system().lower()}", "site", "user"] - ] - ) - - spack.config.CONFIG, old_config = cfg, spack.config.CONFIG - spack.config.CONFIG.set("repos", [spack.paths.mock_packages_path]) - njobs = spack.config.get("config:build_jobs") - if not njobs: - spack.config.set("config:build_jobs", 4, scope="user") - extensions = spack.config.get("config:template_dirs") - if not extensions: - spack.config.set( - "config:template_dirs", - [os.path.join(spack.paths.share_path, "templates")], - scope="user", - ) - - mutable_dir.ensure("build_stage", dir=True) - build_stage = spack.config.get("config:build_stage") - if not build_stage: - spack.config.set( - "config:build_stage", [str(mutable_dir.join("build_stage"))], scope="user" - ) - timeout = spack.config.get("config:connect_timeout") - if not timeout: - spack.config.set("config:connect_timeout", 10, scope="user") + mutable_dir = tmp_path / "mutable_config" / "tmp" + mutable_dir.mkdir(parents=True) + copy_tree(str(config_directory), str(mutable_dir)) + + scopes = [ + spack.config.DirectoryConfigScope(name, str(mutable_dir / name)) + for name in [f"site/{platform.system().lower()}", "site", "user"] + ] + + with spack.config.use_configuration(*scopes): + spack.config.CONFIG.set("repos", [spack.paths.mock_packages_path]) + njobs = spack.config.get("config:build_jobs") + if not njobs: + spack.config.set("config:build_jobs", 4, scope="user") + extensions = spack.config.get("config:template_dirs") + if not extensions: + spack.config.set( + "config:template_dirs", + [os.path.join(spack.paths.share_path, "templates")], + scope="user", + ) - yield spack.config.CONFIG + (mutable_dir / "build_stage").mkdir() + build_stage = spack.config.get("config:build_stage") + if not build_stage: + spack.config.set( + "config:build_stage", [str(mutable_dir / "build_stage")], scope="user" + ) + timeout = spack.config.get("config:connect_timeout") + if not timeout: + spack.config.set("config:connect_timeout", 10, scope="user") - spack.config.CONFIG = old_config - mutable_dir.remove() + yield spack.config.CONFIG @pytest.fixture(scope="function") diff --git a/lib/spack/spack/test/cmd/compiler.py b/lib/spack/spack/test/cmd/compiler.py index 2fde7fbc929d81..2638aa79264335 100644 --- a/lib/spack/spack/test/cmd/compiler.py +++ b/lib/spack/spack/test/cmd/compiler.py @@ -81,34 +81,6 @@ def test_compiler_find_without_paths(no_compilers_yaml, working_env, mock_execut assert "gcc" in output -@pytest.mark.regression("17589") -def test_compiler_find_no_apple_gcc(no_compilers_yaml, working_env, mock_executable): - """Tests that Spack won't mistake Apple's GCC as a "real" GCC, since it's really - Clang with a few tweaks. - """ - gcc_path = mock_executable( - "gcc", - output=""" -if [ "$1" = "-dumpversion" ]; then - echo "4.2.1" -elif [ "$1" = "--version" ]; then - echo "Configured with: --prefix=/dummy" - echo "Apple clang version 11.0.0 (clang-1100.0.33.16)" - echo "Target: x86_64-apple-darwin18.7.0" - echo "Thread model: posix" - echo "InstalledDir: /dummy" -else - echo "clang: error: no input files" -fi -""", - ) - - os.environ["PATH"] = str(gcc_path.parent) - output = compiler("find", "--scope=site") - - assert "gcc" not in output - - @pytest.mark.regression("37996") def test_compiler_remove(mutable_config, mock_packages): """Tests that we can remove a compiler from configuration.""" @@ -131,7 +103,7 @@ def test_removing_compilers_from_multiple_scopes(mutable_config, mock_packages): @pytest.mark.not_on_windows("Cannot execute bash script on Windows") -def test_compiler_add(mutable_config, mock_packages, mock_executable): +def test_compiler_add(mutable_config, mock_executable): """Tests that we can add a compiler to configuration.""" expected_version = "4.5.3" gcc_path = mock_executable( @@ -149,7 +121,12 @@ def test_compiler_add(mutable_config, mock_packages, mock_executable): compilers_before_find = set(spack.compilers.all_compiler_specs()) args = spack.util.pattern.Bunch( - all=None, compiler_spec=None, add_paths=[str(root_dir)], scope=None, mixed_toolchain=False + all=None, + compiler_spec=None, + add_paths=[str(root_dir)], + scope=None, + mixed_toolchain=False, + jobs=1, ) spack.cmd.compiler.compiler_find(args) compilers_after_find = set(spack.compilers.all_compiler_specs()) @@ -229,7 +206,7 @@ def test_compiler_find_path_order(no_compilers_yaml, working_env, compilers_dir) for name in ("gcc-8", "g++-8", "gfortran-8"): shutil.copy(compilers_dir / name, new_dir / name) # Set PATH to have the new folder searched first - os.environ["PATH"] = "{}:{}".format(str(new_dir), str(compilers_dir)) + os.environ["PATH"] = f"{str(new_dir)}:{str(compilers_dir)}" compiler("find", "--scope=site") diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py index 0884f9b1a4e051..db9be42745f69c 100644 --- a/lib/spack/spack/test/compilers/basics.py +++ b/lib/spack/spack/test/compilers/basics.py @@ -19,27 +19,6 @@ from spack.util.executable import Executable, ProcessError -@pytest.fixture() -def make_args_for_version(monkeypatch): - def _factory(version, path="/usr/bin/gcc"): - class MockOs: - pass - - compiler_name = "gcc" - compiler_cls = spack.compilers.class_for_compiler_name(compiler_name) - monkeypatch.setattr(compiler_cls, "cc_version", lambda x: version) - - compiler_id = spack.compilers.CompilerID( - os=MockOs, compiler_name=compiler_name, version=None - ) - variation = spack.compilers.NameVariation(prefix="", suffix="") - return spack.compilers.DetectVersionArgs( - id=compiler_id, variation=variation, language="cc", path=path - ) - - return _factory - - def test_multiple_conflicting_compiler_definitions(mutable_config): compiler_def = { "compiler": { @@ -82,21 +61,6 @@ def test_get_compiler_duplicates(mutable_config, compiler_factory): assert len(duplicates) == 1 -@pytest.mark.parametrize( - "input_version,expected_version,expected_error", - [(None, None, "Couldn't get version for compiler /usr/bin/gcc"), ("4.9", "4.9", None)], -) -def test_version_detection_is_empty( - make_args_for_version, input_version, expected_version, expected_error -): - args = make_args_for_version(version=input_version) - result, error = spack.compilers.detect_version(args) - if not error: - assert result.id.version == expected_version - - assert error == expected_error - - def test_compiler_flags_from_config_are_grouped(): compiler_entry = { "spec": "intel@17.0.2", @@ -906,51 +870,30 @@ def prepare_executable(name): @pytest.mark.parametrize( - "detected_versions,expected_length", + "compilers_extra_attributes,expected_length", [ # If we detect a C compiler we expect the result to be valid - ( - [ - spack.compilers.DetectVersionArgs( - id=spack.compilers.CompilerID( - os="ubuntu20.04", compiler_name="clang", version="12.0.0" - ), - variation=spack.compilers.NameVariation(prefix="", suffix="-12"), - language="cc", - path="/usr/bin/clang-12", - ), - spack.compilers.DetectVersionArgs( - id=spack.compilers.CompilerID( - os="ubuntu20.04", compiler_name="clang", version="12.0.0" - ), - variation=spack.compilers.NameVariation(prefix="", suffix="-12"), - language="cxx", - path="/usr/bin/clang++-12", - ), - ], - 1, - ), + ({"c": "/usr/bin/clang-12", "cxx": "/usr/bin/clang-12"}, 1), # If we detect only a C++ compiler we expect the result to be discarded - ( - [ - spack.compilers.DetectVersionArgs( - id=spack.compilers.CompilerID( - os="ubuntu20.04", compiler_name="clang", version="12.0.0" - ), - variation=spack.compilers.NameVariation(prefix="", suffix="-12"), - language="cxx", - path="/usr/bin/clang++-12", - ) - ], - 0, - ), + ({"cxx": "/usr/bin/clang-12"}, 0), ], ) -def test_detection_requires_c_compiler(detected_versions, expected_length): +def test_detection_requires_c_compiler(compilers_extra_attributes, expected_length): """Tests that compilers automatically added to the configuration have at least a C compiler. """ - result = spack.compilers.make_compiler_list(detected_versions) + packages_yaml = { + "llvm": { + "externals": [ + { + "spec": "clang@12.0.0", + "prefix": "/usr", + "extra_attributes": {"compilers": compilers_extra_attributes}, + } + ] + } + } + result = spack.compilers.CompilerConfigFactory.from_packages_yaml(packages_yaml) assert len(result) == expected_length diff --git a/lib/spack/spack/test/compilers/detection.py b/lib/spack/spack/test/compilers/detection.py deleted file mode 100644 index 4103b209855436..00000000000000 --- a/lib/spack/spack/test/compilers/detection.py +++ /dev/null @@ -1,471 +0,0 @@ -# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) -"""Test detection of compiler version""" -import pytest - -import spack.compilers.aocc -import spack.compilers.arm -import spack.compilers.cce -import spack.compilers.clang -import spack.compilers.fj -import spack.compilers.gcc -import spack.compilers.intel -import spack.compilers.nag -import spack.compilers.nvhpc -import spack.compilers.oneapi -import spack.compilers.pgi -import spack.compilers.xl -import spack.compilers.xl_r -import spack.util.module_cmd - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - ( - "Arm C/C++/Fortran Compiler version 19.0 (build number 73) (based on LLVM 7.0.2)\n" - "Target: aarch64--linux-gnu\n" - "Thread model: posix\n" - "InstalledDir:\n" - "/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n", - "19.0", - ), - ( - "Arm C/C++/Fortran Compiler version 19.3.1 (build number 75) (based on LLVM 7.0.2)\n" - "Target: aarch64--linux-gnu\n" - "Thread model: posix\n" - "InstalledDir:\n" - "/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n", - "19.3.1", - ), - ], -) -def test_arm_version_detection(version_str, expected_version): - version = spack.compilers.arm.Arm.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - ("Cray C : Version 8.4.6 Mon Apr 15, 2019 12:13:39\n", "8.4.6"), - ("Cray C++ : Version 8.4.6 Mon Apr 15, 2019 12:13:45\n", "8.4.6"), - ("Cray clang Version 8.4.6 Mon Apr 15, 2019 12:13:45\n", "8.4.6"), - ("Cray Fortran : Version 8.4.6 Mon Apr 15, 2019 12:13:55\n", "8.4.6"), - ], -) -def test_cce_version_detection(version_str, expected_version): - version = spack.compilers.cce.Cce.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.regression("10191") -@pytest.mark.parametrize( - "version_str,expected_version", - [ - # macOS clang - ( - "Apple clang version 11.0.0 (clang-1100.0.33.8)\n" - "Target: x86_64-apple-darwin18.7.0\n" - "Thread model: posix\n" - "InstalledDir: " - "/Applications/Xcode.app/Contents/Developer/Toolchains/" - "XcodeDefault.xctoolchain/usr/bin\n", - "11.0.0", - ), - ( - "Apple LLVM version 7.0.2 (clang-700.1.81)\n" - "Target: x86_64-apple-darwin15.2.0\n" - "Thread model: posix\n", - "7.0.2", - ), - ], -) -def test_apple_clang_version_detection(version_str, expected_version): - cls = spack.compilers.class_for_compiler_name("apple-clang") - version = cls.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.regression("10191") -@pytest.mark.parametrize( - "version_str,expected_version", - [ - # LLVM Clang - ( - "clang version 6.0.1-svn334776-1~exp1~20181018152737.116 (branches/release_60)\n" - "Target: x86_64-pc-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /usr/bin\n", - "6.0.1", - ), - ( - "clang version 3.1 (trunk 149096)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n", - "3.1", - ), - ( - "clang version 8.0.0-3~ubuntu18.04.1 (tags/RELEASE_800/final)\n" - "Target: x86_64-pc-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /usr/bin\n", - "8.0.0", - ), - ( - "clang version 9.0.1-+201911131414230800840845a1eea-1~exp1~20191113231141.78\n" - "Target: x86_64-pc-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /usr/bin\n", - "9.0.1", - ), - ( - "clang version 8.0.0-3 (tags/RELEASE_800/final)\n" - "Target: aarch64-unknown-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /usr/bin\n", - "8.0.0", - ), - ( - "clang version 11.0.0\n" - "Target: aarch64-unknown-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /usr/bin\n", - "11.0.0", - ), - ], -) -def test_clang_version_detection(version_str, expected_version): - version = spack.compilers.clang.Clang.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - # C compiler - ( - "fcc (FCC) 4.0.0a 20190314\n" - "simulating gcc version 6.1\n" - "Copyright FUJITSU LIMITED 2019", - "4.0.0a", - ), - # C++ compiler - ( - "FCC (FCC) 4.0.0a 20190314\n" - "simulating gcc version 6.1\n" - "Copyright FUJITSU LIMITED 2019", - "4.0.0a", - ), - # Fortran compiler - ("frt (FRT) 4.0.0a 20190314\n" "Copyright FUJITSU LIMITED 2019", "4.0.0a"), - ], -) -def test_fj_version_detection(version_str, expected_version): - version = spack.compilers.fj.Fj.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - # Output of -dumpversion changed to return only major from GCC 7 - ("4.4.7\n", "4.4.7"), - ("7\n", "7"), - ], -) -def test_gcc_version_detection(version_str, expected_version): - version = spack.compilers.gcc.Gcc.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - ( - "icpc (ICC) 12.1.5 20120612\n" - "Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n", - "12.1.5", - ), - ( - "ifort (IFORT) 12.1.5 20120612\n" - "Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n", - "12.1.5", - ), - ], -) -def test_intel_version_detection(version_str, expected_version): - version = spack.compilers.intel.Intel.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - ( # ICX/ICPX - "Intel(R) oneAPI DPC++ Compiler 2021.1.2 (2020.10.0.1214)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /made/up/path", - "2021.1.2", - ), - ( # ICX/ICPX - "Intel(R) oneAPI DPC++ Compiler 2021.2.0 (2021.2.0.20210317)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /made/up/path", - "2021.2.0", - ), - ( # ICX/ICPX - "Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0 (2021.3.0.20210619)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /made/up/path", - "2021.3.0", - ), - ( # ICX/ICPX - "Intel(R) oneAPI DPC++/C++ Compiler 2021.4.0 (2021.4.0.20210924)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n" - "InstalledDir: /made/up/path", - "2021.4.0", - ), - ( # IFX - "ifx (IFORT) 2021.1.2 Beta 20201214\n" - "Copyright (C) 1985-2020 Intel Corporation. All rights reserved.", - "2021.1.2", - ), - ( # IFX - "ifx (IFORT) 2021.2.0 Beta 20210317\n" - "Copyright (C) 1985-2020 Intel Corporation. All rights reserved.", - "2021.2.0", - ), - ( # IFX - "ifx (IFORT) 2021.3.0 Beta 20210619\n" - "Copyright (C) 1985-2020 Intel Corporation. All rights reserved.", - "2021.3.0", - ), - ( # IFX - "ifx (IFORT) 2021.4.0 Beta 20210924\n" - "Copyright (C) 1985-2021 Intel Corporation. All rights reserved.", - "2021.4.0", - ), - ( # IFX - "ifx (IFORT) 2022.0.0 20211123\n" - "Copyright (C) 1985-2021 Intel Corporation. All rights reserved.", - "2022.0.0", - ), - ( # IFX - "ifx (IFX) 2023.1.0 20230320\n" - "Copyright (C) 1985-2023 Intel Corporation. All rights reserved.", - "2023.1.0", - ), - ], -) -def test_oneapi_version_detection(version_str, expected_version): - version = spack.compilers.oneapi.Oneapi.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - ( - "NAG Fortran Compiler Release 6.0(Hibiya) Build 1037\n" - "Product NPL6A60NA for x86-64 Linux\n", - "6.0.1037", - ) - ], -) -def test_nag_version_detection(version_str, expected_version): - version = spack.compilers.nag.Nag.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - # C compiler on x86-64 - ( - "nvc 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # C++ compiler on x86-64 - ( - "nvc++ 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # Fortran compiler on x86-64 - ( - "nvfortran 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # C compiler on Power - ( - "nvc 20.9-0 linuxpower target on Linuxpower\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # C++ compiler on Power - ( - "nvc++ 20.9-0 linuxpower target on Linuxpower\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # Fortran compiler on Power - ( - "nvfortran 20.9-0 linuxpower target on Linuxpower\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # C compiler on Arm - ( - "nvc 20.9-0 linuxarm64 target on aarch64 Linux\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # C++ compiler on Arm - ( - "nvc++ 20.9-0 linuxarm64 target on aarch64 Linux\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - # Fortran compiler on Arm - ( - "nvfortran 20.9-0 linuxarm64 target on aarch64 Linux\n" - "NVIDIA Compilers and Tools\n" - "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.", - "20.9", - ), - ], -) -def test_nvhpc_version_detection(version_str, expected_version): - version = spack.compilers.nvhpc.Nvhpc.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - # Output on x86-64 - ( - "pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge\n" - "The Portland Group - PGI Compilers and Tools\n" - "Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.\n", - "15.10", - ), - # Output on PowerPC - ( - "pgcc 17.4-0 linuxpower target on Linuxpower\n" - "PGI Compilers and Tools\n" - "Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.\n", - "17.4", - ), - # Output when LLVM-enabled - ( - "pgcc-llvm 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n" - "PGI Compilers and Tools\n" - "Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n", - "18.4", - ), - ], -) -def test_pgi_version_detection(version_str, expected_version): - version = spack.compilers.pgi.Pgi.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - ("IBM XL C/C++ for Linux, V11.1 (5724-X14)\n" "Version: 11.01.0000.0000\n", "11.1"), - ("IBM XL Fortran for Linux, V13.1 (5724-X16)\n" "Version: 13.01.0000.0000\n", "13.1"), - ("IBM XL C/C++ for AIX, V11.1 (5724-X13)\n" "Version: 11.01.0000.0009\n", "11.1"), - ( - "IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0\n" "Version: 09.00.0000.0017\n", - "9.0", - ), - ], -) -def test_xl_version_detection(version_str, expected_version): - version = spack.compilers.xl.Xl.extract_version_from_output(version_str) - assert version == expected_version - - version = spack.compilers.xl_r.XlR.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize( - "version_str,expected_version", - [ - # This applies to C,C++ and FORTRAN compiler - ( - "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)" - "(based on LLVM Mirror.Version.12.0.0)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n", - "3.1.0", - ), - ( - "AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#78 2020_12_10)" - "(based on LLVM Mirror.Version.12.0.0)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n", - "3.0.0", - ), - ( - "AMD clang version 11.0.0 (CLANG: AOCC_2.3.0-Build#85 2020_11_10)" - "(based on LLVM Mirror.Version.11.0.0)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n", - "2.3.0", - ), - ( - "AMD clang version 10.0.0 (CLANG: AOCC_2.2.0-Build#93 2020_06_25)" - "(based on LLVM Mirror.Version.10.0.0)\n" - "Target: x86_64-unknown-linux-gnu\n" - "Thread model: posix\n", - "2.2.0", - ), - ], -) -def test_aocc_version_detection(version_str, expected_version): - version = spack.compilers.aocc.Aocc.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.regression("33901") -@pytest.mark.parametrize( - "version_str", - [ - ( - "Apple clang version 11.0.0 (clang-1100.0.33.8)\n" - "Target: x86_64-apple-darwin18.7.0\n" - "Thread model: posix\n" - "InstalledDir: " - "/Applications/Xcode.app/Contents/Developer/Toolchains/" - "XcodeDefault.xctoolchain/usr/bin\n" - ), - ( - "Apple LLVM version 7.0.2 (clang-700.1.81)\n" - "Target: x86_64-apple-darwin15.2.0\n" - "Thread model: posix\n" - ), - ], -) -def test_apple_clang_not_detected_as_cce(version_str): - version = spack.compilers.cce.Cce.extract_version_from_output(version_str) - assert version == "unknown" diff --git a/lib/spack/spack/test/cray_manifest.py b/lib/spack/spack/test/cray_manifest.py index 3a00180da8dd0c..532261b3ee834e 100644 --- a/lib/spack/spack/test/cray_manifest.py +++ b/lib/spack/spack/test/cray_manifest.py @@ -16,6 +16,7 @@ import spack import spack.cmd +import spack.cmd.external import spack.compilers import spack.config import spack.cray_manifest as cray_manifest diff --git a/lib/spack/spack/test/installer.py b/lib/spack/spack/test/installer.py index 1af1fb1d90f39c..16d50221ea01cb 100644 --- a/lib/spack/spack/test/installer.py +++ b/lib/spack/spack/test/installer.py @@ -493,11 +493,13 @@ def fake_package_list(compiler, architecture, pkgs): def test_bootstrapping_compilers_with_different_names_from_spec( install_mockery, mutable_config, mock_fetch, archspec_host_is_spack_test_host ): + """Tests that, when we bootstrap '%oneapi' we can translate it to the + 'intel-oneapi-compilers' package. + """ with spack.config.override("config:install_missing_compilers", True): with spack.concretize.disable_compiler_existence_check(): spec = spack.spec.Spec("trivial-install-test-package%oneapi@=22.2.0").concretized() spec.package.do_install() - assert ( spack.spec.CompilerSpec("oneapi@=22.2.0") in spack.compilers.all_compiler_specs() ) @@ -749,29 +751,6 @@ def test_install_task_use_cache(install_mockery, monkeypatch): assert request.pkg_id in installer.installed -def test_install_task_add_compiler(install_mockery, monkeypatch, capfd): - config_msg = "mock add_compilers_to_config" - - def _add(_compilers): - tty.msg(config_msg) - - installer = create_installer(["pkg-a"], {}) - task = create_build_task(installer.build_requests[0].pkg) - task.compiler = True - - # Preclude any meaningful side-effects - monkeypatch.setattr(spack.package_base.PackageBase, "unit_test_check", _true) - monkeypatch.setattr(inst.PackageInstaller, "_setup_install_dir", _noop) - monkeypatch.setattr(spack.build_environment, "start_build_process", _noop) - monkeypatch.setattr(spack.database.Database, "add", _noop) - monkeypatch.setattr(spack.compilers, "add_compilers_to_config", _add) - - installer._install_task(task, None) - - out = capfd.readouterr()[0] - assert config_msg in out - - def test_release_lock_write_n_exception(install_mockery, tmpdir, capsys): """Test _release_lock for supposed write lock with exception.""" installer = create_installer(["trivial-install-test-package"], {}) diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index eba6b5a96d59be..079f021706d9c9 100644 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -752,7 +752,7 @@ _spack_compiler() { _spack_compiler_find() { if $list_options then - SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope" + SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope -j --jobs" else SPACK_COMPREPLY="" fi @@ -761,7 +761,7 @@ _spack_compiler_find() { _spack_compiler_add() { if $list_options then - SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope" + SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope -j --jobs" else SPACK_COMPREPLY="" fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 4a905d2ddd226b..6d891757c8524c 100644 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1059,7 +1059,7 @@ complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -f -a he complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -d 'show this help message and exit' # spack compiler find -set -g __fish_spack_optspecs_spack_compiler_find h/help mixed-toolchain no-mixed-toolchain scope= +set -g __fish_spack_optspecs_spack_compiler_find h/help mixed-toolchain no-mixed-toolchain scope= j/jobs= complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -d 'show this help message and exit' @@ -1069,9 +1069,11 @@ complete -c spack -n '__fish_spack_using_command compiler find' -l no-mixed-tool complete -c spack -n '__fish_spack_using_command compiler find' -l no-mixed-toolchain -d 'Do not allow mixed toolchains (for example: clang, clang++, gfortran)' complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -f -a '_builtin defaults system site user command_line' complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -d 'configuration scope to modify' +complete -c spack -n '__fish_spack_using_command compiler find' -s j -l jobs -r -f -a jobs +complete -c spack -n '__fish_spack_using_command compiler find' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack compiler add -set -g __fish_spack_optspecs_spack_compiler_add h/help mixed-toolchain no-mixed-toolchain scope= +set -g __fish_spack_optspecs_spack_compiler_add h/help mixed-toolchain no-mixed-toolchain scope= j/jobs= complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -d 'show this help message and exit' @@ -1081,6 +1083,8 @@ complete -c spack -n '__fish_spack_using_command compiler add' -l no-mixed-toolc complete -c spack -n '__fish_spack_using_command compiler add' -l no-mixed-toolchain -d 'Do not allow mixed toolchains (for example: clang, clang++, gfortran)' complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -f -a '_builtin defaults system site user command_line' complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -d 'configuration scope to modify' +complete -c spack -n '__fish_spack_using_command compiler add' -s j -l jobs -r -f -a jobs +complete -c spack -n '__fish_spack_using_command compiler add' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack compiler remove set -g __fish_spack_optspecs_spack_compiler_remove h/help a/all scope= diff --git a/var/spack/repos/builtin.mock/packages/gcc/package.py b/var/spack/repos/builtin.mock/packages/gcc/package.py index 05518419ddb29f..fa2b0309ff1ea0 100644 --- a/var/spack/repos/builtin.mock/packages/gcc/package.py +++ b/var/spack/repos/builtin.mock/packages/gcc/package.py @@ -16,11 +16,23 @@ class Gcc(CompilerPackage, Package): version("2.0", md5="abcdef0123456789abcdef0123456789") version("3.0", md5="def0123456789abcdef0123456789abc") + variant( + "languages", + default="c,c++,fortran", + values=("c", "c++", "fortran"), + multi=True, + description="Compilers and runtime libraries to build", + ) + depends_on("conflict", when="@3.0") c_names = ["gcc"] cxx_names = ["g++"] fortran_names = ["gfortran"] + compiler_prefixes = [r"\w+-\w+-\w+-"] + compiler_suffixes = [r"-mp-\d+(?:\.\d+)?", r"-\d+(?:\.\d+)?", r"\d\d"] + compiler_version_regex = r"(? Date: Thu, 22 Aug 2024 13:13:21 +0200 Subject: [PATCH 434/435] geomodel: fix bug in cmake_args (#45869) --- .../repos/builtin/packages/geomodel/package.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/geomodel/package.py b/var/spack/repos/builtin/packages/geomodel/package.py index 2fc531fbf870ed..43f81110c54477 100644 --- a/var/spack/repos/builtin/packages/geomodel/package.py +++ b/var/spack/repos/builtin/packages/geomodel/package.py @@ -71,16 +71,12 @@ class Geomodel(CMakePackage): depends_on("opengl") def cmake_args(self): - def cmake_variant(cmake_label, spack_variant): - enabled = spec.satisfies("+" + spack_variant) - return f"-DGEOMODEL_BUILD_{cmake_label}={enabled}" - args = [ - cmake_variant("VISUALIZATION", "visualization"), - cmake_variant("GEOMODELG4", "geomodelg4"), - cmake_variant("FULLSIMLIGHT", "fullsimlight"), - cmake_variant("FSL", "fsl"), - cmake_variant("EXAMPLES", "examples"), - cmake_variant("TOOLS", "tools"), + self.define_from_variant("GEOMODEL_BUILD_VISUALIZATION", "visualization"), + self.define_from_variant("GEOMODEL_BUILD_GEOMODELG4", "geomodelg4"), + self.define_from_variant("GEOMODEL_BUILD_FULLSIMLIGHT", "fullsimlight"), + self.define_from_variant("GEOMODEL_BUILD_FSL", "fsl"), + self.define_from_variant("GEOMODEL_BUILD_EXAMPLES", "examples"), + self.define_from_variant("GEOMODEL_BUILD_TOOLS", "tools"), ] return args From 8e1bd9a40375196972a03530c01be1302693cb2b Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Thu, 22 Aug 2024 15:14:09 +0200 Subject: [PATCH 435/435] root: remove +webgui~http conflict version clause (#45856) * root: set +webgui~http conflict from @6.28.12: Currently, the ROOT spec correctly identifies a conflict between +webgui and ~http, but this conflict is marked as affecting @6.29.00: only. As a matter of fact, ROOT 6.28.12 is also affected. This commit, therefore, updates the when clause on the conflict to @6.28.12:. * Remove when clause entirely * oops --- var/spack/repos/builtin/packages/root/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index aec5af27372aef..096aa269bb1d9a 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -423,7 +423,7 @@ class Root(CMakePackage): conflicts("+tmva-gpu", when="~cuda", msg="root+tmva-gpu requires CUDA") conflicts("+tmva-pymva", when="~tmva", msg="root+tmva-pymva requires TMVA") conflicts("+tmva-sofie", when="~tmva", msg="root+tmva-sofie requires TMVA") - conflicts("~http", when="@6.29.00: +webgui", msg="root+webgui requires HTTP") + conflicts("~http", when="+webgui", msg="root+webgui requires HTTP") conflicts("cxxstd=11", when="+root7", msg="root7 requires at least C++14") conflicts("cxxstd=11", when="@6.25.02:", msg="This version of root requires at least C++14") conflicts("cxxstd=14", when="@6.30.00:", msg="This version of root requires at least C++17")