Compare commits

...

839 Commits

Author SHA1 Message Date
Wouter Deconinck
5d90c26248 audacious: add v4.3.1, v4.4 (support Qt6) 2024-08-10 12:57:39 -05:00
Teague Sterling
2dbc5213b0 pulseaudio: add pkgconfig build dep (#45653)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-10 12:01:16 -05:00
Greg Becker
7a83cdbcc7 Concretizer should respect namespace of reused specs (#45538)
* concretize.lp: improve coverage of internal_error facts
* concretizer: track namespaces for reused packages
* regression test
2024-08-09 13:51:34 -07:00
Dominic Hofer
da33c12ad4 Remove execution permission from setup-env.sh (#45641)
`setup-env.sh` is meant to be sourced, not executed directly.
By revoking execution permissions, users who accidentally execute
the script will receive an error instead of seeing no effect.

* Remove execution permission from `setup-env.sh` and friends
* Don't make output file executable in `spack commands --update-completion`

---------

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-09 13:27:07 -07:00
Alec Scott
c30979ed66 fzf: add v0.52.1, v0.53.0, v0.54.3 (#45634)
* fzf: add v0.52.1, v0.53.0, v0.54.3

* fzf: accept suggestions for url_for_version

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

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-08-09 11:11:01 -07:00
Alec Scott
5d7d18d028 go: add v1.22.6, deprecate insecure versions (#45635) 2024-08-09 10:45:11 -07:00
John W. Parent
92e42bbed9 Windows: Port Libuv (#45413)
* On Windows it is built with CMake, however CMake is built against
  libuv, so libuv must depend on cmake+ownlibs to short circuit the
  circular dependency
* libuv currently fetches the -dist source distribution of libuv for
  certain versions because those versions contain a pre-generated
  ./configure script. However those distributions have all CMake
  files removed, so they cannot be used to build on Windows.
  Because the source distributions are different, this means the
  checksums are different, and necessitates an additional version
  declaration for each version we want to support with CMake.
2024-08-09 10:13:57 -06:00
AcriusWinter
899ac78887 cxx: new test API (#45462)
* cxx: new test API
* gcc: provide cxx
* default providers:  cxx provided by gcc
* cxx: cleanup stand-alone test
  - test_c -> test_cxx
  - simplify compilation and execution
  - corrected output checks

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-08-08 23:23:05 -06:00
AcriusWinter
7bec524dd5 Install test root update: old to new API (#45491)
* convert install_test_root from old to new API
2024-08-08 13:01:06 -07:00
Dom Heinzeller
546e0925b0 odc: add v1.5.2 (#45622)
* Add odc@1.5.2

* Add climbfuji as maintainer in var/spack/repos/builtin/packages/odc/package.py
2024-08-08 13:28:19 -06:00
Vanessasaurus
95b533ddcd flux-sched: add version 0.36.1 (#45619)
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2024-08-08 13:18:35 -06:00
Eric Lingerfelt
28fe85ae66 Adding ecmwf-atlas version 0.38 (#45505) 2024-08-08 12:58:21 -06:00
Chris Marsh
6b936884f5 py-rioxarray: add v0.17.0 (#45529)
* Update available versions

* fix style

* Reduce added versions to just a single new version as per review

* fix style

* Set dependency versions in line with pyproject and setup.py

* add new interp variant

* add wheel as required

* Add variant description

* change +interp default, actually add packaging this time
2024-08-08 19:00:39 +02:00
Vicente Bolea
7b879d092d vtk-m: update vtk-m to 2.2.0 (#45544) 2024-08-08 09:35:48 -07:00
Massimiliano Culpo
007c1148c0 Remove Compiler.PrgEnv* attributes (#45615) 2024-08-08 18:15:42 +02:00
Wouter Deconinck
8b2fec61f2 hepmc3: add v3.3.0 (#45617) 2024-08-08 17:19:26 +02:00
Andrey Perestoronin
1cebb7e1c3 intel-oneapi-2024.2.1 (#45618) 2024-08-08 10:44:26 -04:00
Chris Marsh
6f8d8ba47e openblas : fix install_name on macos (#45606) 2024-08-08 07:50:30 -06:00
Teague Sterling
9464898449 py-glean-sdk: add 60.5.0 and fix 60.0.1 checksum (#45630)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-08 07:35:16 -06:00
Dom Heinzeller
0902910784 Compiler wrapper: add env var to pass vcheck flags (#44588)
Fixes #43494

Add a set of environment variables SPACK_ALWAYS_CFLAGS (etc.) that
are always applied by the compiler wrapper.

Unlike SPACK_CFLAGS, for example, these will also be applied to
version checks (both SPACK_CFLAGS and SPACK_ALWAYS_CFLAGS will be
applied to the other invocation modes like ccld etc.).

Using this new functionality, the classic Intel and oneAPI compilers
are updated to pass compiler flags that disable warning messages
when newer versions are invoked via their older binary names
(these warnings were also generated for version checks, hence the
need for a new wrapper variable).

---------

Co-authored-by: Peter Josef Scheibel <scheibel1@llnl.gov>
2024-08-08 06:40:36 +00:00
dependabot[bot]
7050ace968 build(deps): bump docker/build-push-action from 6.5.0 to 6.6.1 (#45623)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.5.0 to 6.6.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](5176d81f87...16ebe778df)

---
updated-dependencies:
- dependency-name: docker/build-push-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-08-08 07:26:50 +02:00
Federico Ficarelli
7efbad0d81 hipsycl: remove myself from maintainers (#45616) 2024-08-07 21:50:59 +02:00
teddy
2298abd7f4 Add py-gmsh package (#45409)
Co-authored-by: chantrait <teddy.chantrait@cea.fr>
2024-08-07 20:47:00 +02:00
BOUDAOUD34
46efa7e151 namd: add compile options for ROCm (#45553)
* namd:add compile options for ROCm
* Combine --rocm-prefix and its value in a single opts.extend call to ensure they remain ordered correctly and improve code robustness.
* Standardize the code and add ROCm conflicts
* add single_node_gpu conflict

---------

Co-authored-by: U-PALLAS\boudaoud <boudaoud@pc44.pallas.cines.fr>
2024-08-07 10:54:33 -07:00
Adam J. Stewart
60c589db28 PyTorch: add support for the UCC distributed backend (#45598) 2024-08-07 10:49:29 -07:00
Sreenivasa Murthy Kolam
ca9a7b2033 MIOpen-hip , RocFFT packages: fix miopendriver failure and build failure with centos-8 os (#45429)
* MIOpen-hip package: fix miopendriver failure with centos-8 os
* fix the centos-8 build error with lstdc++
2024-08-07 10:45:20 -07:00
kjrstory
470a26bbcd openfoam-org: Add new version 11 (#39771) 2024-08-07 09:55:33 -07:00
Teague Sterling
b52e4fc650 libxcvt: new package (#44640)
* Adding libxcvt package

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

* [@spackbot] updating style on behalf of teaguesterling

* Update package.py

* Update package.py

* updating checksum after swithc to x.org mirror

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-07 10:00:45 -05:00
Mathieu Cloirec
a653579e56 hipsycl: add compile options for ROCm (#45497)
Co-authored-by: cloirec <cloirec@pc54.cines.fr>
2024-08-07 16:23:53 +02:00
Chris Marsh
7f89391b14 parallelio: fix install_name for on macos (#45567) 2024-08-07 15:55:10 +02:00
Wouter Deconinck
34c98101ad xorg-server and xorg pkgs: Fix the build and mark protocols as build deps (#45536) 2024-08-07 14:51:52 +02:00
Jeremy Guillette
f1ea979e2b py-gevent: @:23.9.0 conflicts with py-cython@3.0.10 (#45257) (#45295)
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-08-07 14:35:30 +02:00
Christopher Christofi
55cbdd435c py-chex: add v0.1.86 (#45476) 2024-08-07 14:16:01 +02:00
Adam J. Stewart
1cce947be6 py-torchgeo: incompatible with lightning 2.3 (#45612) 2024-08-07 13:38:33 +02:00
Adam J. Stewart
0a735c6ea6 py-lightning: add v2.4.0 (#45611) 2024-08-07 13:36:33 +02:00
Adam J. Stewart
5400b1e222 py-lightly: add v1.5.11 (#45610) 2024-08-07 13:34:58 +02:00
Bernhard Kaindl
ef461befcc linux-perf: Add capstone variant to build with capstone disassembler 2024-08-07 13:34:07 +02:00
Bernhard Kaindl
831b4a3e4a linux-perf: If clang is in PATH, pass "CLANG=" + shutil.which("clang")
When clang is installed I get `clang: Permission denied`.
Setting CLANG to the full path of clang fixes this.

Signed-off-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-07 13:34:07 +02:00
Jordan Galby
6007a77a33 Add linux-perf 2024-08-07 13:34:07 +02:00
Jordan Galby
a2794f04bc audit-userspace: Backport patch to fix build error
Fix build error:

```
     1711    ../../../py-compile: line 125: test: found: integer expression expected
     1712    ../../../py-compile: line 137: python: command not found
  >> 1713    make[4]: *** [Makefile:521: install-pyexecPYTHON] Error 127
```
2024-08-07 13:34:07 +02:00
Jordan GALBY
3ae3bfd997 audit-userspace: Add 3.1.2
Fixes build errors on almalinux 8 gcc 8.5.0:

```txt
     1352    audit_wrap.c: In function '_wrap_audit_rule_data_buf_set':
  >> 1353    audit_wrap.c:5010:17: error: cast specifies array type
     1354         arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
     1355                     ^
  >> 1356    audit_wrap.c:5010:15: error: invalid use of flexible array member
     1357         arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
     1358                   ^
  >> 1359    audit_wrap.c:5012:15: error: invalid use of flexible array member
     1360         arg1->buf = 0;
     1361                   ^
```
2024-08-07 13:34:07 +02:00
Jordan GALBY
5f3f968a1f xmlto: Fix missing flex build dep
Fixes error:

```txt
3 errors found in build log:
     61    ==> xmlto: Executing phase: 'build'
     62    ==> [2023-10-26-09:48:35.425903] 'make' '-j16' 'V=1'
     63    make  all-am
     64    make[1]: Entering directory '/tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src'
     65    /bin/sh ./ylwrap xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/sh /tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src/missing flex
     66    /tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src/missing: line 81: flex: command not found
  >> 67    WARNING: 'flex' is missing on your system.
     68             You should only need it if you modified a '.l' file.
     69             You may want to install the Fast Lexical Analyzer package:
     70             <http://flex.sourceforge.net/>
  >> 71    make[1]: *** [Makefile:757: xmlif/xmlif.c] Error 127
     72    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src'
  >> 73    make: *** [Makefile:584: all] Error 2
```
2024-08-07 13:34:07 +02:00
Jordan GALBY
652de07d8c babeltrace: Fix build minimal OS: missing pkgconfig 2024-08-07 13:34:07 +02:00
Jordan GALBY
c16191d9ea babeltrace: Add 1.5.11 for linux-perf 2024-08-07 13:34:07 +02:00
Konstantinos Parasyris
1b1663acea flux-pmix: correct FLUX_PMI_CLIENT_SEARCHPATH (#45277) 2024-08-07 13:09:47 +02:00
Jordan Galby
d2f269ed7b Fix SIP build system installing files into python-venv (#45360)
For example: spack install py-pyqt5 or py-pyqt6 would install pylupdate5 pyrcc5 and
pyuic5 into in python-venv's install prefix.

Fix https://github.com/spack/spack/issues/45359
2024-08-07 12:12:56 +02:00
Tamara Dahlgren
4584d85ca6 biobambam2: fix test scripts to use installed binaries (#45609) 2024-08-07 11:43:23 +02:00
Wouter Deconinck
2106a2be26 qt-base: let QtPackage base class handle module files (#45603) 2024-08-07 10:53:32 +02:00
Wouter Deconinck
228c82502d qt-5compat: new package for QtCore5Compat module (#45601) 2024-08-07 10:47:31 +02:00
tygoetsch
431f5627d9 Add charliecloud@0.38 (#45566) 2024-08-07 01:33:36 -06:00
Teague Sterling
fb315c37ba py-hail: new package (#44521) 2024-08-07 06:55:07 +02:00
dependabot[bot]
f9fa160a24 build(deps): bump actions/upload-artifact from 4.3.5 to 4.3.6 (#45608)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.5 to 4.3.6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](89ef406dd8...834a144ee9)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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-08-07 06:50:18 +02:00
Massimiliano Culpo
1ee29929a7 cmake: add v3.30.2 (#45593) 2024-08-06 19:53:45 -06:00
Massimiliano Culpo
97e691cdbf binutils: add v2.43 (#45594) 2024-08-06 15:09:55 -06:00
Matthieu Dorier
51ba25fec3 py-gcovr: add version 7.2 (#45597)
* py-gcovr: add version 7.2
* py-gcovr: fix dependency on py-tomli

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-08-06 13:41:03 -06:00
Matthieu Dorier
81281646e9 py-colorlog: added new version (#45596)
* py-colorlog: added new version
* py-colorlog: corrected dependency on py-setuptools
2024-08-06 13:23:46 -06:00
Wouter Deconinck
85ec4cca92 libxshmfence: add v1.3.1, v1.3.2 (#44393)
* libxshmfence: add v1.3.1, v1.3.2
* libxshmfence: fix url_for_version
* libxshmfence: url_for_version without spec.satisfies
* libxshmfence: mv url_for_version after directives

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-08-06 10:56:35 -07:00
Pranav Sivaraman
f3c21b0177 libdwarf: remove old versions with 0.10.1 (#45306) 2024-08-06 18:50:29 +02:00
Alex Leute
51ac4686b4 py-anvio and py-rich-argparse: new packages (#45367) 2024-08-06 17:52:18 +02:00
Michael Kuhn
82752ad0b7 rocksdb: add missing build dependencies (#45252) 2024-08-06 09:23:13 -06:00
Hariharan Devarajan
b231e6e9e9 Changes to DLIOProfiler and DFTracer Package (#45180)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-08-06 13:49:01 +02:00
Dave Keeshan
90f8c20133 verible: Add versions 0.0.3671 and 0.0.3667 (#44660) 2024-08-06 11:28:36 +02:00
Dave Keeshan
9835b072e2 yosys: add v0.42 2024-08-06 11:27:36 +02:00
Massimiliano Culpo
f438a33978 changa: add v3.5 (#45591) 2024-08-06 11:12:45 +02:00
Axel Huebl
8ded2ddf5e C-Blosc2: add v2.15.1 (#45582) 2024-08-06 02:54:24 -06:00
Gavin John
e3904d4cbf Fix spack url stats (#45584) 2024-08-06 02:54:01 -06:00
Bill Williams
e1bcbcf9f3 Score-P: Add remapping for rocmcc (#45316)
* Score-P: Add remapping for rocmcc

rocmcc -> amdclang for ScoreP

* [@spackbot] updating style on behalf of wrwilliams

---------

Co-authored-by: William Williams <william.williams@tu-dresden.de>
Co-authored-by: wrwilliams <wrwilliams@users.noreply.github.com>
2024-08-06 09:51:50 +02:00
Cameron Rutherford
fa671a639a hiop: update package.py with correct cusolver_lu CMake variable (#45332) 2024-08-06 09:40:56 +02:00
snehring
28171f1b9d diamond: add blast support and eigen (#45254)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-08-06 09:30:22 +02:00
Christopher Christofi
8de03e2bf5 py-numba4jax: add new package (#45481) 2024-08-06 09:17:41 +02:00
Massimiliano Culpo
2fa314b6b6 Avoid duplicate dependabot bumps (#45590)
* Avoid duplicate dependabot bumps

Example of a duplicate bump:
- https://github.com/spack/spack/pull/45124
- https://github.com/spack/spack/pull/45125

* Deduplicate "pip" ecosystem
2024-08-06 07:14:55 +00:00
alvaro-sch
7780059c64 orca: add v6.0.0 (#45489) 2024-08-06 09:13:42 +02:00
Satish Balay
7e69671570 petsc, py-petsc4py: add v3.21.4 (#45506) 2024-08-06 08:43:27 +02:00
Rocco Meli
5650d4d419 dbcsr: add v2.7.0 and +g2g variant (#45501)
Co-authored-by: RMeli <RMeli@users.noreply.github.com>
2024-08-06 08:40:09 +02:00
Andrew W Elble
fa38dd9386 gdrcopy: specify CUDA envvar during build (#45415)
otherwise /usr/local/cuda is used
2024-08-06 08:32:31 +02:00
Weiqun Zhang
16a2a5047c amrex: add v24.08 (#45543) 2024-08-06 08:10:53 +02:00
dependabot[bot]
899e458ee5 build(deps): bump flake8 in /.github/workflows/requirements/style (#45587)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 07:09:18 +02:00
dependabot[bot]
4a8d09dcc1 build(deps): bump flake8 from 7.1.0 to 7.1.1 in /lib/spack/docs (#45588)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 07:08:57 +02:00
Matthieu Dorier
98e206193b py-configspace: add main, 1.0.0, 1.0.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, fix url and fix cython dependency (#45193)
* [py-configspace] fix dependency on cython

* py-cython not needed starting from 1.0.0

* added py-configspace 1.0.0 and 1.0.1

* py-configspace: fix style

* added py-configspace version 1.1.0

* added py-configspace version 1.1.1

* py-configspace: two more versions and new maintainer

* py-configspace: fixed typo

* py-configspace: added version 1.1.4
2024-08-05 23:26:27 -05:00
Christopher Christofi
6a6c295938 r: add version 4.4.1 (#45564) 2024-08-05 18:45:27 -06:00
Tamara Dahlgren
9a1002c098 tix: skip implicit patch (#45244) 2024-08-05 17:34:26 -07:00
Zach Jibben
6c903543e1 Update Truchas package for 24.06 and 24.07 (#45583) 2024-08-05 16:40:56 -07:00
Jonathon Anderson
994d995b64 intel-xed: Rewrite recipe to match upstream install layout (v2) (#45155)
* intel-xed: Rewrite to use mbuild install procedure
  Fixes https://github.com/spack/spack/issues/41268
* hpctoolkit: depend on intel-xed +deprecated-includes
* intel-xed: add missing versions from 2024
* intel-xed: Verify dependencies on C/C++ compilers

---------

Signed-off-by: Jonathon Anderson <anderson.jonathonm@gmail.com>
2024-08-05 14:53:15 -07:00
Matt Thompson
54d17ae044 Update GFE packages (#45194)
* Update GFE packages
* Approve compiler depends_on
2024-08-05 14:00:23 -07:00
jmuddnv
9ea103f94e nvhpc: add v24.7 (#45511) 2024-08-05 21:49:59 +02:00
Richard Berger
83efafa09f Add language depends_on on several packages (#45298) 2024-08-05 21:48:58 +02:00
Jaroslav Hron
5f29bb9b22 petsc: fix zlib-api handling (#45545) 2024-08-05 21:24:50 +02:00
Luc Grosheintz
441b64c3d9 highfive: add v2.10.0 (#45486) 2024-08-05 21:16:54 +02:00
Sergey Kosukhin
cee6c59684 nag: add version 7.2.7203 (#45556) 2024-08-05 20:40:59 +02:00
Wouter Deconinck
b1adfcf665 seacas: limit to fmt@10 (#45565) 2024-08-05 13:11:45 -05:00
Michael Kuhn
433abfcc80 gcc: add 14.2.0 (#45577) 2024-08-05 11:01:09 -06:00
Wouter Deconinck
02063302c5 fastor: add git attribute, verify language dependency (#45549) 2024-08-05 18:56:36 +02:00
Massimiliano Culpo
b9125ae3e7 Do not halt concretization on unknown variants in externals (#45326)
* Do not halt concretization on unkwnown variants in externals
2024-08-05 09:24:57 -07:00
Pranav Sivaraman
0a2b63b032 highway: add v1.2.0 (#45335)
Co-authored-by: pranav-sivaraman <pranav-sivaraman@users.noreply.github.com>
2024-08-05 18:23:43 +02:00
SXS Bot
35d84a6456 spectre: add v2024.08.03 (#45575)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2024-08-05 18:18:25 +02:00
jgraciahlrs
0257b2db4b libxcb: Set well-known locale for build (#45502)
* libxcb: Set well-known locale for build

Builds might fail if no valid locale is set. See https://www.linuxfromscratch.org/blfs/view/git/x/libxcb.html

* libxcb: fix style

* libxcb: change locale from en_US.UTF-8 to C.UTF-8

* libxcb: fix style

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

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

* [@spackbot] updating style on behalf of jgraciahlrs

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: jgraciahlrs <jgraciahlrs@users.noreply.github.com>
2024-08-05 08:47:38 -05:00
Wouter Deconinck
d3bf1e04fc py-vector: add through v1.4.1 (switch to hatchling) (#45527) 2024-08-05 10:45:57 +02:00
Auriane R.
530639e15f Use satisfies instead of if ... in spec in b* and c* directories (#45555) 2024-08-04 11:59:13 -06:00
Wouter Deconinck
c8695f2ba6 py-mypy: add v1.9.0, v1.10.1, v1.11.1 (#45542) 2024-08-04 13:08:04 +02:00
dependabot[bot]
f3bd820374 build(deps): bump pytest from 8.3.1 to 8.3.2 in /lib/spack/docs (#45461)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.1 to 8.3.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.1...8.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-04 05:44:52 +00:00
dependabot[bot]
29b9fe1f0b build(deps): bump black in /.github/workflows/requirements/style (#45561)
Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 21:49:33 -05:00
dependabot[bot]
1090895e72 build(deps): bump black from 24.4.2 to 24.8.0 in /lib/spack/docs (#45563)
Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 21:48:50 -05:00
dependabot[bot]
e983f4a858 build(deps): bump sphinx-design from 0.6.0 to 0.6.1 in /lib/spack/docs (#45562)
Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/executablebooks/sphinx-design/releases)
- [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.6.0...v0.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 21:46:19 -05:00
Wouter Deconinck
72e3f10d5b ffmpeg: update patch hashes for addition of the X-Git-Tag (#45574) 2024-08-03 22:43:54 +02:00
Teague Sterling
c5ae5ba4db xfce4: new packages (#44646) 2024-08-03 13:29:48 +02:00
Alex Richert
a1090029f3 g2: add variants for recent releases (#45441) 2024-08-03 13:01:18 +02:00
Alex Richert
0135c808a0 landsfcutil: add testing with pfunit (#45449) 2024-08-03 13:00:15 +02:00
Alex Richert
678084fed8 bufr: add 12.1.0 (#45459) 2024-08-03 12:56:58 +02:00
Adam J. Stewart
705d58005d py-jax / JAX: add v0.4.31 (#45519) 2024-08-03 11:16:42 +02:00
Alex Richert
cee266046b sp: remove 'generated' tag (#45455) 2024-08-03 11:13:31 +02:00
dependabot[bot]
5aa3d9c39c build(deps): bump actions/upload-artifact from 4.3.4 to 4.3.5 (#45559)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.3.5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b2256b8c0...89ef406dd8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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-08-03 00:09:47 -06:00
dependabot[bot]
3ee6507dd6 build(deps): bump mypy from 1.11.0 to 1.11.1 in /lib/spack/docs (#45530)
Bumps [mypy](https://github.com/python/mypy) from 1.11.0 to 1.11.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.11...v1.11.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 17:01:25 -06:00
Todd Gamblin
425bba2f1a Allow spec queries by namespace (#45416)
* Allow spec queries by `namespace`

Spack specs have "namespaces" that indicate what package repository they come from, but
there has not been a way to use the spec syntax to match one.

You can say things like this:

```console
spack find builtin.zlib
spack find myrepo.zlib
```

But, because namespaces are written as a dot-separated prefix on the name, you can't say
"find me all specs in namespace myrepo". The syntax doesn't allow it.

This PR allows you to specify anonymous specs with namespaces on the CLI. Specifically
you can do queries like this:

```console
spack find namespace=builtin
spack find namespace=myrepo
```

You can use this anywhere else you use spec syntax, e.g. in a config file to separate
installations based on what repo they came from:

```yaml
spack:
    config:
        install_tree:
            root: $spack/opt/spack
            projections:
                namespace=myrepo: "myrepo_special_path/{name}-{hash}"
                namespace=builtin: "builtin/{name}-{hash}"
```

This PR adds a special `namespace_if_anonymous` attribute to specs, which returns the
`namespace` if the spec has no name, otherwise it returns `None`. This allows us to
print the namespace for anonymous specs but to continue hiding it for most views, as
we've done so far.

This is implemented as a special case, but it's one that already exists, along with
`platform`, `os`, `target`, etc. This also reserves existing special case names for
variants so that users cannot define them in their package files. This change is
potentially breaking, but I do not think it will be common. There are no builtin
packages with a variant called `namespace`, and defining `os`, `target`, or `platform`
as a variant would've likely caused other problems if they were already being used.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-02 13:38:14 -05:00
Wouter Deconinck
a2cbc46dbc openblas: fix AttributeError when threads=openmp (#45338) 2024-08-02 12:19:06 -06:00
Wouter Deconinck
8538b0c01d xmlto: hotfix upstream patch removed by fedora (#45551) 2024-08-02 08:33:17 -06:00
Teague Sterling
ff30da7385 py-glean-sdk: new package (#45389)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-02 07:29:36 -06:00
Alex Richert
7c5771ed11 ncio: add check function to run unit tests (#45448) 2024-08-02 11:36:01 +02:00
Alex Richert
81fb1a9b8f bacio: remove an old maintainer and 'generated' tags (#45440) 2024-08-02 11:33:37 +02:00
Alex Richert
835bd2557e g2c: remove the 'generated' tag (which is correct) (#45442) 2024-08-02 11:25:31 +02:00
Alex Richert
e5a8d7be49 gfsio: add testing with pfunit (#45444) 2024-08-02 11:24:54 +02:00
Alex Richert
9f795de60b nemsio: add check to run the unit tests (#45450) 2024-08-02 11:22:20 +02:00
Alex Richert
7791a30bc2 nemsiogfs: add running the unit tests (#45451) 2024-08-02 11:21:35 +02:00
Alex Richert
2e85c83301 sfcio: add unit testing with pfunit (#45453) 2024-08-02 11:20:44 +02:00
Alex Richert
251190a0c4 sigio: add unit testing with pfunit (#45454) 2024-08-02 11:19:41 +02:00
Alex Richert
90b85239d5 wrf-io: remove 'generated' tags (which are correct) (#45458) 2024-08-02 11:16:45 +02:00
Alex Richert
f276a8da75 w3emc: add @2.12.0, conflict on +shared~pic (#45456) 2024-08-02 11:16:05 +02:00
Alex Richert
93799ec641 w3nco: remove 'generated' tags (which are correct) (#45457) 2024-08-02 11:13:33 +02:00
Alex Richert
dddc056a29 prod-util: remove 'generated' tags (which are correct) (#45452) 2024-08-02 11:13:03 +02:00
Alex Richert
3e6d9cdc06 g2tmpl: remove 'generated' tags (which are correct) (#45443) 2024-08-02 11:12:29 +02:00
Alex Richert
091786411b grib-util: remove 'generated' tags (which are correct) (#45445) 2024-08-02 11:11:26 +02:00
Alex Richert
4af09dd506 ip2: remove 'generated' tags (which are correct) (#45447) 2024-08-02 11:10:53 +02:00
Adam J. Stewart
2626bff96d py-numpy: "@1.23:" add conflict for "%gcc@:6.4" (#45468) 2024-08-02 10:33:37 +02:00
jgraciahlrs
9ef1d609e2 py-markupsafe: add depends_on("python@3.7:", when="@2.0:") (#45503)
As per PyPI, recent versions of py-markupsafe (>=2) require Python >=3.7.
2024-08-02 10:28:25 +02:00
Wouter Deconinck
4c60deb992 xrootd: add github as secondary url to avoid SSL issues (#45512) 2024-08-02 10:24:00 +02:00
Adam J. Stewart
53bc782278 pthreadpool: use same flags as PyTorch (#45521) 2024-08-02 10:11:24 +02:00
Wouter Deconinck
4e087349a4 py-particle: add v0.23.1, v0.24.0 (#45528)
* py-particle: add v0.23.1, v0.24.0

* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-08-02 10:04:56 +02:00
Juan Miguel Carceller
53815b725a groff: Add missing depends_on("m4") (#45552) 2024-08-02 09:45:44 +02:00
eugeneswalker
e8c8e7b8a8 e4s oneapi ci: try enabling some disabled specs (#45355) 2024-08-01 21:25:30 -07:00
Seth R. Johnson
b781ce5b0f libspng: add maintainer, fix dependencies, args (#45410)
* libspng: add maintainer, fix dependencies, args

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

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Fix syntax error

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

---------

Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-08-01 21:03:27 -06:00
Juan Miguel Carceller
a3c3f4c3d1 root: Add patch to fix TUri (#45428)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-08-01 19:40:15 -07:00
Diego Alvarez S.
445b6dfcf8 Add blast+ v2.15.0, v2.16.0 (#45425) 2024-08-01 19:39:03 -07:00
Wouter Deconinck
b2ef64369f perl: add v5.40.0 (#45287)
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-01 20:33:41 -06:00
Juan Miguel Carceller
a8d2ea68f5 gaudi: add versions 38.2 and 38.3 and limit the version of fmt (#45466)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-08-01 19:20:22 -07:00
afzpatel
c7a437573b py-tensorflow: change url for 2.16.1-rocm-enhanced (#45539)
* change url for 2.16.1-rocm-enhanced

* fix typo
2024-08-01 19:51:33 -06:00
Chris Marsh
5736d1e206 py-xarray: Update and ensure dask compatibility (#45537)
* Add 2024.7 and new +viz variant as per pyproject.toml

* Ensure dask/xarray versions are compatible
2024-08-01 18:21:28 -07:00
Teague Sterling
e110e3c3af py-zstandard: new package (#45388)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-01 18:43:10 -06:00
Teague Sterling
e2d8b581db py-glean-parser: new package (#45390)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-01 18:37:35 -06:00
Thomas Madlener
10a4de8e04 edm4hep: Add v0.99 release and deprecate older versions (#45516)
* edm4hep: Add v0.99 and deprecated older versions

* edm4hep: Fix nlohmann-json dependency version

* Keep 0.10.5 undeprecated
2024-08-01 18:26:42 -06:00
Todd Gamblin
96ddbd5e17 format: allow spaces in format specifiers (#45487)
* format: allow spaces in format specifiers

Key-value pair format specifiers can now contain spaces in the key. This allows us to
add spaces to format strings that are *only* present when the attribute formatted is not
``None``. Instead of writing:

```
    {arch=architecture}
```

and special casing `arch=` like a sigil in `Spec.format()`, we can now write:

```
    { arch=architecture}
```

And the space is *only* printed when `architecture` is not `None`. This allows us to
remove the special case in `Spec.format()` for `arch=`.

Previously the only `key=` prefix allowed in format specifiers was `arch=`, but this PR
removes that requirement, and the `key=` part of a key-value specifier can be any name.
It does *not* have to correspond to the formatted attribute.

- [x] modify `SPEC_FORMAT_RE` to allow arbitrary keys in key-value pairs.
- [x] remove special case for `arch=` from `Spec.format()`.
- [x] modify format strings using `{arch=architecture}` to use `{ arch=architecture}`
- [x] add more tests for formatting

This PR saves other more complex attributes like compiler flags and their spacing for later.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-01 18:20:43 -06:00
Stephen Nicholas Swatman
65b530e7ec detray: add versions 0.70.0 through 0.72.1 (#45541)
* detray: add versions 0.69.1 through 0.72.1

This commit adds four new versions of the detray package.

* Remove v0.69.0
2024-08-01 17:55:58 -06:00
Auriane R.
de98e3d6e5 Update if ... in spec with satisfies in a* dirs (#44822) 2024-08-01 18:21:37 -05:00
John W. Parent
ffcb4ee487 Windows msvsc: Report accurate platform toolset version for VS2022 (#45525)
VC toolset versions 144 and 143 are both associated with the platform
toolset 143; this deviates from prior version choices made by the
MSVC devs; add a special case to report platform toolset version
as 143 when VC toolset version is >= 143 (this will need revisiting
for later releases).
2024-08-01 11:27:17 -07:00
Teague Sterling
bfba3c9d5c py-attrs: add v17.4.0 (#45385)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 11:04:37 -07:00
Teague Sterling
37e56ea24d py-pyrsistent: add v0.14.0 (#45387)
* py-pyrsistent: add v0.1.4.0 & conflict

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

* Update package.py

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 10:52:20 -07:00
Alex Richert
453e8c71ac ip: add v5.1.0 (#45331)
* ip: add v5.1.0

* [@spackbot] updating style on behalf of AlexanderRichert-NOAA

* Update package.py

* Update package.py
2024-08-01 10:33:13 -07:00
James Taliaferro
e669fcafd0 kakoune: add v2024.05.18 (#45460)
* update Kakoune, explicitly make install dirs first

* blacken
2024-08-01 09:40:28 -07:00
Stephen Hudson
2dbbcf3ca5 py-libensemble: add v1.4.0, v1.4.1 (#45463)
* libEnsemble: add v1.4.0

* libEnsemble: add v1.4.1
2024-08-01 09:39:10 -07:00
Christopher Christofi
bce710eec1 py-flax: add v0.8.5 (#45480) 2024-08-01 09:09:00 -07:00
Thomas Madlener
64a69796e2 lcio: add v2.22.1 (#45517)
* lcio: add latest version 2.22.1

* lcio: update sio dependency to match actual requirements
2024-08-01 08:56:04 -07:00
rfbgo
dd460a0eb0 py-torch-nvidia-apex: add v22.03 -> v24.04.01 (#45176) 2024-08-01 11:47:45 +02:00
Manuela Kuhn
475fe9977a py-rsatoolbox: add v0.1.5 (#45484) 2024-08-01 10:53:41 +02:00
Adam J. Stewart
b86e42a5aa py-sphinx: add v8.0 (#45520) 2024-08-01 08:40:29 +02:00
Claudia Comito
9f04c45dea py-heat: add v1.4.2 (#45317) 2024-08-01 05:38:30 +02:00
Szabolcs Horvát
20e6b60fce py-igraph: add 0.11.6 (#45132) 2024-08-01 05:34:20 +02:00
Teague Sterling
5f86ee5d93 scala: add v2.12.13 -> v2.12.19, v2.13.10, 2.13.14 (#45477)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 05:18:46 +02:00
Wouter Deconinck
84ad509621 py-onnxruntime: add v1.17.3 (#44500) 2024-08-01 04:17:56 +02:00
Rémi Lacroix
ea0da49acb OpenFOAM-org: Add missing dependency on readline for @:9 (#44482)
The setSet tool (removed in version 10) has an optional dependency on readline.
The build script will use the system readline if not provided by Spack.
2024-08-01 03:59:00 +02:00
Christopher Christofi
e77fbfe8f8 py-jaxtyping: new package (#45482) 2024-08-01 03:50:48 +02:00
Teague Sterling
d485650369 py-build: new package (#45478)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 03:47:33 +02:00
Melven Roehrig-Zoellner
c1f22ca5cb tixi: add python variant (sets PYTHONPATH and LD_LIBRARY_PATH) (#44592) 2024-08-01 03:44:11 +02:00
Melven Roehrig-Zoellner
c5d1c9ae61 t8code: fix build with gcc14 2024-08-01 03:26:56 +02:00
Melven Roehrig-Zoellner
d8184b37a3 py-pylint-gitlab: new package 2024-08-01 03:20:40 +02:00
Melven Roehrig-Zoellner
bd952a552f py-anybadge: new package 2024-08-01 03:20:40 +02:00
Cameron Smith
aa171a6cc9 omegah: Update c/c++ language deps (#45303)
Signed-off-by: Cameron Smith <smithc11@rpi.edu>
2024-08-01 03:06:00 +02:00
Alex Richert
e4ee59741e grib-util: Add 1.5.0 (#45310) 2024-08-01 02:23:31 +02:00
Manuela Kuhn
b3b9f4d4b7 py-pybv: new package (#45370) 2024-08-01 02:07:11 +02:00
Manuela Kuhn
c1f2b36854 py-edfio: add v0.4.3 and py-poetry-dynamic-versioning: add v1.4.0, fix url (#45369) 2024-08-01 02:06:05 +02:00
Vincent Michaud-Rioux
87494d2941 py-pennylane: Add 0.36 and 0.37 with deps (#45134) 2024-07-31 22:55:02 +02:00
Ian Lumsden
ad26dcfbfc flux-core,flux-sched: fix environments with external flux (#44775) 2024-07-31 21:36:51 +02:00
Vlad Savelyev
5541a184d5 py-multiqc: add v1.23 (#45325) 2024-07-31 21:16:21 +02:00
Manuela Kuhn
f1140055d0 py-pymatreader: Add v0.0.32 (#45366) 2024-07-31 21:06:15 +02:00
Manuela Kuhn
88782fb05a py-eeglabio: new package (#45372) 2024-07-31 21:04:44 +02:00
Manuela Kuhn
69d216a88e py-edflib-python: new package (#45371) 2024-07-31 21:03:26 +02:00
Wouter Deconinck
04f0af0a28 acts,dd4hep: restrict to podio@0 to prevent failures with podio@1 (#44825)
* dd4hep: restrict to podio@0 to prevent failures with podio@1

* acts: restrict to podio@0 to prevent failures with podio@1

* dd4hep: close when range for podio

* acts: close when range for podio

* acts: fix when range for podio

* acts: close when range for podio

* acts,dd4hep: ensure main/master still depends on podio
2024-07-31 20:51:38 +02:00
Wouter Deconinck
c71c7735fd py-globus-sdk: add through v3.42; pypi now uses underscores (#45349) 2024-07-31 20:48:06 +02:00
Teague Sterling
89bc483c87 py-cffi: add v1.16.0 (#45386)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-31 20:16:49 +02:00
Felix Thaler
62d2e8d1f4 libvterm: Fix download: Use download from launchpad.net (#45094) 2024-07-31 19:14:18 +02:00
ron minnich
12abc233d0 mpigraph: new package (LLNL mpigraph) (#45121)
Signed-off-by: Ron Minnich <rminnich@google.com>
2024-07-31 19:08:48 +02:00
Andrew W Elble
c30c5df340 libxcb: xcb-proto is a build dependency (#45523) 2024-07-31 10:48:21 -04:00
Mikael Simberg
4a088f717e pika: add v0.26.1 (#45515) 2024-07-31 02:52:55 -06:00
Christopher Christofi
9a10538f6d openslide: add new version 4.0.0 (#42158)
* openslide: add new version 4.0.0

* openslide: update dependency organization
2024-07-31 09:27:34 +01:00
arezaii
c753446353 Chapel package: updates post release (#45304)
* Fix +rocm variant, to ensure correct dependencies on ROCm packages
  and use of AMD LLVM
* Add a +pshm variant for comm=gasnet to enable fast shared-memory
  comms between co-locales
* Add logic to ensure we get the native CXI libfabric network provider
  on Cray EX
* Expand dependency type for package modules to encompass runtime
  dependencies
* Factor logic for setting (LD_)LIBRARY_PATH and PKG_CONFIG_PATH of
  runtime dependencies
* Workaround issue #44746 that causes a transitive dependency on lua
  to break SLURM
* Disable nonfunctional checkChplDoc test
* Annotate some variants as conditional, to improve spack info output
  and reduce confusion

---------

Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
2024-07-30 18:24:56 -07:00
Chris Marsh
65a15c6145 Mac OS UUID virtual: platform-specific virtuals not correctly prioritized (#43002)
`apple-libuuid` includes types that aren't available in other `uuid`
providers; this cause issues in consuming packages (e.g., py-matplotlib)
that use SDKs like CarbonCore.framework when they attempt to use
`util-linux-uuid` as a `uuid` provider on Mac OS.

Tweak `util-linux-uuid` to indicate that it does not provide `uuid`
on Mac OS.
2024-07-30 11:38:07 -06:00
dependabot[bot]
e563f84ae2 build(deps): bump docker/setup-buildx-action from 3.5.0 to 3.6.1 (#45495)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.5.0 to 3.6.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](aa33708b10...988b5a0280)

---
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-07-30 07:57:15 -07:00
Teague Sterling
622ad1ddd7 perl-bio-ensembl-funcgen: new package (#44508)
* Adding the perl-bio-ensembl-funcgen package

* Update package.py

* Update package.py
2024-07-30 11:17:29 +01:00
jmlapre
1bd17876ed trilinos: add v16.0.0 (#45402) 2024-07-29 23:23:11 -06:00
Richard Berger
a789689709 py-furo: add new versions (#45439) 2024-07-29 19:58:43 -06:00
Teo
171a2e0e31 add new maintainer (#45436) 2024-07-29 19:58:14 -06:00
Seth R. Johnson
66d3fddedf Remove maintainership from packages I have no stake in (#45435) 2024-07-29 16:23:00 -06:00
RichardBuntLinaro
14a3b13900 linaro-forge: added 24.0.3 version (#45430) 2024-07-29 09:31:14 -06:00
Teague Sterling
40d41455db perl-bio-ensembl: new package (#44506)
* Adding perl-bio-ensembl package

* Fixing checksums

* Update package.py
2024-07-29 13:33:09 +01:00
Todd Gamblin
d63ead25ac add spack audit configs to ci
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-07-29 01:30:14 -07:00
Todd Gamblin
4a35dec206 wasi-sdk: add default provider
This was missed in #45394 because we don't run unit tests for package PRs, and
`test_all_virtual_packages_have_default_providers`, which would've caught it, is a unit
test, not an audit.

- [x] add a default provider for `wasi-sdk` in `etc/spack/defaults/packages.yaml` (which
      we require for all virtuals)
- [x] rework `test_all_virtual_packages_have_default_providers` as an audit called
      `_ensure_all_virtual_packages_have_default_providers`

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-07-29 01:30:14 -07:00
Matt Jolly
c294b9d3b9 meson: add v1.4.2, v1.5.1 (#45384)
Also deprecate old and superseded versions
2024-07-29 09:02:48 +02:00
AcriusWinter
057b415074 pinentry: old to new test API (#45011)
* pinentry: New API
* move code around
* added back version check
* Complete check_version refactor
* Honor original handling of guis (i.e., don't try if not there)

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-26 14:07:06 -06:00
Manuela Kuhn
3180b28d76 py-mne: add v1.7.1 (#45400)
* py-mne: add v1.7.1
* fix style
2024-07-26 12:04:58 -07:00
Walter de Jong
b47c31509d apptainer: add v1.3.2, v1.3.3 (#45398)
* upgrade apptainer: security fix
  apptainer 1.3.1 has a high severity security issue: CVE-2024-3727
  Upgrade to 1.3.2 or preferably 1.3.3
* added comment for 1.3.1

---------

Co-authored-by: Walter de Jong <walter.dejong@surf.nl>
2024-07-26 08:51:30 -07:00
Sreenivasa Murthy Kolam
f99a5ef2e7 Fix build failure when kokkos +rocm is enabled. (#44459)
* fix kokkos +rocm build failure

* address review comments

* address review comments . revert the previous changes

* address review comments. Add rocthrust for 4.3 version onwards
2024-07-26 06:44:06 -07:00
Wouter Deconinck
690bcf5d47 intel-oneapi-compilers: update description with current compilers (#45348)
* intel-oneapi-compilers: update description with current compilers

* Update var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py

Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>

* intel-oneapi-compilers: break docstring line

---------

Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>
2024-07-26 07:20:21 -06:00
AcriusWinter
1e6bef079d kokkos: new test API (#45010)
* kokkos: new test API
* kokkos: added import llnl.util.lang as lang because earlier versions couldn't be installed without it

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-07-25 18:39:24 -07:00
AcriusWinter
564155fd1a povray: new test API (#45174)
* povray: new test API
* capture output and test name change
* povray: add v3.7.0.10, deprecate 3.7.0.8

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-25 17:51:34 -07:00
AcriusWinter
f371b6f06c umpire: old to new test API and refactor (#44957)
* umpire: old to new test format
* umpire: old to new test method and refactor
* indentation
* black reformat
* last minute syntax
* docstring and checks
* black format
* change test name
* method call correction
* Resolve problem with stand-alone tests (or examples) not loading library (Fixes #44960)

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-25 17:47:44 -07:00
Howard Pritchard
0f9434fca4 openmpi: add v5.0.4 and v5.0.5 (#45305)
* Open MPI: add release 5.0.4
* OpenMPI: add release 5.0.5
   needed quick turnaround owing to
   https://github.com/open-mpi/ompi/issues/12693

---------

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2024-07-25 15:14:37 -07:00
Martin Diehl
235831a035 damask 3.0.0 and 3.0.0-beta2 (#45405) 2024-07-25 14:03:09 -07:00
Teague Sterling
4240748cea wasi-sdk-prebuilt: new package (#45394)
* wasi-sdk-prebuilt: new package
* move url_for_version to be first method

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-25 12:56:35 -07:00
John W. Parent
934e34fbd6 CMake package: add versions 3.30.0 and 3.30.1 (#45418) 2024-07-25 10:39:56 -06:00
Adam J. Stewart
ea42d18506 libgcrypt: add patch for avx512 support (#45432) 2024-07-25 15:57:18 +02:00
Andrew W Elble
2b763ff2db py-tensorflow: alter gcc conflict, fix build (#45330) 2024-07-25 08:22:48 +02:00
AcriusWinter
c6cc97953b sz: new test API (#45363)
* sz: new test API
* fix typo; check installed executable; conform to subpart naming convention
* skip tests early if not installed; remove unnecessary "_sz" from test part names

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-24 19:09:57 -06:00
Tamara Dahlgren
ff144df549 strumpack: make standalone test for +mpi more robust (#44943)
* strumpack: make standalone test for +mpi more robust
* Comment about which MPI launcher being attempted
2024-07-24 17:57:12 -07:00
Teo
f3acf201c4 halide: add v18.0.0 (#45401)
* Added Halide 18
* Fix style+other stuff
* Accept compiler deps
* 17.0.2 too
* reorder versions
2024-07-24 16:22:51 -07:00
John W. Parent
e5364ea832 Netlib-lapack package: search for correct library names on Windows (#45417)
Library names on Windows are not typically prefixed with lib; the default
`.libs` implementation accounts for this, but `netlib-lapack` has a
custom implementation of `.libs` that did not account for this.
2024-07-24 13:28:30 -07:00
dependabot[bot]
53b8f91c02 build(deps): bump docker/login-action from 3.2.0 to 3.3.0 (#45378)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](0d4c9c5ea7...9780b0c442)

---
updated-dependencies:
- dependency-name: docker/login-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-07-24 13:40:12 -04:00
Todd Gamblin
a841ddd00c spack pkg grep: don't warn when grepping for quoted strings (#45412)
The `Executable` class emits a warning when you pass quoted arguments to it:

```
> spack pkg grep '"namespace"'
==> Warning: Quotes in command arguments can confuse scripts like configure.
  The following arguments may cause problems when executed:
      "namespace"
  Quotes aren't needed because spack doesn't use a shell. Consider removing them.
  If multiple levels of quotation are required, use `ignore_quotes=True`.
```

This is to warn new package authors who aren't used to calling build commands in python.
It's not useful for `spack pkg grep`, where we really are passing args on the command
line, and if we pass a quoted string, we probably meant to.

- [x] make `ignore_quotes` an instance variable, not just an argument to ``__call__`
- [x] set `ignore_quotes` to `True` in `spack pkg grep`

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-07-24 08:11:32 -07:00
snehring
39455768b2 hybpiper: change package type, add version 2.1.8 (#45262)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-07-24 09:16:54 -05:00
afzpatel
e529a454eb CI: add ML ROCm stack (#45302)
* add ML ROCm stack

* add suggested changes

* remove py-torch and py-tensorflow-estimator

* add TF_ROCM_AMDGPU_TARGETS env variable and remove packages from pipeline

* remove py-jax and py-xgboost
2024-07-24 16:16:15 +02:00
AcriusWinter
1b5dc396e3 uftrace: change to executable declaration (#45403) 2024-07-23 18:32:06 -06:00
Wouter Deconinck
15a3ac0512 py-arrow: add v1.3.0 (switch to flit-core) (#45123) 2024-07-23 17:50:21 -06:00
Thomas Applencourt
52f149266f ruby: add v3.3.4 (#45334)
* Ruby Add 3.3.4

* Update package.py

* Update package.py
2024-07-23 17:38:52 -06:00
Teague Sterling
8d33c2e7c0 generate-ninja: new package (#45391)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-23 14:47:04 -07:00
Karol Krizka
b3d82dc3a8 ROOT should add_include_path virtual glu for consistency. (#45057) 2024-07-23 14:12:54 -05:00
eugeneswalker
0fb44529bb e4s rocm external ci stack: upgrade to v6.1.2 (#45356)
* e4s rocm external ci stack: upgrade to v6.1.2

* magma: add rocm-core 6.1.2
2024-07-23 09:52:52 -07:00
dependabot[bot]
6ea944bf17 build(deps): bump pytest from 8.2.2 to 8.3.1 in /lib/spack/docs (#45377)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.2 to 8.3.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 11:53:55 -04:00
dependabot[bot]
8c6177c47f build(deps): bump sphinx from 7.4.6 to 7.4.7 in /lib/spack/docs (#45376)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.6 to 7.4.7.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.6...v7.4.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 11:53:43 -04:00
dependabot[bot]
b65d9f1524 build(deps): bump docker/setup-buildx-action from 3.4.0 to 3.5.0 (#45379)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](4fd812986e...aa33708b10)

---
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-07-23 11:53:18 -04:00
dependabot[bot]
03e5dddf24 build(deps): bump docker/build-push-action from 6.4.1 to 6.5.0 (#45380)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.4.1 to 6.5.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](1ca370b3a9...5176d81f87)

---
updated-dependencies:
- dependency-name: docker/build-push-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-07-23 11:53:04 -04:00
dependabot[bot]
7bb892f7b3 build(deps): bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#45381)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](5927c834f5...49b3bc8e6b)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-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-07-23 11:52:42 -04:00
Wouter Deconinck
66ed8ebbd9 gh: convert to GoPackage (#45351)
* gh: convert to GoPackage

* gh: fix style
2024-07-23 11:49:05 -04:00
Wouter Deconinck
0d326f83b6 GoPackage: default -modcacherw to ensure stage cleanup (#45350) 2024-07-23 11:48:52 -04:00
Dom Heinzeller
fc0955b125 Update and clean up hdf-eos2 package.py to fix build errors with Intel oneAPI (#45399) 2024-07-23 07:54:12 -07:00
Mikael Simberg
13ba1b96c3 fmt: add 11.0.2 (#45396) 2024-07-23 07:46:45 -07:00
Mikael Simberg
d66d169027 Remove # generated comments from many packages, add some missing depends_on("cxx") (#45395) 2024-07-23 10:31:22 +02:00
Manuela Kuhn
6decd6aaa1 py-mne-bids: add new package (#45374) 2024-07-22 17:11:18 -06:00
AcriusWinter
3c0ffa8652 uftrace: new test API, add 0.16 with libtraceevent, fix build (#45364)
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-07-22 16:31:38 -06:00
Christoph Junghans
4917e3f664 votca: add v2024.1 (#45341) 2024-07-22 14:22:46 -06:00
Adam J. Stewart
b2a14b456e py-numpy: add v2.0.1 (#45354) 2024-07-22 14:04:09 -06:00
Teague Sterling
ab1580a37f linux-pam: add v1.5.1, v1.5.3, v1.6.0, v1.6.1 and additional variants (#45344)
* package/linux-pam: dependencies
* Adding variants to linux-pam
* Updating linux-pam variants
* Fixing variants for linux-pam after testing
* clean up flag handling
* clean up terrible tabs
* cant use default_args for compiler dependencies
* Change selinux to off by default

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-22 12:57:39 -07:00
Teague Sterling
c1f979cd54 libwnck: new package (#44641) 2024-07-22 21:27:45 +02:00
Teague Sterling
d124338ecb libgudev: new package (#44639) 2024-07-22 21:24:42 +02:00
Brad Geltz
d001f14514 geopm: Add v3.1 and update the needed dependencies (#44793) 2024-07-22 21:23:11 +02:00
Jordan Galby
c43205d6de asciidoc: Fix asciidoc@10 install (#44926) 2024-07-22 21:16:08 +02:00
snehring
54f1af5a29 libint: Fix build for 2.6.0, add libs property (#45034)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-07-22 20:55:34 +02:00
Alex Seaton
350661f027 heyoka: add current 4.0.x and 5.0.0 releases (#45314) 2024-07-22 20:16:39 +02:00
Philipp Edelmann
3699df2651 rayleigh: add v1.2.0 (#45333) 2024-07-22 20:05:44 +02:00
Andrew W Elble
63197fea3e dedisp: fix preinstall: it only takes self (#45328)
too many arguments here, only takes "self".
2024-07-22 20:00:14 +02:00
Martin Lang
f044194b06 libvdwxc: Fix configure with gcc-14 (#45093) 2024-07-22 19:54:49 +02:00
William Moses
29302c13e9 Update Enzyme to 0.0.135 (#45346) 2024-07-22 09:35:40 -07:00
Diego Alvarez S.
c4808de2ff Add nextflow 24.04.3 (#45357) 2024-07-22 09:29:46 -07:00
Alex Leute
c390a4530e py-colored: Added new version (#45361) 2024-07-22 09:17:13 -07:00
Teague Sterling
be771d5d6f node-js: add v17.9.1, v20.15.0, v21.7.3, v22.3.0, v22.4.0 (#45007)
* Adding new versions and compilation conflict for nodejs
* Update failed version for gcc14
* Updating conflicts notes for correctness/clarity/format
* Applying spack-ized versions of fix in https://github.com/nodejs/node/issues/52223 to adddress CI failures
* Update fix-old-glibc-random-headers.patch
* Update package.py
* Update fix-old-glibc-random-headers.patch
* Update fix-old-glibc-random-headers.patch
* Adding conflict for older glibc
* Fixing patch for older systems, need to undef
* Removing overly strict conflicts

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-22 08:32:34 -07:00
Wouter Deconinck
8b45fa089e geant4: support Qt5 and Qt6 (#45352)
* geant4: support qt5 and qt6
* geant4: update conflict msg
2024-07-22 13:38:46 +01:00
dependabot[bot]
0d04223ccd build(deps): bump mypy from 1.10.1 to 1.11.0 in /lib/spack/docs (#45337)
Bumps [mypy](https://github.com/python/mypy) from 1.10.1 to 1.11.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.10.1...v1.11)

---
updated-dependencies:
- dependency-name: mypy
  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-07-20 11:25:31 -05:00
Peter Scheibel
5ef222d62f Testing: omit test on windows (#45340)
Re-disable a test that was enabled in #45031
2024-07-20 00:32:37 -07:00
Nicole C.
6810e9ed2e Windows Tests: enable more cmd tests on Windows (#45031)
* Several tests can be enabled on Windows with no changes to logic
  (either the test logic or logic being tested)
* Test for `spack location` requires modification of the test logic,
  but with a minor change can be enabled on Windows
2024-07-19 18:08:28 -07:00
Andrew W Elble
a6c638d0fa sqlite: fix AttributeError when +functions (#45327)
using self.compiler.cc_pic_flag here results in these errors:

==> sqlite: Executing phase: 'install'
==> Error: AttributeError: 'AutotoolsBuilder' object has no attribute 'compiler'

change it to self.pkg.compiler.cc_pic_flag instead.
2024-07-19 16:24:22 -06:00
Rémi Lacroix
fa8a512945 NCCL: add version 2.22.3-1. (#45322) 2024-07-19 12:18:16 -06:00
Wouter Deconinck
24b73da9e6 docs: util/environment.py: use re.Pattern[str] instead of re (#45329)
* docs: util/environment.py: use `re.Pattern[str]` instead of `re`

* docs: sphinx==7.4.6
2024-07-19 20:03:07 +02:00
afzpatel
4447d3339c change 2.16-rocm-enhanced to 2.16.1-rocm-enhanced (#45320) 2024-07-19 09:45:31 -06:00
Alex Leute
d82c9e7f2a usearch: new version (#45308)
* usearch: new versison
   Manual download no longer reqired for @12:
2024-07-19 01:42:58 -06:00
AcriusWinter
6828a7402a improved-rdock: new test API (#45239)
* imoroved-rdock: new test API
* Make test subpart names and or descriptions more accurate

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-07-18 16:06:45 -06:00
dmagdavector
a0d62a40dd sqlite: add some newer releases (#45297)
Included: 3.46.0 (most current), 3.45.3, 3.45.1 (for possible compat with Ubuntu 24.04 LTS), 3.44.2.
2024-07-18 15:06:24 -06:00
eugeneswalker
712dcf6b8d e4s ci: enable some disabled specs (#44934)
* e4s ci: enable some disabled specs

* comment out cp2k +cuda due to unsupported cuda_arch

* comment out dealii+cuda due to concretize error

* work through concretize errors

* e4s: comment out failing builds

* e4s stack: disabled non-building specs

* comment out failing specs

* comment out failing specs

* cleanup comments
2024-07-18 20:58:10 +00:00
Wouter Deconinck
ad1fc34199 rust: rework external find to require both rustc and cargo (#45286)
* rust: rework external find to require both rustc and cargo

* rust: handle unable to parse version

* [@spackbot] updating style on behalf of wdconinc

* rust: not x or not y -> not (x and y)

Co-authored-by: Alec Scott <hi@alecbcs.com>

* rust: pick first rustc found

Co-authored-by: Alec Scott <hi@alecbcs.com>

* rust: list comprehensions

Co-authored-by: Alec Scott <hi@alecbcs.com>

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-07-18 14:19:50 -06:00
Adam J. Stewart
ab723b25d0 py-tensorflow: add v2.17.0 (#45201) 2024-07-18 12:54:52 -07:00
Wouter Deconinck
016673f419 py-cryptography: add v41.0.7, v42.0.8; py-setuptools-rust: add v1.7.0, v1.8.1, v1.9.0 (#45282) 2024-07-18 12:18:27 -07:00
Adam J. Stewart
7bc6d62e9b py-sphinx: add v7.4 (#45255) 2024-07-18 12:48:18 -06:00
Bill Williams
fca9cc3e0e Allow remapping of compiler names (#45299)
CCE in spack is Cray on the Score-P configure line. Others can be added.

Co-authored-by: William Williams <william.williams@tu-dresden.de>
2024-07-18 11:48:51 -06:00
snehring
2a178bfbb0 mafft: add version 7.525 (#45258)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-07-18 10:25:53 -07:00
snehring
3381879358 spades: add version 4.0.0 and new variants (#45278)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-07-18 10:24:05 -07:00
Matt Thompson
ed9058618a mapl: add v2.47.1 (#45280)
* mapl: add 2.47.1
* Approve compiler depends_on
2024-07-18 10:21:15 -07:00
Harmen Stoppels
a4c99bad6a git packages: add language dep (#45294) 2024-07-18 19:17:54 +02:00
Pranav Sivaraman
f31f58ff26 magic-enum: add version 0.9.6 (#45284)
* magic-enum: add version 0.9.6
* magic-enum: add maintainer

---------

Co-authored-by: pranav-sivaraman <pranav-sivaraman@users.noreply.github.com>
2024-07-18 10:15:35 -07:00
Wouter Deconinck
f84918da4b harfbuzz: add v9.0.0 (#45290)
* harfbuzz: add v9.0.0
* harfbuzz: do not patch non-existing Makefile beyond v8
2024-07-18 10:10:18 -07:00
Richard Berger
80a237e250 netlib-lapack: add pic variant (#45291) 2024-07-18 10:06:25 -07:00
Cameron Smith
f52d3b26c3 pumi: language dependencies (#45301)
Signed-off-by: Cameron Smith <smithc11@rpi.edu>
2024-07-18 11:04:57 -06:00
AcriusWinter
2029d714a0 rocm-opencl: old to new test API (#45065)
* rocm-opencl: old to new test API
* Run tests from test stage directory

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-18 09:35:10 -07:00
Alec Scott
31ef1df74f go: remove invalid deps (#45279)
* go: remove invalid deps

* go: add dependencies sed and grep
2024-07-18 09:18:05 -07:00
Richard Berger
00ae96a7cb libmesh: add v1.7.1, and fixes (#45292)
* libmesh: add missing v1.7.1 release

* libmesh: avoid pulling in petsc if only +mpi or +metis is given

* libmesh: add shared variant

Co-authored-by: rbberger <rbberger@users.noreply.github.com>
2024-07-18 13:46:39 +02:00
Seth R. Johnson
8d2a6d6744 sethrj: update maintained package language dependencies (#45289) 2024-07-18 10:55:20 +02:00
Massimiliano Culpo
9443e31b1e Do not initialize previous store state in "use_store" (#45268)
The "use_store" context manager is used to swap the value
of a global variable (spack.store.STORE), while keeping
another global variable consistent (spack.config.CONFIG).

When doing that it tries to evaluate the previous value
of the store, if that was not done already. This is wrong,
since the configuration might be in an "intermediate" state
that was never meant to trigger side effects.

Remove that operation, and add a unit test to
prevent regressions.
2024-07-18 07:18:14 +02:00
Wouter Deconinck
2d8ca8af69 qt-*: add v6.7.1, v6.7.2 (#45288) 2024-07-17 22:03:13 -06:00
dependabot[bot]
de4d4695c4 build(deps): bump docker/build-push-action from 6.4.0 to 6.4.1 (#45283)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](a254f8ca60...1ca370b3a9)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  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-07-17 21:43:12 -06:00
MichaelLaufer
c8cf85223f py-pyfr: add v2.0.3 (#45274)
* py-pyfr: add v2.0.3
2024-07-17 18:36:40 -06:00
Wouter Deconinck
b869538544 environment: handle view root at existing directory better (#45263)
- remove empty dir if exists at view root
- error better if non-empty dir

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-07-17 23:17:30 +02:00
Adam J. Stewart
4710cbb281 py-lightning: setuptools required at run-time (#45260) 2024-07-17 11:11:42 -07:00
Massimiliano Culpo
9ae1014e55 Run minimization of weights only on known targets (#45269)
This prevents excessive output from clingo of the kind:

.../spack/lib/spack/spack/solver/concretize.lp:1640:5-11: info: tuple ignored:
  #sup@2
2024-07-17 11:10:00 -07:00
afzpatel
813c0dd031 hipsparselt, composable-kernel: add netlib-lapack test dependency and enable ck test (#45273)
* add netlib-lapack dependency to hipsparselt and enable ck test
* fix cmake args
2024-07-17 10:49:28 -07:00
Lucas Frérot
91071933d0 tamaas: added version 2.8.0 and petsc variant (#45267)
* tamaas: added version 2.8.0
* tamaas: added +petsc variant for extra solvers
2024-07-17 10:30:40 -07:00
snehring
df5bac3e6c giflib: remove convert call in doc generation (#45276)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-07-17 09:42:20 -07:00
Harmen Stoppels
7b9f8abce5 Add depends_on([c,cxx,fortran]) (#45217)
Add language dependencies `c`, `cxx`, and `fortran`.

These `depends_on` statements are auto-generated based on file extensions found
in source tarballs/zipfiles.

The `# generated` comment can be removed by package maintainers after
validating correctness.
2024-07-17 16:07:43 +02:00
Harmen Stoppels
a2f9d4b6a1 pixman: unconditional --with-pic (#45272) 2024-07-17 16:02:50 +02:00
Harmen Stoppels
77e16d55c1 warpx: fix openpmd backward compat bound (#45271) 2024-07-17 15:31:43 +02:00
Stephen Nicholas Swatman
ecb2442566 detray: new package (#45024)
* detray: new package

This commit adds the detray package, a detector description library for
HEP experiments that is designed to be GPU-friendly.

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

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

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

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

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-07-17 07:42:19 -05:00
Alec Scott
89c0b4accf libgcrypt: conflict with darwin when @1.11.0 (#45264)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-07-16 23:45:13 -06:00
downloadico
8e5b51395a abinit: add version 10.0.7 (#45250)
* abinit: add version 10.0.7
* abinit: simplified version constraint for applying rm_march_settings_v9.patch
2024-07-16 15:08:29 -07:00
AcriusWinter
c2ada0f15a parflow: Old test method to new test method (#44933)
* parflow: Old test method to new test method
* add output checker
* made req. changes
2024-07-16 12:43:31 -07:00
afzpatel
6d3541c5fd fix hipblas test (#44666)
* fix hipblas test
* add rocm-openmp-extras dependencies
2024-07-16 12:39:08 -07:00
snehring
31e4149067 vasp: add new version 6.4.3 and rework package (#44937)
* vasp: add new version 6.4.3 and rework package
* vasp: remove redundant cuda dep
* vasp: bump fftlib variant version restriction
* vasp: honor the still existing scalapack variant

---------

Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-07-16 12:37:44 -07:00
otsukay
c9fba9ec79 fujitsu.patch is no longer needed for versions>=4.5 (#45154) 2024-07-16 12:18:39 -07:00
Wouter Deconinck
282627714e gaudi: depends_on python +dbm (#45238) 2024-07-16 12:13:17 -07:00
fpruvost
714dd783f9 pastix: new version v6.4.0 (#45246) 2024-07-16 12:06:30 -07:00
Harmen Stoppels
40b390903d gmake: generic CXX, fix build.sh, deprecate 4.0, add 4.1 (#45137)
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-07-16 18:58:57 +02:00
Massimiliano Culpo
ce1b569b69 Fix order of deserialization in subprocess context (#45229)
Since the the MetaPathFinder now owns a lazily constructed RepoPath object, we need to deserialize environments before the package that needs to be restored. Before we were relying on globals to be inconsistent in a way that let the entire process go.
2024-07-16 10:15:29 -06:00
Harmen Stoppels
b539eb5aab concretizer: show input specs on error (#45245) 2024-07-16 14:04:56 +02:00
Seth R. Johnson
e992e1efbd Celeritas: new version 0.4.4 (#45234) 2024-07-16 04:23:02 -06:00
Alec Scott
33a52dd836 pass: switch to git based versions to fix changing checksum in tarball (#45237) 2024-07-16 04:18:09 -06:00
Wouter Deconinck
b5f06fb3bc py-mpmath: ad v1.3.0; depends_on py-setuptools for old versions (#45232) 2024-07-16 04:07:40 -06:00
afzpatel
494817b616 correct test binary name (#45240) 2024-07-16 04:03:02 -06:00
Wouter Deconinck
02470a5aae geant4: add v11.3.0.beta (#45087)
* geant4: add v11.3.0.beta

* geant4: vecgeom@1.2.8: when 11.3:

* geant4-data: add v11.3.0

* g4particlexs: add v4.1

* g4emlow: add v8.6

* g4nudexlib, g4urrpt: add v1.0

* [@spackbot] updating style on behalf of wdconinc

* geant4: immediately deprecate geant4-11.3.0.beta

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-07-16 10:03:49 +01:00
Massimiliano Culpo
42232a8ab6 Fix error message for test log in child process (#45233)
If we don't have a log, we'll mask the real error with
another caused by using None as an argument to os.path.join
2024-07-16 06:58:36 +02:00
Matthieu Dorier
cb64df45c8 toml11: adds new versions (#45056) 2024-07-16 06:40:45 +02:00
Wouter Deconinck
a11da7bdb9 cmd/dependents.py: remove unused loop over all packages (#45166) 2024-07-16 06:38:01 +02:00
Matthew Lesko
9a22ae11c6 openmpi: fix pmix version check in v5 (#44928)
* OpenMPI 5 w/ PRRTE 3 series PMIX version check fix

OpenMPI fails to compile otherwise when targeting external PMIX 4.2.6 and likely others.

```
  >> 3369    base/ess_base_bootstrap.c:72:14: error: static declaration of 'pmix_getline' follows non-static declaration
     3370       72 | static char *pmix_getline(FILE *fp)
     3371          |              ^
     3372    /opt/pmix/include/pmix/src/util/pmix_string_copy.h:83:19: note: previous declaration is here
     3373       83 | PMIX_EXPORT char *pmix_getline(FILE *fp);
     3374          |                   ^
     3375    1 error generated.
  >> 3376    make[4]: *** [Makefile:820: base/ess_base_bootstrap.lo] Error 1
```

Upstream PRRTE fix (not released yet): https://github.com/openpmix/prrte/pull/1957
Upstream OpenMPI issue: https://github.com/open-mpi/ompi/issues/12537 ("fixed in next release")

Co-authored-by: Shahzeb Siddiqui <shahzebmsiddiqui@gmail.com>
2024-07-16 06:33:12 +02:00
Stephen Sachs
318a7e0e30 wrf: explicit conflict oneapi + older versions (#44787)
The patch which enables icx/ifx compilers is only added for `wrf@4.4:`. This PR prints a useful message at concretization time instead of failing the installation later on.

Co-authored-by: stephenmsachs <stephenmsachs@users.noreply.github.com>
2024-07-16 06:28:54 +02:00
Wouter Deconinck
e976f351f8 py-ipython: depends_on python +sqlite3 when @8: (#45231) 2024-07-16 06:26:41 +02:00
Wouter Deconinck
437341d40e py-nodeenv: depends_on python +ssl (#45225) 2024-07-16 06:23:21 +02:00
dependabot[bot]
9d7ea1a28b build(deps): bump docker/build-push-action from 6.3.0 to 6.4.0 (#45243)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](1a162644f9...a254f8ca60)

---
updated-dependencies:
- dependency-name: docker/build-push-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-07-16 06:14:27 +02:00
AcriusWinter
d85668f096 slate: changed stand-alone test from old to new API (#44953)
* slate: changed from old to new format
* make code tighter
* replace assert method
* SkipTest plus other cleanup

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-15 21:10:50 -06:00
Alex Richert
5c3a23a481 pixman: add shared, pic variants (#44889)
* Add shared/pic variants to pixman
* add +shared~pic conflict
2024-07-15 17:36:45 -07:00
AcriusWinter
8be1f26ac6 tix: old to new test API (#45223) 2024-07-15 17:31:02 -07:00
Adam J. Stewart
35bd21fc64 py-tensorflow-estimator: correct dependencies (#44185) 2024-07-15 22:12:16 +02:00
Adam J. Stewart
652170fb54 DCMTK: fix build with libtiff (#45213) 2024-07-15 22:02:19 +02:00
Harmen Stoppels
d4e6c29f25 unparser.py: remove print statements (#45235) 2024-07-15 21:55:11 +02:00
Stephen Nicholas Swatman
c12772e73f vecmem: add infrastructure for working with SYCL (#45058)
* vecmem: add infrastructure for working with SYCL

The vecmem package uses an unorthodox build system where, instead of
expecting a SYCL-capable compiler in the `CXX` environment variable, it
expects one in `SYCLCXX`. It also needs the correct SYCL flags to be
set. This commit adds a custom build environment for the vecmem package
which allows it to be built in this way. I've also added an extra CMake
flag to ensure that the build system doesn't download any unwanted
dependencies.

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

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

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-07-15 14:42:19 -05:00
pauleonix
a26ac1dbcc cuda: add v12.5.1 (#44342)
- Add explicit conflict on ppc64le for 12.5 and newer.
- Update/fix intel compiler conflict to reflect that intel@2021 is compatible
  only since 11.4.1 and not since 11.1.1.
- Add intel compiler conflicts to reflect strict support matrix since
  12.2.0.
2024-07-15 20:04:47 +02:00
Teague Sterling
2afaeba292 zip: add patch for gcc@14: (#45006) 2024-07-15 19:42:41 +02:00
Martin Lang
a14e76b98d FFTW: missing function declaration in pfft patch (#45095) 2024-07-15 18:50:35 +02:00
renjithravindrankannath
9a3a759ed3 Updating rocm-opencl to 6.1.2 (#45219) 2024-07-15 09:27:53 -07:00
Michael Kuhn
72f17d6961 rocksdb: add 9.4.0 (#45230) 2024-07-15 09:26:50 -07:00
Harmen Stoppels
1b967a9d98 iconv: remove requirement (#45206)
no longer necessary after 5c53973220
2024-07-15 17:45:32 +02:00
Harmen Stoppels
bb954390ec sqlite: fix url_for_version (#45228) 2024-07-15 17:45:15 +02:00
Wouter Deconinck
bf9b6940c9 abseil-cpp: patch to avoid googletest build dependency (#45103) 2024-07-15 17:09:21 +02:00
simonLeary42
22980b9e65 rust: update cmake dependency ranges (#45145) 2024-07-15 17:03:23 +02:00
Vanessasaurus
483426f771 flux-sched: add v0.36.0 (#45161) 2024-07-15 17:01:07 +02:00
rfbgo
1e5b976eb7 py-pytorch-lightning: add v2.0.7 (#45175) 2024-07-15 16:59:03 +02:00
Patrick Diehl
2aa6939b96 hpx: add instrumentation=thread_debug (#45199)
Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
2024-07-15 14:47:13 +02:00
Simo Tuomisto
f7e601d352 google-cloud-cli: fix unquoted value in env variable (#45207) 2024-07-15 14:41:44 +02:00
Manuela Kuhn
c4082931e3 r-colourpicker: add 1.3.0 (#45209) 2024-07-15 14:39:28 +02:00
Julien Cortial
cee3e5436b perl-json: add optional dependency on perl-json-xs (#45050) 2024-07-15 14:23:25 +02:00
Adam J. Stewart
613fa56bfc py-shapely: add v2.0.5 (#45224) 2024-07-15 11:38:10 +02:00
Michael Kuhn
0752d94bbf libelf: fix build with GCC 14 (#45226) 2024-07-15 10:18:36 +02:00
afzpatel
3bf1a03760 py-tensorflow: change py-tensorflow@2.16-rocm-enhanced to use tarball instead of branch (#45218)
* change py-tensorflow@2.16-rocm-enhanced to use tarball instead of branch

* remove revert_fd6b0a4.patch and use github commit patch url
2024-07-13 12:19:19 +02:00
John W. Parent
e2844e2fef bootstrap ci: add exit code validation for windows (#45221) 2024-07-12 23:07:45 -06:00
AcriusWinter
2ca733bbc1 rocm-clang-ocl: old to new test API (#44938)
* rocm-ocl-clang: old to new test format
* Minor cleanup

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-12 15:56:38 -06:00
Dom Heinzeller
e2b6eca420 qt: Add support for compiling @5.15.14 with Intel oneAPI compilers (icx, icpx) (#45195) 2024-07-12 15:35:01 -06:00
Dom Heinzeller
67cb19614e Update fckit to build with Intel oneAPI compilers (icx, icpx) (#45196) 2024-07-12 13:37:58 -06:00
Manuela Kuhn
e464461c19 py-pyqt6: add v6.7.0 (#45212) 2024-07-12 11:03:28 -07:00
Manuela Kuhn
6efe88f7a1 py-multiecho: add v0.29 (#45216) 2024-07-12 10:42:04 -07:00
Harmen Stoppels
0ce35dafe1 Add c to the list of languages (#45191) 2024-07-12 15:25:41 +02:00
pauleonix
49e419b2df cuda: add maintainer (#45211) 2024-07-12 06:11:10 -07:00
Massimiliano Culpo
d9033d8dac llvm: detect short executable names (#45171)
Also, remove annotations for "ld.lld" and "lldb"
2024-07-12 14:03:00 +02:00
Harmen Stoppels
517b7fb0c9 directives: types, avoid redundant parsing (#45208) 2024-07-12 13:35:16 +02:00
Massimiliano Culpo
568e79a1e3 gcc: consider link when detecting compilers (#45169) 2024-07-12 11:30:56 +02:00
Harmen Stoppels
9c8846b37b Add pkg- prefix to builtin.mock a b c d ... (#45205) 2024-07-12 11:27:40 +02:00
Tamara Dahlgren
737b70cbbf Buildcache: remove deprecated --allow-root and preview subcommand (#45204) 2024-07-11 18:19:04 -07:00
Dom Heinzeller
03d2212881 Bug fix for mapl: configure mvapich2 (#45164)
* Bug fix for mapl: configure mvapich2
* Update var/spack/repos/builtin/packages/mapl/package.py

---------

Co-authored-by: Matt Thompson <fortran@gmail.com>
2024-07-11 15:03:37 -07:00
Lev Gorenstein
b8d10916af Remove some explicit dependencies (#45146)
As discussed in https://github.com/spack/spack/pull/44881#issuecomment-2218411735 a `spack install py-globus-cli` fails to concretize on an Ubuntu 22.04 under Windows WSL2 because of too strict of explicit dependencies.

Let's try to remove them here (since these are "just in case" and in all honesty should be handled by `py-globus-sdk` anyways).
2024-07-11 11:19:47 -07:00
Wouter Deconinck
4fe5f35c2f xrootd: add v5.7.0 (#45078)
* xrootd: add v5.7.0
* xrootd: new variant +ec, depends_on isa-l
2024-07-11 11:12:27 -07:00
Greg Sjaardema
cea1d8b935 seacas: new version to fix some portability bugs (#45179)
* Now builds with latest fmt release (11.0.1)
* Missing array include in nem_spread
* Fix timestep conssitency check in file-per-rank case if one or more dbs have no timesteps.
2024-07-11 09:52:07 -07:00
dependabot[bot]
e7946a3a41 build(deps): bump actions/checkout from 4.1.6 to 4.1.7 (#44693)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-07-11 15:32:04 +02:00
Harmen Stoppels
5c53973220 concretize.lp: drop 0 weight of external providers (#45025)
If an external happens to be a provider of anything, the solver would
set its weight to 0, meaning that it is most preferred, even if
packages.yaml config disagrees.

That was done so that `spack external find mpich` would be sufficent to
pick it up as mpi provider.

That may have made sense for mpi specifically, but doesn't make sense
for other virtuals. For example `glibc` provides iconv, and is an
external by design, but it's better to use libiconv as a separate
package as a provider.

Therefore, drop this rule, and instead let users add config:

```
mpi:
  require: [mpich]
```

or

```
mpi:
  buildable: false
```

which is well-documented.
2024-07-11 15:29:56 +02:00
Harmen Stoppels
278a38f4af external find --not-buildable: mark virtuals (#45159)
This change makes `spack external find --not-buildable` mark virtuals
provided by detected packages as non-buildable, so that it's sufficient
for users to let spack detect say mpich and have the concretizer pick it
up as mpi provider even when openmpi is "more preferred".
2024-07-11 15:19:55 +02:00
Paolo
39bbedf517 acfl: update the headers property (#44653)
Consistently with ArmPL@24:, the include directory for acfl@24:
has changed to include. The change wants to update to this change
and distinguish the include path for releases previous to 24.04
and the future ones
2024-07-11 11:20:34 +02:00
Massimiliano Culpo
2153f6056d checksum: fix circular imports on macOS (#45187) 2024-07-11 10:49:29 +02:00
Adam J. Stewart
2be9b41362 py-tensorboard: update numpy compatibility (#45092) 2024-07-11 10:32:35 +02:00
AcriusWinter
f9fa024fc5 rocm-cmake: changed test API from old to new (#44939)
* rocm-cmake: changed test format from old to new
* Rename cmake variable
* post-conflict resolution: remove remaining version check

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-07-11 00:39:08 -06:00
Jack Morrison
7c7ac27900 MPICH: Add version 4.2.2 (#45040) 2024-07-10 21:32:09 -07:00
Derek Ryan Strong
253e8b1f2a Add libjpeg-turbo v3.0.3, v3.0.2, v3.0.1 (#44990) 2024-07-10 21:29:36 -07:00
dependabot[bot]
60e75c9234 build(deps): bump docker/login-action from 3.1.0 to 3.2.0 (#44424)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](e92390c5fb...0d4c9c5ea7)

---
updated-dependencies:
- dependency-name: docker/login-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-07-11 05:42:04 +02:00
dependabot[bot]
fb89337b04 build(deps): bump actions/setup-python from 5.1.0 to 5.1.1 (#45182)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](82c7e631bb...39cd14951b)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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-07-11 05:39:08 +02:00
Kyle Knoepfel
53f71fc4a7 Use ROOT_LIBRARY_PATH and adjust other environment variables (#45109)
* Use ROOT_LIBRARY_PATH and adjust other environment variables

* Accommodate versions older than ROOT 6.26

* Use os instead of pathlib
2024-07-10 19:40:52 -06:00
AcriusWinter
12e7c1569c pumi: new test API (#45181)
* pumi: new test API

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-07-10 17:57:05 -06:00
Nicole C
2eb566b884 Spack on Windows: update dev_build tests to run on Windows (#45039) 2024-07-10 16:52:01 -07:00
Hariharan Devarajan
a7444873b9 brahma: add 0.0.4 and 0.0.5 (#45168)
* Added Release 0.0.4 and 0.0.5
* Changed requirement for gotcha
   use gotcha 1.0.5 for 0.0.2 and 0.0.3
* Combine gotcha 1.0.7 for master and develop

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-07-10 14:30:32 -06:00
Sreenivasa Murthy Kolam
397ff11d6d rpp package - fix the add_tests build failure for 6.1 rocm rel (#44738)
* rpp package - fix the add_tests build failure for 6.1 rel
* fix test build failure
2024-07-10 13:29:14 -07:00
renjithravindrankannath
285563ad01 Need to configure rsmiBindings.py.in similar to rsmiBindingsInit.py.in (#45131) 2024-07-10 13:21:28 -07:00
Teague Sterling
c3111ac0b4 py-janus: new package (#44520)
* py-janus: add v.0.7.0,v1.0.0
*  Incorporating changes from review  including:    
    https://github.com/spack/spack/pull/44520#pullrequestreview-2095028464
2024-07-10 13:16:12 -07:00
HELICS-bot
6505e7e02a helics: Add version 3.5.3 (#45142)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-10 12:19:39 -07:00
Alex Richert
c82889058c bacio: recipe updates (#45150) 2024-07-10 12:18:23 -07:00
renjithravindrankannath
2f4c20567c Correcting sha256sum for 6.1.2 (#45152) 2024-07-10 12:13:03 -07:00
Adam J. Stewart
a7d6a1188b py-rtree: add v1.3.0 (#45157) 2024-07-10 12:09:56 -07:00
Matthieu Dorier
4f5244920f py-configspace: new versions (#45165) 2024-07-10 12:05:04 -07:00
Adam J. Stewart
feecb60b9e py-pyvista: declare numpy 2 support (#45158) 2024-07-10 12:03:38 -07:00
John W. Parent
4f18cab8d2 Cpuinfo: static build when on Windows (#44899)
* Mirror cpuinfo CI for msvc
2024-07-10 12:46:13 -05:00
Harmen Stoppels
e6f1b4e63a Avoid duplicate detectable tag (#45160)
in case of inheritance the static tags prop may be updated multiple
times, and it turns out builder classes magically inherit from
traditional package classes
2024-07-10 18:14:28 +02:00
Stephen Nicholas Swatman
c458e985af Set LD_LIBRARY_PATH for OneAPI compiler (#45059)
While trying to build packages with the OneAPI compiler version 2024.1 I
ran into the following error, indicating that the compiler is unable to
find some necessary libraries:

```
/storage/Software/oneapi/2024.1/compiler/2024.1/bin/sycl-post-link: error
  while loading shared libraries: libonnxruntime.1.12.22.721.so: cannot open
  shared object file: No such file or directory

  icpx: error: unable to execute command: No such file or directory

  icpx: error: sycl-post-link command failed due to signal (use -v to see
  invocation)
```

Indeed, `libonnxruntime.1.12.22.721.so` does come bundled with the
OneAPI compiler, but it is not available in the build environment by
default. In this commit, I update the custom environment created by
OneAPI to include the `lib/` directory in which these libraries reside
in the `LD_LIBRARY_PATH` environment variable.
2024-07-10 06:50:07 -06:00
Stephen Nicholas Swatman
5f234e16d0 dfelibs: add Boost as a testing dependency (#45133)
In my enthusiasm to add dfelibs to Spack, I didn't realise that the
unit tests of dfelibs use Boost and, as such, Boost is required as a
testing dependency.
2024-07-10 06:32:45 -06:00
Massimiliano Culpo
9001e9328a Remove unnecessary copy.deepcopy calls (#45135) 2024-07-10 09:33:48 +02:00
AcriusWinter
b237ee3689 octopus: old to new test API (#45143)
* octopus: old to new test API
* Minor simplifications and cleanup

---------

Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-07-09 19:02:36 -07:00
Massimiliano Culpo
aa911eca40 Add compatibility of sequoia with previous macOS versions (#45127)
* Add compatibility of sequoia with previous macOS versions

* Add compatibility of sequoia with previous macOS versions
2024-07-09 17:48:24 -07:00
Wouter Deconinck
6362c615f5 git: add several new patch-level versions (#45107)
* git: add new patch-level versions

* git: deprecate older previous with broken git lfs
2024-07-09 15:43:31 -06:00
Mikael Simberg
544be90469 fmt: add 11.0.1 (#45089)
Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>
2024-07-09 13:21:50 -06:00
Peter Scheibel
56a1663cd9 spack find -c: search all concretized-but-not-installed specs (#44713)
Originally if you had `x -> y -> z`, and an env with `x` in its speclist that is concretized but not installed, then `spack find -c y` would not show anything. This was intended: `spack find` has up-until-now only ever listed out installed specs (and `-c` was for adding a preamble section about roots).

This changes `spack find` so:

* `-c` makes it search through all concretized specs in the env (in a sense it is anticipated that a concretized environment would serve as a "speculative" DB and users may want to query it like they query the DB outside of envs)
* Adds a `-i/--install-status` option, equivalent to `-I` from `spack spec`
* Shows install status for either `-c` or `-i`
* As a side effect to prior point, `spack find -i` can now distinguish different installation states (upstream/external)

Examples:

```
$ spack find -r
==> In environment findtest
==> 1 root specs
 -  raja

==> 6 installed packages (not shown)
==> 12 concretized packages to be installed (not shown)
```

```
$ spack find
==> In environment findtest
==> 1 root specs
 -  raja

-- darwin-ventura-m1 / apple-clang@14.0.3 -----------------------
berkeley-db@18.1.40  bzip2@1.0.8  diffutils@3.10  gmake@4.4.1  gnuconfig@2022-09-17  libiconv@1.17
==> 6 installed packages
==> 12 concretized packages to be installed (show with `spack find -c`)
```

```
$ spack find -c
==> In environment findtest
==> 1 root specs
 -  raja

-- darwin-ventura-m1 / apple-clang@14.0.3 -----------------------
[+]  berkeley-db@18.1.40  [+]  bzip2@1.0.8      -   cmake@3.29.4  [+]  diffutils@3.10  [+]  gmake@4.4.1           [+]  libiconv@1.17   -   nghttp2@1.62.0   -   pkgconf@2.2.0    -   readline@8.2
 -   blt@0.6.2             -   camp@2024.02.1   -   curl@8.7.1     -   gdbm@1.23       [+]  gnuconfig@2022-09-17   -   ncurses@6.5     -   perl@5.38.2      -   raja@2024.02.2   -   zlib-ng@2.1.6
==> 6 installed packages
==> 12 concretized packages to be installed


```
$ spack -E find
...
==> 82 installed packages
```
2024-07-09 11:53:20 -07:00
Rocco Meli
f9a46d61fa charmpp: add v8.0.0 (#45097)
* charmpp v8.0.0

---------

Co-authored-by: RMeli <RMeli@users.noreply.github.com>
2024-07-09 10:21:41 -06:00
Mikael Simberg
a81451ba1f pika: add v0.26.0 (#45104) 2024-07-09 10:01:57 -06:00
Rocco Meli
b11e370888 namd 3.0 (#45096) 2024-07-09 09:54:29 -06:00
Massimiliano Culpo
54ee7d4165 Remove the "install_mockery_mutable_config" fixture (#45129)
This fixture was introduced in #16429, and made
redundant in #39024
2024-07-09 11:23:49 +02:00
Massimiliano Culpo
15efcbe042 Fix conflicting use of config and mutable_config fixtures in unit tests (#45106)
and add a fixture to detect use of conflicting fixtures
2024-07-09 09:51:04 +02:00
Alec Scott
7c5fbee327 Improve organization of CI workflow scripts and pip requirements (#45037) 2024-07-09 04:46:09 +02:00
Satish Balay
b19c4cdcf6 petsc, py-petsc4py: add v3.21.3 (#44954)
* petsc, py-petsc4py: add v3.21.3
* py-petsc4py: requires cython v3 since v3.20
2024-07-08 15:40:36 -07:00
Harmen Stoppels
3212cf86f4 environments.rst: go from simple to advanced (#45004)
* environments.rst: go from simple to advanced
* improvements
* notes about activation
2024-07-08 15:36:18 -07:00
Auriane R
fbceae7773 [py-datasets] Add py-datasets version 2.20.0 (#44903)
* Add py-datasets version 2.20.0

* Add dependency requirements for version 2.20 + refactor

* Add missing tqdm and requests versions and to install latest py-datasets

* Add missing python requirements for 2.8.0 and 2.20.0
2024-07-08 15:21:14 -07:00
George Young
b921d1a920 gtfsort: new package (#45062)
* gtfsort: new rust package @0.2.2

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-07-08 15:07:22 -07:00
Robert Cohn
8128b549a5 [intel-oneapi-dpct] correct 2024.2.0 hash (#45100) 2024-07-08 13:46:55 -07:00
Alex Richert
7405d95035 ip2: deprecate package, fix sp dependency (#45064) 2024-07-08 22:18:15 +02:00
Harmen Stoppels
a04b12a3ef spec.py: print right deptype in tree (#45091)
Fix a bug where Spec.tree with cover=nodes reduces deptypes from all
in-edges, including from nodes not reachable from the root, which almost
always happens for concrete specs
2024-07-08 18:25:57 +02:00
Massimiliano Culpo
cbf8f2326d pinentry: add v1.3.1 (#45073) 2024-07-08 08:58:14 -07:00
Harmen Stoppels
297874bfed spec.py: fix __getitem__ looking outside of dag (#45090)
`Spec.__getitem__` queries dependent edges, which almost always point to
nodes outside the sub-dag considered. It should only ever look at edges
being traversed.
2024-07-08 14:53:51 +02:00
Massimiliano Culpo
74398d74ac Add type-hints to RepoPath (#45068)
* Also, fix a bug with use_repositories + import spack.pkg
2024-07-08 11:48:39 +02:00
afzpatel
cef9c36183 kripke: update version to 1.2.7 (#44791)
* initial commit to update kripke to 1.2.7
* fix style errors
2024-07-08 02:16:24 -06:00
Wouter Deconinck
5e7430975a zlib-ng: add v2.1.7, v2.2.1 (#45076) 2024-07-08 09:40:44 +02:00
Adam J. Stewart
1456f6dba1 py-scikit-learn: add v1.5.1 (#45016) 2024-07-08 09:29:11 +02:00
Hariharan Devarajan
daf74a60ca cpp-logger: add v0.0.4 (#45033) 2024-07-08 09:28:33 +02:00
Niclas Jansson
87df95c097 neko: add v0.8.0 (#45086)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-07-08 01:26:44 -06:00
Richard Berger
9b49576875 legion: bugfix for +cuda+cuda_unsupported_compiler (#45036)
When using a newer Clang for Kokkos than supported by a given CUDA version, the
CUDA compiler detection in Legion's CMake still needs to be passed
CMAKE_CUDA_FLAGS to pass the compiler check.
2024-07-08 09:25:09 +02:00
Hariharan Devarajan
065cbf79fc gotcha: add v1.0.7 (#45043) 2024-07-08 09:22:19 +02:00
Rocco Meli
09b89e87a4 DLA-Future-Fortran: add v0.2.0 (#45055) 2024-07-08 09:16:31 +02:00
Adam J. Stewart
ddab6156a6 py-numpy: add v2.0.0 (#44735) 2024-07-08 09:14:50 +02:00
Harry Sharma
10cdfff0d1 feat: add diamond@2.1.[8,9] (#45047) 2024-07-08 09:05:32 +02:00
Adam J. Stewart
3328416976 py-matplotlib: add v3.9.1 (#45060) 2024-07-08 08:59:10 +02:00
Wouter Deconinck
094a621f3c acts: add v35.1.0, v35.2.0 (#44963)
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-07-08 08:46:57 +02:00
Wouter Deconinck
87ce5d8ccb py-webcolors: add v24.6.0 (#45075) 2024-07-08 08:45:15 +02:00
Wouter Deconinck
bcdc92e25f vc: add v1.4.5 (#45077) 2024-07-08 08:43:16 +02:00
Wouter Deconinck
a323fab135 util-linux{-uuid}: add v2.40.2 (#45079)
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-07-08 08:40:14 +02:00
Wouter Deconinck
d42031b075 assimp: add v5.4.2 (#45081)
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-07-08 08:33:06 +02:00
Jonathon Anderson
efbb18aa25 hpctoolkit: minor fixes for build failures (#45070) 2024-07-08 08:22:11 +02:00
Harmen Stoppels
8a430f89b3 spack -C <env>: use env config w/o activation (#45046)
Precedence:

1. Named environment
2. Anonymous environment
3. Generic directory
2024-07-06 22:02:25 -07:00
dependabot[bot]
aeaa922eef build(deps): bump actions/upload-artifact from 4.3.3 to 4.3.4 (#45069)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65462800fd...0b2256b8c0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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-07-06 08:20:30 +02:00
Hadrien G
a6d5a34be3 Remove myself from maintainer lists (#45071) 2024-07-06 08:17:31 +02:00
Todd Gamblin
ba79542f3c spack gc: remove debug print statement (#45067)
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-07-05 22:36:45 +02:00
Auriane R
dc10c8a1ed [py-transformers] Add newer versions (#45022)
* Add newer versions for py-transformers

* Add dependencies needed for py-transformers latest version

* Enforce dependencies requirements for py-transformers newer versions
2024-07-05 14:52:24 +02:00
Auriane R
5ab814505e py-flash-attn: add v2.5.6 -> main (#44894)
* Add latest releases of py-flash-attn

* Add main branch for flash attention

* Add additional requirements
2024-07-05 06:19:01 -06:00
Harmen Stoppels
1d8bdcfc04 config: fix class hierarchy (#45044)
1. Avoid that `self.path` is of type `Optional[str]`
2. Simplify immutable config with a property.
2024-07-05 12:41:13 +02:00
Massimiliano Culpo
95cf341b50 Inject dependencies in repo classes (#45053) 2024-07-05 12:00:41 +02:00
Benjamin Fovet
a134485b1b remove trailing dot in gmsh 4.13.0 shasum (#45054) 2024-07-05 10:18:11 +02:00
dependabot[bot]
d39edeb9a1 build(deps): bump docker/setup-buildx-action from 3.3.0 to 3.4.0 (#45051)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](d70bba72b1...4fd812986e)

---
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-07-04 19:28:35 -05:00
dependabot[bot]
453fb27be2 build(deps): bump docker/build-push-action from 6.2.0 to 6.3.0 (#45042)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](15560696de...1a162644f9)

---
updated-dependencies:
- dependency-name: docker/build-push-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-07-04 19:28:21 -05:00
dependabot[bot]
831f04fb7d build(deps): bump docker/setup-qemu-action from 3.0.0 to 3.1.0 (#45041)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](68827325e0...5927c834f5)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-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-07-04 19:28:03 -05:00
Wouter Deconinck
04044a9744 containers: rm centos7 since EOL (#45049) 2024-07-04 22:22:23 +02:00
Massimiliano Culpo
8077285a63 flux-core: remove deprecated versions (#45014) 2024-07-04 22:15:55 +02:00
Paul R. C. Kent
537926c1a7 py-pyscf: add v2.6.0, v2.6.1, v2.6.2 (#45032)
* pyscf: add 260 261 262

* Fix max version typo
2024-07-04 12:43:27 -05:00
Stephen Nicholas Swatman
02ff3d7b1e acts-algebra-plugins: new package (#44861)
This commit adds the `acts-algebra-plugins` package which provides the
Acts project with linear algebra functionality.
2024-07-04 09:51:18 -05:00
Jordan Galby
491cb278f3 spack audit packages: Fix message (#45045)
Fix message formatting of the "virtual dependency cannot have variants" error.
2024-07-04 14:30:30 +02:00
Harmen Stoppels
ed1ebefd8f dray: deprecate and simplify (#45015) 2024-07-04 11:43:34 +02:00
Harmen Stoppels
36d64fcbd4 iconv: require libiconv on linux (#45026)
otherwise it is still picked up from glibc as it is external
2024-07-04 08:20:27 +02:00
Massimiliano Culpo
c5cdc2c0a2 Heuristic decays to default over time (#45023)
This modifies heuristic to decay to clingo default
over time. The hope is that this helps with specs
that have an optimal solution with a high penalty.

Let target and compiler heuristic decay too, do not
guess compiler
2024-07-04 08:19:52 +02:00
Carsten Uphoff
0eca86f64f tiny-tensor-compiler: fix missing dependencies (#44465)
* tiny-tensor-compiler: fix missing dependencies
* tiny-tensor-compiler: Remove dependency type for opencl c headers
* Re2c@3.1 has a mandatory Python interpreter dependency
* Remove re2c@3.1

---------

Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>
2024-07-03 19:08:45 -06:00
Stephen Nicholas Swatman
50027d76a5 dfelibs: new package (#44860)
* dfelibs: new package

This commits adds the `dfelibs` package, which is an Acts project fork
of dfelibs.

* dfelibs: docstring typo

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-07-03 15:37:25 -06:00
Robert Cohn
b4748de5a9 [openfoam]: use latest cgal (#45003)
* [openfoam]: use latest cgal
* add version checks for CGAL
2024-07-03 14:04:38 -07:00
Teague Sterling
8f2532c624 Fix #44715 by removing the librsvg dependency, which is only needed for testing. Also fixing typo. (#44989)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-03 13:52:16 -07:00
Jordan Galby
0726513334 gettext: Fix unvendor libxml2 (#44924)
* gettext: Fix unvendor libxml2
* gettext: Fix build with external libxml2
* Revert "gettext: Fix build with external libxml2"
   This reverts commit c209ad65cb.
2024-07-03 13:40:55 -07:00
Adam J. Stewart
f951f38883 Add support for macOS Sequoia (#45018) 2024-07-03 10:59:26 -07:00
afzpatel
5262412c13 py-tensorflow: remove patch file for 2.16-rocm-enhanced (#44783)
* remove patch file for py-tensorflow@2.16-rocm-enhanced

* add changes

* fix style errors

* remove 2.14-rocm-enhanced version and add patch file

* fix stlye error

* remove jit patch

* add 2.14-rocm-enhanced version
2024-07-03 12:19:07 +02:00
Harmen Stoppels
f022b93249 cmake: add patch to allow static linking with -DCMAKE_INSTALL_RPATH set (#44900) 2024-07-03 10:46:07 +02:00
Vanessasaurus
60b5e98182 flux-core: add v0.64.0 (#45012)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-07-03 01:55:20 -06:00
mvlopri
682acae9fd seacas/package.py: Update default version sha to latest (#45009)
Update to use the latest tag of SEACAS through Spack.
2024-07-03 01:50:27 -06:00
Rocco Meli
c0f80e9117 elsi: improve package and add external libOMM (#44865)
Add MatrixSwitch package
Add libOMM package
Use libOMM as external in ELSI
Add include paths for all libraries
Fortran modules need one directory up (can't use libs.directories since they are just the include/ directories)
2024-07-03 08:56:30 +02:00
Teague Sterling
dcf13af459 kentutils: add v455, v460, v464, v465 + package updates (#44413)
This addresses a few issues in the kentutils package:
 - Issue #44372
 - Cleaning up formattting and styles
 - Removing old versions that are not avaialble anymore
 - Removing newer versions that are also not available anymore
 - The installer does not install the static libs
   that are expected by packages that depend on kentutils
 - There are conflicts and less-than-desirable dependencies
   that can be addressed via variants

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-03 08:40:02 +02:00
Auriane R
a2e4fb6b95 py-huggingface-hub: add v0.23.4 (#44905) 2024-07-03 08:35:50 +02:00
Adam J. Stewart
9dd92f493a py-tensorflow: fix numa build (#44607) 2024-07-03 08:34:34 +02:00
Robert Cohn
b23e832002 intel-oneapi-compilers: remove all patching (#45008) 2024-07-03 07:34:25 +02:00
Derek Ryan Strong
ae2f626168 Add giflib v5.2.2 (#44994) 2024-07-02 14:45:11 -07:00
Derek Ryan Strong
a73930da81 Add libwebp v1.4.0, v1.3.2, v1.3.1, v1.3.0 (#44993) 2024-07-02 14:43:45 -07:00
Derek Ryan Strong
921d446196 Add lcms v2.16, v2.15, v2.14 (#44992) 2024-07-02 14:41:02 -07:00
Derek Ryan Strong
8e2ea5de9d Add openjpeg v2.5.2, v2.5.1 (#44991) 2024-07-02 14:39:19 -07:00
Alex Richert
fd0baca222 fontconfig: add pic variant and support static deps (#44884)
* fontconfig: add pic variant; allow static dependencies
* Revise fontconfig to clean up flags
* Revise fontconfig to remove unnecessary flag
* Update fontconfig
* update fontconfig logic for static deps
2024-07-02 14:06:53 -07:00
Harmen Stoppels
d2fc0d6a35 Revert "e4s ci: reduce size due to 5mb gitlab artifact limit (#44986)" (#45001)
This reverts commit 18de6a480b.
2024-07-02 21:05:10 +00:00
renjithravindrankannath
eedc9e0eaf Bump-up the version for RoCm-6.1.2 release (#44849)
* Bumping up to ROCm 6.1.2
* Bump up rocmlir & amdsmi to 6.1.2
* Removing llvm dependency from amdsmi
* Removed redundant for loops and brought rocm-cmake in for loop
* Removing version check of deprecated versions
2024-07-02 14:02:25 -07:00
Massimiliano Culpo
6b85f6b405 ci: deprecate the --dependencies and --optimize option (#45005) 2024-07-02 22:06:52 +02:00
Matt Thompson
5686a6b928 mepo: new package (#44879)
* mepo: add new package
* Add mepo 2.0.0rc4
* Update dependencies
2024-07-02 12:18:40 -07:00
Hector Barrios
ad665c6af1 fix static linking when using Intel OneAPI mkl (#36991) 2024-07-02 13:55:30 -04:00
Mikael Simberg
d78d6db61e fmt: add 11.0.0 (#44997) 2024-07-02 11:51:37 -06:00
Wouter Deconinck
f47c307bf4 fastor: new package (#44984)
* fastor: new package

* fastor: apply code suggestions and fix style
2024-07-02 09:33:09 -06:00
Harmen Stoppels
5b4edb9499 queue -> stack (#45002) 2024-07-02 16:41:29 +02:00
Harmen Stoppels
a6e6093922 spack_yaml.py: fix default_flow_style (#44998) 2024-07-02 14:01:13 +02:00
Harmen Stoppels
2e8b4e660e spack_yaml: add anchorify function (#44995)
This adds spack.util.spack_yaml.anchorify, which takes a non-cyclic
dict/list structure, and replaces identical values with (back)
references to the first instance, so that yaml serialization will use
anchors.

`repr` is used to identify sub-dags, which in principle is quadratic
complexity in depth of the graph, but in practice the depth is O(1) so
this should not matter.

Then this is used in CI to reduce the size of generated YAML files to
30% of their original size.
2024-07-02 14:00:19 +02:00
Harmen Stoppels
0ca1ee8b91 Pipelines: update configuration for aws-isc (#44999)
1.18 is not a string in YAML

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-07-02 12:39:35 +02:00
Adam J. Stewart
a322672259 py-pillow: add v10.4.0 (#44983) 2024-07-02 03:59:24 -06:00
Dom Heinzeller
6cab86d0c1 New package py-pyhdf (#44877)
* Add var/spack/repos/builtin/packages/py-pyhdf/package.py
* Address reviewer comments regarding dependencies for new package py-pyhdf
2024-07-02 01:19:04 -06:00
Robert Cohn
86e7e2e070 [intel-oneapi-mpi]: restore support for classic wrapper names (#44982)
* [intel-oneapi-mpi]: add back support for classic wrappers

* spack style fixes

* add error checking
2024-07-01 18:54:14 -06:00
Cody Balos
69fca439f4 care: add v0.13.1, v0.13.0 and v0.12.0 (#44936)
* care: add v0.13.0 and v0.12.0
* add maintainer
* add 0.13.1
* update dependencies
2024-07-01 16:45:01 -06:00
Vicente Bolea
3b90fb589f vtk: update vtk to 9.3.1 (#44966)
* vtk: add 9.3.1 version

* vtk: update maintainers
2024-07-01 16:20:31 -06:00
Harmen Stoppels
fff126204c cmd/develop.py: fix readability (#44980)
stage[0] is assumed to be for sources, 1: and onwards is
patches/resources, make that a bit more clear.
2024-07-01 12:14:00 -07:00
Szabolcs Horvát
98e626cf67 igraph: add 0.10.13 (#44975) 2024-07-01 12:10:38 -07:00
Richard Berger
d8fe628a95 LAMMPS updates (#44977)
* lammps: add new versions
* lammps: add directories for plugins
* lammps-example-plugin: new package
   Example illustrating how to install a LAMMPS plugin, based on the
   example part of the LAMMPS distribution.
2024-07-01 11:57:26 -07:00
Weiqun Zhang
4c378840e3 amrex: add v24.07 (#44985) 2024-07-01 11:50:28 -07:00
eugeneswalker
18de6a480b e4s ci: reduce size due to 5mb gitlab artifact limit (#44986) 2024-07-01 20:28:56 +02:00
Kun Wu
c6da4d586b cuda: add v12.5.0 (#44971)
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-07-01 17:45:04 +00:00
Tamara Dahlgren
61d6fc70e8 Docs: include cmake spec property for the command (#44956) 2024-07-01 10:28:26 -07:00
Vicente Bolea
7c65655c7e adios2: add patch to support rocm6 (#44941)
* adios2: add patch to support rocm6

* e4s rocm ci: re-enable adios2 +rocm

---------

Co-authored-by: eugeneswalker <eugenesunsetwalker@gmail.com>
2024-07-01 09:20:48 -07:00
snehring
76ca264b72 py-tesorter: add post install hmmpress step (#44940)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-07-01 16:51:26 +02:00
Vicente Bolea
aa58d3c170 vtk-m: update vtk-m to 2.2.0-rc1 (#44875) 2024-07-01 16:49:22 +02:00
Harmen Stoppels
a32b898a00 curl: remove deprecated versions (#44630) 2024-07-01 16:31:54 +02:00
Adam J. Stewart
6fcd43ee64 py-tensorflow: add v2.16.2 (#44974) 2024-07-01 15:50:52 +02:00
Richard Berger
f1f9f00d43 flecsi: cleanup spackage (#44873) 2024-07-01 15:49:59 +02:00
renjithravindrankannath
8ff27f9257 libffi: enable pic (#44970)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-07-01 07:01:12 -06:00
Adam J. Stewart
78c62532c7 py-scipy: add v1.14.0 (#44967) 2024-07-01 14:21:41 +02:00
Harmen Stoppels
a7f327dced zlib-ng: add patch for lld 17+ (#44684)
- add new patch for recent lld
- remove workaround for lld
- drop old versions
- drop old patches
2024-07-01 12:59:53 +02:00
Harmen Stoppels
310c435396 netlib-lapack: provide blas and lapack together (#44981)
If netlib-lapack is built with ~external-blas, it internally links
liblapack.so with libblas.so, meaning that whenever netlib-lapack is
used as a lapack provider, the package must also be a blas provider.

Conversely using netli-lapack as a blas provider does not imply that it
also must provide lapack, but nothing is lost disallowing that...
2024-07-01 12:53:03 +02:00
Harmen Stoppels
fa3f27e8e7 archive.py: undo unrelated changes from #43851 (#44947) 2024-07-01 11:35:32 +02:00
Harmen Stoppels
6b0fefff29 Use composite stage also for develop specs (#44950) 2024-07-01 11:24:16 +02:00
Massimiliano Culpo
f613316282 Flag propagation: restrict to link/run (#44925)
In practice people don't care about having their build dependencies reinstalled with say cflags=-O3 if that is what is set at the input spec, so restrict propagation to link/run deps only.

Also simplify the encoding in asp.
2024-07-01 09:57:51 +02:00
Massimiliano Culpo
1b5b74390f neoverse-v1: restore py-cinemasci (#44976)
Use a different tactic for determining conflicts.

Give more priority to setting False very old versions.
2024-07-01 09:53:24 +02:00
Adam J. Stewart
b57f88cb89 JAX: add v0.4.30 (#44964) 2024-07-01 09:02:48 +02:00
Adam J. Stewart
03afc2a1e6 py-scikit-image: add v0.24.0 (#44965) 2024-07-01 09:02:32 +02:00
Adam J. Stewart
1f6ed9324d py-kornia: add v0.7.3 (#44973) 2024-07-01 09:02:12 +02:00
Adam J. Stewart
5559772afa GDAL: add v3.9.1 (#44969) 2024-07-01 09:01:37 +02:00
Adam J. Stewart
8728631fe0 py-keras: add v3.4 (#44968) 2024-07-01 09:01:18 +02:00
Harmen Stoppels
e34d9cbe5f Remove DIYStage (#44949) 2024-07-01 08:33:56 +02:00
Wouter Deconinck
0efba09990 root: depends_on veccore@0.4.0: resp. @0.4.2: when certain versions (#36667) 2024-06-30 19:37:22 -06:00
Wouter Deconinck
a9cb80d792 xl: avoid matching "_r" in tempfile.TemporaryDirectory during audit (#44831) 2024-06-30 17:49:01 -06:00
Teague Sterling
dae6fe711c gobject-introspection: add v1.60.2 (#44643)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-06-30 20:46:02 +02:00
Massimiliano Culpo
c9a24bc6c5 neoverse-v1: comment out py-cinemasci (#44972) 2024-06-30 10:23:35 +02:00
AcriusWinter
00663f29a9 Strumpack: Changed old test method to new test method (#44874)
* added try except
* Resolve style issues

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-28 12:54:03 -07:00
Elliott Slaughter
15a48990b6 legion: Add 24.06.0. (#44951) 2024-06-28 12:20:11 -06:00
fpruvost
af0b898c2e composyx: fix cmake options prefix (#44948) 2024-06-28 09:49:08 -07:00
Massimiliano Culpo
ddf8384bc6 libgpg-error, libassuan: fixes for darwin (#44946) 2024-06-28 18:27:12 +02:00
Mikael Simberg
670f92f42b mold: add v2.32.1 (#44920) 2024-06-28 10:24:22 -06:00
Dominic Hofer
c81b0e3d2a icon: add 2024.01-1 (#44919) 2024-06-28 09:52:53 -06:00
joscot-linaro
f56d804d85 linaro-forge: added 24.0.2 version (#44922) 2024-06-28 09:47:47 -06:00
sarahtang-amzn
b57f08f22b WRF4.5.x: Limit the patching of ADIOS function to 4.5.0 (#44929) 2024-06-28 08:58:25 -06:00
Harmen Stoppels
34f3b8fdd0 Add missing v0.22.0 changelog (#44945) 2024-06-28 13:31:38 +02:00
Harmen Stoppels
0b3b49b4e0 installer.py: handle external roots the same (#44917)
There was logic not to enqueue build requests for externals if they occur as
roots. That's unnecessary.
2024-06-28 11:26:56 +02:00
Massimiliano Culpo
fa96422702 libassuan: add v3.0.0 (#44913)
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-06-28 10:44:25 +02:00
Massimiliano Culpo
e12168ed24 libgcrypt: add v1.11.0 (#44915)
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-06-28 10:43:57 +02:00
Massimiliano Culpo
c0f2df8e0a libgpg-error: add v1.50 (#44914) 2024-06-28 10:39:19 +02:00
Massimiliano Culpo
8807ade98f libksba: add v1.6.7 (#44916) 2024-06-28 10:38:43 +02:00
arezaii
13356ddbcc update chapel package for v2.1 (#44931) 2024-06-27 21:29:11 -06:00
AcriusWinter
974033be80 hiop: Corrected test name, added docstring, and changed test to new API (#44765)
* Changed test method from old method to new method
* Corrected test name and added docstring
* Split test method into stand alone-tests
* Added SkipTest
* code refactor
* removed repeated code
* Remove exe from test part purpose

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-27 18:02:42 -06:00
Alan Dayton
8755fc7291 Add new releases of CHAI (#44911) 2024-06-27 17:47:28 -06:00
Chris Marsh
17c02fe759 vtk: Fix proj dependency ranges (#44370)
* Improve proj version selection to avoid too new of a proj with older api usage in vtk9

* Proj constraint range around 8.2.1


---------

Co-authored-by: John Parent <john.parent@kitware.com>
2024-06-27 15:00:56 -04:00
Dan Lipsa
4c7d18a772 Spack on Windows: fix "spack load --list" and "spack unload" (#35720)
Fix the following on Windows:

* `spack load --list` (this printed 0 packages even if packages were
  loaded)
* `spack unload <package>` (this said that the package is not loaded
  even if it was)

Update unit tests for `spack load` to also run on Windows (specifically
for ".bat"). This involved refactoring a few tests to parameterize
based on whether the unit tests are being run on a Windows system
(and to account for batch syntax).
2024-06-27 11:44:36 -07:00
dependabot[bot]
b28b26c39a build(deps): bump docker/build-push-action from 5.3.0 to 6.2.0 (#44910)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.3.0 to 6.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](2cdde995de...15560696de)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 13:06:39 -05:00
Teague Sterling
23aed605ec plink2: add v2.00a5.10, v2.00a5.11 (#44707)
* Adding additional versions to plink2 and switching to tarballs to allow for better version detection in the future

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-06-27 10:48:20 -07:00
Massimiliano Culpo
fdb8d565aa zig: add v0.13.0 (#44912) 2024-06-27 10:38:12 -07:00
Benjamin Fovet
9b08296236 gmsh: add v4.13.1 (#44901)
Also fix gmsh 4.13.0 checksum

Co-authored-by: Benjamin Fovet <benjamin.fovet@cea.fr>
2024-06-27 11:03:34 -06:00
Julien Cortial
c82d8c63fa lcov: Add missing perl dependency (#44896)
Date::Parse, provided by TimeDate, is an undocumented dependency
of lcov 2
2024-06-27 07:08:06 -06:00
Julien Cortial
7a8989bbfc mumps: add v5.7.2 (#44897) 2024-06-27 07:07:51 -06:00
Matthew Whitlock
22c86074c8 Fix bug in logfile parsing (#42706)
* Fix bug in logfile parsing

* Cite ECMA-48 standards for CSI

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

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-06-27 07:07:30 -06:00
Massimiliano Culpo
ef9e449322 Ensure parent runtime version >= child (#44834)
Fixes a bug where old gcc-runtime libraries would be loaded at runtime, but newer are required by dependencies, breaking the binaries.
2024-06-27 14:58:42 +02:00
Henrique BR
6b73195478 Fixed typo in hypre package (#44921)
Co-authored-by: “Henrique <henrique.bergallo-rocha@ukaea.uk>
2024-06-27 12:59:11 +02:00
Emil Briggs
c7b9bf6a77 rmgdft: add v6.1.0 (#44797) 2024-06-27 12:58:35 +02:00
Thomas Madlener
a84c91b259 podio: add version 1.0.1 (#44854) 2024-06-27 12:55:40 +02:00
Michael Kuhn
e6566dfd67 gcc: add 12.4.0 (#44882) 2024-06-27 12:42:55 +02:00
dependabot[bot]
d6419f32b8 build(deps): bump mypy from 1.10.0 to 1.10.1 in /lib/spack/docs (#44885)
Bumps [mypy](https://github.com/python/mypy) from 1.10.0 to 1.10.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: mypy
  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-06-27 12:40:14 +02:00
Miguel
60ed682577 Fix typo in docs (#44891)
Fixes on the rst formatting of the make_jobs
2024-06-27 12:32:16 +02:00
Harmen Stoppels
6c1fa8c30b mongo-c-driver: overhaul package recipe (#44866) 2024-06-27 12:30:40 +02:00
Harmen Stoppels
09167fe8ac ci: mgard build failure w/ system zlib (#44918)
The pcluster pipeline runs spack external find and autodetects the most ancient of zlib versions on the system: 1.2.7, release date May 3, 2012.

Turns out some packages require parts of the zlib api added within the last decade.
2024-06-27 12:19:17 +02:00
Dom Heinzeller
eb7951818d py-poetry, py-numexpr, and py-metpy: correct dependencies (#44651) 2024-06-27 09:40:17 +00:00
Auriane R
6959656d51 py-pyyaml: add v6.0.1 (#44906) 2024-06-27 11:13:20 +02:00
Wouter Deconinck
f916b50491 containers: centos:stream -> centos:stream9 (#44876) 2024-06-27 10:38:56 +02:00
Jiakun Yan
7160e1d3e7 lci: new package (#44041) 2024-06-27 10:31:14 +02:00
Cody Balos
16369d50a7 sundials: add v7.1.1 (#44814)
* sundials: add 7.1.0

* add patch

* remove patch, add 7.1.1 instead of 7.1.0
2024-06-26 15:44:57 -07:00
eugeneswalker
35fc371222 update e4s stacks (#44813)
* update e4s stacks

* adios2 +rocm: disable kokkos due to spack issue #44832

* comment out mgard+cuda due to spack issue #44833

* comment out cabana, legion, arborx due to kokkos spack issue #44832

* comment out slepc, petsc due to petsc spack issue #44600

* comment out adios2+rocm due to kokkos rocm spack issue #44832

* comment out kokkos due to spack issue #44832
2024-06-26 15:24:34 -07:00
Harmen Stoppels
4bbf4a5e79 otf2: fix package (#44856)
- extend python
- forward compat bound with python due to imp import
- restore -O2 flags (CFLAGS do not compose)
2024-06-26 17:28:51 +02:00
Alex Richert
e5bd79b011 py-jcb: new package (#44880)
* Add py-jcb: JEDI Configuration Builder
* Update maintainers
2024-06-26 08:18:40 -06:00
Dom Heinzeller
2267b40bda New package py-globus-cli, update py-globus-sdk (#44881)
* Add var/spack/repos/builtin/packages/py-globus-cli/package.py
* Update var/spack/repos/builtin/packages/py-globus-sdk: add version 3.25.0
* For py-globus-cli: make py-typing-extension dependency conditional of Python version, and allow newer Python versions than 3.10

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-26 08:13:03 -06:00
Massimiliano Culpo
b0b6016e12 ASP-based solver: add a generic rule for propagation (#44870)
This adds a generic propagate/2 rule to propagate any
fact to children in the DAG.
2024-06-26 16:02:00 +02:00
Harmen Stoppels
c24265fe7e opennurbs: multiple build systems (#44871) 2024-06-26 15:34:20 +02:00
Jon Rood
9d0102ac89 nalu-wind: fix linking when using trilinos-solvers variant (#44887) 2024-06-26 07:33:50 -06:00
Mikael Simberg
52b8b3ed8d stdexec: Don't skip build stage on main since no longer header only (#44892) 2024-06-26 14:50:44 +02:00
Harmen Stoppels
380030c59a mpifileutils: cmakepackage (#44863) 2024-06-26 14:28:29 +02:00
Harmen Stoppels
867a813328 kallisto: simplify (#44862) 2024-06-26 14:27:12 +02:00
Harmen Stoppels
ded3fa50a3 jasper: multiple build systems (#44859) 2024-06-26 14:25:23 +02:00
Harmen Stoppels
84653e8d9f cutlang: remove (#44853) 2024-06-26 14:24:37 +02:00
Harmen Stoppels
ac0fd7138f oce: deprecate (#44864) 2024-06-26 14:19:41 +02:00
Massimiliano Culpo
c0f9f47b8c Simplify and improve solver heuristic (#44893)
When we changed how to deal with errors in November,
we didn't realize that for an unconstrained choice
rule it is more important in the heuristic to guess
what is NOT in the answer set, since it will be the
majority of options.

Previously this was following automatically from what
was in the answer set, via `1 { ... } 1` cardinality
constraints.

Here we improve the heuristic and the solve time for specs.
2024-06-26 13:08:41 +02:00
Daniel Ahlin
7e9d24a145 gromacs: maintainer change (#44890)
Adding mabraham to maintainer. Mark will bring a lot of GROMACS knowledge. Removing danielahlin as I am currently not working actively on this.
2024-06-26 01:44:35 -06:00
Simon Pintarelli
99405e6a4d nlcglib: add v1.1.0 (#44580) 2024-06-26 09:42:26 +02:00
Simon Frasch
7500a4853c spla: add v1.6.1 (#44878) 2024-06-26 09:40:01 +02:00
psakievich
54d192e026 Steal source was not assigning the package class (#44886)
Fetcher was missing the package class assignment
2024-06-25 23:17:56 -07:00
Harmen Stoppels
e6a8eba72d eztrace: multiple build systems (#44855) 2024-06-26 06:12:02 +02:00
Wouter Deconinck
4d604c8c9f root: add v6.30.08, v6.32.02 (#44807) 2024-06-25 14:57:44 -07:00
fpruvost
b081e0046f Move/rename maphyspp to composyx (#44836) 2024-06-25 13:58:54 -07:00
Tamara Dahlgren
baf82c0245 Docs: Update stand-alone test information (#44755)
Update and slightly reorganize stand-alone test information to include new and improved examples and more links that can be used in PR feedback.
2024-06-25 13:33:41 -07:00
Hector Martinez-Seara
884a0a392d rdma-core: Patched CMakeLists.txt to find drm include at libdrm - archlinux (#44839)
* Patched CMakeLists.txt to find drm include at libdrm - archlinux
* Restricted usage patch to versions 34 onwards
* Update var/spack/repos/builtin/packages/rdma-core/libdrm.patch

---------

Co-authored-by: Mark Abraham <Mark.J.Abraham@gmail.com>
2024-06-25 13:06:38 -07:00
Harmen Stoppels
824f2a5652 memaxes: cmakepackage (#44869) 2024-06-25 12:55:54 -07:00
Wouter Deconinck
b894acf1fc geant4: add v11.2.2, incl g4ndl v4.7.1 (#44830)
* geant4: add v11.2.2

* g4ndl: add v4.7.1

* geant4-data, g4ndl: use =4.7 for 11.2.0:11.2.1, 4.7.1 for 11.2.2
2024-06-25 14:35:31 -04:00
Miguel
536856874c add documentation for make_jobs variable (#44838)
* add documentation for make_jobs variable

* apply suggested changes

* Update packaging_guide.rst

add suggestions to the documentation

* Update packaging_guide.rst

fix missing quotes in the documentation

* suggestions to packaging_guide.rst
2024-06-25 11:24:49 -06:00
eugeneswalker
8d1aaef8b8 e4s ci: paraview: require +examples (#44847) 2024-06-25 15:12:56 +00:00
Simon Pintarelli
3216c4362e tiled-mm: add v2.3.1 (#44867) 2024-06-25 09:08:14 -06:00
Harmen Stoppels
2e822e65fd libbson: cmake & autotools package (#44852) 2024-06-25 14:54:22 +02:00
Harmen Stoppels
41fde4db8c glog: remove custom cmake stuff (#44858) 2024-06-25 14:52:28 +02:00
Wouter Deconinck
81125c3bd8 hepmc3: pass root variant cxxstd as HEPMC3_CXX_STANDARD (#44806)
* hepmc3: pass `root` variant `cxxstd` as `HEPMC3_CXX_STANDARD`

* hepmc3: when @:3.2.3 +rootio, depends_on root cxxstd=11

* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-06-25 05:50:36 -05:00
Nicole C
d8b0df6f5b Make url_fetch tests work on Windows (#44809) 2024-06-25 07:34:11 +00:00
Martin Pokorny
99e3fdb180 Legion: add redop_half variant, and add missing build dependency (#44792)
* legion: add redop_half variant
* legion: conditionally add py-setuptools as build dependency
   Dependency exists only for '+python' variant.
2024-06-25 01:33:54 -06:00
Paul Romano
64cfdc07cb OpenMC: add v0.15.0 and v0.14.0 (#44840) 2024-06-25 01:19:23 -06:00
Harmen Stoppels
59fbbdd9ce blitz: use cmake (#44804) 2024-06-25 09:11:14 +02:00
Melven Roehrig-Zoellner
adedf58297 py-heat: add v1.4.1 (#44835) 2024-06-25 01:10:18 -06:00
Wouter Deconinck
f13ea8aa75 py-scikit-build-core: typing-extension dependency fix (#44817) 2024-06-25 09:00:03 +02:00
Wouter Deconinck
109a4d52b5 vecmem: add v0.25.0 -> v1.6.0 (#43528) 2024-06-25 08:48:53 +02:00
Davis Herring
7f2117e2cf flecsi: add v2.3.0 (#44798) 2024-06-25 08:34:02 +02:00
Rocco Meli
dfab3e8829 ELSI: improve package (#44717)
* Spglib: add version 2.4.0

* DLA-Future: fix +test option

* elsi

* elsi improvements

* [@spackbot] updating style on behalf of RMeli

* remove test variants

* fix ntpoly and and use externals as default

---------

Co-authored-by: RMeli <RMeli@users.noreply.github.com>
2024-06-25 07:38:56 +02:00
Martin Pokorny
822622f07a thrust: add v1.17.x (#44561) 2024-06-25 07:35:29 +02:00
Vicente Bolea
c4194e4f58 vtk-m: support kokkos@4: (#44850) 2024-06-25 07:21:20 +02:00
Raffaele Solcà
05c7ff4595 dla-future: add v0.6.0 (#44841) 2024-06-24 22:33:14 -06:00
Matt Thompson
a6ac78c7c6 mapl: add 2.47.0 (#44842)
* mapl: add 2.47.0
* Fix typo
2024-06-24 22:32:46 -06:00
eugeneswalker
8479122e71 ecp rocm ci: add ecp-dav back + use updated container image w rocm-llvm-dev installed (#44827) 2024-06-24 16:48:40 -06:00
Teague Sterling
3d91bfea75 libgtop: new package (#44642)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-06-24 15:43:27 -06:00
Wouter Deconinck
27e28b33ee py-fsspec: add v2024.3.1, v2024.5.0 (switch to hatchling) (#44491) 2024-06-24 18:16:37 +02:00
Teague Sterling
eaf8ac7407 py-orjson: add v3.8.14, v3.9.15, v3.10.3 and dependencies (#44514)
* py-uvloop: add v3.8.14, v3.9.15, v3.10.3 and dependencies

* rollback

* py-uvloop: add v3.8.14, v3.9.15, v3.10.3 and dependencies

* Update package.py
2024-06-24 18:15:11 +02:00
John W. Parent
1e9d550bc6 cmake: add v3.29.6 (#44616) 2024-06-24 09:19:14 -06:00
Harmen Stoppels
0282fe9efd spec_list: do not resolve abstract hashes (#44760) 2024-06-24 16:43:01 +02:00
eugeneswalker
ad3d9c83fe e4s: add glvis (#44812) 2024-06-24 05:57:54 -07:00
Adam J. Stewart
910b923c5d JAX: add v0.4.29 (#44683)
Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2024-06-24 08:43:45 +02:00
snehring
c1f1e1396d libint: add v2.9.0 (#44776)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-06-24 08:36:13 +02:00
Neil Flood
3139dbdd39 py-rios: add v2.0.2 (#44779) 2024-06-24 08:35:00 +02:00
Teague Sterling
cc6dcdcab9 htslib: add variants (#44501)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-06-24 08:34:10 +02:00
Wouter Deconinck
57b83e5fb2 root: depends_on libc only on linux (#44823) 2024-06-22 20:39:08 +02:00
Andrey Perestoronin
55fe73586e add packages from intel-oneapi-2024.2.0 release (#44789) 2024-06-21 16:17:54 -06:00
Auriane R
3be497344a py-triton: add main (#44774)
* Add triton env variable to build with clang

* Add git url and main branch for py-triton
2024-06-21 08:57:58 -07:00
Carlos Bederián
05413689b9 python: add v3.12.4 (#44801) 2024-06-21 17:00:39 +02:00
Alberto Invernizzi
50da223888 lua-lpeg: add latest version (#44803) 2024-06-21 07:16:08 -06:00
Alberto Invernizzi
719b260cf1 tree-sitter: new versions (#44802) 2024-06-21 06:52:37 -06:00
Tamara Dahlgren
3848c41494 Bugfix: test_is_externally_detectable needs to use mockpackages (#44795) 2024-06-21 12:24:46 +02:00
Veselin Dobrev
da720cafd8 openssl: add latest OpenSSL versions, deprecate previous ones (#44620) 2024-06-21 08:32:23 +02:00
AcriusWinter
8f0b029308 openpmd-api: Changed from old to new test API (#44764)
* changed from old to new test API
* changed test name so it works
* small docstring change
* fixed skiptest check
* made tests check output
2024-06-20 15:06:48 -07:00
Pierre Blanchard
901f4b789d sleef: add v3.6.1 (#44784)
Update preferred package to SLEEF 3.6.1
2024-06-20 14:47:54 -07:00
kwryankrattiger
6e6fef1b0e ParaView: add 5.13.0-RC1 (#44785)
* ParaView: add 5.13.0-RC1
2024-06-20 14:44:26 -07:00
George Young
ae131a5c7c py-multiqc: updating to @1.21, adding new dependency py-pyyaml-env (#44768)
* py-multiqc: updating to @1.21, adding new dependency py-pyyaml-env
* Correcting dependencies
* Drop matplotlib depends_on() for versions of multiqc not included in package.py

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-06-20 14:28:54 -07:00
MichaelLaufer
ed59e43e1d py-pyfr: Add v2.0.2 (#44487)
* py-gimmik: add v3.2.1
* py-pyfr: add v2.0.2
2024-06-20 14:22:29 -07:00
Loris Ercole
5e8f9ed1c7 elpa: new version and recipe tuning (#44749)
Add version 2024.03.001 and fix #43902.

---------

Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
2024-06-20 14:16:10 -07:00
Brian Van Essen
9c31ff74c4 Allow zlib to find external installations. (#44694)
* Allow zlib to find external installations.
* Apply suggestions from code review
* Fixed the determine_version function to loop over all of the potential
libraries that could be installed by zlib.

---------

Co-authored-by: John W. Parent <45471568+johnwparent@users.noreply.github.com>
2024-06-20 13:40:23 -07:00
AcriusWinter
90c8fe0182 snakemake: Changed test method name and added docstring (#44723)
* snakemake: Changed tested method name and added docstring
2024-06-20 10:28:29 -07:00
John W. Parent
58db81c323 bootstrap: test building clingo from sources on windows (#44624) 2024-06-20 16:39:58 +00:00
snehring
e867008819 votca: tighten up boost dep (#44777)
* votca: tighten up boost dep

Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-06-20 10:13:08 -06:00
Paul R. C. Kent
9910e06b25 Update package.py (#44772) 2024-06-20 17:41:15 +02:00
Harmen Stoppels
a3ece7ff4d cmake: remove version deprecated in 0.22 (#44628) 2024-06-20 17:15:26 +02:00
Robert Manson-Sawko
00f0ca2060 openmpi: add with-lsf-libdir config option (#44563) 2024-06-20 08:25:25 -06:00
Derek Ryan Strong
35557ac21c pmix: add v5.0.2, v4.2.9, v4.2.8, v4.2.7 (#44576) 2024-06-20 14:49:00 +02:00
Josh Bowden
54662f7ae1 damaris: add v1.11.0 (#44610)
Co-authored-by: Joshua Bowden <joshua-chales.bowden@inria.fr>
2024-06-20 14:30:11 +02:00
Wouter Deconinck
9cdb2a8dbb dd4hep: depends_on root +root7 in some cases (#43671)
* dd4hep: depends_on root +root7 in some cases

* dd4hep: avoid self-referential whens -> conflicts

* dd4hep: avoid conflict with (narrower) depends_on root@6.27:
2024-06-20 14:22:47 +02:00
Marcel Breyer
ffdab20294 googletest: fix checking a variant condition (#44781)
Change "pthread" to "+pthread" since otherwise the spec is never satisfied and pthread is never used.
2024-06-20 05:59:53 -06:00
Dominic Hofer
e91a69a756 py-tabulate: add v0.8.10, v0.9.0 (#44604) 2024-06-20 13:51:50 +02:00
Matthew Lesko
7665076339 ESMF: set ESMF_LAPACK_LIBPATH if +external-lapack (#44672)
This PR set the `ESMF_LAPACK_LIBPATH` variable (from the `lapack` spec
attributes), removing the previous FIXME and commented example.
2024-06-20 13:48:38 +02:00
Thomas Madlener
49ba2d84a0 edm4hep: Make edm4hep extend python after upstream changes (#44681) 2024-06-20 13:47:14 +02:00
Robert Cohn
0cec923e0a intel-oneapi-mpi: update mpi wrappers to icx variants (#44688) 2024-06-20 13:46:32 +02:00
Nick Hagerty
b97b001dad hipfort: add non-system gcc support (#44612) 2024-06-20 13:45:18 +02:00
Stephen Sachs
113e231abe Remove deprecated intel-* packages (#44700)
Packages will be removed with https://github.com/spack/spack/pull/44689. This PR
makes sure that the `aws-pcluster-x86_64_v4` stack still works as expected.
2024-06-20 07:07:27 -04:00
Adam J. Stewart
f43ca7a554 py-lightning: add v2.3 (#44731)
Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2024-06-20 11:32:53 +02:00
Robert Cohn
3c2c215619 [intel-*] remove deprecated packages (#44689)
* [intel-*] remove deprecated packages

* undo delete of mkl, mpi, parallel-studio
2024-06-20 11:31:38 +02:00
Frédéric Simonis
a2b3a004bf precice: add version 3.1.2 (#44583) 2024-06-20 11:17:11 +02:00
Harmen Stoppels
f650133f83 build_environment: fix ccache error handling (#44740) 2024-06-20 11:16:24 +02:00
Thomas Helfer
81f9d5baa5 tfel: add support for versions up to 4.2.1 (#44578) 2024-06-20 11:09:50 +02:00
psakievich
3938a85ff8 nalu-wind: update submodules (#44687)
Co-authored-by: psakievich <psakievich@users.noreply.github.com>
2024-06-20 10:41:44 +02:00
Thomas Madlener
84cb604b19 podio: Add version 1.0 (#44780)
Co-authored-by: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>
2024-06-20 02:31:55 -06:00
Alec Scott
093504d9a0 go: drop deprecated versions prior to v0.22 release, clean up build location (#44778) 2024-06-20 10:06:54 +02:00
Alex Richert
70a93a746d py-wxflow: new package (#44754)
* Add py-wxflow, a set of tools used in weather workflows
* Update package.py
* add 0.2.0
* add unit testing
2024-06-19 16:19:31 -06:00
Adam J. Stewart
4326efddbf py-maturin: add v1.6.0 (#44734)
* py-maturin: add v1.6.0
* bzip2 only on macOS
2024-06-19 15:02:59 -07:00
Joe Schoonover
6f51b543f0 Update hohqmesh and feq-parse packages (#44737)
* Update hohqmesh and feq-parse versions
   Update feq-parse homepage to new documentation page
   Update feq-parse license to be consistent with 2.2.2 release

---------

Co-authored-by: fluidnumerics-joe <fluidnumerics-joe@users.noreply.github.com>
2024-06-19 14:54:58 -07:00
Christian Glusa
3316e49ad3 Binder: Add newer version (#44741) 2024-06-19 11:14:43 -07:00
Stephen Nicholas Swatman
0c4a91cd18 actsvg: add versions up to 0.4.44 (#44770)
This commit adds new versions of actsvg. I have also taken the liberty
of adding myself a maintainer as I work actively on the ACTS project and
its dependencies, and would like to start keeping the Spack specs more
up to date.
2024-06-19 11:13:17 -07:00
Dave Keeshan
07c6c3ebac verilator: add v5.026 (#44757) 2024-06-19 11:07:56 -07:00
SXS Bot
e3a4a07616 spectre: add v2024.06.18 (#44761)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2024-06-19 11:06:12 -07:00
Stephen Nicholas Swatman
57467139e5 covfie: new package (#44771)
This commit adds the covfie package which facilitates the
high-performance storage of vector fields and other structured
multi-dimensional data.
2024-06-19 10:34:32 -07:00
Carlos Bederián
e8bc53f37b ucx: add v1.17.0 (#44767) 2024-06-19 13:24:54 +02:00
Dan Bonachea
3b78515fd4 upcxx package: Add resilience to broken libfabric (#44618)
Some systems have a libfabric install that doesn't work, so don't
drop dead if a call to `fi_info` fails (e.g. due to missing shared libraries)
2024-06-18 18:10:04 -07:00
downloadico
6b052c3af9 Abinit fix hdf5 (#44763)
* abinit: fix locating HDF5
Remove the check in the configure script to locate HDF5.  Replaced by using
Spack to locate the package.
2024-06-18 16:28:11 -06:00
AcriusWinter
37e2d46d7d Legion: Reformatted Old To New Test Method and skipping tests (#44733)
* Legion: reformatted old test method to match new test method
* Updated docstring and how cmake file is opened
2024-06-18 12:18:56 -07:00
eugeneswalker
a389eb5a08 e4s external rocm ci: bump rocm stack to v6.1.1 (#44449)
* e4s external rocm ci: bump rocm stack to v6.1.1

* comment out exago+rocm due to issue with raja@0.14.0 see spack issue #44593

* comment out adios2+rocm due to spack issue #44594

* comment out petsc+rocm due to spack issue #44600

* comment out sundials+rocm due to spack issue #44601

* comment out slepc+rocm due to petsc spack issue #44600

* comment out tau+rocm due to spack issue #44659

* comment out ecp-data-vis-sdk due to spack issue #44745

* packages: register rocm-core as external

* re-enable tau due to issue #44659 having been resolved

* use latest ci image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.1.1:2024.06.17

* comment out paraview due to spack issue #44745

* comment out ecp-data-vis-sdk +vtkm due to issue https://gitlab.spack.io/spack/spack/-/jobs/11632511
2024-06-18 11:43:03 -07:00
Neil Flood
d57f174ca3 py-rios: add 1.4.17, v2.0.1 (#44679)
* Update for 2.0.1
* cloudpickle dependency is only 'run'
* Follow new formatting guidelines
* black wants trailing commas
* Simplified version ranges, as recommended by @tldahlgren
2024-06-18 10:35:43 -06:00
AcriusWinter
e6ae42b1eb vtk-m: Changed test method names and skipping non-applicable tests from old to new approach (#44705)
* vtk-m: Changed test method names and skipping non-applicable tests from old to new approach

-----
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-18 09:40:17 -06:00
George Young
d911b9c48d seacr: new package @1.4-b2 (#42677)
* seacr: new package @1.4-b2

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

Co-authored-by: Alec Scott <hi@alecbcs.com>

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-06-18 07:37:58 -07:00
Tim Haines
3b35b7f4fa Boost: switch from jfrog to boost.io for downloads (#44728)
The jfrog hosting will be shut down in Dec 2024.
2024-06-18 08:40:03 +02:00
dependabot[bot]
a82fb33b31 build(deps): bump flake8 from 7.0.0 to 7.1.0 in /lib/spack/docs (#44752) 2024-06-18 08:27:15 +02:00
dependabot[bot]
5f35a90529 build(deps): bump urllib3 from 2.2.1 to 2.2.2 in /lib/spack/docs (#44751) 2024-06-18 08:27:04 +02:00
dependabot[bot]
81c620b61b build(deps): bump flake8 from 7.0.0 to 7.1.0 in /.github/workflows/style (#44750) 2024-06-18 08:26:18 +02:00
Chris White
12866eb0d6 ascent: add v0.9.3 (#44571)
* add new ascent version
* add requirement for new version of umpire/raja
* add patch for vtk-m dependency
2024-06-17 19:37:50 -06:00
arezaii
24b8d0666e Chapel package: major update (#42197)
* add cray detection taken from upcxx
* add CUDA/ROCm support
* add numerous pass-through options to Chapel build,
  like gpu_mem_strategy, comm_substrate, etc.; all variants are
  translated to analogous CHPL_* environment variables. As a side
  effect, this defines a number of environment variables that are
  not actually used by Chapel.
* Define LD_LIBRARY_PATH, LIBRARY_PATH, and PKG_CONFIG_PATH to
  help programs built with Chapel properly locate needed runtime
  dependencies

---------

Co-authored-by: bonachea <dobonachea@lbl.gov>
2024-06-17 18:09:05 -06:00
Tamara Dahlgren
0f2c7248c8 Bugfix: omega-h stand-alone tests: ensure proper ordering (#44748) 2024-06-17 15:17:30 -06:00
Alec Scott
8cc4ad3ac5 pass: install autocompletion for all shells (#44744) 2024-06-17 12:35:02 -07:00
Dan Lipsa
9ba90e322e PROJ: add new versions, improve tiff patches (#42767)
* Projsync needs curl

This fixes a proj compilation error from paraview

* tiff does not set TIFF_INCLUDE_DIR tested by proj

* TIFF patch exists for proj 9.2

* Add comments with location of proj patch

* Use TIFF patches for different cmake versions

* Use modules starting cmake 3.28 and variables before that

* Fix black style

* Simpler patches, add newer proj

* Remove duplicated flag

* Deprecate PROJ 4.8 and older

* Remove PRIVATE

* Deprecate PROJ 7.0.0

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-06-17 15:33:22 +02:00
Taillefumier Mathieu
d9c6b40d8e [cp2k] Enforce exclusion of libxsmm main (#44739)
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-06-17 07:30:15 -06:00
Alberto Invernizzi
d792e1f052 update minimum libvterm version for 0.10.0 (#44720)
7a5effb0f9
2024-06-15 21:15:50 -07:00
Todd Gamblin
2d464f8c89 spack-python: remove superfluous /usr/bin/env (#44724)
Not sure why I had this here, as `/bin/sh` will find the first spack in `PATH` just like
`env`.

- [x] remove `/usr/bin/env` and avoid an extra process launch.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-06-15 08:11:19 -07:00
AcriusWinter
456a8e3553 omega-h: reformatted from old test method to new test method (#44712)
* omega-h: reformatted from old test method to new test method
* omega-h: added proper output checking

--------
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-14 20:03:39 -06:00
AcriusWinter
db94696cf0 libstdcompat: removed duplicate build-time test method (#44725)
* libstdcompat: removed stand-alone test method
2024-06-14 18:40:03 -06:00
kwryankrattiger
72bb656b9e Intel MKL express requirements as requires (#44727)
The ``+cluster` variant requires there be an MPI family known in the
spec. When using externals it is easy to miss-configure this requirement
leading to a runtime exception which is not desirable. This converts the
exception to a package rule.
2024-06-14 19:07:37 -04:00
James Smillie
e092026eb8 muparser: refactor to use new multi-build-system logic (#44552) 2024-06-14 13:43:20 -07:00
psakievich
e5f5749d67 HDF5: Fix typo in symlink paths (#44711) 2024-06-14 12:48:32 -06:00
renjithravindrankannath
6e4f8ea7e4 hip: Adding hipother for cuda support starting from 6.0 (#44453)
* Adding hipother for cuda support starting from 6.0
* Updating the version check as per current spec
2024-06-14 08:26:07 -07:00
Massimiliano Culpo
5e8eff24d2 Build developer-tools pipeline only on manylinux (#43811) 2024-06-14 10:13:06 +02:00
Alec Scott
36f1801eb8 rclone: add v1.65.2 (#44657) 2024-06-13 21:28:14 -05:00
Alec Scott
e3deee57ba go: add v1.22.4 (#44656) 2024-06-13 21:28:06 -05:00
Alec Scott
404deb99f4 hugo: add v0.127.0 (#44626) 2024-06-13 21:27:56 -05:00
Alec Scott
f594bc7aea fd: add v10.1.0 (#44623) 2024-06-13 21:27:46 -05:00
Harshula Jayasuriya
9ed948523a openmpi: disable remark 10441 for intel classic 2021.7.0 or newer (#44614)
* Compilation of openmpi fails when intel classic compiler 2021.7.0
  or newer is used.
2024-06-13 17:58:50 -07:00
Wouter Deconinck
72d7c2d558 xorg pkgs: update versions and homepage cgit -> gitlab (#44420)
* xorg libs: new versions
* xorg pkgs: update homepage from cgit to gitlab
* xorgs pkgs: fix homepage since, yeah, I did edit those 122 files by hand...
* libxmu: don't need the .0 patch version here

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-13 17:42:17 -07:00
Matt Thompson
d4a7582955 gh: add 2.50.0 (#44670) 2024-06-13 16:46:52 -07:00
dependabot[bot]
42ac1f0cb2 build(deps): bump codecov/codecov-action from 4.4.1 to 4.5.0 (#44710)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.4.1 to 4.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](125fc84a9a...e28ff129e5)

---
updated-dependencies:
- dependency-name: codecov/codecov-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-06-13 16:45:24 -07:00
Mathew Cleveland
4af61d432f add draco-7_18_0 to package.py (#44673)
Co-authored-by: Cleveland <cleveland@lanl.gov>
2024-06-13 16:43:00 -07:00
Teague Sterling
52bdaa7bf5 perl-dbd-mysql: add v4.052, v5.005 (#44503)
* Fixed some issues with installation breaking due to mysql_client

* Remove debugging details

* Adding client_only to deps

* Adding client_only to variant and deps

* Undoingw client_only to variant and deps
2024-06-13 16:42:23 -07:00
Diego Alvarez S
96b42238c5 openjdk: update default version to 17.x (#44647)
* Set default version of OpenJDK to 17.x

* Fix OpenJDK newer versions in Apple Silicon

* Specify java@11 for astral and stc
2024-06-13 16:40:50 -07:00
Teague Sterling
c7bd259739 Adding pkgconfig dependecy to startup-notification (#44709)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-06-13 17:37:51 -06:00
Jonathon Anderson
0dfc360b1e hpctoolkit: conflicts with elfutils @0.191 (#44696)
See https://gitlab.com/hpctoolkit/hpctoolkit/-/issues/831
2024-06-13 12:25:37 -07:00
AcriusWinter
5e578e2e4e Converted warpx from the old format to the new format for stand-alone testing (#44677)
* Converted warpx from the old format to the new format for stand-alone testing

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-13 11:34:17 -07:00
AcriusWinter
93111d495b Changed sz3 stand alone tests from old to new API (#44691) 2024-06-13 10:45:16 -07:00
Howard Pritchard
b1bbe240d7 py-xtb: fix problem with meson file (#44595)
Using meson 1.3.2 the py-xtb package fails
during the install process.  Error signature shown in

    https://github.com/grimme-lab/xtb-python/pull/114

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2024-06-13 10:18:42 -07:00
Jean Luca Bez
bbb58ff4c6 update PDC version (#44702) 2024-06-13 11:15:33 -06:00
Sam Gillingham
7a710bee17 update py-tuiview to 1.2.14 (#44692)
* update py-tuiview to 1.2.14
* remove whitespace
2024-06-13 10:07:36 -07:00
renjithravindrankannath
bc3903d0e0 New patch to add half include path for tests in 6.1 (#44697)
* Add half include path for tests in 6.1
* removing unwanted  when="@:6.1"
* Correcting conditon to apply patch
* Stlye check error fix and updating rpp dependency
* Audit check error fix
* Correcting rpp dependency and adding hsa-rocr-dev lib path to LD_LIBRARY_PATH
2024-06-13 09:42:56 -07:00
Simon Pintarelli
61c8326180 cleanup q-e-sirius recipe (#44698) 2024-06-13 09:39:06 -07:00
Adrien Bernede
c5caa4b838 Add latest releases to camp, raja and umpire (#44699)
* Add latest releases to camp, raja and umpire
2024-06-13 09:31:38 -07:00
Joe Schoonover
ebdff73c8c Add new versions of feq-parse (#44701) 2024-06-13 09:25:54 -07:00
eugeneswalker
f78beb71f7 tau@2.33.2 +rocm: patch to disable llvm plugin (#44690) 2024-06-13 09:13:41 -07:00
Simon Frasch
74210c7f46 sirius: fix spla+openmp requirement (#44685) 2024-06-13 06:53:28 +02:00
Harmen Stoppels
eff4451cdd Revert "linux-pam: fixes #44637" (#44682)
* Revert "linux-pam: fixes #44637 (#44638)"

This reverts commit 9151fc1653.

* linux-pam: drop redundant deps, add missing, dont build docs, nls
2024-06-12 13:13:11 -07:00
Teague Sterling
8d0fc3e639 gettext: fix condition (#44680) 2024-06-12 13:24:42 -06:00
Taillefumier Mathieu
3736da3f89 Update cp2k old recipe (#44650)
The old build system has issues with the library order. This commit is an attempt
to fix it.
2024-06-12 10:11:02 +02:00
Melven Roehrig-Zoellner
221e464df3 py-pyopengl: new package (#32357)
* py-pyopengl: new simple package

* py-pyopengl: Fix typo in comment

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

* py-pyopengl: add variants and dependencies

* py-pyopengl: build from source and improve variants

* py-pyopengl: use corrected freeglut libs

* py-pyopengl: update copyright

* py-pyopengl: remove duplicate conflict clause

* py-pyopengl: change dependency to link

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-06-12 09:52:49 +02:00
Gavin John
bac5253169 py-biopython: Require python <= 3.9 for certain versions (#44668) 2024-06-12 08:57:56 +02:00
AMD Toolchain Support
fc2ee5cae8 WRF 4.5.2 support is added for AOCC compilers (#44584)
Co-authored-by: Raviteja K <rkuppili@amd.com>
2024-06-11 18:45:08 -07:00
psakievich
e11f83f34b Nalu-Wind Tioga Dependency (#44675)
* Nalu-Wind Tioga Dependency
   We created the tioga@1.0.0 tag for reproducing the exawind 1.0 release
* Update tioga tags
2024-06-11 18:44:37 -07:00
Veselin Dobrev
6e7fb9a308 MFEM: add new version v4.7 (#44010)
* Core change: logic for extracting RPATHs from modules may return
  `None`: filter this out of the set of RPATHs that is auto-generated
* Core change: `CachedCMakePackage` no longer adds ldflags to
  `CMAKE_STATIC_LINKER_FLAGS`: generally these flags are not appropriate
  for static linking (e.g. invocation of `ar`)
* [mfem] Add version 4.7
* [mfem] Add variant for precision (single/double). Enforce consistency
  for precision amongst mfem and hypre/petsc/mumps dependencies
* [mfem] Add cxxstd (and related constraints preventing use of
  old cxxstd values for newer versions of some dependencies)
* [hypre] In line with prior point, added support for specifying
  precision
* [petsc] Add config option to avoid error when building against
  `superlu-dist+rocm`
* [hiop] add proper `raja`/`umpire`/`camp` version constraints for
  `hiop` versions 0.3.99-0.4.x; require `+raja` for `+rocm`, and
  add dependency on `hiprand` for `+rocm`
* [butterflypack, mfem, strumpack, suite-sparse] Require
  `CRAYLIBS_{target-family}` env var to be defined
* [suite-sparse] versions `@7.4:` changed install location of headers:
  add symlink from old location to new location
* [zlib-ng] Fix error where shared libs were not successfully built for
  `%cce@17` (the build did not fail, but the finished `zlib-ng%cce@17`
  install did not have shared libs)
2024-06-11 16:39:22 -07:00
renjithravindrankannath
b156a62a44 making suite-sparse library path generic in hipsolver (#44473)
* suite-sparse library path can be lib or lib64
* fixing style check error
* Adding the missing import os
* Style check error fix
* Updating patch for 6.1.0 with correct lib path
2024-06-11 14:41:42 -07:00
Elliott Slaughter
990e77c55f legion: Requires C++17 minimum after 24.03.0. (#44596) 2024-06-11 14:10:04 -07:00
Matt Thompson
c2fb529819 fms: add llvm-openmp for apple-clang +openmp (#44667)
* fms: add llvm-openmp for apple-clang
2024-06-11 14:08:31 -07:00
psakievich
337bf3b944 Enable and constrain reuse for GitVersion installations (#43859)
* Preserve higher weight for CLI git ref versions

Currently the concretizer fails if you reuse a git ref version
that has already been installed but modify the spec at all.

See #38484 for futher diagnosis

The issue here is that since there is no established provenance for
these versions the highest weight they are currently assigned is
that of prior install. Re-use checks then fail because the weight of
the version is identical to the solver.

Ironically, these versions are given the highest weights possible when
specified on the CLI for the first time.  They should only appear in a
DAG if they are an exact match or if the user specifies them at the CLI.
Therefore it makes sense to preserve their higher ordering.

Getting this right is critical to moving all branch based versions to a pinned
git-ref in the future.

* [@spackbot] updating style on behalf of psakievich

* Update lib/spack/spack/solver/asp.py

Co-authored-by: Greg Becker <becker33@llnl.gov>

* Add provenance specific to git ref installs

* Sensitvity to name that I could not track down

* Add regression test

* Adjust test

* Add prefer standard unit-test

* Style

* Add required mock

* Format and mark

* Make unit-test case reproduce CLI investigation

* Remove unnecessary mock package

* [@spackbot] updating style on behalf of psakievich

* Use already developed fixture

* Add zlib-ng to mocks again

* Remove accidental adds

* Remove maintainer

* [@spackbot] updating style on behalf of psakievich

* Rename test file

* [@spackbot] updating style on behalf of psakievich

* Remove unused imports

* Update tests

* [@spackbot] updating style on behalf of psakievich

* Style

* Update lib/spack/spack/test/concretize.py

Co-authored-by: Greg Becker <becker33@llnl.gov>

* Update solver rule

* Duplicate installed rules for installed_git_version

* Revert "Duplicate installed rules for installed_git_version"

This reverts commit 17223fc8d1.

---------

Co-authored-by: psakievich <psakievich@users.noreply.github.com>
Co-authored-by: Greg Becker <becker33@llnl.gov>
2024-06-11 14:57:09 -06:00
Nuno Nobre
a49b2f4f16 Use https, not ssh, for AMS git clones (#44669) 2024-06-11 13:53:27 -07:00
AcriusWinter
ddcf1a4b2e Renamed build-time test method (#44572)
* libdistributed: renamed test to check_test
* libpressio-rmetric: renamed test method
* libpressio-tools: renamed test method
* Renamed build-time test methods for: libpressio-opt, libpressio-tthresh, opened

---------

Co-authored-by: Jackson Peter Lawrence <lawrence31@borax5.llnl.gov>
2024-06-11 13:22:50 -06:00
Simon Frasch
82a932c078 spla: add v1.6.0 (#44609) 2024-06-11 13:06:50 +02:00
Harmen Stoppels
0781615117 openssl: remove deprecated versions (#44629) 2024-06-11 10:13:13 +02:00
Teague Sterling
9151fc1653 linux-pam: fixes #44637 (#44638)
* package/linux-pam: dependencies

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

* package/linux-pam: Fixes #44637

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

* Update var/spack/repos/builtin/packages/linux-pam/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Update var/spack/repos/builtin/packages/linux-pam/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* [@spackbot] updating style on behalf of teaguesterling

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-06-10 23:41:11 -06:00
Robert Underwood
3a83b21ce1 improvements for dlib;highway;libjxl (#44348)
* improvements for dlib;highway;libjxl

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

Co-authored-by: Alec Scott <hi@alecbcs.com>

* fix style

---------

Co-authored-by: Robert Underwood <runderwood@anl.gov>
Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-06-10 16:50:36 -07:00
William Hart
cfc042d901 cppad: add v20180000.0, v20240000.4, master (#44299)
* Updating cppad package

* Disabling doc generation

* Adding whart222 as maintainer

* Style fixes

* Pushing changes based on Tamara's feedback.

* Updating sha256 hash for version 20180000.0

* Reorg of declarations

* Reworking cmake args

* Reformatting
2024-06-10 16:48:19 -07:00
Teague Sterling
211ad9e7d9 gdk-pixbuf: adding variant version constraint (#44645)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-06-10 16:40:21 -07:00
Teague Sterling
437b259829 perl-http-tiny: new package (#44502)
* Adding perl-http-tiny package

* Update package.py
2024-06-10 17:23:03 -06:00
Loïc Pottier
f524bba869 flux-sched: fixed missing modules in PATH when lib64 and lib are both used (#44658)
Signed-off-by: Loïc Pottier <pottier1@llnl.gov>
2024-06-10 17:03:00 -06:00
Kelly (KT) Thompson
2f31fb5f17 lcov: add master (#42498)
* Provide instructions for building a developmental version of lcov.

* style fix

* style fix

* Promote single version git URL to the package level.

* Formatting fix.
2024-06-10 16:34:09 -06:00
Dave Keeshan
c3567cb199 verilator: Some environment varibles are no longer required (#44655)
* verilator: Some environment varibles are no longer required

* Revert depends_on for flex back to the deafult case

* Use decorator, when, for setup_run_environment insdtead of if inside function
2024-06-10 16:14:26 -06:00
Melven Roehrig-Zoellner
ae4c1d11f7 julia and libcxxwrap-julia: add new versions (#44635)
* julia: new version (1.10.4)

* libcxxwrap-julia: new version (0.12.5)
2024-06-10 14:29:46 -07:00
Thomas Madlener
cbab451c1a dd4hep: Add version 1.29 (#44652) 2024-06-10 12:54:18 -07:00
Thomas Madlener
9cec17ca26 lcio: Add latest tag v02-22 (#44606)
Co-authored-by: Valentin Volkl <valentin.volkl@cern.ch>
2024-06-10 11:56:31 -06:00
Jon Rood
d9c5d91b6f hdf5: solve cmake findhdf5 issue with hl components (#44423)
* hdf5: solve cmake findhdf5 issue with hl components

* Fix mistake.

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

Co-authored-by: psakievich <psakiev@sandia.gov>

* Style.

* Style.

---------

Co-authored-by: psakievich <psakiev@sandia.gov>
2024-06-10 10:11:49 -06:00
Chris Green
6e194c6ffe root: new (old) versions and fixes for 6.32.00 (#44611)
* Older versions and backported patches
   * Add 6.28.12 and 6.24.04.
   * Backported patches for segfault in weighted likelihood fits.
   * Minor style/signature improvements.
* ROOT 6.32.00 fixes omitted from https://github.com/spack/spack/pull/44550
2024-06-10 17:59:33 +02:00
Mikael Simberg
8f0c28037b mold: add 2.32.0 (#44648) 2024-06-10 03:57:52 -06:00
Rocco Meli
31aabcabf7 elsi: add v2.10.1, master (#44579) 2024-06-10 09:13:06 +02:00
Melven Roehrig-Zoellner
ca9531d205 qt: new minor version 5.15.14 (#44632) 2024-06-09 17:03:15 -04:00
Harmen Stoppels
794c5eb6a0 git: remove deprecated versions (#44631) 2024-06-08 06:46:04 -07:00
Massimiliano Culpo
c6cc125e22 Remove failing unit-test on Windows (#44627) 2024-06-08 09:36:22 +02:00
Bernhard Kaindl
528c1ed9ba binutils: detect the "gold" and "headers" variants (#40214)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-06-07 18:08:55 -06:00
Kyle Gerheiser
52cc603245 fabtests: add v1.19.1 -> v1.21.0 (#44358) 2024-06-08 00:07:18 +02:00
Wouter Deconinck
5e55af2dce py-scikit-build-core: add v0.7.1, v0.8.2, v0.9.5 (#44492) 2024-06-08 00:00:45 +02:00
Wouter Deconinck
24ee7c8928 py-partd: add v1.4.1, v1.4.2 (#44497) 2024-06-07 23:59:07 +02:00
Vanessasaurus
605df09ae1 flux-sched: add v0.35.0 (#44602)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-06-07 23:56:39 +02:00
eugeneswalker
4aebef900c sundials+rocm: patch hip platform for rocm 5.7-6 (#44617) 2024-06-07 11:37:52 -06:00
eugeneswalker
59c5bef165 magma: add rocm-core versions >=6 (#44598) 2024-06-07 08:17:18 -07:00
eugeneswalker
a18adf74bf camp@0.2.3 +rocm: patch for rocm 6 from LLNL/camp PR#143 (#44597) 2024-06-07 08:16:59 -07:00
Rocco Meli
6426ab1b7e dftbplus: add v24.1 (#44613) 2024-06-07 08:54:51 -06:00
Nils Vu
7d1de58378 blaze: add v3.8.2, v3.8.1 (#44556) 2024-06-07 08:54:14 -06:00
Mikael Simberg
82a54378d8 pika: Add valgrind variant (#44558) 2024-06-07 07:33:08 -07:00
Adam J. Stewart
e6e8fada8b GEOS: add new versions (#44586) 2024-06-07 13:47:04 +02:00
Adam J. Stewart
7b541ac322 PyTorch: update ecosystem (#44585) 2024-06-07 13:46:50 +02:00
kwryankrattiger
b0a2ea3970 Generate jobs should use x86_64_v3 runners only (#44582) 2024-06-07 13:20:02 +02:00
Sreenivasa Murthy Kolam
cb439a09dd Deprecate older rocm releases- 5.2 till 5.4 (#43181) 2024-06-07 13:19:34 +02:00
Rocco Meli
f87ee334c2 CP2K: use dla-future-fortran depencency (#44603)
* Spglib: add version 2.4.0

* DLA-Future: fix +test option

* cp2k: add dla-future-fortran dependency

* Update var/spack/repos/builtin/packages/cp2k/package.py
2024-06-07 13:16:53 +02:00
Paul R. C. Kent
e8f8cf8543 Add llvm v18.1.7 (#44581) 2024-06-06 22:28:34 -06:00
Teague Sterling
8c93fb747b py-jproperties: add v1.0.1, v2.0.0, v2.1.0, v2.1.1 (#44519)
* py-jproperties: add v1.0.1, v2.0.0, v2.1.0, v2.1.1
* Incorporating changes from review: https://github.com/spack/spack/pull/44519#discussion_r1625170596
2024-06-06 14:40:07 -07:00
Alex Leute
1701e929bc py-pyseer and deps: new package (#44543)
* py-pyseer: Added package py-pyseer and dependency py-glmnet-python
* py-glmnet-python: Updated homepage, and added comments
* Update copyrights

---------

Co-authored-by: Jen Herting <jen@herting.cc>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-06-06 14:34:11 -07:00
Melven Roehrig-Zoellner
1bb3e04263 t8code: new versions (#44570) 2024-06-06 14:30:28 -07:00
AMD Toolchain Support
e91ae19ec4 amdlibm: fix build environment (#44054)
Co-authored-by: Branden Moore <branden.moore@amd.com>
2024-06-06 14:59:48 -06:00
Melven Roehrig-Zoellner
818ae08c61 py-h5py: fix py-cython version constraints (#44569)
* py-h5py: fix py-cython version constraints
* py-mpi4py: new version and updated dependencies
2024-06-06 13:22:30 -06:00
jmuddnv
15f32f2ca1 Update package.py (#44568)
New tarfiles for HPC SDK 24.5.  Release is 24.5-2.
2024-06-06 12:04:48 -06:00
Melven Roehrig-Zoellner
59aa62ea5c gdb: add version 14.2 (#44564) 2024-06-06 11:42:03 -06:00
SXS Bot
b4c292ddd0 spectre: add v2024.06.05 (#44566)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2024-06-06 11:01:55 -06:00
Pariksheet Nanda
a25655446a libtiff: add v4.6.0 and default disable opengl (Fixes #44545) (#44546)
* libtiff: add v4.6.0 and default disable opengl (#44545)

* libtiff: Fix typo in CMake key

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

* libtiff: Broader description of OpenGL variant

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

* libtiff: reformat using spack style black recommendation

* libtiff: couple opengl flag with autotools

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-06-06 18:05:29 +02:00
Carlos Bederián
cf3d59bb2e libarchive: add versions 3.7.4, 3.7.3, 3.7.2 (#44363) 2024-06-06 08:03:22 -06:00
dependabot[bot]
f80287166e build(deps): bump sphinx-design from 0.5.0 to 0.6.0 in /lib/spack/docs (#44360)
Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/executablebooks/sphinx-design/releases)
- [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: sphinx-design
  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-06-06 14:34:59 +02:00
Wouter Deconinck
329dc40b98 py-editables: add v0.4, v0.5 (switch to flit-core) (#44380) 2024-06-06 14:32:28 +02:00
Kyle Gerheiser
8328c34a3e libfabric: add v1.19.1 and v1.20.2 (#44357) 2024-06-06 14:25:07 +02:00
Melven Roehrig-Zoellner
6c309d3bc9 cgns: patch for gcc14 (#44562) 2024-06-06 06:16:11 -06:00
Rocco Meli
24b49eee83 py-gsd: add v3.2.1 (#44474) 2024-06-06 14:13:58 +02:00
Wouter Deconinck
715fab340f (py-)onnx: add v1.16.1 (#44485) 2024-06-06 14:11:23 +02:00
Wouter Deconinck
8231e84d15 py-ipykernel: add latest bugfixes from v6.23.3 through v6.29.4 (#44498) 2024-06-06 14:07:56 +02:00
Wouter Deconinck
8dc91a7a5c py-ipython: add latest bugfixes from v8.15.0 through v8.25.0 (#44499) 2024-06-06 14:07:16 +02:00
Teague Sterling
4c195b1a06 py-azure-mgmt-storage: add v20.0.0, v20.1.0 (#44511) 2024-06-06 14:05:08 +02:00
Teague Sterling
c6fb6bf5f8 py-nest-asyncio: v1.5.8, v1.5.9, v1.6.0 (#44512) 2024-06-06 14:03:28 +02:00
Teague Sterling
ed6161b80c py-rich: add v12.6.0,13.7.1 (#44515) 2024-06-06 14:02:50 +02:00
Derek Ryan Strong
93424e4565 hwloc: add v2.9.2, v2.9.3, v2.10.0 (#44577) 2024-06-06 04:00:46 -06:00
Teague Sterling
ca00e42f1d py-aiohttp: add 3.9.0, 3.9.4, 3.9.5 (#44510) 2024-06-06 11:22:31 +02:00
Teague Sterling
357ee1c632 py-uvloop: add v0.17.0,v0.18.0,v0.19.0 (#44513) 2024-06-06 11:15:22 +02:00
Derek Ryan Strong
cb0a3eaade neovim: add v0.10.0, v0.9.5 (#44365) 2024-06-06 11:11:45 +02:00
dependabot[bot]
a20d34b8aa build(deps): bump pytest from 8.2.1 to 8.2.2 in /lib/spack/docs (#44553)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.1 to 8.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.1...8.2.2)

---
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-06-06 08:38:54 +02:00
Derek Ryan Strong
329910a620 ffmpeg: add v7.0, master (#44107)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-06-06 07:57:29 +02:00
Derek Ryan Strong
c374d04b0d wget: add v1.21.4 and v1.24.5 (#44574) 2024-06-06 07:56:22 +02:00
Derek Ryan Strong
b68cf16c85 Add gmake build dependency for unibilium (#44575) 2024-06-06 07:54:46 +02:00
Alex Richert
391c4cf099 netcdf-c: add logging variant (#43380)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: Sergey Kosukhin <skosukhin@gmail.com>
2024-06-05 17:48:27 +02:00
Michael Kuhn
8260599e98 py-netcdf4: fix build with gcc@14 (#44134) 2024-06-05 17:38:54 +02:00
Brian Vanderwende
3433c8b8a5 ncl: consolidate patch methods (#44333) 2024-06-05 17:37:25 +02:00
Harmen Stoppels
e53bc780e4 libuuid: deprecate entirely (#44525)
There hasn't been a release in almost a decade, and build failures with
GCC 14 were reported. I don't think it makes sense to patch it, since
the project moved over to `util-linux`, and Spack's default provider is
that package. Better to just get rid of it in the next Spack release.
2024-06-05 17:36:09 +02:00
Teague Sterling
53346dbaa6 libuuid: address #44479 (#44481)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-06-05 08:14:20 -06:00
Chris Green
99994ea245 [root] New version 6.32.00 (#44550) 2024-06-05 08:27:13 -05:00
Harmen Stoppels
3ffe02a2fe spack edit: allow edit multiple files at once (#44416) 2024-06-05 14:19:11 +02:00
Carlos Bederián
9b77502360 openblas: add v0.3.27 (#44312) 2024-06-05 13:18:32 +02:00
Vanessasaurus
96a97328cf Automated deployment to update package flux-core 2024-06-05 (#44554)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-06-05 12:44:31 +02:00
Mikael Simberg
1a400383c0 valgrind: Add 3.21.0, 3.22.0, and 3.23.0 (#44557) 2024-06-05 12:33:00 +02:00
Harmen Stoppels
4f8ab19355 mold: unvendor (#44539) 2024-06-05 12:12:41 +02:00
Chris Marsh
8919677faf Work around the linker incompatibility that exists with fortran and apple-clang (#44547) 2024-06-05 02:16:52 -07:00
Chris Marsh
858b185a0e Armadillo: fix for linker error with apple-clang 15 (#44551)
* Armadillo needs to use -ld_classic with apple-clang 15
2024-06-05 01:02:43 -07:00
Tony Weaver
bc738cea32 py-your: new package (#44448)
* py-your: new package

Spack package recipe for YOUR, Your Unified Reader.  YOUR processes pulsar data in different formats.

Output below from spack install py-your
spack install py-your
[+] /usr (external glibc-2.28-oj2wjfl2ao5inhfz4qehw6hlck2hizvp)
[+] /opt/apps/spack/gcc-runtime-8.5.0-5k6kvi5
[+] /opt/apps/spack/libxcrypt-4.4.35-zigqpjo
[+] /opt/apps/spack/ncurses-6.4-xbvwv2w
[+] /opt/apps/spack/erfa-2.0.0-4qkta2n
[+] /opt/apps/spack/zlib-ng-2.1.6-ccn5qny
[+] /opt/apps/spack/pcre-8.45-33dfhul
[+] /opt/apps/spack/libpciaccess-0.17-2qdxdjo
[+] /opt/apps/spack/libmd-1.0.4-zbdiprt
[+] /opt/apps/spack/qhull-2020.2-klc7ewb
[+] /opt/apps/spack/bzip2-1.0.8-t65bq3t
[+] /opt/apps/spack/xz-5.4.6-axoznvt
[+] /opt/apps/spack/alsa-lib-1.2.3.2-a7icjdy
[+] /opt/apps/spack/zstd-1.5.6-nyk6gt6
[+] /opt/apps/spack/libffi-3.4.6-ibucrfe
[+] /opt/apps/spack/yasm-1.3.0-v4etmmm
[+] /opt/apps/spack/openblas-0.3.26-pfyk2vi
[+] /opt/apps/spack/pkgconf-1.9.5-ckjdqjm
[+] /opt/apps/spack/wcslib-7.3-zvcqq7o
[+] /opt/apps/spack/libiconv-1.17-jskazis
[+] /opt/apps/spack/unzip-6.0-mqftjtp
[+] /opt/apps/spack/libjpeg-turbo-3.0.0-vjvivme
[+] /opt/apps/spack/readline-8.2-2ys6ede
[+] /opt/apps/spack/openssl-3.2.1-4lqdgni
[+] /opt/apps/spack/pigz-2.8-rx263bp
[+] /opt/apps/spack/libpng-1.6.39-kiuku4y
[+] /opt/apps/spack/libbsd-0.12.1-njt5grs
[+] /opt/apps/spack/swig-4.0.2-fortran-z3sbnze
[+] /opt/apps/spack/binutils-2.42-vkjcvfr
[+] /opt/apps/spack/util-linux-uuid-2.38.1-w3kgjq3
[+] /opt/apps/spack/hdf5-1.14.3-sbuiw6q
[+] /opt/apps/spack/libedit-3.1-20230828-676jwbd
[+] /opt/apps/spack/nghttp2-1.57.0-u72gxms
[+] /opt/apps/spack/ffmpeg-6.1.1-2vhrbda
[+] /opt/apps/spack/libxml2-2.10.3-37klvxv
[+] /opt/apps/spack/gdbm-1.23-cylmqwx
[+] /opt/apps/spack/sqlite-3.43.2-axuxulg
[+] /opt/apps/spack/tar-1.34-wjzs4wj
[+] /opt/apps/spack/freetype-2.13.2-in4taxi
[+] /opt/apps/spack/expat-2.6.2-7kfe3hb
[+] /opt/apps/spack/curl-8.6.0-gpzsr3p
[+] /opt/apps/spack/hwloc-2.9.1-fhoz6al
[+] /opt/apps/spack/gettext-0.22.4-zjsp346
[+] /opt/apps/spack/lua-5.3.6-47356ia
[+] /opt/apps/spack/cfitsio-3.49-mmy3dbr
[+] /opt/apps/spack/python-3.10.13-fz7fymx
[+] /opt/apps/spack/elfutils-0.190-uswzaiw
[+] /opt/apps/spack/py-pytz-2023.3-ojdlhrd
[+] /opt/apps/spack/py-cycler-0.11.0-b7mjvv7
[+] /opt/apps/spack/py-pip-23.0-lxkcvby
[+] /opt/apps/spack/python-venv-1.0-2cz5c3s
[+] /opt/apps/spack/py-numpy-1.26.4-t5acjcv
[+] /opt/apps/spack/llvm-14.0.6-3nosumn
[+] /opt/apps/spack/py-packaging-23.1-wkeyuk6
[+] /opt/apps/spack/py-six-1.16.0-iv6iv3q
[+] /opt/apps/spack/py-pybind11-2.12.0-5rvupjv
[+] /opt/apps/spack/py-setuptools-69.2.0-3do76jw
[+] /opt/apps/spack/py-pyparsing-3.1.2-fq6imlt
[+] /opt/apps/spack/py-wheel-0.41.2-brm3k3h
[+] /opt/apps/spack/py-llvmlite-0.41.1-qom3l5h
[+] /opt/apps/spack/py-astropy-4.0.1.post1-xbojixg
[+] /opt/apps/spack/py-python-dateutil-2.8.2-kzdfskc
[+] /opt/apps/spack/py-numexpr-2.8.4-fc5xc5s
[+] /opt/apps/spack/py-h5py-3.11.0-y6drk3j
[+] /opt/apps/spack/py-tifffile-2023.8.30-oof4try
[+] /opt/apps/spack/py-pygments-2.16.1-stgrccl
[+] /opt/apps/spack/py-mdurl-0.1.2-nqk43ry
[+] /opt/apps/spack/py-scipy-1.13.0-vxjgfov
[+] /opt/apps/spack/py-contourpy-1.0.7-jg5lhss
[+] /opt/apps/spack/py-pillow-10.3.0-ijh2cju
[+] /opt/apps/spack/py-kiwisolver-1.4.5-vdh5sq5
[+] /opt/apps/spack/py-fonttools-4.39.4-x5ydbox
[+] /opt/apps/spack/py-bottleneck-1.3.7-ztsm4lg
[+] /opt/apps/spack/py-lazy-loader-0.4-k7hgvka
[+] /opt/apps/spack/py-numba-0.58.1-hzvrjwj
[+] /opt/apps/spack/py-markdown-it-py-3.0.0-l4p4qv5
[+] /opt/apps/spack/py-imageio-2.34.0-z5hu4yc
[+] /opt/apps/spack/py-matplotlib-3.8.4-azq2fzm
[+] /opt/apps/spack/py-pandas-1.5.3-p3gnh6t
[+] /opt/apps/spack/py-rich-13.4.2-okhgwwz
[+] /opt/apps/spack/py-networkx-3.1-b54br7r
[+] /opt/apps/spack/py-scikit-image-0.23.2-cvyzh3t
==> Installing py-your-0.6.7-djfzsn2lutp24ik6wrk6tjx5f7hil76x [83/83]
==> No binary for py-your-0.6.7-djfzsn2lutp24ik6wrk6tjx5f7hil76x found: installing from source
==> Fetching https://github.com/thepetabyteproject/your/archive/refs/tags/0.6.7.tar.gz
==> No patches needed for py-your
==> py-your: Executing phase: 'install'
==> py-your: Successfully installed py-your-0.6.7-djfzsn2lutp24ik6wrk6tjx5f7hil76x
  Stage: 1.43s.  Install: 0.99s.  Post-install: 0.12s.  Total: 3.12s

* Removed setup_run_environment

After some testing, both spack load and module load for the package will include the bin directory generated by py-your as well as the path to the version of python the package was built with, without the need for the setup_run_environment function.

I removed that function (Although, like Tamara I thought it would be necessary based on other package setups I used as a  basis for this package).

Note: I also updated the required version of py-astropy from py-astropy@4.0: to @py-astropy@6.1.0:  In my test builds, the install was picking up version py-astropy@4.0.1.post1 and numpy1.26.  However when I  tried to run some of the code I was getting errors about py-astropy making numpy calls that are now removed.  The newer version of py-astropy corrects these.  Ideally this would be handled in the py-astropy package to make sure numpy isn't too new
2024-06-04 21:38:38 -05:00
Teague Sterling
c2196f7d3a py-humanize: add v1.0.0, v1.1.0, v2.6.0, v3.14.0, v4.8.0, v4.9.0 (#44516)
* py-humanize: add v1.0.0, v1.1.0, v2.6.0, v3.14.0, v4.8.0, v4.9.0
2024-06-04 17:34:12 -07:00
Kyle Knoepfel
d45c27fdbd [intel-tbb] Speed up build and add versions (#44549)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-06-04 15:33:53 -06:00
Teague Sterling
173084de19 py-python-json-logger: add v2.0.2 (#44517)
* py-uvloop: add v3.8.14, v3.9.15, v3.10.3 and dependencies
* py-python-json-logger: add v2.0.2
2024-06-04 11:20:47 -07:00
Teague Sterling
fd2c5fa247 py-maturin: fix rust version dependencies to build (#44518)
* py-uvloop: add v3.8.14, v3.9.15, v3.10.3 and dependencies
* rollback
* py-maturin: fix rust version dependencies to build
2024-06-04 11:09:37 -07:00
kenche-linaro
73e0e9bdff linaro-forge: added 24.0.1 version (#44538) 2024-06-04 11:00:54 -07:00
snehring
4442414d74 kallisto: add version 0.50.1 (#44544)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-06-04 10:21:54 -07:00
Chris Marsh
8dbf9005f0 proj@7: support the new tiff interface in cmake@3.19 (#44535)
Add patch for proj@7 to support the new tiff interface shipped in cmake@3.19: This compliments the existing patch for @8  in #43780
2024-06-04 13:09:49 -04:00
Scott Wittenburg
0c3da1b498 gitlab ci: Remove protected publish job (#44304) 2024-06-04 11:54:05 -05:00
Todd Gamblin
278f5818b7 python: make every view a venv (#44382)
#40773 introduced python-venv, which improved build isolation and avoids issues with,
e.g., `ubuntu`'s system python modifying `sysconfig` to include a (very unwanted)
`local` directory within the default install layout.

This addresses a few cases where #40773 removed functionality, without harming the
default cases where we use `python-venv`.

Traditionally, *every* view with `python` in it was essentially a virtual environment,
because we would copy the `python` interpreter and `os.py` into every view when linking.
We now rely on `python-venv` to do that, but only when it's used (i.e. new builds) and
only for packages that have an `extends("python")` directive.

This again makes every view with `python` in it a virtual environment, but only
if we're not already using a package like `python-venv`. This uses a different
mechanism from before -- instead of using the `virtualenv` trick of copying `python`
into the prefix, we instead create a `pyvenv.cfg` like `venv` (the more modern way
to do it).

This fixes two things:
1. If you already had an environment before Spack `v0.22` that worked, it would
   stop working without a reconcretize and rebuild in `v0.22`, because we no longer
   copy the python interpreter on link. Adding `pyvenv.cfg` fixes this in a more
   modern way, so old views will keep working.

2. If you have an env that only includes python packages that use `depends_on("python")`
   instead of `extends("python")`, those packages will now be importable as before,
   though they won't have the same level of build isolation you'd get with `extends`
   and `python-venv`.

* views: avoid making client code deal with link functions

Users of views and ViewDescriptors shouldn't have to deal with link functions -- they
should just say what type of linking they want.

- [x] views take a link_type, not a link function
- [x] views work out the link function from the link type
- [x] view descriptors and commands now just tell the view what they want.

* python: simplify logic for avoiding pyvenv.cfg in copy views

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-06-04 09:52:21 -06:00
John W. Parent
c2e85202c7 CMake: add 3.28.6 && 3.29.4 (#44532)
* Add CMake 3.28.6

* Add 3.29.4
2024-06-04 09:08:09 -06:00
Mikael Simberg
b021b12043 gcc: add mold variant to use mold by default (#44117) 2024-06-04 16:46:01 +02:00
Todd Gamblin
89a0c9f4b3 nvhpc: Do not use -Wno-error with nvhpc (#44142)
In #30882, we made Spack ignore `-Werror` calls so that it could more easily build
projects that inject `-Werror` into their builds. We did this by translating them to
`-Wno-error` in the compiler wrapper. However, some compilers (like `nvhpc`) do not
support `-Wno-error`. We need to exclude them from this feature until they do.

- [x] make a property on `PackageBase` for `keep_werror` that knows not to use it for
      `nvhpc`.

- [x] update property so that it keeps only the specific `-Werror=...` args for newer nvhpc's,
      which support `-Wno-error` but not `-Wno-error=...`

---------

Co-authored-by: William Mou <william.mou1024@gmail.com>
Co-authored-by: Tom Scogland <scogland1@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-06-04 03:46:35 -07:00
Weiqun Zhang
259629c300 amrex: add v24.06 (#44495) 2024-06-03 17:52:18 -07:00
Teague Sterling
1ce2baf7a2 duckdb: add v1.0.0, v0.10.3 (#44531)
* duckdb: add v1.0.0, v0.10.3
* Adding issue reference
2024-06-04 02:33:36 +02:00
Garth N. Wells
4576a42a0f py-fenics-dolfinx: dependency update (#44524)
* Update nanobind dependency
* Update py-nanobind dependency
2024-06-03 17:24:40 -07:00
Nils Vu
4fba351b92 charmpp: enable darwin arm build (#44103) 2024-06-03 17:44:29 -06:00
Garth N. Wells
706737245a py-nanobind: add v2.0.0 (#44371)
* Add nanobind 2.0.0
* Add dependency
* Fix dependency name
* Change "_" -> "-"
2024-06-03 15:25:03 -07:00
吴坎
0dbdf49075 Update py-vl-convert-python (#44527)
* Update py-vl-convert-python:
  1. set version to 1.4.0
  2. set version 1.3.0 deprecated since its rust dependency curve@4.1.1 is not able to compile
2024-06-03 15:07:16 -07:00
Owen Solberg
641075539c hugo: add v0.126.3 (#44530)
Co-authored-by: Owen Solberg <owen.solberg@sana.com>
2024-06-03 23:37:51 +02:00
Diego Alvarez S
9428d99991 seqfu: new package (#44445)
* Add seqfu

---------

Co-authored-by: dialvarezs <dialvarezs@users.noreply.github.com>
2024-06-03 14:30:00 -07:00
eugeneswalker
f3cf2e94c4 hip@6.1: fix reference to hsa-rocr-dev so it works when externally defined (#44528) 2024-06-03 14:11:47 -07:00
Todd Gamblin
85f13442d2 Consolidate concretization output for environments (#44489)
When Spack concretizes environments, it prints every (newly concretized) root spec
individually with all of its dependencies. For most reasonably sized environments, this
is too much output. This is true for three commands:

* `spack concretize` when concretizing an environment with newly added specs
* `spack install` when installing an environment with newly added specs
* `spack spec` with no arguments in an environment

The output dates back to before we had unified environments or nicer spec traversal
routines, and we can improve it.

This PR makes environment concretization output analogous to what we do for regular
specs. Just like `spack spec` for a single spec, we show all root specs with no
indentation, so you can easily see the specs you explicitly requested. Dependencies are
shown:

1. With indentation according to their depth in a breadth-first traversal starting at
   the roots;
2. Only once if they appear on paths from multiple roots

So, the default is now consistent with `spack spec` for one spec--it's `--cover=nodes`.
i.e., if there are 100 specs in your environment, you'll get 100 lines of output.

If you want to see more details, you can do that with `spack spec` using the arguments
you're already familiar with. For example, if you wanted to see dependency types and
*all* dependencies, you could use `spack spec -l --cover=edges`. Or you could add
deptypes and namespaces with, e.g. `spack spec -ltN`.

With no arguments in an environment, `spack spec` concretizes (if necessary) and shows
the concretized environment. If you run `spack concretize` *first*, inspecting the
environment repeatedly with `spack spec` will be fast, as everything is already in the
`spack.lock` file.

- [x] factor most logic of `Spec.tree()` out of `Spec` class into `spack.spec.tree()`,
      which can take multiple specs as roots.
- [x] make `Spec.tree()` call `spack.spec.tree()`
- [x] `spack.environment.display_specs()` now uses `spack.spec.tree()`
- [x] Update `spack concretize`
- [x] Update `spack install`
- [x] Update `spack spec` to call `spack.spec.tree()` for environments.
- [x] Continue to output specs individually for `spack spec` when using
      `--yaml` or `--json`
2024-06-03 13:29:14 -07:00
James Taliaferro
f478a65635 nb: new package (#44456)
* new package: nb
* only one filter_file, install completions
* completions now implicit, merged by the view
2024-06-03 12:57:47 -07:00
Rocco Meli
eca44600c5 rdkit (#44476) 2024-06-03 12:53:08 -07:00
Matt Thompson
d7a4652554 pflogger: add version 1.15.0 (#44467) 2024-06-03 12:41:51 -07:00
G-Ragghianti
d85cdd1946 Slate version 2024 05 31 (#44529)
* updating version for slate, blaspp, and lapackpp
* verified new hashes
2024-06-03 12:39:50 -07:00
Chris Marsh
ce3aae1501 seacas: protect against known mixed-toolchain problem (#44378)
* Protected against a known problem with mixed gcc/apple-clang toolchains. Fixes #44330

---------

Co-authored-by: Chrismarsh <Chrismarsh@users.noreply.github.com>
2024-06-03 12:27:53 -06:00
Chris Marsh
90c4f9d463 Apply patch to allow vtk to compile with %gcc 13 and 14. (#44332)
* Apply patch from upstream to allow vtk compilation with %gcc 12 and 14.

* Fixes #44331

* fix soec usage

* fix compiler version range

* Finalize version range, switch to .diff file


---------

Co-authored-by: Chrismarsh <Chrismarsh@users.noreply.github.com>
2024-06-03 14:21:09 -04:00
Dan Bonachea
93ccd81d86 upcxx: update to latest gasnet and fix some bitrot (#44488)
* Now need to explicitly depend on libfabric for Cray EX
* Ensure build uses the selected CUDA and ROCm versions
* Correct spelling on `configure --with-ldflags`
* Patch a defect regarding `configure --with-ldflags`
* Default to Spack's copy of GASNet-EX, which is newer than embedded
2024-06-02 16:59:13 +02:00
4259 changed files with 28498 additions and 14290 deletions

View File

@@ -5,13 +5,10 @@ updates:
directory: "/"
schedule:
interval: "daily"
# Requirements to build documentation
# Requirements to run style checks and build documentation
- package-ecosystem: "pip"
directory: "/lib/spack/docs"
schedule:
interval: "daily"
# Requirements to run style checks
- package-ecosystem: "pip"
directory: "/.github/workflows/style"
directories:
- "/.github/workflows/requirements/style/*"
- "/lib/spack/docs"
schedule:
interval: "daily"

View File

@@ -28,8 +28,8 @@ jobs:
run:
shell: ${{ matrix.system.shell }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: ${{inputs.python_version}}
- name: Install Python packages
@@ -44,6 +44,7 @@ jobs:
run: |
. share/spack/setup-env.sh
coverage run $(which spack) audit packages
coverage run $(which spack) audit configs
coverage run $(which spack) -d audit externals
coverage combine
coverage xml
@@ -52,6 +53,7 @@ jobs:
run: |
. share/spack/setup-env.sh
spack -d audit packages
spack -d audit configs
spack -d audit externals
- name: Package audits (without coverage)
if: ${{ runner.os == 'Windows' }}
@@ -59,9 +61,11 @@ jobs:
. share/spack/setup-env.sh
spack -d audit packages
./share/spack/qa/validate_last_exit.ps1
spack -d audit configs
./share/spack/qa/validate_last_exit.ps1
spack -d audit externals
./share/spack/qa/validate_last_exit.ps1
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
if: ${{ inputs.with_coverage == 'true' }}
with:
flags: unittests,audits

View File

@@ -37,7 +37,7 @@ jobs:
make patch unzip which xz python3 python3-devel tree \
cmake bison
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Bootstrap clingo
@@ -53,27 +53,33 @@ jobs:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: ['macos-13', 'macos-14', "ubuntu-latest"]
runner: ['macos-13', 'macos-14', "ubuntu-latest", "windows-latest"]
steps:
- name: Setup macOS
if: ${{ matrix.runner != 'ubuntu-latest' }}
if: ${{ matrix.runner != 'ubuntu-latest' && matrix.runner != 'windows-latest' }}
run: |
brew install cmake bison tree
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: "3.12"
- name: Bootstrap clingo
env:
SETUP_SCRIPT_EXT: ${{ matrix.runner == 'windows-latest' && 'ps1' || 'sh' }}
SETUP_SCRIPT_SOURCE: ${{ matrix.runner == 'windows-latest' && './' || 'source ' }}
USER_SCOPE_PARENT_DIR: ${{ matrix.runner == 'windows-latest' && '$env:userprofile' || '$HOME' }}
VALIDATE_LAST_EXIT: ${{ matrix.runner == 'windows-latest' && './share/spack/qa/validate_last_exit.ps1' || '' }}
run: |
source share/spack/setup-env.sh
${{ env.SETUP_SCRIPT_SOURCE }}share/spack/setup-env.${{ env.SETUP_SCRIPT_EXT }}
spack bootstrap disable github-actions-v0.5
spack bootstrap disable github-actions-v0.4
spack external find --not-buildable cmake bison
spack -d solve zlib
tree ~/.spack/bootstrap/store/
${{ env.VALIDATE_LAST_EXIT }}
tree ${{ env.USER_SCOPE_PARENT_DIR }}/.spack/bootstrap/store/
gnupg-sources:
runs-on: ${{ matrix.runner }}
@@ -90,7 +96,7 @@ jobs:
if: ${{ matrix.runner == 'ubuntu-latest' }}
run: sudo rm -rf $(command -v gpg gpg2 patchelf)
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Bootstrap GnuPG
@@ -119,10 +125,10 @@ jobs:
run: |
sudo rm -rf $(which gpg) $(which gpg2) $(which patchelf)
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: |
3.8
@@ -148,7 +154,7 @@ jobs:
not_found=0
old_path="$PATH"
export PATH="$ver_dir:$PATH"
./bin/spack-tmpconfig -b ./.github/workflows/bootstrap-test.sh
./bin/spack-tmpconfig -b ./.github/workflows/bin/bootstrap-test.sh
export PATH="$old_path"
fi
fi
@@ -162,4 +168,3 @@ jobs:
source share/spack/setup-env.sh
spack -d gpg list
tree ~/.spack/bootstrap/store/

View File

@@ -40,8 +40,7 @@ jobs:
# 1: Platforms to build for
# 2: Base image (e.g. ubuntu:22.04)
dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'],
[centos7, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:7'],
[centos-stream, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream'],
[centos-stream9, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream9'],
[leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'],
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04'],
@@ -56,7 +55,7 @@ jobs:
if: github.repository == 'spack/spack'
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
id: docker_meta
@@ -77,7 +76,7 @@ jobs:
env:
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
run: |
.github/workflows/generate_spack_yaml_containerize.sh
.github/workflows/bin/generate_spack_yaml_containerize.sh
. share/spack/setup-env.sh
mkdir -p dockerfiles/${{ matrix.dockerfile[0] }}
spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile
@@ -88,19 +87,19 @@ jobs:
fi
- name: Upload Dockerfile
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:
name: dockerfiles_${{ matrix.dockerfile[0] }}
path: dockerfiles
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db
- name: Log in to GitHub Container Registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -108,13 +107,13 @@ jobs:
- name: Log in to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
with:
context: dockerfiles/${{ matrix.dockerfile[0] }}
platforms: ${{ matrix.dockerfile[1] }}
@@ -127,7 +126,7 @@ jobs:
needs: deploy-images
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@65462800fd760344b1a7b4382951275a0abb4808
uses: actions/upload-artifact/merge@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:
name: dockerfiles
pattern: dockerfiles_*

View File

@@ -36,7 +36,7 @@ jobs:
core: ${{ steps.filter.outputs.core }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
@@ -53,6 +53,13 @@ jobs:
- 'var/spack/repos/builtin/packages/clingo/**'
- 'var/spack/repos/builtin/packages/python/**'
- 'var/spack/repos/builtin/packages/re2c/**'
- 'var/spack/repos/builtin/packages/gnupg/**'
- 'var/spack/repos/builtin/packages/libassuan/**'
- 'var/spack/repos/builtin/packages/libgcrypt/**'
- 'var/spack/repos/builtin/packages/libgpg-error/**'
- 'var/spack/repos/builtin/packages/libksba/**'
- 'var/spack/repos/builtin/packages/npth/**'
- 'var/spack/repos/builtin/packages/pinentry/**'
- 'lib/spack/**'
- 'share/spack/**'
- '.github/workflows/bootstrap.yml'
@@ -77,13 +84,8 @@ jobs:
needs: [ prechecks, changes ]
uses: ./.github/workflows/unit_tests.yaml
secrets: inherit
windows:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
needs: [ prechecks ]
uses: ./.github/workflows/windows_python.yml
secrets: inherit
all:
needs: [ windows, unit-tests, bootstrap ]
needs: [ unit-tests, bootstrap ]
runs-on: ubuntu-latest
steps:
- name: Success

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env sh
. share/spack/setup-env.sh
echo -e "config:\n build_jobs: 2" > etc/spack/config.yaml
spack config add "packages:all:target:[x86_64]"
spack compiler find
spack compiler info apple-clang
spack debug report
spack solve zlib

View File

@@ -14,10 +14,10 @@ jobs:
build-paraview-deps:
runs-on: windows-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: 3.9
- name: Install Python packages

View File

@@ -1,6 +1,6 @@
black==24.4.2
black==24.8.0
clingo==5.7.1
flake8==7.0.0
flake8==7.1.1
isort==5.13.2
mypy==1.8.0
types-six==1.16.21.20240513

View File

@@ -51,10 +51,10 @@ jobs:
on_develop: false
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -72,7 +72,7 @@ jobs:
run: |
# Need this for the git tests to succeed.
git --version
. .github/workflows/setup_git.sh
. .github/workflows/bin/setup_git.sh
- name: Bootstrap clingo
if: ${{ matrix.concretizer == 'clingo' }}
env:
@@ -91,7 +91,7 @@ jobs:
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
flags: unittests,linux,${{ matrix.concretizer }}
token: ${{ secrets.CODECOV_TOKEN }}
@@ -100,10 +100,10 @@ jobs:
shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: '3.11'
- name: Install System packages
@@ -118,13 +118,13 @@ jobs:
run: |
# Need this for the git tests to succeed.
git --version
. .github/workflows/setup_git.sh
. .github/workflows/bin/setup_git.sh
- name: Run shell tests
env:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
flags: shelltests,linux
token: ${{ secrets.CODECOV_TOKEN }}
@@ -141,13 +141,13 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow
. .github/workflows/setup_git.sh
. .github/workflows/bin/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Run unit tests
@@ -160,10 +160,10 @@ jobs:
clingo-cffi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: '3.11'
- name: Install System packages
@@ -178,14 +178,14 @@ jobs:
run: |
# Need this for the git tests to succeed.
git --version
. .github/workflows/setup_git.sh
. .github/workflows/bin/setup_git.sh
- name: Run unit tests (full suite with coverage)
env:
COVERAGE: true
SPACK_TEST_SOLVER: clingo
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
flags: unittests,linux,clingo
token: ${{ secrets.CODECOV_TOKEN }}
@@ -198,10 +198,10 @@ jobs:
os: [macos-13, macos-14]
python-version: ["3.11"]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -217,14 +217,45 @@ jobs:
SPACK_TEST_PARALLEL: 4
run: |
git --version
. .github/workflows/setup_git.sh
. .github/workflows/bin/setup_git.sh
. share/spack/setup-env.sh
$(which spack) bootstrap disable spack-install
$(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: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
flags: unittests,macos
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
# Run unit tests on Windows
windows:
defaults:
run:
shell:
powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
runs-on: windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
- name: Create local develop
run: |
./.github/workflows/bin/setup_git.ps1
- name: Unit Test
run: |
spack unit-test -x --verbose --cov --cov-config=pyproject.toml
./share/spack/qa/validate_last_exit.ps1
coverage combine -a
coverage xml
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
flags: unittests,windows
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

View File

@@ -18,15 +18,15 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python Packages
run: |
pip install --upgrade pip setuptools
pip install -r .github/workflows/style/requirements.txt
pip install -r .github/workflows/requirements/style/requirements.txt
- name: vermin (Spack's Core)
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
- name: vermin (Repositories)
@@ -35,22 +35,22 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python packages
run: |
pip install --upgrade pip setuptools
pip install -r .github/workflows/style/requirements.txt
pip install -r .github/workflows/requirements/style/requirements.txt
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
git --version
. .github/workflows/setup_git.sh
. .github/workflows/bin/setup_git.sh
- name: Run style tests
run: |
share/spack/qa/run-style-tests
@@ -70,13 +70,13 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow
. .github/workflows/setup_git.sh
. .github/workflows/bin/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Bootstrap Spack development environment

View File

@@ -1,83 +0,0 @@
name: windows
on:
workflow_call:
concurrency:
group: windows-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true
defaults:
run:
shell:
powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
jobs:
unit-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
- name: Create local develop
run: |
./.github/workflows/setup_git.ps1
- name: Unit Test
run: |
spack unit-test -x --verbose --cov --cov-config=pyproject.toml --ignore=lib/spack/spack/test/cmd
./share/spack/qa/validate_last_exit.ps1
coverage combine -a
coverage xml
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
with:
flags: unittests,windows
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
unit-tests-cmd:
runs-on: windows-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip pywin32 setuptools coverage pytest-cov clingo
- name: Create local develop
run: |
./.github/workflows/setup_git.ps1
- name: Command Unit Test
run: |
spack unit-test -x --verbose --cov --cov-config=pyproject.toml lib/spack/spack/test/cmd
./share/spack/qa/validate_last_exit.ps1
coverage combine -a
coverage xml
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
with:
flags: unittests,windows
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
build-abseil:
runs-on: windows-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip pywin32 setuptools coverage
- name: Build Test
run: |
spack compiler find
spack -d external find cmake ninja
spack -d install abseil-cpp

View File

@@ -1,3 +1,324 @@
# v0.22.0 (2024-05-12)
`v0.22.0` is a major feature release.
## Features in this release
1. **Compiler dependencies**
We are in the process of making compilers proper dependencies in Spack, and a number
of changes in `v0.22` support that effort. You may notice nodes in your dependency
graphs for compiler runtime libraries like `gcc-runtime` or `libgfortran`, and you
may notice that Spack graphs now include `libc`. We've also begun moving compiler
configuration from `compilers.yaml` to `packages.yaml` to make it consistent with
other externals. We are trying to do this with the least disruption possible, so
your existing `compilers.yaml` files should still work. We expect to be done with
this transition by the `v0.23` release in November.
* #41104: Packages compiled with `%gcc` on Linux, macOS and FreeBSD now depend on a
new package `gcc-runtime`, which contains a copy of the shared compiler runtime
libraries. This enables gcc runtime libraries to be installed and relocated when
using a build cache. When building minimal Spack-generated container images it is
no longer necessary to install libgfortran, libgomp etc. using the system package
manager.
* #42062: Packages compiled with `%oneapi` now depend on a new package
`intel-oneapi-runtime`. This is similar to `gcc-runtime`, and the runtimes can
provide virtuals and compilers can inject dependencies on virtuals into compiled
packages. This allows us to model library soname compatibility and allows
compilers like `%oneapi` to provide virtuals like `sycl` (which can also be
provided by standalone libraries). Note that until we have an agreement in place
with intel, Intel packages are marked `redistribute(source=False, binary=False)`
and must be downloaded outside of Spack.
* #43272: changes to the optimization criteria of the solver improve the hit-rate of
buildcaches by a fair amount. The solver more relaxed compatibility rules and will
not try to strictly match compilers or targets of reused specs. Users can still
enforce the previous strict behavior with `require:` sections in `packages.yaml`.
Note that to enforce correct linking, Spack will *not* reuse old `%gcc` and
`%oneapi` specs that do not have the runtime libraries as a dependency.
* #43539: Spack will reuse specs built with compilers that are *not* explicitly
configured in `compilers.yaml`. Because we can now keep runtime libraries in build
cache, we do not require you to also have a local configured compiler to *use* the
runtime libraries. This improves reuse in buildcaches and avoids conflicts with OS
updates that happen underneath Spack.
* #43190: binary compatibility on `linux` is now based on the `libc` version,
instead of on the `os` tag. Spack builds now detect the host `libc` (`glibc` or
`musl`) and add it as an implicit external node in the dependency graph. Binaries
with a `libc` with the same name and a version less than or equal to that of the
detected `libc` can be reused. This is only on `linux`, not `macos` or `Windows`.
* #43464: each package that can provide a compiler is now detectable using `spack
external find`. External packages defining compiler paths are effectively used as
compilers, and `spack external find -t compiler` can be used as a substitute for
`spack compiler find`. More details on this transition are in
[the docs](https://spack.readthedocs.io/en/latest/getting_started.html#manual-compiler-configuration)
2. **Improved `spack find` UI for Environments**
If you're working in an enviroment, you likely care about:
* What are the roots
* Which ones are installed / not installed
* What's been added that still needs to be concretized
We've tweaked `spack find` in environments to show this information much more
clearly. Installation status is shown next to each root, so you can see what is
installed. Roots are also shown in bold in the list of installed packages. There is
also a new option for `spack find -r` / `--only-roots` that will only show env
roots, if you don't want to look at all the installed specs.
More details in #42334.
3. **Improved command-line string quoting**
We are making some breaking changes to how Spack parses specs on the CLI in order to
respect shell quoting instead of trying to fight it. If you (sadly) had to write
something like this on the command line:
```
spack install zlib cflags=\"-O2 -g\"
```
That will now result in an error, but you can now write what you probably expected
to work in the first place:
```
spack install zlib cflags="-O2 -g"
```
Quoted can also now include special characters, so you can supply flags like:
```
spack intall zlib ldflags='-Wl,-rpath=$ORIGIN/_libs'
```
To reduce ambiguity in parsing, we now require that you *not* put spaces around `=`
and `==` when for flags or variants. This would not have broken before but will now
result in an error:
```
spack install zlib cflags = "-O2 -g"
```
More details and discussion in #30634.
4. **Revert default `spack install` behavior to `--reuse`**
We changed the default concretizer behavior from `--reuse` to `--reuse-deps` in
#30990 (in `v0.20`), which meant that *every* `spack install` invocation would
attempt to build a new version of the requested package / any environment roots.
While this is a common ask for *upgrading* and for *developer* workflows, we don't
think it should be the default for a package manager.
We are going to try to stick to this policy:
1. Prioritize reuse and build as little as possible by default.
2. Only upgrade or install duplicates if they are explicitly asked for, or if there
is a known security issue that necessitates an upgrade.
With the install command you now have three options:
* `--reuse` (default): reuse as many existing installations as possible.
* `--reuse-deps` / `--fresh-roots`: upgrade (freshen) roots but reuse dependencies if possible.
* `--fresh`: install fresh versions of requested packages (roots) and their dependencies.
We've also introduced `--fresh-roots` as an alias for `--reuse-deps` to make it more clear
that it may give you fresh versions. More details in #41302 and #43988.
5. **More control over reused specs**
You can now control which packages to reuse and how. There is a new
`concretizer:reuse` config option, which accepts the following properties:
- `roots`: `true` to reuse roots, `false` to reuse just dependencies
- `exclude`: list of constraints used to select which specs *not* to reuse
- `include`: list of constraints used to select which specs *to* reuse
- `from`: list of sources for reused specs (some combination of `local`,
`buildcache`, or `external`)
For example, to reuse only specs compiled with GCC, you could write:
```yaml
concretizer:
reuse:
roots: true
include:
- "%gcc"
```
Or, if `openmpi` must be used from externals, and it must be the only external used:
```yaml
concretizer:
reuse:
roots: true
from:
- type: local
exclude: ["openmpi"]
- type: buildcache
exclude: ["openmpi"]
- type: external
include: ["openmpi"]
```
6. **New `redistribute()` directive**
Some packages can't be redistributed in source or binary form. We need an explicit
way to say that in a package.
Now there is a `redistribute()` directive so that package authors can write:
```python
class MyPackage(Package):
redistribute(source=False, binary=False)
```
Like other directives, this works with `when=`:
```python
class MyPackage(Package):
# 12.0 and higher are proprietary
redistribute(source=False, binary=False, when="@12.0:")
# can't redistribute when we depend on some proprietary dependency
redistribute(source=False, binary=False, when="^proprietary-dependency")
```
More in #20185.
7. **New `conflict:` and `prefer:` syntax for package preferences**
Previously, you could express conflicts and preferences in `packages.yaml` through
some contortions with `require:`:
```yaml
packages:
zlib-ng:
require:
- one_of: ["%clang", "@:"] # conflict on %clang
- any_of: ["+shared", "@:"] # strong preference for +shared
```
You can now use `require:` and `prefer:` for a much more readable configuration:
```yaml
packages:
zlib-ng:
conflict:
- "%clang"
prefer:
- "+shared"
```
See [the documentation](https://spack.readthedocs.io/en/latest/packages_yaml.html#conflicts-and-strong-preferences)
and #41832 for more details.
8. **`include_concrete` in environments**
You may want to build on the *concrete* contents of another environment without
changing that environment. You can now include the concrete specs from another
environment's `spack.lock` with `include_concrete`:
```yaml
spack:
specs: []
concretizer:
unify: true
include_concrete:
- /path/to/environment1
- /path/to/environment2
```
Now, when *this* environment is concretized, it will bring in the already concrete
specs from `environment1` and `environment2`, and build on top of them without
changing them. This is useful if you have phased deployments, where old deployments
should not be modified but you want to use as many of them as possible. More details
in #33768.
9. **`python-venv` isolation**
Spack has unique requirements for Python because it:
1. installs every package in its own independent directory, and
2. allows users to register *external* python installations.
External installations may contain their own installed packages that can interfere
with Spack installations, and some distributions (Debian and Ubuntu) even change the
`sysconfig` in ways that alter the installation layout of installed Python packages
(e.g., with the addition of a `/local` prefix on Debian or Ubuntu). To isolate Spack
from these and other issues, we now insert a small `python-venv` package in between
`python` and packages that need to install Python code. This isolates Spack's build
environment, isolates Spack from any issues with an external python, and resolves a
large number of issues we've had with Python installations.
See #40773 for further details.
## New commands, options, and directives
* Allow packages to be pushed to build cache after install from source (#42423)
* `spack develop`: stage build artifacts in same root as non-dev builds #41373
* Don't delete `spack develop` build artifacts after install (#43424)
* `spack find`: add options for local/upstream only (#42999)
* `spack logs`: print log files for packages (either partially built or installed) (#42202)
* `patch`: support reversing patches (#43040)
* `develop`: Add -b/--build-directory option to set build_directory package attribute (#39606)
* `spack list`: add `--namesapce` / `--repo` option (#41948)
* directives: add `checked_by` field to `license()`, add some license checks
* `spack gc`: add options for environments and build dependencies (#41731)
* Add `--create` to `spack env activate` (#40896)
## Performance improvements
* environment.py: fix excessive re-reads (#43746)
* ruamel yaml: fix quadratic complexity bug (#43745)
* Refactor to improve `spec format` speed (#43712)
* Do not acquire a write lock on the env post install if no views (#43505)
* asp.py: fewer calls to `spec.copy()` (#43715)
* spec.py: early return in `__str__`
* avoid `jinja2` import at startup unless needed (#43237)
## Other new features of note
* `archspec`: update to `v0.2.4`: support for Windows, bugfixes for `neoverse-v1` and
`neoverse-v2` detection.
* `spack config get`/`blame`: with no args, show entire config
* `spack env create <env>`: dir if dir-like (#44024)
* ASP-based solver: update os compatibility for macOS (#43862)
* Add handling of custom ssl certs in urllib ops (#42953)
* Add ability to rename environments (#43296)
* Add config option and compiler support to reuse across OS's (#42693)
* Support for prereleases (#43140)
* Only reuse externals when configured (#41707)
* Environments: Add support for including views (#42250)
## Binary caches
* Build cache: make signed/unsigned a mirror property (#41507)
* tools stack
## Removals, deprecations, and syntax changes
* remove `dpcpp` compiler and package (#43418)
* spack load: remove --only argument (#42120)
## Notable Bugfixes
* repo.py: drop deleted packages from provider cache (#43779)
* Allow `+` in module file names (#41999)
* `cmd/python`: use runpy to allow multiprocessing in scripts (#41789)
* Show extension commands with spack -h (#41726)
* Support environment variable expansion inside module projections (#42917)
* Alert user to failed concretizations (#42655)
* shell: fix zsh color formatting for PS1 in environments (#39497)
* spack mirror create --all: include patches (#41579)
## Spack community stats
* 7,994 total packages; 525 since `v0.21.0`
* 178 new Python packages, 5 new R packages
* 358 people contributed to this release
* 344 committers to packages
* 45 committers to core
# v0.21.2 (2024-03-01)
## Bugfixes

View File

@@ -22,4 +22,4 @@
#
# This is compatible across platforms.
#
exec /usr/bin/env spack python "$@"
exec spack python "$@"

View File

@@ -188,25 +188,27 @@ if NOT "%_sp_args%"=="%_sp_args:--help=%" (
goto :end_switch
:case_load
:: If args contain --sh, --csh, or -h/--help: just execute.
if defined _sp_args (
if NOT "%_sp_args%"=="%_sp_args:--help=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:-h=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
goto :default_case
)
if NOT defined _sp_args (
exit /B 0
)
:: If args contain --bat, or -h/--help: just execute.
if NOT "%_sp_args%"=="%_sp_args:--help=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:-h=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:--list=%" (
goto :default_case
)
for /f "tokens=* USEBACKQ" %%I in (
`python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`) do %%I
`python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`
) do %%I
goto :end_switch
:case_unload
goto :case_load
:default_case
python "%spack%" %_sp_flags% %_sp_subcommand% %_sp_args%
goto :end_switch

View File

@@ -20,6 +20,7 @@ packages:
awk: [gawk]
armci: [armcimpi]
blas: [openblas, amdblis]
cxx: [gcc]
D: [ldc]
daal: [intel-oneapi-daal]
elf: [elfutils]
@@ -61,6 +62,7 @@ packages:
tbb: [intel-tbb]
unwind: [libunwind]
uuid: [util-linux-uuid, libuuid]
wasi-sdk: [wasi-sdk-prebuilt]
xxd: [xxd-standalone, vim]
yacc: [bison, byacc]
ziglang: [zig]

View File

@@ -203,12 +203,9 @@ The OS that are currently supported are summarized in the table below:
* - Ubuntu 24.04
- ``ubuntu:24.04``
- ``spack/ubuntu-noble``
* - CentOS 7
- ``centos:7``
- ``spack/centos7``
* - CentOS Stream
- ``quay.io/centos/centos:stream``
- ``spack/centos-stream``
* - CentOS Stream9
- ``quay.io/centos/centos:stream9``
- ``spack/centos-stream9``
* - openSUSE Leap
- ``opensuse/leap``
- ``spack/leap15``

View File

@@ -931,32 +931,84 @@ This allows for a much-needed reduction in redundancy between packages
and constraints.
----------------
Filesystem Views
----------------
-----------------
Environment Views
-----------------
Spack Environments can define filesystem views, which provide a direct access point
for software similar to the directory hierarchy that might exist under ``/usr/local``.
Filesystem views are updated every time the environment is written out to the lock
file ``spack.lock``, so the concrete environment and the view are always compatible.
The files of the view's installed packages are brought into the view by symbolic or
hard links, referencing the original Spack installation, or by copy.
Spack Environments can have an associated filesystem view, which is a directory
with a more traditional structure ``<view>/bin``, ``<view>/lib``, ``<view>/include``
in which all files of the installed packages are linked.
By default a view is created for each environment, thanks to the ``view: true``
option in the ``spack.yaml`` manifest file:
.. code-block:: yaml
spack:
specs: [perl, python]
view: true
The view is created in a hidden directory ``.spack-env/view`` relative to the environment.
If you've used ``spack env activate``, you may have already interacted with this view. Spack
prepends its ``<view>/bin`` dir to ``PATH`` when the environment is activated, so that
you can directly run executables from all installed packages in the environment.
Views are highly customizable: you can control where they are put, modify their structure,
include and exclude specs, change how files are linked, and you can even generate multiple
views for a single environment.
.. _configuring_environment_views:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Configuration in ``spack.yaml``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^
Minimal view configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^
The Spack Environment manifest file has a top-level keyword
``view``. Each entry under that heading is a **view descriptor**, headed
by a name. Any number of views may be defined under the ``view`` heading.
The view descriptor contains the root of the view, and
optionally the projections for the view, ``select`` and
``exclude`` lists for the view and link information via ``link`` and
The minimal configuration
.. code-block:: yaml
spack:
# ...
view: true
lets Spack generate a single view with default settings under the
``.spack-env/view`` directory of the environment.
Another short way to configure a view is to specify just where to put it:
.. code-block:: yaml
spack:
# ...
view: /path/to/view
Views can also be disabled by setting ``view: false``.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Advanced view configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^
One or more **view descriptors** can be defined under ``view``, keyed by a name.
The example from the previous section with ``view: /path/to/view`` is equivalent
to defining a view descriptor named ``default`` with a ``root`` attribute:
.. code-block:: yaml
spack:
# ...
view:
default: # name of the view
root: /path/to/view # view descriptor attribute
The ``default`` view descriptor name is special: when you ``spack env activate`` your
environment, this view will be used to update (among other things) your ``PATH``
variable.
View descriptors must contain the root of the view, and optionally projections,
``select`` and ``exclude`` lists and link information via ``link`` and
``link_type``.
For example, in the following manifest
As a more advanced example, in the following manifest
file snippet we define a view named ``mpis``, rooted at
``/path/to/view`` in which all projections use the package name,
version, and compiler name to determine the path for a given
@@ -1001,59 +1053,10 @@ of ``hardlink`` or ``copy``.
when the environment is not activated, and linked libraries will be located
*outside* of the view thanks to rpaths.
There are two shorthands for environments with a single view. If the
environment at ``/path/to/env`` has a single view, with a root at
``/path/to/env/.spack-env/view``, with default selection and exclusion
and the default projection, we can put ``view: True`` in the
environment manifest. Similarly, if the environment has a view with a
different root, but default selection, exclusion, and projections, the
manifest can say ``view: /path/to/view``. These views are
automatically named ``default``, so that
.. code-block:: yaml
spack:
# ...
view: True
is equivalent to
.. code-block:: yaml
spack:
# ...
view:
default:
root: .spack-env/view
and
.. code-block:: yaml
spack:
# ...
view: /path/to/view
is equivalent to
.. code-block:: yaml
spack:
# ...
view:
default:
root: /path/to/view
By default, Spack environments are configured with ``view: True`` in
the manifest. Environments can be configured without views using
``view: False``. For backwards compatibility reasons, environments
with no ``view`` key are treated the same as ``view: True``.
From the command line, the ``spack env create`` command takes an
argument ``--with-view [PATH]`` that sets the path for a single, default
view. If no path is specified, the default path is used (``view:
True``). The argument ``--without-view`` can be used to create an
true``). The argument ``--without-view`` can be used to create an
environment without any view configured.
The ``spack env view`` command can be used to change the manage views
@@ -1119,11 +1122,18 @@ the projection under ``all`` before reaching those entries.
Activating environment views
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``spack env activate`` command will put the default view for the
environment into the user's path, in addition to activating the
environment for Spack commands. The arguments ``-v,--with-view`` and
``-V,--without-view`` can be used to tune this behavior. The default
behavior is to activate with the environment view if there is one.
The ``spack env activate <env>`` has two effects:
1. It activates the environment so that further Spack commands such
as ``spack install`` will run in the context of the environment.
2. It activates the view so that environment variables such as
``PATH`` are updated to include the view.
Without further arguments, the ``default`` view of the environment is
activated. If a view with a different name has to be activated,
``spack env activate --with-view <name> <env>`` can be
used instead. You can also activate the environment without modifying
further environment variables using ``--without-view``.
The environment variables affected by the ``spack env activate``
command and the paths that are used to update them are determined by
@@ -1146,8 +1156,8 @@ relevant variable if the path exists. For this reason, it is not
recommended to use non-default projections with the default view of an
environment.
The ``spack env deactivate`` command will remove the default view of
the environment from the user's path.
The ``spack env deactivate`` command will remove the active view of
the Spack environment from the user's environment variables.
.. _env-generate-depfile:
@@ -1306,7 +1316,7 @@ index once every package is pushed. Note how this target uses the generated
example/push/%: example/install/%
@mkdir -p $(dir $@)
$(info About to push $(SPEC) to a buildcache)
$(SPACK) -e . buildcache push --allow-root --only=package $(BUILDCACHE_DIR) /$(HASH)
$(SPACK) -e . buildcache push --only=package $(BUILDCACHE_DIR) /$(HASH)
@touch $@
push: $(addprefix example/push/,$(example/SPACK_PACKAGE_IDS))

View File

@@ -2344,6 +2344,27 @@ you set ``parallel`` to ``False`` at the package level, then each call
to ``make()`` will be sequential by default, but packagers can call
``make(parallel=True)`` to override it.
Note that the ``--jobs`` option works out of the box for all standard
build systems. If you are using a non-standard build system instead, you
can use the variable ``make_jobs`` to extract the number of jobs specified
by the ``--jobs`` option:
.. code-block:: python
:emphasize-lines: 7, 11
:linenos:
class Xios(Package):
...
def install(self, spec, prefix):
...
options = [
...
'--jobs', str(make_jobs),
]
...
make_xios = Executable("./make_xios")
make_xios(*options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Install-level build parallelism
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -5173,12 +5194,6 @@ installed executable. The check is implemented as follows:
reframe = Executable(self.prefix.bin.reframe)
reframe("-l")
.. warning::
The API for adding tests is not yet considered stable and may change
in future releases.
""""""""""""""""""""""""""""""""
Checking build-time test results
""""""""""""""""""""""""""""""""
@@ -5216,38 +5231,42 @@ be left in the build stage directory as illustrated below:
Stand-alone tests
^^^^^^^^^^^^^^^^^
While build-time tests are integrated with the build process, stand-alone
While build-time tests are integrated with the installation process, stand-alone
tests are expected to run days, weeks, even months after the software is
installed. The goal is to provide a mechanism for gaining confidence that
packages work as installed **and** *continue* to work as the underlying
software evolves. Packages can add and inherit stand-alone tests. The
`spack test`` command is used to manage stand-alone testing.
``spack test`` command is used for stand-alone testing.
.. note::
.. admonition:: Stand-alone test methods should complete within a few minutes.
Execution speed is important since these tests are intended to quickly
assess whether installed specs work on the system. Consequently, they
should run relatively quickly -- as in on the order of at most a few
minutes -- while ideally executing all, or at least key aspects of the
installed software.
assess whether installed specs work on the system. Spack cannot spare
resources for more extensive testing of packages included in CI stacks.
.. note::
Failing stand-alone tests indicate problems with the installation and,
therefore, there is no reason to proceed with more resource-intensive
tests until those have been investigated.
Passing stand-alone tests indicate that more thorough testing, such
as running extensive unit or regression tests, or tests that run at
scale can proceed without wasting resources on a problematic installation.
Consequently, stand-alone tests should run relatively quickly -- as in
on the order of at most a few minutes -- while testing at least key aspects
of the installed software. Save more extensive testing for other tools.
Tests are defined in the package using methods with names beginning ``test_``.
This allows Spack to support multiple independent checks, or parts. Files
needed for testing, such as source, data, and expected outputs, may be saved
from the build and or stored with the package in the repository. Regardless
of origin, these files are automatically copied to the spec's test stage
directory prior to execution of the test method(s). Spack also provides some
helper functions to facilitate processing.
directory prior to execution of the test method(s). Spack also provides helper
functions to facilitate common processing.
.. tip::
**The status of stand-alone tests can be used to guide follow-up testing efforts.**
Passing stand-alone tests justify performing more thorough testing, such
as running extensive unit or regression tests or tests that run at scale,
when available. These tests are outside of the scope of Spack packaging.
Failing stand-alone tests indicate problems with the installation and,
therefore, no reason to proceed with more resource-intensive tests until
the failures have been investigated.
.. _configure-test-stage:
@@ -5255,30 +5274,26 @@ helper functions to facilitate processing.
Configuring the test stage directory
""""""""""""""""""""""""""""""""""""
Stand-alone tests utilize a test stage directory for building, running,
and tracking results in the same way Spack uses a build stage directory.
The default test stage root directory, ``~/.spack/test``, is defined in
:ref:`etc/spack/defaults/config.yaml <config-yaml>`. This location is
customizable by adding or changing the ``test_stage`` path in the high-level
``config`` of the appropriate ``config.yaml`` file such that:
Stand-alone tests utilize a test stage directory to build, run, and track
tests in the same way Spack uses a build stage directory to install software.
The default test stage root directory, ``$HOME/.spack/test``, is defined in
:ref:`config.yaml <config-yaml>`. This location is customizable by adding or
changing the ``test_stage`` path such that:
.. code-block:: yaml
config:
test_stage: /path/to/test/stage
Packages can use the ``self.test_suite.stage`` property to access this setting.
Other package properties that provide access to spec-specific subdirectories
and files are described in :ref:`accessing staged files <accessing-files>`.
Packages can use the ``self.test_suite.stage`` property to access the path.
.. note::
.. admonition:: Each spec being tested has its own test stage directory.
The test stage path is the root directory for the **entire suite**.
In other words, it is the root directory for **all specs** being
tested by the ``spack test run`` command. Each spec gets its own
stage subdirectory. Use ``self.test_suite.test_dir_for_spec(self.spec)``
to access the spec-specific test stage directory.
The ``config:test_stage`` option is the path to the root of a
**test suite**'s stage directories.
Other package properties that provide paths to spec-specific subdirectories
and files are described in :ref:`accessing-files`.
.. _adding-standalone-tests:
@@ -5291,61 +5306,144 @@ Test recipes are defined in the package using methods with names beginning
Each method has access to the information Spack tracks on the package, such
as options, compilers, and dependencies, supporting the customization of tests
to the build. Standard python ``assert`` statements and other error reporting
mechanisms are available. Such exceptions are automatically caught and reported
mechanisms can be used. These exceptions are automatically caught and reported
as test failures.
Each test method is an implicit test part named by the method and whose
purpose is the method's docstring. Providing a purpose gives context for
aiding debugging. A test method may contain embedded test parts. Spack
outputs the test name and purpose prior to running each test method and
any embedded test parts. For example, ``MyPackage`` below provides two basic
examples of installation tests: ``test_always_fails`` and ``test_example``.
As the name indicates, the first always fails. The second simply runs the
installed example.
Each test method is an *implicit test part* named by the method. Its purpose
is the method's docstring. Providing a meaningful purpose for the test gives
context that can aid debugging. Spack outputs both the name and purpose at the
start of test execution so it's also important that the docstring/purpose be
brief.
.. tip::
We recommend naming test methods so it is clear *what* is being tested.
For example, if a test method is building and or running an executable
called ``example``, then call the method ``test_example``. This, together
with a similarly meaningful test purpose, will aid test comprehension,
debugging, and maintainability.
Stand-alone tests run in an environment that provides access to information
on the installed software, such as build options, dependencies, and compilers.
Build options and dependencies are accessed using the same spec checks used
by build recipes. Examples of checking :ref:`variant settings <variants>` and
:ref:`spec constraints <testing-specs>` can be found at the provided links.
.. admonition:: Spack automatically sets up the test stage directory and environment.
Spack automatically creates the test stage directory and copies
relevant files *prior to* running tests. It can also ensure build
dependencies are available **if** necessary.
The path to the test stage is configurable (see :ref:`configure-test-stage`).
Files that Spack knows to copy are those saved from the build (see
:ref:`cache_extra_test_sources`) and those added to the package repository
(see :ref:`cache_custom_files`).
Spack will use the value of the ``test_requires_compiler`` property to
determine whether it needs to also set up build dependencies (see
:ref:`test-build-tests`).
The ``MyPackage`` package below provides two basic test examples:
``test_example`` and ``test_example2``. The first runs the installed
``example`` and ensures its output contains an expected string. The second
runs ``example2`` without checking output so is only concerned with confirming
the executable runs successfully. If the installed spec is not expected to have
``example2``, then the check at the top of the method will raise a special
``SkipTest`` exception, which is captured to facilitate reporting skipped test
parts to tools like CDash.
.. code-block:: python
class MyPackage(Package):
...
def test_always_fails(self):
"""use assert to always fail"""
assert False
def test_example(self):
"""run installed example"""
"""ensure installed example works"""
expected = "Done."
example = which(self.prefix.bin.example)
example()
# Capture stdout and stderr from running the Executable
# and check that the expected output was produced.
out = example(output=str.split, error=str.split)
assert expected in out, f"Expected '{expected}' in the output"
def test_example2(self):
"""run installed example2"""
if self.spec.satisfies("@:1.0"):
# Raise SkipTest to ensure flagging the test as skipped for
# test reporting purposes.
raise SkipTest("Test is only available for v1.1 on")
example2 = which(self.prefix.bin.example2)
example2()
Output showing the identification of each test part after running the tests
is illustrated below.
.. code-block:: console
$ spack test run --alias mypackage mypackage@1.0
$ spack test run --alias mypackage mypackage@2.0
==> Spack test mypackage
...
$ spack test results -l mypackage
==> Results for test suite 'mypackage':
...
==> [2023-03-10-16:03:56.625204] test: test_always_fails: use assert to always fail
==> [2024-03-10-16:03:56.625439] test: test_example: ensure installed example works
...
FAILED
==> [2023-03-10-16:03:56.625439] test: test_example: run installed example
PASSED: MyPackage::test_example
==> [2024-03-10-16:03:56.625439] test: test_example2: run installed example2
...
PASSED
PASSED: MyPackage::test_example2
.. admonition:: Do NOT implement tests that must run in the installation prefix.
.. note::
Use of the package spec's installation prefix for building and running
tests is **strongly discouraged**. Doing so causes permission errors for
shared spack instances *and* facilities that install the software in
read-only file systems or directories.
If ``MyPackage`` were a recipe for a library, the tests should build
an example or test program that is then executed.
Instead, start these test methods by explicitly copying the needed files
from the installation prefix to the test stage directory. Note the test
stage directory is the current directory when the test is executed with
the ``spack test run`` command.
A test method can include test parts using the ``test_part`` context manager.
Each part is treated as an independent check to allow subsequent test parts
to execute even after a test part fails.
.. admonition:: Test methods for library packages should build test executables.
.. _test-part:
Stand-alone tests for library packages *should* build test executables
that utilize the *installed* library. Doing so ensures the tests follow
a similar build process that users of the library would follow.
For more information on how to do this, see :ref:`test-build-tests`.
.. tip::
If you want to see more examples from packages with stand-alone tests, run
``spack pkg grep "def\stest" | sed "s/\/package.py.*//g" | sort -u``
from the command line to get a list of the packages.
.. _adding-standalone-test-parts:
"""""""""""""""""""""""""""""
Adding stand-alone test parts
"""""""""""""""""""""""""""""
Sometimes dependencies between steps of a test lend themselves to being
broken into parts. Tracking the pass/fail status of each part may aid
debugging. Spack provides a ``test_part`` context manager for use within
test methods.
Each test part is independently run, tracked, and reported. Test parts are
executed in the order they appear. If one fails, subsequent test parts are
still performed even if they would also fail. This allows tools like CDash
to track and report the status of test parts across runs. The pass/fail status
of the enclosing test is derived from the statuses of the embedded test parts.
.. admonition:: Test method and test part names **must** be unique.
Test results reporting requires that test methods and embedded test parts
within a package have unique names.
The signature for ``test_part`` is:
@@ -5367,40 +5465,68 @@ where each argument has the following meaning:
* ``work_dir`` is the path to the directory in which the test will run.
The default of ``None``, or ``"."``, corresponds to the the spec's test
stage (i.e., ``self.test_suite.test_dir_for_spec(self.spec)``.
stage (i.e., ``self.test_suite.test_dir_for_spec(self.spec)``).
.. admonition:: Tests should **not** run under the installation directory.
.. admonition:: Start test part names with the name of the enclosing test.
Use of the package spec's installation directory for building and running
tests is **strongly** discouraged. Doing so causes permission errors for
shared spack instances *and* facilities that install the software in
read-only file systems or directories.
We **highly recommend** starting the names of test parts with the name
of the enclosing test. Doing so helps with the comprehension, readability
and debugging of test results.
Suppose ``MyPackage`` actually installs two examples we want to use for tests.
These checks can be implemented as separate checks or, as illustrated below,
embedded test parts.
Suppose ``MyPackage`` installs multiple executables that need to run in a
specific order since the outputs from one are inputs of others. Further suppose
we want to add an integration test that runs the executables in order. We can
accomplish this goal by implementing a stand-alone test method consisting of
test parts for each executable as follows:
.. code-block:: python
class MyPackage(Package):
...
def test_example(self):
"""run installed examples"""
for example in ["ex1", "ex2"]:
with test_part(
self,
f"test_example_{example}",
purpose=f"run installed {example}",
):
exe = which(join_path(self.prefix.bin, example))
exe()
def test_series(self):
"""run setup, perform, and report"""
In this case, there will be an implicit test part for ``test_example``
and separate sub-parts for ``ex1`` and ``ex2``. The second sub-part
will be executed regardless of whether the first passes. The test
log for a run where the first executable fails and the second passes
is illustrated below.
with test_part(self, "test_series_setup", purpose="setup operation"):
exe = which(self.prefix.bin.setup))
exe()
with test_part(self, "test_series_run", purpose="perform operation"):
exe = which(self.prefix.bin.run))
exe()
with test_part(self, "test_series_report", purpose="generate report"):
exe = which(self.prefix.bin.report))
exe()
The result is ``test_series`` runs the following executable in order: ``setup``,
``run``, and ``report``. In this case no options are passed to any of the
executables and no outputs from running them are checked. Consequently, the
implementation could be simplified with a for-loop as follows:
.. code-block:: python
class MyPackage(Package):
...
def test_series(self):
"""execute series setup, run, and report"""
for exe, reason in [
("setup", "setup operation"),
("run", "perform operation"),
("report", "generate report")
]:
with test_part(self, f"test_series_{exe}", purpose=reason):
exe = which(self.prefix.bin.join(exe))
exe()
In both cases, since we're using a context manager, each test part in
``test_series`` will execute regardless of the status of the other test
parts.
Now let's look at the output from running the stand-alone tests where
the second test part, ``test_series_run``, fails.
.. code-block:: console
@@ -5410,50 +5536,68 @@ is illustrated below.
$ spack test results -l mypackage
==> Results for test suite 'mypackage':
...
==> [2023-03-10-16:03:56.625204] test: test_example: run installed examples
==> [2023-03-10-16:03:56.625439] test: test_example_ex1: run installed ex1
==> [2024-03-10-16:03:56.625204] test: test_series: execute series setup, run, and report
==> [2024-03-10-16:03:56.625439] test: test_series_setup: setup operation
...
FAILED
==> [2023-03-10-16:03:56.625555] test: test_example_ex2: run installed ex2
PASSED: MyPackage::test_series_setup
==> [2024-03-10-16:03:56.625555] test: test_series_run: perform operation
...
PASSED
FAILED: MyPackage::test_series_run
==> [2024-03-10-16:03:57.003456] test: test_series_report: generate report
...
FAILED: MyPackage::test_series_report
FAILED: MyPackage::test_series
...
.. warning::
Since test parts depended on the success of previous parts, we see that the
failure of one results in the failure of subsequent checks and the overall
result of the test method, ``test_series``, is failure.
Test results reporting requires that each test method and embedded
test part for a package have a unique name.
.. tip::
Stand-alone tests run in an environment that provides access to information
Spack has on how the software was built, such as build options, dependencies,
and compilers. Build options and dependencies are accessed with the normal
spec checks. Examples of checking :ref:`variant settings <variants>` and
:ref:`spec constraints <testing-specs>` can be found at the provided links.
Accessing compilers in stand-alone tests that are used by the build requires
setting a package property as described :ref:`below <test-compilation>`.
If you want to see more examples from packages using ``test_part``, run
``spack pkg grep "test_part(" | sed "s/\/package.py.*//g" | sort -u``
from the command line to get a list of the packages.
.. _test-build-tests:
.. _test-compilation:
"""""""""""""""""""""""""""""""""""""
Building and running test executables
"""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""
Enabling test compilation
"""""""""""""""""""""""""
.. admonition:: Re-use build-time sources and (small) input data sets when possible.
If you want to build and run binaries in tests, then you'll need to tell
Spack to load the package's compiler configuration. This is accomplished
by setting the package's ``test_requires_compiler`` property to ``True``.
We **highly recommend** re-using build-time test sources and pared down
input files for testing installed software. These files are easier
to keep synchronized with software capabilities when they reside
within the software's repository. More information on saving files from
the installation process can be found at :ref:`cache_extra_test_sources`.
Setting the property to ``True`` ensures access to the compiler through
canonical environment variables (e.g., ``CC``, ``CXX``, ``FC``, ``F77``).
It also gives access to build dependencies like ``cmake`` through their
``spec objects`` (e.g., ``self.spec["cmake"].prefix.bin.cmake``).
If that is not possible, you can add test-related files to the package
repository (see :ref:`cache_custom_files`). It will be important to
remember to maintain them so they work across listed or supported versions
of the package.
.. note::
Packages that build libraries are good examples of cases where you'll want
to build test executables from the installed software before running them.
Doing so requires you to let Spack know it needs to load the package's
compiler configuration. This is accomplished by setting the package's
``test_requires_compiler`` property to ``True``.
The ``test_requires_compiler`` property should be added at the top of
the package near other attributes, such as the ``homepage`` and ``url``.
.. admonition:: ``test_requires_compiler = True`` is required to build test executables.
Below illustrates using this feature to compile an example.
Setting the property to ``True`` ensures access to the compiler through
canonical environment variables (e.g., ``CC``, ``CXX``, ``FC``, ``F77``).
It also gives access to build dependencies like ``cmake`` through their
``spec objects`` (e.g., ``self.spec["cmake"].prefix.bin.cmake`` for the
path or ``self.spec["cmake"].command`` for the ``Executable`` instance).
Be sure to add the property at the top of the package class under other
properties like the ``homepage``.
The example below, which ignores how ``cxx-example.cpp`` is acquired,
illustrates the basic process of compiling a test executable using the
installed library before running it.
.. code-block:: python
@@ -5477,28 +5621,22 @@ Below illustrates using this feature to compile an example.
cxx_example = which(exe)
cxx_example()
Typically the files used to build and or run test executables are either
cached from the installation (see :ref:`cache_extra_test_sources`) or added
to the package repository (see :ref:`cache_custom_files`). There is nothing
preventing the use of both.
.. _cache_extra_test_sources:
"""""""""""""""""""""""
Saving build-time files
"""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""
Saving build- and install-time files
""""""""""""""""""""""""""""""""""""
.. note::
We highly recommend re-using build-time test sources and pared down
input files for testing installed software. These files are easier
to keep synchronized with software capabilities since they reside
within the software's repository.
If that is not possible, you can add test-related files to the package
repository (see :ref:`adding custom files <cache_custom_files>`). It
will be important to maintain them so they work across listed or supported
versions of the package.
You can use the ``cache_extra_test_sources`` helper to copy directories
and or files from the source build stage directory to the package's
installation directory.
You can use the ``cache_extra_test_sources`` helper routine to copy
directories and or files from the source build stage directory to the
package's installation directory. Spack will automatically copy these
files for you when it sets up the test stage directory and before it
begins running the tests.
The signature for ``cache_extra_test_sources`` is:
@@ -5513,46 +5651,69 @@ where each argument has the following meaning:
* ``srcs`` is a string *or* a list of strings corresponding to the
paths of subdirectories and or files needed for stand-alone testing.
The paths must be relative to the staged source directory. Contents of
subdirectories and files are copied to a special test cache subdirectory
of the installation prefix. They are automatically copied to the appropriate
relative paths under the test stage directory prior to executing stand-alone
tests.
.. warning::
For example, a package method for copying everything in the ``tests``
subdirectory plus the ``foo.c`` and ``bar.c`` files from ``examples``
and using ``foo.c`` in a test method is illustrated below.
Paths provided in the ``srcs`` argument **must be relative** to the
staged source directory. They will be copied to the equivalent relative
location under the test stage directory prior to test execution.
Contents of subdirectories and files are copied to a special test cache
subdirectory of the installation prefix. They are automatically copied to
the appropriate relative paths under the test stage directory prior to
executing stand-alone tests.
.. tip::
*Perform test-related conversions once when copying files.*
If one or more of the copied files needs to be modified to reference
the installed software, it is recommended that those changes be made
to the cached files **once** in the post-``install`` copy method
**after** the call to ``cache_extra_test_sources``. This will reduce
the amount of unnecessary work in the test method **and** avoid problems
running stand-alone tests in shared instances and facility deployments.
The ``filter_file`` function can be quite useful for such changes
(see :ref:`file-filtering`).
Below is a basic example of a test that relies on files from the installation.
This package method re-uses the contents of the ``examples`` subdirectory,
which is assumed to have all of the files implemented to allow ``make`` to
compile and link ``foo.c`` and ``bar.c`` against the package's installed
library.
.. code-block:: python
class MyLibPackage(Package):
class MyLibPackage(MakefilePackage):
...
@run_after("install")
def copy_test_files(self):
srcs = ["tests",
join_path("examples", "foo.c"),
join_path("examples", "bar.c")]
cache_extra_test_sources(self, srcs)
cache_extra_test_sources(self, "examples")
def test_foo(self):
exe = "foo"
src_dir = self.test_suite.current_test_cache_dir.examples
with working_dir(src_dir):
cc = which(os.environ["CC"])
cc(
f"-L{self.prefix.lib}",
f"-I{self.prefix.include}",
f"{exe}.c",
"-o", exe
)
foo = which(exe)
foo()
def test_example(self):
"""build and run the examples"""
examples_dir = self.test_suite.current_test_cache_dir.examples
with working_dir(examples_dir):
make = which("make")
make()
In this case, the method copies the associated files from the build
stage, **after** the software is installed, to the package's test
cache directory. Then ``test_foo`` builds ``foo`` using ``foo.c``
before running the program.
for program in ["foo", "bar"]:
with test_part(
self,
f"test_example_{program}",
purpose=f"ensure {program} runs"
):
exe = Executable(program)
exe()
In this case, ``copy_test_files`` copies the associated files from the
build stage to the package's test cache directory under the installation
prefix. Running ``spack test run`` for the package results in Spack copying
the directory and its contents to the the test stage directory. The
``working_dir`` context manager ensures the commands within it are executed
from the ``examples_dir``. The test builds the software using ``make`` before
running each executable, ``foo`` and ``bar``, as independent test parts.
.. note::
@@ -5561,43 +5722,18 @@ before running the program.
The key to copying files for stand-alone testing at build time is use
of the ``run_after`` directive, which ensures the associated files are
copied **after** the provided build stage where the files **and**
installation prefix are available.
copied **after** the provided build stage (``install``) when the installation
prefix **and** files are available.
These paths are **automatically copied** from cache to the test stage
directory prior to the execution of any stand-alone tests. Tests access
the files using the ``self.test_suite.current_test_cache_dir`` property.
In our example above, test methods can use the following paths to reference
the copy of each entry listed in ``srcs``, respectively:
The test method uses the path contained in the package's
``self.test_suite.current_test_cache_dir`` property for the root directory
of the copied files. In this case, that's the ``examples`` subdirectory.
* ``self.test_suite.current_test_cache_dir.tests``
* ``join_path(self.test_suite.current_test_cache_dir.examples, "foo.c")``
* ``join_path(self.test_suite.current_test_cache_dir.examples, "bar.c")``
.. admonition:: Library packages should build stand-alone tests
Library developers will want to build the associated tests
against their **installed** libraries before running them.
.. note::
While source and input files are generally recommended, binaries
**may** also be cached by the build process. Only you, as the package
writer or maintainer, know whether these files would be appropriate
for testing the installed software weeks to months later.
.. note::
If one or more of the copied files needs to be modified to reference
the installed software, it is recommended that those changes be made
to the cached files **once** in the ``copy_test_sources`` method and
***after** the call to ``cache_extra_test_sources()``. This will
reduce the amount of unnecessary work in the test method **and** avoid
problems testing in shared instances and facility deployments.
The ``filter_file`` function can be quite useful for such changes.
See :ref:`file manipulation <file-manipulation>`.
.. tip::
If you want to see more examples from packages that cache build files, run
``spack pkg grep cache_extra_test_sources | sed "s/\/package.py.*//g" | sort -u``
from the command line to get a list of the packages.
.. _cache_custom_files:
@@ -5605,8 +5741,9 @@ the copy of each entry listed in ``srcs``, respectively:
Adding custom files
"""""""""""""""""""
In some cases it can be useful to have files that can be used to build or
check the results of tests. Examples include:
Sometimes it is helpful or necessary to include custom files for building and
or checking the results of tests as part of the package. Examples of the types
of files that might be useful are:
- test source files
- test input files
@@ -5614,17 +5751,15 @@ check the results of tests. Examples include:
- expected test outputs
While obtaining such files from the software repository is preferred (see
:ref:`adding build-time files <cache_extra_test_sources>`), there are
circumstances where that is not feasible (e.g., the software is not being
actively maintained). When test files can't be obtained from the repository
or as a supplement to files that can, Spack supports the inclusion of
additional files under the ``test`` subdirectory of the package in the
Spack repository.
:ref:`cache_extra_test_sources`), there are circumstances where doing so is not
feasible such as when the software is not being actively maintained. When test
files cannot be obtained from the repository or there is a need to supplement
files that can, Spack supports the inclusion of additional files under the
``test`` subdirectory of the package in the Spack repository.
Spack **automatically copies** the contents of that directory to the
test staging directory prior to running stand-alone tests. Test methods
access those files using the ``self.test_suite.current_test_data_dir``
property as shown below.
The following example assumes a ``custom-example.c`` is saved in ``MyLibary``
package's ``test`` subdirectory. It also assumes the program simply needs to
be compiled and linked against the installed ``MyLibrary`` software.
.. code-block:: python
@@ -5634,17 +5769,29 @@ property as shown below.
test_requires_compiler = True
...
def test_example(self):
def test_custom_example(self):
"""build and run custom-example"""
data_dir = self.test_suite.current_test_data_dir
src_dir = self.test_suite.current_test_data_dir
exe = "custom-example"
src = datadir.join(f"{exe}.cpp")
...
# TODO: Build custom-example using src and exe
...
custom_example = which(exe)
custom_example()
with working_dir(src_dir):
cc = which(os.environ["CC"])
cc(
f"-L{self.prefix.lib}",
f"-I{self.prefix.include}",
f"{exe}.cpp",
"-o", exe
)
custom_example = Executable(exe)
custom_example()
In this case, ``spack test run`` for the package results in Spack copying
the contents of the ``test`` subdirectory to the test stage directory path
in ``self.test_suite.current_test_data_dir`` before calling
``test_custom_example``. Use of the ``working_dir`` context manager
ensures the commands to build and run the program are performed from
within the appropriate subdirectory of the test stage.
.. _expected_test_output_from_file:
@@ -5653,9 +5800,8 @@ Reading expected output from a file
"""""""""""""""""""""""""""""""""""
The helper function ``get_escaped_text_output`` is available for packages
to retrieve and properly format the text from a file that contains the
expected output from running an executable that may contain special
characters.
to retrieve properly formatted text from a file potentially containing
special characters.
The signature for ``get_escaped_text_output`` is:
@@ -5665,10 +5811,13 @@ The signature for ``get_escaped_text_output`` is:
where ``filename`` is the path to the file containing the expected output.
The ``filename`` for a :ref:`custom file <cache_custom_files>` can be
accessed by tests using the ``self.test_suite.current_test_data_dir``
property. The example below illustrates how to read a file that was
added to the package's ``test`` subdirectory.
The path provided to ``filename`` for one of the copied custom files
(:ref:`custom file <cache_custom_files>`) is in the path rooted at
``self.test_suite.current_test_data_dir``.
The example below shows how to reference both the custom database
(``packages.db``) and expected output (``dump.out``) files Spack copies
to the test stage:
.. code-block:: python
@@ -5690,8 +5839,9 @@ added to the package's ``test`` subdirectory.
for exp in expected:
assert re.search(exp, out), f"Expected '{exp}' in output"
If the file was instead copied from the ``tests`` subdirectory of the staged
source code, the path would be obtained as shown below.
If the files were instead cached from installing the software, the paths to the
two files would be found under the ``self.test_suite.current_test_cache_dir``
directory as shown below:
.. code-block:: python
@@ -5699,17 +5849,24 @@ source code, the path would be obtained as shown below.
"""check example table dump"""
test_cache_dir = self.test_suite.current_test_cache_dir
db_filename = test_cache_dir.join("packages.db")
..
expected = get_escaped_text_output(test_cache_dir.join("dump.out"))
...
Alternatively, if the file was copied to the ``share/tests`` subdirectory
as part of the installation process, the test could access the path as
follows:
Alternatively, if both files had been installed by the software into the
``share/tests`` subdirectory of the installation prefix, the paths to the
two files would be referenced as follows:
.. code-block:: python
def test_example(self):
"""check example table dump"""
db_filename = join_path(self.prefix.share.tests, "packages.db")
db_filename = self.prefix.share.tests.join("packages.db")
..
expected = get_escaped_text_output(
self.prefix.share.tests.join("dump.out")
)
...
.. _check_outputs:
@@ -5717,9 +5874,9 @@ follows:
Comparing expected to actual outputs
""""""""""""""""""""""""""""""""""""
The helper function ``check_outputs`` is available for packages to ensure
the expected outputs from running an executable are contained within the
actual outputs.
The ``check_outputs`` helper routine is available for packages to ensure
multiple expected outputs from running an executable are contained within
the actual outputs.
The signature for ``check_outputs`` is:
@@ -5745,11 +5902,17 @@ Invoking the method is the equivalent of:
if errors:
raise RuntimeError("\n ".join(errors))
.. tip::
If you want to see more examples from packages that use this helper, run
``spack pkg grep check_outputs | sed "s/\/package.py.*//g" | sort -u``
from the command line to get a list of the packages.
.. _accessing-files:
"""""""""""""""""""""""""""""""""""""""""
Accessing package- and test-related files
Finding package- and test-related files
"""""""""""""""""""""""""""""""""""""""""
You may need to access files from one or more locations when writing
@@ -5758,8 +5921,7 @@ include test source files or includes them but has no way to build the
executables using the installed headers and libraries. In these cases
you may need to reference the files relative to one or more root directory.
The table below lists relevant path properties and provides additional
examples of their use.
:ref:`Reading expected output <expected_test_output_from_file>` provides
examples of their use. See :ref:`expected_test_output_from_file` for
examples of accessing files saved from the software repository, package
repository, and installation.
@@ -5788,7 +5950,6 @@ repository, and installation.
- ``self.test_suite.current_test_data_dir``
- ``join_path(self.test_suite.current_test_data_dir, "hello.f90")``
.. _inheriting-tests:
""""""""""""""""""""""""""""
@@ -5831,7 +5992,7 @@ maintainers provide additional stand-alone tests customized to the package.
.. warning::
Any package that implements a test method with the same name as an
inherited method overrides the inherited method. If that is not the
inherited method will override the inherited method. If that is not the
goal and you are not explicitly calling and adding functionality to
the inherited method for the test, then make sure that all test methods
and embedded test parts have unique test names.
@@ -5996,6 +6157,8 @@ running:
This is already part of the boilerplate for packages created with
``spack create``.
.. _file-filtering:
^^^^^^^^^^^^^^^^^^^
Filtering functions
^^^^^^^^^^^^^^^^^^^

View File

@@ -253,17 +253,6 @@ can easily happen if it is not updated frequently, this behavior ensures that
spack has a way to know for certain about the status of any concrete spec on
the remote mirror, but can slow down pipeline generation significantly.
The ``--optimize`` argument is experimental and runs the generated pipeline
document through a series of optimization passes designed to reduce the size
of the generated file.
The ``--dependencies`` is also experimental and disables what in Gitlab is
referred to as DAG scheduling, internally using the ``dependencies`` keyword
rather than ``needs`` to list dependency jobs. The drawback of using this option
is that before any job can begin, all jobs in previous stages must first
complete. The benefit is that Gitlab allows more dependencies to be listed
when using ``dependencies`` instead of ``needs``.
The optional ``--output-file`` argument should be an absolute path (including
file name) to the generated pipeline, and if not given, the default is
``./.gitlab-ci.yml``.

View File

@@ -1,13 +1,13 @@
sphinx==7.2.6
sphinx==7.4.7
sphinxcontrib-programoutput==0.17
sphinx_design==0.5.0
sphinx_design==0.6.1
sphinx-rtd-theme==2.0.0
python-levenshtein==0.25.1
docutils==0.20.1
pygments==2.18.0
urllib3==2.2.1
pytest==8.2.1
urllib3==2.2.2
pytest==8.3.2
isort==5.13.2
black==24.4.2
flake8==7.0.0
mypy==1.10.0
black==24.8.0
flake8==7.1.1
mypy==1.11.1

96
lib/spack/env/cc vendored
View File

@@ -174,6 +174,46 @@ preextend() {
unset IFS
}
execute() {
# dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args
if [ -n "${SPACK_TEST_COMMAND=}" ]; then
case "$SPACK_TEST_COMMAND" in
dump-args)
IFS="$lsep"
for arg in $full_command_list; do
echo "$arg"
done
unset IFS
exit
;;
dump-env-*)
var=${SPACK_TEST_COMMAND#dump-env-}
eval "printf '%s\n' \"\$0: \$var: \$$var\""
;;
*)
die "Unknown test command: '$SPACK_TEST_COMMAND'"
;;
esac
fi
#
# Write the input and output commands to debug logs if it's asked for.
#
if [ "$SPACK_DEBUG" = TRUE ]; then
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
echo "[$mode] $command $input_command" >> "$input_log"
IFS="$lsep"
echo "[$mode] "$full_command_list >> "$output_log"
unset IFS
fi
# Execute the full command, preserving spaces with IFS set
# to the alarm bell separator.
IFS="$lsep"; exec $full_command_list
exit
}
# Fail with a clear message if the input contains any bell characters.
if eval "[ \"\${*#*${lsep}}\" != \"\$*\" ]"; then
die "Compiler command line contains our separator ('${lsep}'). Cannot parse."
@@ -231,12 +271,17 @@ fi
# ld link
# ccld compile & link
# Note. SPACK_ALWAYS_XFLAGS are applied for all compiler invocations,
# including version checks (SPACK_XFLAGS variants are not applied
# for version checks).
command="${0##*/}"
comp="CC"
vcheck_flags=""
case "$command" in
cpp)
mode=cpp
debug_flags="-g"
vcheck_flags="${SPACK_ALWAYS_CPPFLAGS}"
;;
cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc|amdclang|cl.exe|craycc)
command="$SPACK_CC"
@@ -244,6 +289,7 @@ case "$command" in
comp="CC"
lang_flags=C
debug_flags="-g"
vcheck_flags="${SPACK_ALWAYS_CFLAGS}"
;;
c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
command="$SPACK_CXX"
@@ -251,6 +297,7 @@ case "$command" in
comp="CXX"
lang_flags=CXX
debug_flags="-g"
vcheck_flags="${SPACK_ALWAYS_CXXFLAGS}"
;;
ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt|amdflang|crayftn)
command="$SPACK_FC"
@@ -258,6 +305,7 @@ case "$command" in
comp="FC"
lang_flags=F
debug_flags="-g"
vcheck_flags="${SPACK_ALWAYS_FFLAGS}"
;;
f77|xlf|xlf_r|pgf77)
command="$SPACK_F77"
@@ -265,6 +313,7 @@ case "$command" in
comp="F77"
lang_flags=F
debug_flags="-g"
vcheck_flags="${SPACK_ALWAYS_FFLAGS}"
;;
ld|ld.gold|ld.lld)
mode=ld
@@ -365,7 +414,11 @@ unset IFS
export PATH="$new_dirs"
if [ "$mode" = vcheck ]; then
exec "${command}" "$@"
full_command_list="$command"
args="$@"
extend full_command_list vcheck_flags
extend full_command_list args
execute
fi
# Darwin's linker has a -r argument that merges object files together.
@@ -722,6 +775,7 @@ case "$mode" in
cc|ccld)
case $lang_flags in
F)
extend spack_flags_list SPACK_ALWAYS_FFLAGS
extend spack_flags_list SPACK_FFLAGS
;;
esac
@@ -731,6 +785,7 @@ esac
# C preprocessor flags come before any C/CXX flags
case "$mode" in
cpp|as|cc|ccld)
extend spack_flags_list SPACK_ALWAYS_CPPFLAGS
extend spack_flags_list SPACK_CPPFLAGS
;;
esac
@@ -741,9 +796,11 @@ case "$mode" in
cc|ccld)
case $lang_flags in
C)
extend spack_flags_list SPACK_ALWAYS_CFLAGS
extend spack_flags_list SPACK_CFLAGS
;;
CXX)
extend spack_flags_list SPACK_ALWAYS_CXXFLAGS
extend spack_flags_list SPACK_CXXFLAGS
;;
esac
@@ -933,39 +990,4 @@ if [ -n "$SPACK_CCACHE_BINARY" ]; then
esac
fi
# dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args
if [ -n "${SPACK_TEST_COMMAND=}" ]; then
case "$SPACK_TEST_COMMAND" in
dump-args)
IFS="$lsep"
for arg in $full_command_list; do
echo "$arg"
done
unset IFS
exit
;;
dump-env-*)
var=${SPACK_TEST_COMMAND#dump-env-}
eval "printf '%s\n' \"\$0: \$var: \$$var\""
;;
*)
die "Unknown test command: '$SPACK_TEST_COMMAND'"
;;
esac
fi
#
# Write the input and output commands to debug logs if it's asked for.
#
if [ "$SPACK_DEBUG" = TRUE ]; then
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
echo "[$mode] $command $input_command" >> "$input_log"
IFS="$lsep"
echo "[$mode] "$full_command_list >> "$output_log"
unset IFS
fi
# Execute the full command, preserving spaces with IFS set
# to the alarm bell separator.
IFS="$lsep"; exec $full_command_list
execute

View File

@@ -33,8 +33,23 @@
pass
esc, bell, lbracket, bslash, newline = r"\x1b", r"\x07", r"\[", r"\\", r"\n"
# Ansi Control Sequence Introducers (CSI) are a well-defined format
# Standard ECMA-48: Control Functions for Character-Imaging I/O Devices, section 5.4
# https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf
csi_pre = f"{esc}{lbracket}"
csi_param, csi_inter, csi_post = r"[0-?]", r"[ -/]", r"[@-~]"
ansi_csi = f"{csi_pre}{csi_param}*{csi_inter}*{csi_post}"
# General ansi escape sequences have well-defined prefixes,
# but content and suffixes are less reliable.
# Conservatively assume they end with either "<ESC>\" or "<BELL>",
# with no intervening "<ESC>"/"<BELL>" keys or newlines
esc_pre = f"{esc}[@-_]"
esc_content = f"[^{esc}{bell}{newline}]"
esc_post = f"(?:{esc}{bslash}|{bell})"
ansi_esc = f"{esc_pre}{esc_content}*{esc_post}"
# Use this to strip escape sequences
_escape = re.compile(r"\x1b[^m]*m|\x1b\[?1034h|\x1b\][0-9]+;[^\x07]*\x07")
_escape = re.compile(f"{ansi_csi}|{ansi_esc}")
# control characters for enabling/disabling echo
#

View File

@@ -351,6 +351,22 @@ def _wrongly_named_spec(error_cls):
return errors
@config_packages
def _ensure_all_virtual_packages_have_default_providers(error_cls):
"""All virtual packages must have a default provider explicitly set."""
configuration = spack.config.create()
defaults = configuration.get("packages", scope="defaults")
default_providers = defaults["all"]["providers"]
virtuals = spack.repo.PATH.provider_index.providers
default_providers_filename = configuration.scopes["defaults"].get_section_filename("packages")
return [
error_cls(f"'{virtual}' must have a default provider in {default_providers_filename}", [])
for virtual in virtuals
if virtual not in default_providers
]
def _make_config_error(config_data, summary, error_cls):
s = io.StringIO()
s.write("Occurring in the following file:\n")
@@ -791,7 +807,7 @@ def check_virtual_with_variants(spec, msg):
return
error = error_cls(
f"{pkg_name}: {msg}",
f"remove variants from '{spec}' in depends_on directive in {filename}",
[f"remove variants from '{spec}' in depends_on directive in {filename}"],
)
errors.append(error)

View File

@@ -129,10 +129,10 @@ def _bootstrap_config_scopes() -> Sequence["spack.config.ConfigScope"]:
configuration_paths = (spack.config.CONFIGURATION_DEFAULTS_PATH, ("bootstrap", _config_path()))
for name, path in configuration_paths:
platform = spack.platforms.host().name
platform_scope = spack.config.ConfigScope(
"/".join([name, platform]), os.path.join(path, platform)
platform_scope = spack.config.DirectoryConfigScope(
f"{name}/{platform}", os.path.join(path, platform)
)
generic_scope = spack.config.ConfigScope(name, path)
generic_scope = spack.config.DirectoryConfigScope(name, path)
config_scopes.extend([generic_scope, platform_scope])
msg = "[BOOTSTRAP CONFIG SCOPE] name={0}, path={1}"
tty.debug(msg.format(generic_scope.name, generic_scope.path))

View File

@@ -72,6 +72,7 @@
import spack.store
import spack.subprocess_context
import spack.user_environment
import spack.util.executable
import spack.util.path
import spack.util.pattern
from spack import traverse
@@ -458,10 +459,7 @@ def set_wrapper_variables(pkg, env):
# Find ccache binary and hand it to build environment
if spack.config.get("config:ccache"):
ccache = Executable("ccache")
if not ccache:
raise RuntimeError("No ccache binary found in PATH")
env.set(SPACK_CCACHE_BINARY, ccache)
env.set(SPACK_CCACHE_BINARY, spack.util.executable.which_string("ccache", required=True))
# Gather information about various types of dependencies
link_deps = set(pkg.spec.traverse(root=False, deptype=("link")))
@@ -740,7 +738,9 @@ def get_rpaths(pkg):
# Second module is our compiler mod name. We use that to get rpaths from
# module show output.
if pkg.compiler.modules and len(pkg.compiler.modules) > 1:
rpaths.append(path_from_modules([pkg.compiler.modules[1]]))
mod_rpath = path_from_modules([pkg.compiler.modules[1]])
if mod_rpath:
rpaths.append(mod_rpath)
return list(dedupe(filter_system_paths(rpaths)))
@@ -1473,7 +1473,7 @@ def long_message(self):
out.write(" {0}\n".format(self.log_name))
# Also output the test log path IF it exists
if self.context != "test":
if self.context != "test" and have_log:
test_log = join_path(os.path.dirname(self.log_name), spack_install_test_log)
if os.path.isfile(test_log):
out.write("\nSee test log for details:\n")

View File

@@ -162,7 +162,9 @@ def initconfig_compiler_entries(self):
ld_flags = " ".join(flags["ldflags"])
ld_format_string = "CMAKE_{0}_LINKER_FLAGS"
# CMake has separate linker arguments for types of builds.
for ld_type in ["EXE", "MODULE", "SHARED", "STATIC"]:
# 'ldflags' should not be used with CMAKE_STATIC_LINKER_FLAGS which
# is used by the archiver, so don't include "STATIC" in this loop:
for ld_type in ["EXE", "MODULE", "SHARED"]:
ld_string = ld_format_string.format(ld_type)
entries.append(cmake_cache_string(ld_string, ld_flags))

View File

@@ -124,6 +124,8 @@ def cuda_flags(arch_list):
# minimum supported versions
conflicts("%gcc@:4", when="+cuda ^cuda@11.0:")
conflicts("%gcc@:5", when="+cuda ^cuda@11.4:")
conflicts("%gcc@:7.2", when="+cuda ^cuda@12.4:")
conflicts("%clang@:6", when="+cuda ^cuda@12.2:")
# maximum supported version
# NOTE:
@@ -136,14 +138,14 @@ def cuda_flags(arch_list):
conflicts("%gcc@11.2:", when="+cuda ^cuda@:11.5")
conflicts("%gcc@12:", when="+cuda ^cuda@:11.8")
conflicts("%gcc@13:", when="+cuda ^cuda@:12.3")
conflicts("%gcc@14:", when="+cuda ^cuda@:12.4")
conflicts("%gcc@14:", when="+cuda ^cuda@:12.5")
conflicts("%clang@12:", when="+cuda ^cuda@:11.4.0")
conflicts("%clang@13:", when="+cuda ^cuda@:11.5")
conflicts("%clang@14:", when="+cuda ^cuda@:11.7")
conflicts("%clang@15:", when="+cuda ^cuda@:12.0")
conflicts("%clang@16:", when="+cuda ^cuda@:12.1")
conflicts("%clang@17:", when="+cuda ^cuda@:12.3")
conflicts("%clang@18:", when="+cuda ^cuda@:12.4")
conflicts("%clang@18:", when="+cuda ^cuda@:12.5")
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0")
@@ -211,12 +213,16 @@ def cuda_flags(arch_list):
conflicts("%intel@19.0:", when="+cuda ^cuda@:10.0")
conflicts("%intel@19.1:", when="+cuda ^cuda@:10.1")
conflicts("%intel@19.2:", when="+cuda ^cuda@:11.1.0")
conflicts("%intel@2021:", when="+cuda ^cuda@:11.4.0")
# XL is mostly relevant for ppc64le Linux
conflicts("%xl@:12,14:", when="+cuda ^cuda@:9.1")
conflicts("%xl@:12,14:15,17:", when="+cuda ^cuda@9.2")
conflicts("%xl@:12,17:", when="+cuda ^cuda@:11.1.0")
# PowerPC.
conflicts("target=ppc64le", when="+cuda ^cuda@12.5:")
# Darwin.
# TODO: add missing conflicts for %apple-clang cuda@:10
conflicts("platform=darwin", when="+cuda ^cuda@11.0.2: ")
conflicts("platform=darwin", when="+cuda ^cuda@11.0.2:")

View File

@@ -72,7 +72,7 @@ def build_directory(self):
def build_args(self):
"""Arguments for ``go build``."""
# Pass ldflags -s = --strip-all and -w = --no-warnings by default
return ["-ldflags", "-s -w", "-o", f"{self.pkg.name}"]
return ["-modcacherw", "-ldflags", "-s -w", "-o", f"{self.pkg.name}"]
@property
def check_args(self):

View File

@@ -139,6 +139,10 @@ def configure(self, pkg, spec, prefix):
args = ["--verbose", "--target-dir", inspect.getmodule(self.pkg).python_platlib]
args.extend(self.configure_args())
# https://github.com/Python-SIP/sip/commit/cb0be6cb6e9b756b8b0db3136efb014f6fb9b766
if spec["py-sip"].satisfies("@6.1.0:"):
args.extend(["--scripts-dir", pkg.prefix.bin])
sip_build = Executable(spec["py-sip"].prefix.bin.join("sip-build"))
sip_build(*args)

View File

@@ -34,6 +34,8 @@ def _misc_cache():
return spack.util.file_cache.FileCache(path)
FileCacheType = Union[spack.util.file_cache.FileCache, llnl.util.lang.Singleton]
#: Spack's cache for small data
MISC_CACHE: Union[spack.util.file_cache.FileCache, llnl.util.lang.Singleton] = (
llnl.util.lang.Singleton(_misc_cache)

View File

@@ -22,6 +22,8 @@
from urllib.parse import urlencode
from urllib.request import HTTPHandler, Request, build_opener
import ruamel.yaml
import llnl.util.filesystem as fs
import llnl.util.tty as tty
from llnl.util.lang import memoized
@@ -69,7 +71,7 @@
# TODO: Remove this in Spack 0.23
SHARED_PR_MIRROR_URL = "s3://spack-binaries-prs/shared_pr_mirror"
JOB_NAME_FORMAT = (
"{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{arch=architecture}"
"{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{ arch=architecture}"
)
IS_WINDOWS = sys.platform == "win32"
spack_gpg = spack.main.SpackCommand("gpg")
@@ -551,10 +553,9 @@ def generate_gitlab_ci_yaml(
env,
print_summary,
output_file,
*,
prune_dag=False,
check_index_only=False,
run_optimizer=False,
use_dependencies=False,
artifacts_root=None,
remote_mirror_override=None,
):
@@ -575,12 +576,6 @@ def generate_gitlab_ci_yaml(
this mode results in faster yaml generation time). Otherwise, also
check each spec directly by url (useful if there is no index or it
might be out of date).
run_optimizer (bool): If True, post-process the generated yaml to try
try to reduce the size (attempts to collect repeated configuration
and replace with definitions).)
use_dependencies (bool): If true, use "dependencies" rather than "needs"
("needs" allows DAG scheduling). Useful if gitlab instance cannot
be configured to handle more than a few "needs" per job.
artifacts_root (str): Path where artifacts like logs, environment
files (spack.yaml, spack.lock), etc should be written. GitLab
requires this to be within the project directory.
@@ -814,7 +809,8 @@ def ensure_expected_target_path(path):
cli_scopes = [
os.path.relpath(s.path, concrete_env_dir)
for s in cfg.scopes().values()
if isinstance(s, cfg.ImmutableConfigScope)
if not s.writable
and isinstance(s, (cfg.DirectoryConfigScope))
and s.path not in env_includes
and os.path.exists(s.path)
]
@@ -1271,17 +1267,6 @@ def main_script_replacements(cmd):
with open(copy_specs_file, "w") as fd:
fd.write(json.dumps(buildcache_copies))
# TODO(opadron): remove this or refactor
if run_optimizer:
import spack.ci_optimization as ci_opt
output_object = ci_opt.optimizer(output_object)
# TODO(opadron): remove this or refactor
if use_dependencies:
import spack.ci_needs_workaround as cinw
output_object = cinw.needs_to_dependencies(output_object)
else:
# No jobs were generated
noop_job = spack_ci_ir["jobs"]["noop"]["attributes"]
@@ -1310,8 +1295,11 @@ def main_script_replacements(cmd):
if not rebuild_everything:
sys.exit(1)
with open(output_file, "w") as outf:
outf.write(syaml.dump(sorted_output, default_flow_style=True))
# Minimize yaml output size through use of anchors
syaml.anchorify(sorted_output)
with open(output_file, "w") as f:
ruamel.yaml.YAML().dump(sorted_output, f)
def _url_encode_string(input_string):

View File

@@ -1,34 +0,0 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections.abc
get_job_name = lambda needs_entry: (
needs_entry.get("job")
if (isinstance(needs_entry, collections.abc.Mapping) and needs_entry.get("artifacts", True))
else needs_entry if isinstance(needs_entry, str) else None
)
def convert_job(job_entry):
if not isinstance(job_entry, collections.abc.Mapping):
return job_entry
needs = job_entry.get("needs")
if needs is None:
return job_entry
new_job = {}
new_job.update(job_entry)
del new_job["needs"]
new_job["dependencies"] = list(
filter((lambda x: x is not None), (get_job_name(needs_entry) for needs_entry in needs))
)
return new_job
def needs_to_dependencies(yaml):
return dict((k, convert_job(v)) for k, v in yaml.items())

View File

@@ -1,363 +0,0 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
import collections.abc
import copy
import hashlib
import spack.util.spack_yaml as syaml
def sort_yaml_obj(obj):
if isinstance(obj, collections.abc.Mapping):
return syaml.syaml_dict(
(k, sort_yaml_obj(v)) for k, v in sorted(obj.items(), key=(lambda item: str(item[0])))
)
if isinstance(obj, collections.abc.Sequence) and not isinstance(obj, str):
return syaml.syaml_list(sort_yaml_obj(x) for x in obj)
return obj
def matches(obj, proto):
"""Returns True if the test object "obj" matches the prototype object
"proto".
If obj and proto are mappings, obj matches proto if (key in obj) and
(obj[key] matches proto[key]) for every key in proto.
If obj and proto are sequences, obj matches proto if they are of the same
length and (a matches b) for every (a,b) in zip(obj, proto).
Otherwise, obj matches proto if obj == proto.
Precondition: proto must not have any reference cycles
"""
if isinstance(obj, collections.abc.Mapping):
if not isinstance(proto, collections.abc.Mapping):
return False
return all((key in obj and matches(obj[key], val)) for key, val in proto.items())
if isinstance(obj, collections.abc.Sequence) and not isinstance(obj, str):
if not (isinstance(proto, collections.abc.Sequence) and not isinstance(proto, str)):
return False
if len(obj) != len(proto):
return False
return all(matches(obj[index], val) for index, val in enumerate(proto))
return obj == proto
def subkeys(obj, proto):
"""Returns the test mapping "obj" after factoring out the items it has in
common with the prototype mapping "proto".
Consider a recursive merge operation, merge(a, b) on mappings a and b, that
returns a mapping, m, whose keys are the union of the keys of a and b, and
for every such key, "k", its corresponding value is:
- merge(a[key], b[key]) if a[key] and b[key] are mappings, or
- b[key] if (key in b) and not matches(a[key], b[key]),
or
- a[key] otherwise
If obj and proto are mappings, the returned object is the smallest object,
"a", such that merge(a, proto) matches obj.
Otherwise, obj is returned.
"""
if not (
isinstance(obj, collections.abc.Mapping) and isinstance(proto, collections.abc.Mapping)
):
return obj
new_obj = {}
for key, value in obj.items():
if key not in proto:
new_obj[key] = value
continue
if matches(value, proto[key]) and matches(proto[key], value):
continue
if isinstance(value, collections.abc.Mapping):
new_obj[key] = subkeys(value, proto[key])
continue
new_obj[key] = value
return new_obj
def add_extends(yaml, key):
"""Modifies the given object "yaml" so that it includes an "extends" key
whose value features "key".
If "extends" is not in yaml, then yaml is modified such that
yaml["extends"] == key.
If yaml["extends"] is a str, then yaml is modified such that
yaml["extends"] == [yaml["extends"], key]
If yaml["extends"] is a list that does not include key, then key is
appended to the list.
Otherwise, yaml is left unchanged.
"""
has_key = "extends" in yaml
extends = yaml.get("extends")
if has_key and not isinstance(extends, (str, collections.abc.Sequence)):
return
if extends is None:
yaml["extends"] = key
return
if isinstance(extends, str):
if extends != key:
yaml["extends"] = [extends, key]
return
if key not in extends:
extends.append(key)
def common_subobject(yaml, sub):
"""Factor prototype object "sub" out of the values of mapping "yaml".
Consider a modified copy of yaml, "new", where for each key, "key" in yaml:
- If yaml[key] matches sub, then new[key] = subkeys(yaml[key], sub).
- Otherwise, new[key] = yaml[key].
If the above match criteria is not satisfied for any such key, then (yaml,
None) is returned. The yaml object is returned unchanged.
Otherwise, each matching value in new is modified as in
add_extends(new[key], common_key), and then new[common_key] is set to sub.
The common_key value is chosen such that it does not match any preexisting
key in new. In this case, (new, common_key) is returned.
"""
match_list = set(k for k, v in yaml.items() if matches(v, sub))
if not match_list:
return yaml, None
common_prefix = ".c"
common_index = 0
while True:
common_key = "".join((common_prefix, str(common_index)))
if common_key not in yaml:
break
common_index += 1
new_yaml = {}
for key, val in yaml.items():
new_yaml[key] = copy.deepcopy(val)
if not matches(val, sub):
continue
new_yaml[key] = subkeys(new_yaml[key], sub)
add_extends(new_yaml[key], common_key)
new_yaml[common_key] = sub
return new_yaml, common_key
def print_delta(name, old, new, applied=None):
delta = new - old
reldelta = (1000 * delta) // old
reldelta = (reldelta // 10, reldelta % 10)
if applied is None:
applied = new <= old
print(
"\n".join(
(
"{0} {1}:",
" before: {2: 10d}",
" after : {3: 10d}",
" delta : {4:+10d} ({5:=+3d}.{6}%)",
)
).format(name, ("+" if applied else "x"), old, new, delta, reldelta[0], reldelta[1])
)
def try_optimization_pass(name, yaml, optimization_pass, *args, **kwargs):
"""Try applying an optimization pass and return information about the
result
"name" is a string describing the nature of the pass. If it is a non-empty
string, summary statistics are also printed to stdout.
"yaml" is the object to apply the pass to.
"optimization_pass" is the function implementing the pass to be applied.
"args" and "kwargs" are the additional arguments to pass to optimization
pass. The pass is applied as
>>> (new_yaml, *other_results) = optimization_pass(yaml, *args, **kwargs)
The pass's results are greedily rejected if it does not modify the original
yaml document, or if it produces a yaml document that serializes to a
larger string.
Returns (new_yaml, yaml, applied, other_results) if applied, or
(yaml, new_yaml, applied, other_results) otherwise.
"""
result = optimization_pass(yaml, *args, **kwargs)
new_yaml, other_results = result[0], result[1:]
if new_yaml is yaml:
# pass was not applied
return (yaml, new_yaml, False, other_results)
pre_size = len(syaml.dump_config(sort_yaml_obj(yaml), default_flow_style=True))
post_size = len(syaml.dump_config(sort_yaml_obj(new_yaml), default_flow_style=True))
# pass makes the size worse: not applying
applied = post_size <= pre_size
if applied:
yaml, new_yaml = new_yaml, yaml
if name:
print_delta(name, pre_size, post_size, applied)
return (yaml, new_yaml, applied, other_results)
def build_histogram(iterator, key):
"""Builds a histogram of values given an iterable of mappings and a key.
For each mapping "m" with key "key" in iterator, the value m[key] is
considered.
Returns a list of tuples (hash, count, proportion, value), where
- "hash" is a sha1sum hash of the value.
- "count" is the number of occurences of values that hash to "hash".
- "proportion" is the proportion of all values considered above that
hash to "hash".
- "value" is one of the values considered above that hash to "hash".
Which value is chosen when multiple values hash to the same "hash" is
undefined.
The list is sorted in descending order by count, yielding the most
frequently occuring hashes first.
"""
buckets = collections.defaultdict(int)
values = {}
num_objects = 0
for obj in iterator:
num_objects += 1
try:
val = obj[key]
except (KeyError, TypeError):
continue
value_hash = hashlib.sha1()
value_hash.update(syaml.dump_config(sort_yaml_obj(val)).encode())
value_hash = value_hash.hexdigest()
buckets[value_hash] += 1
values[value_hash] = val
return [
(h, buckets[h], float(buckets[h]) / num_objects, values[h])
for h in sorted(buckets.keys(), key=lambda k: -buckets[k])
]
def optimizer(yaml):
original_size = len(syaml.dump_config(sort_yaml_obj(yaml), default_flow_style=True))
# try factoring out commonly repeated portions
common_job = {
"variables": {"SPACK_COMPILER_ACTION": "NONE"},
"after_script": ['rm -rf "./spack"'],
"artifacts": {"paths": ["jobs_scratch_dir", "cdash_report"], "when": "always"},
}
# look for a list of tags that appear frequently
_, count, proportion, tags = next(iter(build_histogram(yaml.values(), "tags")), (None,) * 4)
# If a list of tags is found, and there are more than one job that uses it,
# *and* the jobs that do use it represent at least 70% of all jobs, then
# add the list to the prototype object.
if tags and count > 1 and proportion >= 0.70:
common_job["tags"] = tags
# apply common object factorization
yaml, other, applied, rest = try_optimization_pass(
"general common object factorization", yaml, common_subobject, common_job
)
# look for a common script, and try factoring that out
_, count, proportion, script = next(
iter(build_histogram(yaml.values(), "script")), (None,) * 4
)
if script and count > 1 and proportion >= 0.70:
yaml, other, applied, rest = try_optimization_pass(
"script factorization", yaml, common_subobject, {"script": script}
)
# look for a common before_script, and try factoring that out
_, count, proportion, script = next(
iter(build_histogram(yaml.values(), "before_script")), (None,) * 4
)
if script and count > 1 and proportion >= 0.70:
yaml, other, applied, rest = try_optimization_pass(
"before_script factorization", yaml, common_subobject, {"before_script": script}
)
# Look specifically for the SPACK_ROOT_SPEC environment variables.
# Try to factor them out.
h = build_histogram(
(getattr(val, "get", lambda *args: {})("variables") for val in yaml.values()),
"SPACK_ROOT_SPEC",
)
# In this case, we try to factor out *all* instances of the SPACK_ROOT_SPEC
# environment variable; not just the one that appears with the greatest
# frequency. We only require that more than 1 job uses a given instance's
# value, because we expect the value to be very large, and so expect even
# few-to-one factorizations to yield large space savings.
counter = 0
for _, count, proportion, spec in h:
if count <= 1:
continue
counter += 1
yaml, other, applied, rest = try_optimization_pass(
"SPACK_ROOT_SPEC factorization ({count})".format(count=counter),
yaml,
common_subobject,
{"variables": {"SPACK_ROOT_SPEC": spec}},
)
new_size = len(syaml.dump_config(sort_yaml_obj(yaml), default_flow_style=True))
print("\n")
print_delta("overall summary", original_size, new_size)
print("\n")
return yaml

View File

@@ -237,7 +237,7 @@ def ensure_single_spec_or_die(spec, matching_specs):
if len(matching_specs) <= 1:
return
format_string = "{name}{@version}{%compiler.name}{@compiler.version}{arch=architecture}"
format_string = "{name}{@version}{%compiler.name}{@compiler.version}{ arch=architecture}"
args = ["%s matches multiple packages." % spec, "Matching packages:"]
args += [
colorize(" @K{%s} " % s.dag_hash(7)) + s.cformat(format_string) for s in matching_specs
@@ -336,6 +336,7 @@ def display_specs(specs, args=None, **kwargs):
groups (bool): display specs grouped by arch/compiler (default True)
decorator (typing.Callable): function to call to decorate specs
all_headers (bool): show headers even when arch/compiler aren't defined
status_fn (typing.Callable): if provided, prepend install-status info
output (typing.IO): A file object to write to. Default is ``sys.stdout``
"""
@@ -359,6 +360,7 @@ def get_arg(name, default=None):
groups = get_arg("groups", True)
all_headers = get_arg("all_headers", False)
output = get_arg("output", sys.stdout)
status_fn = get_arg("status_fn", None)
decorator = get_arg("decorator", None)
if decorator is None:
@@ -386,6 +388,13 @@ def get_arg(name, default=None):
def fmt(s, depth=0):
"""Formatter function for all output specs"""
string = ""
if status_fn:
# This was copied from spec.tree's colorization logic
# then shortened because it seems like status_fn should
# always return an InstallStatus
string += colorize(status_fn(s).value)
if hashes:
string += gray_hash(s, hlen) + " "
string += depth * " "
@@ -444,7 +453,7 @@ def format_list(specs):
def filter_loaded_specs(specs):
"""Filter a list of specs returning only those that are
currently loaded."""
hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(":")
hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(os.pathsep)
return [x for x in specs if x.dag_hash() in hashes]

View File

@@ -165,7 +165,7 @@ def _reset(args):
if not ok_to_continue:
raise RuntimeError("Aborting")
for scope in spack.config.CONFIG.file_scopes:
for scope in spack.config.CONFIG.writable_scopes:
# The default scope should stay untouched
if scope.name == "defaults":
continue

View File

@@ -70,12 +70,6 @@ def setup_parser(subparser: argparse.ArgumentParser):
push = subparsers.add_parser("push", aliases=["create"], help=push_fn.__doc__)
push.add_argument("-f", "--force", action="store_true", help="overwrite tarball if it exists")
push.add_argument(
"--allow-root",
"-a",
action="store_true",
help="allow install root string in binary files after RPATH substitution",
)
push_sign = push.add_mutually_exclusive_group(required=False)
push_sign.add_argument(
"--unsigned",
@@ -190,10 +184,6 @@ def setup_parser(subparser: argparse.ArgumentParser):
keys.add_argument("-f", "--force", action="store_true", help="force new download of keys")
keys.set_defaults(func=keys_fn)
preview = subparsers.add_parser("preview", help=preview_fn.__doc__)
arguments.add_common_arguments(preview, ["installed_specs"])
preview.set_defaults(func=preview_fn)
# Check if binaries need to be rebuilt on remote mirror
check = subparsers.add_parser("check", help=check_fn.__doc__)
check.add_argument(
@@ -404,11 +394,6 @@ def push_fn(args):
else:
roots = spack.cmd.require_active_env(cmd_name="buildcache push").concrete_roots()
if args.allow_root:
tty.warn(
"The flag `--allow-root` is the default in Spack 0.21, will be removed in Spack 0.22"
)
mirror: spack.mirror.Mirror = args.mirror
# Check if this is an OCI image.
@@ -960,14 +945,6 @@ def keys_fn(args):
bindist.get_keys(args.install, args.trust, args.force)
def preview_fn(args):
"""analyze an installed spec and reports whether executables and libraries are relocatable"""
tty.warn(
"`spack buildcache preview` is deprecated since `spack buildcache push --allow-root` is "
"now the default. This command will be removed in Spack 0.22"
)
def check_fn(args: argparse.Namespace):
"""check specs against remote binary mirror(s) to see if any need to be rebuilt

View File

@@ -6,6 +6,7 @@
import json
import os
import shutil
import warnings
from urllib.parse import urlparse, urlunparse
import llnl.util.filesystem as fs
@@ -73,7 +74,7 @@ def setup_parser(subparser):
"--optimize",
action="store_true",
default=False,
help="(experimental) optimize the gitlab yaml file for size\n\n"
help="(DEPRECATED) optimize the gitlab yaml file for size\n\n"
"run the generated document through a series of optimization passes "
"designed to reduce the size of the generated file",
)
@@ -81,7 +82,7 @@ def setup_parser(subparser):
"--dependencies",
action="store_true",
default=False,
help="(experimental) disable DAG scheduling (use 'plain' dependencies)",
help="(DEPRECATED) disable DAG scheduling (use 'plain' dependencies)",
)
generate.add_argument(
"--buildcache-destination",
@@ -200,6 +201,18 @@ def ci_generate(args):
before invoking this command. the value must be the CDash authorization token needed to create
a build group and register all generated jobs under it
"""
if args.optimize:
warnings.warn(
"The --optimize option has been deprecated, and currently has no effect. "
"It will be removed in Spack v0.24."
)
if args.dependencies:
warnings.warn(
"The --dependencies option has been deprecated, and currently has no effect. "
"It will be removed in Spack v0.24."
)
env = spack.cmd.require_active_env(cmd_name="ci generate")
if args.copy_to:
@@ -212,8 +225,6 @@ def ci_generate(args):
output_file = args.output_file
copy_yaml_to = args.copy_to
run_optimizer = args.optimize
use_dependencies = args.dependencies
prune_dag = args.prune_dag
index_only = args.index_only
artifacts_root = args.artifacts_root
@@ -234,8 +245,6 @@ def ci_generate(args):
output_file,
prune_dag=prune_dag,
check_index_only=index_only,
run_optimizer=run_optimizer,
use_dependencies=use_dependencies,
artifacts_root=artifacts_root,
remote_mirror_override=buildcache_destination,
)

View File

@@ -11,7 +11,6 @@
from argparse import ArgumentParser, Namespace
from typing import IO, Any, Callable, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union
import llnl.util.filesystem as fs
import llnl.util.tty as tty
from llnl.util.argparsewriter import ArgparseRstWriter, ArgparseWriter, Command
from llnl.util.tty.colify import colify
@@ -867,9 +866,6 @@ def _commands(parser: ArgumentParser, args: Namespace) -> None:
prepend_header(args, f)
formatter(args, f)
if args.update_completion:
fs.set_executable(args.update)
else:
prepend_header(args, sys.stdout)
formatter(args, sys.stdout)

View File

@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import llnl.util.tty as tty
from llnl.string import plural
import spack.cmd
import spack.cmd.common.arguments
import spack.environment as ev
@@ -43,5 +46,9 @@ def concretize(parser, args):
with env.write_transaction():
concretized_specs = env.concretize(force=args.force, tests=tests)
if not args.quiet:
ev.display_specs(concretized_specs)
if concretized_specs:
tty.msg(f"Concretized {plural(len(concretized_specs), 'spec')}:")
ev.display_specs([concrete for _, concrete in concretized_specs])
else:
tty.msg("No new specs to concretize.")
env.write()

View File

@@ -156,7 +156,7 @@ def print_flattened_configuration(*, blame: bool) -> None:
"""
env = ev.active_environment()
if env is not None:
pristine = env.manifest.pristine_yaml_content
pristine = env.manifest.yaml_content
flattened = pristine.copy()
flattened[spack.schema.env.TOP_LEVEL_KEY] = pristine[spack.schema.env.TOP_LEVEL_KEY].copy()
else:
@@ -264,7 +264,9 @@ def config_remove(args):
def _can_update_config_file(scope: spack.config.ConfigScope, cfg_file):
if isinstance(scope, spack.config.SingleFileScope):
return fs.can_access(cfg_file)
return fs.can_write_to_dir(scope.path) and fs.can_access(cfg_file)
elif isinstance(scope, spack.config.DirectoryConfigScope):
return fs.can_write_to_dir(scope.path) and fs.can_access(cfg_file)
return False
def _config_change_requires_scope(path, spec, scope, match_spec=None):
@@ -362,14 +364,11 @@ def config_change(args):
def config_update(args):
# Read the configuration files
spack.config.CONFIG.get_config(args.section, scope=args.scope)
updates: List[spack.config.ConfigScope] = list(
filter(
lambda s: not isinstance(
s, (spack.config.InternalConfigScope, spack.config.ImmutableConfigScope)
),
spack.config.CONFIG.format_updates[args.section],
)
)
updates: List[spack.config.ConfigScope] = [
x
for x in spack.config.CONFIG.format_updates[args.section]
if not isinstance(x, spack.config.InternalConfigScope) and x.writable
]
cannot_overwrite, skip_system_scope = [], False
for scope in updates:
@@ -447,7 +446,7 @@ def _can_revert_update(scope_dir, cfg_file, bkp_file):
def config_revert(args):
scopes = [args.scope] if args.scope else [x.name for x in spack.config.CONFIG.file_scopes]
scopes = [args.scope] if args.scope else [x.name for x in spack.config.CONFIG.writable_scopes]
# Search for backup files in the configuration scopes
Entry = collections.namedtuple("Entry", ["scope", "cfg", "bkp"])

View File

@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import re
import sys
@@ -934,7 +933,7 @@ def get_repository(args, name):
# Figure out where the new package should live
repo_path = args.repo
if repo_path is not None:
repo = spack.repo.Repo(repo_path)
repo = spack.repo.from_path(repo_path)
if spec.namespace and spec.namespace != repo.namespace:
tty.die(
"Can't create package with namespace {0} in repo with "
@@ -942,9 +941,7 @@ def get_repository(args, name):
)
else:
if spec.namespace:
repo = spack.repo.PATH.get_repo(spec.namespace, None)
if not repo:
tty.die("Unknown namespace: '{0}'".format(spec.namespace))
repo = spack.repo.PATH.get_repo(spec.namespace)
else:
repo = spack.repo.PATH.first_repo()

View File

@@ -47,16 +47,6 @@ def inverted_dependencies():
dependents of, e.g., `mpi`, but virtuals are not included as
actual dependents.
"""
dag = {}
for pkg_cls in spack.repo.PATH.all_package_classes():
dag.setdefault(pkg_cls.name, set())
for dep in pkg_cls.dependencies_by_name():
deps = [dep]
# expand virtuals if necessary
if spack.repo.PATH.is_virtual(dep):
deps += [s.name for s in spack.repo.PATH.providers_for(dep)]
dag = collections.defaultdict(set)
for pkg_cls in spack.repo.PATH.all_package_classes():
for _, deps_by_name in pkg_cls.dependencies.items():

View File

@@ -9,6 +9,8 @@
import spack.cmd
import spack.config
import spack.fetch_strategy
import spack.repo
import spack.spec
import spack.util.path
import spack.version
@@ -69,13 +71,15 @@ def _retrieve_develop_source(spec, abspath):
# We construct a package class ourselves, rather than asking for
# Spec.package, since Spec only allows this when it is concrete
package = pkg_cls(spec)
if isinstance(package.stage[0].fetcher, spack.fetch_strategy.GitFetchStrategy):
package.stage[0].fetcher.get_full_repo = True
source_stage = package.stage[0]
if isinstance(source_stage.fetcher, spack.fetch_strategy.GitFetchStrategy):
source_stage.fetcher.get_full_repo = True
# If we retrieved this version before and cached it, we may have
# done so without cloning the full git repo; likewise, any
# mirror might store an instance with truncated history.
package.stage[0].disable_mirrors()
source_stage.disable_mirrors()
source_stage.fetcher.set_package(package)
package.stage.steal_source(abspath)

View File

@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import errno
import glob
import os
@@ -11,43 +12,13 @@
import spack.cmd
import spack.paths
import spack.repo
from spack.spec import Spec
from spack.util.editor import editor
import spack.util.editor
description = "open package files in $EDITOR"
section = "packaging"
level = "short"
def edit_package(name, repo_path, namespace):
"""Opens the requested package file in your favorite $EDITOR.
Args:
name (str): The name of the package
repo_path (str): The path to the repository containing this package
namespace (str): A valid namespace registered with Spack
"""
# Find the location of the package
if repo_path:
repo = spack.repo.Repo(repo_path)
elif namespace:
repo = spack.repo.PATH.get_repo(namespace)
else:
repo = spack.repo.PATH
path = repo.filename_for_package_name(name)
spec = Spec(name)
if os.path.exists(path):
if not os.path.isfile(path):
tty.die("Something is wrong. '{0}' is not a file!".format(path))
if not os.access(path, os.R_OK):
tty.die("Insufficient permissions on '%s'!" % path)
else:
raise spack.repo.UnknownPackageError(spec.name)
editor(path)
def setup_parser(subparser):
excl_args = subparser.add_mutually_exclusive_group()
@@ -98,41 +69,67 @@ def setup_parser(subparser):
excl_args.add_argument("-r", "--repo", default=None, help="path to repo to edit package in")
excl_args.add_argument("-N", "--namespace", default=None, help="namespace of package to edit")
subparser.add_argument("package", nargs="?", default=None, help="package name")
subparser.add_argument("package", nargs="*", default=None, help="package name")
def locate_package(name: str, repo: spack.repo.Repo) -> str:
path = repo.filename_for_package_name(name)
try:
with open(path, "r"):
return path
except OSError as e:
if e.errno == errno.ENOENT:
raise spack.repo.UnknownPackageError(name) from e
tty.die(f"Cannot edit package: {e}")
def locate_file(name: str, path: str) -> str:
# convert command names to python module name
if path == spack.paths.command_path:
name = spack.cmd.python_name(name)
file_path = os.path.join(path, name)
# Try to open direct match.
try:
with open(file_path, "r"):
return file_path
except OSError as e:
if e.errno != errno.ENOENT:
tty.die(f"Cannot edit file: {e}")
pass
# Otherwise try to find a file that starts with the name
candidates = glob.glob(file_path + "*")
exclude_list = [".pyc", "~"] # exclude binaries and backups
files = [f for f in candidates if not any(f.endswith(ext) for ext in exclude_list)]
if len(files) > 1:
tty.die(
f"Multiple files start with `{name}`:\n"
+ "\n".join(f" {os.path.basename(f)}" for f in files)
)
elif not files:
tty.die(f"No file for '{name}' was found in {path}")
return files[0]
def edit(parser, args):
name = args.package
# By default, edit package files
path = spack.paths.packages_path
names = args.package
# If `--command`, `--test`, or `--module` is chosen, edit those instead
if args.path:
path = args.path
if name:
# convert command names to python module name
if path == spack.paths.command_path:
name = spack.cmd.python_name(name)
path = os.path.join(path, name)
if not os.path.exists(path):
files = glob.glob(path + "*")
exclude_list = [".pyc", "~"] # exclude binaries and backups
files = list(filter(lambda x: all(s not in x for s in exclude_list), files))
if len(files) > 1:
m = "Multiple files exist with the name {0}.".format(name)
m += " Please specify a suffix. Files are:\n\n"
for f in files:
m += " " + os.path.basename(f) + "\n"
tty.die(m)
if not files:
tty.die("No file for '{0}' was found in {1}".format(name, path))
path = files[0] # already confirmed only one entry in files
editor(path)
elif name:
edit_package(name, args.repo, args.namespace)
paths = [locate_file(name, args.path) for name in names] if names else [args.path]
spack.util.editor.editor(*paths)
elif names:
if args.repo:
repo = spack.repo.from_path(args.repo)
elif args.namespace:
repo = spack.repo.PATH.get_repo(args.namespace)
else:
repo = spack.repo.PATH
paths = [locate_package(name, repo) for name in names]
spack.util.editor.editor(*paths)
else:
# By default open the directory where packages live
editor(path)
spack.util.editor.editor(spack.paths.packages_path)

View File

@@ -7,7 +7,7 @@
import os
import re
import sys
from typing import List, Optional
from typing import List, Optional, Set
import llnl.util.tty as tty
import llnl.util.tty.colify as colify
@@ -19,6 +19,7 @@
import spack.detection
import spack.error
import spack.repo
import spack.spec
import spack.util.environment
from spack.cmd.common import arguments
@@ -138,14 +139,26 @@ def external_find(args):
candidate_packages, path_hints=args.path, max_workers=args.jobs
)
new_entries = spack.detection.update_configuration(
new_specs = spack.detection.update_configuration(
detected_packages, scope=args.scope, buildable=not args.not_buildable
)
if new_entries:
# If the user runs `spack external find --not-buildable mpich` we also mark `mpi` non-buildable
# to avoid that the concretizer picks a different mpi provider.
if new_specs and args.not_buildable:
virtuals: Set[str] = {
virtual.name
for new_spec in new_specs
for virtual_specs in spack.repo.PATH.get_pkg_class(new_spec.name).provided.values()
for virtual in virtual_specs
}
new_virtuals = spack.detection.set_virtuals_nonbuildable(virtuals, scope=args.scope)
new_specs.extend(spack.spec.Spec(name) for name in new_virtuals)
if new_specs:
path = spack.config.CONFIG.get_config_filename(args.scope, "packages")
msg = "The following specs have been detected on this system and added to {0}"
tty.msg(msg.format(path))
spack.cmd.display_specs(new_entries)
tty.msg(f"The following specs have been detected on this system and added to {path}")
spack.cmd.display_specs(new_specs)
else:
tty.msg("No new external packages detected")

View File

@@ -46,6 +46,10 @@ def setup_parser(subparser):
help="output specs as machine-readable json records",
)
subparser.add_argument(
"-I", "--install-status", action="store_true", help="show install status of packages"
)
subparser.add_argument(
"-d", "--deps", action="store_true", help="output dependencies along with found specs"
)
@@ -293,25 +297,24 @@ def root_decorator(spec, string):
)
print()
if args.show_concretized:
tty.msg("Concretized roots")
cmd.display_specs(env.specs_by_hash.values(), args, decorator=decorator)
print()
# Display a header for the installed packages section IF there are installed
# packages. If there aren't any, we'll just end up printing "0 installed packages"
# later.
if results and not args.only_roots:
tty.msg("Installed packages")
def find(parser, args):
q_args = query_arguments(args)
results = args.specs(**q_args)
env = ev.active_environment()
if not env and args.only_roots:
tty.die("-r / --only-roots requires an active environment")
if not env and args.show_concretized:
tty.die("-c / --show-concretized requires an active environment")
if env:
if args.constraint:
init_specs = spack.cmd.parse_specs(args.constraint)
results = env.all_matching_specs(*init_specs)
else:
results = env.all_specs()
else:
q_args = query_arguments(args)
results = args.specs(**q_args)
decorator = make_env_decorator(env) if env else lambda s, f: f
@@ -332,6 +335,11 @@ def find(parser, args):
if args.loaded:
results = spack.cmd.filter_loaded_specs(results)
if args.install_status or args.show_concretized:
status_fn = spack.spec.Spec.install_status
else:
status_fn = None
# Display the result
if args.json:
cmd.display_specs_as_json(results, deps=args.deps)
@@ -340,12 +348,34 @@ def find(parser, args):
if env:
display_env(env, args, decorator, results)
count_suffix = " (not shown)"
if not args.only_roots:
cmd.display_specs(results, args, decorator=decorator, all_headers=True)
count_suffix = ""
display_results = results
if not args.show_concretized:
display_results = list(x for x in results if x.installed)
cmd.display_specs(
display_results, args, decorator=decorator, all_headers=True, status_fn=status_fn
)
# print number of installed packages last (as the list may be long)
if sys.stdout.isatty() and args.groups:
installed_suffix = ""
concretized_suffix = " to be installed"
if args.only_roots:
installed_suffix += " (not shown)"
concretized_suffix += " (not shown)"
else:
if env and not args.show_concretized:
concretized_suffix += " (show with `spack find -c`)"
pkg_type = "loaded" if args.loaded else "installed"
spack.cmd.print_how_many_pkgs(results, pkg_type, suffix=count_suffix)
spack.cmd.print_how_many_pkgs(
list(x for x in results if x.installed), pkg_type, suffix=installed_suffix
)
if env:
spack.cmd.print_how_many_pkgs(
list(x for x in results if not x.installed),
"concretized",
suffix=concretized_suffix,
)

View File

@@ -56,7 +56,6 @@ def roots_from_environments(args, active_env):
# -e says "also preserve things needed by this particular env"
for env_name_or_dir in args.except_environment:
print("HMM", env_name_or_dir)
if ev.exists(env_name_or_dir):
env = ev.read(env_name_or_dir)
elif ev.is_env_dir(env_name_or_dir):

View File

@@ -10,6 +10,7 @@
from typing import List
import llnl.util.filesystem as fs
from llnl.string import plural
from llnl.util import lang, tty
import spack.build_environment
@@ -375,7 +376,9 @@ def _maybe_add_and_concretize(args, env, specs):
# `spack concretize`
tests = compute_tests_install_kwargs(env.user_specs, args.test)
concretized_specs = env.concretize(tests=tests)
ev.display_specs(concretized_specs)
if concretized_specs:
tty.msg(f"Concretized {plural(len(concretized_specs), 'spec')}")
ev.display_specs([concrete for _, concrete in concretized_specs])
# save view regeneration for later, so that we only do it
# once, as it can be slow.

View File

@@ -169,7 +169,9 @@ def pkg_hash(args):
def get_grep(required=False):
"""Get a grep command to use with ``spack pkg grep``."""
return exe.which(os.environ.get("SPACK_GREP") or "grep", required=required)
grep = exe.which(os.environ.get("SPACK_GREP") or "grep", required=required)
grep.ignore_quotes = True # allow `spack pkg grep '"quoted string"'` without warning
return grep
def pkg_grep(args, unknown_args):

View File

@@ -91,7 +91,7 @@ def repo_add(args):
tty.die("Not a Spack repository: %s" % path)
# Make sure it's actually a spack repository by constructing it.
repo = spack.repo.Repo(canon_path)
repo = spack.repo.from_path(canon_path)
# If that succeeds, finally add it to the configuration.
repos = spack.config.get("repos", scope=args.scope)
@@ -124,7 +124,7 @@ def repo_remove(args):
# If it is a namespace, remove corresponding repo
for path in repos:
try:
repo = spack.repo.Repo(path)
repo = spack.repo.from_path(path)
if repo.namespace == namespace_or_path:
repos.remove(path)
spack.config.set("repos", repos, args.scope)
@@ -142,7 +142,7 @@ def repo_list(args):
repos = []
for r in roots:
try:
repos.append(spack.repo.Repo(r))
repos.append(spack.repo.from_path(r))
except spack.repo.RepoError:
continue

View File

@@ -114,15 +114,16 @@ def _process_result(result, show, required_format, kwargs):
# dump the solutions as concretized specs
if "solutions" in show:
for spec in result.specs:
# With -y, just print YAML to output.
if required_format == "yaml":
# use write because to_yaml already has a newline.
sys.stdout.write(spec.to_yaml(hash=ht.dag_hash))
elif required_format == "json":
sys.stdout.write(spec.to_json(hash=ht.dag_hash))
else:
sys.stdout.write(spec.tree(color=sys.stdout.isatty(), **kwargs))
if required_format:
for spec in result.specs:
# With -y, just print YAML to output.
if required_format == "yaml":
# use write because to_yaml already has a newline.
sys.stdout.write(spec.to_yaml(hash=ht.dag_hash))
elif required_format == "json":
sys.stdout.write(spec.to_json(hash=ht.dag_hash))
else:
sys.stdout.write(spack.spec.tree(result.specs, color=sys.stdout.isatty(), **kwargs))
print()
if result.unsolved_specs and "solutions" in show:

View File

@@ -105,11 +105,19 @@ def spec(parser, args):
if env:
env.concretize()
specs = env.concretized_specs()
# environments are printed together in a combined tree() invocation,
# except when using --yaml or --json, which we print spec by spec below.
if not args.format:
tree_kwargs["key"] = spack.traverse.by_dag_hash
tree_kwargs["hashes"] = args.long or args.very_long
print(spack.spec.tree([concrete for _, concrete in specs], **tree_kwargs))
return
else:
tty.die("spack spec requires at least one spec or an active environment")
for input, output in specs:
# With -y, just print YAML to output.
# With --yaml or --json, just print the raw specs to output
if args.format:
if args.format == "yaml":
# use write because to_yaml already has a newline.

View File

@@ -71,7 +71,7 @@ def unload(parser, args):
"Cannot specify specs on command line when unloading all specs with '--all'"
)
hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(":")
hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(os.pathsep)
if args.specs:
specs = [
spack.cmd.disambiguate_spec_from_hashes(spec, hashes)

View File

@@ -339,7 +339,7 @@ def add(self, pkg_name, fetcher):
for pkg_cls in spack.repo.PATH.all_package_classes():
npkgs += 1
for v in pkg_cls.versions:
for v in list(pkg_cls.versions):
try:
pkg = pkg_cls(spack.spec.Spec(pkg_cls.name))
fetcher = fs.for_package_version(pkg, v)

View File

@@ -38,10 +38,10 @@
import spack.cmd
import spack.environment as ev
import spack.filesystem_view as fsv
import spack.schema.projections
import spack.store
from spack.config import validate
from spack.filesystem_view import YamlFilesystemView, view_func_parser
from spack.util import spack_yaml as s_yaml
description = "project packages to a compact naming scheme on the filesystem"
@@ -193,17 +193,13 @@ def view(parser, args):
ordered_projections = {}
# What method are we using for this view
if args.action in actions_link:
link_fn = view_func_parser(args.action)
else:
link_fn = view_func_parser("symlink")
view = YamlFilesystemView(
link_type = args.action if args.action in actions_link else "symlink"
view = fsv.YamlFilesystemView(
path,
spack.store.STORE.layout,
projections=ordered_projections,
ignore_conflicts=getattr(args, "ignore_conflicts", False),
link=link_fn,
link_type=link_type,
verbose=args.verbose,
)

View File

@@ -18,7 +18,6 @@
import llnl.util.tty as tty
from llnl.util.filesystem import path_contains_subdirectory, paths_containing_libs
import spack.compilers
import spack.error
import spack.schema.environment
import spack.spec
@@ -279,11 +278,6 @@ def debug_flags(self):
def opt_flags(self):
return ["-O", "-O0", "-O1", "-O2", "-O3"]
# Cray PrgEnv name that can be used to load this compiler
PrgEnv: Optional[str] = None
# Name of module used to switch versions of this compiler
PrgEnv_compiler: Optional[str] = None
def __init__(
self,
cspec,

View File

@@ -260,7 +260,7 @@ def _init_compiler_config(
def compiler_config_files():
config_files = list()
config = spack.config.CONFIG
for scope in config.file_scopes:
for scope in config.writable_scopes:
name = scope.name
compiler_config = config.get("compilers", scope=name)
if compiler_config:
@@ -488,7 +488,7 @@ def supported_compilers_for_host_platform() -> List[str]:
return supported_compilers_for_platform(host_plat)
def supported_compilers_for_platform(platform: spack.platforms.Platform) -> List[str]:
def supported_compilers_for_platform(platform: "spack.platforms.Platform") -> List[str]:
"""Return a set of compiler class objects supported by Spack
that are also supported by the provided platform

View File

@@ -25,9 +25,6 @@ class Aocc(Compiler):
# Subclasses use possible names of Fortran 90 compiler
fc_names = ["flang"]
PrgEnv = "PrgEnv-aocc"
PrgEnv_compiler = "aocc"
version_argument = "--version"
@property

View File

@@ -34,12 +34,9 @@ def __init__(self, *args, **kwargs):
# MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes.
suffixes = [r"-mp-\d\.\d"]
PrgEnv = "PrgEnv-cray"
PrgEnv_compiler = "cce"
@property
def link_paths(self):
if any(self.PrgEnv in m for m in self.modules):
if any("PrgEnv-cray" in m for m in self.modules):
# Old module-based interface to cray compilers
return {
"cc": os.path.join("cce", "cc"),

View File

@@ -40,9 +40,6 @@ class Gcc(spack.compiler.Compiler):
"fc": os.path.join("gcc", "gfortran"),
}
PrgEnv = "PrgEnv-gnu"
PrgEnv_compiler = "gcc"
@property
def verbose_flag(self):
return "-v"

View File

@@ -31,9 +31,6 @@ class Intel(Compiler):
"fc": os.path.join("intel", "ifort"),
}
PrgEnv = "PrgEnv-intel"
PrgEnv_compiler = "intel"
if sys.platform == "win32":
version_argument = "/QV"
else:
@@ -126,3 +123,14 @@ def fc_pic_flag(self):
@property
def stdcxx_libs(self):
return ("-cxxlib",)
def setup_custom_environment(self, pkg, env):
# Edge cases for Intel's oneAPI compilers when using the legacy classic compilers:
# Always pass flags to disable deprecation warnings, since these warnings can
# confuse tools that parse the output of compiler commands (e.g. version checks).
if self.cc and self.cc.endswith("icc") and self.real_version >= Version("2021"):
env.append_flags("SPACK_ALWAYS_CFLAGS", "-diag-disable=10441")
if self.cxx and self.cxx.endswith("icpc") and self.real_version >= Version("2021"):
env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441")
if self.fc and self.fc.endswith("ifort") and self.real_version >= Version("2021"):
env.append_flags("SPACK_ALWAYS_FFLAGS", "-diag-disable=10448")

View File

@@ -231,24 +231,55 @@ def msvc_version(self):
@property
def short_msvc_version(self):
"""This is the shorthand VCToolset version of form
MSVC<short-ver>
"""
This is the shorthand VCToolset version of form
MSVC<short-ver> *NOT* the full version, for that see
return "MSVC" + self.vc_toolset_ver
@property
def vc_toolset_ver(self):
"""
The toolset version is the version of the combined set of cl and link
This typically relates directly to VS version i.e. VS 2022 is v143
VS 19 is v142, etc.
This value is defined by the first three digits of the major + minor
version of the VS toolset (143 for 14.3x.bbbbb). Traditionally the
minor version has remained a static two digit number for a VS release
series, however, as of VS22, this is no longer true, both
14.4x.bbbbb and 14.3x.bbbbb are considered valid VS22 VC toolset
versions due to a change in toolset minor version sentiment.
This is *NOT* the full version, for that see
Msvc.msvc_version or MSVC.platform_toolset_ver for the
raw platform toolset version
"""
ver = self.platform_toolset_ver
return "MSVC" + ver
ver = self.msvc_version[:2].joined.string[:3]
return ver
@property
def platform_toolset_ver(self):
"""
This is the platform toolset version of current MSVC compiler
i.e. 142.
i.e. 142. The platform toolset is the targeted MSVC library/compiler
versions by compilation (this is different from the VC Toolset)
This is different from the VC toolset version as established
by `short_msvc_version`
by `short_msvc_version`, but typically are represented by the same
three digit value
"""
return self.msvc_version[:2].joined.string[:3]
# Typically VS toolset version and platform toolset versions match
# VS22 introduces the first divergence of VS toolset version
# (144 for "recent" releases) and platform toolset version (143)
# so it needs additional handling until MS releases v144
# (assuming v144 is also for VS22)
# or adds better support for detection
# TODO: (johnwparent) Update this logic for the next platform toolset
# or VC toolset version update
toolset_ver = self.vc_toolset_ver
vs22_toolset = Version(toolset_ver) > Version("142")
return toolset_ver if not vs22_toolset else "143"
def _compiler_version(self, compiler):
"""Returns version object for given compiler"""

View File

@@ -29,9 +29,6 @@ class Nvhpc(Compiler):
"fc": os.path.join("nvhpc", "nvfortran"),
}
PrgEnv = "PrgEnv-nvhpc"
PrgEnv_compiler = "nvhpc"
version_argument = "--version"
version_regex = r"nv[^ ]* (?:[^ ]+ Dev-r)?([0-9.]+)(?:-[0-9]+)?"

View File

@@ -4,11 +4,12 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from os.path import dirname
from os.path import dirname, join
from llnl.util import tty
from spack.compiler import Compiler
from spack.version import Version
class Oneapi(Compiler):
@@ -32,9 +33,6 @@ class Oneapi(Compiler):
"fc": os.path.join("oneapi", "ifx"),
}
PrgEnv = "PrgEnv-oneapi"
PrgEnv_compiler = "oneapi"
version_argument = "--version"
version_regex = r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)"
@@ -135,8 +133,22 @@ def setup_custom_environment(self, pkg, env):
# It is located in the same directory as the driver. Error message:
# clang++: error: unable to execute command:
# Executable "sycl-post-link" doesn't exist!
if self.cxx:
# also ensures that shared objects and libraries required by the compiler,
# e.g. libonnx, can be found succesfully
# due to a fix, this is no longer required for OneAPI versions >= 2024.2
if self.cxx and pkg.spec.satisfies("%oneapi@:2024.1"):
env.prepend_path("PATH", dirname(self.cxx))
env.prepend_path("LD_LIBRARY_PATH", join(dirname(dirname(self.cxx)), "lib"))
# Edge cases for Intel's oneAPI compilers when using the legacy classic compilers:
# Always pass flags to disable deprecation warnings, since these warnings can
# confuse tools that parse the output of compiler commands (e.g. version checks).
if self.cc and self.cc.endswith("icc") and self.real_version >= Version("2021"):
env.append_flags("SPACK_ALWAYS_CFLAGS", "-diag-disable=10441")
if self.cxx and self.cxx.endswith("icpc") and self.real_version >= Version("2021"):
env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441")
if self.fc and self.fc.endswith("ifort") and self.real_version >= Version("2021"):
env.append_flags("SPACK_ALWAYS_FFLAGS", "-diag-disable=10448")
# 2024 release bumped the libsycl version because of an ABI
# change, 2024 compilers are required. You will see this

View File

@@ -30,9 +30,6 @@ class Pgi(Compiler):
"fc": os.path.join("pgi", "pgfortran"),
}
PrgEnv = "PrgEnv-pgi"
PrgEnv_compiler = "pgi"
version_argument = "-V"
ignore_version_errors = [2] # `pgcc -V` on PowerPC annoyingly returns 2
version_regex = r"pg[^ ]* ([0-9.]+)-[0-9]+ (LLVM )?[^ ]+ target on "

View File

@@ -23,9 +23,6 @@ class Rocmcc(spack.compilers.clang.Clang):
# Subclasses use possible names of Fortran 90 compiler
fc_names = ["amdflang"]
PrgEnv = "PrgEnv-amd"
PrgEnv_compiler = "amd"
@property
def link_paths(self):
link_paths = {

View File

@@ -35,11 +35,10 @@
import os
import re
import sys
from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Type, Union
from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Union
from llnl.util import filesystem, lang, tty
import spack.compilers
import spack.paths
import spack.platforms
import spack.schema
@@ -117,21 +116,39 @@
class ConfigScope:
"""This class represents a configuration scope.
def __init__(self, name: str) -> None:
self.name = name
self.writable = False
self.sections = syaml.syaml_dict()
A scope is one directory containing named configuration files.
Each file is a config "section" (e.g., mirrors, compilers, etc.).
"""
def get_section_filename(self, section: str) -> str:
raise NotImplementedError
def __init__(self, name, path) -> None:
self.name = name # scope name.
self.path = path # path to directory containing configs.
self.sections = syaml.syaml_dict() # sections read from config files.
def get_section(self, section: str) -> Optional[YamlConfigDict]:
raise NotImplementedError
def _write_section(self, section: str) -> None:
raise NotImplementedError
@property
def is_platform_dependent(self) -> bool:
"""Returns true if the scope name is platform specific"""
return os.sep in self.name
return False
def clear(self) -> None:
"""Empty cached config information."""
self.sections = syaml.syaml_dict()
def __repr__(self) -> str:
return f"<ConfigScope: {self.name}>"
class DirectoryConfigScope(ConfigScope):
"""Config scope backed by a directory containing one file per section."""
def __init__(self, name: str, path: str, *, writable: bool = True) -> None:
super().__init__(name)
self.path = path
self.writable = writable
def get_section_filename(self, section: str) -> str:
"""Returns the filename associated with a given section"""
@@ -148,14 +165,15 @@ def get_section(self, section: str) -> Optional[YamlConfigDict]:
return self.sections[section]
def _write_section(self, section: str) -> None:
if not self.writable:
raise ConfigError(f"Cannot write to immutable scope {self}")
filename = self.get_section_filename(section)
data = self.get_section(section)
if data is None:
return
# We copy data here to avoid adding defaults at write time
validate_data = copy.deepcopy(data)
validate(validate_data, SECTION_SCHEMAS[section])
validate(data, SECTION_SCHEMAS[section])
try:
filesystem.mkdirp(self.path)
@@ -164,19 +182,23 @@ def _write_section(self, section: str) -> None:
except (syaml.SpackYAMLError, OSError) as e:
raise ConfigFileError(f"cannot write to '{filename}'") from e
def clear(self) -> None:
"""Empty cached config information."""
self.sections = syaml.syaml_dict()
def __repr__(self) -> str:
return f"<ConfigScope: {self.name}: {self.path}>"
@property
def is_platform_dependent(self) -> bool:
"""Returns true if the scope name is platform specific"""
return "/" in self.name
class SingleFileScope(ConfigScope):
"""This class represents a configuration scope in a single YAML file."""
def __init__(
self, name: str, path: str, schema: YamlConfigDict, yaml_path: Optional[List[str]] = None
self,
name: str,
path: str,
schema: YamlConfigDict,
*,
yaml_path: Optional[List[str]] = None,
writable: bool = True,
) -> None:
"""Similar to ``ConfigScope`` but can be embedded in another schema.
@@ -195,15 +217,13 @@ def __init__(
config:
install_tree: $spack/opt/spack
"""
super().__init__(name, path)
super().__init__(name)
self._raw_data: Optional[YamlConfigDict] = None
self.schema = schema
self.path = path
self.writable = writable
self.yaml_path = yaml_path or []
@property
def is_platform_dependent(self) -> bool:
return False
def get_section_filename(self, section) -> str:
return self.path
@@ -257,6 +277,8 @@ def get_section(self, section: str) -> Optional[YamlConfigDict]:
return self.sections.get(section, None)
def _write_section(self, section: str) -> None:
if not self.writable:
raise ConfigError(f"Cannot write to immutable scope {self}")
data_to_write: Optional[YamlConfigDict] = self._raw_data
# If there is no existing data, this section SingleFileScope has never
@@ -301,19 +323,6 @@ def __repr__(self) -> str:
return f"<SingleFileScope: {self.name}: {self.path}>"
class ImmutableConfigScope(ConfigScope):
"""A configuration scope that cannot be written to.
This is used for ConfigScopes passed on the command line.
"""
def _write_section(self, section) -> None:
raise ConfigError(f"Cannot write to immutable scope {self}")
def __repr__(self) -> str:
return f"<ImmutableConfigScope: {self.name}: {self.path}>"
class InternalConfigScope(ConfigScope):
"""An internal configuration scope that is not persisted to a file.
@@ -323,7 +332,7 @@ class InternalConfigScope(ConfigScope):
"""
def __init__(self, name: str, data: Optional[YamlConfigDict] = None) -> None:
super().__init__(name, None)
super().__init__(name)
self.sections = syaml.syaml_dict()
if data is not None:
@@ -333,9 +342,6 @@ def __init__(self, name: str, data: Optional[YamlConfigDict] = None) -> None:
validate({section: dsec}, SECTION_SCHEMAS[section])
self.sections[section] = _mark_internal(syaml.syaml_dict({section: dsec}), name)
def get_section_filename(self, section: str) -> str:
raise NotImplementedError("Cannot get filename for InternalConfigScope.")
def get_section(self, section: str) -> Optional[YamlConfigDict]:
"""Just reads from an internal dictionary."""
if section not in self.sections:
@@ -440,27 +446,21 @@ def remove_scope(self, scope_name: str) -> Optional[ConfigScope]:
return scope
@property
def file_scopes(self) -> List[ConfigScope]:
"""List of writable scopes with an associated file."""
return [
s
for s in self.scopes.values()
if (type(s) is ConfigScope or type(s) is SingleFileScope)
]
def writable_scopes(self) -> Generator[ConfigScope, None, None]:
"""Generator of writable scopes with an associated file."""
return (s for s in self.scopes.values() if s.writable)
def highest_precedence_scope(self) -> ConfigScope:
"""Non-internal scope with highest precedence."""
return next(reversed(self.file_scopes))
"""Writable scope with highest precedence."""
return next(s for s in reversed(self.scopes.values()) if s.writable) # type: ignore
def highest_precedence_non_platform_scope(self) -> ConfigScope:
"""Non-internal non-platform scope with highest precedence
Platform-specific scopes are of the form scope/platform"""
generator = reversed(self.file_scopes)
highest = next(generator)
while highest and highest.is_platform_dependent:
highest = next(generator)
return highest
"""Writable non-platform scope with highest precedence"""
return next(
s
for s in reversed(self.scopes.values()) # type: ignore
if s.writable and not s.is_platform_dependent
)
def matching_scopes(self, reg_expr) -> List[ConfigScope]:
"""
@@ -755,13 +755,14 @@ def override(
def _add_platform_scope(
cfg: Union[Configuration, lang.Singleton], scope_type: Type[ConfigScope], name: str, path: str
cfg: Union[Configuration, lang.Singleton], name: str, path: str, writable: bool = True
) -> None:
"""Add a platform-specific subdirectory for the current platform."""
platform = spack.platforms.host().name
plat_name = os.path.join(name, platform)
plat_path = os.path.join(path, platform)
cfg.push_scope(scope_type(plat_name, plat_path))
scope = DirectoryConfigScope(
f"{name}/{platform}", os.path.join(path, platform), writable=writable
)
cfg.push_scope(scope)
def config_paths_from_entry_points() -> List[Tuple[str, str]]:
@@ -792,22 +793,27 @@ def config_paths_from_entry_points() -> List[Tuple[str, str]]:
def _add_command_line_scopes(
cfg: Union[Configuration, lang.Singleton], command_line_scopes: List[str]
) -> None:
"""Add additional scopes from the --config-scope argument.
"""Add additional scopes from the --config-scope argument, either envs or dirs."""
import spack.environment.environment as env # circular import
Command line scopes are named after their position in the arg list.
"""
for i, path in enumerate(command_line_scopes):
# We ensure that these scopes exist and are readable, as they are
# provided on the command line by the user.
if not os.path.isdir(path):
raise ConfigError(f"config scope is not a directory: '{path}'")
elif not os.access(path, os.R_OK):
raise ConfigError(f"config scope is not readable: '{path}'")
name = f"cmd_scope_{i}"
# name based on order on the command line
name = f"cmd_scope_{i:d}"
cfg.push_scope(ImmutableConfigScope(name, path))
_add_platform_scope(cfg, ImmutableConfigScope, name, path)
if env.exists(path): # managed environment
manifest = env.EnvironmentManifestFile(env.root(path))
elif env.is_env_dir(path): # anonymous environment
manifest = env.EnvironmentManifestFile(path)
elif os.path.isdir(path): # directory with config files
cfg.push_scope(DirectoryConfigScope(name, path, writable=False))
_add_platform_scope(cfg, name, path, writable=False)
continue
else:
raise ConfigError(f"Invalid configuration scope: {path}")
for scope in manifest.env_config_scopes:
scope.name = f"{name}:{scope.name}"
scope.writable = False
cfg.push_scope(scope)
def create() -> Configuration:
@@ -851,10 +857,10 @@ def create() -> Configuration:
# add each scope and its platform-specific directory
for name, path in configuration_paths:
cfg.push_scope(ConfigScope(name, path))
cfg.push_scope(DirectoryConfigScope(name, path))
# Each scope can have per-platfom overrides in subdirectories
_add_platform_scope(cfg, ConfigScope, name, path)
_add_platform_scope(cfg, name, path)
# add command-line scopes
_add_command_line_scopes(cfg, COMMAND_LINE_SCOPES)
@@ -969,7 +975,7 @@ def set(path: str, value: Any, scope: Optional[str] = None) -> None:
def add_default_platform_scope(platform: str) -> None:
plat_name = os.path.join("defaults", platform)
plat_path = os.path.join(CONFIGURATION_DEFAULTS_PATH[1], platform)
CONFIG.push_scope(ConfigScope(plat_name, plat_path))
CONFIG.push_scope(DirectoryConfigScope(plat_name, plat_path))
def scopes() -> Dict[str, ConfigScope]:
@@ -978,19 +984,10 @@ def scopes() -> Dict[str, ConfigScope]:
def writable_scopes() -> List[ConfigScope]:
"""
Return list of writable scopes. Higher-priority scopes come first in the
list.
"""
return list(
reversed(
list(
x
for x in CONFIG.scopes.values()
if not isinstance(x, (InternalConfigScope, ImmutableConfigScope))
)
)
)
"""Return list of writable scopes. Higher-priority scopes come first in the list."""
scopes = [x for x in CONFIG.scopes.values() if x.writable]
scopes.reverse()
return scopes
def writable_scope_names() -> List[str]:
@@ -1080,11 +1077,8 @@ def validate(
"""
import jsonschema
# Validate a copy to avoid adding defaults
# This allows us to round-trip data without adding to it.
test_data = syaml.deepcopy(data)
try:
spack.schema.Validator(schema).validate(test_data)
spack.schema.Validator(schema).validate(data)
except jsonschema.ValidationError as e:
if hasattr(e.instance, "lc"):
line_number = e.instance.lc.line + 1
@@ -1093,7 +1087,7 @@ def validate(
raise ConfigFormatError(e, data, filename, line_number) from e
# return the validated data so that we can access the raw data
# mostly relevant for environments
return test_data
return data
def read_config_file(
@@ -1599,7 +1593,7 @@ def _config_from(scopes_or_paths: List[Union[ConfigScope, str]]) -> Configuratio
path = os.path.normpath(scope_or_path)
assert os.path.isdir(path), f'"{path}" must be a directory'
name = os.path.basename(path)
scopes.append(ConfigScope(name, path))
scopes.append(DirectoryConfigScope(name, path))
configuration = Configuration(*scopes)
return configuration

View File

@@ -78,24 +78,17 @@
"image": "quay.io/almalinuxorg/almalinux:8"
}
},
"centos:stream": {
"centos:stream9": {
"bootstrap": {
"template": "container/centos_stream.dockerfile",
"image": "quay.io/centos/centos:stream"
"template": "container/centos_stream9.dockerfile",
"image": "quay.io/centos/centos:stream9"
},
"os_package_manager": "dnf_epel",
"build": "spack/centos-stream",
"build": "spack/centos-stream9",
"final": {
"image": "quay.io/centos/centos:stream"
"image": "quay.io/centos/centos:stream9"
}
},
"centos:7": {
"bootstrap": {
"template": "container/centos_7.dockerfile"
},
"os_package_manager": "yum",
"build": "spack/centos7"
},
"opensuse/leap:15": {
"bootstrap": {
"template": "container/leap-15.dockerfile"

View File

@@ -2,7 +2,12 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from .common import DetectedPackage, executable_prefix, update_configuration
from .common import (
DetectedPackage,
executable_prefix,
set_virtuals_nonbuildable,
update_configuration,
)
from .path import by_path, executables_in_path
from .test import detection_tests
@@ -12,5 +17,6 @@
"executables_in_path",
"executable_prefix",
"update_configuration",
"set_virtuals_nonbuildable",
"detection_tests",
]

View File

@@ -252,6 +252,27 @@ def update_configuration(
return all_new_specs
def set_virtuals_nonbuildable(virtuals: Set[str], scope: Optional[str] = None) -> List[str]:
"""Update packages:virtual:buildable:False for the provided virtual packages, if the property
is not set by the user. Returns the list of virtual packages that have been updated."""
packages = spack.config.get("packages")
new_config = {}
for virtual in virtuals:
# If the user has set the buildable prop do not override it
if virtual in packages and "buildable" in packages[virtual]:
continue
new_config[virtual] = {"buildable": False}
# Update the provided scope
spack.config.set(
"packages",
spack.config.merge_yaml(spack.config.get("packages", scope=scope), new_config),
scope=scope,
)
return list(new_config.keys())
def _windows_drive() -> str:
"""Return Windows drive string extracted from the PROGRAMFILES environment variable,
which is guaranteed to be defined for all logins.

View File

@@ -12,7 +12,7 @@
import re
import sys
import warnings
from typing import Dict, List, Optional, Set, Tuple
from typing import Dict, List, Optional, Set, Tuple, Type
import llnl.util.filesystem
import llnl.util.lang
@@ -200,7 +200,7 @@ class Finder:
def default_path_hints(self) -> List[str]:
return []
def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]:
def search_patterns(self, *, pkg: Type["spack.package_base.PackageBase"]) -> List[str]:
"""Returns the list of patterns used to match candidate files.
Args:
@@ -226,7 +226,7 @@ def prefix_from_path(self, *, path: str) -> str:
raise NotImplementedError("must be implemented by derived classes")
def detect_specs(
self, *, pkg: "spack.package_base.PackageBase", paths: List[str]
self, *, pkg: Type["spack.package_base.PackageBase"], paths: List[str]
) -> List[DetectedPackage]:
"""Given a list of files matching the search patterns, returns a list of detected specs.
@@ -327,7 +327,7 @@ class ExecutablesFinder(Finder):
def default_path_hints(self) -> List[str]:
return spack.util.environment.get_path("PATH")
def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]:
def search_patterns(self, *, pkg: Type["spack.package_base.PackageBase"]) -> List[str]:
result = []
if hasattr(pkg, "executables") and hasattr(pkg, "platform_executables"):
result = pkg.platform_executables()
@@ -356,7 +356,7 @@ class LibrariesFinder(Finder):
DYLD_LIBRARY_PATH, DYLD_FALLBACK_LIBRARY_PATH, and standard system library paths
"""
def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]:
def search_patterns(self, *, pkg: Type["spack.package_base.PackageBase"]) -> List[str]:
result = []
if hasattr(pkg, "libraries"):
result = pkg.libraries

View File

@@ -81,7 +81,17 @@ class OpenMpi(Package):
]
#: These are variant names used by Spack internally; packages can't use them
reserved_names = ["patches", "dev_path"]
reserved_names = [
"arch",
"architecture",
"dev_path",
"namespace",
"operating_system",
"os",
"patches",
"platform",
"target",
]
#: Names of possible directives. This list is mostly populated using the @directive decorator.
#: Some directives leverage others and in that case are not automatically added.
@@ -90,14 +100,14 @@ class OpenMpi(Package):
_patch_order_index = 0
SpecType = Union["spack.spec.Spec", str]
SpecType = str
DepType = Union[Tuple[str, ...], str]
WhenType = Optional[Union["spack.spec.Spec", str, bool]]
Patcher = Callable[[Union["spack.package_base.PackageBase", Dependency]], None]
PatchesType = Optional[Union[Patcher, str, List[Union[Patcher, str]]]]
SUPPORTED_LANGUAGES = ("fortran", "cxx")
SUPPORTED_LANGUAGES = ("fortran", "cxx", "c")
def _make_when_spec(value: WhenType) -> Optional["spack.spec.Spec"]:
@@ -475,7 +485,7 @@ def _execute_version(pkg, ver, **kwargs):
def _depends_on(
pkg: "spack.package_base.PackageBase",
spec: SpecType,
spec: "spack.spec.Spec",
*,
when: WhenType = None,
type: DepType = dt.DEFAULT_TYPES,
@@ -485,11 +495,10 @@ def _depends_on(
if not when_spec:
return
dep_spec = spack.spec.Spec(spec)
if not dep_spec.name:
raise DependencyError("Invalid dependency specification in package '%s':" % pkg.name, spec)
if pkg.name == dep_spec.name:
raise CircularReferenceError("Package '%s' cannot depend on itself." % pkg.name)
if not spec.name:
raise DependencyError(f"Invalid dependency specification in package '{pkg.name}':", spec)
if pkg.name == spec.name:
raise CircularReferenceError(f"Package '{pkg.name}' cannot depend on itself.")
depflag = dt.canonicalize(type)
@@ -505,7 +514,7 @@ def _depends_on(
# ensure `Spec.virtual` is a valid thing to call in a directive.
# For now, we comment out the following check to allow for virtual packages
# with package files.
# if patches and dep_spec.virtual:
# if patches and spec.virtual:
# raise DependencyPatchError("Cannot patch a virtual dependency.")
# ensure patches is a list
@@ -520,13 +529,13 @@ def _depends_on(
# this is where we actually add the dependency to this package
deps_by_name = pkg.dependencies.setdefault(when_spec, {})
dependency = deps_by_name.get(dep_spec.name)
dependency = deps_by_name.get(spec.name)
if not dependency:
dependency = Dependency(pkg, dep_spec, depflag=depflag)
deps_by_name[dep_spec.name] = dependency
dependency = Dependency(pkg, spec, depflag=depflag)
deps_by_name[spec.name] = dependency
else:
dependency.spec.constrain(dep_spec, deps=False)
dependency.spec.constrain(spec, deps=False)
dependency.depflag |= depflag
# apply patches to the dependency
@@ -591,12 +600,13 @@ def depends_on(
@see The section "Dependency specs" in the Spack Packaging Guide.
"""
if spack.spec.Spec(spec).name in SUPPORTED_LANGUAGES:
dep_spec = spack.spec.Spec(spec)
if dep_spec.name in SUPPORTED_LANGUAGES:
assert type == "build", "languages must be of 'build' type"
return _language(lang_spec_str=spec, when=when)
def _execute_depends_on(pkg: "spack.package_base.PackageBase"):
_depends_on(pkg, spec, when=when, type=type, patches=patches)
_depends_on(pkg, dep_spec, when=when, type=type, patches=patches)
return _execute_depends_on
@@ -666,25 +676,24 @@ def extends(spec, when=None, type=("build", "run"), patches=None):
keyword arguments can be passed to extends() so that extension
packages can pass parameters to the extendee's extension
mechanism.
"""
mechanism."""
def _execute_extends(pkg):
when_spec = _make_when_spec(when)
if not when_spec:
return
_depends_on(pkg, spec, when=when, type=type, patches=patches)
spec_obj = spack.spec.Spec(spec)
dep_spec = spack.spec.Spec(spec)
_depends_on(pkg, dep_spec, when=when, type=type, patches=patches)
# When extending python, also add a dependency on python-venv. This is done so that
# Spack environment views are Python virtual environments.
if spec_obj.name == "python" and not pkg.name == "python-venv":
_depends_on(pkg, "python-venv", when=when, type=("build", "run"))
if dep_spec.name == "python" and not pkg.name == "python-venv":
_depends_on(pkg, spack.spec.Spec("python-venv"), when=when, type=("build", "run"))
# TODO: the values of the extendees dictionary are not used. Remove in next refactor.
pkg.extendees[spec_obj.name] = (spec_obj, None)
pkg.extendees[dep_spec.name] = (dep_spec, None)
return _execute_extends

View File

@@ -5,7 +5,7 @@
import collections
import collections.abc
import contextlib
import copy
import errno
import os
import pathlib
import re
@@ -24,12 +24,15 @@
from llnl.util.link_tree import ConflictingSpecsError
from llnl.util.symlink import readlink, symlink
import spack.caches
import spack.cmd
import spack.compilers
import spack.concretize
import spack.config
import spack.deptypes as dt
import spack.error
import spack.fetch_strategy
import spack.filesystem_view as fsv
import spack.hash_types as ht
import spack.hooks
import spack.main
@@ -52,7 +55,6 @@
import spack.util.url
import spack.version
from spack import traverse
from spack.filesystem_view import SimpleFilesystemView, inverse_view_func_parser, view_func_parser
from spack.installer import PackageInstaller
from spack.schema.env import TOP_LEVEL_KEY
from spack.spec import Spec
@@ -267,9 +269,7 @@ def root(name):
def exists(name):
"""Whether an environment with this name exists or not."""
if not valid_env_name(name):
return False
return os.path.isdir(root(name))
return valid_env_name(name) and os.path.isdir(_root(name))
def active(name):
@@ -528,8 +528,8 @@ def _read_yaml(str_or_file):
)
filename = getattr(str_or_file, "name", None)
default_data = spack.config.validate(data, spack.schema.env.schema, filename)
return data, default_data
spack.config.validate(data, spack.schema.env.schema, filename)
return data
def _write_yaml(data, str_or_file):
@@ -606,7 +606,7 @@ def __init__(
self.projections = projections
self.select = select
self.exclude = exclude
self.link_type = view_func_parser(link_type)
self.link_type = fsv.canonicalize_link_type(link_type)
self.link = link
def select_fn(self, spec):
@@ -640,7 +640,7 @@ def to_dict(self):
if self.exclude:
ret["exclude"] = self.exclude
if self.link_type:
ret["link_type"] = inverse_view_func_parser(self.link_type)
ret["link_type"] = self.link_type
if self.link != default_view_link:
ret["link"] = self.link
return ret
@@ -690,7 +690,7 @@ def get_projection_for_spec(self, spec):
to exist on the filesystem."""
return self._view(self.root).get_projection_for_spec(spec)
def view(self, new: Optional[str] = None) -> SimpleFilesystemView:
def view(self, new: Optional[str] = None) -> fsv.SimpleFilesystemView:
"""
Returns a view object for the *underlying* view directory. This means that the
self.root symlink is followed, and that the view has to exist on the filesystem
@@ -710,14 +710,14 @@ def view(self, new: Optional[str] = None) -> SimpleFilesystemView:
)
return self._view(path)
def _view(self, root: str) -> SimpleFilesystemView:
def _view(self, root: str) -> fsv.SimpleFilesystemView:
"""Returns a view object for a given root dir."""
return SimpleFilesystemView(
return fsv.SimpleFilesystemView(
root,
spack.store.STORE.layout,
ignore_conflicts=True,
projections=self.projections,
link=self.link_type,
link_type=self.link_type,
)
def __contains__(self, spec):
@@ -789,6 +789,23 @@ def regenerate(self, concrete_roots: List[Spec]) -> None:
root_dirname = os.path.dirname(self.root)
tmp_symlink_name = os.path.join(root_dirname, "._view_link")
# Remove self.root if is it an empty dir, since we need a symlink there. Note that rmdir
# fails if self.root is a symlink.
try:
os.rmdir(self.root)
except (FileNotFoundError, NotADirectoryError):
pass
except OSError as e:
if e.errno == errno.ENOTEMPTY:
msg = "it is a non-empty directory"
elif e.errno == errno.EACCES:
msg = "of insufficient permissions"
else:
raise
raise SpackEnvironmentViewError(
f"The environment view in {self.root} cannot not be created because {msg}."
) from e
# Create a new view
try:
fs.mkdirp(new_root)
@@ -920,7 +937,7 @@ def __init__(self, manifest_dir: Union[str, pathlib.Path]) -> None:
def _load_manifest_file(self):
"""Instantiate and load the manifest file contents into memory."""
with lk.ReadTransaction(self.txlock):
self.manifest = EnvironmentManifestFile(self.path)
self.manifest = EnvironmentManifestFile(self.path, self.name)
with self.manifest.use_config():
self._read()
@@ -957,18 +974,25 @@ def write_transaction(self):
"""Get a write lock context manager for use in a `with` block."""
return lk.WriteTransaction(self.txlock, acquire=self._re_read)
def _process_definition(self, item):
def _process_definition(self, entry):
"""Process a single spec definition item."""
entry = copy.deepcopy(item)
when = _eval_conditional(entry.pop("when", "True"))
assert len(entry) == 1
when_string = entry.get("when")
if when_string is not None:
when = _eval_conditional(when_string)
assert len([x for x in entry if x != "when"]) == 1
else:
when = True
assert len(entry) == 1
if when:
name, spec_list = next(iter(entry.items()))
user_specs = SpecList(name, spec_list, self.spec_lists.copy())
if name in self.spec_lists:
self.spec_lists[name].extend(user_specs)
else:
self.spec_lists[name] = user_specs
for name, spec_list in entry.items():
if name == "when":
continue
user_specs = SpecList(name, spec_list, self.spec_lists.copy())
if name in self.spec_lists:
self.spec_lists[name].extend(user_specs)
else:
self.spec_lists[name] = user_specs
def _process_view(self, env_view: Optional[Union[bool, str, Dict]]):
"""Process view option(s), which can be boolean, string, or None.
@@ -2473,27 +2497,21 @@ def _equiv_dict(first, second):
return same_values and same_keys_with_same_overrides
def display_specs(concretized_specs):
"""Displays the list of specs returned by `Environment.concretize()`.
def display_specs(specs):
"""Displays a list of specs traversed breadth-first, covering nodes, with install status.
Args:
concretized_specs (list): list of specs returned by
`Environment.concretize()`
specs (list): list of specs
"""
def _tree_to_display(spec):
return spec.tree(
recurse_dependencies=True,
format=spack.spec.DISPLAY_FORMAT,
status_fn=spack.spec.Spec.install_status,
hashlen=7,
hashes=True,
)
for user_spec, concrete_spec in concretized_specs:
tty.msg("Concretized {0}".format(user_spec))
sys.stdout.write(_tree_to_display(concrete_spec))
print("")
tree_string = spack.spec.tree(
specs,
format=spack.spec.DISPLAY_FORMAT,
hashes=True,
hashlen=7,
status_fn=spack.spec.Spec.install_status,
key=traverse.by_dag_hash,
)
print(tree_string)
def _concretize_from_constraints(spec_constraints, tests=False):
@@ -2547,7 +2565,7 @@ def _concretize_task(packed_arguments) -> Tuple[int, Spec, float]:
def make_repo_path(root):
"""Make a RepoPath from the repo subdirectories in an environment."""
path = spack.repo.RepoPath()
path = spack.repo.RepoPath(cache=spack.caches.MISC_CACHE)
if os.path.isdir(root):
for repo_root in os.listdir(root):
@@ -2556,7 +2574,7 @@ def make_repo_path(root):
if not os.path.isdir(repo_root):
continue
repo = spack.repo.Repo(repo_root)
repo = spack.repo.from_path(repo_root)
path.put_last(repo)
return path
@@ -2757,10 +2775,11 @@ def from_lockfile(manifest_dir: Union[pathlib.Path, str]) -> "EnvironmentManifes
manifest.flush()
return manifest
def __init__(self, manifest_dir: Union[pathlib.Path, str]) -> None:
def __init__(self, manifest_dir: Union[pathlib.Path, str], name: Optional[str] = None) -> None:
self.manifest_dir = pathlib.Path(manifest_dir)
self.name = name or str(manifest_dir)
self.manifest_file = self.manifest_dir / manifest_name
self.scope_name = f"env:{environment_name(self.manifest_dir)}"
self.scope_name = f"env:{self.name}"
self.config_stage_dir = os.path.join(env_subdir_path(manifest_dir), "config")
#: Configuration scopes associated with this environment. Note that these are not
@@ -2772,12 +2791,8 @@ def __init__(self, manifest_dir: Union[pathlib.Path, str]) -> None:
raise SpackEnvironmentError(msg)
with self.manifest_file.open() as f:
raw, with_defaults_added = _read_yaml(f)
self.yaml_content = _read_yaml(f)
#: Pristine YAML content, without defaults being added
self.pristine_yaml_content = raw
#: YAML content with defaults added by Spack, if they're missing
self.yaml_content = with_defaults_added
self.changed = False
def _all_matches(self, user_spec: str) -> List[str]:
@@ -2791,7 +2806,7 @@ def _all_matches(self, user_spec: str) -> List[str]:
ValueError: if no equivalent match is found
"""
result = []
for yaml_spec_str in self.pristine_configuration["specs"]:
for yaml_spec_str in self.configuration["specs"]:
if Spec(yaml_spec_str) == Spec(user_spec):
result.append(yaml_spec_str)
@@ -2806,7 +2821,6 @@ def add_user_spec(self, user_spec: str) -> None:
Args:
user_spec: user spec to be appended
"""
self.pristine_configuration.setdefault("specs", []).append(user_spec)
self.configuration.setdefault("specs", []).append(user_spec)
self.changed = True
@@ -2821,7 +2835,6 @@ def remove_user_spec(self, user_spec: str) -> None:
"""
try:
for key in self._all_matches(user_spec):
self.pristine_configuration["specs"].remove(key)
self.configuration["specs"].remove(key)
except ValueError as e:
msg = f"cannot remove {user_spec} from {self}, no such spec exists"
@@ -2839,7 +2852,6 @@ def override_user_spec(self, user_spec: str, idx: int) -> None:
SpackEnvironmentError: when the user spec cannot be overridden
"""
try:
self.pristine_configuration["specs"][idx] = user_spec
self.configuration["specs"][idx] = user_spec
except ValueError as e:
msg = f"cannot override {user_spec} from {self}"
@@ -2852,10 +2864,10 @@ def set_include_concrete(self, include_concrete: List[str]) -> None:
Args:
include_concrete: list of already existing concrete environments to include
"""
self.pristine_configuration[included_concrete_name] = []
self.configuration[included_concrete_name] = []
for env_path in include_concrete:
self.pristine_configuration[included_concrete_name].append(env_path)
self.configuration[included_concrete_name].append(env_path)
self.changed = True
@@ -2869,14 +2881,13 @@ def add_definition(self, user_spec: str, list_name: str) -> None:
Raises:
SpackEnvironmentError: is no valid definition exists already
"""
defs = self.pristine_configuration.get("definitions", [])
defs = self.configuration.get("definitions", [])
msg = f"cannot add {user_spec} to the '{list_name}' definition, no valid list exists"
for idx, item in self._iterate_on_definitions(defs, list_name=list_name, err_msg=msg):
item[list_name].append(user_spec)
break
self.configuration["definitions"][idx][list_name].append(user_spec)
self.changed = True
def remove_definition(self, user_spec: str, list_name: str) -> None:
@@ -2890,7 +2901,7 @@ def remove_definition(self, user_spec: str, list_name: str) -> None:
SpackEnvironmentError: if the user spec cannot be removed from the list,
or the list does not exist
"""
defs = self.pristine_configuration.get("definitions", [])
defs = self.configuration.get("definitions", [])
msg = (
f"cannot remove {user_spec} from the '{list_name}' definition, "
f"no valid list exists"
@@ -2903,7 +2914,6 @@ def remove_definition(self, user_spec: str, list_name: str) -> None:
except ValueError:
pass
self.configuration["definitions"][idx][list_name].remove(user_spec)
self.changed = True
def override_definition(self, user_spec: str, *, override: str, list_name: str) -> None:
@@ -2918,7 +2928,7 @@ def override_definition(self, user_spec: str, *, override: str, list_name: str)
Raises:
SpackEnvironmentError: if the user spec cannot be overridden
"""
defs = self.pristine_configuration.get("definitions", [])
defs = self.configuration.get("definitions", [])
msg = f"cannot override {user_spec} with {override} in the '{list_name}' definition"
for idx, item in self._iterate_on_definitions(defs, list_name=list_name, err_msg=msg):
@@ -2929,7 +2939,6 @@ def override_definition(self, user_spec: str, *, override: str, list_name: str)
except ValueError:
pass
self.configuration["definitions"][idx][list_name][sub_index] = override
self.changed = True
def _iterate_on_definitions(self, definitions, *, list_name, err_msg):
@@ -2961,7 +2970,6 @@ def set_default_view(self, view: Union[bool, str, pathlib.Path, Dict[str, str]])
True the default view is used for the environment, if False there's no view.
"""
if isinstance(view, dict):
self.pristine_configuration["view"][default_view_name].update(view)
self.configuration["view"][default_view_name].update(view)
self.changed = True
return
@@ -2969,15 +2977,13 @@ def set_default_view(self, view: Union[bool, str, pathlib.Path, Dict[str, str]])
if not isinstance(view, bool):
view = str(view)
self.pristine_configuration["view"] = view
self.configuration["view"] = view
self.changed = True
def remove_default_view(self) -> None:
"""Removes the default view from the manifest file"""
view_data = self.pristine_configuration.get("view")
view_data = self.configuration.get("view")
if isinstance(view_data, collections.abc.Mapping):
self.pristine_configuration["view"].pop(default_view_name)
self.configuration["view"].pop(default_view_name)
self.changed = True
return
@@ -2990,17 +2996,12 @@ def flush(self) -> None:
return
with fs.write_tmp_and_move(os.path.realpath(self.manifest_file)) as f:
_write_yaml(self.pristine_yaml_content, f)
_write_yaml(self.yaml_content, f)
self.changed = False
@property
def pristine_configuration(self):
"""Return the dictionaries in the pristine YAML, without the top level attribute"""
return self.pristine_yaml_content[TOP_LEVEL_KEY]
@property
def configuration(self):
"""Return the dictionaries in the YAML, without the top level attribute"""
"""Return the dictionaries in the pristine YAML, without the top level attribute"""
return self.yaml_content[TOP_LEVEL_KEY]
def __len__(self):
@@ -3032,12 +3033,11 @@ def included_config_scopes(self) -> List[spack.config.ConfigScope]:
SpackEnvironmentError: if the manifest includes a remote file but
no configuration stage directory has been identified
"""
scopes = []
scopes: List[spack.config.ConfigScope] = []
# load config scopes added via 'include:', in reverse so that
# highest-precedence scopes are last.
includes = self[TOP_LEVEL_KEY].get("include", [])
env_name = environment_name(self.manifest_dir)
missing = []
for i, config_path in enumerate(reversed(includes)):
# allow paths to contain spack config/environment variables, etc.
@@ -3100,24 +3100,22 @@ def included_config_scopes(self) -> List[spack.config.ConfigScope]:
if os.path.isdir(config_path):
# directories are treated as regular ConfigScopes
config_name = "env:%s:%s" % (env_name, os.path.basename(config_path))
tty.debug("Creating ConfigScope {0} for '{1}'".format(config_name, config_path))
scope = spack.config.ConfigScope(config_name, config_path)
config_name = f"env:{self.name}:{os.path.basename(config_path)}"
tty.debug(f"Creating DirectoryConfigScope {config_name} for '{config_path}'")
scopes.append(spack.config.DirectoryConfigScope(config_name, config_path))
elif os.path.exists(config_path):
# files are assumed to be SingleFileScopes
config_name = "env:%s:%s" % (env_name, config_path)
tty.debug(
"Creating SingleFileScope {0} for '{1}'".format(config_name, config_path)
)
scope = spack.config.SingleFileScope(
config_name, config_path, spack.schema.merged.schema
config_name = f"env:{self.name}:{config_path}"
tty.debug(f"Creating SingleFileScope {config_name} for '{config_path}'")
scopes.append(
spack.config.SingleFileScope(
config_name, config_path, spack.schema.merged.schema
)
)
else:
missing.append(config_path)
continue
scopes.append(scope)
if missing:
msg = "Detected {0} missing include path(s):".format(len(missing))
msg += "\n {0}".format("\n ".join(missing))
@@ -3134,7 +3132,10 @@ def env_config_scopes(self) -> List[spack.config.ConfigScope]:
scopes: List[spack.config.ConfigScope] = [
*self.included_config_scopes,
spack.config.SingleFileScope(
self.scope_name, str(self.manifest_file), spack.schema.env.schema, [TOP_LEVEL_KEY]
self.scope_name,
str(self.manifest_file),
spack.schema.env.schema,
yaml_path=[TOP_LEVEL_KEY],
),
]
ensure_no_disallowed_env_config_mods(scopes)

View File

@@ -10,8 +10,9 @@
import shutil
import stat
import sys
from typing import Optional
from typing import Callable, Dict, Optional
from llnl.string import comma_or
from llnl.util import tty
from llnl.util.filesystem import (
mkdirp,
@@ -49,19 +50,20 @@
_projections_path = ".spack/projections.yaml"
def view_symlink(src, dst, **kwargs):
# keyword arguments are irrelevant
# here to fit required call signature
LinkCallbackType = Callable[[str, str, "FilesystemView", Optional["spack.spec.Spec"]], None]
def view_symlink(src: str, dst: str, *args, **kwargs) -> None:
symlink(src, dst)
def view_hardlink(src, dst, **kwargs):
# keyword arguments are irrelevant
# here to fit required call signature
def view_hardlink(src: str, dst: str, *args, **kwargs) -> None:
os.link(src, dst)
def view_copy(src: str, dst: str, view, spec: Optional[spack.spec.Spec] = None):
def view_copy(
src: str, dst: str, view: "FilesystemView", spec: Optional["spack.spec.Spec"] = None
) -> None:
"""
Copy a file from src to dst.
@@ -104,27 +106,40 @@ def view_copy(src: str, dst: str, view, spec: Optional[spack.spec.Spec] = None):
tty.debug(f"Can't change the permissions for {dst}")
def view_func_parser(parsed_name):
# What method are we using for this view
if parsed_name in ("hardlink", "hard"):
#: supported string values for `link_type` in an env, mapped to canonical values
_LINK_TYPES = {
"hardlink": "hardlink",
"hard": "hardlink",
"copy": "copy",
"relocate": "copy",
"add": "symlink",
"symlink": "symlink",
"soft": "symlink",
}
_VALID_LINK_TYPES = sorted(set(_LINK_TYPES.values()))
def canonicalize_link_type(link_type: str) -> str:
"""Return canonical"""
canonical = _LINK_TYPES.get(link_type)
if not canonical:
raise ValueError(
f"Invalid link type: '{link_type}. Must be one of {comma_or(_VALID_LINK_TYPES)}'"
)
return canonical
def function_for_link_type(link_type: str) -> LinkCallbackType:
link_type = canonicalize_link_type(link_type)
if link_type == "hardlink":
return view_hardlink
elif parsed_name in ("copy", "relocate"):
return view_copy
elif parsed_name in ("add", "symlink", "soft"):
elif link_type == "symlink":
return view_symlink
else:
raise ValueError(f"invalid link type for view: '{parsed_name}'")
elif link_type == "copy":
return view_copy
def inverse_view_func_parser(view_type):
# get string based on view type
if view_type is view_hardlink:
link_name = "hardlink"
elif view_type is view_copy:
link_name = "copy"
else:
link_name = "symlink"
return link_name
assert False, "invalid link type" # need mypy Literal values
class FilesystemView:
@@ -140,7 +155,16 @@ class FilesystemView:
directory structure.
"""
def __init__(self, root, layout, **kwargs):
def __init__(
self,
root: str,
layout: "spack.directory_layout.DirectoryLayout",
*,
projections: Optional[Dict] = None,
ignore_conflicts: bool = False,
verbose: bool = False,
link_type: str = "symlink",
):
"""
Initialize a filesystem view under the given `root` directory with
corresponding directory `layout`.
@@ -149,15 +173,14 @@ def __init__(self, root, layout, **kwargs):
"""
self._root = root
self.layout = layout
self.projections = {} if projections is None else projections
self.projections = kwargs.get("projections", {})
self.ignore_conflicts = kwargs.get("ignore_conflicts", False)
self.verbose = kwargs.get("verbose", False)
self.ignore_conflicts = ignore_conflicts
self.verbose = verbose
# Setup link function to include view
link_func = kwargs.get("link", view_symlink)
self.link = ft.partial(link_func, view=self)
self.link_type = link_type
self.link = ft.partial(function_for_link_type(link_type), view=self)
def add_specs(self, *specs, **kwargs):
"""
@@ -255,8 +278,24 @@ class YamlFilesystemView(FilesystemView):
Filesystem view to work with a yaml based directory layout.
"""
def __init__(self, root, layout, **kwargs):
super().__init__(root, layout, **kwargs)
def __init__(
self,
root: str,
layout: "spack.directory_layout.DirectoryLayout",
*,
projections: Optional[Dict] = None,
ignore_conflicts: bool = False,
verbose: bool = False,
link_type: str = "symlink",
):
super().__init__(
root,
layout,
projections=projections,
ignore_conflicts=ignore_conflicts,
verbose=verbose,
link_type=link_type,
)
# Super class gets projections from the kwargs
# YAML specific to get projections from YAML file
@@ -638,9 +677,6 @@ class SimpleFilesystemView(FilesystemView):
"""A simple and partial implementation of FilesystemView focused on performance and immutable
views, where specs cannot be removed after they were added."""
def __init__(self, root, layout, **kwargs):
super().__init__(root, layout, **kwargs)
def _sanity_check_view_projection(self, specs):
"""A very common issue is that we end up with two specs of the same package, that project
to the same prefix. We want to catch that as early as possible and give a sensible error to

View File

@@ -582,7 +582,7 @@ def dump_packages(spec: "spack.spec.Spec", path: str) -> None:
# Create a source repo and get the pkg directory out of it.
try:
source_repo = spack.repo.Repo(source_repo_root)
source_repo = spack.repo.from_path(source_repo_root)
source_pkg_dir = source_repo.dirname_for_package_name(node.name)
except spack.repo.RepoError as err:
tty.debug(f"Failed to create source repo for {node.name}: {str(err)}")
@@ -593,7 +593,7 @@ def dump_packages(spec: "spack.spec.Spec", path: str) -> None:
dest_repo_root = os.path.join(path, node.namespace)
if not os.path.exists(dest_repo_root):
spack.repo.create_repo(dest_repo_root)
repo = spack.repo.Repo(dest_repo_root)
repo = spack.repo.from_path(dest_repo_root)
# Get the location of the package in the dest repo.
dest_pkg_dir = repo.dirname_for_package_name(node.name)
@@ -1542,17 +1542,6 @@ def _add_tasks(self, request: BuildRequest, all_deps):
tty.warn(f"Installation request refused: {str(err)}")
return
# Skip out early if the spec is not being installed locally (i.e., if
# external or upstream).
#
# External and upstream packages need to get flagged as installed to
# ensure proper status tracking for environment build.
explicit = request.pkg.spec.dag_hash() in request.install_args.get("explicit", [])
not_local = _handle_external_and_upstream(request.pkg, explicit)
if not_local:
self._flag_installed(request.pkg)
return
install_compilers = spack.config.get("config:install_missing_compilers", False)
install_deps = request.install_args.get("install_deps")
@@ -2029,11 +2018,10 @@ def install(self) -> None:
# Skip the installation if the spec is not being installed locally
# (i.e., if external or upstream) BUT flag it as installed since
# some package likely depends on it.
if not task.explicit:
if _handle_external_and_upstream(pkg, False):
term_status.clear()
self._flag_installed(pkg, task.dependents)
continue
if _handle_external_and_upstream(pkg, task.explicit):
term_status.clear()
self._flag_installed(pkg, task.dependents)
continue
# Flag a failed spec. Do not need an (install) prefix lock since
# assume using a separate (failed) prefix lock file.

View File

@@ -444,8 +444,9 @@ def make_argument_parser(**kwargs):
"--config-scope",
dest="config_scopes",
action="append",
metavar="DIR",
help="add a custom configuration scope",
metavar="DIR|ENV",
help="add directory or environment as read-only configuration scope, without activating "
"the environment.",
)
parser.add_argument(
"-d",

View File

@@ -143,6 +143,7 @@ def __init__(self):
"12": "monterey",
"13": "ventura",
"14": "sonoma",
"15": "sequoia",
}
version = macos_version()

View File

@@ -35,6 +35,7 @@
import spack.compilers
import spack.config
import spack.dependency
import spack.deptypes as dt
import spack.directives
import spack.directory_layout
@@ -199,10 +200,10 @@ def __init__(cls, name, bases, attr_dict):
# assumed to be detectable
if hasattr(cls, "executables") or hasattr(cls, "libraries"):
# Append a tag to each detectable package, so that finding them is faster
if hasattr(cls, "tags"):
getattr(cls, "tags").append(DetectablePackageMeta.TAG)
else:
if not hasattr(cls, "tags"):
setattr(cls, "tags", [DetectablePackageMeta.TAG])
elif DetectablePackageMeta.TAG not in cls.tags:
cls.tags.append(DetectablePackageMeta.TAG)
@classmethod
def platform_executables(cls):
@@ -621,10 +622,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, RedistributionMixin, metaclass
#: By default do not run tests within package's install()
run_tests = False
#: Keep -Werror flags, matches config:flags:keep_werror to override config
# NOTE: should be type Optional[Literal['all', 'specific', 'none']] in 3.8+
keep_werror: Optional[str] = None
#: Most packages are NOT extendable. Set to True if you want extensions.
extendable = False
@@ -752,11 +749,6 @@ def __init__(self, spec):
self._fetch_time = 0.0
self.win_rpath = fsys.WindowsSimulatedRPath(self)
if self.is_extension:
pkg_cls = spack.repo.PATH.get_pkg_class(self.extendee_spec.name)
pkg_cls(self.extendee_spec)._check_extendable()
super().__init__()
@classmethod
@@ -930,6 +922,32 @@ def global_license_file(self):
self.global_license_dir, self.name, os.path.basename(self.license_files[0])
)
# NOTE: return type should be Optional[Literal['all', 'specific', 'none']] in
# Python 3.8+, but we still support 3.6.
@property
def keep_werror(self) -> Optional[str]:
"""Keep ``-Werror`` flags, matches ``config:flags:keep_werror`` to override config.
Valid return values are:
* ``"all"``: keep all ``-Werror`` flags.
* ``"specific"``: keep only ``-Werror=specific-warning`` flags.
* ``"none"``: filter out all ``-Werror*`` flags.
* ``None``: respect the user's configuration (``"none"`` by default).
"""
if self.spec.satisfies("%nvhpc@:23.3") or self.spec.satisfies("%pgi"):
# Filtering works by replacing -Werror with -Wno-error, but older nvhpc and
# PGI do not understand -Wno-error, so we disable filtering.
return "all"
elif self.spec.satisfies("%nvhpc@23.4:"):
# newer nvhpc supports -Wno-error but can't disable specific warnings with
# -Wno-error=warning. Skip -Werror=warning, but still filter -Werror.
return "specific"
else:
# use -Werror disablement by default for other compilers
return None
@property
def version(self):
if not self.spec.versions.concrete:
@@ -1119,10 +1137,9 @@ def _make_stage(self):
if not link_format:
link_format = "build-{arch}-{hash:7}"
stage_link = self.spec.format_path(link_format)
return DevelopStage(compute_stage_name(self.spec), dev_path, stage_link)
# To fetch the current version
source_stage = self._make_root_stage(self.fetcher)
source_stage = DevelopStage(compute_stage_name(self.spec), dev_path, stage_link)
else:
source_stage = self._make_root_stage(self.fetcher)
# all_stages is source + resources + patches
all_stages = StageComposite()
@@ -1451,10 +1468,8 @@ def do_fetch(self, mirror_only=False):
return
checksum = spack.config.get("config:checksum")
fetch = self.stage.needs_fetching
if (
checksum
and fetch
and (self.version not in self.versions)
and (not isinstance(self.version, GitVersion))
):
@@ -1561,13 +1576,11 @@ def do_patch(self):
tty.debug("Patching failed last time. Restaging.")
self.stage.restage()
else:
# develop specs/ DIYStages may have patch failures but
# should never be restaged
msg = (
"A patch failure was detected in %s." % self.name
+ " Build errors may occur due to this."
# develop specs may have patch failures but should never be restaged
tty.warn(
f"A patch failure was detected in {self.name}."
" Build errors may occur due to this."
)
tty.warn(msg)
return
# If this file exists, then we already applied all the patches.
@@ -2371,10 +2384,6 @@ def do_deprecate(self, deprecator, link_fn):
PackageBase.uninstall_by_spec(spec, force=True, deprecator=deprecator)
link_fn(deprecator.prefix, spec.prefix)
def _check_extendable(self):
if not self.extendable:
raise ValueError("Package %s is not extendable!" % self.name)
def view(self):
"""Create a view with the prefix of this package as the root.
Extensions added to this view will modify the installation prefix of

View File

@@ -328,19 +328,26 @@ def next_spec(
if not self.ctx.next_token:
return initial_spec
def add_dependency(dep, **edge_properties):
"""wrapper around root_spec._add_dependency"""
try:
root_spec._add_dependency(dep, **edge_properties)
except spack.error.SpecError as e:
raise SpecParsingError(str(e), self.ctx.current_token, self.literal_str) from e
initial_spec = initial_spec or spack.spec.Spec()
root_spec = SpecNodeParser(self.ctx).parse(initial_spec)
root_spec = SpecNodeParser(self.ctx, self.literal_str).parse(initial_spec)
while True:
if self.ctx.accept(TokenType.START_EDGE_PROPERTIES):
edge_properties = EdgeAttributeParser(self.ctx, self.literal_str).parse()
edge_properties.setdefault("depflag", 0)
edge_properties.setdefault("virtuals", ())
dependency = self._parse_node(root_spec)
root_spec._add_dependency(dependency, **edge_properties)
add_dependency(dependency, **edge_properties)
elif self.ctx.accept(TokenType.DEPENDENCY):
dependency = self._parse_node(root_spec)
root_spec._add_dependency(dependency, depflag=0, virtuals=())
add_dependency(dependency, depflag=0, virtuals=())
else:
break
@@ -348,7 +355,7 @@ def next_spec(
return root_spec
def _parse_node(self, root_spec):
dependency = SpecNodeParser(self.ctx).parse()
dependency = SpecNodeParser(self.ctx, self.literal_str).parse()
if dependency is None:
msg = (
"the dependency sigil and any optional edge attributes must be followed by a "
@@ -367,10 +374,11 @@ def all_specs(self) -> List["spack.spec.Spec"]:
class SpecNodeParser:
"""Parse a single spec node from a stream of tokens"""
__slots__ = "ctx", "has_compiler", "has_version"
__slots__ = "ctx", "has_compiler", "has_version", "literal_str"
def __init__(self, ctx):
def __init__(self, ctx, literal_str):
self.ctx = ctx
self.literal_str = literal_str
self.has_compiler = False
self.has_version = False
@@ -388,7 +396,8 @@ def parse(
if not self.ctx.next_token or self.ctx.expect(TokenType.DEPENDENCY):
return initial_spec
initial_spec = initial_spec or spack.spec.Spec()
if initial_spec is None:
initial_spec = spack.spec.Spec()
# If we start with a package name we have a named spec, we cannot
# accept another package name afterwards in a node
@@ -405,12 +414,21 @@ def parse(
elif self.ctx.accept(TokenType.FILENAME):
return FileParser(self.ctx).parse(initial_spec)
def raise_parsing_error(string: str, cause: Optional[Exception] = None):
"""Raise a spec parsing error with token context."""
raise SpecParsingError(string, self.ctx.current_token, self.literal_str) from cause
def add_flag(name: str, value: str, propagate: bool):
"""Wrapper around ``Spec._add_flag()`` that adds parser context to errors raised."""
try:
initial_spec._add_flag(name, value, propagate)
except Exception as e:
raise_parsing_error(str(e), e)
while True:
if self.ctx.accept(TokenType.COMPILER):
if self.has_compiler:
raise spack.spec.DuplicateCompilerSpecError(
f"{initial_spec} cannot have multiple compilers"
)
raise_parsing_error("Spec cannot have multiple compilers")
compiler_name = self.ctx.current_token.value[1:]
initial_spec.compiler = spack.spec.CompilerSpec(compiler_name.strip(), ":")
@@ -418,9 +436,7 @@ def parse(
elif self.ctx.accept(TokenType.COMPILER_AND_VERSION):
if self.has_compiler:
raise spack.spec.DuplicateCompilerSpecError(
f"{initial_spec} cannot have multiple compilers"
)
raise_parsing_error("Spec cannot have multiple compilers")
compiler_name, compiler_version = self.ctx.current_token.value[1:].split("@")
initial_spec.compiler = spack.spec.CompilerSpec(
@@ -434,9 +450,8 @@ def parse(
or self.ctx.accept(TokenType.VERSION)
):
if self.has_version:
raise spack.spec.MultipleVersionError(
f"{initial_spec} cannot have multiple versions"
)
raise_parsing_error("Spec cannot have multiple versions")
initial_spec.versions = spack.version.VersionList(
[spack.version.from_string(self.ctx.current_token.value[1:])]
)
@@ -445,29 +460,25 @@ def parse(
elif self.ctx.accept(TokenType.BOOL_VARIANT):
variant_value = self.ctx.current_token.value[0] == "+"
initial_spec._add_flag(
self.ctx.current_token.value[1:].strip(), variant_value, propagate=False
)
add_flag(self.ctx.current_token.value[1:].strip(), variant_value, propagate=False)
elif self.ctx.accept(TokenType.PROPAGATED_BOOL_VARIANT):
variant_value = self.ctx.current_token.value[0:2] == "++"
initial_spec._add_flag(
self.ctx.current_token.value[2:].strip(), variant_value, propagate=True
)
add_flag(self.ctx.current_token.value[2:].strip(), variant_value, propagate=True)
elif self.ctx.accept(TokenType.KEY_VALUE_PAIR):
match = SPLIT_KVP.match(self.ctx.current_token.value)
assert match, "SPLIT_KVP and KEY_VALUE_PAIR do not agree."
name, delim, value = match.groups()
initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=False)
name, _, value = match.groups()
add_flag(name, strip_quotes_and_unescape(value), propagate=False)
elif self.ctx.accept(TokenType.PROPAGATED_KEY_VALUE_PAIR):
match = SPLIT_KVP.match(self.ctx.current_token.value)
assert match, "SPLIT_KVP and PROPAGATED_KEY_VALUE_PAIR do not agree."
name, delim, value = match.groups()
initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=True)
name, _, value = match.groups()
add_flag(name, strip_quotes_and_unescape(value), propagate=True)
elif self.ctx.expect(TokenType.DAG_HASH):
if initial_spec.abstract_hash:

View File

@@ -9,7 +9,7 @@
import os.path
import pathlib
import sys
from typing import Any, Dict, Optional, Tuple, Type
from typing import Any, Dict, Optional, Tuple, Type, Union
import llnl.util.filesystem
from llnl.url import allowed_archive
@@ -65,6 +65,9 @@ def apply_patch(
patch(*args)
PatchPackageType = Union["spack.package_base.PackageBase", Type["spack.package_base.PackageBase"]]
class Patch:
"""Base class for patches.
@@ -77,7 +80,7 @@ class Patch:
def __init__(
self,
pkg: "spack.package_base.PackageBase",
pkg: PatchPackageType,
path_or_url: str,
level: int,
working_dir: str,
@@ -159,7 +162,7 @@ class FilePatch(Patch):
def __init__(
self,
pkg: "spack.package_base.PackageBase",
pkg: PatchPackageType,
relative_path: str,
level: int,
working_dir: str,
@@ -183,7 +186,7 @@ def __init__(
abs_path: Optional[str] = None
# At different times we call FilePatch on instances and classes
pkg_cls = pkg if inspect.isclass(pkg) else pkg.__class__
for cls in inspect.getmro(pkg_cls):
for cls in inspect.getmro(pkg_cls): # type: ignore
if not hasattr(cls, "module"):
# We've gone too far up the MRO
break
@@ -242,7 +245,7 @@ class UrlPatch(Patch):
def __init__(
self,
pkg: "spack.package_base.PackageBase",
pkg: PatchPackageType,
url: str,
level: int = 1,
*,
@@ -361,8 +364,9 @@ def from_dict(
"""
repository = repository or spack.repo.PATH
owner = dictionary.get("owner")
if "owner" not in dictionary:
raise ValueError("Invalid patch dictionary: %s" % dictionary)
if owner is None:
raise ValueError(f"Invalid patch dictionary: {dictionary}")
assert isinstance(owner, str)
pkg_cls = repository.get_pkg_class(owner)
if "url" in dictionary:

View File

@@ -25,7 +25,8 @@
import traceback
import types
import uuid
from typing import Any, Dict, List, Set, Tuple, Union
import warnings
from typing import Any, Dict, Generator, List, Optional, Set, Tuple, Type, Union
import llnl.path
import llnl.util.filesystem as fs
@@ -126,11 +127,35 @@ def exec_module(self, module):
class ReposFinder:
"""MetaPathFinder class that loads a Python module corresponding to a Spack package
"""MetaPathFinder class that loads a Python module corresponding to a Spack package.
Return a loader based on the inspection of the current global repository list.
Returns a loader based on the inspection of the current repository list.
"""
def __init__(self):
self._repo_init = _path
self._repo = None
@property
def current_repository(self):
if self._repo is None:
self._repo = self._repo_init()
return self._repo
@current_repository.setter
def current_repository(self, value):
self._repo = value
@contextlib.contextmanager
def switch_repo(self, substitute: "RepoType"):
"""Switch the current repository list for the duration of the context manager."""
old = self.current_repository
try:
self.current_repository = substitute
yield
finally:
self.current_repository = old
def find_spec(self, fullname, python_path, target=None):
# "target" is not None only when calling importlib.reload()
if target is not None:
@@ -149,9 +174,14 @@ def compute_loader(self, fullname):
# namespaces are added to repo, and package modules are leaves.
namespace, dot, module_name = fullname.rpartition(".")
# If it's a module in some repo, or if it is the repo's
# namespace, let the repo handle it.
for repo in PATH.repos:
# If it's a module in some repo, or if it is the repo's namespace, let the repo handle it.
is_repo_path = isinstance(self.current_repository, RepoPath)
if is_repo_path:
repos = self.current_repository.repos
else:
repos = [self.current_repository]
for repo in repos:
# We are using the namespace of the repo and the repo contains the package
if namespace == repo.full_namespace:
# With 2 nested conditionals we can call "repo.real_name" only once
@@ -165,7 +195,7 @@ def compute_loader(self, fullname):
# No repo provides the namespace, but it is a valid prefix of
# something in the RepoPath.
if PATH.by_namespace.is_prefix(fullname):
if is_repo_path and self.current_repository.by_namespace.is_prefix(fullname):
return SpackNamespaceLoader()
return None
@@ -560,7 +590,7 @@ def __init__(
self,
package_checker: FastPackageChecker,
namespace: str,
cache: spack.util.file_cache.FileCache,
cache: "spack.caches.FileCacheType",
):
self.checker = package_checker
self.packages_path = self.checker.packages_path
@@ -645,33 +675,39 @@ class RepoPath:
repository.
Args:
repos (list): list Repo objects or paths to put in this RepoPath
repos: list Repo objects or paths to put in this RepoPath
cache: file cache associated with this repository
overrides: dict mapping package name to class attribute overrides for that package
"""
def __init__(self, *repos, **kwargs):
cache = kwargs.get("cache", spack.caches.MISC_CACHE)
self.repos = []
def __init__(
self,
*repos: Union[str, "Repo"],
cache: "spack.caches.FileCacheType",
overrides: Optional[Dict[str, Any]] = None,
) -> None:
self.repos: List[Repo] = []
self.by_namespace = nm.NamespaceTrie()
self._provider_index = None
self._patch_index = None
self._tag_index = None
self._provider_index: Optional[spack.provider_index.ProviderIndex] = None
self._patch_index: Optional[spack.patch.PatchCache] = None
self._tag_index: Optional[spack.tag.TagIndex] = None
# Add each repo to this path.
for repo in repos:
try:
if isinstance(repo, str):
repo = Repo(repo, cache=cache)
repo = Repo(repo, cache=cache, overrides=overrides)
repo.finder(self)
self.put_last(repo)
except RepoError as e:
tty.warn(
"Failed to initialize repository: '%s'." % repo,
f"Failed to initialize repository: '{repo}'.",
e.message,
"To remove the bad repository, run this command:",
" spack repo rm %s" % repo,
f" spack repo rm {repo}",
)
def put_first(self, repo):
def put_first(self, repo: "Repo") -> None:
"""Add repo first in the search path."""
if isinstance(repo, RepoPath):
for r in reversed(repo.repos):
@@ -699,50 +735,34 @@ def remove(self, repo):
if repo in self.repos:
self.repos.remove(repo)
def get_repo(self, namespace, default=NOT_PROVIDED):
"""Get a repository by namespace.
Arguments:
namespace:
Look up this namespace in the RepoPath, and return it if found.
Optional Arguments:
default:
If default is provided, return it when the namespace
isn't found. If not, raise an UnknownNamespaceError.
"""
def get_repo(self, namespace: str) -> "Repo":
"""Get a repository by namespace."""
full_namespace = python_package_for_repo(namespace)
if full_namespace not in self.by_namespace:
if default == NOT_PROVIDED:
raise UnknownNamespaceError(namespace)
return default
raise UnknownNamespaceError(namespace)
return self.by_namespace[full_namespace]
def first_repo(self):
def first_repo(self) -> Optional["Repo"]:
"""Get the first repo in precedence order."""
return self.repos[0] if self.repos else None
@llnl.util.lang.memoized
def _all_package_names_set(self, include_virtuals):
def _all_package_names_set(self, include_virtuals) -> Set[str]:
return {name for repo in self.repos for name in repo.all_package_names(include_virtuals)}
@llnl.util.lang.memoized
def _all_package_names(self, include_virtuals):
def _all_package_names(self, include_virtuals: bool) -> List[str]:
"""Return all unique package names in all repositories."""
return sorted(self._all_package_names_set(include_virtuals), key=lambda n: n.lower())
def all_package_names(self, include_virtuals=False):
def all_package_names(self, include_virtuals: bool = False) -> List[str]:
return self._all_package_names(include_virtuals)
def package_path(self, name):
def package_path(self, name: str) -> str:
"""Get path to package.py file for this repo."""
return self.repo_for_pkg(name).package_path(name)
def all_package_paths(self):
def all_package_paths(self) -> Generator[str, None, None]:
for name in self.all_package_names():
yield self.package_path(name)
@@ -758,53 +778,52 @@ def packages_with_tags(self, *tags: str, full: bool = False) -> Set[str]:
for pkg in repo.packages_with_tags(*tags)
}
def all_package_classes(self):
def all_package_classes(self) -> Generator[Type["spack.package_base.PackageBase"], None, None]:
for name in self.all_package_names():
yield self.get_pkg_class(name)
@property
def provider_index(self):
def provider_index(self) -> spack.provider_index.ProviderIndex:
"""Merged ProviderIndex from all Repos in the RepoPath."""
if self._provider_index is None:
self._provider_index = spack.provider_index.ProviderIndex(repository=self)
for repo in reversed(self.repos):
self._provider_index.merge(repo.provider_index)
return self._provider_index
@property
def tag_index(self):
def tag_index(self) -> spack.tag.TagIndex:
"""Merged TagIndex from all Repos in the RepoPath."""
if self._tag_index is None:
self._tag_index = spack.tag.TagIndex(repository=self)
for repo in reversed(self.repos):
self._tag_index.merge(repo.tag_index)
return self._tag_index
@property
def patch_index(self):
def patch_index(self) -> spack.patch.PatchCache:
"""Merged PatchIndex from all Repos in the RepoPath."""
if self._patch_index is None:
self._patch_index = spack.patch.PatchCache(repository=self)
for repo in reversed(self.repos):
self._patch_index.update(repo.patch_index)
return self._patch_index
@autospec
def providers_for(self, vpkg_spec):
def providers_for(self, virtual_spec: "spack.spec.Spec") -> List["spack.spec.Spec"]:
providers = [
spec
for spec in self.provider_index.providers_for(vpkg_spec)
for spec in self.provider_index.providers_for(virtual_spec)
if spec.name in self._all_package_names_set(include_virtuals=False)
]
if not providers:
raise UnknownPackageError(vpkg_spec.fullname)
raise UnknownPackageError(virtual_spec.fullname)
return providers
@autospec
def extensions_for(self, extendee_spec):
def extensions_for(
self, extendee_spec: "spack.spec.Spec"
) -> List["spack.package_base.PackageBase"]:
return [
pkg_cls(spack.spec.Spec(pkg_cls.name))
for pkg_cls in self.all_package_classes()
@@ -815,7 +834,7 @@ def last_mtime(self):
"""Time a package file in this repo was last updated."""
return max(repo.last_mtime() for repo in self.repos)
def repo_for_pkg(self, spec):
def repo_for_pkg(self, spec: Union[str, "spack.spec.Spec"]) -> "Repo":
"""Given a spec, get the repository for its package."""
# We don't @_autospec this function b/c it's called very frequently
# and we want to avoid parsing str's into Specs unnecessarily.
@@ -840,17 +859,20 @@ def repo_for_pkg(self, spec):
return repo
# If the package isn't in any repo, return the one with
# highest precedence. This is for commands like `spack edit`
# highest precedence. This is for commands like `spack edit`
# that can operate on packages that don't exist yet.
return self.first_repo()
selected = self.first_repo()
if selected is None:
raise UnknownPackageError(name)
return selected
def get(self, spec):
def get(self, spec: "spack.spec.Spec") -> "spack.package_base.PackageBase":
"""Returns the package associated with the supplied spec."""
msg = "RepoPath.get can only be called on concrete specs"
assert isinstance(spec, spack.spec.Spec) and spec.concrete, msg
return self.repo_for_pkg(spec).get(spec)
def get_pkg_class(self, pkg_name):
def get_pkg_class(self, pkg_name: str) -> Type["spack.package_base.PackageBase"]:
"""Find a class for the spec's package and return the class object."""
return self.repo_for_pkg(pkg_name).get_pkg_class(pkg_name)
@@ -863,26 +885,26 @@ def dump_provenance(self, spec, path):
"""
return self.repo_for_pkg(spec).dump_provenance(spec, path)
def dirname_for_package_name(self, pkg_name):
def dirname_for_package_name(self, pkg_name: str) -> str:
return self.repo_for_pkg(pkg_name).dirname_for_package_name(pkg_name)
def filename_for_package_name(self, pkg_name):
def filename_for_package_name(self, pkg_name: str) -> str:
return self.repo_for_pkg(pkg_name).filename_for_package_name(pkg_name)
def exists(self, pkg_name):
def exists(self, pkg_name: str) -> bool:
"""Whether package with the give name exists in the path's repos.
Note that virtual packages do not "exist".
"""
return any(repo.exists(pkg_name) for repo in self.repos)
def _have_name(self, pkg_name):
def _have_name(self, pkg_name: str) -> bool:
have_name = pkg_name is not None
if have_name and not isinstance(pkg_name, str):
raise ValueError("is_virtual(): expected package name, got %s" % type(pkg_name))
raise ValueError(f"is_virtual(): expected package name, got {type(pkg_name)}")
return have_name
def is_virtual(self, pkg_name):
def is_virtual(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function use the provider index. If calling from a code block that
@@ -894,7 +916,7 @@ def is_virtual(self, pkg_name):
have_name = self._have_name(pkg_name)
return have_name and pkg_name in self.provider_index
def is_virtual_safe(self, pkg_name):
def is_virtual_safe(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function doesn't use the provider index.
@@ -915,18 +937,28 @@ class Repo:
Each package repository must have a top-level configuration file
called `repo.yaml`.
Currently, `repo.yaml` this must define:
Currently, `repo.yaml` must define:
`namespace`:
A Python namespace where the repository's packages should live.
`subdirectory`:
An optional subdirectory name where packages are placed
"""
def __init__(self, root, cache=None):
def __init__(
self,
root: str,
*,
cache: "spack.caches.FileCacheType",
overrides: Optional[Dict[str, Any]] = None,
) -> None:
"""Instantiate a package repository from a filesystem path.
Args:
root: the root directory of the repository
cache: file cache associated with this repository
overrides: dict mapping package name to class attribute overrides for that package
"""
# Root directory, containing _repo.yaml and package dirs
# Allow roots to by spack-relative by starting with '$spack'
@@ -939,20 +971,20 @@ def check(condition, msg):
# Validate repository layout.
self.config_file = os.path.join(self.root, repo_config_name)
check(os.path.isfile(self.config_file), "No %s found in '%s'" % (repo_config_name, root))
check(os.path.isfile(self.config_file), f"No {repo_config_name} found in '{root}'")
# Read configuration and validate namespace
config = self._read_config()
check(
"namespace" in config,
"%s must define a namespace." % os.path.join(root, repo_config_name),
f"{os.path.join(root, repo_config_name)} must define a namespace.",
)
self.namespace = config["namespace"]
check(
re.match(r"[a-zA-Z][a-zA-Z0-9_.]+", self.namespace),
("Invalid namespace '%s' in repo '%s'. " % (self.namespace, self.root))
+ "Namespaces must be valid python identifiers separated by '.'",
f"Invalid namespace '{self.namespace}' in repo '{self.root}'. "
"Namespaces must be valid python identifiers separated by '.'",
)
# Set up 'full_namespace' to include the super-namespace
@@ -964,23 +996,26 @@ def check(condition, msg):
packages_dir = config.get("subdirectory", packages_dir_name)
self.packages_path = os.path.join(self.root, packages_dir)
check(
os.path.isdir(self.packages_path),
"No directory '%s' found in '%s'" % (packages_dir, root),
os.path.isdir(self.packages_path), f"No directory '{packages_dir}' found in '{root}'"
)
# These are internal cache variables.
self._modules = {}
self._classes = {}
self._instances = {}
# Class attribute overrides by package name
self.overrides = overrides or {}
# Optional reference to a RepoPath to influence module import from spack.pkg
self._finder: Optional[RepoPath] = None
# Maps that goes from package name to corresponding file stat
self._fast_package_checker = None
self._fast_package_checker: Optional[FastPackageChecker] = None
# Indexes for this repository, computed lazily
self._repo_index = None
self._cache = cache or spack.caches.MISC_CACHE
self._repo_index: Optional[RepoIndex] = None
self._cache = cache
def real_name(self, import_name):
def finder(self, value: RepoPath) -> None:
self._finder = value
def real_name(self, import_name: str) -> Optional[str]:
"""Allow users to import Spack packages using Python identifiers.
A python identifier might map to many different Spack package
@@ -999,18 +1034,21 @@ def real_name(self, import_name):
return import_name
options = nm.possible_spack_module_names(import_name)
options.remove(import_name)
try:
options.remove(import_name)
except ValueError:
pass
for name in options:
if name in self:
return name
return None
def is_prefix(self, fullname):
def is_prefix(self, fullname: str) -> bool:
"""True if fullname is a prefix of this Repo's namespace."""
parts = fullname.split(".")
return self._names[: len(parts)] == parts
def _read_config(self):
def _read_config(self) -> Dict[str, str]:
"""Check for a YAML config file in this db's root directory."""
try:
with open(self.config_file) as reponame_file:
@@ -1021,14 +1059,14 @@ def _read_config(self):
or "repo" not in yaml_data
or not isinstance(yaml_data["repo"], dict)
):
tty.die("Invalid %s in repository %s" % (repo_config_name, self.root))
tty.die(f"Invalid {repo_config_name} in repository {self.root}")
return yaml_data["repo"]
except IOError:
tty.die("Error reading %s when opening %s" % (self.config_file, self.root))
tty.die(f"Error reading {self.config_file} when opening {self.root}")
def get(self, spec):
def get(self, spec: "spack.spec.Spec") -> "spack.package_base.PackageBase":
"""Returns the package associated with the supplied spec."""
msg = "Repo.get can only be called on concrete specs"
assert isinstance(spec, spack.spec.Spec) and spec.concrete, msg
@@ -1049,16 +1087,13 @@ def get(self, spec):
# pass these through as their error messages will be fine.
raise
except Exception as e:
tty.debug(e)
# Make sure other errors in constructors hit the error
# handler by wrapping them
if spack.config.get("config:debug"):
sys.excepthook(*sys.exc_info())
raise FailedConstructorError(spec.fullname, *sys.exc_info())
tty.debug(e)
raise FailedConstructorError(spec.fullname, *sys.exc_info()) from e
@autospec
def dump_provenance(self, spec, path):
def dump_provenance(self, spec: "spack.spec.Spec", path: str) -> None:
"""Dump provenance information for a spec to a particular path.
This dumps the package file and any associated patch files.
@@ -1066,7 +1101,7 @@ def dump_provenance(self, spec, path):
"""
if spec.namespace and spec.namespace != self.namespace:
raise UnknownPackageError(
"Repository %s does not contain package %s." % (self.namespace, spec.fullname)
f"Repository {self.namespace} does not contain package {spec.fullname}."
)
package_path = self.filename_for_package_name(spec.name)
@@ -1083,17 +1118,13 @@ def dump_provenance(self, spec, path):
if os.path.exists(patch.path):
fs.install(patch.path, path)
else:
tty.warn("Patch file did not exist: %s" % patch.path)
warnings.warn(f"Patch file did not exist: {patch.path}")
# Install the package.py file itself.
fs.install(self.filename_for_package_name(spec.name), path)
def purge(self):
"""Clear entire package instance cache."""
self._instances.clear()
@property
def index(self):
def index(self) -> RepoIndex:
"""Construct the index for this repo lazily."""
if self._repo_index is None:
self._repo_index = RepoIndex(self._pkg_checker, self.namespace, cache=self._cache)
@@ -1103,42 +1134,40 @@ def index(self):
return self._repo_index
@property
def provider_index(self):
def provider_index(self) -> spack.provider_index.ProviderIndex:
"""A provider index with names *specific* to this repo."""
return self.index["providers"]
@property
def tag_index(self):
def tag_index(self) -> spack.tag.TagIndex:
"""Index of tags and which packages they're defined on."""
return self.index["tags"]
@property
def patch_index(self):
def patch_index(self) -> spack.patch.PatchCache:
"""Index of patches and packages they're defined on."""
return self.index["patches"]
@autospec
def providers_for(self, vpkg_spec):
def providers_for(self, vpkg_spec: "spack.spec.Spec") -> List["spack.spec.Spec"]:
providers = self.provider_index.providers_for(vpkg_spec)
if not providers:
raise UnknownPackageError(vpkg_spec.fullname)
return providers
@autospec
def extensions_for(self, extendee_spec):
return [
pkg_cls(spack.spec.Spec(pkg_cls.name))
for pkg_cls in self.all_package_classes()
if pkg_cls(spack.spec.Spec(pkg_cls.name)).extends(extendee_spec)
]
def extensions_for(
self, extendee_spec: "spack.spec.Spec"
) -> List["spack.package_base.PackageBase"]:
result = [pkg_cls(spack.spec.Spec(pkg_cls.name)) for pkg_cls in self.all_package_classes()]
return [x for x in result if x.extends(extendee_spec)]
def dirname_for_package_name(self, pkg_name):
"""Get the directory name for a particular package. This is the
directory that contains its package.py file."""
def dirname_for_package_name(self, pkg_name: str) -> str:
"""Given a package name, get the directory containing its package.py file."""
_, unqualified_name = self.partition_package_name(pkg_name)
return os.path.join(self.packages_path, unqualified_name)
def filename_for_package_name(self, pkg_name):
def filename_for_package_name(self, pkg_name: str) -> str:
"""Get the filename for the module we should load for a particular
package. Packages for a Repo live in
``$root/<package_name>/package.py``
@@ -1151,23 +1180,23 @@ def filename_for_package_name(self, pkg_name):
return os.path.join(pkg_dir, package_file_name)
@property
def _pkg_checker(self):
def _pkg_checker(self) -> FastPackageChecker:
if self._fast_package_checker is None:
self._fast_package_checker = FastPackageChecker(self.packages_path)
return self._fast_package_checker
def all_package_names(self, include_virtuals=False):
def all_package_names(self, include_virtuals: bool = False) -> List[str]:
"""Returns a sorted list of all package names in the Repo."""
names = sorted(self._pkg_checker.keys())
if include_virtuals:
return names
return [x for x in names if not self.is_virtual(x)]
def package_path(self, name):
def package_path(self, name: str) -> str:
"""Get path to package.py file for this repo."""
return os.path.join(self.packages_path, name, package_file_name)
def all_package_paths(self):
def all_package_paths(self) -> Generator[str, None, None]:
for name in self.all_package_names():
yield self.package_path(name)
@@ -1176,7 +1205,7 @@ def packages_with_tags(self, *tags: str) -> Set[str]:
v.intersection_update(*(self.tag_index[tag.lower()] for tag in tags))
return v
def all_package_classes(self):
def all_package_classes(self) -> Generator[Type["spack.package_base.PackageBase"], None, None]:
"""Iterator over all package *classes* in the repository.
Use this with care, because loading packages is slow.
@@ -1184,7 +1213,7 @@ def all_package_classes(self):
for name in self.all_package_names():
yield self.get_pkg_class(name)
def exists(self, pkg_name):
def exists(self, pkg_name: str) -> bool:
"""Whether a package with the supplied name exists."""
if pkg_name is None:
return False
@@ -1201,28 +1230,22 @@ def last_mtime(self):
"""Time a package file in this repo was last updated."""
return self._pkg_checker.last_mtime()
def is_virtual(self, pkg_name):
def is_virtual(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function use the provider index. If calling from a code block that
is used to construct the provider index use the ``is_virtual_safe`` function.
Args:
pkg_name (str): name of the package we want to check
"""
return pkg_name in self.provider_index
def is_virtual_safe(self, pkg_name):
def is_virtual_safe(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function doesn't use the provider index.
Args:
pkg_name (str): name of the package we want to check
"""
return not self.exists(pkg_name) or self.get_pkg_class(pkg_name).virtual
def get_pkg_class(self, pkg_name):
def get_pkg_class(self, pkg_name: str) -> Type["spack.package_base.PackageBase"]:
"""Get the class for the package out of its module.
First loads (or fetches from cache) a module for the
@@ -1234,7 +1257,8 @@ def get_pkg_class(self, pkg_name):
fullname = f"{self.full_namespace}.{pkg_name}"
try:
module = importlib.import_module(fullname)
with REPOS_FINDER.switch_repo(self._finder or self):
module = importlib.import_module(fullname)
except ImportError:
raise UnknownPackageError(fullname)
except Exception as e:
@@ -1245,26 +1269,21 @@ def get_pkg_class(self, pkg_name):
if not inspect.isclass(cls):
tty.die(f"{pkg_name}.{class_name} is not a class")
new_cfg_settings = (
spack.config.get("packages").get(pkg_name, {}).get("package_attributes", {})
)
# Clear any prior changes to class attributes in case the class was loaded from the
# same repo, but with different overrides
overridden_attrs = getattr(cls, "overridden_attrs", {})
attrs_exclusively_from_config = getattr(cls, "attrs_exclusively_from_config", [])
# Clear any prior changes to class attributes in case the config has
# since changed
for key, val in overridden_attrs.items():
setattr(cls, key, val)
for key in attrs_exclusively_from_config:
delattr(cls, key)
# Keep track of every class attribute that is overridden by the config:
# if the config changes between calls to this method, we make sure to
# restore the original config values (in case the new config no longer
# sets attributes that it used to)
# Keep track of every class attribute that is overridden: if different overrides
# dictionaries are used on the same physical repo, we make sure to restore the original
# config values
new_overridden_attrs = {}
new_attrs_exclusively_from_config = set()
for key, val in new_cfg_settings.items():
for key, val in self.overrides.get(pkg_name, {}).items():
if hasattr(cls, key):
new_overridden_attrs[key] = getattr(cls, key)
else:
@@ -1291,13 +1310,13 @@ def partition_package_name(self, pkg_name: str) -> Tuple[str, str]:
return namespace, pkg_name
def __str__(self):
return "[Repo '%s' at '%s']" % (self.namespace, self.root)
def __str__(self) -> str:
return f"Repo '{self.namespace}' at {self.root}"
def __repr__(self):
def __repr__(self) -> str:
return self.__str__()
def __contains__(self, pkg_name):
def __contains__(self, pkg_name: str) -> bool:
return self.exists(pkg_name)
@@ -1373,12 +1392,17 @@ def create_repo(root, namespace=None, subdir=packages_dir_name):
return full_path, namespace
def from_path(path: str) -> "Repo":
"""Returns a repository from the path passed as input. Injects the global misc cache."""
return Repo(path, cache=spack.caches.MISC_CACHE)
def create_or_construct(path, namespace=None):
"""Create a repository, or just return a Repo if it already exists."""
if not os.path.exists(path):
fs.mkdirp(path)
create_repo(path, namespace)
return Repo(path)
return from_path(path)
def _path(configuration=None):
@@ -1387,7 +1411,9 @@ def _path(configuration=None):
return create(configuration=configuration)
def create(configuration):
def create(
configuration: Union["spack.config.Configuration", llnl.util.lang.Singleton]
) -> RepoPath:
"""Create a RepoPath from a configuration object.
Args:
@@ -1396,7 +1422,17 @@ def create(configuration):
repo_dirs = configuration.get("repos")
if not repo_dirs:
raise NoRepoConfiguredError("Spack configuration contains no package repositories.")
return RepoPath(*repo_dirs)
overrides = {}
for pkg_name, data in configuration.get("packages").items():
if pkg_name == "all":
continue
value = data.get("package_attributes", {})
if not value:
continue
overrides[pkg_name] = value
return RepoPath(*repo_dirs, cache=spack.caches.MISC_CACHE, overrides=overrides)
#: Singleton repo path instance
@@ -1413,20 +1449,20 @@ def all_package_names(include_virtuals=False):
@contextlib.contextmanager
def use_repositories(*paths_and_repos, **kwargs):
def use_repositories(
*paths_and_repos: Union[str, Repo], override: bool = True
) -> Generator[RepoPath, None, None]:
"""Use the repositories passed as arguments within the context manager.
Args:
*paths_and_repos: paths to the repositories to be used, or
already constructed Repo objects
override (bool): if True use only the repositories passed as input,
override: if True use only the repositories passed as input,
if False add them to the top of the list of current repositories.
Returns:
Corresponding RepoPath object
"""
global PATH
# TODO (Python 2.7): remove this kwargs on deprecation of Python 2.7 support
override = kwargs.get("override", True)
paths = [getattr(x, "root", x) for x in paths_and_repos]
scope_name = "use-repo-{}".format(uuid.uuid4())
repos_key = "repos:" if override else "repos"
@@ -1435,7 +1471,8 @@ def use_repositories(*paths_and_repos, **kwargs):
)
PATH, saved = create(configuration=spack.config.CONFIG), PATH
try:
yield PATH
with REPOS_FINDER.switch_repo(PATH): # type: ignore
yield PATH
finally:
spack.config.CONFIG.remove_scope(scope_name=scope_name)
PATH = saved
@@ -1535,10 +1572,9 @@ class UnknownNamespaceError(UnknownEntityError):
"""Raised when we encounter an unknown namespace"""
def __init__(self, namespace, name=None):
msg, long_msg = "Unknown namespace: {}".format(namespace), None
msg, long_msg = f"Unknown namespace: {namespace}", None
if name == "yaml":
long_msg = "Did you mean to specify a filename with './{}.{}'?"
long_msg = long_msg.format(namespace, name)
long_msg = f"Did you mean to specify a filename with './{namespace}.{name}'?"
super().__init__(msg, long_msg)

View File

@@ -23,6 +23,7 @@
import llnl.util.lang
import llnl.util.tty as tty
from llnl.util.lang import elide_list
import spack
import spack.binary_distribution
@@ -116,6 +117,8 @@ class Provenance(enum.IntEnum):
PACKAGE_PY = enum.auto()
# An installed spec
INSTALLED = enum.auto()
# lower provenance for installed git refs so concretizer prefers StandardVersion installs
INSTALLED_GIT_VERSION = enum.auto()
# A runtime injected from another package (e.g. a compiler)
RUNTIME = enum.auto()
@@ -619,8 +622,9 @@ def _external_config_with_implicit_externals(configuration):
class ErrorHandler:
def __init__(self, model):
def __init__(self, model, input_specs: List[spack.spec.Spec]):
self.model = model
self.input_specs = input_specs
self.full_model = None
def multiple_values_error(self, attribute, pkg):
@@ -707,12 +711,13 @@ def handle_error(self, msg, *args):
return msg
def message(self, errors) -> str:
messages = [
f" {idx+1: 2}. {self.handle_error(msg, *args)}"
input_specs = ", ".join(elide_list([f"`{s}`" for s in self.input_specs], 5))
header = f"failed to concretize {input_specs} for the following reasons:"
messages = (
f" {idx+1:2}. {self.handle_error(msg, *args)}"
for idx, (_, msg, args) in enumerate(errors)
]
header = "concretization failed for the following reasons:\n"
return "\n".join([header] + messages)
)
return "\n".join((header, *messages))
def raise_if_errors(self):
initial_error_args = extract_args(self.model, "error")
@@ -748,7 +753,7 @@ def on_model(model):
f"unexpected error during concretization [{str(e)}]. "
f"Please report a bug at https://github.com/spack/spack/issues"
)
raise spack.error.SpackError(msg)
raise spack.error.SpackError(msg) from e
raise UnsatisfiableSpecError(msg)
@@ -844,8 +849,6 @@ def solve(self, setup, specs, reuse=None, output=None, control=None, allow_depre
parent_dir = os.path.dirname(__file__)
self.control.load(os.path.join(parent_dir, "concretize.lp"))
self.control.load(os.path.join(parent_dir, "heuristic.lp"))
if spack.config.CONFIG.get("concretizer:duplicates:strategy", "none") != "none":
self.control.load(os.path.join(parent_dir, "heuristic_separate.lp"))
self.control.load(os.path.join(parent_dir, "display.lp"))
if not setup.concretize_everything:
self.control.load(os.path.join(parent_dir, "when_possible.lp"))
@@ -894,7 +897,7 @@ def on_model(model):
min_cost, best_model = min(models)
# first check for errors
error_handler = ErrorHandler(best_model)
error_handler = ErrorHandler(best_model, specs)
error_handler.raise_if_errors()
# build specs from spec attributes in the model
@@ -1435,16 +1438,14 @@ def condition(
# caller, we won't emit partial facts.
condition_id = next(self._id_counter)
self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id)))
self.gen.fact(fn.condition_reason(condition_id, msg))
trigger_id = self._get_condition_id(
required_spec, cache=self._trigger_cache, body=True, transform=transform_required
)
self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id)))
self.gen.fact(fn.condition_reason(condition_id, msg))
self.gen.fact(
fn.pkg_fact(required_spec.name, fn.condition_trigger(condition_id, trigger_id))
)
if not imposed_spec:
return condition_id
@@ -1693,19 +1694,43 @@ def external_packages(self):
spack.spec.parse_with_version_concrete(x["spec"]) for x in externals
]
external_specs = []
selected_externals = set()
if spec_filters:
for current_filter in spec_filters:
current_filter.factory = lambda: candidate_specs
external_specs.extend(current_filter.selected_specs())
else:
external_specs.extend(candidate_specs)
selected_externals.update(current_filter.selected_specs())
# Emit facts for externals specs. Note that "local_idx" is the index of the spec
# in packages:<pkg_name>:externals. This means:
#
# packages:<pkg_name>:externals[local_idx].spec == spec
external_versions = []
for local_idx, spec in enumerate(candidate_specs):
msg = f"{spec.name} available as external when satisfying {spec}"
if spec_filters and spec not in selected_externals:
continue
if not spec.versions.concrete:
warnings.warn(f"cannot use the external spec {spec}: needs a concrete version")
continue
def external_imposition(input_spec, requirements):
return requirements + [
fn.attr("external_conditions_hold", input_spec.name, local_idx)
]
try:
self.condition(spec, spec, msg=msg, transform_imposed=external_imposition)
except (spack.error.SpecError, RuntimeError) as e:
warnings.warn(f"while setting up external spec {spec}: {e}")
continue
external_versions.append((spec.version, local_idx))
self.possible_versions[spec.name].add(spec.version)
self.gen.newline()
# Order the external versions to prefer more recent versions
# even if specs in packages.yaml are not ordered that way
external_versions = [
(x.version, external_id) for external_id, x in enumerate(external_specs)
]
external_versions = [
(v, idx, external_id)
for idx, (v, external_id) in enumerate(sorted(external_versions, reverse=True))
@@ -1715,19 +1740,6 @@ def external_packages(self):
DeclaredVersion(version=version, idx=idx, origin=Provenance.EXTERNAL)
)
# Declare external conditions with a local index into packages.yaml
for local_idx, spec in enumerate(external_specs):
msg = "%s available as external when satisfying %s" % (spec.name, spec)
def external_imposition(input_spec, requirements):
return requirements + [
fn.attr("external_conditions_hold", input_spec.name, local_idx)
]
self.condition(spec, spec, msg=msg, transform_imposed=external_imposition)
self.possible_versions[spec.name].add(spec.version)
self.gen.newline()
self.trigger_rules()
self.effect_rules()
@@ -1839,6 +1851,8 @@ def _spec_clauses(
if spec.name:
clauses.append(f.node(spec.name) if not spec.virtual else f.virtual_node(spec.name))
if spec.namespace:
clauses.append(f.namespace(spec.name, spec.namespace))
clauses.extend(self.spec_versions(spec))
@@ -1880,11 +1894,8 @@ def _spec_clauses(
)
clauses.append(f.variant_value(spec.name, vname, value))
if variant.propagate:
clauses.append(
f.variant_propagation_candidate(spec.name, vname, value, spec.name)
)
clauses.append(f.propagate(spec.name, fn.variant_value(vname, value)))
# Tell the concretizer that this is a possible value for the
# variant, to account for things like int/str values where we
@@ -1917,9 +1928,12 @@ def _spec_clauses(
for flag_type, flags in spec.compiler_flags.items():
for flag in flags:
clauses.append(f.node_flag(spec.name, flag_type, flag))
clauses.append(f.node_flag_source(spec.name, flag_type, spec.name))
if not spec.concrete and flag.propagate is True:
clauses.append(f.node_flag_propagate(spec.name, flag_type))
clauses.append(
f.propagate(
spec.name, fn.node_flag(flag_type, flag), fn.edge_types("link", "run")
)
)
# dependencies
if spec.concrete:
@@ -2072,7 +2086,7 @@ def define_ad_hoc_versions_from_specs(
# best possible, so they're guaranteed to be used preferentially.
version = s.versions.concrete
if version is None or any(v == version for v in self.possible_versions[s.name]):
if version is None or (any((v == version) for v in self.possible_versions[s.name])):
continue
if require_checksum and not _is_checksummed_git_version(version):
@@ -2386,9 +2400,16 @@ def concrete_specs(self):
# - Add OS to possible OS's
for dep in spec.traverse():
self.possible_versions[dep.name].add(dep.version)
self.declared_versions[dep.name].append(
DeclaredVersion(version=dep.version, idx=0, origin=Provenance.INSTALLED)
)
if isinstance(dep.version, vn.GitVersion):
self.declared_versions[dep.name].append(
DeclaredVersion(
version=dep.version, idx=0, origin=Provenance.INSTALLED_GIT_VERSION
)
)
else:
self.declared_versions[dep.name].append(
DeclaredVersion(version=dep.version, idx=0, origin=Provenance.INSTALLED)
)
self.possible_oses.add(dep.os)
def define_concrete_input_specs(self, specs, possible):
@@ -2729,6 +2750,7 @@ class _Head:
"""ASP functions used to express spec clauses in the HEAD of a rule"""
node = fn.attr("node")
namespace = fn.attr("namespace_set")
virtual_node = fn.attr("virtual_node")
node_platform = fn.attr("node_platform_set")
node_os = fn.attr("node_os_set")
@@ -2737,15 +2759,14 @@ class _Head:
node_compiler = fn.attr("node_compiler_set")
node_compiler_version = fn.attr("node_compiler_version_set")
node_flag = fn.attr("node_flag_set")
node_flag_source = fn.attr("node_flag_source")
node_flag_propagate = fn.attr("node_flag_propagate")
variant_propagation_candidate = fn.attr("variant_propagation_candidate")
propagate = fn.attr("propagate")
class _Body:
"""ASP functions used to express spec clauses in the BODY of a rule"""
node = fn.attr("node")
namespace = fn.attr("namespace")
virtual_node = fn.attr("virtual_node")
node_platform = fn.attr("node_platform")
node_os = fn.attr("node_os")
@@ -2754,9 +2775,7 @@ class _Body:
node_compiler = fn.attr("node_compiler")
node_compiler_version = fn.attr("node_compiler_version")
node_flag = fn.attr("node_flag")
node_flag_source = fn.attr("node_flag_source")
node_flag_propagate = fn.attr("node_flag_propagate")
variant_propagation_candidate = fn.attr("variant_propagation_candidate")
propagate = fn.attr("propagate")
class ProblemInstanceBuilder:
@@ -3230,6 +3249,39 @@ def requires(self, impose: str, *, when: str):
self.runtime_conditions.add((imposed_spec, when_spec))
self.reset()
def propagate(self, constraint_str: str, *, when: str):
msg = "the 'propagate' method can be called only with pkg('*')"
assert self.current_package == "*", msg
when_spec = spack.spec.Spec(when)
assert when_spec.name is None, "only anonymous when specs are accepted"
placeholder = "XXX"
node_variable = "node(ID, Package)"
when_spec.name = placeholder
body_clauses = self._setup.spec_clauses(when_spec, body=True)
body_str = (
f" {f',{os.linesep} '.join(str(x) for x in body_clauses)},\n"
f" not external({node_variable}),\n"
f" not runtime(Package)"
).replace(f'"{placeholder}"', f"{node_variable}")
constraint_spec = spack.spec.Spec(constraint_str)
assert constraint_spec.name is None, "only anonymous constraint specs are accepted"
constraint_spec.name = placeholder
constraint_clauses = self._setup.spec_clauses(constraint_spec, body=False)
for clause in constraint_clauses:
if clause.args[0] == "node_compiler_version_satisfies":
self._setup.compiler_version_constraints.add(constraint_spec.compiler)
args = f'"{constraint_spec.compiler.name}", "{constraint_spec.compiler.versions}"'
head_str = f"propagate({node_variable}, node_compiler_version_satisfies({args}))"
rule = f"{head_str} :-\n{body_str}.\n\n"
self.rules.append(rule)
self.reset()
def consume_facts(self):
"""Consume the facts collected by this object, and emits rules and
facts for the runtimes.
@@ -3309,6 +3361,8 @@ def hash(self, node, h):
def node(self, node):
if node not in self._specs:
self._specs[node] = spack.spec.Spec(node.pkg)
for flag_type in spack.spec.FlagMap.valid_compiler_flags():
self._specs[node].compiler_flags[flag_type] = []
def _arch(self, node):
arch = self._specs[node].architecture
@@ -3361,9 +3415,6 @@ def node_flag(self, node, flag_type, flag):
def node_flag_source(self, node, flag_type, source):
self._flag_sources[(node, flag_type)].add(source)
def no_flags(self, node, flag_type):
self._specs[node].compiler_flags[flag_type] = []
def external_spec_selected(self, node, idx):
"""This means that the external spec and index idx has been selected for this package."""
packages_yaml = _external_config_with_implicit_externals(spack.config.CONFIG)
@@ -3456,7 +3507,7 @@ def reorder_flags(self):
ordered_compiler_flags = list(llnl.util.lang.dedupe(from_compiler + from_sources))
compiler_flags = spec.compiler_flags.get(flag_type, [])
msg = "%s does not equal %s" % (set(compiler_flags), set(ordered_compiler_flags))
msg = f"{set(compiler_flags)} does not equal {set(ordered_compiler_flags)}"
assert set(compiler_flags) == set(ordered_compiler_flags), msg
spec.compiler_flags.update({flag_type: ordered_compiler_flags})
@@ -3526,9 +3577,8 @@ def build_specs(self, function_tuples):
# do not bother calling actions on it except for node_flag_source,
# since node_flag_source is tracking information not in the spec itself
spec = self._specs.get(args[0])
if spec and spec.concrete:
if name != "node_flag_source":
continue
if spec and spec.concrete and name != "node_flag_source":
continue
action(*args)

View File

@@ -18,39 +18,79 @@
{ attr("virtual_node", node(0..X-1, Package)) } :- max_dupes(Package, X), virtual(Package).
% Integrity constraints on DAG nodes
:- attr("root", PackageNode), not attr("node", PackageNode).
:- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
:- attr("node_version_satisfies", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
:- attr("hash", PackageNode, _), not attr("node", PackageNode).
:- attr("node_platform", PackageNode, _), not attr("node", PackageNode).
:- attr("node_os", PackageNode, _), not attr("node", PackageNode).
:- attr("node_target", PackageNode, _), not attr("node", PackageNode).
:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode).
:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode).
:- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode).
:- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode).
:- attr("no_flags", PackageNode, _), not attr("node", PackageNode).
:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode).
:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode).
:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode).
:- attr("node_flag_source", ParentNode, _, _), not attr("node", ParentNode).
:- attr("node_flag_source", _, _, ChildNode), not attr("node", ChildNode).
:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode), internal_error("virtual node with no provider").
:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode), internal_error("provider with no virtual node").
:- provider(PackageNode, _), not attr("node", PackageNode), internal_error("provider with no real node").
:- attr("root", PackageNode),
not attr("node", PackageNode),
internal_error("Every root must be a node").
:- attr("version", PackageNode, _),
not attr("node", PackageNode),
not attr("virtual_node", PackageNode),
internal_error("Only nodes and virtual_nodes can have versions").
:- attr("node_version_satisfies", PackageNode, _),
not attr("node", PackageNode),
not attr("virtual_node", PackageNode),
internal_error("Only nodes and virtual_nodes can have version satisfaction").
:- attr("hash", PackageNode, _),
not attr("node", PackageNode),
internal_error("Only nodes can have hashes").
:- attr("node_platform", PackageNode, _),
not attr("node", PackageNode),
internal_error("Only nodes can have platforms").
:- attr("node_os", PackageNode, _), not attr("node", PackageNode),
internal_error("Only nodes can have node_os").
:- attr("node_target", PackageNode, _), not attr("node", PackageNode),
internal_error("Only nodes can have node_target").
:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode),
internal_error("Only nodes can have node_compiler_version").
:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode),
internal_error("variant_value true for a non-node").
:- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode),
internal_error("node_flag_compiler_default true for non-node").
:- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode),
internal_error("node_flag assigned for non-node").
:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode),
internal_error("external_spec_selected for non-node").
:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode),
internal_error("non-node depends on something").
:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode),
internal_error("something depends_on a non-node").
:- attr("node_flag_source", Node, _, _), not attr("node", Node),
internal_error("node_flag_source assigned for a non-node").
:- attr("node_flag_source", _, _, SourceNode), not attr("node", SourceNode),
internal_error("node_flag_source assigned with a non-node source").
:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode),
internal_error("virtual node with no provider").
:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode),
internal_error("provider with no virtual node").
:- provider(PackageNode, _), not attr("node", PackageNode),
internal_error("provider with no real node").
:- attr("root", node(ID, PackageNode)), ID > min_dupe_id, internal_error("root with a non-minimal duplicate ID").
:- attr("root", node(ID, PackageNode)), ID > min_dupe_id,
internal_error("root with a non-minimal duplicate ID").
% Nodes in the "root" unification set cannot depend on non-root nodes if the dependency is "link" or "run"
:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "link"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("link dependency out of the root unification set").
:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "run"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("run dependency out of the root unification set").
% Namespaces are statically assigned by a package fact
attr("namespace", node(ID, Package), Namespace) :- attr("node", node(ID, Package)), pkg_fact(Package, namespace(Namespace)).
% Namespaces are statically assigned by a package fact if not otherwise set
error(100, "{0} does not have a namespace", Package) :- attr("node", node(ID, Package)),
not attr("namespace", node(ID, Package), _),
internal_error("A node must have a namespace").
error(100, "{0} cannot come from both {1} and {2} namespaces", Package, NS1, NS2) :- attr("node", node(ID, Package)),
attr("namespace", node(ID, Package), NS1),
attr("namespace", node(ID, Package), NS2),
NS1 != NS2,
internal_error("A node cannot have two namespaces").
attr("namespace", node(ID, Package), Namespace) :- attr("namespace_set", node(ID, Package), Namespace).
attr("namespace", node(ID, Package), Namespace)
:- attr("node", node(ID, Package)),
not attr("namespace_set", node(ID, Package), _),
pkg_fact(Package, namespace(Namespace)).
% Rules on "unification sets", i.e. on sets of nodes allowing a single configuration of any given package
unify(SetID, PackageName) :- unification_set(SetID, node(_, PackageName)).
:- 2 { unification_set(SetID, node(_, PackageName)) }, unify(SetID, PackageName).
:- 2 { unification_set(SetID, node(_, PackageName)) }, unify(SetID, PackageName),
internal_error("Cannot have multiple unification sets IDs for one set").
unification_set("root", PackageNode) :- attr("root", PackageNode).
unification_set(SetID, ChildNode) :- attr("depends_on", ParentNode, ChildNode, Type), Type != "build", unification_set(SetID, ParentNode).
@@ -76,7 +116,8 @@ unification_set(SetID, VirtualNode)
% as a build dependency.
%
% We'll need to relax the rule before we get to actual cross-compilation
:- depends_on(ParentNode, node(X, Dependency)), depends_on(ParentNode, node(Y, Dependency)), X < Y.
:- depends_on(ParentNode, node(X, Dependency)), depends_on(ParentNode, node(Y, Dependency)), X < Y,
internal_error("Cannot split link/build deptypes for a single edge (yet)").
#defined multiple_unification_sets/1.
@@ -132,7 +173,8 @@ mentioned_in_literal(Root, Mentioned) :- mentioned_in_literal(TriggerID, Root, M
condition_set(node(min_dupe_id, Root), node(min_dupe_id, Root)) :- mentioned_in_literal(Root, Root).
1 { condition_set(node(min_dupe_id, Root), node(0..Y-1, Mentioned)) : max_dupes(Mentioned, Y) } 1 :-
mentioned_in_literal(Root, Mentioned), Mentioned != Root.
mentioned_in_literal(Root, Mentioned), Mentioned != Root,
internal_error("must have exactly one condition_set for literals").
% Discriminate between "roots" that have been explicitly requested, and roots that are deduced from "virtual roots"
explicitly_requested_root(node(min_dupe_id, Package)) :-
@@ -152,7 +194,8 @@ associated_with_root(RootNode, ChildNode) :-
:- attr("root", RootNode),
condition_set(RootNode, node(X, Package)),
not virtual(Package),
not associated_with_root(RootNode, node(X, Package)).
not associated_with_root(RootNode, node(X, Package)),
internal_error("nodes in root condition set must be associated with root").
#defined concretize_everything/0.
#defined literal/1.
@@ -256,6 +299,7 @@ possible_version_weight(node(ID, Package), Weight)
:- attr("version", node(ID, Package), Version),
version_weight(node(ID, Package), Weight),
not pkg_fact(Package, version_declared(Version, Weight, "installed")),
not pkg_fact(Package, version_declared(Version, Weight, "installed_git_version")),
not build(node(ID, Package)),
internal_error("Build version weight used for reused package").
@@ -385,8 +429,10 @@ imposed_nodes(ConditionID, PackageNode, node(X, A1))
condition_set(PackageNode, node(X, A1)),
attr("hash", PackageNode, ConditionID).
:- imposed_packages(ID, A1), impose(ID, PackageNode), not condition_set(PackageNode, node(_, A1)).
:- imposed_packages(ID, A1), impose(ID, PackageNode), not imposed_nodes(ID, PackageNode, node(_, A1)).
:- imposed_packages(ID, A1), impose(ID, PackageNode), not condition_set(PackageNode, node(_, A1)),
internal_error("Imposing constraint outside of condition set").
:- imposed_packages(ID, A1), impose(ID, PackageNode), not imposed_nodes(ID, PackageNode, node(_, A1)),
internal_error("Imposing constraint outside of imposed_nodes").
% Conditions that hold impose may impose constraints on other specs
attr(Name, node(X, A1)) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1), imposed_nodes(ID, PackageNode, node(X, A1)).
@@ -416,7 +462,8 @@ provider(ProviderNode, VirtualNode) :- attr("provider_set", ProviderNode, Virtua
% satisfy the dependency.
1 { attr("depends_on", node(X, A1), node(0..Y-1, A2), A3) : max_dupes(A2, Y) } 1
:- impose(ID, node(X, A1)),
imposed_constraint(ID, "depends_on", A1, A2, A3).
imposed_constraint(ID, "depends_on", A1, A2, A3),
internal_error("Build deps must land in exactly one duplicate").
% Reconstruct virtual dependencies for reused specs
attr("virtual_on_edge", node(X, A1), node(Y, A2), Virtual)
@@ -611,25 +658,18 @@ do_not_impose(EffectID, node(X, Package))
% Virtual dependency weights
%-----------------------------------------------------------------------------
% A provider may have different possible weights depending on whether it's an external
% or not, or on preferences expressed in packages.yaml etc. This rule ensures that
% A provider has different possible weights depending on its preference. This rule ensures that
% we select the weight, among the possible ones, that minimizes the overall objective function.
1 { provider_weight(DependencyNode, VirtualNode, Weight) :
possible_provider_weight(DependencyNode, VirtualNode, Weight, _) } 1
:- provider(DependencyNode, VirtualNode), internal_error("Package provider weights must be unique").
% A provider that is an external can use a weight of 0
possible_provider_weight(DependencyNode, VirtualNode, 0, "external")
:- provider(DependencyNode, VirtualNode),
external(DependencyNode).
% A provider mentioned in the default configuration can use a weight
% according to its priority in the list of providers
% Any configured provider has a weight based on index in the preference list
possible_provider_weight(node(ProviderID, Provider), node(VirtualID, Virtual), Weight, "default")
:- provider(node(ProviderID, Provider), node(VirtualID, Virtual)),
default_provider_preference(Virtual, Provider, Weight).
% Any provider can use 100 as a weight, which is very high and discourage its use
% Any non-configured provider has a default weight of 100
possible_provider_weight(node(ProviderID, Provider), VirtualNode, 100, "fallback")
:- provider(node(ProviderID, Provider), VirtualNode).
@@ -811,37 +851,6 @@ node_has_variant(node(ID, Package), Variant) :-
pkg_fact(Package, variant(Variant)),
attr("node", node(ID, Package)).
% Variant propagation is forwarded to dependencies
attr("variant_propagation_candidate", PackageNode, Variant, Value, Source) :-
attr("node", PackageNode),
depends_on(ParentNode, PackageNode),
attr("variant_value", node(_, Source), Variant, Value),
attr("variant_propagation_candidate", ParentNode, Variant, _, Source).
% If the node is a candidate, and it has the variant and value,
% then those variant and value should be propagated
attr("variant_propagate", node(ID, Package), Variant, Value, Source) :-
attr("variant_propagation_candidate", node(ID, Package), Variant, Value, Source),
node_has_variant(node(ID, Package), Variant),
pkg_fact(Package, variant_possible_value(Variant, Value)),
not attr("variant_set", node(ID, Package), Variant).
% Propagate the value, if there is the corresponding attribute
attr("variant_value", PackageNode, Variant, Value) :- attr("variant_propagate", PackageNode, Variant, Value, _).
% If a variant is propagated, we cannot have extraneous values (this is for multi valued variants)
variant_is_propagated(PackageNode, Variant) :- attr("variant_propagate", PackageNode, Variant, _, _).
:- variant_is_propagated(PackageNode, Variant),
attr("variant_value", PackageNode, Variant, Value),
not attr("variant_propagate", PackageNode, Variant, Value, _).
% Cannot receive different values from different sources on the same variant
error(100, "{0} and {1} cannot both propagate variant '{2}' to package {3} with values '{4}' and '{5}'", Source1, Source2, Variant, Package, Value1, Value2) :-
attr("variant_propagate", node(X, Package), Variant, Value1, Source1),
attr("variant_propagate", node(X, Package), Variant, Value2, Source2),
node_has_variant(node(X, Package), Variant),
Value1 < Value2, Source1 < Source2.
% a variant cannot be set if it is not a variant on the package
error(100, "Cannot set variant '{0}' for package '{1}' because the variant condition cannot be satisfied for the given spec", Variant, Package)
:- attr("variant_set", node(X, Package), Variant),
@@ -919,7 +928,7 @@ variant_not_default(node(ID, Package), Variant, Value)
% variants set explicitly on the CLI don't count as non-default
not attr("variant_set", node(ID, Package), Variant, Value),
% variant values forced by propagation don't count as non-default
not attr("variant_propagate", node(ID, Package), Variant, Value, _),
not propagate(node(ID, Package), variant_value(Variant, Value)),
% variants set on externals that we could use don't count as non-default
% this makes spack prefer to use an external over rebuilding with the
% default configuration
@@ -932,7 +941,7 @@ variant_default_not_used(node(ID, Package), Variant, Value)
:- variant_default_value(Package, Variant, Value),
node_has_variant(node(ID, Package), Variant),
not attr("variant_value", node(ID, Package), Variant, Value),
not attr("variant_propagate", node(ID, Package), Variant, _, _),
not propagate(node(ID, Package), variant_value(Variant, _)),
attr("node", node(ID, Package)).
% The variant is set in an external spec
@@ -989,6 +998,101 @@ pkg_fact(Package, variant_single_value("dev_path"))
#defined variant_default_value/3.
#defined variant_default_value_from_packages_yaml/3.
%-----------------------------------------------------------------------------
% Propagation semantics
%-----------------------------------------------------------------------------
% Propagation roots have a corresponding attr("propagate", ...)
propagate(RootNode, PropagatedAttribute) :- attr("propagate", RootNode, PropagatedAttribute).
propagate(RootNode, PropagatedAttribute, EdgeTypes) :- attr("propagate", RootNode, PropagatedAttribute, EdgeTypes).
% Propagate an attribute along edges to child nodes
propagate(ChildNode, PropagatedAttribute) :-
propagate(ParentNode, PropagatedAttribute),
depends_on(ParentNode, ChildNode).
propagate(ChildNode, PropagatedAttribute, edge_types(DepType1, DepType2)) :-
propagate(ParentNode, PropagatedAttribute, edge_types(DepType1, DepType2)),
depends_on(ParentNode, ChildNode),
1 { attr("depends_on", ParentNode, ChildNode, DepType1); attr("depends_on", ParentNode, ChildNode, DepType2) }.
%-----------------------------------------------------------------------------
% Activation of propagated values
%-----------------------------------------------------------------------------
%----
% Variants
%----
% If a variant is propagated, and can be accepted, set its value
attr("variant_value", node(ID, Package), Variant, Value) :-
propagate(node(ID, Package), variant_value(Variant, Value)),
node_has_variant(node(ID, Package), Variant),
pkg_fact(Package, variant_possible_value(Variant, Value)),
not attr("variant_set", node(ID, Package), Variant).
% If a variant is propagated, we cannot have extraneous values
variant_is_propagated(PackageNode, Variant) :-
attr("variant_value", PackageNode, Variant, Value),
propagate(PackageNode, variant_value(Variant, Value)),
not attr("variant_set", PackageNode, Variant).
:- variant_is_propagated(PackageNode, Variant),
attr("variant_value", PackageNode, Variant, Value),
not propagate(PackageNode, variant_value(Variant, Value)).
%----
% Flags
%----
% A propagated flag implies:
% 1. The same flag type is not set on this node
% 2. This node has the same compiler as the propagation source
propagated_flag(node(PackageID, Package), node_flag(FlagType, Flag), SourceNode) :-
propagate(node(PackageID, Package), node_flag(FlagType, Flag), _),
not attr("node_flag_set", node(PackageID, Package), FlagType, _),
% Same compiler as propagation source
node_compiler(node(PackageID, Package), CompilerID),
node_compiler(SourceNode, CompilerID),
attr("propagate", SourceNode, node_flag(FlagType, Flag), _),
node(PackageID, Package) != SourceNode,
not runtime(Package).
attr("node_flag", PackageNode, FlagType, Flag) :- propagated_flag(PackageNode, node_flag(FlagType, Flag), _).
attr("node_flag_source", PackageNode, FlagType, SourceNode) :- propagated_flag(PackageNode, node_flag(FlagType, _), SourceNode).
% Cannot propagate the same flag from two distinct sources
error(100, "{0} and {1} cannot both propagate compiler flags '{2}' to {3}", Source1, Source2, Package, FlagType) :-
propagated_flag(node(ID, Package), node_flag(FlagType, _), node(_, Source1)),
propagated_flag(node(ID, Package), node_flag(FlagType, _), node(_, Source2)),
Source1 < Source2.
%----
% Compiler constraints
%----
attr("node_compiler_version_satisfies", node(ID, Package), Compiler, Version) :-
propagate(node(ID, Package), node_compiler_version_satisfies(Compiler, Version)),
node_compiler(node(ID, Package), CompilerID),
compiler_name(CompilerID, Compiler),
not runtime(Package),
not external(Package).
%-----------------------------------------------------------------------------
% Runtimes
%-----------------------------------------------------------------------------
% Check whether the DAG has any built package
has_built_packages() :- build(X), not external(X).
% If we build packages, the runtime nodes must use an available compiler
1 { node_compiler(PackageNode, CompilerID) : build(PackageNode), not external(PackageNode) } :-
has_built_packages(),
runtime(RuntimePackage),
node_compiler(node(_, RuntimePackage), CompilerID).
%-----------------------------------------------------------------------------
% Platform semantics
%-----------------------------------------------------------------------------
@@ -1090,10 +1194,18 @@ attr("node_target", PackageNode, Target)
:- attr("node", PackageNode), attr("node_target_set", PackageNode, Target).
% each node has the weight of its assigned target
node_target_weight(node(ID, Package), Weight)
:- attr("node", node(ID, Package)),
attr("node_target", node(ID, Package), Target),
target_weight(Target, Weight).
target_weight(Target, 0)
:- attr("node", PackageNode),
attr("node_target", PackageNode, Target),
attr("node_target_set", PackageNode, Target).
node_target_weight(PackageNode, MinWeight)
:- attr("node", PackageNode),
attr("node_target", PackageNode, Target),
target(Target),
MinWeight = #min { Weight : target_weight(Target, Weight) }.
:- attr("node_target", PackageNode, Target), not node_target_weight(PackageNode, _).
% compatibility rules for targets among nodes
node_target_match(ParentNode, DependencyNode)
@@ -1155,12 +1267,12 @@ error(10, "No valid compiler for {0} satisfies '%{1}'", Package, Compiler)
% If the compiler of a node must satisfy a constraint, then its version
% must be chosen among the ones that satisfy said constraint
error(100, "No valid version for '{0}' compiler '{1}' satisfies '@{2}'", Package, Compiler, Constraint)
error(100, "Package {0} cannot satisfy '%{1}@{2}'", Package, Compiler, Constraint)
:- attr("node", node(X, Package)),
attr("node_compiler_version_satisfies", node(X, Package), Compiler, Constraint),
not compiler_version_satisfies(Compiler, Constraint, _).
not compiler_version_satisfies(Compiler, Constraint, _).
error(100, "No valid version for '{0}' compiler '{1}' satisfies '@{2}'", Package, Compiler, Constraint)
error(100, "Package {0} cannot satisfy '%{1}@{2}'", Package, Compiler, Constraint)
:- attr("node", node(X, Package)),
attr("node_compiler_version_satisfies", node(X, Package), Compiler, Constraint),
not compiler_version_satisfies(Compiler, Constraint, ID),
@@ -1241,45 +1353,9 @@ error(100, "Compiler {1}@{2} requested for {0} cannot be found. Set install_miss
% Compiler flags
%-----------------------------------------------------------------------------
% propagate flags when compiler match
can_inherit_flags(PackageNode, DependencyNode, FlagType)
:- same_compiler(PackageNode, DependencyNode),
not attr("node_flag_set", DependencyNode, FlagType, _),
flag_type(FlagType).
same_compiler(PackageNode, DependencyNode)
:- depends_on(PackageNode, DependencyNode),
node_compiler(PackageNode, CompilerID),
node_compiler(DependencyNode, CompilerID),
compiler_id(CompilerID).
node_flag_inherited(DependencyNode, FlagType, Flag)
:- attr("node_flag_set", PackageNode, FlagType, Flag),
can_inherit_flags(PackageNode, DependencyNode, FlagType),
attr("node_flag_propagate", PackageNode, FlagType).
% Ensure propagation
:- node_flag_inherited(PackageNode, FlagType, Flag),
can_inherit_flags(PackageNode, DependencyNode, FlagType),
attr("node_flag_propagate", PackageNode, FlagType).
error(100, "{0} and {1} cannot both propagate compiler flags '{2}' to {3}", Source1, Source2, Package, FlagType) :-
depends_on(Source1, Package),
depends_on(Source2, Package),
attr("node_flag_propagate", Source1, FlagType),
attr("node_flag_propagate", Source2, FlagType),
can_inherit_flags(Source1, Package, FlagType),
can_inherit_flags(Source2, Package, FlagType),
Source1 < Source2.
% remember where flags came from
attr("node_flag_source", PackageNode, FlagType, PackageNode)
:- attr("node_flag_set", PackageNode, FlagType, _).
attr("node_flag_source", DependencyNode, FlagType, Q)
:- attr("node_flag_source", PackageNode, FlagType, Q),
node_flag_inherited(DependencyNode, FlagType, _),
attr("node_flag_propagate", PackageNode, FlagType).
attr("node_flag_source", PackageNode, FlagType, PackageNode) :- attr("node_flag_set", PackageNode, FlagType, _).
attr("node_flag_source", PackageNode, FlagType, PackageNode) :- attr("node_flag", PackageNode, FlagType, _), attr("hash", PackageNode, _).
% compiler flags from compilers.yaml are put on nodes if compiler matches
attr("node_flag", PackageNode, FlagType, Flag)
@@ -1299,15 +1375,8 @@ attr("node_flag_compiler_default", PackageNode)
compiler_name(CompilerID, CompilerName),
compiler_version(CompilerID, Version).
% if a flag is set to something or inherited, it's included
% Flag set to something
attr("node_flag", PackageNode, FlagType, Flag) :- attr("node_flag_set", PackageNode, FlagType, Flag).
attr("node_flag", PackageNode, FlagType, Flag) :- node_flag_inherited(PackageNode, FlagType, Flag).
% if no node flags are set for a type, there are no flags.
attr("no_flags", PackageNode, FlagType)
:- not attr("node_flag", PackageNode, FlagType, _),
attr("node", PackageNode),
flag_type(FlagType).
#defined compiler_flag/3.
@@ -1496,7 +1565,7 @@ opt_criterion(45, "preferred providers (non-roots)").
}.
% Try to minimize the number of compiler mismatches in the DAG.
opt_criterion(40, "compiler mismatches that are not from CLI").
opt_criterion(40, "compiler mismatches that are not required").
#minimize{ 0@240: #true }.
#minimize{ 0@40: #true }.
#minimize{
@@ -1506,7 +1575,7 @@ opt_criterion(40, "compiler mismatches that are not from CLI").
not runtime(Dependency)
}.
opt_criterion(39, "compiler mismatches that are not from CLI").
opt_criterion(39, "compiler mismatches that are required").
#minimize{ 0@239: #true }.
#minimize{ 0@39: #true }.
#minimize{

View File

@@ -4,21 +4,35 @@
% SPDX-License-Identifier: (Apache-2.0 OR MIT)
%=============================================================================
% Heuristic to speed-up solves (node with ID 0)
% Heuristic to speed-up solves
%=============================================================================
% No duplicates by default (most of them will be true)
#heuristic attr("node", node(PackageID, Package)). [100, init]
#heuristic attr("node", node(PackageID, Package)). [ 2, factor]
#heuristic attr("virtual_node", node(VirtualID, Virtual)). [100, init]
#heuristic attr("node", node(1..X-1, Package)) : max_dupes(Package, X), not virtual(Package), X > 1. [-1, sign]
#heuristic attr("virtual_node", node(1..X-1, Package)) : max_dupes(Package, X), virtual(Package) , X > 1. [-1, sign]
%-----------------
% Domain heuristic
%-----------------
% Pick preferred version
#heuristic attr("version", node(PackageID, Package), Version) : pkg_fact(Package, version_declared(Version, Weight)), attr("node", node(PackageID, Package)). [40, init]
#heuristic version_weight(node(PackageID, Package), 0) : pkg_fact(Package, version_declared(Version, 0 )), attr("node", node(PackageID, Package)). [ 1, sign]
#heuristic attr("version", node(PackageID, Package), Version) : pkg_fact(Package, version_declared(Version, 0 )), attr("node", node(PackageID, Package)). [ 1, sign]
#heuristic attr("version", node(PackageID, Package), Version) : pkg_fact(Package, version_declared(Version, Weight)), attr("node", node(PackageID, Package)), Weight > 0. [-1, sign]
% Root node
#heuristic attr("version", node(0, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("root", node(0, Package)). [35, true]
#heuristic version_weight(node(0, Package), 0) : pkg_fact(Package, version_declared(Version, 0)), attr("root", node(0, Package)). [35, true]
#heuristic attr("variant_value", node(0, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("root", node(0, Package)). [35, true]
#heuristic attr("node_target", node(0, Package), Target) : target_weight(Target, 0), attr("root", node(0, Package)). [35, true]
#heuristic node_target_weight(node(0, Package), 0) : attr("root", node(0, Package)). [35, true]
#heuristic node_compiler(node(0, Package), CompilerID) : compiler_weight(ID, 0), compiler_id(ID), attr("root", node(0, Package)). [35, true]
% Use default variants
#heuristic attr("variant_value", node(PackageID, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("node", node(PackageID, Package)). [40, true]
#heuristic attr("variant_value", node(PackageID, Package), Variant, Value) : not variant_default_value(Package, Variant, Value), attr("node", node(PackageID, Package)). [40, false]
% Providers
#heuristic attr("node", node(0, Package)) : default_provider_preference(Virtual, Package, 0), possible_in_link_run(Package). [30, true]
% Use default operating system and platform
#heuristic attr("node_os", node(PackageID, Package), OS) : os(OS, 0), attr("root", node(PackageID, Package)). [40, true]
#heuristic attr("node_platform", node(PackageID, Package), Platform) : allowed_platform(Platform), attr("root", node(PackageID, Package)). [40, true]
% Use default targets
#heuristic attr("node_target", node(PackageID, Package), Target) : target_weight(Target, Weight), attr("node", node(PackageID, Package)). [30, init]
#heuristic attr("node_target", node(PackageID, Package), Target) : target_weight(Target, Weight), attr("node", node(PackageID, Package)). [ 2, factor]
#heuristic attr("node_target", node(PackageID, Package), Target) : target_weight(Target, 0), attr("node", node(PackageID, Package)). [ 1, sign]
#heuristic attr("node_target", node(PackageID, Package), Target) : target_weight(Target, Weight), attr("node", node(PackageID, Package)), Weight > 0. [-1, sign]
% Use the default compilers
#heuristic node_compiler(node(PackageID, Package), ID) : compiler_weight(ID, 0), compiler_id(ID), attr("node", node(PackageID, Package)). [30, init]

View File

@@ -1,24 +0,0 @@
% Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
% Spack Project Developers. See the top-level COPYRIGHT file for details.
%
% SPDX-License-Identifier: (Apache-2.0 OR MIT)
%=============================================================================
% Heuristic to speed-up solves (node with ID > 0)
%=============================================================================
% node(ID, _)
#heuristic attr("version", node(ID, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
#heuristic version_weight(node(ID, Package), 0) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
#heuristic attr("variant_value", node(ID, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
#heuristic attr("node_target", node(ID, Package), Target) : pkg_fact(Package, target_weight(Target, 0)), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
#heuristic node_target_weight(node(ID, Package), 0) : attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
#heuristic node_compiler(node(ID, Package), CompilerID) : compiler_weight(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
% node(ID, _), split build dependencies
#heuristic attr("version", node(ID, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
#heuristic version_weight(node(ID, Package), 0) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
#heuristic attr("variant_value", node(ID, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
#heuristic attr("node_target", node(ID, Package), Target) : pkg_fact(Package, target_weight(Target, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
#heuristic node_target_weight(node(ID, Package), 0) : attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
#heuristic node_compiler(node(ID, Package), CompilerID) : compiler_weight(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]

View File

@@ -18,9 +18,6 @@ error(100, "Cannot reuse {0} since we cannot determine libc compatibility", Reus
ReusedPackage != LibcPackage,
not attr("compatible_libc", node(R, ReusedPackage), LibcPackage, LibcVersion).
% Check whether the DAG has any built package
has_built_packages() :- build(X), not external(X).
% A libc is needed in the DAG
:- has_built_packages(), not provider(_, node(0, "libc")).

View File

@@ -12,6 +12,7 @@
%=============================================================================
% macOS
os_compatible("sequoia", "sonoma").
os_compatible("sonoma", "ventura").
os_compatible("ventura", "monterey").
os_compatible("monterey", "bigsur").

View File

@@ -99,7 +99,7 @@
"CompilerSpec",
"Spec",
"SpecParseError",
"ArchitecturePropagationError",
"UnsupportedPropagationError",
"DuplicateDependencyError",
"DuplicateCompilerSpecError",
"UnsupportedCompilerError",
@@ -129,7 +129,7 @@
r"|" # or
# OPTION 2: an actual format string
r"{" # non-escaped open brace {
r"([%@/]|arch=)?" # optional sigil (to print sigil in color)
r"([%@/]|[\w ][\w -]*=)?" # optional sigil (or identifier or space) to print sigil in color
r"(?:\^([^}\.]+)\.)?" # optional ^depname. (to get attr from dependency)
# after the sigil or depname, we can have a hash expression or another attribute
r"(?:" # one of
@@ -163,14 +163,14 @@
DEFAULT_FORMAT = (
"{name}{@versions}"
"{%compiler.name}{@compiler.versions}{compiler_flags}"
"{variants}{arch=architecture}{/abstract_hash}"
"{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}"
)
#: Display format, which eliminates extra `@=` in the output, for readability.
DISPLAY_FORMAT = (
"{name}{@version}"
"{%compiler.name}{@compiler.version}{compiler_flags}"
"{variants}{arch=architecture}{/abstract_hash}"
"{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}"
)
#: Regular expression to pull spec contents out of clearsigned signature
@@ -1287,6 +1287,104 @@ def copy(self, *args, **kwargs):
return self.wrapped_obj.copy(*args, **kwargs)
def tree(
specs: List["spack.spec.Spec"],
*,
color: Optional[bool] = None,
depth: bool = False,
hashes: bool = False,
hashlen: Optional[int] = None,
cover: str = "nodes",
indent: int = 0,
format: str = DEFAULT_FORMAT,
deptypes: Union[Tuple[str, ...], str] = "all",
show_types: bool = False,
depth_first: bool = False,
recurse_dependencies: bool = True,
status_fn: Optional[Callable[["Spec"], InstallStatus]] = None,
prefix: Optional[Callable[["Spec"], str]] = None,
key=id,
) -> str:
"""Prints out specs and their dependencies, tree-formatted with indentation.
Status function may either output a boolean or an InstallStatus
Args:
color: if True, always colorize the tree. If False, don't colorize the tree. If None,
use the default from llnl.tty.color
depth: print the depth from the root
hashes: if True, print the hash of each node
hashlen: length of the hash to be printed
cover: either "nodes" or "edges"
indent: extra indentation for the tree being printed
format: format to be used to print each node
deptypes: dependency types to be represented in the tree
show_types: if True, show the (merged) dependency type of a node
depth_first: if True, traverse the DAG depth first when representing it as a tree
recurse_dependencies: if True, recurse on dependencies
status_fn: optional callable that takes a node as an argument and return its
installation status
prefix: optional callable that takes a node as an argument and return its
installation prefix
"""
out = ""
if color is None:
color = clr.get_color_when()
# reduce deptypes over all in-edges when covering nodes
if show_types and cover == "nodes":
deptype_lookup: Dict[str, dt.DepFlag] = collections.defaultdict(dt.DepFlag)
for edge in traverse.traverse_edges(specs, cover="edges", deptype=deptypes, root=False):
deptype_lookup[edge.spec.dag_hash()] |= edge.depflag
for d, dep_spec in traverse.traverse_tree(
sorted(specs), cover=cover, deptype=deptypes, depth_first=depth_first, key=key
):
node = dep_spec.spec
if prefix is not None:
out += prefix(node)
out += " " * indent
if depth:
out += "%-4d" % d
if status_fn:
status = status_fn(node)
if status in list(InstallStatus):
out += clr.colorize(status.value, color=color)
elif status:
out += clr.colorize("@g{[+]} ", color=color)
else:
out += clr.colorize("@r{[-]} ", color=color)
if hashes:
out += clr.colorize("@K{%s} ", color=color) % node.dag_hash(hashlen)
if show_types:
if cover == "nodes":
depflag = deptype_lookup[dep_spec.spec.dag_hash()]
else:
# when covering edges or paths, we show dependency
# types only for the edge through which we visited
depflag = dep_spec.depflag
type_chars = dt.flag_to_chars(depflag)
out += "[%s] " % type_chars
out += " " * d
if d > 0:
out += "^"
out += node.format(format, color=color) + "\n"
# Check if we wanted just the first line
if not recurse_dependencies:
break
return out
@lang.lazy_lexicographic_ordering(set_hash=False)
class Spec:
#: Cache for spec's prefix, computed lazily in the corresponding property
@@ -1542,19 +1640,9 @@ def _add_flag(self, name, value, propagate):
Known flags currently include "arch"
"""
# If the == syntax is used to propagate the spec architecture
# This is an error
architecture_names = [
"arch",
"architecture",
"platform",
"os",
"operating_system",
"target",
]
if propagate and name in architecture_names:
raise ArchitecturePropagationError(
"Unable to propagate the architecture failed." " Use a '=' instead."
if propagate and name in spack.directives.reserved_names:
raise UnsupportedPropagationError(
f"Propagation with '==' is not supported for '{name}'."
)
valid_flags = FlagMap.valid_compiler_flags()
@@ -1568,6 +1656,8 @@ def _add_flag(self, name, value, propagate):
self._set_architecture(os=value)
elif name == "target":
self._set_architecture(target=value)
elif name == "namespace":
self.namespace = value
elif name in valid_flags:
assert self.compiler_flags is not None
flags_and_propagation = spack.compiler.tokenize_flags(value, propagate)
@@ -1587,9 +1677,7 @@ def _set_architecture(self, **kwargs):
"""Called by the parser to set the architecture."""
arch_attrs = ["platform", "os", "target"]
if self.architecture and self.architecture.concrete:
raise DuplicateArchitectureError(
"Spec for '%s' cannot have two architectures." % self.name
)
raise DuplicateArchitectureError("Spec cannot have two architectures.")
if not self.architecture:
new_vals = tuple(kwargs.get(arg, None) for arg in arch_attrs)
@@ -1598,10 +1686,7 @@ def _set_architecture(self, **kwargs):
new_attrvals = [(a, v) for a, v in kwargs.items() if a in arch_attrs]
for new_attr, new_value in new_attrvals:
if getattr(self.architecture, new_attr):
raise DuplicateArchitectureError(
"Spec for '%s' cannot have two '%s' specified "
"for its architecture" % (self.name, new_attr)
)
raise DuplicateArchitectureError(f"Cannot specify '{new_attr}' twice")
else:
setattr(self.architecture, new_attr, new_value)
@@ -1796,14 +1881,14 @@ def short_spec(self):
"""Returns a version of the spec with the dependencies hashed
instead of completely enumerated."""
spec_format = "{name}{@version}{%compiler.name}{@compiler.version}"
spec_format += "{variants}{arch=architecture}{/hash:7}"
spec_format += "{variants}{ arch=architecture}{/hash:7}"
return self.format(spec_format)
@property
def cshort_spec(self):
"""Returns an auto-colorized version of ``self.short_spec``."""
spec_format = "{name}{@version}{%compiler.name}{@compiler.version}"
spec_format += "{variants}{arch=architecture}{/hash:7}"
spec_format += "{variants}{ arch=architecture}{/hash:7}"
return self.cformat(spec_format)
@property
@@ -4162,29 +4247,21 @@ def __getitem__(self, name: str):
csv = query_parameters.pop().strip()
query_parameters = re.split(r"\s*,\s*", csv)
# In some cases a package appears multiple times in the same DAG for *distinct*
# specs. For example, a build-type dependency may itself depend on a package
# the current spec depends on, but their specs may differ. Therefore we iterate
# in an order here that prioritizes the build, test and runtime dependencies;
# only when we don't find the package do we consider the full DAG.
order = lambda: itertools.chain(
self.traverse(deptype="link"),
self.dependencies(deptype=dt.BUILD | dt.RUN | dt.TEST),
self.traverse(), # fall back to a full search
self.traverse_edges(deptype=dt.LINK, order="breadth", cover="edges"),
self.edges_to_dependencies(depflag=dt.BUILD | dt.RUN | dt.TEST),
self.traverse_edges(deptype=dt.ALL, order="breadth", cover="edges"),
)
# Consider runtime dependencies and direct build/test deps before transitive dependencies,
# and prefer matches closest to the root.
try:
child: Spec = next(
itertools.chain(
# Regular specs
(x for x in order() if x.name == name),
(
x
for x in order()
if (not x.virtual)
and any(name in edge.virtuals for edge in x.edges_from_dependents())
),
(x for x in order() if (not x.virtual) and x.package.provides(name)),
e.spec
for e in itertools.chain(
(e for e in order() if e.spec.name == name or name in e.virtuals),
# for historical reasons
(e for e in order() if e.spec.concrete and e.spec.package.provides(name)),
)
)
except StopIteration:
@@ -4296,14 +4373,19 @@ def deps():
yield deps
def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = False) -> str:
r"""Prints out particular pieces of a spec, depending on what is
in the format string.
@property
def namespace_if_anonymous(self):
return self.namespace if not self.name else None
Using the ``{attribute}`` syntax, any field of the spec can be
selected. Those attributes can be recursive. For example,
``s.format({compiler.version})`` will print the version of the
compiler.
def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = False) -> str:
r"""Prints out attributes of a spec according to a format string.
Using an ``{attribute}`` format specifier, any field of the spec can be
selected. Those attributes can be recursive. For example,
``s.format({compiler.version})`` will print the version of the compiler.
If the attribute in a format specifier evaluates to ``None``, then the format
specifier will evaluate to the empty string, ``""``.
Commonly used attributes of the Spec for format strings include::
@@ -4319,6 +4401,7 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa
architecture.os
architecture.target
prefix
namespace
Some additional special-case properties can be added::
@@ -4327,40 +4410,51 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa
spack_install The spack install directory
The ``^`` sigil can be used to access dependencies by name.
``s.format({^mpi.name})`` will print the name of the MPI
implementation in the spec.
``s.format({^mpi.name})`` will print the name of the MPI implementation in the
spec.
The ``@``, ``%``, ``arch=``, and ``/`` sigils
can be used to include the sigil with the printed
string. These sigils may only be used with the appropriate
attributes, listed below::
The ``@``, ``%``, and ``/`` sigils can be used to include the sigil with the
printed string. These sigils may only be used with the appropriate attributes,
listed below::
@ ``{@version}``, ``{@compiler.version}``
% ``{%compiler}``, ``{%compiler.name}``
arch= ``{arch=architecture}``
/ ``{/hash}``, ``{/hash:7}``, etc
The ``@`` sigil may also be used for any other property named
``version``. Sigils printed with the attribute string are only
printed if the attribute string is non-empty, and are colored
according to the color of the attribute.
The ``@`` sigil may also be used for any other property named ``version``.
Sigils printed with the attribute string are only printed if the attribute
string is non-empty, and are colored according to the color of the attribute.
Sigils are not used for printing variants. Variants listed by
name naturally print with their sigil. For example,
``spec.format('{variants.debug}')`` would print either
``+debug`` or ``~debug`` depending on the name of the
variant. Non-boolean variants print as ``name=value``. To
print variant names or values independently, use
Variants listed by name naturally print with their sigil. For example,
``spec.format('{variants.debug}')`` prints either ``+debug`` or ``~debug``
depending on the name of the variant. Non-boolean variants print as
``name=value``. To print variant names or values independently, use
``spec.format('{variants.<name>.name}')`` or
``spec.format('{variants.<name>.value}')``.
Spec format strings use ``\`` as the escape character. Use
``\{`` and ``\}`` for literal braces, and ``\\`` for the
literal ``\`` character.
There are a few attributes on specs that can be specified as key-value pairs
that are *not* variants, e.g.: ``os``, ``arch``, ``architecture``, ``target``,
``namespace``, etc. You can format these with an optional ``key=`` prefix, e.g.
``{namespace=namespace}`` or ``{arch=architecture}``, etc. The ``key=`` prefix
will be colorized along with the value.
When formatting specs, key-value pairs are separated from preceding parts of the
spec by whitespace. To avoid printing extra whitespace when the formatted
attribute is not set, you can add whitespace to the key *inside* the braces of
the format string, e.g.:
{ namespace=namespace}
This evaluates to `` namespace=builtin`` if ``namespace`` is set to ``builtin``,
and to ``""`` if ``namespace`` is ``None``.
Spec format strings use ``\`` as the escape character. Use ``\{`` and ``\}`` for
literal braces, and ``\\`` for the literal ``\`` character.
Args:
format_string: string containing the format to be expanded
color: True for colorized result; False for no color; None for auto color.
"""
ensure_modern_format_string(format_string)
@@ -4414,10 +4508,6 @@ def format_attribute(match_object: Match) -> str:
raise SpecFormatSigilError(sig, "compilers", attribute)
elif sig == "/" and attribute != "abstract_hash":
raise SpecFormatSigilError(sig, "DAG hashes", attribute)
elif sig == "arch=":
if attribute not in ("architecture", "arch"):
raise SpecFormatSigilError(sig, "the architecture", attribute)
sig = " arch=" # include space as separator
# Iterate over components using getattr to get next element
for idx, part in enumerate(parts):
@@ -4462,15 +4552,19 @@ def format_attribute(match_object: Match) -> str:
# Set color codes for various attributes
color = None
if "variants" in parts:
color = VARIANT_COLOR
elif "architecture" in parts:
if "architecture" in parts:
color = ARCHITECTURE_COLOR
elif "variants" in parts or sig.endswith("="):
color = VARIANT_COLOR
elif "compiler" in parts or "compiler_flags" in parts:
color = COMPILER_COLOR
elif "version" in parts or "versions" in parts:
color = VERSION_COLOR
# return empty string if the value of the attribute is None.
if current is None:
return ""
# return colored output
return safe_color(sig, str(current), color)
@@ -4560,7 +4654,7 @@ def colored_str(self):
spec_str = " ^".join(root_str + sorted_dependencies)
return spec_str.strip()
def install_status(self):
def install_status(self) -> InstallStatus:
"""Helper for tree to print DB install status."""
if not self.concrete:
return InstallStatus.absent
@@ -4604,13 +4698,14 @@ def tree(
recurse_dependencies: bool = True,
status_fn: Optional[Callable[["Spec"], InstallStatus]] = None,
prefix: Optional[Callable[["Spec"], str]] = None,
key=id,
) -> str:
"""Prints out this spec and its dependencies, tree-formatted
with indentation.
"""Prints out this spec and its dependencies, tree-formatted with indentation.
Status function may either output a boolean or an InstallStatus
See multi-spec ``spack.spec.tree()`` function for details.
Args:
specs: List of specs to format.
color: if True, always colorize the tree. If False, don't colorize the tree. If None,
use the default from llnl.tty.color
depth: print the depth from the root
@@ -4628,60 +4723,23 @@ def tree(
prefix: optional callable that takes a node as an argument and return its
installation prefix
"""
out = ""
if color is None:
color = clr.get_color_when()
for d, dep_spec in traverse.traverse_tree(
[self], cover=cover, deptype=deptypes, depth_first=depth_first
):
node = dep_spec.spec
if prefix is not None:
out += prefix(node)
out += " " * indent
if depth:
out += "%-4d" % d
if status_fn:
status = status_fn(node)
if status in list(InstallStatus):
out += clr.colorize(status.value, color=color)
elif status:
out += clr.colorize("@g{[+]} ", color=color)
else:
out += clr.colorize("@r{[-]} ", color=color)
if hashes:
out += clr.colorize("@K{%s} ", color=color) % node.dag_hash(hashlen)
if show_types:
if cover == "nodes":
# when only covering nodes, we merge dependency types
# from all dependents before showing them.
depflag = 0
for ds in node.edges_from_dependents():
depflag |= ds.depflag
else:
# when covering edges or paths, we show dependency
# types only for the edge through which we visited
depflag = dep_spec.depflag
type_chars = dt.flag_to_chars(depflag)
out += "[%s] " % type_chars
out += " " * d
if d > 0:
out += "^"
out += node.format(format, color=color) + "\n"
# Check if we wanted just the first line
if not recurse_dependencies:
break
return out
return tree(
[self],
color=color,
depth=depth,
hashes=hashes,
hashlen=hashlen,
cover=cover,
indent=indent,
format=format,
deptypes=deptypes,
show_types=show_types,
depth_first=depth_first,
recurse_dependencies=recurse_dependencies,
status_fn=status_fn,
prefix=prefix,
key=key,
)
def __repr__(self):
return str(self)
@@ -5336,10 +5394,8 @@ def long_message(self):
)
class ArchitecturePropagationError(spack.error.SpecError):
"""Raised when the double equal symbols are used to assign
the spec's architecture.
"""
class UnsupportedPropagationError(spack.error.SpecError):
"""Raised when propagation (==) is used with reserved variant names."""
class DuplicateDependencyError(spack.error.SpecError):
@@ -5469,7 +5525,7 @@ def __init__(self, spec):
class AmbiguousHashError(spack.error.SpecError):
def __init__(self, msg, *specs):
spec_fmt = "{namespace}.{name}{@version}{%compiler}{compiler_flags}"
spec_fmt += "{variants}{arch=architecture}{/hash:7}"
spec_fmt += "{variants}{ arch=architecture}{/hash:7}"
specs_str = "\n " + "\n ".join(spec.format(spec_fmt) for spec in specs)
super().__init__(msg + specs_str)

View File

@@ -212,10 +212,7 @@ def _expand_matrix_constraints(matrix_config):
results = []
for combo in itertools.product(*expanded_rows):
# Construct a combined spec to test against excludes
flat_combo = [constraint for constraint_list in combo for constraint in constraint_list]
# Resolve abstract hashes so we can exclude by their concrete properties
flat_combo = [Spec(x).lookup_hash() for x in flat_combo]
flat_combo = [Spec(constraint) for constraints in combo for constraint in constraints]
test_spec = flat_combo[0].copy()
for constraint in flat_combo[1:]:
@@ -231,7 +228,9 @@ def _expand_matrix_constraints(matrix_config):
spack.variant.substitute_abstract_variants(test_spec)
except spack.variant.UnknownVariantError:
pass
if any(test_spec.satisfies(x) for x in excludes):
# Resolve abstract hashes for exclusion criteria
if any(test_spec.lookup_hash().satisfies(x) for x in excludes):
continue
if sigil:

View File

@@ -346,8 +346,6 @@ class Stage(LockableStagingDir):
similar, and are intended to persist for only one run of spack.
"""
#: Most staging is managed by Spack. DIYStage is one exception.
needs_fetching = True
requires_patch_success = True
def __init__(
@@ -772,8 +770,6 @@ def __init__(self):
"cache_mirror",
"steal_source",
"disable_mirrors",
"needs_fetching",
"requires_patch_success",
]
)
@@ -812,6 +808,10 @@ def path(self):
def archive_file(self):
return self[0].archive_file
@property
def requires_patch_success(self):
return self[0].requires_patch_success
@property
def keep(self):
return self[0].keep
@@ -822,64 +822,7 @@ def keep(self, value):
item.keep = value
class DIYStage:
"""
Simple class that allows any directory to be a spack stage. Consequently,
it does not expect or require that the source path adhere to the standard
directory naming convention.
"""
needs_fetching = False
requires_patch_success = False
def __init__(self, path):
if path is None:
raise ValueError("Cannot construct DIYStage without a path.")
elif not os.path.isdir(path):
raise StagePathError("The stage path directory does not exist:", path)
self.archive_file = None
self.path = path
self.source_path = path
self.created = True
# DIY stages do nothing as context managers.
def __enter__(self):
pass
def __exit__(self, exc_type, exc_val, exc_tb):
pass
def fetch(self, *args, **kwargs):
tty.debug("No need to fetch for DIY.")
def check(self):
tty.debug("No checksum needed for DIY.")
def expand_archive(self):
tty.debug("Using source directory: {0}".format(self.source_path))
@property
def expanded(self):
"""Returns True since the source_path must exist."""
return True
def restage(self):
raise RestageError("Cannot restage a DIY stage.")
def create(self):
self.created = True
def destroy(self):
# No need to destroy DIY stage.
pass
def cache_local(self):
tty.debug("Sources for DIY stages are not cached")
class DevelopStage(LockableStagingDir):
needs_fetching = False
requires_patch_success = False
def __init__(self, name, dev_path, reference_link):

View File

@@ -371,7 +371,6 @@ def use_store(
data.update(extra_data)
# Swap the store with the one just constructed and return it
ensure_singleton_created()
spack.config.CONFIG.push_scope(
spack.config.InternalConfigScope(name=scope_name, data={"config": {"install_tree": data}})
)

View File

@@ -79,9 +79,11 @@ def restore(self):
self.test_state.restore()
spack.main.spack_working_dir = self.spack_working_dir
env = pickle.load(self.serialized_env) if _SERIALIZE else self.env
pkg = pickle.load(self.serialized_pkg) if _SERIALIZE else self.pkg
if env:
spack.environment.activate(env)
# Order of operation is important, since the package might be retrieved
# from a repo defined within the environment configuration
pkg = pickle.load(self.serialized_pkg) if _SERIALIZE else self.pkg
return pkg

View File

@@ -213,7 +213,9 @@ def test_satisfy_strict_constraint_when_not_concrete(architecture_tuple, constra
str(archspec.cpu.host().family) != "x86_64", reason="tests are for x86_64 uarch ranges"
)
def test_concretize_target_ranges(root_target_range, dep_target_range, result, monkeypatch):
spec = Spec(f"a %gcc@10 foobar=bar target={root_target_range} ^b target={dep_target_range}")
spec = Spec(
f"pkg-a %gcc@10 foobar=bar target={root_target_range} ^pkg-b target={dep_target_range}"
)
with spack.concretize.disable_compiler_existence_check():
spec.concretize()
assert spec.target == spec["b"].target == result
assert spec.target == spec["pkg-b"].target == result

View File

@@ -105,18 +105,18 @@ def config_directory(tmpdir_factory):
@pytest.fixture(scope="function")
def default_config(tmpdir, config_directory, monkeypatch, install_mockery_mutable_config):
# This fixture depends on install_mockery_mutable_config to ensure
def default_config(tmpdir, config_directory, monkeypatch, install_mockery):
# This fixture depends on install_mockery to ensure
# there is a clear order of initialization. The substitution of the
# config scopes here is done on top of the substitution that comes with
# install_mockery_mutable_config
# install_mockery
mutable_dir = tmpdir.mkdir("mutable_config").join("tmp")
config_directory.copy(mutable_dir)
cfg = spack.config.Configuration(
*[
spack.config.ConfigScope(name, str(mutable_dir))
for name in ["site/%s" % platform.system().lower(), "site", "user"]
spack.config.DirectoryConfigScope(name, str(mutable_dir))
for name in [f"site/{platform.system().lower()}", "site", "user"]
]
)
@@ -398,9 +398,7 @@ def fake_dag_hash(spec, length=None):
return "tal4c7h4z0gqmixb1eqa92mjoybxn5l6"[:length]
@pytest.mark.usefixtures(
"install_mockery_mutable_config", "mock_packages", "mock_fetch", "test_mirror"
)
@pytest.mark.usefixtures("install_mockery", "mock_packages", "mock_fetch", "test_mirror")
def test_spec_needs_rebuild(monkeypatch, tmpdir):
"""Make sure needs_rebuild properly compares remote hash
against locally computed one, avoiding unnecessary rebuilds"""
@@ -429,7 +427,7 @@ def test_spec_needs_rebuild(monkeypatch, tmpdir):
assert rebuild
@pytest.mark.usefixtures("install_mockery_mutable_config", "mock_packages", "mock_fetch")
@pytest.mark.usefixtures("install_mockery", "mock_packages", "mock_fetch")
def test_generate_index_missing(monkeypatch, tmpdir, mutable_config):
"""Ensure spack buildcache index only reports available packages"""
@@ -587,9 +585,7 @@ def test_update_sbang(tmpdir, test_mirror):
str(archspec.cpu.host().family) != "x86_64",
reason="test data uses gcc 4.5.0 which does not support aarch64",
)
def test_install_legacy_buildcache_layout(
mutable_config, compiler_factory, install_mockery_mutable_config
):
def test_install_legacy_buildcache_layout(mutable_config, compiler_factory, install_mockery):
"""Legacy buildcache layout involved a nested archive structure
where the .spack file contained a repeated spec.json and another
compressed archive file containing the install tree. This test

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