Compare commits

...

390 Commits

Author SHA1 Message Date
Harmen Stoppels
f7fc421283 fix 2025-01-08 18:23:40 +01:00
Harmen Stoppels
7e31e4a4a6 fix docs 2025-01-08 14:03:23 +01:00
Harmen Stoppels
98db2b9e76 jsonschema.exceptions 2025-01-08 13:51:40 +01:00
Harmen Stoppels
b68c331bac config: report file:line of deprecated config items 2025-01-08 13:17:18 +01:00
eugeneswalker
25ce6cce47 e4s cray rhel ci stack: re-enable and update for new cpe (#47697)
* e4s cray rhel ci stack: re-enable and update for new cpe, should fix cray libsci issue

* only run e4s-cray-rhel stack

* Mkae Autotools build_system point at correct build_directory

* remove selective enable of cray-rhel stacks

* restore SPACK_CI_DISABLE_STACKS

* use dot prefix to hide cray-sles jobs instead of comment-out

---------

Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
2025-01-07 08:56:10 -08:00
eugeneswalker
418a9194e7 util-linux: add missing include for errno.h (#48433) 2025-01-07 08:48:25 -08:00
Seth R. Johnson
d16a578242 geant4: fix 10.7 build with c++20 (#48347) 2025-01-07 16:14:18 +01:00
Wouter Deconinck
aee2f5cf41 hep stack: add celeritas (#48404) 2025-01-07 09:47:17 -05:00
Harmen Stoppels
ca8ea63796 compiler.py: deal with temporarily broken compiler (#48418)
When a compiler is temporarily broken, we cache `c_compiler_output:`
`null`. This commit ensures we retry to obtain the `c_compiler_output`.
2025-01-07 09:56:05 +01:00
Paul Gessinger
3b21ff109f edm4hep: Add lower clang version bounds (#48419)
* edm4hep: Add lower clang version bounds

EDM4hep 0.99.1 introduced usage of consteval. While this is technically
supported in clang versions below 17, the implementation seems to be
incomplete and fail compilation of EDM4hep 0.99.1 and up.

* Update var/spack/repos/builtin/packages/edm4hep/package.py

Co-authored-by: Thomas Madlener <thomas.madlener@desy.de>

---------

Co-authored-by: Thomas Madlener <thomas.madlener@desy.de>
2025-01-06 22:14:50 -06:00
Gerry Knapp
d503f03473 additivefoam: update build scripts for @main (#48223) 2025-01-06 18:32:09 -08:00
Sinan
770d2fe4d7 libxml2: add version 2.13.5 and variant http (#48124)
* package/libxml2 add version 2.13.5

* add http variant

* Update var/spack/repos/builtin/packages/libxml2/package.py

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* Update var/spack/repos/builtin/packages/libxml2/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

---------

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2025-01-06 18:01:19 -08:00
Wouter Deconinck
fcc35b70bb py-six: add v1.17.0 (#48401) 2025-01-06 17:11:16 -08:00
Wouter Deconinck
074387b29c wayland: add v1.23.0, v1.23.1; wayland-protocols: add v1.38, v1.39 (#48403)
* wayland-protocols: add v1.38, v1.39

* wayland: add v1.23.0, v1.23.1
2025-01-06 17:09:54 -08:00
Adam J. Stewart
4d26b93070 XNNPACK: add new versions, pin resources (#48405) 2025-01-06 17:07:02 -08:00
Wouter Deconinck
9d15a006f8 py-rucio-clients: add through v36.0.0.post2 (#48407)
* py-rucio-clients: add through v36.0.0.post2

* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2025-01-06 17:01:24 -08:00
Wouter Deconinck
7e69650806 py-deepdiff: add through v8.1.1 (#48410)
* py-deepdiff: add through v8.1.1
* py-orderly-set: new package
* py-orderly-set: add v5.2.1, v5.2.2 to satisfy audit
2025-01-06 15:14:26 -08:00
G-Ragghianti
142469f92e Fixing description (#48429) 2025-01-06 14:57:03 -08:00
Wouter Deconinck
cb6cb023d2 py-click: add v8.1.8 (switch to flit-core) (#48422) 2025-01-06 13:50:15 -08:00
Olivier Cessenat
920614a799 hevea: add v2.36 (#48273) 2025-01-06 12:57:29 -07:00
rfbgo
5be40f1a5a py-espresso: add v4.1.0 -> v4.2.2 (#47864)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-01-06 20:44:23 +01:00
Lehman Garrison
aa0ab3b38b py-py-spy: add 0.4.0, and make rust & CargoPackage respect -j (#47883)
* py-py-spy: add 0.4.0

* py-py-spy: port from Package to CargoPackage

* CargoPackage: respect make_jobs

* rust: respect make_jobs during build and install

* spack style

* CargoBuilder: fix make_jobs syntax

* CargoBuilder: don't write to $HOME, use stage dir
2025-01-06 12:14:19 -07:00
Massimiliano Culpo
85c125a0f5 Remove spack.config.add_default_platform_scope (#48425)
This function is used only in tests, and pushes a scope to the
current global CONFIG, when on Windows, regardless of what that
CONFIG is.
2025-01-06 20:06:02 +01:00
Krishna Chilleri
2842c6d191 py-typer: add version 0.5.0 (#48285) 2025-01-06 18:08:27 +01:00
Wouter Deconinck
e8309b16fc thepeg: restrict rivet versions; evtgen: new variant sherpa (#48264)
* thepeg: restrict to rivet@:3 when @:2.2

* evtgen: new variant sherpa

* herwig3: require at least one external EvtGen component

* evtgen: fix typo

* evtgen: rm deprecated 01.* and autotools build system

* thepeg: fix typo

* herwig3: fix conflicts ^evtgen
2025-01-06 09:27:48 -07:00
dmagdavector
4dd55e1b67 podman: add v4.6.2, 4.7.2, 4.8.3, 4.9.3 (#48112) 2025-01-06 10:42:18 -05:00
Wouter Deconinck
227fa1a482 gh: check_args needs ./... and some skipped tests (#48408) 2025-01-06 10:40:30 -05:00
Thomas Madlener
ee47d877ff rivet, yoda: Add new versions with back-port fixes (#48141)
* rivet: add version 3.1.11 with some back-port fixes

Some back-ported fixes from the 4.x series. Most importantly the
possibility to build against HepMC 3.3.0.

* yoda: Add version 1.9.11

* Add a conflict with hepmc=2

* Unify hepmc@3.3.0 conflicts into one statement

* Remove conflict and update conditional hepmc variant

* Use caret to signify conflict with dependency

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* Make conflict and msg more specific

* Add dedicated version dependency to yoda

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-01-06 08:32:52 -06:00
Harmen Stoppels
4b4be2e2c2 cmd/__init__.py: pass tests in case n=1 (#48417) 2025-01-06 15:30:29 +01:00
Valentin Volkl
0e6e61b32f alpgen: update website (#48415) 2025-01-06 08:07:26 -06:00
Harmen Stoppels
79027884c7 Add spack API warning with file/line (#48416) 2025-01-06 03:43:04 -07:00
Olivier Cessenat
beadf06caa ocamlbuild: add v0.14.1 -> v0.15.0 (#48272) 2025-01-06 08:36:16 +01:00
Niclas Jansson
fc24be5c2b neko: add v0.9.1 and deprecate old versions (#48306) 2025-01-06 07:57:14 +01:00
Tim Fuller
8d5ece07d1 Update openmpi/package.py to allow for non-standard cxx name (#48168)
Allows user to define an alternative name for `mpic++` in `packages:openmpi:package_attributes:cxxname`.
2025-01-05 03:22:57 -07:00
Wouter Deconinck
cf06b395b7 snakemake: skip_modules snakemake.common.tests (#48395) 2025-01-04 23:19:50 +01:00
Seth R. Johnson
fd51f1ce65 RCCL: only build tests when requested (#48387) 2025-01-04 09:46:15 -05:00
Matt Thompson
0576ef081a mapl: add v2.51.2 (#48220) 2025-01-04 13:49:00 +01:00
Dom Heinzeller
20a8ba77b0 ectrans: add conflict for versions 1.5.x with oneapi@2025: (#48238) 2025-01-04 13:44:10 +01:00
Kacper Kornet
9b4c5d1c55 python: add v3.13.1 and v3.12.8 (#48356) 2025-01-04 13:42:12 +01:00
Harmen Stoppels
6622f7a89c Revert "CI: Move the build stage to the project root instead of tmp (#47996)" (#48397)
This reverts commit ef615bcc7e.
2025-01-04 11:59:22 +01:00
Cody Balos
d463b172a6 sundials: add v7.2.1 (#48248) 2025-01-04 11:09:04 +01:00
Adam J. Stewart
ab6fa2680f py-lightning: add v2.5.0 (#48249) 2025-01-04 11:07:43 +01:00
Wouter Deconinck
d7559c8caf qt: add v5.15.16 (#48147) 2025-01-04 11:02:26 +01:00
Wouter Deconinck
bd1fedcc18 jsoncpp: add v1.9.6 (#48263) 2025-01-04 11:02:03 +01:00
Adam J. Stewart
9254ef5b3f py-torchgeo: add v0.6.2 (#48230) 2025-01-04 11:00:33 +01:00
Olivier Cessenat
39ad98a359 ocaml: new v4.14.2, and v5.2.1 (#48271) 2025-01-04 10:50:45 +01:00
Wouter Deconinck
9d07efa0dc gobject-introspection: patch to import setuptools before distutils (#47879) 2025-01-04 10:49:25 +01:00
Olivier Cessenat
de2caf956d latex2html: add v2024.2 (#48282) 2025-01-04 10:48:10 +01:00
Wouter Deconinck
6b296fe8ad go: add v1.23.4 (#48335)
* go: add v1.23.4

* Update copyright for new year

---------

Co-authored-by: Alec Scott <hi@alecbcs.com>
2025-01-04 02:42:52 -07:00
Teague Sterling
9cccdc5424 xkeyboard-config: add xkbdata provider (#45571)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2025-01-04 10:39:45 +01:00
Wouter Deconinck
b4f048cc14 nlopt: add v2.9.1 (supports python@3.13) (#48309) 2025-01-04 10:29:31 +01:00
Wouter Deconinck
5fd15dc541 R: ensure Makeconf has full libs directories (#48323) 2025-01-04 10:28:46 +01:00
Wouter Deconinck
0471af4c16 gsoap: depends_on autoconf etc type build (#48247) 2025-01-04 10:27:00 +01:00
archiepowell-linaro
fb1a509964 linaro-forge: add v24.1.1 (#48241) 2025-01-04 10:21:22 +01:00
Wouter Deconinck
4f00d7cc9b gettext: add v0.23.1 (#48348) 2025-01-04 10:19:40 +01:00
Wouter Deconinck
91726147ae pkgconf: add v2.3.0 (#48346) 2025-01-04 10:18:28 +01:00
Wouter Deconinck
7998d8ed52 readline: 12 more upstream patches (#48343) 2025-01-04 10:17:28 +01:00
Wouter Deconinck
1061db7c8c apptainer: add v1.3.5, v1.3.6 (#48330) 2025-01-04 10:16:14 +01:00
Wouter Deconinck
39f38d3f28 bash: add patches 27 to 37 (#48349) 2025-01-04 10:15:50 +01:00
Adam J. Stewart
173dcd6be8 py-earthengine-api: add v1.4.3 (#48340) 2025-01-04 10:14:28 +01:00
Adam J. Stewart
de2be4d999 google-cloud-cli: add v504.0.1, document Python version support (#48339)
Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2025-01-04 10:14:05 +01:00
Niklas Bölter
619a0a8d81 lammps: added extra-command package introduced in @20240829 (#48355)
d61c94c0f3
2025-01-04 10:10:08 +01:00
Alec Scott
598abf0bef typos: new package (#48368) 2025-01-04 10:09:03 +01:00
Wouter Deconinck
99a63fdff2 tcsh: add v6.24.10, v6.24.14 (#48367) 2025-01-04 10:08:29 +01:00
Vanessasaurus
64773932b2 flux-security: add 0.13.0(#48345)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2025-01-04 10:05:13 +01:00
Vanessasaurus
bc4b5dd62e flux-sched: v0.40.0 (#48344)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2025-01-04 10:04:31 +01:00
Wouter Deconinck
0652b01eca zlib-ng: add v2.2.2, v2.2.3 (#48177) 2025-01-04 10:03:29 +01:00
Wouter Deconinck
6053fc9b6e pmix: add v5.0.4, v5.0.5 (#48333) 2025-01-04 10:02:12 +01:00
Alec Scott
7c9582a172 curl: add v8.11.1 (#48369) 2025-01-04 10:00:56 +01:00
Alec Scott
2ffa63470c fzf: add v0.57.0 (#48370) 2025-01-04 09:59:13 +01:00
Wouter Deconinck
7bf7292a87 py-particle: add v0.25.[0-2] (#48371) 2025-01-04 09:58:47 +01:00
Alec Scott
ef55fe7f4b glab: add v1.51.0 (#48372) 2025-01-04 09:58:07 +01:00
Alec Scott
6e8fe490e0 goimports: add v0.28.0 (#48375) 2025-01-04 09:56:57 +01:00
Alec Scott
450e56f207 gopls: add v0.17.1 (#48376) 2025-01-04 09:56:20 +01:00
Alec Scott
d33616c291 hugo: add v0.140.2 (#48377) 2025-01-04 09:51:58 +01:00
Adam J. Stewart
4a37bb38ce py-pillow: add v11.1.0 (#48354) 2025-01-04 09:39:33 +01:00
Alec Scott
6f2d07e99a kubectl: add v1.32.0 (#48378) 2025-01-04 09:38:39 +01:00
Alec Scott
8f415cd2b5 kubernetes: add v1.32.0 (#48379) 2025-01-04 09:37:53 +01:00
Alec Scott
e3d3e79037 py-python-lsp-server: add v1.11.0 (#48380) 2025-01-04 09:37:12 +01:00
Alec Scott
dbd290d1ac rust: add v1.83.0 (#48381) 2025-01-04 09:36:15 +01:00
Krishna Chilleri
e6bb795bcc py-apscheduler: add v3.6.3 (#48279) 2025-01-04 09:33:41 +01:00
Wouter Deconinck
ab6fa2f6d3 cfitsio: add v4.4.1, v4.5.0; variant +fortran (#48388) 2025-01-04 09:21:49 +01:00
Wouter Deconinck
8fe3fe4918 heppdt: patch for broken test (#48390) 2025-01-04 09:10:45 +01:00
Adam J. Stewart
cb770eb8e3 py-scipy: add v1.15.0 (#48393) 2025-01-04 09:04:53 +01:00
Adam J. Stewart
0a03a92e78 Avoid trailing slashes in strings (#48359) 2025-01-03 23:00:18 +01:00
Satish Balay
7f9019c1ca kokkos and kokkos-kernels - add v4.5.01 (#48363)
trilinos@develop: update kokkos dependency
2025-01-03 15:56:23 -06:00
Wouter Deconinck
1b9d001f6a feat: add HEP cloud_pipeline stack (#40932)
* dd4hep: depends_on root +root7 in some cases

* dd4hep: avoid self-referential whens -> conflicts

* feat: add HEP cloud_pipeline stack

* [hep] add hep jobs to .gitlab-ci.yml

* [hep] rm hep-generate image override

* [hep] fix root variants; add some more packages

* [hep] disable hep-build for now

* [hep] hepmc3 +interfaces

* [hep] hep-generate on gcc-11.4 runner image

* [hep] sherpa -blackhat

* [hep] align package requirements to e4s for more cache hits

* [hep] lcio -examples due to conflicts

* [hep] marks geant4-data as external

* [hep] enable build

* [hep] elfutils now always has bzip2 xz dependency

* [hep] avoid gaudi ^gdb@8.1 with explicit version gdb@14.1

* [hep] geant4 -vtk for now

* [hep] root ~oracle

* [hep] external geant4-data@11.2.0

* [hep] sherap ~python

* [hep] gaudi ^gdb +python to avoid failing gdb@8.1

* [hep] pythia8 ~madgraph5amc

* [hep] remove garfieldpp which fails to download

* [hep] sherpa ~recola because recola needs pic variant

* [hep] sherpa ~rivet since conflicts("cxxstd=11", when="~rivet")

* [hep] unify: when_possible

* [hep] thepeg ~rivet

* [hep] root ~shadow

* [hep] lcio ~jar

* [hep] root ~postgres

* [hep] herwig3 ~evtgen

* [hep] herwig3 has no evtgen variant

* [hep] no image override in hep-generate

* [hep] re-add ubuntu-22.04 image for newer gcc than 7

* [hep] remove herwig3

* [hep] remove package configs

* [hep] avoid non-existent variants in latest versions

* [hep] allow for sherpa@3:

* [hep] acts cxxstd=20

* [hep] gaudi ^gdb +python

* [hep] gaudi ^gdb +debuginfod

* [hep] add some packages to large and huge kubernetes groups

* [hep] root +rpath

* [hep] add qt-declarative to large 8core 8GB CI group

* [hep] add sherpa to 8 core, 3 GB CI medium group

* [hep] add root to 12 core, 19 GB huge CI group

* [hep] gaudi: touch pytest.ini

* [hep] ~ instead of -

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>

---------

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2025-01-03 12:22:53 -07:00
Arash Partow
a52d817fa0 exprtk: add new package (#48326) 2025-01-03 12:48:05 -06:00
David Huber
ec286e857f Disable py-numpy AVX512 instructions when compiled with Intel (#47941)
* Disable numpy AVX512 when compiled with Intel classic

* Add py-numpy v1.26.5

* Add patch to handle AVX512 conversions

* Remove unneeded patch.

* Remove unnecessary tag

* Move blas_config_settings to config_settings

* Cleaned up blas settings
2025-01-03 11:27:59 -07:00
Andrey Alekseenko
690a6045a9 gromacs: remove dependency on Fortran (#48386)
* gromacs: remove dependency on Fortran

Fortran was removed from GROMACS core since 4.6. There are a few contrib
files around, but they are not built anyway.

Also fix a couple typos.

* [@spackbot] updating style on behalf of al42and

---------

Co-authored-by: al42and <al42and@users.noreply.github.com>
2025-01-03 07:58:22 -07:00
Harmen Stoppels
0a070512e6 tests: remove file requirement (#48362) 2025-01-03 15:49:06 +01:00
Wouter Deconinck
cb37f973d9 xxhash: add v0.8.3 (#48382) 2025-01-03 09:36:04 -05:00
Wouter Deconinck
33740c8d24 fuse-overlayfs: add v1.14 (#48331) 2025-01-03 13:07:10 +01:00
Wouter Deconinck
e374f8fb66 build_environment: only traverse unique edges (#48301)
Wrap EnvironmentVisitor in CoverEdgesVisitor so only unique edges are enqueued.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2025-01-03 12:17:26 +01:00
Krishna Chilleri
0394def68b py-uvicorn: add v0.27.1 (#48287)
* py-uvicorn: add version 0.27.1

* add required py-typing-extensions dependency
2025-01-02 22:13:19 -07:00
Seth R. Johnson
0782097775 geant4: fix bad patch for 10.x (#48332) 2025-01-02 15:27:40 -07:00
eugeneswalker
460bc82632 e4s ci: cleanup; see if failures have been fixed (#48137)
* e4s ci: cleanup; see if failures have been fixed

* comment out dealii+cuda cuda_arch=90 due to cuda@12 conflict

* paraview unpin @5.11

* disable paraview cuda90

* ecp-dav ~paraview cuda90

* disable lbann gfx90a

* disable upcxx +cuda

* comment out nek5000 and lammps +cuda

* comment out failed specs

* comment out slepc+rocm

* comment out failures

* comment out failures

* comment out failing paraview buids;

* comment out petsc+rocm

* sort specs
2025-01-02 13:27:40 -08:00
Massimiliano Culpo
880eb36a1f charliecloud: disable libsquashfuse when ~squashfuse (#48317) 2025-01-02 21:45:26 +01:00
Massimiliano Culpo
1f3b4e116f Add a C dependency to hipblaslt, and rocthrust (#48320) 2025-01-02 21:44:40 +01:00
Vicente Bolea
9b8835ba79 paraview: add v5.13.2 (#48324) 2025-01-02 10:55:26 -06:00
Kacper Kornet
fb1d4f8907 zoltan: Fix buliding with gcc@14 and ifx. (#48358)
* zoltan: Ignore errors about incompatible pointer type with gcc@14

In gcc 14 -Werror=incompatible-pointer-types is now the default.
Silence it until it gets fixed in zoltan upstream.

* zoltan: Fix linking error when built with ifx
2025-01-02 11:54:06 -05:00
Todd Gamblin
f635337af8 Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
Wouter Deconinck
8f145f5e8e node-js: always depend on some python, regardless of lower/upper limits (#48350) 2025-01-02 03:00:09 -08:00
Alec Scott
022ae8503a oxide-rs: new-package 2025-01-02 01:17:37 -08:00
Alberto Invernizzi
3c64821c64 node-js: less strict python requirement for newer versions of node-js (#47942)
* less strict python requirement for newer versions of node-js

* fix style

* add back constraints for deprecated versions

* Update var/spack/repos/builtin/packages/node-js/package.py

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* Update var/spack/repos/builtin/packages/node-js/package.py

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* remove "v" from versions in some constraints

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-01-01 16:15:17 -06:00
Alec Scott
866785bd74 py-jedi: fix python dependency constraints (#48322) 2024-12-31 20:56:53 -06:00
Buldram
60d321012e nim: add 2.0.14 (#48284)
https://nim-lang.org/blog/2024/12/24/nim-2014-released.html
2024-12-31 11:24:24 -05:00
Matt Thompson
8ee5cf4b31 mepo: add v2.2.0 (#48283) 2024-12-31 11:22:53 -05:00
Krishna Chilleri
d2a2ae3699 py-tomlkit: add version 0.11.8 (#48286) 2024-12-31 11:21:35 -05:00
Adam J. Stewart
547e324ee5 py-jsonargparse: add v4.35.0 (#48314) 2024-12-31 11:06:24 -05:00
Adam J. Stewart
693c74324a py-torchmetrics: add v1.6.1 (#48297) 2024-12-31 11:04:31 -05:00
Asa
dcf710a32d Add version 0.2.0 to py-olcf-velocity (#48311) 2024-12-31 10:47:51 -05:00
Massimiliano Culpo
38276d13c2 Add a C dependency to a few cargo packages (#48319)
* fd: add a dependency on C

See https://gitlab.spack.io/spack/spack/-/jobs/14424172

* lsd: add a dependency on C

See https://gitlab.spack.io/spack/spack/-/jobs/14424171

* ripgrep: add a dependency on C

See https://gitlab.spack.io/spack/spack/-/jobs/14424170

* eza: add a dependency on C

See https://gitlab.spack.io/spack/spack/-/jobs/14424168

* hyperfine: add a dependency on C

See https://gitlab.spack.io/spack/spack/-/jobs/14424167
2024-12-31 10:05:49 -05:00
Massimiliano Culpo
611b0f19b3 gnutls: add v3.8.4, fixed issue with non rpathed zstd (#48321)
See https://gitlab.spack.io/spack/spack/-/jobs/14427936
2024-12-31 10:04:19 -05:00
Tara Drwenski
337d9bebf8 Camp: Fix syntax error (#48269)
* Fix camp syntax error by providing first archs element instead of tuple

* Provide all architectures as semicolon separated list
2024-12-30 15:04:10 -08:00
Massimiliano Culpo
71512f5682 mpich: gather in a single place env modifications needed by mpich derivatives (#48276)
* mpich: gather in a single place env modifications needed by mpich derivatives

MPICH, and its derivatives, share a lot of copy/paste code to setup the
environment during the different stages of the package life-cycle.

This commit gathers the common modifications in a single place (a mixin class),
living in the Mpich package, and makes derivatives import, and reuse, it.

* Fix docs for Python < 3.13
2024-12-30 15:42:16 -07:00
Xuefeng Ding
a7373b8a31 gcc: fix typo in setup_run_environment condition (#48307) 2024-12-30 13:47:54 +01:00
Satish Balay
05de2b1ba1 petsc: fix compilers listed in pkgconfig/petsc.pc (#48201)
* petsc: fix compilers listed in pkgconfig/petsc.pc

* Also fix reconfigure*.py
2024-12-27 22:09:00 -06:00
Chris Marsh
f57d7fb952 gsl: update patch for 2.8
The 2.7 patch does not apply on gsl@2.8.
This is a manual fix of the 2.6 patch to update it to clealy apply to gsl@2.8
2024-12-28 00:49:03 +01:00
Karol Krizka
e76f8fda2d openloops: use cmodel small on aarch64 instead of large (#48299) 2024-12-27 09:07:54 -07:00
Juan Miguel Carceller
66a00fe103 freeglut: add v3.6.0 (#48292)
* freeglut: add v3.6.0

* Change the version range for the patch

---------

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-12-26 09:07:50 -07:00
dependabot[bot]
15124d7c73 build(deps): bump urllib3 from 2.2.3 to 2.3.0 in /lib/spack/docs (#48278)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.3 to 2.3.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.2.3...2.3.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-26 09:03:38 -07:00
Karol Krizka
a14f10e882 openloops: Fix configuration of cmodel setting for gfortran (#48288)
* openloops: Add cmodel to user config file to override setting added in 2.1.2.

* openloops: Change cmodel from small to large following author recommendation.
2024-12-26 08:44:08 -06:00
Joseph Wang
16d3de4540 opendatadetector: fix attribute for libs (#48290) 2024-12-26 08:35:04 -06:00
psakievich
78bd905fe0 Ensure command_line scope is always last (#48255) 2024-12-25 14:32:31 -07:00
Harmen Stoppels
e9cdcc4af0 build caches: collect files to relocate while tarballing w/o file (#48212)
A few changes to tarball creation (for build caches):
- do not run file to distinguish binary from text
- file is slow, even when running it in a batched fashion -- it usually reads all bytes and has slow logic to categorize specific types
- we don't need a highly detailed file categorization; a crude categorization of elf, mach-o, text suffices.
detecting elf and mach-o is straightforward and cheap
- detecting utf-8 (and with that ascii) is highly accurate: false positive rate decays exponentially as file size increases. Further it's not only the most common encoding, but the most common file type in package prefixes.
iso-8859-1 is cheaply (but heuristically) detected too, and sufficiently accurate after binaries and utf-8 files are classified earlier
- remove file as a dependency of Spack in general, which makes Spack itself easier to install
- detect file type and need to relocate as part of creating the tarball, which is more cache friendly and thus faster
2024-12-24 10:53:13 -07:00
Massimiliano Culpo
aca469b329 mpi: remove setting unused monkey patched variable (#48275)
mpicxx_shared_libraries seems a relic of #1550, and is
not currently used by any builtin package.

Thus, cleanup the recipes, and avoid monkey-patching
spec objects.
2024-12-24 14:29:53 +01:00
Wouter Deconinck
c65a0e03c4 doc: ensure getting_started has bootstrap list output in correct place (#48281) 2024-12-24 04:48:02 -07:00
Wouter Deconinck
b02340724d gaudi: Fix nonexistent 'libs' (#48274) 2024-12-23 12:57:42 -07:00
Philipp Edelmann
250de0cdf2 fix spack external find for Python >= 3.13 (#48170)
Python >= 3.13 does not have the crypt variant anymore. Still no matter
if the test for crypt succeeds (which it can on Fedora providing its own
crypt module for Python 3.13) or fails, it will add +crypt or ~crypt,
which both fail because the variant only exists until Python 3.12.

Co-authored-by: Richard Berger <rberger@lanl.gov>
2024-12-23 10:56:13 -08:00
Carson Woods
da97e9eaa7 py-fitter: add v1.5.2, v1.6.0 (#41035) 2024-12-23 18:29:14 +01:00
Massimiliano Culpo
a3322459fe bootstrap mirror: fix references from v0.4 to v0.6 (#48235) 2024-12-23 14:06:48 +01:00
Olivier Cessenat
88d5393570 silo: variant python needs python (#48257)
* silo: variant python needs python

* Dependency to Python did not resolve the "Python.h" header not being found

Added the -I path to Python header to the compiler.
Having silo depend on python was not sufficient to get the path to python.
Maybe there is a smarter way to do that, but this one works.

* Update var/spack/repos/builtin/packages/silo/package.py

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* Update var/spack/repos/builtin/packages/silo/package.py

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* Update var/spack/repos/builtin/packages/silo/package.py

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-12-22 19:13:23 -06:00
Thomas Madlener
d1d61820f4 herwig, thepeg: Add latest version and specify rivet dependencies better (#48142)
* thepeg: Correctly specify rivet version for dependency

* herwig3: Add latest version 7.3.0

* thepeg: Make sure to have consistent hepmc version

rivet and thepeg need to have the same hepmc version otherwise things
will not compile
2024-12-22 15:36:14 -06:00
prakash
858c7ca1a2 Updates to AMR-Wind: adding new releases and an option to enable new spec option (#48229) 2024-12-22 10:25:53 -07:00
Elliott Slaughter
5b1394f1cf legion: Add 24.12.0. (#48221) 2024-12-21 20:00:25 -07:00
Christophe Prud'homme
9554f8802b libzip: links with external libs found on host and new version (#47230)
* libzip links with external libs found on host feelpp/spack#6

* add maintainers

* fix style

* use multi-build system

/cc @wdconinc

* fix style

* rm space and rename variant bz2 to bzip2

/cc @wdconinc

* fix variant name for bzip2

* zstd is supported in libzip@:1.8

* fix style

* fix style

* fix style

* rm deprecated version and versions that cannot be found easily

use only cmake from now on

* fix style

* fix style

* use variant when option for zstd

* Update var/spack/repos/builtin/packages/libzip/package.py

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* fix style

/cc @wdconinc

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-12-21 19:22:50 -06:00
Kyle Knoepfel
b78c517582 Support oneTBB 2021.13.0 and 2022.0.0 (#48239) 2024-12-20 23:32:58 -07:00
Dom Heinzeller
aaf0319731 Add conflict for py-scipy@1.14: with Intel Classic (#48251) 2024-12-20 23:23:27 -07:00
Paul Gessinger
21d5fd6ec1 dd4hep: Fix faulty package configuration (#48236) 2024-12-20 21:34:25 -07:00
Mike VanDenburgh
d6f71a2afd Fix import error in CI log aggregation script (#48245)
Fix CI log aggregation script failing due to an import error.
2024-12-20 16:14:17 -07:00
Rocco Meli
2edbed3a9d dla-future: add v0.7.3, deprecate v0.7.0 and v0.7.1 (#48215)
* dla-future: add v0.7.2, deprecate v0.7.0 and v0.7.1

* update
2024-12-20 08:08:01 -07:00
Zack Galbreath
e0035bd658 ci: request 35G of memory for building composable-kernel (#48227)
This number was determined from the max memory usage recently recorded
for this package in our analytics database.
2024-12-20 06:53:15 -07:00
Massimiliano Culpo
64207e8fe8 Use Ubuntu 22.04 to run unit tests against Python 3.7 (#48233) 2024-12-20 10:02:02 +01:00
Harmen Stoppels
fdc85572f3 import-check: bump and simplify (#48222) 2024-12-20 09:39:42 +01:00
eugeneswalker
75162be4b6 ci: add developer-tools-aarch64-linux-gnu stack (#48217) 2024-12-20 09:24:10 +01:00
Todd Gamblin
adbbb91b41 Make unit tests work on ubuntu 24.04 (#48151)
`kcov` was removed in Ubuntu 24.04, and it is no longer
installable via `apt` in our CI images. Instal it via
Linuxbrew instead, at least until it comes back to Ubuntu.

`subversion` is also not installed on ubuntu 24 by default,
so we have to install it manually.

- [x] Add linuxbrew to linux tests
- [x] Install `kcov` with brew
- [x] Install subversion with `apt`

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-20 08:20:07 +01:00
Wouter Deconinck
55eeff7eb0 xrandr: add v1.5.3 (#48178) 2024-12-19 19:45:17 -07:00
jnhealy2
6de1ebd71a Fix silent error when reporting builds to CDash (#47939)
* Fix silent error when reporting builds to CDash
   CDash has a 191 char maximum for build names.  When this
   is exceeded, CDash silently fails to correctly process the
   reported XML. This truncates CDash build names to 190 chars
   and emits a warning indicating it is doing so to prevent
   such errors from occuring.
* test/reporters.py: add unittest for buildname len issue
* test/reporters.py: rename cdash buildname test
* ci/common.py: fix syntax causing breaking test
   It appears that the CDash reporter is expecting a string
   as the buildname.
* Update lib/spack/spack/reporters/cdash.py
   Fix warning message to reflect actual issue.
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
* ci/common.py: fix function call to actually call function

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: psakievich <psakiev@sandia.gov>
2024-12-19 14:19:44 -07:00
afzpatel
fd865efe87 Bump up the version for ROCm-6.3.0 (#47966)
* Bump up the version for ROCm-6.3.0
* changes for aqlprofile, rocprofiler-dev and omnitrace
* add rocfft patch, correct Clang_DIR and add aqlprofile yum package
* add rpp and rocm-openmp-extras changes
* hipblaslt changes
* add rvs rocm 6.3
* bump rocdecode and rocpydecode
* add rocdecode libva arg
* add llvm-amdgpu dependency for hipblaslt
* restrict half in miopen-hip
* fix for rocblas and hipblaslt
* fix hipblas-common target_include
* fix sha256 for rocm-tensile
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-12-19 14:09:27 -07:00
kwryankrattiger
93c09ed3b4 Move allocation override to the generate job (#48199) 2024-12-19 21:59:15 +01:00
Rocco Meli
9db8f8ea88 sirius: add libxc constraint (#48184)
* sirius: add libxc constraint

* add myself as maintainer
2024-12-19 10:36:04 -08:00
Lehman Garrison
eb178e6840 py-typer: add version 0.15.1 and "standard" optional dependencies (#48010)
* py-typer: add version 0.15.1 and "standard" optional dependencies
* py-typer: remove variant that only exists in source, not sdist. Remove trailing .0 from versions.
2024-12-19 10:35:05 -08:00
Wouter Deconinck
8487842e11 gaudi: add v39.1; patch for failing test; properly support +examples (#48130)
* gaudi: add v39.1; patch for failing test; properly support +examples

* gaudi: filter_file OPTIONS
* gaudi: rm patch to disable pytest RandomNumber.py
2024-12-19 10:14:00 -08:00
Sebastian Keller
2286b2ad5a sphexa package (#48128)
* sphexa package

* remove older versions

* avoid setting args twice

Co-authored-by: Rocco Meli <r.meli@bluemail.ch>

* rocprim should be hipcub

* address review comments

---------

Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
2024-12-19 18:45:33 +01:00
Wouter Deconinck
ea0d99baf8 snakemake and py-snakemake-*: updates to latest versions (#47524)
* py-snakemake-interface-common: add v1.17.4

* py-snakemake-executor-plugin-azure-batch: add thru v0.3.0

* py-snakemake-executor-plugin-drmaa: add thru v0.1.5

* py-snakemake-executor-plugin-flux: add v0.1.1

* py-snakemake-executor-plugin-googlebatch: add thru v0.5.0

* py-snakemake-executor-plugin-kubernetes: add thru v0.2.2

* py-snakemake-executor-plugin-slurm: add thru v0.11.2

* py-snakemake-executor-plugin-tes: add v0.1.3

* py-snakemake-interface-executor-plugins: add thru 9.3.2

* py-snakemake-interface-report-plugins: add v1.1.0

* py-snakemake-storage-plugin-azure: add thru v0.4.2

* py-snakemake-storage-plugin-fs: add thru v1.0.6

* py-snakemake-storage-plugin-gcs: add thru v1.1.2

* py-snakemake-storage-plugin-s3: add thru v0.2.12

* py-snakemake-storage-plugin-zenodo: add thru v0.1.4

* snakemake: add v8.25.2

* [@spackbot] updating style on behalf of wdconinc

* snakemake, py-snakemake-*: apply suggestions from code review

* py-snakemake-executor-plugin-azure-batch: apply suggestions from code review

* snakemake, py-snakemake-*: fix style

* py-snakemake-executor-plugin-azure-batch: apply suggestion from code review

* py-snakemake-executor-plugin-drmaa: apply suggestion from code review

* py-snakemake-executor-plugin-drmaa: fix style

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-12-19 07:16:32 -06:00
eugeneswalker
60be9ea068 ci: update darwin tags (#47993)
* ci: update darwin tags

* tag with apple-clang version

* move darwin aarch64 tagging into configs/darwin/aarch/ci.yaml
2024-12-19 04:55:02 -08:00
Seth R. Johnson
5640861aeb Improve package recipes for some HEP packages (#48185)
* Improve variant robustness for dd4hep and edm4hep

Now variants won't be "false" if there's a typo.

* Use libs instead of manual prefix paths

* Improve cmake for another  hep package

* Fix variant use and style

* Use directories for ODD
2024-12-19 07:29:08 -05:00
Mikael Simberg
d8fa6eb559 hpx-kokkos: Add 0.4.1 (#48207) 2024-12-19 04:17:39 -07:00
dependabot[bot]
ec7436be6b build(deps): bump sphinxcontrib-programoutput in /lib/spack/docs (#47992)
Bumps [sphinxcontrib-programoutput](https://github.com/NextThought/sphinxcontrib-programoutput) from 0.17 to 0.18.
- [Changelog](https://github.com/OpenNTI/sphinxcontrib-programoutput/blob/master/CHANGES.rst)
- [Commits](https://github.com/NextThought/sphinxcontrib-programoutput/compare/0.17...0.18)

---
updated-dependencies:
- dependency-name: sphinxcontrib-programoutput
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-19 12:08:20 +01:00
Thomas Gruber
48f6a4ffb4 likwid: add 5.4.1 and add patch for 5.4.0 (#48012) 2024-12-19 12:03:19 +01:00
Harmen Stoppels
96a0b0eb08 llnl.util.lang: remove testing literal backtrace output (#48209) 2024-12-19 11:55:41 +01:00
Wouter Deconinck
8d8e36d7e2 qt-*: add v6.8.0, v6.8.1 (#46947) 2024-12-19 11:52:30 +01:00
Wouter Deconinck
1c843b99ae Replace lzma with xz dependency (#39404) 2024-12-19 11:50:38 +01:00
MatthewLieber
93a0c0eafd osu-micro-benchmarks: fix AMDGPU_TARGET issue (#48171)
Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2024-12-19 11:24:59 +01:00
Harmen Stoppels
0850e0bf08 docs: advertise --oci-username-variable and --oci-password-variable (#48189) 2024-12-19 10:15:01 +01:00
Alberto Invernizzi
6263f75303 ffmpeg: add v7.1 (#47783) 2024-12-19 09:52:38 +01:00
Adam J. Stewart
c184a68512 py-pydantic: add v1.10.19 (#48204) 2024-12-19 09:48:35 +01:00
Wouter Deconinck
69b17ea602 py-paramiko: add v3.3.2, v3.4.1, v3.5.0 (#48191)
* py-paramiko: add v3.3.2, v3.4.1, v3.5.0
* py-paramiko: deprecate v2.1.2 (CVE)
2024-12-19 00:15:44 -07:00
Howard Pritchard
5547b7b552 openmpi: add 5.0.6 (#48043)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2024-12-18 22:36:23 -07:00
Scott Wittenburg
ae6d1538d5 ci: Disable broken specs list (#48194) 2024-12-18 21:26:42 -07:00
Christoph Junghans
cdb0e80598 all-library: add v0.9.3 (#48193) 2024-12-18 21:16:59 -07:00
Dave Keeshan
233e57c4bc Install process has been changed, made simpler. Also added versions v0.0-3864 and v0.0-3876 (#48190) 2024-12-18 21:12:12 -07:00
Dom Heinzeller
918afd6385 spack external find grep on Linux AND macOS (#48134)
* Configure 'spack external find grep'
* Fix style for finding external grep
* Remove unused 're' Python module from grep
2024-12-18 21:02:20 -07:00
Christophe Prud'homme
83af81a14a mmg : add variant to install private headers for parmmg packaged (#47386)
* update package : add variant to install private headers for parmmg package
* re-add maintainer
* renamed to +private_headers and only for 5.7:
   /cc @jcortial-safran
* fix style and code
* applied suggestions
  /cc @jcortial-safran @tldahlgren
* fix
2024-12-18 19:12:32 -08:00
John W. Parent
2b2538e82c Add new CMake versions (#47997) 2024-12-18 18:26:11 -08:00
Cody Balos
b6715bde32 sundials: add version 7.2.0 (#48202) 2024-12-18 18:24:20 -08:00
Wouter Deconinck
0db3b36874 sherpa: fix AutotoolsBuilder install signature (#48002) 2024-12-18 18:19:11 -08:00
Brian Vanderwende
0bc54a4640 New versions and fixed images resource (#48003) 2024-12-18 18:14:11 -08:00
Matt Thompson
7057ca3c0c mapl: add v2.51.1 (#48007) 2024-12-18 18:10:51 -08:00
Brian Vanderwende
40ac1613e3 Fix for modern GCC and for drifting download URL (#48015) 2024-12-18 17:51:07 -08:00
Brian Vanderwende
d3ab84e5d8 Add latest 2.x version (#48016) 2024-12-18 17:49:15 -08:00
Derek Ryan Strong
15197b1868 Add netlib-lapack v3.12.0 (#48029) 2024-12-18 17:39:22 -08:00
Brian Vanderwende
de45c90056 pnetcdf: New versions and examples option (#48018)
* New pnetcdf versions and examples option
* Refine spec for GCC workaround
* Refactor examples variant to conflict with older versions
Co-authored-by: Sergey Kosukhin <skosukhin@gmail.com>

---------

Co-authored-by: Sergey Kosukhin <skosukhin@gmail.com>
2024-12-18 17:36:58 -08:00
Dave Keeshan
82fc0c702d yosys: add v0.48 (#48036) 2024-12-18 17:34:14 -08:00
Timo Heister
51e889ea3f aspect: add v3.0.0 (#48040) 2024-12-18 17:32:21 -08:00
Paul Kuberry
ad8d1eddde xyce: update +pymi related dependencies (#48044) 2024-12-18 17:30:09 -08:00
Joseph Wang
ebb3736de7 nodejs: update to 22.11.0 (#48084) 2024-12-18 17:27:50 -08:00
sid
4d7a637788 r-lidr and dependency r-rlas (#48051)
* r-rlas is a dependency for r-lidr
* new package r-lidr w/ suggests to address masking issues
* fixed flake8 issues and added maintainers
* removed boost import statement for flake sake
2024-12-18 17:20:33 -08:00
Wouter Deconinck
8e163c3565 qmake: docs about virtual provider (#48055) 2024-12-18 17:16:30 -08:00
Bill Williams
f1fbf11b33 Score-P: mpi and shmem fixes (#48069)
* Score-P: Replace with-or-without, document options that are not currently explicitly mapped in package for mpi and shmem.
* trim long lines

---------

Co-authored-by: wrwilliams <wrwilliams@users.noreply.github.com>
2024-12-18 17:14:59 -08:00
Wouter Deconinck
be3a33ecf7 prmon: add v3.1.1, update py-matplotlib dependency (#48109)
* prmon: add v3.1.1, update py-matplotlib dependency
* prmon: depends_on py-matplotlib@:3.5
2024-12-18 17:12:55 -08:00
Adam J. Stewart
4be528448c py-scikit-image: add v0.25.0 (#48117)
* py-scikit-image: add v0.25.0
* Fix Python range
2024-12-18 17:10:20 -08:00
Wouter Deconinck
8b11918c1e dcap: add v2.47.13, v2.47.14, avoid bash for sh script (#48123)
* dcap: add v2.47.13, v2.47.14, avoid bash for sh script
* dcap: fix typo
2024-12-18 17:00:13 -08:00
Adam J. Stewart
5add010c71 py-torchdata: add v0.10.1 (#48118) 2024-12-18 16:58:23 -08:00
Wouter Deconinck
e77e1d6528 ghostscript: add v10.04.0 (fix CVEs) (#48126)
* ghostscript: add v10.04.0
2024-12-18 16:43:40 -08:00
Adam J. Stewart
6ede4e9f13 py-matplotlib: add v3.10.0 (#48127) 2024-12-18 16:26:43 -08:00
Wouter Deconinck
c50ac5ac25 py-gfal2-python: new package to fix gfal2-util (#48165)
* py-gfal2-python: add new package
* gfal2-util: depends_on py-gfal2-python
* py-gfal2-python: patch setup.py to find correct python
* py-gfal2-python: depends_on boost +python
2024-12-18 13:44:09 -08:00
Mikael Simberg
e7e5352e93 dla-future: Add 0.7.1 (#48188) 2024-12-18 13:18:36 -08:00
Mikael Simberg
36e74f360b pika: Add 0.31.0 (#48192) 2024-12-18 12:59:51 -08:00
dependabot[bot]
f362d45802 build(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0 (#48180)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b4b15b8c7c...6f51ac03b9)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-18 13:01:30 -06:00
Zack Galbreath
9719220e8a Stop building for neoverse_n1 in our GitLab CI pipelines (#48186) 2024-12-18 17:12:05 +00:00
Todd Gamblin
30e2b15eea Use Literal now that we have typing_extensions in Spack. (#48172)
Improve our typing by updating some todo locations in the code to use
`Literal` instead of a simple `str`.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-18 14:10:14 +01:00
Andrey Perestoronin
7ee1e518b0 Add intel-compiler 2025.0.4 patch and intel-dal 2025.0.1 patch packages (#48135)
* add compiler patch packages

* Add intel-dal patch package
2024-12-18 07:51:25 -05:00
eugeneswalker
4af8fbeddf ci: remove unmaintained, inactive gpu-tests stack (#48166) 2024-12-18 12:40:20 +01:00
Wouter Deconinck
2b85b706f1 findutils: add v4.10.0; faketime: new package (#48182)
* findutils: add v4.10.0
* faketime: new package
2024-12-18 00:13:02 -07:00
Samuel K. Gutiérrez
eadf8727e7 libquo: Improve dependency code, cleanup configure. (#48181)
* Fix issue reported by some users regarding some build dependencies.
* Remove invalid configure-time flag that was recently introduced.

Signed-off-by: Samuel K. Gutierrez <samuel@lanl.gov>
2024-12-17 19:58:07 -07:00
Buldram
de739db153 nim: remove bash dependency (#48132) 2024-12-17 18:51:38 -08:00
Jon Rood
a3bed44bf5 kokkos: add hip_relocatable_device_code variant. trilinos: kokkos should enable relocatable device code if requested for trilinos and it also requires the kokkos libraries be static. (#48143) 2024-12-17 18:48:35 -08:00
Stephen Hudson
3da04ccb19 libEnsemble: add v1.4.3 (#48144) 2024-12-17 18:47:27 -08:00
SXS Bot
f921b28032 spectre: add v2024.12.16 (#48146)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2024-12-17 18:45:45 -08:00
Thomas Helfer
3d50d7173d Update tfel and mgis packages to new versions (#48176)
* update tfel package
* Update MGIS package
2024-12-17 18:26:08 -08:00
Rémi Lacroix
5a5f555fe2 NextFlow: Add versions 24.10.2 and 24.10.3. (#48153)
* NextFlow: add version 24.10.2.
* NextFlow: add version 24.10.3.
2024-12-17 17:44:10 -08:00
David Boehme
bb30c726a4 caliper: Add v2.12.1 (#48021)
* caliper: Add v2.12.1
* Only apply aarch patch in versions below 2.12
* Fix version spec for patch
* Remove obsolete comment
2024-12-17 17:40:54 -08:00
psakievich
0894180cc1 Add more functionality to the stage cmd (#46498)
* Add more functionality to the stage cmd

* Completion commands

* completion again

* Add tests, but they are slow

* Stale comment
2024-12-17 15:07:29 -08:00
kwryankrattiger
f211e2f9c4 CI: reduce output from helper scripts (#48145) 2024-12-17 12:37:57 -07:00
kwryankrattiger
f04ea573fa ci: don't error in CI for missing libs (#48169)
There are still more fix ups required for the missing libs to work as
expected in CI. Dropping the error requirement in favor of moving to a
log scraping method until we can verify all package issues have been
addressed correctly.
2024-12-17 19:43:36 +01:00
Zack Galbreath
364f70c16d Remove E4S Neoverse V1 pipeline (#48160)
Per discussion with the Spack CI team, our graviton2 runners have been
performing poorly and this stack seems no longer necessary.
2024-12-17 19:37:08 +01:00
Wouter Deconinck
5da1adad3a root: only depends_on fortran when +fortran (#48122) 2024-12-17 12:08:12 -06:00
kwryankrattiger
dfb529fc6e Ci set concretiztion pool size (#48077)
* Set the "build_jobs" on concretization/generate for CI

build_jobs also controls the concretization pool size. Set this
in the config section for CI generate.

This config is overwritten by build_job CI using the SPACK_BUILD_JOBS
environment variable. This implicitly will drop the default build
CPU request on all "default" grouped build jobs from (max) 16 to 8.

* Add default allocations for build jobs

* Add common jobs and concretize args to ci generate and rebuild

* CI: Specify parallel concretize and build jobs via argument

* Increase power and cray concretization limits

Lowering limits for these stacks creates timeout

* Increase default pool size to 8

intermittent timeouts with 4 CPU

* Add reduced requests for windows for now
2024-12-17 12:05:15 -06:00
Todd Gamblin
6e2625ae65 package_base: generify accessor methods for when-keyed dictionaries
This turns some variant-specific methods for dealing with when-keyed dictionaries into
more generic versions, in preparation for conditional version definitions.

`_by_name`, `_names`, etc. are replaced with generic methods for transforming
when-keyed dictionaries:
 * `_by_subkey()`
 * `_subkeys()`
 * `_num_definitions()`
 * `_definitions()`
 * `_remove_overridden_defs()`

And the variant accessors are refactored to use these methods underneath.

To do this, types like `WhenDict` had to be generified, and some `TypeVars`
were added for sortable keys and values.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-17 07:25:14 -08:00
Todd Gamblin
7f24b11675 Vendor typing_extensions
We are using more and more typing features in Spack, and without features like
protocols, typing core is becoming harder and harder.

I think it's worth vendoring `typing_extensions` for this. It will get us a number of
useful capabilities:

* `Literal`
* `TypedDict`
* `Protocol`

among others.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-17 07:25:14 -08:00
Mikael Simberg
bb9bb905a0 mold: Add 2.35.1 (#48136) 2024-12-17 06:54:59 -07:00
Harmen Stoppels
60b4882d4e ci: pcluster missing_library_policy: ignore (#48138) 2024-12-17 12:01:56 +01:00
Harmen Stoppels
19734832eb resolve_shared_libraries.py: exclude libanl.so from glibc (#48139) 2024-12-17 11:33:36 +01:00
Massimiliano Culpo
51fb1ed05b Temporarily pin Ubuntu to v22.04, where we use kcov (#48152)
Ubuntu doesn't package kcov in v24.04 Since GitHub
started upgrading their runner images, this makes
our CI fail, see e.g.

https://github.com/spack/spack/actions/runs/12366970840/job/34518012887?pr=47854

This is a temporary workaround, while we prepare a
more stable fix.

* Don't run too many unit tests
2024-12-17 11:30:47 +01:00
dependabot[bot]
69faa41c3f build(deps): bump docker/setup-buildx-action from 3.7.1 to 3.8.0 (#48150)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.7.1 to 3.8.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](c47758b77c...6524bf65af)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-17 09:00:26 +01:00
Stephen Nicholas Swatman
72ef5b9010 acts dependencies: new versions as of 2024/12/16 (#48133)
This commit adds a new patch version of algebra-plugins and a new minor
version of detray.
2024-12-16 23:12:58 -07:00
Chris Marsh
795809f31b qgis: add 3.36 and 3.40, fix proj depend (#48110)
* Add newest LTR 3.34.13, constrain proj to work around build bug, add 3.40.1

* bound proj

* Improve comment
2024-12-16 21:57:57 -07:00
Chris Marsh
5db597ff87 qt5: patch internal RapidJSON (#48078)
* Fix qt5 internal RapidJSON build error with %gcc@14:

* fix style

* qt: patch url full_index

* qt: fix patch sha

* qt: patch when @5.9.2:

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-12-16 20:06:30 -06:00
kwryankrattiger
b54227d5e9 Mesa: Update the Meson requirements for newer versions (#48116) 2024-12-16 15:18:15 -06:00
Wouter Deconinck
94cf51875f acts: don't use system dfelibs for 35.1:36.0 (#47994) 2024-12-16 14:39:21 -06:00
Harmen Stoppels
2f6e30fd24 ci: new image for developer-tools (#48065) 2024-12-16 13:08:05 +01:00
Harmen Stoppels
06eae96ef9 config:shared_linking:missing_library_policy to error/warn about accidental use of system libraries on linux/freebsd (#47365)
This commit adds a config option `config:shared_linking:missing_library_policy:error/warn/ignore` which will cause installation errors or warnings when ELF executables or libraries need shared libraries which cannot be resolved from RPATH search paths. The default is to ignore.

This is a safeguard against accidentally linking to system libraries instead of Spack libraries. It makes it more likely that build cache installs work on different machines. It works only at the level of libraries, not at the level of symbols. Some system dependencies are allowed (e.g. kernel and libc).

Packages can (but are discouraged to) set `unresolved_libraries` to a list of patterns of sonames/library names that are know to be unresolvable in RPATHs.  In the future this could be made more fine-grained in a non-breaking way by allowing a dictionary of patterns `lib => [deps]`.
2024-12-16 12:32:36 +01:00
Harmen Stoppels
557083c33b curl: disable docs to drop perl dep (#48074) 2024-12-16 12:25:53 +01:00
Massimiliano Culpo
f6ab2f5b99 unit-test: port changes from compiler as deps (#48104)
Extracted #45189

Common test setup has been extracted in fixtures. Some matrix
dimensions moved from being "compiler" to be "targets".

Use --fake install for packages in test.
2024-12-16 09:27:41 +01:00
Rocco Meli
6005813518 CP2K: use ninja generator and add constraint on dla-future-fortran (#48033)
* cp2k ninja

* version
2024-12-16 09:24:21 +01:00
Joseph Wang
1df506959e py-packaging: update to 24.2 (#48087) 2024-12-14 09:57:40 -07:00
Todd Gamblin
0d0ff44e3e Spec: Remove _normal attribute and unused constructor arguments (#48119)
The `_normal` attribute on specs is no longer used and has no meaning.
It's left over from part of the original concretizer.

The `concrete` constructor argument is also not used by any part of core.

- [x] remove `_normal` attribute from `Spec`
- [x] remove `concrete` argument from `Spec.__init__`
- [x] remove unused `check_diamond_normalized_dag` function in tests
- [x] simplify `Spec` constructor and docstrings

I tried to add typing to `Spec` here, but it creates a huge number of type issues
because *most* things on `Spec` are optional. We probably need separate `Spec` and
`ConcreteSpec` classes before attempting that.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-14 15:24:22 +01:00
Wouter Deconinck
f4bfeb7ed8 sundials: fix missing comma in list (#48106) 2024-12-14 06:38:01 -07:00
Zack Galbreath
a16350df69 Fix typo in ci/README.md (#48114) 2024-12-14 06:22:46 -07:00
John W. Parent
a2981cff1f New Package: Trame (#47920)
* Add trame
2024-12-13 17:16:31 -06:00
Richard Berger
d2372f8eee Add libcxi and its dependencies (#47705) 2024-12-13 16:09:17 -07:00
Buldram
c310c2911a nim: fix deps, deprecate and patch old versions (#47934)
* nim: fix deps, deprecate and patch old versions
* Fix runtime dependencies for produced binaries:
  - Add -rpaths pointing at dependencies to
	  std wrapper modules
  - Set version constraints for OpenSSL
  - Added SQLite3 variant for <2.0
* Parallelize build with make
* Deprecate 1.0.10 due to CVEs
* Deprecate 1.9.3 as it's an old development version
* Backport patch for CVE-2021-21372 to <1.2.10/<1.4.4,
  CVE-2021-21374 to 1.4.2 and CVE-2021-46872 to 1.4.*
* Avoid empty low ranges that include devel
* Add previously missing CVE comment
* Keep "link" type for dynamic libraries for MSVC
* Omit "run" type for library dependencies
* Disable SQLite variant by default
* Fix version ranges
   Had assumed they were exclusive, but they're inclusive
* Correct version range for sqlite variant
   Difference doesn't matter outside of development versions
* Move patches to use GitHub URLs instead of files
* Retry CI
* append ?full_index=1
2024-12-13 15:29:18 -07:00
Rémi Lacroix
d68747912d suite-sparse: Add version 7.8.3. (#48101) 2024-12-13 14:53:38 -07:00
Harmen Stoppels
107e4515bd tests: fix a few open(...) calls (#48113) 2024-12-13 21:38:48 +01:00
Massimiliano Culpo
af6526bb82 ga: add a pylint check to avoid adding open calls without encoding= (#48099) 2024-12-13 21:21:26 +01:00
Raffaele Solcà
dd8dff7872 add dla-future v0.7.0 (#48098) 2024-12-13 12:28:21 -07:00
Adam J. Stewart
82d4b391bf py-matplotlib: add v3.9.3, v3.9.4 (#48107)
* py-matplotlib: add v3.9.3, v3.9.4
* Add upper bound on meson
2024-12-13 11:54:19 -07:00
Harmen Stoppels
a07e372770 filter_file: make tempfile later (#48108)
* filter_file: make tempfile later

* also add a `.` after the filename
2024-12-13 11:49:32 -07:00
kwryankrattiger
d35202d83e VisIt: Patch to fix python module deps (#48097)
Previously the pip setup would delete the visitmodule during the install
step. This was fixed by forcing the pip setup to only run once before
the dependents are created.
2024-12-13 11:33:07 -07:00
Tamara Dahlgren
1c1d439a01 Circular import fix: spack.config -> spack.environment (#48057)
Fix by moving setup to spack.main
2024-12-13 18:44:08 +01:00
Massimiliano Culpo
d52be82c06 netcdf-cxx4: use https instead of ftp (#47875)
* netcdf-cxx4: use https instead of ftp
* Update url for v4.3.0
2024-12-13 09:00:40 -08:00
Dominic Hofer
2a0fc464c9 Remove maintainer (#48105) 2024-12-13 17:17:50 +01:00
Massimiliano Culpo
cd26331b19 superlu: add v7.0, add metis as a dependency (#48061) 2024-12-13 11:26:27 +01:00
Kevin Huck
f5934db96b Updating APEX package (#48017)
* Updating APEX package
Adding version 2.7.1 and adding OpenCL support flags

* Update var/spack/repos/builtin/packages/apex/package.py

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

* Update var/spack/repos/builtin/packages/apex/package.py

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

* Fixing recommended change typo

* Removing superfluous conflict

---------

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
2024-12-13 10:20:30 +01:00
Harmen Stoppels
11b86ca75c package_base.py: remove deprecated props (#48066) 2024-12-13 10:19:16 +01:00
kwryankrattiger
0c2b546825 Remove extraneous newline from reproducer output (#48076)
* Remove extraneous newline from reproducer output

* Convert print -> tty.info
2024-12-13 09:38:43 +01:00
kwryankrattiger
ef615bcc7e CI: Move the build stage to the project root instead of tmp (#47996)
On MacOS the tmpdir fills up over time and isn't cleared properly.
Move the build stage to a location it is cleared after each build.
2024-12-13 06:55:01 +00:00
Wouter Deconinck
0f21f24356 cmake: ~ownlibs ^libarchive compression+=bz2lib,lzma,zstd (#48079) 2024-12-12 23:47:29 -07:00
Brian Vanderwende
e59ee0768f grads: Support newer hdf5 versions for grads (#48058)
* Support newer hdf5 versions for grads

* Cover netcdf dependency too

* Adjusted placement of two comments
2024-12-13 00:33:04 -06:00
Chris Marsh
6cbd9dcf13 Add +pic variant by default such that consumers of the static version of pcre2 can use it in a shared library. Fixes #47614 (#48071) 2024-12-12 19:38:10 -06:00
kwryankrattiger
92dbb55703 Mkae Autotools build_system point at correct build_directory (#48072) 2024-12-12 15:58:18 -07:00
Marc T. Henry de Frahan
e84631473c Add openfast FPE trapping variant (#48042) 2024-12-12 15:28:04 -07:00
Satish Balay
c213a8c2a7 camp: restrict cub dependency to cuda versions older than 10 - as newer cuda versions already include cub (#48008)
Adding an additional dependency on cub pulls in an in-compatible version of cub [than whats provided by cuda]
2024-12-12 13:17:51 -08:00
Harmen Stoppels
526af1cbe7 Sprinkle open(..., encoding=utf-8) (#48006)
Add missing encoding=utf-8 to various open calls. This makes
files like spec.json, spack.yaml, spack.lock, config.yaml etc locale
independent w.r.t. text encoding. In practice this is not often an
issue since Python 3.7, where the C locale is promoted to
C.UTF-8. But it's better to enforce UTF-8 explicitly, since there is
no guarantee text files are written in the right encoding.

Also avoid opening in text mode if it can be avoided.
2024-12-12 21:46:08 +01:00
Massimiliano Culpo
334a8b0991 ci: remove a custom implementation of a stdlib functionality (#48068) 2024-12-12 12:09:35 -08:00
Dom Heinzeller
1581922c9e cprnc: install rpath patch for v1.0.8 (#47913) 2024-12-12 20:31:40 +01:00
Harmen Stoppels
9cd2f0a536 filter_file: fix various bugs (#48038)
* `f.tell` on a `TextIOWrapper` does not return the offset in bytes, but
  an opaque integer that can only be used for `f.seek` on the same
  object. Spack assumes it's a byte offset.
* Do not open in a locale dependent way, but assume utf-8 (and allow
  users to override that)
* Use tempfile to generate a backup/temporary file in a safe way
* Comparison between None and str is valid and on purpose.
2024-12-12 20:07:39 +01:00
Harmen Stoppels
687766b8ab spec.parser / spec.token: improvements (#48063)
Follow-up to #47956 

* Rename `token.py` -> `tokenize.py`
* Rename `parser.py` -> `spec_parser.py`
* Move common code related to iterating over tokens into `tokenize.py`
* Add "unexpected character token" (i.e. `.`) to `SpecTokens` by default instead of having a separate tokenizer / regex.
2024-12-12 17:08:20 +01:00
Adam J. Stewart
396a701860 Python: deprecate 3.8 (#46913)
* Python: deprecate 3.8

* Remove preference for EOL Python versions

* Explicitly deprecate things requiring EOL Python

* More deprecations

* deprecate old versions of slepc, py-petsc4py, py-slepc4py in sync with old versions of petsc

---------

Co-authored-by: Satish Balay <balay@mcs.anl.gov>
2024-12-12 15:22:06 +01:00
Massimiliano Culpo
7105cc8c01 Make use of ^ in 'depends_on' an error (#48062)
The use of `^` in `depends_on` directives has never been allowed, since
the dawn of Spack.

Up to now, we used to have an audit to catch this kind of issue, mainly
because in that way we could easily collect all issues and report them
to packagers at once.

Due to implementation details, this audit doesn't work if a dependency
without a `^` is followed by the same dependency with a `^`.

This PR makes this pattern an error, which will be reported eagerly, and
removes the corresponding audit. It also fixes a package using the wrong
idiom.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-12-12 14:19:05 +01:00
Wouter Deconinck
0ce38ed109 rivet: patch to fix missing headers (#48049) 2024-12-12 11:14:15 +01:00
Tamara Dahlgren
c548bcc9ef Environment: remove self import (#48056) 2024-12-12 10:30:19 +01:00
Tamara Dahlgren
f018e0fe42 Circular import fix: spack.schema.config -> spack.config (#48059)
fix by moving `merge_yaml` from `config.py` to `schema/__init__.py`
2024-12-12 10:07:53 +01:00
Tamara Dahlgren
9aefbb0e96 Circular import fix: spack.oci.opener -> spack.parser (#47956)
by splitting spack.parser into two modules
2024-12-12 10:02:07 +01:00
Marcel Koch
9265991767 ginkgo: add v1.9.0 (#47987)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-12-11 16:53:01 -07:00
Dom Heinzeller
25cfea48f3 ESMF package: support clang with flang
So far, the ESMF package recipe in spack assumes that the spack
compilers clang and apple-clang are using gfortran as the Fortran
compiler. But with the latest improvements to the LLVM compilers,
we need to also support clang with flang.
2024-12-11 16:47:52 -07:00
Andy Porter
fc4316cafa py-psyclone: add v3.0.0 (#47964)
* Update py-psyclone package to version 3.0.0
* Add Sergi and myself as maintainers
* correct case of url and add url_for_version() method
2024-12-11 11:51:14 -08:00
Scott Wittenburg
de1416b3de ci: Refactor pipeline generation (#47459)
Reorganize the pipeline generation aspect of the ci module,
mostly to separate the representation, generation, and
pruning of pipeline graphs from platform-specific output
formatting.

Introduce a pipeline generation registry to support generating
pipelines for other platforms, though gitlab is still the only
supported format currently.

Fix a long-existing bug in pipeline pruning where only direct
dependencies were added to any nodes dependency list.
2024-12-11 19:23:37 +00:00
Harmen Stoppels
ba52c4f05d gha: fix git safe.directory config (#48041) 2024-12-11 19:11:44 +01:00
Rocco Meli
501ee68606 dbcsr: add v2.8.0 (#48035)
* dbcsr: add v2.8.0

* add myself as maintainer
2024-12-11 10:18:38 -07:00
Jon Rood
283eaaf323 amr-wind: remove unused cmake option (#48009)
* amr-wind: remove unused cmake option

* Style.
2024-12-11 09:28:31 -07:00
Wouter Deconinck
a3543008d9 qt-base: fix rpath for dependents (#47424)
ensure that CMAKE_INSTALL_RPATH_USE_LINK_PATH=ON works in qt packages.
2024-12-11 16:59:47 +01:00
Robert Cohn
f760e16688 umf only avaiable with 2025 (#48027) 2024-12-11 16:33:56 +01:00
Harmen Stoppels
e9d2732e00 log.py: improve utf-8 handling, and non-utf-8 output (#48005) 2024-12-11 10:54:17 +01:00
Harmen Stoppels
03525528d6 llnl.path: make system_path_filter a noop on non-win32 (#48032) 2024-12-11 10:51:06 +01:00
Scott Wittenburg
a3985e7538 Revert "Set the "build_jobs" on concretization/generate for CI (#47660)" (#48028)
This reverts commit 316dcc1609.
2024-12-11 07:56:36 +01:00
Robert Cohn
ae28528ec7 sycl runtime needs umf (#48011) 2024-12-10 14:34:35 -08:00
Paul Kuberry
cb8880b388 Update compadre and py-pycompadre to v1.6.0 (#47948)
* compadre: add version 1.6.0
* py-pycompadre: add version 1.6.0
2024-12-10 13:29:31 -08:00
kwryankrattiger
316dcc1609 Set the "build_jobs" on concretization/generate for CI (#47660)
* Set the "build_jobs" on concretization/generate for CI

build_jobs also controls the concretization pool size. Set this
in the config section for CI generate.

This config is overwritten by build_job CI using the SPACK_BUILD_JOBS
environment variable. This implicitly will drop the default build
CPU request on all "default" grouped build jobs from (max) 16 to 8.

* Add default allocations for build jobs

* Add common jobs and concretize args to ci generate and rebuild

* CI: Specify parallel concretize and build jobs via argument

* Increase power and cray concretization limits

Lowering limits for these stacks creates timeout
2024-12-10 14:13:23 -07:00
rfbgo
84ea7dbddf hp2p: new package (#47950)
* Add hp2p app definition
* update homepage
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
* update to fstring

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-12-10 13:03:54 -08:00
dmagdavector
b6e4ff0242 py-nbclassic: add v1.1.0 (#47946)
* py-nbclassic: add v1.1
* py-nbclassic: reduce explicit dependencies for v1.1.0
  Having all the 'excess' packages listed did not break anything, as
  they were needed for `py-jupyter-server` (pulled in via `py-notebook-shim`)
  anyway, but the change makes it more clear on why things are being pulled in.
2024-12-10 13:45:44 -07:00
Xuefeng Ding
c23ffbbd7a geant4: patch typo in wroot (#47955)
* bug fix

* not just 10.4, all versions

* geant4: comment; close patch when range

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-12-10 14:36:01 -06:00
Luc Grosheintz
accd3ca860 highfive: add v2.10.1 (#47914)
* highfive: release 2.10.1
* Use sha256 of '.tar.gz'.

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-12-10 12:29:17 -08:00
dmagdavector
d47629a521 py-jupyterlab-server: add v2.23 to 2.27 (#47969)
* py-jupyterlab-server: add v2.23 to 2.27
* py-jupyterlab-server: style fixes
2024-12-10 12:06:25 -08:00
Lehman Garrison
7bb6c9b828 py-disbatch: add new package at version 3.0 (#47988) 2024-12-10 10:13:56 -08:00
Wouter Deconinck
7e5b5f8c57 veccore: add v0.8.2 (#47855)
* veccore: add v8.2.0

* Update cmake requirement

---------

Co-authored-by: Seth R Johnson <johnsonsr@ornl.gov>
2024-12-10 08:38:43 -07:00
Paul R. C. Kent
3a1c0f5c5f llvm: add v19.1.5 (#47897) 2024-12-10 15:19:10 +01:00
Massimiliano Culpo
b50dbb8604 pipelines: simplify and lint aws-pcluster-* (#47989) 2024-12-10 12:16:51 +01:00
Harmen Stoppels
30c00353d4 make level_zero variant consistent, add missing instances (#47985) 2024-12-10 09:25:30 +01:00
Tamara Dahlgren
466c3abaeb Remove remaining use of deprecated test callback (#47995) 2024-12-10 08:19:56 +01:00
Adam J. Stewart
478647f873 py-numpy: add v2.2.0 (#47999) 2024-12-09 23:39:00 -07:00
Adam J. Stewart
15f3851a92 py-scikit-learn: add v1.6.0 (#47998) 2024-12-09 22:59:24 -07:00
Laura Weber
5232ee1ed1 tecplot: updated hash for 2024r1m1 (#47886) 2024-12-09 18:31:35 -08:00
teddy
855943ff29 py-mgmetis: remove constrains 3.X for mpi4py & 1.X for numpy depandancies (#47890)
Co-authored-by: t. chantrait <teddy.chantrait@cea.fr>
2024-12-09 18:29:59 -08:00
Tobias Ribizel
449a462cde gurobi: add versions 11 and 12 (#47889)
This also means removing the Python support for these versions,
as the installation method was deprecated in favor of pip/conda
2024-12-09 18:27:30 -08:00
François Trahay
f3c6f00cc1 eztrace: new version for building from the dev branch of the git repository (#47891) 2024-12-09 18:25:54 -08:00
jgraciahlrs
42333ad66e extrae: relax requirements on binutils (#47893) 2024-12-09 18:24:15 -08:00
Luc Grosheintz
36f3566257 highfive: update maintainers. (#47896)
* highfive: update maintainers.
* switch maintainers.

---------

Co-authored-by: Nicolas Cornu <me+github@alkino.fr>
2024-12-09 18:22:10 -08:00
Adam J. Stewart
24fc720c0b py-twine: add v6.0.1 (#47899) 2024-12-09 18:18:19 -08:00
Andrey Alekseenko
fe0f4c1815 gromacs: support version 2024.4 (#47900)
And fix help formatting
2024-12-09 18:16:42 -08:00
Alberto Sartori
d68462ae8e justbuild: add version 1.4.1 (#47902) 2024-12-09 18:15:06 -08:00
Victor Lopez Herrero
0189e92329 dlb: add v3.5.0 (#47916) 2024-12-09 18:06:58 -08:00
Mark Abraham
8d83baa35e gromacs: conflict %apple-clang and +openmp (#47935) 2024-12-09 17:39:32 -08:00
Wouter Deconinck
12dd1208f3 geant4: add v11.3.0 (#47961)
* geant4: add v11.3.0
* geant4: rm deprecated 11.3.0.beta
* geant4: add 11.3.0 and associated data library versions
   - Data library versions taken from:
     - https://gitlab.cern.ch/geant4/geant4/-/blob/v11.3.0/cmake/Modules/G4DatasetDefinitions.cmake?ref_type=tags
   - Variants etc otherwise unchanged.
   - 11.3.0-beta version removed, release version marked as preffered.
* g4channeling: f-strings

---------

Co-authored-by: Ben Morgan <ben.morgan@warwick.ac.uk>
Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2024-12-09 15:01:45 -08:00
David Gardner
728c5e0e9d add main branch (#47952) 2024-12-09 14:54:38 -08:00
dmagdavector
c3e92a3d01 py-httpx: add v0.28, v0.28.1 (#47970)
* py-httpx: add v0.28, v0.28.1
* py-httpx: py-sniffio dependency only needed up to 0.27
2024-12-09 14:44:29 -08:00
Stephen Nicholas Swatman
49efa711d0 acts dependencies: new versions as of 2024/12/08 (#47981)
* acts dependencies: new versions as of 2024/12/08
 This commit includes a new version of ACTS, as well as new versions of
  the ACTS algebra plugins, covfie, detray, and geomodel.
* Fixes
* covfie: depends_on cmake@3.21: when @0.11:

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-12-09 15:08:47 -07:00
Wouter Deconinck
ab4a645cbe various pkgs: use https homepage when http redirects (github.io) (#47974)
* various pkgs: use https homepage when http redirects (github.io)
* py-owslib: fix homepage
* py-owslib: fix homepage to rtd
* h5io: fix homepage
2024-12-09 14:48:33 -07:00
Wouter Deconinck
7c74247f23 py-greenlet: remove preference for v2.0.2 (#47962)
* py-greenlet: remove preference for 2.0.2
* py-greenlet: conflicts with gcc@:7 when @3.1.1:
2024-12-09 12:26:16 -08:00
Matt Thompson
728f13d4b2 mapl: add v2.51.0 (#47968) 2024-12-09 12:21:05 -08:00
Wouter Deconinck
4d6347c99c node-js: patch for %gcc@12.[1-2] when @22.2:22.5 (#47979)
* node-js: patch for %gcc@12.[1-2] when @22.2:22
* node-js: avoid url patch (serial in common.gypi)
2024-12-09 12:19:09 -08:00
Wouter Deconinck
b2a86fcaba py-plac: add v1.4.3; restrict to python@:3.11 for older (#47982) 2024-12-09 11:24:51 -08:00
Kin Fai Tse
da83ab35e8 add soci 4.0.3 (#47983) 2024-12-09 11:17:36 -08:00
Alberto Invernizzi
9cb2070eeb gh: add v2.59.0 -> v2.63.2 (#47958)
* gh: bump versions

* update go requirement (good catch @alecbcs!)
see 8446079656
2024-12-09 09:43:10 -08:00
Wouter Deconinck
a72490fc91 coverage.yml: set fail_ci_if_error = false again (#47986) 2024-12-09 16:59:44 +01:00
Mikael Simberg
f15e5f7163 mold: Add 2.35.0 (#47984) 2024-12-09 04:02:51 -07:00
dependabot[bot]
fc105a1a26 build(deps): bump types-six in /.github/workflows/requirements/style (#47954)
Bumps [types-six](https://github.com/python/typeshed) from 1.16.21.20241105 to 1.17.0.20241205.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-six
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-08 19:34:20 -06:00
Stephen Sachs
8a9e16dc3b aws-pcluster stacks: static spack.yaml (#47918) 2024-12-08 20:26:08 +01:00
eugeneswalker
0b7fc360fa e4s ci: add lammps +rocm (#47929)
* e4s ci: add lammps +rocm

* e4s rocm external stack: add def for rocm-openmp-extras external

* lammps +rocm external rocm has errors, comment out
2024-12-08 10:21:28 -08:00
Wouter Deconinck
79d79969bb celeritas: patch 0.5.0 for geant4@11.3.0: (#47976) 2024-12-08 09:12:14 -05:00
Harmen Stoppels
422f829e4e mirrors: add missing init file (#47977) 2024-12-08 09:31:22 +01:00
Alec Scott
f54c101b44 py-jedi: add v0.19.2 (#47569) 2024-12-07 16:26:31 +01:00
Harmen Stoppels
05acd29f38 extensions.py: remove import of spack.cmd (#47963) 2024-12-07 10:08:04 +01:00
Wouter Deconinck
77e2187e13 coverage.yml: fail_ci_if_error = true (#47731) 2024-12-06 11:01:10 -08:00
Harmen Stoppels
5c88e035f2 directives.py: remove redundant import (#47965) 2024-12-06 19:18:12 +01:00
Harmen Stoppels
94bd7b9afb build_environment: drop off by one fix (#47960) 2024-12-06 17:01:46 +01:00
Stephen Herbener
f181ac199a Upgraded version specs for ECMWF packages: eckit, atlas, ectrans, fckit, fiat (#47749) 2024-12-05 18:46:56 -08:00
Sreenivasa Murthy Kolam
a8da7993ad Bump up the version for rocm-6.2.4 release (#47707)
* Bump up the version for rocm-6.2.4 release
2024-12-05 18:41:02 -08:00
Dom Heinzeller
b808338792 py-uxarray: new package plus dependencies (#47573)
* Add py-param@2.1.1
* Add py-panel@1.5.2
* Add py-bokeh@3.5.2
* New package py-datashader
* New package py-geoviews
* New package py-holoviews
* WIP: new package py-uxarray
* New package py-antimeridian
* New package py-dask-expr
* New package py-spatialpandas
* New package py-hvplot
* Add dependency on py-dask-expr for 'py-dask@2024.3: +dataframe'
* Added all dependencies for py-uxarray; still having problems with py-dask +dataframe / py-dask-expr
* Fix style errors in many packages
* Clean up comments and fix style errors in var/spack/repos/builtin/packages/py-dask-expr/package.py
* In var/spack/repos/builtin/packages/py-dask/package.py: since 2023.8, the dataframe variant requires the array variant
* Fix style errors in py-uxarray package
2024-12-05 18:20:55 -08:00
Massimiliano Culpo
112e47cc23 Don't inject import statements in package recipes
Remove a hack done by RepoLoader, which was injecting an extra
```
from spack.package import *
```
at the beginning of each package.py
2024-12-05 12:48:00 -08:00
Dom Heinzeller
901cea7a54 Add conflict for pixman with Intel Classic (#47922) 2024-12-05 18:14:57 +01:00
Massimiliano Culpo
c1b2ac549d solver: partition classes related to requirement parsing into their own file (#47915) 2024-12-05 18:10:06 +01:00
Harmen Stoppels
4693b323ac spack.mirror: split into submodules (#47936) 2024-12-05 18:09:08 +01:00
Kin Fai Tse
1f2a68f2b6 tar: conditionally link iconv (#47933)
* fix broken packages requiring iconv

* tar: -liconv only when libiconv

* Revert "fix broken packages requiring iconv"

This reverts commit 5fa426b52f.

---------

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-12-05 10:09:18 -06:00
Juan Miguel Carceller
3fcc38ef04 pandoramonitoring,pandorasdk: change docstrings that are wrong (#47937)
and are copied from the pandorapfa package

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-12-05 08:53:09 -07:00
Harmen Stoppels
22d104d7a9 ci: add bootstrap stack for python@3.6:3.13 (#47719)
Resurrect latest Python 3.6
Add clingo-bootstrap to Gitlab CI.
2024-12-05 10:07:24 +01:00
Todd Gamblin
8b1009a4a0 resource: clean up arguments and typing
- [x] Clean up arguments on the `resource` directive.
- [x] Add type annotations
- [x] Add `resource` to type annotations on `PackageBase`
- [x] Fix up `resource` docstrings

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-04 22:49:18 -08:00
Todd Gamblin
f54526957a directives: add type annotations to DirectiveMeta class
Some of the class-level annotations were wrong, and some were missing. Annotate all the
functions here and fix the class properties to match what's actually happening.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-04 22:49:18 -08:00
Todd Gamblin
175a4bf101 directives: use Type[PackageBase] instead of PackageBase
The first argument to each Spack directive is not a `PackageBase` instance but a
`PackageBase` class object, so fix the type annotations to reflect this.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-04 22:49:18 -08:00
Todd Gamblin
aa81d59958 directives: don't include Optional in PatchesType
`Optional` shouldn't be part of `PatchesType` -- it's clearer to specify `Optional` it
in the methods that need their arguments to be optional.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-12-04 22:49:18 -08:00
James Taliaferro
6aafefd43d package version: Neovim 0.10.2 (#47925) 2024-12-04 23:17:55 +01:00
Satish Balay
ac82f344bd trilinos@develop: update kokkos dependency (#47838) 2024-12-04 19:53:38 +01:00
Harmen Stoppels
16fd77f9da rust-bootstrap: fix zlib dependency (#47894)
x
2024-12-04 02:28:19 -08:00
Harmen Stoppels
f82554a39b stage.py: improve path to url (#47898) 2024-12-04 09:41:38 +01:00
Massimiliano Culpo
2aaf50b8f7 eigen: remove unnecessary dependency on fortran (#47866) 2024-12-04 08:18:40 +01:00
Mathew Cleveland
b0b9cf15f7 add a '+no_warning' variant to METIS to prevent pervasive warning (#47452)
* add a '+no_warning' variant to metis to prevent prevasive warning
* fix formating

---------

Co-authored-by: Cleveland <cleveland@lanl.gov>
Co-authored-by: mcourtois <mathieu.courtois@gmail.com>
2024-12-03 17:02:36 -08:00
v
8898e14e69 update py-numl and py-nugraph recipes (#47680)
* update py-numl and py-nugraph recipes

this commit adds the develop branch as a valid option for each of these two packages. in order to enable this, package tarballs are now retrieved from the github source repository instead of pypi, and their checksums and the build system have been updated accordingly.

* rename versions "develop" -> "main" to be consistent with branch name
2024-12-03 16:59:33 -08:00
Buldram
63c72634ea nim: add latest versions (#47844)
* nim: add latest versions
  In addition:
  - Create separate build and install phases.
  - Remove koch nimble call as it's redundant with koch tools.
  - Install all additional tools bundled with Nim instead of only Nimble.
* Fix 1.6 version
* nim: add devel
  In addition:
  - Fix build accessing user config/cache
2024-12-03 16:57:59 -08:00
Carson Woods
a7eacd77e3 bug fix: updated warning message to reflect impending v1.0 release (#47887) 2024-12-03 17:16:36 +01:00
Cédric Chevalier
09b7ea0400 Bump Kokkos and Kokkos-kernels to 4.5.00 (#47809)
* Bump Kokkos and Kokkos-kernels to 4.5.00

* petsc@:3.22 add a conflict with this new version of kokkos

* Update kokkos/kokkos-kernel dependency

---------

Co-authored-by: Satish Balay <balay@mcs.anl.gov>
2024-12-03 09:09:25 -07:00
Harmen Stoppels
b31dd46ab8 style.py: do not remove import spack in packages (#47895) 2024-12-03 16:04:18 +01:00
Harmen Stoppels
ad7417dee9 nwchem: add resource, remove patch (#47892)
fixes a build failure due to broken URL and improves nwchem build without internet
2024-12-03 14:09:05 +01:00
Wouter Deconinck
c3de3b0b6f tar: add v1.35 (fix CVEs) (#47426) 2024-12-03 13:26:04 +01:00
Harmen Stoppels
6da9bf226a python: drop nis module also for < 3.13 (#47862)
the nis module was removed in python 3.13
we had it default to ~nis
no package requires +nis
required dependencies for +nis were missing

so better to remove the nis module entirely.
2024-12-03 13:01:08 +01:00
Auriane R.
b3ee954e5b Remove duplicate version (#47880) 2024-12-03 10:14:47 +01:00
napulath
db090b0cad Update package.py (#47885) 2024-12-03 08:24:28 +01:00
Massimiliano Culpo
3a6c361a85 cgns: make fortran dependency optional (#47867) 2024-12-03 06:18:37 +01:00
Adam J. Stewart
bb5bd030d4 py-rasterio: add v1.4.3 (#47881) 2024-12-03 06:10:20 +01:00
dependabot[bot]
b9c60f96ea build(deps): bump pytest from 8.3.3 to 8.3.4 in /lib/spack/docs (#47882)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.3 to 8.3.4.
- [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.3...8.3.4)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 06:07:27 +01:00
Stephen Nicholas Swatman
6b16c64c0e acts dependencies: new versions as of 2024/12/02 (#47787)
* acts dependencies: new versions as of 2024/11/25

This commit adds a new version of detray and two new versions of vecmem.

* acts dependencies: new versions as of 2024/12/02

This commit adds version 38 of ACTS and a new version of detray.
2024-12-02 19:50:25 -06:00
Andrey Perestoronin
3ea970746d add compilers packages (#47877) 2024-12-02 15:53:56 -07:00
Satish Balay
d8f2e080e6 petsc, py-petsc4py: add v3.22.2 (#47845) 2024-12-02 14:21:31 -08:00
Harmen Stoppels
ecb8a48376 libseccomp: python forward compat bound (#47876)
* libseccomp: python forward compat bound

* include 2.5.5

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-12-02 14:59:40 -07:00
Massimiliano Culpo
30176582e4 py-torchvision: add dependency on c (#47873) 2024-12-02 22:23:58 +01:00
Massimiliano Culpo
ac17e8bea4 utf8cpp: move to GitHub, make it a CMake package (#47870) 2024-12-02 14:14:24 -07:00
Massimiliano Culpo
c30c85a99c seacas: add a conditional dependency on fortran (#47871)
* seacas: remove unnecessary dependency on fortran
* seacas: add a conditional dependency on fortran
2024-12-02 13:13:14 -08:00
Michael Schlottke-Lakemper
2ae8eb6686 Update HOHQmesh package with newer versions (#47861) 2024-12-02 12:29:45 -08:00
Jose E. Roman
b5cc5b701c New patch release SLEPc 3.22.2 (#47859) 2024-12-02 12:06:52 -08:00
Wouter Deconinck
8e7641e584 onnx: set CMAKE_CXX_STANDARD to abseil-cpp cxxstd value (#47858) 2024-12-02 11:56:33 -08:00
Weiqun Zhang
e692d401eb amrex: add v24.12 (#47857) 2024-12-02 11:55:08 -08:00
Massimiliano Culpo
99319b1d91 oneapi-level-zero: add dependency on c (#47874) 2024-12-02 12:48:49 -07:00
Satish Balay
839ed9447c trilinos@14.4.0 revert kokkos-kernel dependency - as this breaks builds (#47852) 2024-12-02 11:44:37 -08:00
afzpatel
8e5a040985 ucc: add ROCm and rccl support (#46580) 2024-12-02 20:43:53 +01:00
Stephen Nicholas Swatman
5ddbb1566d benchmark: add version 1.9.1 (#47860)
This commit adds version 1.9.1 of Google Benchmark.
2024-12-02 11:42:38 -08:00
Massimiliano Culpo
eb17680d28 double-conversion: add dependency on c, and c++ (#47869) 2024-12-02 12:38:16 -07:00
Massimiliano Culpo
f4d81be9cf py-torch-nvidia-apex: add dependency on C (#47868) 2024-12-02 20:37:33 +01:00
Massimiliano Culpo
ea5ffe35f5 configuration: set egl as buildable:false (#47865) 2024-12-02 11:33:01 -08:00
Wouter Deconinck
1e37a77e72 mlpack: depends_on py-setuptools (#47828) 2024-12-02 12:04:53 +01:00
9477 changed files with 26895 additions and 27632 deletions

View File

@@ -66,7 +66,7 @@ jobs:
./share/spack/qa/validate_last_exit.ps1
spack -d audit externals
./share/spack/qa/validate_last_exit.ps1
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
with:
name: coverage-audits-${{ matrix.system.os }}

View File

@@ -1,5 +1,3 @@
# (c) 2022 Lawrence Livermore National Laboratory
git config --global user.email "spack@example.com"
git config --global user.name "Test User"
git config --global core.longpaths true

View File

@@ -161,11 +161,7 @@ jobs:
source share/spack/setup-env.sh
spack -d gpg list
tree $HOME/.spack/bootstrap/store/
- name: Bootstrap File
run: |
source share/spack/setup-env.sh
spack -d python share/spack/qa/bootstrap-file.py
tree $HOME/.spack/bootstrap/store/
windows:
runs-on: "windows-latest"
@@ -196,9 +192,3 @@ jobs:
spack -d gpg list
./share/spack/qa/validate_last_exit.ps1
tree $env:userprofile/.spack/bootstrap/store/
- name: Bootstrap File
run: |
./share/spack/setup-env.ps1
spack -d python share/spack/qa/bootstrap-file.py
./share/spack/qa/validate_last_exit.ps1
tree $env:userprofile/.spack/bootstrap/store/

View File

@@ -94,7 +94,7 @@ jobs:
fi
- name: Upload Dockerfile
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: dockerfiles_${{ matrix.dockerfile[0] }}
path: dockerfiles
@@ -103,7 +103,7 @@ jobs:
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
- name: Log in to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
@@ -133,7 +133,7 @@ jobs:
needs: deploy-images
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
uses: actions/upload-artifact/merge@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: dockerfiles
pattern: dockerfiles_*

View File

@@ -32,3 +32,4 @@ jobs:
uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766
with:
verbose: true
fail_ci_if_error: false

View File

@@ -3,5 +3,5 @@ clingo==5.7.1
flake8==7.1.1
isort==5.13.2
mypy==1.8.0
types-six==1.16.21.20241105
types-six==1.17.0.20241205
vermin==1.6.0

View File

@@ -15,17 +15,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
on_develop:
- ${{ github.ref == 'refs/heads/develop' }}
include:
- python-version: '3.6'
os: ubuntu-20.04
on_develop: ${{ github.ref == 'refs/heads/develop' }}
exclude:
- python-version: '3.7'
os: ubuntu-latest
on_develop: false
os: ubuntu-22.04
on_develop: ${{ github.ref == 'refs/heads/develop' }}
exclude:
- python-version: '3.8'
os: ubuntu-latest
on_develop: false
@@ -52,7 +52,13 @@ jobs:
# Needed for unit tests
sudo apt-get -y install \
coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
cmake bison libbison-dev kcov
cmake bison libbison-dev subversion
# On ubuntu 24.04, kcov was removed. It may come back in some future Ubuntu
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@40e9946c182a64b3db1bf51be0dcb915f7802aa9
- name: Install kcov with brew
run: "brew install kcov"
- name: Install Python packages
run: |
pip install --upgrade pip setuptools pytest pytest-xdist pytest-cov
@@ -80,7 +86,7 @@ jobs:
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
run: |
share/spack/qa/run-unit-tests
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
path: coverage
@@ -99,7 +105,13 @@ jobs:
run: |
sudo apt-get -y update
# Needed for shell tests
sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash
sudo apt-get install -y coreutils csh zsh tcsh fish dash bash subversion
# On ubuntu 24.04, kcov was removed. It may come back in some future Ubuntu
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@40e9946c182a64b3db1bf51be0dcb915f7802aa9
- name: Install kcov with brew
run: "brew install kcov"
- name: Install Python packages
run: |
pip install --upgrade pip setuptools pytest coverage[toml] pytest-xdist
@@ -113,7 +125,7 @@ jobs:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: coverage-shell
path: coverage
@@ -128,13 +140,13 @@ jobs:
- name: Install dependencies
run: |
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
bzip2 curl gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git config --global --add safe.directory '*'
git fetch --unshallow
. .github/workflows/bin/setup_git.sh
useradd spack-test
@@ -175,7 +187,7 @@ jobs:
spack bootstrap status
spack solve zlib
spack unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml lib/spack/spack/test/concretization/core.py
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: coverage-clingo-cffi
path: coverage
@@ -213,7 +225,7 @@ jobs:
$(which spack) solve zlib
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
$(which spack) unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
path: coverage
@@ -244,7 +256,7 @@ jobs:
run: |
spack unit-test -x --verbose --cov --cov-config=pyproject.toml
./share/spack/qa/validate_last_exit.ps1
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: coverage-windows
path: coverage

View File

@@ -13,8 +13,7 @@ concurrency:
jobs:
# Validate that the code can be run on all the Python versions
# supported by Spack
# Validate that the code can be run on all the Python versions supported by Spack
validate:
runs-on: ubuntu-latest
steps:
@@ -74,7 +73,7 @@ jobs:
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git config --global --add safe.directory '*'
git fetch --unshallow
. .github/workflows/bin/setup_git.sh
useradd spack-test
@@ -87,6 +86,7 @@ jobs:
spack -d bootstrap now --dev
spack -d style -t black
spack unit-test -V
# Check we don't make the situation with circular imports worse
import-check:
runs-on: ubuntu-latest
steps:
@@ -121,28 +121,46 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: haampie/circular-import-fighter
ref: 9f60f51bc7134e0be73f27623f1b0357d1718427
ref: b5d6ce9be35f602cca7d5a6aa0259fca10639cca
path: circular-import-fighter
- name: Install dependencies
working-directory: circular-import-fighter
run: make -j dependencies
- name: Import cycles before
- name: Problematic imports before
working-directory: circular-import-fighter
run: make SPACK_ROOT=../old && cp solution solution.old
- name: Import cycles after
run: make SPACK_ROOT=../old SUFFIX=.old
- name: Problematic imports after
working-directory: circular-import-fighter
run: make clean-graph && make SPACK_ROOT=../new && cp solution solution.new
run: make SPACK_ROOT=../new SUFFIX=.new
- name: Compare import cycles
working-directory: circular-import-fighter
run: |
edges_before="$(grep -oP 'edges to delete: \K\d+' solution.old)"
edges_after="$(grep -oP 'edges to delete: \K\d+' solution.new)"
edges_before="$(head -n1 solution.old)"
edges_after="$(head -n1 solution.new)"
if [ "$edges_after" -gt "$edges_before" ]; then
printf '\033[1;31mImport check failed: %s imports need to be deleted, ' "$edges_after"
printf 'previously this was %s\033[0m\n' "$edges_before"
printf 'Compare \033[1;97m"Import cycles before"\033[0m and '
printf '\033[1;97m"Import cycles after"\033[0m to see problematic imports.\n'
printf 'Compare \033[1;97m"Problematic imports before"\033[0m and '
printf '\033[1;97m"Problematic imports after"\033[0m.\n'
exit 1
else
printf '\033[1;32mImport check passed: %s <= %s\033[0m\n' "$edges_after" "$edges_before"
fi
# Further style checks from pylint
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.13'
cache: 'pip'
- name: Install Python packages
run: |
pip install --upgrade pip setuptools pylint
- name: Pylint (Spack Core)
run: |
pylint -j 4 --disable=all --enable=unspecified-encoding --ignore-paths=lib/spack/external lib

View File

@@ -8,8 +8,9 @@ or http://www.apache.org/licenses/LICENSE-2.0) or the MIT license,
Copyrights and patents in the Spack project are retained by contributors.
No copyright assignment is required to contribute to Spack.
Spack was originally distributed under the LGPL-2.1 license. Consent from
contributors to relicense to Apache-2.0/MIT is documented at
Spack was originally developed in 2013 by Lawrence Livermore National
Security, LLC. It was originally distributed under the LGPL-2.1 license.
Consent from contributors to relicense to Apache-2.0/MIT is documented at
https://github.com/spack/spack/issues/9137.
@@ -102,6 +103,6 @@ PackageName: sbang
PackageHomePage: https://github.com/spack/sbang
PackageLicenseDeclared: Apache-2.0 OR MIT
PackageName: six
PackageHomePage: https://pypi.python.org/pypi/six
PackageLicenseDeclared: MIT
PackageName: typing_extensions
PackageHomePage: https://pypi.org/project/typing-extensions/
PackageLicenseDeclared: Python-2.0

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2013-2024 LLNS, LLC and other Spack Project Developers.
Copyright (c) Spack Project Developers.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import subprocess

View File

@@ -1,7 +1,6 @@
#!/bin/sh
#
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# sbang project developers. See the top-level COPYRIGHT file for details.
# Copyright sbang project developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,8 +1,7 @@
#!/bin/sh
# -*- python -*-
#
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,7 +1,6 @@
#!/bin/sh
#
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
:: Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
:: Spack Project Developers. See the top-level COPYRIGHT file for details.
:: Copyright Spack Project Developers. See COPYRIGHT file for details.
::
:: SPDX-License-Identifier: (Apache-2.0 OR MIT)
::#######################################################################

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# #######################################################################

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -194,6 +194,12 @@ config:
# executables with many dependencies, in particular on slow filesystems.
bind: false
# Controls the handling of missing dynamic libraries after installation.
# Options are ignore (default), warn, or error. If set to error, the
# installation fails if installed binaries reference dynamic libraries that
# are not found in their specified rpaths.
missing_library_policy: ignore
# Set to 'false' to allow installation on filesystems that doesn't allow setgid bit
# manipulation by unprivileged user (e.g. AFS)

View File

@@ -65,6 +65,7 @@ packages:
unwind: [libunwind]
uuid: [util-linux-uuid, libuuid]
wasi-sdk: [wasi-sdk-prebuilt]
xkbdata-api: [xkeyboard-config, xkbdata]
xxd: [xxd-standalone, vim]
yacc: [bison, byacc]
ziglang: [zig]
@@ -76,6 +77,8 @@ packages:
buildable: false
cray-mvapich2:
buildable: false
egl:
buildable: false
fujitsu-mpi:
buildable: false
hpcx-mpi:

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -265,25 +264,30 @@ infrastructure, or to cache Spack built binaries in Github Actions and
GitLab CI.
To get started, configure an OCI mirror using ``oci://`` as the scheme,
and optionally specify a username and password (or personal access token):
and optionally specify variables that hold the username and password (or
personal access token) for the registry:
.. code-block:: console
$ spack mirror add --oci-username username --oci-password password my_registry oci://example.com/my_image
$ spack mirror add --oci-username-variable REGISTRY_USER \
--oci-password-variable REGISTRY_TOKEN \
my_registry oci://example.com/my_image
Spack follows the naming conventions of Docker, with Dockerhub as the default
registry. To use Dockerhub, you can omit the registry domain:
.. code-block:: console
$ spack mirror add --oci-username username --oci-password password my_registry oci://username/my_image
$ spack mirror add ... my_registry oci://username/my_image
From here, you can use the mirror as any other build cache:
.. code-block:: console
$ export REGISTRY_USER=...
$ export REGISTRY_TOKEN=...
$ spack buildcache push my_registry <specs...> # push to the registry
$ spack install <specs...> # install from the registry
$ spack install <specs...> # or install from the registry
A unique feature of buildcaches on top of OCI registries is that it's incredibly
easy to generate get a runnable container image with the binaries installed. This

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -25,6 +24,14 @@ QMake does not appear to have a standardized way of specifying
the installation directory, so you may have to set environment
variables or edit ``*.pro`` files to get things working properly.
QMake packages will depend on the virtual ``qmake`` package which
is provided by multiple versions of Qt: ``qt`` provides Qt up to
Qt5, and ``qt-base`` provides Qt from version Qt6 onwards. This
split was motivated by the desire to split the single Qt package
into its components to allow for more fine-grained installation.
To depend on a specific version, refer to the documentation on
:ref:`virtual-dependencies`.
^^^^^^
Phases
^^^^^^

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -207,6 +206,7 @@ def setup(sphinx):
("py:class", "TextIO"),
("py:class", "hashlib._Hash"),
("py:class", "concurrent.futures._base.Executor"),
("py:class", "jsonschema.exceptions.ValidationError"),
# Spack classes that are private and we don't want to expose
("py:class", "spack.provider_index._IndexBase"),
("py:class", "spack.repo._PrependFileLoader"),

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -38,9 +37,11 @@ just have to configure and OCI registry and run ``spack buildcache push``.
spack -e . install
# Configure the registry
spack -e . mirror add --oci-username ... --oci-password ... container-registry oci://example.com/name/image
spack -e . mirror add --oci-username-variable REGISTRY_USER \
--oci-password-variable REGISTRY_TOKEN \
container-registry oci://example.com/name/image
# Push the image
# Push the image (do set REGISTRY_USER and REGISTRY_TOKEN)
spack -e . buildcache push --update-index --base-image ubuntu:22.04 --tag my_env container-registry
The resulting container image can then be run as follows:

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -178,8 +177,8 @@ Spec-related modules
Contains :class:`~spack.spec.Spec`. Also implements most of the logic for concretization
of specs.
:mod:`spack.parser`
Contains :class:`~spack.parser.SpecParser` and functions related to parsing specs.
:mod:`spack.spec_parser`
Contains :class:`~spack.spec_parser.SpecParser` and functions related to parsing specs.
:mod:`spack.version`
Implements a simple :class:`~spack.version.Version` class with simple

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -35,7 +34,7 @@ A build matrix showing which packages are working on which systems is shown belo
.. code-block:: console
apt update
apt install bzip2 ca-certificates file g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd
apt install bzip2 ca-certificates g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd
.. tab-item:: RHEL
@@ -148,20 +147,22 @@ The first time you concretize a spec, Spack will bootstrap automatically:
--------------------------------
zlib@1.2.13%gcc@9.4.0+optimize+pic+shared build_system=makefile arch=linux-ubuntu20.04-icelake
The default bootstrap behavior is to use pre-built binaries. You can verify the
active bootstrap repositories with:
.. command-output:: spack bootstrap list
If for security concerns you cannot bootstrap ``clingo`` from pre-built
binaries, you have to disable fetching the binaries we generated with Github Actions.
.. code-block:: console
$ spack bootstrap disable github-actions-v0.4
==> "github-actions-v0.4" is now disabled and will not be used for bootstrapping
$ spack bootstrap disable github-actions-v0.3
==> "github-actions-v0.3" is now disabled and will not be used for bootstrapping
You can verify that the new settings are effective with:
.. command-output:: spack bootstrap list
$ spack bootstrap disable github-actions-v0.6
==> "github-actions-v0.6" is now disabled and will not be used for bootstrapping
$ spack bootstrap disable github-actions-v0.5
==> "github-actions-v0.5" is now disabled and will not be used for bootstrapping
You can verify that the new settings are effective with ``spack bootstrap list``.
.. note::

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -237,8 +236,7 @@ for details):
.. code-block:: python
:linenos:
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -4900,15 +4898,15 @@ If your package has a virtual dependency like ``mpi``, then referring to
``spec["mpi"]`` within ``install()`` will get you the concrete ``mpi``
implementation in your dependency DAG. That is a spec object just like
the one passed to install, only the MPI implementations all set some
additional properties on it to help you out. E.g., in mvapich2, you'll
additional properties on it to help you out. E.g., in openmpi, you'll
find this:
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/mvapich2/package.py
:pyobject: Mvapich2.setup_dependent_package
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/openmpi/package.py
:pyobject: Openmpi.setup_dependent_package
That code allows the mvapich2 package to associate an ``mpicc`` property
with the ``mvapich2`` node in the DAG, so that dependents can access it.
``openmpi`` and ``mpich`` do similar things. So, no matter what MPI
That code allows the ``openmpi`` package to associate an ``mpicc`` property
with the ``openmpi`` node in the DAG, so that dependents can access it.
``mvapich2`` and ``mpich`` do similar things. So, no matter what MPI
you're using, spec["mpi"].mpicc gets you the location of the MPI
compilers. This allows us to have a fairly simple polymorphic interface
for information about virtual dependencies like MPI.
@@ -5137,7 +5135,7 @@ other checks.
- Not applicable
* - :ref:`PythonPackage <pythonpackage>`
- Not applicable
- ``test`` (module imports)
- ``test_imports`` (module imports)
* - :ref:`QMakePackage <qmakepackage>`
- ``check`` (``make check``)
- Not applicable
@@ -5146,7 +5144,7 @@ other checks.
- Not applicable
* - :ref:`SIPPackage <sippackage>`
- Not applicable
- ``test`` (module imports)
- ``test_imports`` (module imports)
* - :ref:`WafPackage <wafpackage>`
- ``build_test`` (must be overridden)
- ``install_test`` (must be overridden)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,12 +1,12 @@
sphinx==8.1.3
sphinxcontrib-programoutput==0.17
sphinxcontrib-programoutput==0.18
sphinx_design==0.6.1
sphinx-rtd-theme==3.0.2
python-levenshtein==0.26.1
docutils==0.21.2
pygments==2.18.0
urllib3==2.2.3
pytest==8.3.3
urllib3==2.3.0
pytest==8.3.4
isort==5.13.2
black==24.10.0
flake8==7.1.1

View File

@@ -1,5 +1,4 @@
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -8,7 +8,6 @@ unzip, , , Compress/Decompress archives
bzip2, , , Compress/Decompress archives
xz, , , Compress/Decompress archives
zstd, , Optional, Compress/Decompress archives
file, , , Create/Use Buildcaches
lsb-release, , , Linux: identify operating system version
gnupg2, , , Sign/Verify Buildcaches
git, , , Manage Software Repositories
1 Name Supported Versions Notes Requirement Reason
8 bzip2 Compress/Decompress archives
9 xz Compress/Decompress archives
10 zstd Optional Compress/Decompress archives
file Create/Use Buildcaches
11 lsb-release Linux: identify operating system version
12 gnupg2 Sign/Verify Buildcaches
13 git Manage Software Repositories

3
lib/spack/env/cc vendored
View File

@@ -1,8 +1,7 @@
#!/bin/sh -f
# shellcheck disable=SC2034 # evals in this script fool shellcheck
#
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -0,0 +1,254 @@
A. HISTORY OF THE SOFTWARE
==========================
Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC. Guido remains Python's
principal author, although it includes many contributions from others.
In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.
In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
year, the PythonLabs team moved to Digital Creations (now Zope
Corporation, see http://www.zope.com). In 2001, the Python Software
Foundation (PSF, see http://www.python.org/psf/) was formed, a
non-profit organization created specifically to own Python-related
Intellectual Property. Zope Corporation is a sponsoring member of
the PSF.
All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition). Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.
Release Derived Year Owner GPL-
from compatible? (1)
0.9.0 thru 1.2 1991-1995 CWI yes
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
1.6 1.5.2 2000 CNRI no
2.0 1.6 2000 BeOpen.com no
1.6.1 1.6 2001 CNRI yes (2)
2.1 2.0+1.6.1 2001 PSF no
2.0.1 2.0+1.6.1 2001 PSF yes
2.1.1 2.1+2.0.1 2001 PSF yes
2.1.2 2.1.1 2002 PSF yes
2.1.3 2.1.2 2002 PSF yes
2.2 and above 2.1.1 2001-now PSF yes
Footnotes:
(1) GPL-compatible doesn't mean that we're distributing Python under
the GPL. All Python licenses, unlike the GPL, let you distribute
a modified version without making your changes open source. The
GPL-compatible licenses make it possible to combine Python with
other software that is released under the GPL; the others don't.
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
because its license has a choice of law clause. According to
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
is "not incompatible" with the GPL.
Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------
1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014 Python Software Foundation; All Rights Reserved" are
retained in Python alone or in any derivative version prepared by Licensee.
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.
4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").
2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.
3. BeOpen is making the Software available to Licensee on an "AS IS"
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions. Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee. This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party. As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.
7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------
1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.
2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee. Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement. This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013. This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee. This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.
8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.
ACCEPT
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands. All rights reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
from typing_extensions import *

View File

@@ -8,3 +8,4 @@ six==1.16.0
macholib==1.16.2
altgraph==0.17.3
ruamel.yaml==0.17.21
typing_extensions==4.1.1

View File

@@ -1,4 +1,3 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Path primitives that just require Python standard library."""
@@ -66,7 +65,7 @@ def _is_url(path_or_url: str) -> bool:
return result
def system_path_filter(_func=None, arg_slice: Optional[slice] = None):
def _system_path_filter(_func=None, arg_slice: Optional[slice] = None):
"""Filters function arguments to account for platform path separators.
Optional slicing range can be specified to select specific arguments
@@ -100,6 +99,16 @@ def path_filter_caller(*args, **kwargs):
return holder_func
def _noop_decorator(_func=None, arg_slice: Optional[slice] = None):
return _func if _func else lambda x: x
if sys.platform == "win32":
system_path_filter = _system_path_filter
else:
system_path_filter = _noop_decorator
def sanitize_win_longpath(path: str) -> str:
"""Strip Windows extended path prefix from strings
Returns sanitized string.

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""String manipulation functions that do not have other dependencies than Python

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""URL primitives that just require Python standard library."""

View File

@@ -1,4 +1,3 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
@@ -301,35 +300,32 @@ def filter_file(
ignore_absent: bool = False,
start_at: Optional[str] = None,
stop_at: Optional[str] = None,
encoding: Optional[str] = "utf-8",
) -> None:
r"""Like sed, but uses python regular expressions.
Filters every line of each file through regex and replaces the file
with a filtered version. Preserves mode of filtered files.
Filters every line of each file through regex and replaces the file with a filtered version.
Preserves mode of filtered files.
As with re.sub, ``repl`` can be either a string or a callable.
If it is a callable, it is passed the match object and should
return a suitable replacement string. If it is a string, it
can contain ``\1``, ``\2``, etc. to represent back-substitution
as sed would allow.
As with re.sub, ``repl`` can be either a string or a callable. If it is a callable, it is
passed the match object and should return a suitable replacement string. If it is a string, it
can contain ``\1``, ``\2``, etc. to represent back-substitution as sed would allow.
Args:
regex (str): The regular expression to search for
repl (str): The string to replace matches with
*filenames: One or more files to search and replace
string (bool): Treat regex as a plain string. Default it False
backup (bool): Make backup file(s) suffixed with ``~``. Default is False
ignore_absent (bool): Ignore any files that don't exist.
Default is False
start_at (str): Marker used to start applying the replacements. If a
text line matches this marker filtering is started at the next line.
All contents before the marker and the marker itself are copied
verbatim. Default is to start filtering from the first line of the
file.
stop_at (str): Marker used to stop scanning the file further. If a text
line matches this marker filtering is stopped and the rest of the
file is copied verbatim. Default is to filter until the end of the
file.
regex: The regular expression to search for
repl: The string to replace matches with
*filenames: One or more files to search and replace string: Treat regex as a plain string.
Default it False backup: Make backup file(s) suffixed with ``~``. Default is False
ignore_absent: Ignore any files that don't exist. Default is False
start_at: Marker used to start applying the replacements. If a text line matches this
marker filtering is started at the next line. All contents before the marker and the
marker itself are copied verbatim. Default is to start filtering from the first line of
the file.
stop_at: Marker used to stop scanning the file further. If a text line matches this marker
filtering is stopped and the rest of the file is copied verbatim. Default is to filter
until the end of the file.
encoding: The encoding to use when reading and writing the files. Default is None, which
uses the system's default encoding.
"""
# Allow strings to use \1, \2, etc. for replacement, like sed
if not callable(repl):
@@ -345,72 +341,56 @@ def groupid_to_group(x):
if string:
regex = re.escape(regex)
for filename in path_to_os_path(*filenames):
msg = 'FILTER FILE: {0} [replacing "{1}"]'
tty.debug(msg.format(filename, regex))
backup_filename = filename + "~"
tmp_filename = filename + ".spack~"
if ignore_absent and not os.path.exists(filename):
msg = 'FILTER FILE: file "{0}" not found. Skipping to next file.'
tty.debug(msg.format(filename))
regex_compiled = re.compile(regex)
for path in path_to_os_path(*filenames):
if ignore_absent and not os.path.exists(path):
tty.debug(f'FILTER FILE: file "{path}" not found. Skipping to next file.')
continue
else:
tty.debug(f'FILTER FILE: {path} [replacing "{regex}"]')
# Create backup file. Don't overwrite an existing backup
# file in case this file is being filtered multiple times.
if not os.path.exists(backup_filename):
shutil.copy(filename, backup_filename)
fd, temp_path = tempfile.mkstemp(
prefix=f"{os.path.basename(path)}.", dir=os.path.dirname(path)
)
os.close(fd)
# Create a temporary file to read from. We cannot use backup_filename
# in case filter_file is invoked multiple times on the same file.
shutil.copy(filename, tmp_filename)
shutil.copy(path, temp_path)
errored = False
try:
# Open as a text file and filter until the end of the file is
# reached, or we found a marker in the line if it was specified
#
# To avoid translating line endings (\n to \r\n and vice-versa)
# we force os.open to ignore translations and use the line endings
# the file comes with
with open(tmp_filename, mode="r", errors="surrogateescape", newline="") as input_file:
with open(filename, mode="w", errors="surrogateescape", newline="") as output_file:
do_filtering = start_at is None
# Using iter and readline is a workaround needed not to
# disable input_file.tell(), which will happen if we call
# input_file.next() implicitly via the for loop
for line in iter(input_file.readline, ""):
if stop_at is not None:
current_position = input_file.tell()
# Open as a text file and filter until the end of the file is reached, or we found a
# marker in the line if it was specified. To avoid translating line endings (\n to
# \r\n and vice-versa) use newline="".
with open(
temp_path, mode="r", errors="surrogateescape", newline="", encoding=encoding
) as input_file, open(
path, mode="w", errors="surrogateescape", newline="", encoding=encoding
) as output_file:
if start_at is None and stop_at is None: # common case, avoids branching in loop
for line in input_file:
output_file.write(re.sub(regex_compiled, repl, line))
else:
# state is -1 before start_at; 0 between; 1 after stop_at
state = 0 if start_at is None else -1
for line in input_file:
if state == 0:
if stop_at == line.strip():
output_file.write(line)
break
if do_filtering:
filtered_line = re.sub(regex, repl, line)
output_file.write(filtered_line)
else:
do_filtering = start_at == line.strip()
output_file.write(line)
else:
current_position = None
# If we stopped filtering at some point, reopen the file in
# binary mode and copy verbatim the remaining part
if current_position and stop_at:
with open(tmp_filename, mode="rb") as input_binary_buffer:
input_binary_buffer.seek(current_position)
with open(filename, mode="ab") as output_binary_buffer:
output_binary_buffer.writelines(input_binary_buffer.readlines())
state = 1
else:
line = re.sub(regex_compiled, repl, line)
elif state == -1 and start_at == line.strip():
state = 0
output_file.write(line)
except BaseException:
# clean up the original file on failure.
shutil.move(backup_filename, filename)
# restore the original file
os.rename(temp_path, path)
errored = True
raise
finally:
os.remove(tmp_filename)
if not backup and os.path.exists(backup_filename):
os.remove(backup_filename)
if not errored and not backup:
os.unlink(temp_path)
class FileFilter:
@@ -1115,12 +1095,12 @@ def hash_directory(directory, ignore=[]):
@contextmanager
@system_path_filter
def write_tmp_and_move(filename):
def write_tmp_and_move(filename: str, *, encoding: Optional[str] = None):
"""Write to a temporary file, then move into place."""
dirname = os.path.dirname(filename)
basename = os.path.basename(filename)
tmp = os.path.join(dirname, ".%s.tmp" % basename)
with open(tmp, "w") as f:
with open(tmp, "w", encoding=encoding) as f:
yield f
shutil.move(tmp, filename)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -863,8 +862,10 @@ def elide_list(line_list: List[str], max_num: int = 10) -> List[str]:
if sys.version_info >= (3, 9):
PatternStr = re.Pattern[str]
PatternBytes = re.Pattern[bytes]
else:
PatternStr = typing.Pattern[str]
PatternBytes = typing.Pattern[bytes]
def fnmatch_translate_multiple(named_patterns: Dict[str, str]) -> str:

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -96,8 +95,8 @@ def get_fh(self, path: str) -> IO:
Arguments:
path: path to lock file we want a filehandle for
"""
# Open writable files as 'r+' so we can upgrade to write later
os_mode, fh_mode = (os.O_RDWR | os.O_CREAT), "r+"
# Open writable files as rb+ so we can upgrade to write later
os_mode, fh_mode = (os.O_RDWR | os.O_CREAT), "rb+"
pid = os.getpid()
open_file = None # OpenFile object, if there is one
@@ -124,7 +123,7 @@ def get_fh(self, path: str) -> IO:
# we know path exists but not if it's writable. If it's read-only,
# only open the file for reading (and fail if we're trying to get
# an exclusive (write) lock on it)
os_mode, fh_mode = os.O_RDONLY, "r"
os_mode, fh_mode = os.O_RDONLY, "rb"
fd = os.open(path, os_mode)
fh = os.fdopen(fd, fh_mode)
@@ -243,7 +242,7 @@ def __init__(
helpful for distinguishing between different Spack locks.
"""
self.path = path
self._file: Optional[IO] = None
self._file: Optional[IO[bytes]] = None
self._reads = 0
self._writes = 0
@@ -329,9 +328,9 @@ def _lock(self, op: int, timeout: Optional[float] = None) -> Tuple[float, int]:
self._ensure_parent_directory()
self._file = FILE_TRACKER.get_fh(self.path)
if LockType.to_module(op) == fcntl.LOCK_EX and self._file.mode == "r":
if LockType.to_module(op) == fcntl.LOCK_EX and self._file.mode == "rb":
# Attempt to upgrade to write lock w/a read-only file.
# If the file were writable, we'd have opened it 'r+'
# If the file were writable, we'd have opened it rb+
raise LockROFileError(self.path)
self._log_debug(
@@ -426,7 +425,7 @@ def _read_log_debug_data(self) -> None:
line = self._file.read()
if line:
pid, host = line.strip().split(",")
pid, host = line.decode("utf-8").strip().split(",")
_, _, pid = pid.rpartition("=")
_, _, self.host = host.rpartition("=")
self.pid = int(pid)
@@ -442,7 +441,7 @@ def _write_log_debug_data(self) -> None:
# write pid, host to disk to sync over FS
self._file.seek(0)
self._file.write("pid=%s,host=%s" % (self.pid, self.host))
self._file.write(f"pid={self.pid},host={self.host}".encode("utf-8"))
self._file.truncate()
self._file.flush()
os.fsync(self._file.fileno())

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -161,7 +160,7 @@ def _err_check(result, func, args):
)
# Use conout$ here to handle a redirectired stdout/get active console associated
# with spack
with open(r"\\.\CONOUT$", "w") as conout:
with open(r"\\.\CONOUT$", "w", encoding="utf-8") as conout:
# Link above would use kernel32.GetStdHandle(-11) however this would not handle
# a redirected stdout appropriately, so we always refer to the current CONSOLE out
# which is defined as conout$ on Windows.

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -762,7 +761,7 @@ def __enter__(self):
self.reader = open(self.logfile, mode="rb+")
# Dup stdout so we can still write to it after redirection
self.echo_writer = open(os.dup(sys.stdout.fileno()), "w")
self.echo_writer = open(os.dup(sys.stdout.fileno()), "w", encoding=sys.stdout.encoding)
# Redirect stdout and stderr to write to logfile
self.stderr.redirect_stream(self.writer.fileno())
self.stdout.redirect_stream(self.writer.fileno())
@@ -879,10 +878,13 @@ def _writer_daemon(
write_fd.close()
# 1. Use line buffering (3rd param = 1) since Python 3 has a bug
# that prevents unbuffered text I/O.
# 2. Python 3.x before 3.7 does not open with UTF-8 encoding by default
# that prevents unbuffered text I/O. [needs citation]
# 2. Enforce a UTF-8 interpretation of build process output with errors replaced by '?'.
# The downside is that the log file will not contain the exact output of the build process.
# 3. closefd=False because Connection has "ownership"
read_file = os.fdopen(read_fd.fileno(), "r", 1, encoding="utf-8", closefd=False)
read_file = os.fdopen(
read_fd.fileno(), "r", 1, encoding="utf-8", errors="replace", closefd=False
)
if stdin_fd:
stdin_file = os.fdopen(stdin_fd.fileno(), closefd=False)
@@ -928,11 +930,7 @@ def _writer_daemon(
try:
while line_count < 100:
# Handle output from the calling process.
try:
line = _retry(read_file.readline)()
except UnicodeDecodeError:
# installs like --test=root gpgme produce non-UTF8 logs
line = "<line lost: output was not encoded as UTF-8>\n"
line = _retry(read_file.readline)()
if not line:
return
@@ -946,6 +944,13 @@ def _writer_daemon(
output_line = clean_line
if filter_fn:
output_line = filter_fn(clean_line)
enc = sys.stdout.encoding
if enc != "utf-8":
# On Python 3.6 and 3.7-3.14 with non-{utf-8,C} locale stdout
# may not be able to handle utf-8 output. We do an inefficient
# dance of re-encoding with errors replaced, so stdout.write
# does not raise.
output_line = output_line.encode(enc, "replace").decode(enc)
sys.stdout.write(output_line)
# Stripped output to log file.

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Classes and functions to register audit checks for various parts of
@@ -656,7 +655,7 @@ def _ensure_docstring_and_no_fixme(pkgs, error_cls):
for pkg_name in pkgs:
details = []
filename = spack.repo.PATH.filename_for_package_name(pkg_name)
with open(filename, "r") as package_file:
with open(filename, "r", encoding="utf-8") as package_file:
for i, line in enumerate(package_file):
pattern = next((r for r in fixme_regexes if r.search(line)), None)
if pattern:
@@ -693,19 +692,19 @@ def invalid_sha256_digest(fetcher):
return h, True
return None, False
error_msg = "Package '{}' does not use sha256 checksum".format(pkg_name)
error_msg = f"Package '{pkg_name}' does not use sha256 checksum"
details = []
for v, args in pkg.versions.items():
fetcher = spack.fetch_strategy.for_package_version(pkg, v)
digest, is_bad = invalid_sha256_digest(fetcher)
if is_bad:
details.append("{}@{} uses {}".format(pkg_name, v, digest))
details.append(f"{pkg_name}@{v} uses {digest}")
for _, resources in pkg.resources.items():
for resource in resources:
digest, is_bad = invalid_sha256_digest(resource.fetcher)
if is_bad:
details.append("Resource in '{}' uses {}".format(pkg_name, digest))
details.append(f"Resource in '{pkg_name}' uses {digest}")
if details:
errors.append(error_cls(error_msg, details))
@@ -809,7 +808,7 @@ def _uses_deprecated_globals(pkgs, error_cls):
continue
file = spack.repo.PATH.filename_for_package_name(pkg_name)
tree = ast.parse(open(file).read())
tree = ast.parse(open(file, "rb").read())
visitor = DeprecatedMagicGlobals(("std_cmake_args", "std_meson_args", "std_pip_args"))
visitor.visit(tree)
if visitor.references_to_globals:
@@ -1009,20 +1008,6 @@ def _issues_in_depends_on_directive(pkgs, error_cls):
for when, deps_by_name in pkg_cls.dependencies.items():
for dep_name, dep in deps_by_name.items():
# Check if there are nested dependencies declared. We don't want directives like:
#
# depends_on('foo+bar ^fee+baz')
#
# but we'd like to have two dependencies listed instead.
nested_dependencies = dep.spec.dependencies()
if nested_dependencies:
summary = f"{pkg_name}: nested dependency declaration '{dep.spec}'"
ndir = len(nested_dependencies) + 1
details = [
f"split depends_on('{dep.spec}', when='{when}') into {ndir} directives",
f"in {filename}",
]
errors.append(error_cls(summary=summary, details=details))
def check_virtual_with_variants(spec, msg):
if not spec.virtual or not spec.variants:

View File

@@ -1,5 +1,4 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -24,13 +23,12 @@
import urllib.request
import warnings
from contextlib import closing
from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, Union
from typing import IO, Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, Union
import llnl.util.filesystem as fsys
import llnl.util.lang
import llnl.util.tty as tty
from llnl.util.filesystem import BaseDirectoryVisitor, mkdirp, visit_directory_tree
from llnl.util.symlink import readlink
from llnl.util.filesystem import mkdirp
import spack.caches
import spack.config as config
@@ -40,7 +38,7 @@
import spack.hash_types as ht
import spack.hooks
import spack.hooks.sbang
import spack.mirror
import spack.mirrors.mirror
import spack.oci.image
import spack.oci.oci
import spack.oci.opener
@@ -54,7 +52,6 @@
import spack.util.archive
import spack.util.crypto
import spack.util.file_cache as file_cache
import spack.util.filesystem as ssys
import spack.util.gpg
import spack.util.parallel
import spack.util.path
@@ -69,10 +66,8 @@
Digest,
ImageReference,
default_config,
default_index_tag,
default_manifest,
default_tag,
tag_is_spec,
ensure_valid_tag,
)
from spack.oci.oci import (
copy_missing_layers_with_retry,
@@ -83,7 +78,6 @@
)
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
from spack.stage import Stage
from spack.util.executable import which
@@ -369,7 +363,7 @@ def update(self, with_cooldown=False):
on disk under ``_index_cache_root``)."""
self._init_local_index_cache()
configured_mirror_urls = [
m.fetch_url for m in spack.mirror.MirrorCollection(binary=True).values()
m.fetch_url for m in spack.mirrors.mirror.MirrorCollection(binary=True).values()
]
items_to_remove = []
spec_cache_clear_needed = False
@@ -586,133 +580,15 @@ def buildinfo_file_name(prefix):
def read_buildinfo_file(prefix):
"""Read buildinfo file"""
with open(buildinfo_file_name(prefix), "r") as f:
with open(buildinfo_file_name(prefix), "r", encoding="utf-8") as f:
return syaml.load(f)
class BuildManifestVisitor(BaseDirectoryVisitor):
"""Visitor that collects a list of files and symlinks
that can be checked for need of relocation. It knows how
to dedupe hardlinks and deal with symlinks to files and
directories."""
def __init__(self):
# Save unique identifiers of hardlinks to avoid relocating them multiple times
self.visited = set()
# Lists of files we will check
self.files = []
self.symlinks = []
def seen_before(self, root, rel_path):
stat_result = os.lstat(os.path.join(root, rel_path))
if stat_result.st_nlink == 1:
return False
identifier = (stat_result.st_dev, stat_result.st_ino)
if identifier in self.visited:
return True
else:
self.visited.add(identifier)
return False
def visit_file(self, root, rel_path, depth):
if self.seen_before(root, rel_path):
return
self.files.append(rel_path)
def visit_symlinked_file(self, root, rel_path, depth):
# Note: symlinks *can* be hardlinked, but it is unclear if
# symlinks can be relinked in-place (preserving inode).
# Therefore, we do *not* de-dupe hardlinked symlinks.
self.symlinks.append(rel_path)
def before_visit_dir(self, root, rel_path, depth):
return os.path.basename(rel_path) not in (".spack", "man")
def before_visit_symlinked_dir(self, root, rel_path, depth):
# Treat symlinked directories simply as symlinks.
self.visit_symlinked_file(root, rel_path, depth)
# Never recurse into symlinked directories.
return False
def file_matches(path, regex):
with open(path, "rb") as f:
contents = f.read()
return bool(regex.search(contents))
def get_buildfile_manifest(spec):
"""
Return a data structure with information about a build, including
text_to_relocate, binary_to_relocate, binary_to_relocate_fullpath
link_to_relocate, and other, which means it doesn't fit any of previous
checks (and should not be relocated). We exclude docs (man) and
metadata (.spack). This can be used to find a particular kind of file
in spack, or to generate the build metadata.
"""
data = {
"text_to_relocate": [],
"binary_to_relocate": [],
"link_to_relocate": [],
"other": [],
"binary_to_relocate_fullpath": [],
"hardlinks_deduped": True,
}
# Guard against filesystem footguns of hardlinks and symlinks by using
# a visitor to retrieve a list of files and symlinks, so we don't have
# to worry about hardlinks of symlinked dirs and what not.
visitor = BuildManifestVisitor()
root = spec.prefix
visit_directory_tree(root, visitor)
# Collect a list of prefixes for this package and it's dependencies, Spack will
# look for them to decide if text file needs to be relocated or not
prefixes = [d.prefix for d in spec.traverse(root=True, deptype="all") if not d.external]
prefixes.append(spack.hooks.sbang.sbang_install_path())
prefixes.append(str(spack.store.STORE.layout.root))
# Create a giant regex that matches all prefixes
regex = utf8_paths_to_single_binary_regex(prefixes)
# Symlinks.
# Obvious bugs:
# 1. relative links are not relocated.
# 2. paths are used as strings.
for rel_path in visitor.symlinks:
abs_path = os.path.join(root, rel_path)
link = readlink(abs_path)
if os.path.isabs(link) and link.startswith(spack.store.STORE.layout.root):
data["link_to_relocate"].append(rel_path)
# Non-symlinks.
for rel_path in visitor.files:
abs_path = os.path.join(root, rel_path)
m_type, m_subtype = ssys.mime_type(abs_path)
if relocate.needs_binary_relocation(m_type, m_subtype):
# Why is this branch not part of needs_binary_relocation? :(
if (
(
m_subtype in ("x-executable", "x-sharedlib", "x-pie-executable")
and sys.platform != "darwin"
)
or (m_subtype in ("x-mach-binary") and sys.platform == "darwin")
or (not rel_path.endswith(".o"))
):
data["binary_to_relocate"].append(rel_path)
data["binary_to_relocate_fullpath"].append(abs_path)
continue
elif relocate.needs_text_relocation(m_type, m_subtype) and file_matches(abs_path, regex):
data["text_to_relocate"].append(rel_path)
continue
data["other"].append(abs_path)
return data
def file_matches(f: IO[bytes], regex: llnl.util.lang.PatternBytes) -> bool:
try:
return bool(regex.search(f.read()))
finally:
f.seek(0)
def deps_to_relocate(spec):
@@ -745,17 +621,15 @@ def deps_to_relocate(spec):
def get_buildinfo_dict(spec):
"""Create metadata for a tarball"""
manifest = get_buildfile_manifest(spec)
return {
"sbang_install_path": spack.hooks.sbang.sbang_install_path(),
"buildpath": spack.store.STORE.layout.root,
"spackprefix": spack.paths.prefix,
"relative_prefix": os.path.relpath(spec.prefix, spack.store.STORE.layout.root),
"relocate_textfiles": manifest["text_to_relocate"],
"relocate_binaries": manifest["binary_to_relocate"],
"relocate_links": manifest["link_to_relocate"],
"hardlinks_deduped": manifest["hardlinks_deduped"],
# "relocate_textfiles": [],
# "relocate_binaries": [],
# "relocate_links": [],
"hardlinks_deduped": True,
"hash_to_prefix": {d.dag_hash(): str(d.prefix) for d in deps_to_relocate(spec)},
}
@@ -827,10 +701,10 @@ def _read_specs_and_push_index(
contents = read_method(file)
# Need full spec.json name or this gets confused with index.json.
if file.endswith(".json.sig"):
specfile_json = Spec.extract_json_from_clearsig(contents)
fetched_spec = Spec.from_dict(specfile_json)
specfile_json = spack.spec.Spec.extract_json_from_clearsig(contents)
fetched_spec = spack.spec.Spec.from_dict(specfile_json)
elif file.endswith(".json"):
fetched_spec = Spec.from_json(contents)
fetched_spec = spack.spec.Spec.from_json(contents)
else:
continue
@@ -840,17 +714,17 @@ def _read_specs_and_push_index(
# Now generate the index, compute its hash, and push the two files to
# the mirror.
index_json_path = os.path.join(temp_dir, "index.json")
with open(index_json_path, "w") as f:
with open(index_json_path, "w", encoding="utf-8") as f:
db._write_to_file(f)
# Read the index back in and compute its hash
with open(index_json_path) as f:
with open(index_json_path, encoding="utf-8") as f:
index_string = f.read()
index_hash = compute_hash(index_string)
# Write the hash out to a local file
index_hash_path = os.path.join(temp_dir, "index.json.hash")
with open(index_hash_path, "w") as f:
with open(index_hash_path, "w", encoding="utf-8") as f:
f.write(index_hash)
# Push the index itself
@@ -884,7 +758,7 @@ def _specs_from_cache_aws_cli(cache_prefix):
aws = which("aws")
def file_read_method(file_path):
with open(file_path) as fd:
with open(file_path, encoding="utf-8") as fd:
return fd.read()
tmpspecsdir = tempfile.mkdtemp()
@@ -1029,7 +903,7 @@ def generate_key_index(key_prefix: str, tmpdir: str) -> None:
target = os.path.join(tmpdir, "index.json")
index = {"keys": dict((fingerprint, {}) for fingerprint in sorted(set(fingerprints)))}
with open(target, "w") as f:
with open(target, "w", encoding="utf-8") as f:
sjson.dump(index, f)
try:
@@ -1045,7 +919,55 @@ def generate_key_index(key_prefix: str, tmpdir: str) -> None:
) from e
def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
class FileTypes:
BINARY = 0
TEXT = 1
UNKNOWN = 2
NOT_ISO8859_1_TEXT = re.compile(b"[\x00\x7F-\x9F]")
def file_type(f: IO[bytes]) -> int:
try:
# first check if this is an ELF or mach-o binary.
magic = f.read(8)
if len(magic) < 8:
return FileTypes.UNKNOWN
elif relocate.is_elf_magic(magic) or relocate.is_macho_magic(magic):
return FileTypes.BINARY
f.seek(0)
# Then try utf-8, which has a fast exponential decay in false positive rate with file size.
# Use chunked reads for fast early exit.
f_txt = io.TextIOWrapper(f, encoding="utf-8", errors="strict")
try:
while f_txt.read(1024):
pass
return FileTypes.TEXT
except UnicodeError:
f_txt.seek(0)
pass
finally:
f_txt.detach()
# Finally try iso-8859-1 heuristically. In Python, all possible 256 byte values are valid.
# We classify it as text if it does not contain any control characters / null bytes.
data = f.read(1024)
while data:
if NOT_ISO8859_1_TEXT.search(data):
break
data = f.read(1024)
else:
return FileTypes.TEXT
return FileTypes.UNKNOWN
finally:
f.seek(0)
def tarfile_of_spec_prefix(
tar: tarfile.TarFile, prefix: str, prefixes_to_relocate: List[str]
) -> dict:
"""Create a tarfile of an install prefix of a spec. Skips existing buildinfo file.
Args:
@@ -1061,6 +983,33 @@ def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
except OSError:
skip = lambda entry: False
binary_regex = utf8_paths_to_single_binary_regex(prefixes_to_relocate)
relocate_binaries = []
relocate_links = []
relocate_textfiles = []
# use callbacks to add files and symlinks, so we can register which files need relocation upon
# extraction.
def add_file(tar: tarfile.TarFile, info: tarfile.TarInfo, path: str):
with open(path, "rb") as f:
relpath = os.path.relpath(path, prefix)
# no need to relocate anything in the .spack directory
if relpath.split(os.sep, 1)[0] == ".spack":
tar.addfile(info, f)
return
f_type = file_type(f)
if f_type == FileTypes.BINARY:
relocate_binaries.append(os.path.relpath(path, prefix))
elif f_type == FileTypes.TEXT and file_matches(f, binary_regex):
relocate_textfiles.append(os.path.relpath(path, prefix))
tar.addfile(info, f)
def add_symlink(tar: tarfile.TarFile, info: tarfile.TarInfo, path: str):
if os.path.isabs(info.linkname) and binary_regex.match(info.linkname.encode("utf-8")):
relocate_links.append(os.path.relpath(path, prefix))
tar.addfile(info)
spack.util.archive.reproducible_tarfile_from_prefix(
tar,
prefix,
@@ -1068,29 +1017,51 @@ def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
# used in runtimes like AWS lambda.
include_parent_directories=True,
skip=skip,
add_file=add_file,
add_symlink=add_symlink,
)
return {
"relocate_binaries": relocate_binaries,
"relocate_links": relocate_links,
"relocate_textfiles": relocate_textfiles,
}
def create_tarball(spec: spack.spec.Spec, tarfile_path: str) -> Tuple[str, str]:
"""Create a tarball of a spec and return the checksums of the compressed tarfile and the
uncompressed tarfile."""
return _do_create_tarball(
tarfile_path,
spec.prefix,
buildinfo=get_buildinfo_dict(spec),
prefixes_to_relocate=prefixes_to_relocate(spec),
)
def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict):
def _do_create_tarball(
tarfile_path: str, prefix: str, buildinfo: dict, prefixes_to_relocate: List[str]
) -> Tuple[str, str]:
with spack.util.archive.gzip_compressed_tarfile(tarfile_path) as (
tar,
inner_checksum,
outer_checksum,
tar_gz_checksum,
tar_checksum,
):
# Tarball the install prefix
tarfile_of_spec_prefix(tar, binaries_dir)
files_to_relocate = tarfile_of_spec_prefix(tar, prefix, prefixes_to_relocate)
buildinfo.update(files_to_relocate)
# Serialize buildinfo for the tarball
bstring = syaml.dump(buildinfo, default_flow_style=True).encode("utf-8")
tarinfo = tarfile.TarInfo(
name=spack.util.archive.default_path_to_name(buildinfo_file_name(binaries_dir))
name=spack.util.archive.default_path_to_name(buildinfo_file_name(prefix))
)
tarinfo.type = tarfile.REGTYPE
tarinfo.size = len(bstring)
tarinfo.mode = 0o644
tar.addfile(tarinfo, io.BytesIO(bstring))
return inner_checksum.hexdigest(), outer_checksum.hexdigest()
return tar_gz_checksum.hexdigest(), tar_checksum.hexdigest()
class ExistsInBuildcache(NamedTuple):
@@ -1100,7 +1071,7 @@ class ExistsInBuildcache(NamedTuple):
class BuildcacheFiles:
def __init__(self, spec: Spec, local: str, remote: str):
def __init__(self, spec: spack.spec.Spec, local: str, remote: str):
"""
Args:
spec: The spec whose tarball and specfile are being managed.
@@ -1130,7 +1101,7 @@ def local_tarball(self) -> str:
return os.path.join(self.local, f"{self.spec.dag_hash()}.tar.gz")
def _exists_in_buildcache(spec: Spec, tmpdir: str, out_url: str) -> ExistsInBuildcache:
def _exists_in_buildcache(spec: spack.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)
@@ -1140,12 +1111,23 @@ def _exists_in_buildcache(spec: Spec, tmpdir: str, out_url: str) -> ExistsInBuil
return ExistsInBuildcache(signed, unsigned, tarball)
def prefixes_to_relocate(spec):
prefixes = [s.prefix for s in deps_to_relocate(spec)]
prefixes.append(spack.hooks.sbang.sbang_install_path())
prefixes.append(str(spack.store.STORE.layout.root))
return prefixes
def _url_upload_tarball_and_specfile(
spec: Spec, tmpdir: str, out_url: str, exists: ExistsInBuildcache, signing_key: Optional[str]
spec: spack.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))
checksum, _ = create_tarball(spec, tarball)
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}
@@ -1159,7 +1141,7 @@ def _url_upload_tarball_and_specfile(
web_util.push_to_url(tarball, files.remote_tarball(), keep_original=False)
specfile = files.local_specfile()
with open(specfile, "w") as f:
with open(specfile, "w", encoding="utf-8") 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
@@ -1176,7 +1158,7 @@ def _url_upload_tarball_and_specfile(
class Uploader:
def __init__(self, mirror: spack.mirror.Mirror, force: bool, update_index: bool):
def __init__(self, mirror: spack.mirrors.mirror.Mirror, force: bool, update_index: bool):
self.mirror = mirror
self.force = force
self.update_index = update_index
@@ -1224,7 +1206,7 @@ def tag(self, tag: str, roots: List[spack.spec.Spec]):
class OCIUploader(Uploader):
def __init__(
self,
mirror: spack.mirror.Mirror,
mirror: spack.mirrors.mirror.Mirror,
force: bool,
update_index: bool,
base_image: Optional[str],
@@ -1273,7 +1255,7 @@ def tag(self, tag: str, roots: List[spack.spec.Spec]):
class URLUploader(Uploader):
def __init__(
self,
mirror: spack.mirror.Mirror,
mirror: spack.mirrors.mirror.Mirror,
force: bool,
update_index: bool,
signing_key: Optional[str],
@@ -1297,7 +1279,7 @@ def push(
def make_uploader(
mirror: spack.mirror.Mirror,
mirror: spack.mirrors.mirror.Mirror,
force: bool = False,
update_index: bool = False,
signing_key: Optional[str] = None,
@@ -1314,7 +1296,7 @@ def make_uploader(
)
def _format_spec(spec: Spec) -> str:
def _format_spec(spec: spack.spec.Spec) -> str:
return spec.cformat("{name}{@version}{/hash:7}")
@@ -1337,7 +1319,7 @@ def _progress(self):
return f"[{self.n:{digits}}/{self.total}] "
return ""
def start(self, spec: Spec, running: bool) -> None:
def start(self, spec: spack.spec.Spec, running: bool) -> None:
self.n += 1
self.running = running
self.pre = self._progress()
@@ -1356,18 +1338,18 @@ def fail(self) -> None:
def _url_push(
specs: List[Spec],
specs: List[spack.spec.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]]]:
) -> Tuple[List[spack.spec.Spec], List[Tuple[spack.spec.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]] = []
skipped: List[spack.spec.Spec] = []
errors: List[Tuple[spack.spec.Spec, BaseException]] = []
exists_futures = [
executor.submit(_exists_in_buildcache, spec, tmpdir, out_url) for spec in specs
@@ -1440,7 +1422,7 @@ def _url_push(
return skipped, errors
def _oci_upload_success_msg(spec: Spec, digest: Digest, size: int, elapsed: float):
def _oci_upload_success_msg(spec: spack.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, "
@@ -1469,13 +1451,11 @@ def _oci_push_pkg_blob(
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 = _do_create_tarball(
filename, spec.prefix, get_buildinfo_dict(spec)
)
tar_gz_checksum, tar_checksum = create_tarball(spec, filename)
blob = spack.oci.oci.Blob(
Digest.from_sha256(compressed_tarfile_checksum),
Digest.from_sha256(tarfile_checksum),
Digest.from_sha256(tar_gz_checksum),
Digest.from_sha256(tar_checksum),
os.path.getsize(filename),
)
@@ -1526,7 +1506,7 @@ def _oci_put_manifest(
):
architecture = _oci_archspec_to_gooarch(specs[0])
expected_blobs: List[Spec] = [
expected_blobs: List[spack.spec.Spec] = [
s
for s in traverse.traverse_nodes(specs, order="topo", deptype=("link", "run"), root=True)
if not s.external
@@ -1570,7 +1550,7 @@ def _oci_put_manifest(
config_file = os.path.join(tmpdir, f"{specs[0].dag_hash()}.config.json")
with open(config_file, "w") as f:
with open(config_file, "w", encoding="utf-8") as f:
json.dump(config, f, separators=(",", ":"))
config_file_checksum = Digest.from_sha256(
@@ -1640,19 +1620,33 @@ def _oci_update_base_images(
)
def _oci_default_tag(spec: spack.spec.Spec) -> str:
"""Return a valid, default image tag for a spec."""
return ensure_valid_tag(f"{spec.name}-{spec.version}-{spec.dag_hash()}.spack")
#: Default OCI index tag
default_index_tag = "index.spack"
def tag_is_spec(tag: str) -> bool:
"""Check if a tag is likely a Spec"""
return tag.endswith(".spack") and tag != default_index_tag
def _oci_push(
*,
target_image: ImageReference,
base_image: Optional[ImageReference],
installed_specs_with_deps: List[Spec],
installed_specs_with_deps: List[spack.spec.Spec],
tmpdir: str,
executor: concurrent.futures.Executor,
force: bool = False,
) -> Tuple[
List[Spec],
List[spack.spec.Spec],
Dict[str, Tuple[dict, dict]],
Dict[str, spack.oci.oci.Blob],
List[Tuple[Spec, BaseException]],
List[Tuple[spack.spec.Spec, BaseException]],
]:
# Spec dag hash -> blob
checksums: Dict[str, spack.oci.oci.Blob] = {}
@@ -1661,13 +1655,15 @@ def _oci_push(
base_images: Dict[str, Tuple[dict, dict]] = {}
# Specs not uploaded because they already exist
skipped: List[Spec] = []
skipped: List[spack.spec.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)
tags_to_check = (
target_image.with_tag(_oci_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):
@@ -1695,8 +1691,8 @@ def _oci_push(
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]] = []
manifests_to_upload: List[spack.spec.Spec] = []
errors: List[Tuple[spack.spec.Spec, BaseException]] = []
# And update the spec to blob mapping for successful uploads
for spec, blob_future in zip(blobs_to_upload, blob_futures):
@@ -1722,7 +1718,7 @@ def _oci_push(
base_image_cache=base_images,
)
def extra_config(spec: Spec):
def extra_config(spec: spack.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"] = {
@@ -1738,7 +1734,7 @@ def extra_config(spec: Spec):
_oci_put_manifest,
base_images,
checksums,
target_image.with_tag(default_tag(spec)),
target_image.with_tag(_oci_default_tag(spec)),
tmpdir,
extra_config(spec),
{"org.opencontainers.image.description": spec.format()},
@@ -1755,7 +1751,7 @@ def extra_config(spec: Spec):
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))}"
f"Tagged {_format_spec(spec)} as {target_image.with_tag(_oci_default_tag(spec))}"
)
else:
manifest_progress.fail()
@@ -1790,13 +1786,13 @@ def _oci_update_index(
db = BuildCacheDatabase(db_root_dir)
for spec_dict in spec_dicts:
spec = Spec.from_dict(spec_dict)
spec = spack.spec.Spec.from_dict(spec_dict)
db.add(spec)
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:
with open(index_json_path, "w", encoding="utf-8") as f:
db._write_to_file(f)
# Create an empty config.json file
@@ -1905,7 +1901,7 @@ def _get_valid_spec_file(path: str, max_supported_layout: int) -> Tuple[Dict, in
try:
as_string = binary_content.decode("utf-8")
if path.endswith(".json.sig"):
spec_dict = Spec.extract_json_from_clearsig(as_string)
spec_dict = spack.spec.Spec.extract_json_from_clearsig(as_string)
else:
spec_dict = json.loads(as_string)
except Exception as e:
@@ -1953,9 +1949,9 @@ def download_tarball(spec, unsigned: Optional[bool] = False, mirrors_for_spec=No
"signature_verified": "true-if-binary-pkg-was-already-verified"
}
"""
configured_mirrors: Iterable[spack.mirror.Mirror] = spack.mirror.MirrorCollection(
binary=True
).values()
configured_mirrors: Iterable[spack.mirrors.mirror.Mirror] = (
spack.mirrors.mirror.MirrorCollection(binary=True).values()
)
if not configured_mirrors:
tty.die("Please add a spack mirror to allow download of pre-compiled packages.")
@@ -1980,7 +1976,7 @@ def fetch_url_to_mirror(url):
for mirror in configured_mirrors:
if mirror.fetch_url == url:
return mirror
return spack.mirror.Mirror(url)
return spack.mirrors.mirror.Mirror(url)
mirrors = [fetch_url_to_mirror(url) for url in mirror_urls]
@@ -2001,7 +1997,7 @@ def fetch_url_to_mirror(url):
if fetch_url.startswith("oci://"):
ref = spack.oci.image.ImageReference.from_string(
fetch_url[len("oci://") :]
).with_tag(spack.oci.image.default_tag(spec))
).with_tag(_oci_default_tag(spec))
# Fetch the manifest
try:
@@ -2245,7 +2241,8 @@ def relocate_package(spec):
]
if analogs:
# Prefer same-name analogs and prefer higher versions
# This matches the preferences in Spec.splice, so we will find same node
# This matches the preferences in spack.spec.Spec.splice, so we
# will find same node
analog = max(analogs, key=lambda a: (a.name == s.name, a.version))
lookup_dag_hash = analog.dag_hash()
@@ -2417,6 +2414,14 @@ def _tar_strip_component(tar: tarfile.TarFile, prefix: str):
yield m
def extract_buildcache_tarball(tarfile_path: str, destination: str) -> None:
with closing(tarfile.open(tarfile_path, "r")) as tar:
# Remove common prefix from tarball entries and directly extract them to the install dir.
tar.extractall(
path=destination, members=_tar_strip_component(tar, prefix=_ensure_common_prefix(tar))
)
def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
"""
extract binary tarball for given package into install area
@@ -2486,12 +2491,7 @@ def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
tarfile_path, size, contents, "sha256", expected, local_checksum
)
try:
with closing(tarfile.open(tarfile_path, "r")) as tar:
# Remove install prefix from tarfil to extract directly into spec.prefix
tar.extractall(
path=spec.prefix,
members=_tar_strip_component(tar, prefix=_ensure_common_prefix(tar)),
)
extract_buildcache_tarball(tarfile_path, destination=spec.prefix)
except Exception:
shutil.rmtree(spec.prefix, ignore_errors=True)
_delete_staged_downloads(download_result)
@@ -2650,7 +2650,7 @@ def try_direct_fetch(spec, mirrors=None):
specfile_is_signed = False
found_specs = []
binary_mirrors = spack.mirror.MirrorCollection(mirrors=mirrors, binary=True).values()
binary_mirrors = spack.mirrors.mirror.MirrorCollection(mirrors=mirrors, binary=True).values()
for mirror in binary_mirrors:
buildcache_fetch_url_json = url_util.join(
@@ -2681,10 +2681,10 @@ def try_direct_fetch(spec, mirrors=None):
# are concrete (as they are built) so we need to mark this spec
# concrete on read-in.
if specfile_is_signed:
specfile_json = Spec.extract_json_from_clearsig(specfile_contents)
fetched_spec = Spec.from_dict(specfile_json)
specfile_json = spack.spec.Spec.extract_json_from_clearsig(specfile_contents)
fetched_spec = spack.spec.Spec.from_dict(specfile_json)
else:
fetched_spec = Spec.from_json(specfile_contents)
fetched_spec = spack.spec.Spec.from_json(specfile_contents)
fetched_spec._mark_concrete()
found_specs.append({"mirror_url": mirror.fetch_url, "spec": fetched_spec})
@@ -2711,7 +2711,7 @@ def get_mirrors_for_spec(spec=None, mirrors_to_check=None, index_only=False):
if spec is None:
return []
if not spack.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True):
if not spack.mirrors.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True):
tty.debug("No Spack mirrors are currently configured")
return {}
@@ -2750,7 +2750,7 @@ def clear_spec_cache():
def get_keys(install=False, trust=False, force=False, mirrors=None):
"""Get pgp public keys available on mirror with suffix .pub"""
mirror_collection = mirrors or spack.mirror.MirrorCollection(binary=True)
mirror_collection = mirrors or spack.mirrors.mirror.MirrorCollection(binary=True)
if not mirror_collection:
tty.die("Please add a spack mirror to allow " + "download of build caches.")
@@ -2805,7 +2805,7 @@ def get_keys(install=False, trust=False, force=False, mirrors=None):
def _url_push_keys(
*mirrors: Union[spack.mirror.Mirror, str],
*mirrors: Union[spack.mirrors.mirror.Mirror, str],
keys: List[str],
tmpdir: str,
update_index: bool = False,
@@ -2872,7 +2872,7 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None):
"""
rebuilds = {}
for mirror in spack.mirror.MirrorCollection(mirrors, binary=True).values():
for mirror in spack.mirrors.mirror.MirrorCollection(mirrors, binary=True).values():
tty.debug("Checking for built specs at {0}".format(mirror.fetch_url))
rebuild_list = []
@@ -2889,7 +2889,7 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None):
}
if output_file:
with open(output_file, "w") as outf:
with open(output_file, "w", encoding="utf-8") as outf:
outf.write(json.dumps(rebuilds))
return 1 if rebuilds else 0
@@ -2916,7 +2916,7 @@ def _download_buildcache_entry(mirror_root, descriptions):
def download_buildcache_entry(file_descriptions, mirror_url=None):
if not mirror_url and not spack.mirror.MirrorCollection(binary=True):
if not mirror_url and not spack.mirrors.mirror.MirrorCollection(binary=True):
tty.die(
"Please provide or add a spack mirror to allow " + "download of buildcache entries."
)
@@ -2925,7 +2925,7 @@ def download_buildcache_entry(file_descriptions, mirror_url=None):
mirror_root = os.path.join(mirror_url, BUILD_CACHE_RELATIVE_PATH)
return _download_buildcache_entry(mirror_root, file_descriptions)
for mirror in spack.mirror.MirrorCollection(binary=True).values():
for mirror in spack.mirrors.mirror.MirrorCollection(binary=True).values():
mirror_root = os.path.join(mirror.fetch_url, BUILD_CACHE_RELATIVE_PATH)
if _download_buildcache_entry(mirror_root, file_descriptions):
@@ -2983,7 +2983,7 @@ def __init__(self, all_architectures):
self.possible_specs = specs
def __call__(self, spec: Spec, **kwargs):
def __call__(self, spec: spack.spec.Spec, **kwargs):
"""
Args:
spec: The spec being searched for
@@ -3121,7 +3121,7 @@ def __init__(self, url: str, local_hash, urlopen=None) -> None:
def conditional_fetch(self) -> FetchIndexResult:
"""Download an index from an OCI registry type mirror."""
url_manifest = self.ref.with_tag(spack.oci.image.default_index_tag).manifest_url()
url_manifest = self.ref.with_tag(default_index_tag).manifest_url()
try:
response = self.urlopen(
urllib.request.Request(

Some files were not shown because too many files have changed in this diff Show More