Commit Graph

40770 Commits

Author SHA1 Message Date
Gregory Becker
6737591016
add missing test_repo package
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-18 11:45:50 -07:00
Gregory Becker
66bb19084c
add test file for conditional dependencies
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-18 11:12:09 -07:00
Gregory Becker
9cdb25497d
style
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-16 16:58:20 -07:00
Gregory Becker
26c5f5265d
tests for conditional deps in requirements
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-16 16:56:43 -07:00
Gregory Becker
a16d10edc9
conditional deps: tests for Spec.satisfies and Spec.constrain
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-16 12:31:22 -07:00
Gregory Becker
0d021717ec
update completions
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-15 17:11:17 -07:00
Gregory Becker
231d537a2e
mypy fix
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-15 14:53:35 -07:00
Gregory Becker
452a84d9eb
conditional deps: fix parsing tests
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-15 14:00:55 -07:00
Gregory Becker
b03d5b7885
parseable_tokens: fix mypy annotations
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-15 10:35:13 -07:00
Gregory Becker
e0aa378f9e
fixup rebase missing closing paren
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 19:47:54 -07:00
Gregory Becker
2c2282dcb4
rebase fixup
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:44:29 -07:00
Gregory Becker
f27eb55f29
add test for toolchains
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:41 -07:00
Gregory Becker
019957a225
Spec.satisfies: Remove optimization that fails for spec with no dependency satisfying failed conditional dep
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:41 -07:00
Gregory Becker
7472a1db8a
Spec.constrain: separate constraints from edges with different conditions
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:40 -07:00
Gregory Becker
fb6ffc45d7
Spec.edge_attributes: deduplicate dependency conditions from multiple parents
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:40 -07:00
Gregory Becker
ebf4c8b445
Spec: filter conditional edges in Spec.dependencies/edges_to_dependencies
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:40 -07:00
Gregory Becker
79610ce80e
candidate.long_spec in error when concrete spec does not satisfy abstract
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:40 -07:00
Gregory Becker
462379b92f
conditional deps: add parsing test
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:37 -07:00
Gregory Becker
893d56ac2c
constrain: handle conditional deps
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:03 -07:00
Gregory Becker
b4f938adf4
toolchains/conditional deps: support prefers/requires
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:03:02 -07:00
Gregory Becker
6623209ba7
Spack toolchains
Add parser and config support for toolchains. A toolchain is a configured
string alias applied at parse time. When parsing the '%' sigil the parser
will match the token after the sigil to any toolchain name, and if there is
a match it will replace the sigil and following token with the tokens for
the associated string.

For example, the following config allows for the user to enforce usage of
clang for c/cxx and gcc for fortran with a single option `%my_toolchain`

toolchains:
  my_toolchain: ^[when=%c virtuals=c ]clang ^[when=%cxx virtuals=cxx ]clang ^[when=%fortran virtuals=fortran ]gcc

Note that the space before the ']' symbol is required for proper parsing. This
is considered a bug and will be fixed when possible.

Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 17:02:59 -07:00
Gregory Becker
6eaaaa4ae7
satisfies for conditional dependencies
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:55:01 -07:00
Gregory Becker
89e0cf886d
concretization for conditional dependencies
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:55:01 -07:00
Gregory Becker
e24bd2ef3c
fixup 2355eb5c3e
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:55:01 -07:00
Gregory Becker
2c43131aca
bugfix for error message when input spec does not satisfy concretizer output
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:55:00 -07:00
Gregory Becker
d792121cde
conditional deps: bugfix for type mismatch in _add_dependency
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:55:00 -07:00
Gregory Becker
ce3fcf011f
SpecParsingError: only print context if available
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:55:00 -07:00
Gregory Becker
e66ae3959d
Spec.long_spec: update for conditional deps
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:55:00 -07:00
Gregory Becker
02513eae7e
wip
Signed-off-by: Gregory Becker <becker33@llnl.gov>
2025-05-14 16:54:51 -07:00
Massimiliano Culpo
f8538a1b1c
Parse % as ^ in specs (#49808)
This PR modifies the parser, so that `%` is parsed as a `DEPENDENCY`, and all
node properties that follow are associated to the name after the `%`. e.g.,
in `foo %gcc +binutils` the `+binutils` refers to `gcc` and not to `foo`.

`%` is still parsed as a build-type dependency, at the moment.

Environments, config files and `package.py` files from before Spack v1.0 may have
spec strings with package variants, targets, etc. *after* a build dependency, and these
will need to be updated. You can use the `spack style --spec-strings` command to do this.

To see what strings will be parsed differently under Spack v1.0, run:

```
spack style --spec-strings FILES
```

where `FILES` is a list of filenames that may contain old specs. To update these spec
strings so that they parse correctly under both Spack 1.0 and Spack 0.x, you can run:

```
spack style --fix --spec-strings FILES
```

In the example above, `foo %gcc +binutils` would be rewritten as `foo +binutils %gcc`,
which parses the same in any Spack version.

In addition, this PR fixes several issues with `%` dependencies:

- [x] Ensure we can still constrain compilers on reuse
- [x] Ensure we can reuse a compiler by hash
- [x] Add tests

---------

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-05-14 16:17:34 -06:00
Patrick Lavin
1f0aaafc71
spatter: new package (#50326)
* add spatter package
* update license, change default backend
* move package to new location
* rearrage spack directives

---------

Co-authored-by: Patrick Lavin <prlavin@sandia.gov>
Co-authored-by: plavin <plavin@users.noreply.github.com>
2025-05-14 14:17:24 -07:00
Adam J. Stewart
fb8d6e8ea0
py-jsonargparse: add v4.39.0 (#50376) 2025-05-14 13:57:21 -07:00
Adam J. Stewart
756721c6dd
py-kornia: add v0.8.1 (#50377) 2025-05-14 13:56:03 -07:00
Paul
153c3f03c8
jacamar-ci: add v0.26.0 (#50459) 2025-05-14 13:38:46 -04:00
Robert Maaskant
c4f51ff60d
py-twine: add v6.1.0 (#50434)
* py-twine: add v6.1.0
* py-twine: add python version deps
2025-05-14 10:27:25 -07:00
Robert Maaskant
da650aac0c
gh: add v2.72.0 (#50425) 2025-05-14 10:34:21 -04:00
Robert Maaskant
782b5c30d2
glab: add v1.57.0 (#50424) 2025-05-14 10:33:40 -04:00
Harmen Stoppels
1e9be97a25
Update sys.path references (#50466) 2025-05-14 10:25:00 +00:00
Alberto Invernizzi
bd5f277e17
hpx: remove unused patch file (#50463) 2025-05-14 12:01:13 +02:00
Tamara Dahlgren
719fd6fb43
test_load_json_specfiles: skip virtual reconstruction (#50361) 2025-05-14 02:32:47 -06:00
Harmen Stoppels
abcc641373
Fix spack.repo.is_package_module (#50464) 2025-05-14 10:22:28 +02:00
G-Ragghianti
abcef565a8
spack env activate: respect --without-view when --temp (#50438) 2025-05-14 09:58:38 +02:00
Harmen Stoppels
00d65b75a1
remove std_cmake_args, std_pip_args, std_meson_args (#50462)
The "magic" globals `std_cmake_args`, `std_pip_args` and `std_meson_args` were deprecated in Spack 0.23 and removed in this commit, because they are no longer static and don't make sense to be defined for packages that do not depend on cmake, pip or meson.

Additionally, removing them ensures that `build_environment.py` no longer depends on builders, which will soon be moved out of `spack` into the `spack_repo` package.

The audit that scans whether these globals are used is not removed.
2025-05-14 09:51:42 +02:00
Massimiliano Culpo
de4a9e867d
py-torch: rework patches to avoid secondary rate limits (#50455)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-05-14 09:48:58 +02:00
ddement
56f40cc1c8
openturbine: Update dependencies and configuration in anticipation of beta release (#50355)
* Updated OpenTurbine package to reflect new configuration options
2025-05-13 13:07:44 -07:00
John W. Parent
ae2c9d1b99
Win: Restore oneAPI env setup (#50444)
oneAPI env setup was prematurely removed in compilers-as-nodes update
(#45189 - removed from the compiler class but not added to the
associated compiler package): restore it.
2025-05-13 12:22:49 -06:00
Stephen Nicholas Swatman
af24280c96
benchmark: add v1.9.3 (#50428)
This commit adds v1.9.3 of Google Benchmark.
2025-05-13 11:10:18 -07:00
Robert Maaskant
8daf4bc215
py-pyproject-hooks: add v1.1.0 and v1.2.0 (#50435) 2025-05-13 11:02:37 -07:00
Robert Maaskant
dabf7e9de8
py-distlib: add v0.3.8 and v0.3.9 (#50436)
* py-distlib: add v0.3.8 and v0.3.9

* py-distlib: github.com as homepage
2025-05-13 10:03:13 -07:00
Zack Galbreath
9cfb973d69
ci: recalibrate per-package resource requests (#50406) 2025-05-13 09:28:11 -05:00