Compare commits

...

1694 Commits

Author SHA1 Message Date
Massimiliano Culpo
0dc6c42156 Limit deepcopy to just the initial "all" section (#37718)
Modifications:
- [x] Limit the scope of the deepcopy when initializing module file writers
2023-05-22 11:52:18 -07:00
eugeneswalker
67d3e79351 tau %oneapi: -Wno-error=implicit-function-declaration 2023-05-22 09:36:03 -07:00
eugeneswalker
3b9fb0d694 legion +rocm: apply patch for --offload-arch (#37775)
* legion +rocm: apply patch for --offload-arch

* constrain to latest version
2023-05-21 07:20:51 -07:00
Robert Underwood
7df3ef4cfd updates for the libpressio ecosystem (#37764)
* updates for the libpressio ecosystem

* [@spackbot] updating style on behalf of robertu94

* style fix: remove FIXME

---------

Co-authored-by: Robert Underwood <runderwood@anl.gov>
Co-authored-by: eugeneswalker <eugenesunsetwalker@gmail.com>
2023-05-21 07:20:47 -07:00
Chris Green
9ee2d79de1 libxpm package: fix RHEL8 build with libintl (#37713)
Set LDFLAGS rather than LDLIBS
2023-05-16 13:32:26 -05:00
John W. Parent
79e4a13eee Windows: fix MSVC version handling (#37711)
MSVC compiler logic was using string parsing to extract version
from compiler spec, which was fragile. This broke in #37572, so has
been fixed and made more robust by using attribute access.
2023-05-16 11:00:55 -07:00
kwryankrattiger
4627438373 CI: Expand E4S ROCm stack to include missing DaV packages (#36843)
* CI: Expand E4S ROCm stack to include missing DaV packages

Ascent: Fixup for VTK-m with Kokkos backend

* DaV SDK: Removed duplicated openmp variant for ascent

* Drop visit and add conflict for Kokkos

* E4S: Drop ascent from CUDA builds
2023-05-16 09:34:52 -05:00
Harmen Stoppels
badaaf7092 gha rhel8-platform-python: configure git safe.directory (#37708) 2023-05-16 16:31:13 +02:00
Harmen Stoppels
815ac000cc Revert "hdf5: fix showconfig (#34920)" (#37707)
This reverts commit 192e564e26.
2023-05-16 15:57:15 +02:00
Peter Scheibel
7bc5b26c52 Requirements and preferences should not define (non-git) versions (#37687)
Ensure that requirements `packages:*:require:@x` and preferences `packages:*:version:[x]`
fail concretization when no version defined in the package satisfies `x`. This always holds
except for git versions -- they are defined on the fly.
2023-05-16 15:45:11 +02:00
Harmen Stoppels
a0e7ca94b2 gha bootstrap-dev-rhel8: configure git safe.directory (#37702)
git has been updated to something more recent
2023-05-16 15:21:42 +02:00
Harmen Stoppels
e56c90d839 check_modules_set_name: do not check for "enable" key (#37701) 2023-05-16 11:51:52 +02:00
Ye Luo
54003d4d72 Update llvm recipe regarding libomptarget. (#36675) 2023-05-16 11:20:02 +02:00
QuellynSnead
c47b554fa1 libxcb/xcb-proto: Enable internal Python dependency (#37575)
In the past, Spack did not allow two different versions of the
same package within a DAG. That led to difficulties with packages
that still required Python 2 while other packages had already
switched to Python 3.

The libxcb and xcb-proto packages did not have Python 3 support
for a time. To get around this issue, Spack maintainers disabled
their dependency on an internal (i.e., Spack-provided) Python
(see #4145),forcing these packages to look for a system-provided
Python (see #7646).

This has worked for us all right, but with the arrival of our most
recent platform we seem to be missing the critical xcbgen Python
module on the system. Since most software has largely moved on to
Python 3 now, let's re-enable internal Spack dependencies for the
libxcb and xcb-proto packages.
2023-05-16 10:00:01 +02:00
Mikael Simberg
b027f64a7f Add conflict for pika with fmt@10 and +cuda/rocm (#37679) 2023-05-16 09:24:02 +02:00
Greg Becker
3765a5f7f8 unify: when_possible and unify: true -- Bugfix for error in 37438 (#37681)
Two bugs came in from #37438

1. `unify: when_possible` was broken, because of an incorrect assertion. abstract/concrete
   spec pairs were compared against the results that were in the process of being computed,
   rather than against the previous results.
2. `unify: true` had an ordering bug that could mix the association between abstract and
   concrete specs

- [x] 1 is resolved by creating a lookup from old concrete specs to old abstract specs,
      and we use that to associate the "new" concrete specs that happen to be the old
      ones with their abstract specs (since those are stripped out for concretization
- [x] 2 is resolved by combining the new and old abstract as lists instead of combining
      them as sets. This is important because `set() | set()` does not make any ordering
      promises, even though set ordering is otherwise guaranteed in `python@3.7:`
2023-05-16 01:08:34 -04:00
Robert Blake
690661eadd Upgrading kosh to 3.0 (#37471)
* Upgrading kosh to 3.0.

* Accidentally regressed the package, changing back.

* Updating py-hdbscan versions for kosh.

* Fixing bug in patch.

* Adding 3.0.1

* Removing 3.0.

* Updating package deps for hdbscan to match requirements.txt.

* Version reqs for 3.0.*, need newer numpy and networkx

* spack style

* Reordering to match setup.py, adding "type" to python depends.
2023-05-16 01:08:20 -04:00
eugeneswalker
f7bbc326e4 trilinos: @develop fixes (#37615)
* trilinos@develop fixes

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

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

---------

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2023-05-15 17:25:14 -07:00
Scott Wittenburg
a184bfc1a6 gitlab ci: reduce job name length of build_systems pipeline (#37686) 2023-05-16 00:26:37 +02:00
Alec Scott
81634440fb circos: add v0.69-9 (#37479) 2023-05-15 14:43:44 -07:00
Alec Scott
711d7683ac alluxio: add v2.9.3 (#37488) 2023-05-15 14:42:48 -07:00
Alec Scott
967356bcf5 codec2: add v1.1.0 (#37480) 2023-05-15 14:42:08 -07:00
Alec Scott
c006ed034a coinutils: add v2.11.9 (#37481) 2023-05-15 14:41:25 -07:00
Alec Scott
d065c65d94 g2c: add v1.7.0 (#37482) 2023-05-15 14:40:41 -07:00
Alec Scott
e23c372ff1 shadow: add v4.13 (#37485) 2023-05-15 14:38:32 -07:00
Alec Scott
25d2de5629 yoda: add v1.9.8 (#37487) 2023-05-15 14:37:31 -07:00
Alec Scott
d73a23ce35 cpp-httplib: add v0.12.3 (#37490) 2023-05-15 14:35:32 -07:00
Alec Scott
a62cb3c0f4 entt: add v3.11.1 (#37491) 2023-05-15 14:34:47 -07:00
Alec Scott
177da4595e harfbuzz: add v7.2.0 (#37492) 2023-05-15 14:34:06 -07:00
Alec Scott
e4f05129fe libconfuse: add v3.3 (#37493) 2023-05-15 14:33:19 -07:00
Alec Scott
c25b994917 libnsl: add v2.0.0 (#37494) 2023-05-15 14:32:49 -07:00
Alec Scott
95c4c5270a p11-kit: add v0.24.1 (#37495) 2023-05-15 14:31:43 -07:00
Alec Scott
1cf6a15a08 packmol: add v20.0.0 (#37496)
* packmol: add v20.0.0
* Fix zoltan homepage url
2023-05-15 14:29:01 -07:00
Alec Scott
47d206611a perl-module-build-tiny: add v0.044 (#37497) 2023-05-15 14:25:53 -07:00
Alec Scott
a6789cf653 zoltan: add v3.901 (#37498) 2023-05-15 14:25:00 -07:00
Alec Scott
933cd858e0 bdii: add v6.0.1 (#37499) 2023-05-15 14:24:14 -07:00
Alec Scott
8856361076 audit-userspace: add v3.1.1 (#37505) 2023-05-15 14:15:48 -07:00
Alec Scott
d826df7ef6 babl: add v0.1.106 (#37506) 2023-05-15 14:15:28 -07:00
Alec Scott
d8a9b42da6 actsvg: add v0.4.33 (#37503) 2023-05-15 14:14:45 -07:00
Alec Scott
7d926f86e8 bat: add v0.23.0 (#37507) 2023-05-15 14:09:51 -07:00
Alec Scott
1579544d57 beast-tracer: add v1.7.2 (#37508) 2023-05-15 14:09:18 -07:00
Alec Scott
1cee3fb4a5 cronie: add v1.6.1 (#37509) 2023-05-15 14:08:41 -07:00
Alec Scott
a8e2ad53dd cups: add v2.3.3 (#37510) 2023-05-15 14:08:09 -07:00
Alec Scott
6821fa7246 diamond: add v2.1.6 (#37511) 2023-05-15 14:07:31 -07:00
Alec Scott
09c68da1bd dust: add v0.8.6 (#37513) 2023-05-15 14:06:31 -07:00
Alec Scott
73064d62cf f3d: add v2.0.0 (#37514) 2023-05-15 14:05:37 -07:00
Alec Scott
168ed2a782 fullock: add v1.0.50 (#37515) 2023-05-15 14:02:36 -07:00
Alec Scott
9f60b29495 graphviz: add v8.0.5 (#37517) 2023-05-15 14:00:50 -07:00
Alec Scott
7abcd78426 krakenuniq: add v1.0.4 (#37519) 2023-05-15 13:59:15 -07:00
Alec Scott
d5295301de libfyaml: add v0.8 (#37520) 2023-05-15 13:58:13 -07:00
Alec Scott
beccc49b81 libluv: add v1.44.2-1 (#37522) 2023-05-15 13:55:57 -07:00
Alec Scott
037e7ffe33 libvterm: add v0.3.1 (#37524) 2023-05-15 13:54:15 -07:00
Alec Scott
293da8ed20 lighttpd: add v1.4.69 (#37525) 2023-05-15 13:53:30 -07:00
Alec Scott
2780ab2f6c mrchem: add v1.1.2 (#37526) 2023-05-15 13:51:54 -07:00
Alec Scott
1ed3c81b58 mutationpp: add v1.0.5 (#37527) 2023-05-15 13:50:48 -07:00
Alec Scott
50ce0a25b2 preseq: add v2.0.3 (#37528) 2023-05-15 13:49:47 -07:00
Alec Scott
d784227603 shtools: add v4.10.2 (#37530) 2023-05-15 13:47:15 -07:00
Alec Scott
ab9ed91539 tig: add v2.5.8 (#37531) 2023-05-15 13:46:03 -07:00
Alec Scott
421256063e trimgalore: add v0.6.9 (#37532) 2023-05-15 13:44:44 -07:00
Alec Scott
75459bc70c vdt: add v0.4.4 (#37533) 2023-05-15 13:43:40 -07:00
Carson Woods
33752eabb8 Improve package source code context display on error (#37655)
Spack displays package code context when it shouldn't (e.g., on `FetchError`s)
and doesn't display it when it should (e.g., when errors occur in builder classes.
The line attribution can sometimes be off by one, as well.

- [x] Display package context when errors occur in a subclass of `PackageBase`
- [x] Display package context when errors occur in a subclass of `BaseBuilder`
- [x] Do not display package context when errors occur in `PackageBase`,
      `BaseBuilder` or other core code that is not in a `package.py` file.
- [x] Fix off-by-one error for core code (don't subtract one from the line number *unless*
      it's in an actual `package.py` file.

---------

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2023-05-15 13:38:11 -07:00
Alec Scott
f1d1bb9167 gsl-lite: add v0.41.0 (#37483) 2023-05-15 13:36:03 -07:00
Alec Scott
68eaff24b0 crtm-fix: correct invalid checksum for v2.4.0 (#37500) 2023-05-15 13:34:32 -07:00
Alec Scott
862024cae1 dos2unix: add v7.4.4 (#37512) 2023-05-15 13:31:19 -07:00
Adam J. Stewart
9d6bcd67c3 Update PyTorch ecosystem (#37562) 2023-05-15 13:29:44 -07:00
Chris White
d97ecfe147 SUNDIALS: new version of sundials and guard against examples being install (#37576)
* add new version of sundials and guard against examples not installing
* fix flipping of variant
* fix directory not being there when writing a file
2023-05-15 13:21:37 -07:00
Alec Scott
0d991de50a subversion: add v1.14.2 (#37543) 2023-05-15 13:16:04 -07:00
Alec Scott
4f278a0255 go: add v1.20.4 (#37660)
* go: add v1.20.4
* Deprecate v1.20.2 and v1.19.7 due to CVE-2023-24538
2023-05-15 13:10:02 -07:00
Chris Green
6e72a3cff1 [davix] Enable third party copies with gSOAP (#37648)
* [davix] Enable third party copies with gSOAP

* Add FNAL Spack team to maintainers
2023-05-15 14:46:52 -05:00
snehring
1532c77ce6 micromamba: adding version 1.4.2 (#37594)
* micromamba: adding version 1.4.2
* micromamba: change to micromamba-1.4.2 tag artifacts
2023-05-15 10:40:54 -07:00
Mikael Simberg
5ffbce275c Add ut (#37603) 2023-05-15 10:35:55 -07:00
Carsten Uphoff
0e2ff2dddb Add double-batched FFT library v0.4.0 (#37616)
Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>
2023-05-15 10:28:52 -07:00
Mikael Simberg
c0c446a095 stdexec: Add 23.03 (#37638) 2023-05-15 10:20:12 -07:00
snehring
33dbd44449 tmscore: adding new package (#37644) 2023-05-15 10:17:50 -07:00
Sean Koyama
7b0979c1e9 hwloc: explicitly disable building netloc for ~netloc (#35604)
* hwloc: explicitly disable building netloc for ~netloc

* hwloc: update syntax for netloc variant configure argument

---------

Co-authored-by: Sean Koyama <skoyama@anl.gov>
2023-05-15 12:16:21 -05:00
snehring
c9849dd41d tmalign: new version 20220412 (#37645) 2023-05-15 10:14:58 -07:00
Chris Green
d44e97d3f2 [scitokens-cpp] New variant cxxstd, depend on standalone jwt-cpp (#37643)
* Add FNAL Spack team to maintainers
* New variant `cxxstd`
* Depend on `jwt-cpp`
* New versions: 0.7.2, 0.7.3
2023-05-15 13:08:00 -04:00
Adam J. Stewart
8713ab0f67 py-timm: add v0.9 (#37654)
* py-timm: add v0.9
* add v0.9.1 and v0.9.2
* add new package py-safetensors (v0.3.1)
2023-05-15 09:41:58 -07:00
Harmen Stoppels
6a47339bf8 oneapi: before script load modules (#37678) 2023-05-15 18:39:58 +02:00
Alec Scott
1c0fb6d641 amrfinder: add v3.11.8 (#37656) 2023-05-15 09:38:29 -07:00
Alec Scott
b45eee29eb canal: add v1.1.6 (#37657) 2023-05-15 09:36:17 -07:00
Alec Scott
6d26274459 code-server: add v4.12.0 (#37658) 2023-05-15 09:35:17 -07:00
Alec Scott
2fb07de7bc fplll: add v5.4.4 (#37659) 2023-05-15 09:34:13 -07:00
Alec Scott
7678dc6b49 iso-codes: add v4.15.0 (#37661) 2023-05-15 09:27:05 -07:00
Frank Willmore
1944dd55a7 Update package.py for maker (#37662) 2023-05-15 09:25:43 -07:00
Adam J. Stewart
0b6c724743 py-sphinx: add v7.0.1 (#37665) 2023-05-15 09:23:22 -07:00
eugeneswalker
fa98023375 new pkg: py-psana (#37666) 2023-05-15 09:19:54 -07:00
Todd Gamblin
e79a911bac bugfix: allow reuse of packages from foreign namespaces
We currently throw a nasty error if you try to reuse packages from some other namespace
(e.g., OLCF), but we should be able to reuse patched local versions of builtin packages.

Right now the only obstacle to that is that we try to look up virtual info for unknown
namespaces, and we can't get the package from the repo to do that. We *can* assume that
a package with a known namespace is similar, and that its virtual provider information
is reasonably accurate, so we now do that. This isn't 100% accurate, but neither is
relying on the package itself, as it may have gone out of date.

The real solution here is virtual edge information, but this is a stopgap until we have
that.
2023-05-15 09:15:49 -07:00
Todd Gamblin
fd3efc71fd bugfix: don't look up virtual information for unknown packages
`spec_clauses()` attempts to look up package information for concrete specs in order to
determine which virtuals they may provide. This fails for renamed/deleted dependencies
of buildcaches and installed packages.

This will eventually be fixed by #35258, which adds virtual information on edges, but we
need a workaround to make older buildcaches usable.

- [x] make an exception for renamed packages and omit their virtual constraints
- [x] add a note that this will be solved by adding virtuals to edges
2023-05-15 09:15:49 -07:00
Todd Gamblin
0458de18de bugfix: don't look up patches from packages for concrete specs
The concretizer can fail with `reuse:true` if a buildcache or installation contains a
package with a dependency that has been renamed or deleted in the main repo (e.g.,
`netcdf` was refactored to `netcdf-c`, `netcdf-fortran`, etc., but there are still
binary packages with dependencies called `netcdf`).

We should still be able to install things for which we are missing `package.py` files.

`Spec.inject_patches_variant()` was failing this requirement by attempting to look up
the package class for concrete specs.  This isn't needed -- we can skip it.

- [x] swap two conditions in `Spec.inject_patches_variant()`
2023-05-15 09:15:49 -07:00
Vanessasaurus
f94ac8c770 add new package flux-security (#37668)
I will follow this up with a variant to flux-core to add flux-security, and then automation in the flux-framework/spack repository.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2023-05-15 09:14:44 -07:00
Andrew W Elble
a03c28a916 routinator: update, deprecate old version (#37676) 2023-05-15 09:10:40 -07:00
Victor Lopez Herrero
7b7fdf27f3 dlb: add v3.3 (#37677) 2023-05-15 09:08:57 -07:00
Sergey Kosukhin
192e564e26 hdf5: fix showconfig (#34920)
Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2023-05-15 11:03:03 -05:00
Chris Green
b8c5099cde [jwt-cpp] New package (#37641)
* [jwt-cpp] New package

* Update homepage

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

* [@spackbot] updating style on behalf of greenc-FNAL

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: greenc-FNAL <greenc-FNAL@users.noreply.github.com>
2023-05-15 10:16:11 -05:00
Stephen Sachs
ea5bca9067 palace: add v0.11.1 and explicit BLAS support (#37605) 2023-05-15 16:11:50 +02:00
Harmen Stoppels
e33eafd34f Bump tutorial command (#37674) 2023-05-15 13:54:52 +02:00
Xavier Delaruelle
e1344b5497 environment-modules: add version 5.3.0 (#37671) 2023-05-15 09:32:53 +02:00
Todd Gamblin
cf9dc3fc81 spack find: get rid of @= in arch/compiler headers (#37672)
The @= in `spack find` output adds a bit of noise. Remove it as we
did for `spack spec` and `spack concretize`.

This modifies display_specs so it actually covers other places we use that routine, as
well, e.g., `spack buildcache list`.

before:

```
-- linux-ubuntu20.04-aarch64 / gcc@=11.1.0 -----------------------
ofdlcpi libpressio@0.88.0
```

after:

```
-- linux-ubuntu20.04-aarch64 / gcc@11.1.0 -----------------------
ofdlcpi libpressio@0.88.0
```
2023-05-15 09:08:50 +02:00
Bruno Turcksin
d265dd2487 Kokkos: add new release and new architectures (#37650) 2023-05-14 13:21:40 -07:00
Greg Becker
a2a6e65e27 concretizer: don't change concrete environments without --force (#37438)
If a user does not explicitly `--force` the concretization of an entire environment,
Spack will try to reuse the concrete specs that are already in the lockfile.

---------

Co-authored-by: becker33 <becker33@users.noreply.github.com>
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2023-05-14 13:36:03 +02:00
Paul R. C. Kent
0085280db8 gcc: add 12.3.0 (#37553) 2023-05-14 12:08:41 +02:00
Andrew W Elble
6e07bf149d freecad: new package w/ dependencies/updates (#37557)
* freecad: new package w/ dependencies/updates

* review

* symbols/debug variants only when autotools
2023-05-13 21:14:50 -05:00
dale-mittleman
811cd5e7ef Adding librdkafka versions 1.9.2, 2.0.2 (#37501)
Co-authored-by: Alec Scott <hi@alecbcs.com>
2023-05-13 16:00:12 -07:00
Adam J. Stewart
081e21f55e py-lightly: py-torch~distributed supported in next release (#37558) 2023-05-13 15:49:45 -07:00
Todd Gamblin
c5a24675a1 spack spec: remove noisy @= from output (#37663)
@= is accurate, but noisy. Other UI commands tend not to
print the redundant `@=` for known concrete versions;
make `spack spec` consistent with them.
2023-05-13 11:34:15 -07:00
eugeneswalker
e9bfe5cd35 new pkg: py-psmon (#37652) 2023-05-13 11:16:44 -07:00
eugeneswalker
ca84c96478 new pkg: py-psalg (#37653) 2023-05-13 09:02:57 -07:00
Chris Green
c9a790bce9 [gsoap] New package gSOAP (#37647) 2023-05-13 11:01:50 -05:00
eugeneswalker
91c5b4aeb0 e4s ci stacks: add: hdf5-vol-{log,cache} (#37651) 2023-05-13 04:54:44 +00:00
Larry Knox
c2968b4d8c Add HDF5 version 1.14.1 (#37579)
* Add HDF5 version 1.14.1
* Update to version HDF5 1.14.1-2.
2023-05-12 20:54:08 -04:00
Scott Wittenburg
c08be95d5e gitlab ci: release fixes and improvements (#37601)
* gitlab ci: release fixes and improvements

  - use rules to reduce boilerplate in .gitlab-ci.yml
  - support copy-only pipeline jobs
  - make pipelines for release branches rebuild everything
  - make pipelines for protected tags copy-only

* gitlab ci: remove url changes used in testing

* gitlab ci: tag mirrors need public key

Make sure that mirrors associated with release branches and tags
contain the public key needed to verify the signed binaries.  This
also ensures that when stack-specific mirror contents are copied
to the root, the root mirror has the public key as well.

* review: be more specific about tags, curl flags

* Make the check in ci.yaml consistent with the .gitlab-ci.yml

---------

Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
2023-05-12 15:22:42 -05:00
Lehman Garrison
4e5fb62679 py-asdf: add 2.15.0 and dependencies (#37642)
* py-asdf: add 2.15.0 and dependencies

* py-asdf: PR review
2023-05-12 15:35:22 -04:00
Adam J. Stewart
cafc21c43d py-lightly: add v1.4.5 (#37625) 2023-05-12 11:39:03 -07:00
Adam J. Stewart
72699b43ab py-dill: add v0.3.1.1 (#37415) 2023-05-12 11:37:51 -07:00
MatthewLieber
6c85f59a89 Osu/mvapich2.3.7 1 (#37636)
* add 3.0b release

* adding mvapich2 version 2.3.7-1

---------

Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2023-05-12 11:30:05 -07:00
Nathan Hanford
eef2536055 Allow buildcache specs to be referenced by hash (#35042)
Currently, specs on buildcache mirrors must be referenced by their full description. This PR allows buildcache specs to be referenced by their hashes, rather than their full description.

### How it works

Hash resolution has been moved from `SpecParser` into `Spec`, and now includes the ability to execute a `BinaryCacheQuery` after checking the local store, but before concluding that the hash doesn't exist.

### Side-effects of Proposed Changes

Failures will take longer when nonexistent hashes are parsed, as mirrors will now be scanned.

### Other Changes

- `BinaryCacheIndex.update` has been modified to fail appropriately only when mirrors have been configured.
- Tests of hash failures have been updated to use `mutable_empty_config` so they don't needlessly search mirrors.
- Documentation has been clarified for `BinaryCacheQuery`, and more documentation has been added to the hash resolution functions added to `Spec`.
2023-05-12 10:27:42 -07:00
Massimiliano Culpo
e2ae60a3b0 Update archspec to v0.2.1 (#37633) 2023-05-12 18:59:58 +02:00
Chris Green
d942fd62b5 [root] New version 6.28.04 with C++20 support (#37640)
* Add FNAL Spack team to maintainers.
* New version 6.28/04.
* Support C++20 with ROOT >= 6.28.04.
2023-05-12 09:50:48 -07:00
Andrey Parfenov
99d511d3b0 Add more variants for STREAM to customize build (#37283)
* Added STREAM builds customization

* Changed stream_type to enum

* fix code style issues

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>

* rm not necessary optimization

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>

---------

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>
Co-authored-by: iermolae <igor.ermolaev@intel.com>
2023-05-12 12:17:59 -04:00
Adam J. Stewart
ab8661533b GDAL: add v3.7.0 (#37598) 2023-05-12 12:13:10 -04:00
Robert Cohn
f423edd526 intel-oneapi-mkl: support gnu openmp (#37637)
* intel-oneapi-mkl: support gnu openmp

* intel-oneapi-mkl: support gnu openmp
2023-05-12 12:03:19 -04:00
Manuela Kuhn
0a4d4da5ce py-rsatoolbox: add 0.0.5, 0.1.0 and 0.1.2 (#37595)
* py-rsatoolbox: add 0.0.5, 0.1.0 and 0.1.2 from wheels

* py-setuptools: add 63.4.3

* remove wheels and open up requirements

* Fix style

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

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

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

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

* Change version for python restriction

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-05-12 10:32:12 -05:00
Manuela Kuhn
845187f270 py-mne: add 1.4.0 and py-importlib-resources: add 5.12.0 (#37624)
* py-mne: add 1.4.0 and py-importlib-resources: add 5.12.0

* Fix style

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-05-12 10:31:35 -05:00
Lehman Garrison
9b35c3cdcc Update tensorflow variant defaults to match upstream defaults (#37610)
* Update tensorflow variant defaults to match project's defaults

* Apply code style
2023-05-12 10:27:51 -05:00
Robert Cohn
fe8734cd52 Fix logic in setting oneapi microarchitecture flags (#37634) 2023-05-12 10:58:08 -04:00
Chris Green
40b1aa6b67 [geant4,geant4-data] New version 10.7.4 (#37382) 2023-05-12 15:20:50 +01:00
Eduardo Rothe
ced8ce6c34 cudnn: add versions 8.5.0, 8.6.0, 8.7.0 (#35998) 2023-05-12 07:38:11 -04:00
Tamara Dahlgren
9201b66792 AML: Convert to new stand-alone test process (#35701) 2023-05-12 13:22:11 +02:00
Massimiliano Culpo
fd45839c04 Improve error message for buildcaches (#37626) 2023-05-12 11:55:13 +02:00
Mikael Simberg
2e25db0755 Add pika 0.15.1 (#37628) 2023-05-12 11:45:30 +02:00
Massimiliano Culpo
ebfc706c8c Improve error messages when Spack finds a too new DB / lockfile (#37614)
This PR ensures that we'll get a comprehensible error message whenever an old
version of Spack tries to use a DB or a lockfile that is "too new".

* Fix error message when using a too new DB
* Add a unit-test to ensure we have a comprehensible error message
2023-05-12 08:13:10 +00:00
Steven R. Brandt
644a10ee35 Coastal Codes (#37176)
* Coastal codes installation
* Finished debugging swan.
* Fix formatting errors identified by flake8
* Another attempt to fix formatting.
* Fixed year in header.
* Fixed maintainers syntax and other details from review comments.
* Remove redundant url.

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-05-12 00:57:59 -04:00
snehring
bb96e4c9cc py-pysam: adding version 0.21.0 (#37623)
* py-pysam: adding version 0.21.0

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-05-12 00:47:53 -04:00
Tamara Dahlgren
d204a08aea Install/update the qt dependency (#37600) 2023-05-11 22:58:33 -05:00
Tamara Dahlgren
8e18297cf2 Environments: store spack version/commit in spack.lock (#32801)
Add a section to the lock file to track the Spack version/commit that produced
an environment. This should (eventually) enhance reproducibility, though we
do not currently do anything with the information. It just adds to provenance
at the moment.

Changes include:
- [x] adding the version/commit to `spack.lock`
- [x] refactor `spack.main.get_version()
- [x] fix a couple of environment lock file-related typos
2023-05-11 23:13:36 -04:00
MatthewLieber
b06d20be19 add 3.0b release (#37599)
Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2023-05-11 17:10:15 -07:00
Alec Scott
a14d6fe56d gegl: add v0.4.44 (#37516) 2023-05-11 15:52:22 -07:00
eugeneswalker
47ec6a6ae5 e4s ci: trilinos +rocm: enable belos to fix build failure (#37617) 2023-05-11 14:02:20 -07:00
Massimiliano Culpo
5c7dda7e14 Allow using -j to control the parallelism of concretization (#37608)
fixes #29464

This PR allows to use
```
$ spack concretize -j X
```
to set a cap on the parallelism of concretization from the command line
2023-05-11 13:29:17 -07:00
Dom Heinzeller
0e87243284 libpng package: fix build error on macOS arm64 (#37613)
Turn off ARM NEON support on MacOS arm64

Co-authored-by: Stephen Herbener <stephen.herbener@gmail.com>
2023-05-11 16:27:43 -04:00
Nichols A. Romero
384f5f9960 Update Intel Pin package up to 3.27 (#37470) 2023-05-11 19:06:03 +02:00
Andrey Parfenov
c0f020d021 add openmp_max_threads variant and enable avx 512 optimizations for icelake (#37379)
* add openmp_max_threads variant and enable avx 512 optimizations for icelake and cascadelake

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>

* revert manual enabling of avx512 for icelake and cascadelake

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>

---------

Signed-off-by: Andrey Parfenov <andrey.parfenov@intel.com>
2023-05-11 09:23:04 -05:00
Tamara Dahlgren
dc58449bbf caliper: convert to new stand-alone test process (#35691) 2023-05-11 14:40:02 +02:00
Tamara Dahlgren
d8a72b68dd bricks: convert to new stand-alone test process (#35694) 2023-05-11 14:39:09 +02:00
Mosè Giordano
040c6e486e julia: Fix llvm shlib symbol version for v1.9 (#37606) 2023-05-11 08:22:40 -04:00
Harmen Stoppels
4fa7880b19 lmod: fix CompilerSpec concrete version / range (#37604) 2023-05-11 12:00:07 +02:00
Nisarg Patel
f090b05346 Update providers of virtual packages related to Intel OneAPI (#37412)
* add a virtual dependency name instead of complete package name

* add OneAPI components as providers of virtual packages

* Revert the default of tbb

---------

Co-authored-by: Nisarg Patel <nisarg.patel@lrz.de>
2023-05-11 05:58:24 -04:00
Mikael Simberg
0c69e5a442 Add fmt 10.0.0 (#37591) 2023-05-11 04:57:47 -04:00
Massimiliano Culpo
8da29d1231 Improve the message for errors in package recipes (#37589)
fixes #30355
2023-05-11 10:34:39 +02:00
Massimiliano Culpo
297329f4b5 Improve error message for missing "command" entry in containerize (#37590)
fixes #21242
2023-05-11 10:33:51 +02:00
Mosè Giordano
1b6621a14b julia: Add v1.9.0 (#35631) 2023-05-11 10:30:52 +02:00
Peter Scheibel
bfa54da292 Allow clingo to enforce flags when they appear in requirements (#37584)
Flags are encoded differently from other variants, and they need a choice rule to
ensure clingo has a choice to impose (or not) a constraint.
2023-05-11 09:17:16 +02:00
Jaelyn Litzinger
730ab1574f Upgrade exago's petsc dependency to v3.19.0 (#37092)
* add petsc 3.19 for exago@develop
* simplify version syntax
2023-05-10 18:25:11 -07:00
Harmen Stoppels
2c17c4e632 ci: remove --mirror-url flag (#37457)
The flags --mirror-name / --mirror-url / --directory were deprecated in 
favor of just passing a positional name, url or directory, and letting spack
figure it out.

---------

Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2023-05-10 16:34:29 -06:00
John W. Parent
ec800cccbb Windows: Fix external detection for service accounts (#37293)
Prior to this PR, the HOMEDRIVE environment variable was used to
detect what drive we are operating in. This variable is not available
for service account logins (like what is used for CI), so switch to
extracting the drive from PROGRAMFILES (which is more-widely defined).
2023-05-10 18:12:58 -04:00
John W. Parent
85cc9097cb Windows: prefer Python decompression support (#36507)
On Windows, several commonly available system tools for decompression
are unreliable (gz/bz2/xz). This commit refactors `decompressor_for`
to call out to a Windows or Unix-specific method:

* The decompressor_for_nix method behaves the same as before and
  generally treats the Python/system support options for decompression
  as interchangeable (although avoids using Python's built-in tar
  support since that has had issues with permissions).
* The decompressor_for_win method can only use Python support for
  gz/bz2/xz, although for a tar.gz it does use system support for
  untar (after the decompression step). .zip uses the system tar
  utility, and .Z depends on external support (i.e. that the user
  has installed 7zip).

A naming scheme has been introduced for the various _decompression
methods:

* _system_gunzip means to use a system tool (and fail if it's not
    available)
* _py_gunzip means to use Python's built-in support for decompressing
    .gzip files (and fail if it's not available)
* _gunzip is a method that can do either
2023-05-10 18:07:56 -04:00
snehring
830ee6a1eb py-gtdbtk: adding version 2.3.0 (#37581)
* py-gtdbtk: adding version 2.3.0

* py-gtdbtk: adding missing pydantic dep

* py-gtdbtk: restrict pydantic dep
2023-05-10 16:58:42 -05:00
Alec Scott
0da7b83d0b fd: merge fd-find with fd (#37580) 2023-05-10 14:29:13 -07:00
SoniaScard
f51a4a1ae1 Ophidia-analytics-framework, ophidia-io-server: Work (#36801)
* ophidia-io-server: new package at v1.7
* ophidia-io-server: Fix package
* ophidia-analytics-framework: new package at v1.7
* Fix code style in ophidia-analytics-framework
* Merge
* ophidia-analytics-framework: update package to v1.7.3
* Update package.py
* Fix style

---------

Co-authored-by: SoniaScard <SoniaScard@users.noreply.github.com>
Co-authored-by: Donatello Elia <eldoo@users.noreply.github.com>
2023-05-10 08:38:43 -07:00
H. Joe Lee
e49f10a28e fix(hdf5): h5pfc link failure (#37468)
* fix(hdf5): h5pfc link failure
  develop branch doesn't need linking any more.
  See: acb186f6e5
* [@spackbot] updating style on behalf of hyoklee

---------

Co-authored-by: hyoklee <hyoklee@users.noreply.github.com>
2023-05-10 08:33:27 -07:00
Harmen Stoppels
1d96fdc74a Fix compiler version issues (concrete vs range) (#37572) 2023-05-10 17:26:22 +02:00
Robert Cohn
8eb1829554 intel-oneapi-mkl: add threading support (#37586) 2023-05-10 10:47:57 -04:00
matteo-chesi
e70755f692 cuda: add versions 12.0.1, 12.1.0 and 12.1.1 (#37083) 2023-05-10 15:31:07 +02:00
G-Ragghianti
ebb40ee0d1 New option "--first" for "spack location" (#36283) 2023-05-10 12:26:29 +02:00
Robert Cohn
a2ea30aceb Create include/lib in prefix for oneapi packages (#37552) 2023-05-10 06:25:00 -04:00
Tamara Dahlgren
9a37c8fcb1 Stand-alone testing: make recipe support and processing spack-/pytest-like (#34236)
This is a refactor of Spack's stand-alone test process to be more spack- and pytest-like. 

It is more spack-like in that test parts are no longer "hidden" in a package's run_test()
method and pytest-like in that any package method whose name starts test_ 
(i.e., a "test" method) is a test part. We also support the ability to embed test parts in a
test method when that makes sense.

Test methods are now implicit test parts. The docstring is the purpose for the test part. 
The name of the method is the name of the test part. The working directory is the active
spec's test stage directory. You can embed test parts using the test_part context manager.

Functionality added by this commit:
* Adds support for multiple test_* stand-alone package test methods, each of which is 
   an implicit test_part for execution and reporting purposes;
* Deprecates package use of run_test();
* Exposes some functionality from run_test() as optional helper methods;
* Adds a SkipTest exception that can be used to flag stand-alone tests as being skipped;
* Updates the packaging guide section on stand-alone tests to provide more examples;
* Restores the ability to run tests "inherited" from provided virtual packages;
* Prints the test log path (like we currently do for build log paths);
* Times and reports the post-install process (since it can include post-install tests);
* Corrects context-related error message to distinguish test recipes from build recipes.
2023-05-10 11:34:54 +02:00
Alec Scott
49677b9be5 squashfs-mount: add v0.4.0 (#37478) 2023-05-10 10:49:21 +02:00
Alec Scott
6fc44eb540 shared-mime-info: add v1.10 (#37477) 2023-05-10 10:49:00 +02:00
Alec Scott
234febe545 kinesis: add v2.4.8 (#37476) 2023-05-10 10:48:44 +02:00
Alec Scott
83a1245bfd unifdef: add v2.12 (#37456) 2023-05-10 10:48:20 +02:00
Alec Scott
241c37fcf7 conmon: add v2.1.7 (#37320) 2023-05-10 10:47:54 +02:00
Alec Scott
a8114ec52c runc: add v1.1.6 (#37308) 2023-05-10 10:47:44 +02:00
Manuela Kuhn
f92b5d586f py-datalad: add 0.18.3 (#37411)
* py-datalad: add 0.18.3

* [@spackbot] updating style on behalf of manuelakuhn

* Remove metadata variant

* Fix dependencies

* Remove redundant version restriction
2023-05-10 03:57:59 -04:00
Alec Scott
492d68c339 r-knitr: add v1.42 (#37203) 2023-05-09 17:43:58 -05:00
Alec Scott
2dcc55d6c5 ssht: add v1.5.2 (#37542) 2023-05-09 11:37:40 -07:00
eugeneswalker
dc897535df py-loguru: add v0.2.5, v0.3.0 (#37574)
* py-loguru: add v0.2.5

* py-loguru: add v0.3.0
2023-05-09 11:16:02 -07:00
kwryankrattiger
45e1d3498c CI: Backwards compatibility requires script override behavior (#37015) 2023-05-09 10:42:06 -06:00
eugeneswalker
af0f094292 memkind: parallel = false (#37566) 2023-05-09 09:04:54 -07:00
Alec Scott
44b51acb7b z-checker: add v0.9.0 (#37534) 2023-05-09 06:52:43 -07:00
eugeneswalker
13dd05e5ec hip: get_paths for hipify-clang (#37559)
* hip: get_paths for hipify-clang

* fix: need to actually use get_paths now to get hipify-clang path

* set hipify-clang path differentluy for external vs spack-installed case

* [@spackbot] updating style on behalf of eugeneswalker
2023-05-09 06:51:04 -07:00
Massimiliano Culpo
89520467e0 Use single quotes to inline manifest in Dockerfiles (#37571)
fixes #22341

Using double quotes creates issues with shell variable substitutions,
in particular when the manifest has "definitions:" in it. Use single
quotes instead.
2023-05-09 13:20:25 +02:00
Harmen Stoppels
9e1440ec7b spack view copy: relocate symlinks (#32306) 2023-05-09 12:17:16 +02:00
Alec Scott
71cd94e524 gh: add conflict for v2.28.0 and macos (#37563) 2023-05-09 08:55:54 +02:00
Alec Scott
ba696de71b breseq: add v0.38.1 (#37535) 2023-05-08 14:39:45 -07:00
Alec Scott
06b63cfce3 exiv2: add v0.27.6 (#37536) 2023-05-08 14:25:11 -07:00
Alec Scott
5be1e6e852 hazelcast: add v5.2.3 (#37537) 2023-05-08 14:22:46 -07:00
Alec Scott
e651c2b122 libjpeg-turbo: add v2.1.5 (#37539) 2023-05-08 14:19:24 -07:00
Alec Scott
ec2a4869ef mlst: add v2.23.0 (#37540) 2023-05-08 14:03:57 -07:00
Alec Scott
082fb1f6e9 scitokens-cpp: add v1.0.1 (#37541) 2023-05-08 14:00:33 -07:00
Alec Scott
95a65e85df delta: add v2.3.0 (#37545) 2023-05-08 13:46:08 -07:00
Alec Scott
d9e7aa4253 fd-find: add v8.7.0 (#37547) 2023-05-08 13:43:13 -07:00
Alec Scott
5578209117 druid: add v1.2.8 (#37546) 2023-05-08 13:42:10 -07:00
Alec Scott
b013a2de50 fd-find: add v8.7.0 (#37547) 2023-05-08 13:28:50 -07:00
Mark W. Krentel
d1c722a49c hpcviewer: add version 2023.04 (#37556) 2023-05-08 12:30:10 -07:00
eugeneswalker
3446feff70 use latest trilinos for +cuda variants (#37164) 2023-05-08 12:29:54 -07:00
eugeneswalker
41afeacaba new package: psalg (#37357)
* new package: psalg

* use new maintainer syntax

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

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-05-08 12:26:19 -07:00
Massimiliano Culpo
0139288ced Add a "requires" directive, extend functionality of package requirements (#36286)
Add a "require" directive to packages, which functions exactly like
requirements specified in packages.yaml (uses the same fact-generation
logic); update both to allow making the requirement conditional.

* Packages may now use "require" to add constraints. This can be useful
  for something like "require(%gcc)" (where before we had to add a
  conflict for every compiler except gcc).
* Requirements (in packages.yaml or in a "require" directive) can be
  conditional on a spec, e.g. "require(%gcc, when=@1.0.0)" (version
  1.0.0 can only build with gcc).
* Requirements may include a message which clarifies why they are needed.
  The concretizer assigns a high priority to errors which generate these
  messages (in particular over errors for unsatisfied requirements that
  do not produce messages, but also over a number of more-generic
  errors).
2023-05-08 10:12:26 -07:00
eugeneswalker
d0cba2bf35 caliper +rocm: use hipcc for CMAKE_CXX_COMPILER (#35219) 2023-05-08 09:40:23 -07:00
Mark W. Krentel
6afa2d6298 libmonitor: add version 2023.03.15 (#37434) 2023-05-08 08:58:11 -07:00
Seth R. Johnson
947445ccdd Fix pixman macOS build and add missing build deps (#36982) 2023-05-08 08:47:51 -07:00
snehring
b605cd0151 trinity: adding version 2.15.1 (#37076) 2023-05-08 08:32:05 -07:00
Mikael Simberg
273bccbccf Add HPX 1.9.0 (#37426) 2023-05-08 12:24:02 +02:00
Alec Scott
d5d596a851 pkgconf: add v1.9.4 (#36437) 2023-05-07 23:27:28 +02:00
eugeneswalker
0ddb5de27c caliper +rocm: patch missing libunwind include dir (#37461)
* patch missing libunwind include dir

* caliper +libunwind +sampler: patch libunwind include dir
2023-05-07 12:49:46 -07:00
eugeneswalker
8942909852 petsc@3.19.1 +rocm: conflicts with rocprim@5.3.0 (#37474)
* petsc@3.19.1 +rocm: conflicts with rocprim@5.3.0

* conflict with rocprim@5.3.0:5.3.2 when +rocm
2023-05-07 17:27:52 +00:00
Alec Scott
0143d5bf01 libtiff: add v4.5.0 (#37523) 2023-05-07 12:22:56 -04:00
Harmen Stoppels
e17d6d5eee gitlab ci: bump tutorial image (#37544) 2023-05-07 16:24:33 +02:00
Alec Scott
2a54cda953 libblastrampoline: add v5.8.0 (#37538) 2023-05-07 10:45:34 +02:00
Alec Scott
097d3e15b4 libpcap: add v1.10.4 (#37451) 2023-05-05 22:02:57 -07:00
Tamara Dahlgren
374264f610 Packaging Guide: build-time test updates: option and test logs (#37093)
* Packaging Guide: build-time test updates: option and test logs
* Fix a couple of typos
2023-05-05 22:19:06 -06:00
Chris Green
d6bf9bc8f1 [elfutils] iconv is required (see ./configure --help) (#37464) 2023-05-05 22:16:03 -06:00
Harmen Stoppels
fa7719a031 Improve version, version range, and version list syntax and behavior (#36273)
## Version types, parsing and printing

- The version classes have changed: `VersionBase` is removed, there is now a
  `ConcreteVersion` base class. `StandardVersion` and `GitVersion` both inherit
  from this.

- The public api (`Version`, `VersionRange`, `ver`) has changed a bit:
  1. `Version` produces either `StandardVersion` or `GitVersion` instances.
  2. `VersionRange` produces a `ClosedOpenRange`, but this shouldn't affect the user.
  3. `ver` produces any of `VersionList`, `ClosedOpenRange`, `StandardVersion`
     or `GitVersion`.

- No unexpected type promotion, so that the following is no longer an identity:
  `Version(x) != VersionRange(x, x)`.

- `VersionList.concrete` now returns a version if it contains only a single element
  subtyping `ConcreteVersion` (i.e. `StandardVersion(...)` or `GitVersion(...)`)

- In version lists, the parser turns `@x` into `VersionRange(x, x)` instead
  of `Version(x)`.

- The above also means that `ver("x")` produces a range, whereas
  `ver("=x")` produces a `StandardVersion`. The `=` is part of _VersionList_
  syntax.

- `VersionList.__str__` now outputs `=x.y.z` for specific version entries,
  and `x.y.z` as a short-hand for ranges `x.y.z:x.y.z`.

- `Spec.format` no longer aliases `{version}` to `{versions}`, but pulls the
  concrete version out of the list and prints that -- except when the list is
  is not concrete, then is falls back to `{versions}` to avoid a pedantic error.
  For projections of concrete specs, `{version}` should be used to render
  `1.2.3` instead of `=1.2.3` (which you would get with `{versions}`).
  The default `Spec` format string used in `Spec.__str__` now uses
  `{versions}` so that `str(Spec(string)) == string` holds.

## Changes to `GitVersion`

- `GitVersion` is a small wrapper around `StandardVersion` which enriches it
   with a git ref. It no longer inherits from it.

- `GitVersion` _always_ needs to be able to look up an associated Spack version
  if it was not assigned (yet). It throws a `VersionLookupError` whenever `ref_version`
  is accessed but it has no means to look up the ref; in the past Spack would
  not error and use the commit sha as a literal version, which was incorrect.
   
- `GitVersion` is never equal to `StandardVersion`, nor is satisfied by it. This
  is such that we don't lose transitivity. This fixes the following bug on `develop`
  where `git_version_a == standard_version == git_version_b` does not imply
  `git_version_a == git_version_b`. It also ensures equality always implies equal
  hash, which is also currently broken on develop; inclusion tests of a set of
  versions + git versions would behave differently from inclusion tests of a
  list of the same objects.

- The above means `ver("ref=1.2.3) != ver("=1.2.3")` could break packages that branch
  on specific versions, but that was brittle already, since the same happens with
  externals: `pkg@1.2.3-external` suffixes wouldn't be exactly equal either. Instead,
  those checks should be `x.satisfies("@1.2.3")` which works both for git versions and
  custom version suffixes.

- `GitVersion` from commit will now print as `<hash>=<version>` once the
  git ref is resolved to a spack version. This is for reliability -- version is frozen
  when added to the database and queried later. It also improves performance
  since there is no need to clone all repos of all git versions after `spack clean -m`
  is run and something queries the database, triggering version comparison, such
  as potentially reuse concretization.

- The "empty VerstionStrComponent trick" for `GitVerison` is dropped since it wasn't
  representable as a version string (by design). Instead, it's replaced by `git`,
  so you get `1.2.3.git.4` (which reads 4 commits after a tag 1.2.3). This means
  that there's an edge case for version schemes `1.1.1`, `1.1.1a`, since the
  generated git version `1.1.1.git.1` (1 commit after `1.1.1`) compares larger
  than `1.1.1a`, since `a < git` are compared as strings. This is currently a
  wont-fix edge case, but if really required, could be fixed by special casing
  the `git` string.

- Saved, concrete specs (database, lock file, ...) that only had a git sha as their
  version, but have no means to look the effective Spack version anymore, will
  now see their version mapped to `hash=develop`. Previously these specs
  would always have their sha literally interpreted as a version string (even when
  it _could_ be looked up). This only applies to databases, lock files and spec.json
  files created before Spack 0.20; after this PR, we always have a Spack version
  associated to the relevant GitVersion).

- Fixes a bug where previously `to_dict` / `from_dict` (de)serialization would not
  reattach the repo to the GitVersion, causing the git hash to be used as a literal
  (bogus) version instead of the resolved version. This was in particularly breaking
  version comparison in the build process on macOS/Windows.


## Installing or matching specific versions

- In the past, `spack install pkg@3.2` would install `pkg@=3.2` if it was a
  known specific version defined in the package, even when newer patch releases
  `3.2.1`, `3.2.2`, `...` were available. This behavior was only there because
  there was no syntax to distinguish between `3.2` and `3.2.1`. Since there is
  syntax for this now through `pkg@=3.2`, the old exact matching behavior is
  removed. This means that `spack install pkg@3.2` constrains the `pkg` version
  to the range `3.2`, and `spack install pkg@=3.2` constrains it to the specific
  version `3.2`.

- Also in directives such as `depends_on("pkg@2.3")` and their when
  conditions `conflicts("...", when="@2.3")` ranges are ranges, and specific
  version matches require `@=2.3.`.

- No matching version: in the case `pkg@3.2` matches nothing, concretization
  errors. However, if you run `spack install pkg@=3.2` and this version
  doesn't exist, Spack will define it; this allows you to install non-registered
  versions.

- For consistency, you can now do `%gcc@10` and let it match a configured
  `10.x.y` compiler. It errors when there is no matching compiler.
  In the past it was interpreted like a specific `gcc@=10` version, which
  would get bootstrapped.

- When compiler _bootstrapping_ is enabled, `%gcc@=10.2.0` can be used to
  bootstrap a specific compiler version.

## Other changes

- Externals, compilers, and develop spec definitions are backwards compatible.
  They are typically defined as `pkg@3.2.1` even though they should be
  saying `pkg@=3.2.1`. Spack now transforms `pkg@3` into `pkg@=3` in those cases.

- Finally, fix strictness of `version(...)` directive/declaration. It just does a simple
  type check, and now requires strings/integers. Floats are not allowed because
  they are ambiguous `str(3.10) == "3.1"`.
2023-05-05 22:04:41 -06:00
Alec Scott
f6497972b8 apr: add v1.7.4 (#37445) 2023-05-05 18:28:58 -04:00
Alec Scott
5c3ec5f47c fms: add v2023.01 (#37450) 2023-05-05 18:24:10 -04:00
Manuela Kuhn
16bddf152e py-palettable: add 3.3.3 (#37443) 2023-05-05 18:23:33 -04:00
Mittagskogel
4403df4f08 hdf5: Add conflict for older cmake versions. (#37463)
See HDFGroup/hdf5 issue 2906
2023-05-05 18:19:39 -04:00
Alec Scott
7cf45442a7 phast: add v1.6 (#37455) 2023-05-05 18:14:45 -04:00
Alec Scott
edb8bc91b2 mmg: add v5.7.1 (#37453) 2023-05-05 18:14:23 -04:00
Alec Scott
9610ecb936 octave: add v8.2.0 (#37454) 2023-05-05 18:09:16 -04:00
Eric Berquist
b2a8e8734e Fix typos in packaging guide (#37460) 2023-05-05 22:08:58 +00:00
Alec Scott
c287dbbf13 logrotate: add v3.21.0 (#37452) 2023-05-05 18:08:54 -04:00
Alec Scott
1808ce11de extrae: add v4.0.4 (#37449) 2023-05-05 18:03:55 -04:00
Alec Scott
13b0b1d574 cli11: add v2.3.2 (#37447) 2023-05-05 11:33:49 -07:00
snehring
261a34a7a4 Adding ncbi-vdb 3.0.2 (#37435)
* ncbi-vdb: adding version 3.0.2
* sra-tools: adding version restriction for newer versions
2023-05-05 11:06:07 -07:00
Alec Scott
222b44bd45 biobloom: add v2.3.5 (#37446) 2023-05-05 11:01:22 -07:00
Alec Scott
c105ac07bb editline: add v1.17.1 (#37448) 2023-05-05 10:57:47 -07:00
Harmen Stoppels
9ef062fcca Add spack buildcache push (alias to buildcache create) (#34861)
`spack buildcache create` is a misnomer cause it's the only way to push to
an existing buildcache (and it in fact calls binary_distribution.push).

Also we have `spack buildcache update-index` but for create the flag is
`--rebuild-index`, which is confusing (and also... why "rebuild"
something if the command is "create" in the first place, that implies it
wasn't there to begin with).

So, after this PR, you can use either

```
spack buildcache create --rebuild-index
```

or

```
spack buildcache push --update-index
```

Also, alias `spack buildcache rebuild-index` to `spack buildcache
update-index`.
2023-05-05 19:54:26 +02:00
Harmen Stoppels
ddea33bdc0 Update tutorial pipeline to Ubuntu 22.04 (#35451) 2023-05-05 17:52:07 +02:00
Harmen Stoppels
803425780e ci: stop downloading recent gmake (#37458) 2023-05-05 17:09:56 +02:00
Chris Green
d600aef4f4 Relax environment manifest filename requirements and lockfile identification criteria (#37413)
* Relax filename requirements and lockfile identification criteria

* Tests

* Update function docs and help text

* Update function documentation

* Update Sphinx documentation

* Adjustments per https://github.com/spack/spack/pull/37413#pullrequestreview-1413540132

* Further tweaks per https://github.com/spack/spack/pull/37413#pullrequestreview-1413971254

* Doc fixes per https://github.com/spack/spack/pull/37413#issuecomment-1535976068
2023-05-05 07:40:49 -05:00
Harmen Stoppels
af9b9f6baf binutils: enable debug section compression with zlib by default (#37359) 2023-05-05 14:14:48 +02:00
Harmen Stoppels
bbc779f3f0 cc: deal with -Wl,-rpath= without value, deal with NAG (#37215)
Spack never parsed `nagfor` linker arguments put on the compiler line: 
```
nagfor -Wl,-Wl,,-rpath,,/path
````
so, let's continue not attempting to parse that.
2023-05-05 12:16:31 +02:00
Harmen Stoppels
3ecb84d398 elfutils: unconditionally depend on zstd (#37368) 2023-05-05 10:40:14 +02:00
Michael Kuhn
b2c3973d4a meson: change default build type to "release" (#37436)
The same was done for CMake in #36679.
2023-05-05 10:35:40 +02:00
Harmen Stoppels
35e1dc8eba spack uninstall: reduce verbosity with named environments (#34001) 2023-05-05 10:23:08 +02:00
Harmen Stoppels
bf71b78094 deprecate buildcache create --rel, buildcache install --allow-root (#37285)
`buildcache create --rel`: deprecate this because there is no point in
making things relative before tarballing; on install you need to expand
`$ORIGIN` / `@loader_path` / relative symlinks anyways because some
dependencies may actually be in an upstream, or have different
projections.

`buildcache install --allow-root`: this flag was propagated through a
lot of functions but was ultimately unused.
2023-05-05 09:51:53 +02:00
Sergey Kosukhin
85730de055 mpich: avoid '-fallow-argument-mismatch' in the compiler wrappers (#33323) 2023-05-05 09:37:12 +02:00
Alec Scott
bc88b581b4 cleaveland4: add v4.5 (#37319) 2023-05-05 03:03:47 -04:00
Alec Scott
1ae556829a Revert "lua: add v5.4.5 (#37334)" (#37431)
This reverts commit 59e2ef6ad6.
2023-05-05 02:58:45 -04:00
Massimiliano Culpo
0c5a5e2ce0 Remove "blacklist" and "whitelist" from module configuration (#37432)
The sections were deprecated in v0.19
2023-05-05 00:28:34 -04:00
Greg Becker
c3593e5b48 Allow choosing the name of the packages subdirectory in repositories (#36643)
Co-authored-by: becker33 <becker33@users.noreply.github.com>
2023-05-04 23:36:21 +02:00
Robert Cohn
3c40d9588f intel-oneapi-mkl: include mpi libs when using +cluster (#37386) 2023-05-04 14:46:55 -04:00
Massimiliano Culpo
16613408e4 Place an upper bound on urllib3 to build docs (#37433) 2023-05-04 19:40:43 +02:00
Jack Morrison
6f22b5d724 iperf2: Add new versions 2.1.{7,8,9} (#37408) 2023-05-04 10:34:49 -07:00
Robert Cohn
420e093e42 detect ifx 2023.1, add test (#37377) 2023-05-04 10:27:19 -07:00
Erik Heeren
8e73eeb4b9 py-amici, py-python-libsbml: new packages (#35532)
* py-amici, py-python-libsbml: new packages

* Apply suggestions from code review

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

* Swig and cmake are build-only dependencies

* cmake as a run dependency after all

* py-amici: default boost and hdf5 variants to True

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-05-04 11:19:48 -05:00
Harmen Stoppels
a5300b5726 perl: fix jobserver job issue (#37428)
When building perl with posix jobserver, it seems to eat jobs, which
reduces parallelism to 1 in many cases, and is rather annoying. This is
solved in GNU Make 4.4 (fifo is more stable than file descriptors), but
that version is typically not available.

So, fix this issue by simply unsetting MAKEFLAGS for the duration of
./Configure. That's enough, and the build phase runs perfectly in
parallel again.
2023-05-04 17:50:00 +02:00
Massimiliano Culpo
86d3bad1e0 cmake build system: change default build type to Release (#36679)
This switches the default Make build type to `build_type=Release`.

This offers:
- higher optimization level, including loop vectorization on older GCC
- adds NDEBUG define, which disables assertions, which could cause speedups if assertions are in loops etc
- no `-g` means smaller install size

Downsides are:
- worse backtraces (though this does NOT strip symbols)
- perf reports may be useless
- no function arguments / local variables in debugger (could be of course)
- no file path / line numbers in debugger

The downsides can be mitigated by overriding to `build_type=RelWithDebInfo` in `packages.yaml`,
if needed.  The upside is that builds will be MUCH smaller (and faster) with this change.

---------

Co-authored-by: Gregory Becker <becker33@llnl.gov>
2023-05-04 11:33:35 -04:00
Massimiliano Culpo
600955edd4 Update vendored ruamel.yaml to v0.17.21 (#37008)
* Vendor ruamel.yaml v0.17.21

* Add unit test for whitespace regression

* Add an abstraction layer in Spack to wrap ruamel.yaml

All YAML operations are routed through spack.util.spack_yaml

The custom classes have been adapted to the new ruamel.yaml
class hierarchy.

Fixed line annotation issue in "spack config blame"
2023-05-04 08:00:38 -07:00
Massimiliano Culpo
95e61f2fdf Remove the old spec format in configuration (#37425)
The format was deprecated in v0.15
2023-05-04 07:59:11 -07:00
Mikael Simberg
e6d37b3b61 Add pika 0.15.0 (#37403) 2023-05-04 07:48:24 -04:00
Massimiliano Culpo
cf5daff6f5 Deprecate env: as top level environment key (#37424) 2023-05-04 07:08:29 -04:00
Annop Wongwathanarat
e5dcaebd43 acfl: add compiler-package mapping and fix version number (#36768) 2023-05-04 03:59:15 -05:00
Harmen Stoppels
84a70c26d9 buildcache metadata: store hash -> prefix mapping (#37404)
This ensures that:

a) no externals are added to the tarball metadata file
b) no externals are added to the prefix to prefix map on install, also
for old tarballs that did include externals
c) ensure that the prefix -> prefix map is always string to string, and
doesn't contain None in case for some reason a hash is missing
2023-05-04 10:09:22 +02:00
Mikael Simberg
3bfd948ec8 Add patches for generic context coroutine stack allocation in pika on macos (#37288) 2023-05-04 09:56:02 +02:00
Sam Reeve
58e527935c cabana: Add optional silo build (#37393) 2023-05-04 00:43:31 -04:00
Adam J. Stewart
c511fbb717 py-lightly: add v1.4.4 (#37406) 2023-05-03 15:41:05 -04:00
Bryce Torcello
541cdbbef2 docs: update RHEL/CentOS system prerequisites (#36720) 2023-05-03 19:04:16 +02:00
Alec Scott
eda806ab97 libjwt: add v1.15.2 (#37333) 2023-05-03 09:34:36 -07:00
Alec Scott
605aa45aab mii: add v1.1.2 (#37335) 2023-05-03 09:34:04 -07:00
Alec Scott
e8462f82ef texinfo: add v7.0.3 (#37348) 2023-05-03 09:33:28 -07:00
Manuela Kuhn
387ee494b0 py-mne: add 1.3.1 (#37399) 2023-05-03 10:17:17 -05:00
Manuela Kuhn
1f24fb1dd8 py-neurora: add 1.1.6.9 (#37398) 2023-05-03 10:13:58 -05:00
Manuela Kuhn
379aec5757 py-neurokit2: add 0.2.4 (#37396) 2023-05-03 10:13:12 -05:00
Manuela Kuhn
a091f7642d py-bidskit: add 2023.2.16 (#37395) 2023-05-03 10:12:16 -05:00
Manuela Kuhn
edc70942d7 py-nilearn: add 0.10.1 (#37394) 2023-05-03 10:11:14 -05:00
Alec Scott
a94d18ad08 perl-module-install: add v1.21 (#37341) 2023-05-03 08:26:50 -04:00
Egbert Eich
1491d8471d Add 'zypper' to the valid container.os_packages options (#36681)
Signed-off-by: Egbert Eich <eich@suse.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: e4t <e4t@users.noreply.github.com>
2023-05-03 13:05:14 +02:00
Massimiliano Culpo
03d1841385 Allow adding specs to an environment without the 'specs' attribute (#37378) 2023-05-03 13:01:16 +02:00
Harmen Stoppels
7c8590ee44 remove unused global in bindist tests (#37358)
* remove unused global in bindist tests
* remove unused function
2023-05-03 05:34:14 -04:00
Jack Morrison
71aa12f72c Intel MPI Benchmarks 'IMB-P2P' is available for versions newer than 2018. (#37360) 2023-05-03 05:29:14 -04:00
Scott Wittenburg
c7e60f441a buildcache push: improve printing (#36141) 2023-05-03 10:42:22 +02:00
Tim Haines
11aa2d721e intel-tbb: Add versions 2021.8.0 and 2021.9.0 (#37391) 2023-05-03 00:13:31 -04:00
Chris Green
c110bcc5af libintl, iconv, gettext: account for libc provider and externals (#35450)
* libiconv can be provided by libc, so update packages which depend on
  libiconv to require the iconv virtual instead
* Many packages need special consideration when locating iconv depending
  on whether it is provided by libc (no prefix provided) or the libiconv
  package (in that case we want to provide a prefix)
* It was also noticed that when an iconv external was provided, that
  there was interference with linking (this should generally be handled
  by Spack's compiler wrappers and bears further investigation)
* Like iconv, libintl can be provided by libc or another package, namely
  gettext. It is not converted to a provider like libiconv because it
  provides additional routines. The logic is similar to that of iconv
  but instead of checking the provider, we check whether the gettext
  installation includes libintl.
2023-05-02 18:18:30 -07:00
renjithravindrankannath
4edd364a8b Guard use of OpenMP in rocblas test (#36673)
* Provide openmp from rocm-open-extras for roblas test
* Addressing the  prechecks/audit/package-audits check
* Correcting style check errors.
* rocm-openmp-extras path veriable restricting for test
* Correcting the env variable to run_tests
* Guard use of OpenMP to make it optional in rocblas test
* Removing unused patch
2023-05-02 13:11:13 -07:00
Zack Galbreath
42ede698c2 trilinos: add version 14.0.0 (#37387) 2023-05-02 14:53:37 -04:00
Massimiliano Culpo
68a4b2e4e4 GitHub Actions: do not install six in CI (#37361)
* GitHub Actions: do not install six in CI
* Remove workflow code that was commented out
* Remove any use of "six" from packages
2023-05-02 13:28:24 -04:00
renjithravindrankannath
131e1c0937 hip: Patch to handle file reorg changes for the tests (#36993)
* Patch to handle file reorg changes for the tests
* Correcting patch file name
* Limiting hipify-clang path to 5.4 and later
* Set hipify-clang path env in CMake
2023-05-02 13:23:26 -04:00
Daniel Ahlin
b8136d7052 gromacs: add 2023.1 version (#37371) 2023-05-02 12:53:11 -04:00
Alec Scott
c4ac9246e2 muparser: add v2.3.4 (#37298) 2023-05-02 11:34:44 -04:00
Alec Scott
3dd3526de9 globalarrays: add v5.8.2 (#37325) 2023-05-02 10:43:13 -04:00
Alec Scott
5c4636c86d spot: add v2.11.5 (#37299) 2023-05-02 08:43:10 -04:00
Alec Scott
a6ee9369b6 osi: add v0.108.8 (#37340) 2023-05-02 08:33:14 -04:00
Richard Berger
b8f35c4aa7 ports-of-call: add version 1.5.1 (#37366) 2023-05-02 08:23:28 -04:00
Glenn Johnson
e5a48033bd proj: don't depend on googletest at build time (#37240)
* proj: v6 depends on googletest at build time

* Have cmake block check for run_tests
2023-05-02 08:23:13 -04:00
Alec Scott
49497dd254 uriparser: add v0.9.7 (#37350) 2023-05-02 08:15:49 -04:00
Alec Scott
d60b055f64 redis-plus-plus: add v1.3.8 (#37344) 2023-05-02 08:15:27 -04:00
Alec Scott
59e2ef6ad6 lua: add v5.4.5 (#37334) 2023-05-02 07:38:33 -04:00
Alec Scott
a7744b0dbc sqlitebrowser: add v3.12.2 (#37300) 2023-05-02 07:38:11 -04:00
Jonathon Anderson
78cfad7881 intel-tbb: backport GCC 13 support patch (#37291) 2023-05-02 06:25:06 -04:00
Tristan Carel
60d3ed86d9 steps: add version 4.1.1, remove others (#37250)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-05-02 05:37:05 -04:00
Luca Heltai
c16c5ad106 dealii: add support for 9.4.1 and 9.4.2 (#36627)
* Make sure the standard is cxx17 for 9.4:

* Fix patches for > 9.4
2023-05-02 10:49:53 +02:00
Mark W. Krentel
9c854bf78e libpfm4: add version 4.13.0 (#37364) 2023-05-02 04:39:11 -04:00
Harmen Stoppels
27bce8d489 gdb: add missing zstd, add system dep for zlib (#37369) 2023-05-02 04:34:13 -04:00
Massimiliano Culpo
a92f1e37aa Disable module file generation by default (#37258)
* Disable module generation by default (#35564)

a) It's used by site administrators, so it's niche
b) If it's used by site administrators, they likely need to modify the config anyhow, so the default config only serves as an example to get started
c) it's too arbitrary to enable tcl, but disable lmod

* Remove leftover from old module file schema

* Warn if module file config is detected and generation is disabled

---------

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-05-02 10:28:27 +02:00
Olivier Cessenat
99c3ecc139 visit: python 3.9 and above acceptable (#37071) 2023-05-02 10:18:44 +02:00
Alec Scott
0f6170875c gh: add v2.28.0 (#37302) 2023-05-02 10:12:27 +02:00
Weiqun Zhang
986809c4c5 amrex: add 23.05 (#37362) 2023-05-02 04:04:28 -04:00
Alec Scott
d9c128132a tree: add v2.1.0 (#37349) 2023-05-02 03:30:43 -04:00
Alec Scott
a0cac6c6bf gnupg: add v2.4.1 (#37326) 2023-05-02 09:21:42 +02:00
Alec Scott
470523cc35 libibumad: add v44.1 (#37332) 2023-05-01 22:49:15 -07:00
Alec Scott
c82d4fdc08 pharokka: add v1.3.2 (#37342) 2023-05-01 22:48:30 -07:00
Alec Scott
c03448c827 jsoncpp: add v1.9.5 (#37303) 2023-05-02 01:41:11 -04:00
Alec Scott
59cd0711ba nco: add v5.1.5 (#37338) 2023-05-02 00:44:00 -04:00
Alec Scott
8ef31b23a4 kubernetes: add v1.27.1 (#37331) 2023-05-02 00:43:38 -04:00
Alec Scott
1bae07e54e libyogrt: add v1.33 (#37305) 2023-05-02 00:14:56 -04:00
Alec Scott
c7a2766ded brynet: add v1.12.2 (#37309) 2023-05-02 00:05:01 -04:00
Alec Scott
2a95b1e282 oniguruma: add v6.9.8 (#37307) 2023-05-02 00:04:36 -04:00
Alec Scott
5eb217e878 nanomsg: add v1.2 (#37306) 2023-05-02 00:04:15 -04:00
Alec Scott
22486eeb4e faust: add v2.54.9 (#37310) 2023-05-02 00:03:59 -04:00
Alec Scott
e5665730b6 liblouis: add v3.25.0 (#37304) 2023-05-02 00:03:44 -04:00
Alec Scott
edccf0d819 mapserver: add v8.0.1 (#37312) 2023-05-01 23:58:33 -04:00
Alec Scott
815b2f542a libmmtf-cpp: add v1.1.0 (#37311) 2023-05-01 23:58:11 -04:00
Alec Scott
b50f6510d4 beakerlib: add v1.29.3 (#37316) 2023-05-01 23:47:18 -04:00
Alec Scott
226f331a21 kubectl: add v1.27.1 (#37330) 2023-05-01 23:41:39 -04:00
Alec Scott
bc0477f3e0 bedtools2: add v2.31.0 (#37301) 2023-05-01 23:28:01 -04:00
Alec Scott
cf924e397f wsmancli: add v2.6.2 (#37351) 2023-05-01 23:22:13 -04:00
eugeneswalker
bfe0bc1c6b new package: py-lcls-krtc (#37263)
* new package: py-lcls-krtc

* new package: py-pykerberos

* py-lcls-krtc: ^py-pykerberos for link
2023-05-01 23:21:54 -04:00
Alec Scott
1d2e30b8b2 heaptrack: add v1.3.0 (#37327) 2023-05-01 23:16:57 -04:00
Alec Scott
e11f635174 mixcr: add v4.3.2 (#37336) 2023-05-01 23:16:39 -04:00
Alec Scott
611c24c01c c-blosc: add v1.21.2 (#37317) 2023-05-01 23:16:24 -04:00
Alec Scott
2f49e20b12 nginx: add v1.24.0 (#37339) 2023-05-01 23:10:44 -04:00
Alec Scott
409bba7cf9 alembic: add v1.8.5 (#37315) 2023-05-01 23:05:33 -04:00
Alec Scott
378aa835f8 tippecanoe: add v1.36.0 (#37313) 2023-05-01 23:05:12 -04:00
Alec Scott
2500443f11 mpi-bash: add v1.3 (#37337) 2023-05-01 23:04:48 -04:00
Satish Balay
f5c32d57e0 petsc, py-petsc4py: add v3.19.1 (#37356) 2023-05-01 18:58:03 -04:00
Benjamin Meyers
ba6dadf760 Update py-editdistance@0.6.2 (#37365)
* Update py-editdistance@0.6.2

* [@spackbot] updating style on behalf of meyersbs
2023-05-01 18:33:37 -04:00
Alec Scott
83535ed503 console-bridge: add v1.0.2 (#37321) 2023-05-01 14:53:59 -07:00
Alec Scott
051d668ca4 dropwatch: add v1.5.4 (#37322) 2023-05-01 14:50:00 -07:00
Alec Scott
3029e943b1 flibcpp: add v1.0.2 (#37323) 2023-05-01 14:47:47 -07:00
Alec Scott
3d48bd88d3 helib: add v2.2.2 (#37328) 2023-05-01 14:42:12 -07:00
Alec Scott
fcf9068a04 hunspell: add v1.7.2 (#37329) 2023-05-01 14:40:40 -07:00
Alec Scott
724c34db5f procenv: add v0.60 (#37343) 2023-05-01 14:05:40 -07:00
Alec Scott
1b79725229 restic: add v0.15.2 (#37345) 2023-05-01 13:59:36 -07:00
Alec Scott
06e6c341e4 shapeit4: add v4.2.2 (#37347) 2023-05-01 13:56:26 -07:00
Adam J. Stewart
a2fc3dbfc5 py-sphinx: add v7.0.0 (#37352) 2023-05-01 12:17:50 -07:00
Alec Scott
fbda3e23ac scons: add v4.5.2 (#37346) 2023-05-01 11:12:09 -04:00
Massimiliano Culpo
3c3a4c7577 Factor YAML manifest manipulation out of the Environment class (#36927)
Change the signature of the Environment.__init__ method to have
a single argument, i.e. the directory where the environment manifest 
is located. Initializing that directory is now delegated to a function 
taking care of all the error handling upfront. Environment objects 
require a "spack.yaml" to be available to be constructed.

Add a class to manage the environment manifest file. The environment 
now delegates to an attribute of that class the responsibility of keeping
track of changes modifying the manifest. This allows simplifying the 
updates of the manifest file, and helps keeping in sync the spec lists in
memory with the spack.yaml on disk.
2023-05-01 15:06:10 +02:00
eugeneswalker
cfb34d19fe Revert "new package: roentdek (#37265)" (#37355)
This reverts commit fec20bb567.
2023-05-01 08:36:36 +02:00
snehring
8183210e59 Feature/topiary (#37157)
* generax: adding new package generax

* muscle5: adding new package muscle5

* py-custom-inherit: adding new package py-custom-inherit

* py-ete3: adding new package py-ete3

* py-itolapi: adding new package py-itolapi

* py-opentree: adding new package py-opentree

* py-pypng: adding new package py-pypng

* py-toyplot: adding new package py-toyplot

* py-toytree: adding new package py-toytree

* py-pastml: adding new package py-pastml

* raxml-ng: adding new version 1.1.0

* py-topiary: adding new package py-topiary

* generax: adding master branch version
generax: adding version 2.0.1
generax: add mpi variant

* py-topiary: add main

* generax: correcting commit for 2.0.1

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

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

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

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

* py-topiary-asr: rename package, requested changes.

* Update var/spack/repos/builtin/packages/py-topiary-asr/package.py

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-29 17:52:32 -04:00
Manuela Kuhn
896a81ba35 py-nipype: add 1.8.6 (#37279)
* py-nipype: add 1.8.6

* Exchange test dep with skip_modules
2023-04-29 15:56:15 -05:00
Greg Becker
21cadf96e0 Spec.format: fix bug in dependency hash formatting (#37073)
Co-authored-by: becker33 <becker33@users.noreply.github.com>
2023-04-28 23:33:05 +02:00
eugeneswalker
cceeb96e06 new package: py-amityping (#37262) 2023-04-28 13:51:52 -05:00
Alec Scott
7853ffc881 libmaxminddb: add v1.7.1 (#37185) 2023-04-28 11:08:21 -07:00
Victor Brunini
4363b1c2dc superlu-dist: do not discard cflags from Spack (#37260)
Make sure to append additional flags needed for specific compilers
in the flag_handler instead of adding them as separate cmake define
lines that override the main spack cflags.
2023-04-28 09:37:58 -04:00
Harmen Stoppels
c85877566f Reduce the number of stat calls in "spack verify" (#37251)
Spack comes to a crawl post-install of nvhpc, which is partly thanks to
this post install hook which has a lot of redundancy, and isn't correct.

1. There's no need to store "type" because that _is_ "mode".
2. There are more file types than "symlink", "dir", "file".
3. Don't checksum device type things
4. Don't run 3 stat calls (exists, stat, isdir/islink), but one lstat
   call
5. Don't read entire files into memory

I also don't know why `spack.crypto` wasn't used for checksumming, but I
guess it's too late for that now. Finally md5 would've been the faster
algorithm, which would've been fine given that a non cryptographicall
checksum was used anyways.
2023-04-28 13:24:24 +00:00
dale-mittleman
fc201a2b75 Fixing patch version constraint for llvm external ncurses patch (#37145) 2023-04-28 15:10:03 +02:00
Massimiliano Culpo
ddd191b1c0 libxml2: fix test method (#37242)
This was discovered using #34236
2023-04-28 13:45:16 +02:00
eugeneswalker
fec20bb567 new package: roentdek (#37265) 2023-04-28 04:35:56 -07:00
eugeneswalker
63869bba47 new package: py-pyabel (#37264) 2023-04-28 04:31:18 -07:00
eugeneswalker
eacf11e6cc new package: xtcdata (#37261) 2023-04-28 04:31:06 -07:00
snehring
7bd987aa5b sentieon-genomics: adding new version 20211207. (#37223) 2023-04-28 12:33:22 +02:00
Jonathon Anderson
cba8d1253d Add container images supporting RHEL alternatives (#36713)
Add container support for AlmaLinux, Fedora 37 and 38 and Rocky Linux
2023-04-28 12:28:33 +02:00
Andrew W Elble
c87cc5c7b1 kicad: new version 7.0.2 (#37228) 2023-04-28 12:25:28 +02:00
Richard Berger
4a7893bed6 slurm: add version 22-05-8-1 and 23-02-1-1 (#37238) 2023-04-28 12:24:10 +02:00
Adam J. Stewart
44196085f6 py-psycopg2: add v2.9.6 (#37235) 2023-04-28 11:50:27 +02:00
John Jolly
076660804d bricks: Fix package to properly find spack opencl-clhpp (#37239)
The bricks package uses header from the opencl-clhpp package when built with
the cuda variant activated. In order to find the header files, the bricks
CMakeLists.txt uses the `find_package(OpenCL 2.0)` statement. The CMake
FindOpenCL module searches several paths to find the header files. Eventually
it will search for header files in the local /usr/include directories. If
OpenCL headers are found, but CUDA is not installed locally, then the build
will fail.

One of the CMake variables searched for a path to the OpenCL headers is
OCL_ROOT. This fix utilizes the OCL_ROOT variable to identify the correct path
to the install opencl-clhpp package within Spack. Also, if the cuda variant is
not used, then the OpenCL build is disabled to prevent a build failure due to
improperly-identified locally-installed OpenCL header files.

The default behavior of the build process has not changed. An external variable
definitions must be made to activate these features. Specifically, to disable
the OpenCL build, this flag must be provided to CMake:

    -DBRICK_USE_OPENCL=OFF

The Spack build process explicitly uses this option unless the cuda variant is
specified. If the cuda variant is specified, then the BRICK_USE_OPENCL variable
is set to ON and the OCL_ROOT variable is set to the path of the opencl-clhpp
include directory.
2023-04-28 11:37:22 +02:00
Alec Scott
e57db5c528 apfel: add v3.0.6 (#37267) 2023-04-28 11:18:05 +02:00
Alec Scott
01cdc4f960 cmor: add v3.7.2 (#37268) 2023-04-28 11:17:44 +02:00
Alec Scott
93e88853c6 figtree: add v1.4.4 (#37269) 2023-04-28 11:17:31 +02:00
Alec Scott
561c192e30 fping: add v5.1 (#37270) 2023-04-28 11:17:16 +02:00
Alec Scott
65c625a44f gapbs: add v1.4 (#37271) 2023-04-28 11:16:55 +02:00
Alec Scott
08291cb63d glfw: add v3.3.8 (#37272) 2023-04-28 11:16:41 +02:00
Alec Scott
dcd0f8d252 jemalloc: add v5.3.0 (#37273) 2023-04-28 11:14:12 +02:00
Alec Scott
fa0367691e sandbox: add v2.25 (#37274) 2023-04-28 11:13:56 +02:00
Alec Scott
e3a76bf2a9 snap-berkeley: add v2.0.3 (#37275) 2023-04-28 11:13:39 +02:00
Alec Scott
e2f9cdfbdc tcpdump: add v4.99.4 (#37276) 2023-04-28 11:13:22 +02:00
Alec Scott
1eb4e30d28 wps: add v4.5 (#37277) 2023-04-28 11:12:28 +02:00
Sangu Mbekelu
2f529a7320 py-subword-nmt (#37161)
* "new py-subword-nmt package"

* [@spackbot] updating style on behalf of Sangu-Mbekelu

* Update package.py

updating package based on review

* [@spackbot] updating style on behalf of Sangu-Mbekelu

---------

Co-authored-by: Sangu Mbekelu <s.mbekelu9@gmail.com>
2023-04-28 00:22:45 -04:00
Manuela Kuhn
cb4234b971 py-virtualenv: add 20.22.0 (#37259)
* py-virtualenv: add 20.22.0

* [@spackbot] updating style on behalf of manuelakuhn

* Fix dependency versions for release 20.22.0

* Remove python version restrictions

* [@spackbot] updating style on behalf of manuelakuhn

* py-platformdirs: add 3.5.0

* py-filelock: add 3.12.0

* Fix dependency bound for py-platformdirs

* py-importlib-metadata: add 6.6.0
2023-04-27 22:28:18 -05:00
Adam J. Stewart
ee7cdb8a68 macOS: use Apple GL/GLU by default (#36618)
* macOS: use Apple GL/GLU by default

* Use CLT instead

* Use CLT instead

* Undo change to libuuid
2023-04-27 21:54:48 -05:00
eugeneswalker
7dc0bf5fcb legion: add versions up to 23.03.0 (#37257)
* legion: add versions up to 23.03.0

* add maintainer
2023-04-27 19:17:42 -04:00
Chris Green
d01b542df7 [py-breathe] New version 4.35.0 (#37233)
* [py-breathe] New version 4.35.0

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-27 13:57:31 -04:00
Thomas-Ulrich
c59eb8cdea fixes #29350 by enabling headers variant in binutils when compiling llvm with gold (#37245) 2023-04-27 09:53:45 -07:00
Manuela Kuhn
ed34c4a004 py-memory-profiler: add 0.61.0 (#37248) 2023-04-27 11:38:08 -05:00
Chris Green
7cbaf2ff56 [py-sphinx-design] New versions 0.4.0, 0.4.1 (#37234)
* [py-sphinx-design] New versions 0.4.0, 0.4.1

* conflicts() -> depends_on()

Per @adamjstewart

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-27 11:37:23 -05:00
Massimiliano Culpo
cd851e173d gcc: add v13.1.0 (#37230)
version 13.1 builds with apple-clang@14.0.3
2023-04-27 16:41:44 +02:00
Harmen Stoppels
8be2f017e7 gcc: no need to special case macos/linux wrt rpaths (#37243) 2023-04-27 15:52:28 +02:00
Michael Kuhn
f6464abfcb Fix pkgconfig dependencies (#37236)
Packages shouldn't typically depend on pkg-config or pkgconf but on the
virtual provider pkgconfig.
2023-04-27 10:04:22 +02:00
Alec Scott
ce81f15e6f r-covr: add v3.6.2 (#37194) 2023-04-27 02:22:29 -04:00
Wouter Deconinck
4d597bdecc py-gssapi: depends_on krb5 (#37227)
This dependency was somehow overlooked (but is pretty crucial) because it doesn't appear in the python requirements...
2023-04-26 22:35:15 -04:00
Manuela Kuhn
62ea6bed89 py-bidscoin: add 4.0.0 and py-pydeface as new deb package (#37231) 2023-04-26 20:58:57 -04:00
Manuela Kuhn
742fbd458d py-mypy: add 1.2.0 (#37224) 2023-04-26 20:54:11 -04:00
Manuela Kuhn
10b6651d35 py-flake8: add 6.0.0 and update dependencies (#37222) 2023-04-26 20:53:49 -04:00
Alec Scott
3f3fc804c6 r-afex: add v1.2-1 (#37188) 2023-04-26 19:36:53 -05:00
Alec Scott
c7d586d03a r-argparse: add v2.2.2 (#37189) 2023-04-26 19:36:11 -05:00
Alec Scott
b17feb9b06 r-bit: add v4.0.5 (#37190) 2023-04-26 19:35:30 -05:00
Alec Scott
2e4a9f1abf r-loo: add v2.6.0 (#37205)
* r-loo: add v2.6.0

* Split r dependency from other deps to align with common r package style
2023-04-26 19:34:19 -05:00
Alec Scott
117d374a61 r-bookdown: add v0.33 (#37191)
* r-bookdown: add v0.33

* Add r@3.5.0: dependency to package
2023-04-26 19:33:18 -05:00
Alec Scott
67cf37d750 r-compositions: add v2.0-6 (#37192)
* r-compositions: add v2.0-6

* Split r dependecies from other r packages to match common format
2023-04-26 19:32:15 -05:00
Alec Scott
6e276ecb4c r-convevol: add v2.0.0 (#37193) 2023-04-26 19:31:34 -05:00
Alec Scott
8c6a3f15e5 r-desolve: add v1.35 (#37195) 2023-04-26 19:29:14 -05:00
Alec Scott
65bbd2a1e6 r-fastmap: add v1.1.1 (#37196) 2023-04-26 19:27:49 -05:00
Alec Scott
426f8e987b r-formatr: add v1.14 (#37197) 2023-04-26 19:27:11 -05:00
Alec Scott
a78e061117 r-ggvis: add v0.4.8 (#37198) 2023-04-26 19:26:24 -05:00
Alec Scott
17e14757e2 r-glmnet: add v4.1-7 (#37199)
* r-glmnet: add v4.1-7

* Split r dependency from other deps to follow common format
2023-04-26 19:25:42 -05:00
Alec Scott
2bb3553f24 r-insight: add v0.19.1 (#37200) 2023-04-26 19:24:55 -05:00
Alec Scott
6267a1f68d r-interp: add v1.1-4 (#37201)
* r-interp: add v1.1-4

* split r dep from other dependencies to match common format
2023-04-26 19:24:08 -05:00
Alec Scott
666ceb998c r-jomo: add v2.7-6 (#37202) 2023-04-26 19:23:09 -05:00
Alec Scott
e4cc4018c1 r-lattice: add v0.21-8 (#37204)
* r-lattice: add v0.21-8

* Enforce a higher version of R as according to cran
2023-04-26 19:12:26 -05:00
Alec Scott
5551b7a506 r-magic: add v1.6-1 (#37206) 2023-04-26 19:06:27 -05:00
Alec Scott
facc93a30e r-maptools: add v1.1-6 (#37207) 2023-04-26 19:05:29 -05:00
Alec Scott
b3101d1c85 r-meta: add v6.2-1 (#37208) 2023-04-26 19:04:07 -05:00
H. Joe Lee
0d7890baa5 spdk: add a new package (#35520)
* spdk: add a new package
* chore: fix formatting and style
* fix: add rdma-core dependency
* fix: remove spdk < 23.01 versions per @soumagne review
* spdk: add 22.01.1 version
* spdk: address @soumagne reviews
* spdk: fix fio audit failure
* spdk: fix fio version and remove debugging info
2023-04-26 16:38:14 -07:00
Wouter Deconinck
d43ae9fa10 scitokens-cpp: depends_on pkgconfig (#37168)
A missing dependency, showing up as:
```console
#24 1113.1 3 errors found in build log:
#24 1113.1      20    -- Check for working CXX compiler: /opt/spack/lib/spack/env/gcc/g++ 
#24 1113.1            - skipped
#24 1113.1      21    -- Detecting CXX compile features
#24 1113.1      22    -- Detecting CXX compile features - done
#24 1113.1      23    -- Found CURL: /opt/software/linux-debian-x86_64_v3/gcc-12.2.0/curl-
#24 1113.1            7.85.0-ca5zznsdkp2hwbnikha6sgqzcpuw74sc/lib/libcurl.so (found versio
#24 1113.1            n "7.85.0")
#24 1113.1      24    -- Found UUID : /opt/software/linux-debian-x86_64_v3/gcc-12.2.0/util
#24 1113.1            -linux-uuid-2.38.1-45xrjgjjauvev5qarwji7xgmlnhqlzkh/lib/libuuid.so
#24 1113.1      25    -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
#24 1113.1   >> 26    CMake Error at /opt/software/linux-debian-x86_64_v3/gcc-12.2.0/cmake
#24 1113.1            -3.24.3-6doi3daa6ihw6mk4zbk5oiiuiaahsny7/share/cmake-3.24/Modules/Fi
#24 1113.1            ndPkgConfig.cmake:663 (message):
#24 1113.1      27      pkg-config tool not found
#24 1113.1      28    Call Stack (most recent call first):
#24 1113.1      29      /opt/software/linux-debian-x86_64_v3/gcc-12.2.0/cmake-3.24.3-6doi3
#24 1113.1            daa6ihw6mk4zbk5oiiuiaahsny7/share/cmake-3.24/Modules/FindPkgConfig.c
#24 1113.1            make:829 (_pkg_check_modules_internal)
#24 1113.1      30      CMakeLists.txt:39 (pkg_check_modules)
#24 1113.1      31    
#24 1113.1      32    
```

Ref: https://github.com/scitokens/scitokens-cpp/blob/v1.0.0/CMakeLists.txt#L32
2023-04-27 00:02:55 +02:00
Trevor [LAS]
055e5abc93 py-ipyrad (#37160)
* Adding py-ipyrad for testing

* py-ipyrad: placating flake8

* py-ipyrad: adding version 0.9.90, fixing hard coded path.

* py-ipyrad: use join_path instead of hard coded linux path

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

* py-ipyrad: Removing unneeded dependencies

* py-ipyrad: Readded future (see ipyrad setup.py)

* py-ipyrad: Switch to an anchored link in the docs

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

* py-ipyrad: Removed patch decorator

---------

Co-authored-by: snehring <snehring@iastate.edu>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-26 17:04:57 -04:00
Michael Kuhn
16f86c7f96 rocksdb: add 8.1.1 (#37169) 2023-04-26 10:07:42 -07:00
Michael Kuhn
0292568f97 libbson, mongo-c-driver: add 1.23.3 (#37175) 2023-04-26 10:05:45 -07:00
Gerhard Theurich
61c24dc7c3 esmf: add v8.4.2 (#37183) 2023-04-26 10:03:13 -07:00
Alec Scott
cbb8900e6e genrich: add v0.6.1 (#37184) 2023-04-26 10:01:59 -07:00
Alec Scott
6084b9be5b openwsman: add v2.7.2 (#37186) 2023-04-26 09:59:21 -07:00
Alec Scott
e4eba24191 shortstack: add v4.0.1 (#37187) 2023-04-26 09:58:27 -07:00
Alec Scott
aa0b013efe abyss: add v2.3.5 (#37209) 2023-04-26 09:28:48 -07:00
Alec Scott
9d49664679 advancecomp: add v2.5 (#37210) 2023-04-26 09:26:04 -07:00
Alec Scott
8c4bd595f3 barrnap: add v0.9 (#37212) 2023-04-26 09:19:27 -07:00
Alec Scott
8669844084 check: add v0.15.2 (#37216) 2023-04-26 09:18:49 -07:00
Alec Scott
2477fe2ff7 bowtie: add v1.3.1 (#37213) 2023-04-26 09:18:04 -07:00
Alec Scott
3f7ea01e9d faiss: add v1.7.4 (#37217) 2023-04-26 09:15:52 -07:00
Alec Scott
c334a16a2f nanoflann: add v1.4.3 (#37218) 2023-04-26 09:13:52 -07:00
Alec Scott
4fec857504 pestpp: add v5.2.3 (#37219) 2023-04-26 09:12:52 -07:00
Alec Scott
f859da6119 rinetd: add v0.73 (#37220) 2023-04-26 09:11:37 -07:00
Alec Scott
1c19eccf29 specfem3d-globe: add v8.0.0 (#37221) 2023-04-26 09:10:22 -07:00
Adam J. Stewart
1b7bf9a95b py-lightly: add v1.4.3 (#37178) 2023-04-26 17:47:40 +02:00
Adam J. Stewart
8e7b2c999a py-sphinx: add v6.2.1 (#37177) 2023-04-26 17:46:55 +02:00
Manuela Kuhn
dec0c540e9 py-wesanderson: add new package (#37182) 2023-04-26 10:29:20 -05:00
Adam J. Stewart
d74b02f59a py-tensorflow: add v2.11–2.12 (#36263) 2023-04-26 08:03:47 -05:00
Richard Berger
37335f8fcf flecsi: add 2.2.0 release, cleanup (#37158)
* flecsi: add 2.2.0 release, cleanup

* flecsi: deprecate 1.x versions

* flecsi: add missing 1.4.1 release

* flecsi: add missing 2.0.0 release
2023-04-26 05:52:15 -07:00
Thomas Madlener
eb4552542d elfutils package: fix +debuginfod installation issue (#36758)
* elfutils cannot build against libarchive@3.62+iconv 
* elfutils needs libmicrohttpd version 0.9.50 or older
* elfutils: explicitly depend on pkg-config
* libmicrohttpd: Add several new versions
2023-04-25 22:57:19 -07:00
Benjamin Meyers
b5f546b72b New: py-ax-platform; Update: py-botorch, py-gpytorch, py-linear-operator, py-pyro-ppl, py-typeguard (#37143) 2023-04-25 21:53:12 -04:00
Alec Scott
b2fb851d18 gmp: Add patch for MacOS M1/M2 machines to fix segfault (#37166)
* Add patch for MacOS M1/M2 machines to fix segfault when using gmp

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

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

* Restrict patch to v6.2.1

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-25 20:43:15 -04:00
Simon Frasch
f4b0510156 spla: version 1.5.5 (#37173) 2023-04-25 20:03:59 -04:00
Austin McCartney
a371e1e645 Narrow patch diff context for zziplib package (#29236)
The patch for the zziplib package applied for version 0.13.69 and
earlier includes a reference to Creative Commons
Attribution-NonCommercial-ShareAlike 2.0 Generic license, which
causes Flexera's ~expensive perl script~ FlexNet Code Insights open
source license and compliance tool to flag Spack as a non-commercial
product. This patch narrows the diff context in the patch to exclude
this text. The semantics of the patch file are unchanged.
2023-04-25 19:58:18 -04:00
Cyrus Harrison
80881f9119 add ascent 0.9.1 release (#37139)
* add ascent 0.9.1 release
* fix typo
2023-04-25 12:54:24 -07:00
Adam J. Stewart
c82594de21 py-scipy: PyPI-based Python version support (#37137) 2023-04-25 12:42:24 -07:00
Adam J. Stewart
eb15d49d61 py-numpy: PyPI-based Python version support, add v1.24.3 (#37136)
* py-numpy: add v1.24.3
* PyPI-based Python version support
* Sort in reverse order
2023-04-25 10:55:10 -07:00
Harmen Stoppels
97beb2658b require: do not allow additional properties (#37174) 2023-04-25 11:52:51 +02:00
eugeneswalker
75bf6d665c e4s ci: add xyce (#36841)
* e4s ci: add xyce

* relax trilinos contraints for xyce

* also relax trilinos constraint for e4s-power stack

* allow trilinos~shylu for xyce
2023-04-24 16:32:01 -07:00
eugeneswalker
c76023d7ac e4s ci: add mgard (#36584) 2023-04-24 23:35:40 +02:00
Alec Scott
6edfc07092 megadock: add v4.1.1 (#37154) 2023-04-24 14:04:31 -05:00
Alec Scott
a6b2a713d7 sdl2-image: add v2.6.3 (#37155) 2023-04-24 12:02:54 -07:00
Carlos Bederián
416b570825 gromacs: rework plumed support (#37013) 2023-04-24 20:59:45 +02:00
Alec Scott
28ad553856 libgit2: add v1.6.4 (#37153) 2023-04-24 11:56:27 -07:00
Alec Scott
a17f5efa75 libcyaml: add v1.4.0 (#37152) 2023-04-24 10:58:14 -07:00
Alec Scott
c8b21f43eb imath: add v3.1.7 (#37151) 2023-04-24 10:51:57 -07:00
Alec Scott
b1be17144b glab: add v1.28.1 (#37150) 2023-04-24 13:37:52 -04:00
Juan Miguel Carceller
977ec0bd91 Extend patch to 1.82.0 (#37138)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2023-04-24 09:33:13 -07:00
Adam J. Stewart
4d58eaaf15 py-sphinx: add v6.2.0 (#37140) 2023-04-24 09:28:17 -07:00
Seth R. Johnson
3092bd2559 silo: loosen hdf5 version requirements (#37146)
We have successfully been building silo@4.10.2 against hdf5@1.10.4 from
some time. Refinement of #34275 (which was concerned with 4.11 but
unnecessarily restricted 4.10).
2023-04-24 09:23:16 -07:00
Adam J. Stewart
48347bbd7c py-pandas: add v2.0.1 (#37148) 2023-04-24 09:20:44 -07:00
Adam J. Stewart
07dbbff728 py-lightning: add v2.0.2 (#37149) 2023-04-24 09:19:49 -07:00
Adam J. Stewart
b5d66e0144 MXNet: add v1.9 (#36590) 2023-04-24 11:13:09 -05:00
eugeneswalker
81d3df3289 gptune: add new v4.0.0; relax py-numpy requirement to align with requirements.txt (#37141) 2023-04-24 08:48:46 -07:00
Anton Kozhevnikov
d8169ba440 do not use device_alloc (#37147) 2023-04-24 17:34:35 +02:00
Adam J. Stewart
7df2865dce Copy more logs to CI artifacts (#36783)
* Copy more logs to CI artifacts

* Trigger rebuilds again

* Remove test variant
2023-04-24 10:08:30 -05:00
Alec Scott
e69d693727 graphviz: add v8.0.1 (#36724) 2023-04-24 10:40:39 +02:00
Alec Scott
af9c466d86 libdap4: add v3.20.6 (#37112) 2023-04-24 10:40:12 +02:00
Alec Scott
43089a3931 libconfig: add v1.7.3 (#37111) 2023-04-24 10:39:56 +02:00
Alec Scott
1638821831 libcap-ng: add v0.8.3 (#37110) 2023-04-24 10:39:44 +02:00
Alec Scott
97c03b4c31 hohqmesh: add v1.3.0 (#37108) 2023-04-24 10:39:31 +02:00
Alec Scott
405ab9551f highway: add v1.0.4 (#37107) 2023-04-24 10:39:10 +02:00
Alec Scott
edd44032fd grep: add v3.10 (#37106) 2023-04-24 10:38:53 +02:00
Alec Scott
fad766e8d0 gpgme: add v1.20.0 (#37105) 2023-04-24 10:38:00 +02:00
Alec Scott
932195a913 fio: add v3.34 (#37104) 2023-04-24 10:37:49 +02:00
Alec Scott
a09fcca192 fdupes: add v2.2.1 (#37103) 2023-04-24 10:37:37 +02:00
Alec Scott
df9bd3c439 cpp-argparse: add v2.9 (#37102) 2023-04-24 10:37:25 +02:00
Alec Scott
f5b1d1f494 codec2: add v1.0.5 (#37101) 2023-04-24 10:37:13 +02:00
Alec Scott
43a069a60f bracken: add v2.8 (#37099) 2023-04-24 10:36:33 +02:00
Alec Scott
f3ad153dcd beast2: add v2.6.7 (#37098) 2023-04-24 10:36:21 +02:00
Alec Scott
794ab80086 args: add v6.4.6 (#37097) 2023-04-24 10:36:06 +02:00
Alec Scott
8fc8e8019a apktool: add v2.7.0 (#37096) 2023-04-24 10:35:52 +02:00
Alec Scott
6880bfd412 lis: add v2.1.1 (#37113) 2023-04-24 10:34:58 +02:00
Alec Scott
90e31c39cc maeparser: add v1.3.1 (#37114) 2023-04-24 10:34:44 +02:00
Alec Scott
6d1969e4d7 mrcpp: add v1.4.2 (#37115) 2023-04-24 10:34:30 +02:00
Alec Scott
90b4753f72 msmc2: add v2.1.4 (#37116) 2023-04-24 10:34:16 +02:00
Alec Scott
9285f591cc opam: add v2.1.3 (#37117) 2023-04-24 10:34:02 +02:00
Alec Scott
cf2ca0c9f3 openal-soft: add v1.23.1 (#37118) 2023-04-24 10:33:48 +02:00
Alec Scott
dffa5c56c8 poke: add v3.1 (#37120) 2023-04-24 10:33:35 +02:00
Alec Scott
302855ea86 pugixml: add v1.13 (#37121) 2023-04-24 10:33:20 +02:00
Alec Scott
a747a6e1f1 rabbitmq-c: add v0.13.0 (#37122) 2023-04-24 10:32:42 +02:00
Alec Scott
9e45571ebc rsem: add v1.3.3 (#37123) 2023-04-24 10:32:22 +02:00
Alec Scott
dae888b981 sina: add v1.13.0 (#37124) 2023-04-24 10:32:09 +02:00
Alec Scott
d98e129931 speexdsp: add v1.2.1 (#37125) 2023-04-24 10:31:53 +02:00
Alec Scott
a6b9f88b6c string-view-lite: add v1.7.0 (#37126) 2023-04-24 10:31:39 +02:00
Alec Scott
6412b7ac5d transposome: add v0.12.1 (#37127) 2023-04-24 10:31:10 +02:00
Alec Scott
410f00e36d tree-sitter: add v0.20.8 (#37128) 2023-04-24 10:30:36 +02:00
Alec Scott
240d40e159 units: add v2.22 (#37129) 2023-04-24 10:30:22 +02:00
Alec Scott
b34a354efe vc: add v1.4.3 (#37130) 2023-04-24 10:30:02 +02:00
Alec Scott
2b3939a65e vtk: add v9.2.6 (#37131) 2023-04-24 10:29:45 +02:00
Alec Scott
2be4200455 zstr: add v1.0.7 (#37132) 2023-04-24 10:29:21 +02:00
Wouter Deconinck
a3354a547f py-numpy: set openblas symbol_suffix in site.cfg (#37134)
* py-numpy: set openblas `symbol_suffix` in site.cfg

This writes the correct `symbol_suffix` variant value from the `openblas` in the spec into the `site.cfg`. Fixes #37133.

* py-numpy: fix style

* py-numpy: handle symbol_suffix == "none"
2023-04-23 09:27:26 -04:00
Andrew W Elble
8143c086a0 qgis: unpin qca, update qca (#37049)
allows compilation with gcc 11
2023-04-22 17:41:39 -05:00
Wouter Deconinck
806f630c8f (py-)codecov: not on pypi anymore, replace by static binary (#36809)
* py-codecov: deprecate since not on pypi anymore

* codecov: new package

* [@spackbot] updating style on behalf of wdconinc

* codecov: use github URL instead, multi-platform

* fix: install to prefix.bin.codecov

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

* codecov: use versions lookup dict

* codecov: versions -> _versions, fix style

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-22 11:01:15 -05:00
Alec Scott
9d2aab415d bubblewrap: add v0.8.0 (#37100) 2023-04-22 15:40:01 +02:00
Erik Schnetter
a5d1c645a0 hwloc: New version 2.9.1 (#37084) 2023-04-22 04:22:37 -04:00
Erik Schnetter
d443a44854 openblas: New version 0.3.23 (#36986)
Silence make

Set a fixed and large NUM_THREADS by default, to avoid that it gets initialized with the host # CPUs.

Set OMP_NUM_THREADS/OPENBLAS_NUM_THREADS in terms of make_jobs so that tests don't need excessive CPU.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-04-22 09:02:28 +02:00
Wouter Deconinck
6808df5729 opencascade: new version 7.7.1 (#37057)
No build system or dependency changes necessary.

New maintenance release announcement at https://www.opencascade.com/open-cascade-technology-7-7-1-maintenance-release/.

Full diff from 7.7.0 to 7.7.1 at https://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff;h=ffce0d66bbaafe3a95984d0e61804c201b9995d2;hp=185d29b92f6764ffa9fc195b7dbe7bba3c4ac855
2023-04-21 22:11:18 -07:00
Adam J. Stewart
6e4e7ab8b1 GDAL: add v3.6.4 (#37087) 2023-04-21 15:18:03 -07:00
John W. Parent
d8451b0c3f Windows: shell variables are case-insensitive (#36813)
If we modify both Path and PATH, on Windows they will clobber one
another. This PR updates the shell modification logic to automatically
convert variable names to upper-case on Windows.
2023-04-21 11:38:58 -07:00
Alec Scott
255c9ed5e9 librdkafka: add v2.1.0 (#36853) 2023-04-21 10:52:01 -07:00
Keita Iwabuchi
bd8e27503e Metall: add v0.24 and v0.25 (#36981)
* Metall package: add v0.22, v0.23, and v0.23.1
* Metall package: add v0.24 and v0.25
* Metall package: increase required Boost version
2023-04-21 10:50:01 -07:00
Bryce Torcello
459c5cfad6 r: fix building :3.6.1 with gcc 10: (#37080) 2023-04-21 11:43:09 -05:00
Robert Underwood
ff689be250 py-cupy allow customizing architecture and threads (#37072)
* py-cupy allow customizing architecture and threads

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

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>

* add missing self

---------

Co-authored-by: Robert Underwood <runderwood@anl.gov>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-04-21 09:52:47 -05:00
eflumerf
aaac8b0545 xmlrpc-c: Add variant to enable curl client (#37075)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-04-21 16:50:10 +02:00
Tim Haines
066e1e083d Dyninst: add conflict for intel-parallel-studio (#37036) 2023-04-21 16:49:23 +02:00
John W. Parent
5c742d4f2b Hraden Spack's powershell interface (#37079)
Paths with spaces are an issue on Windows and our current powershell
scripts are not sufficiently hardended against their use.
This PR removes promlematic commandlets that do not work well with paths
with spaces and adds escape quotes in other areas where this could be an
issue.
2023-04-21 08:58:37 -05:00
markus-ferrell
c64ca97877 Enable verify tests on windows (#36975) 2023-04-21 14:32:33 +02:00
markus-ferrell
cd4dddbef1 Enable versions cmd tests on windows (#36974) 2023-04-21 14:31:14 +02:00
markus-ferrell
e77b1da772 Enable test suite tests on windows (#36966) 2023-04-21 14:18:06 +02:00
markus-ferrell
e1e8d3b66e Enable database tests for windows (#36968) 2023-04-21 14:15:29 +02:00
markus-ferrell
962df6334d Enable config values tests on windows (#36969) 2023-04-21 14:15:09 +02:00
markus-ferrell
ba255cf5ec Enable graph tests on windows (#36967) 2023-04-21 14:14:51 +02:00
Annop Wongwathanarat
2ca049e74a armpl-gcc: fix PKG_CONFIG_PATH for 23.04 (#37001) 2023-04-21 14:10:03 +02:00
snehring
cd2893640d interproscan: add version 5.61-93.0, fix build issue (#37009) 2023-04-21 14:05:23 +02:00
Glenn Johnson
b686974160 augustus: add version 3.5.0 (#37037)
Adjust dependencies and constraints.
2023-04-21 12:01:00 +02:00
Eric Brugger
3303dcbfbd VisIt: add v3.3.3. (#37034) 2023-04-21 11:59:20 +02:00
Glenn Johnson
950079845c zziplib: support multiple build systems (#37058)
This PR rewrites the zziplib recipe to use Spack's multiple build system
support.
2023-04-21 11:58:00 +02:00
Brian Vanderwende
57b56499b2 Add flag handler for mpi-serial (#37060) 2023-04-21 11:55:30 +02:00
Glenn Johnson
00715a66a1 arpack-ng: add version 3.9.0 (#37032) 2023-04-21 11:43:33 +02:00
dependabot[bot]
581bd6bb9a build(deps): bump codecov/codecov-action from 3.1.2 to 3.1.3 (#37077)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](40a12dcee2...894ff025c7)

---
updated-dependencies:
- dependency-name: codecov/codecov-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>
2023-04-21 11:41:06 +02:00
dependabot[bot]
056eb659bb build(deps): bump actions/setup-python from 4.5.0 to 4.6.0 (#37078)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](d27e3f3d7c...57ded4d7d5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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>
2023-04-21 11:40:37 +02:00
Thomas Madlener
6476b2d79c edm4hep: add v0.8 (#37006) 2023-04-21 11:31:42 +02:00
Ashwin Kumar Karnad
a2078d709b octopus: add v12.2 (#35487) 2023-04-21 11:30:30 +02:00
Ashwin Kumar Karnad
c8ad4807c2 octopus: fix download links (#37081) 2023-04-21 05:22:34 -04:00
Harmen Stoppels
7cf53a647e readline: fix for nvhpc (#37024) 2023-04-21 11:02:55 +02:00
Massimiliano Culpo
cac44b9e15 Update archspec to latest release (#37070)
Fix -mcpu flags for gcc on neoverse-v1

Add support for NVHPC flags
2023-04-21 11:01:37 +02:00
Wouter Deconinck
354d59500b glib: new versions 2.76.1, 2.74.7 (#36361)
* glib: new version 2.76.1

This adds a new stable version of glib, 2.76.1 (skipping the 2.75 unstable series).

`mkenums.py` check now is specified as a dict, after r62dca6c1cf. The `filter_file` should disable both old and new. Better (maybe, but more complicated) would be to add the `can_fail` flag for this test.

The `iconv` argument was already deprecated and has now been removed. It is now resolved through meson itself, e71ecc8771.

Builds successfully on my system (and several dependents on top of it):
```console
==> glib: Successfully installed glib-2.76.1-7iy4mee2evabd357gviozbtyh5yxi27t
```
as does the previous 2.74.6 version

* glib: patch for 2.76.1, new version 2.74.7
2023-04-21 10:25:55 +02:00
Paul R. C. Kent
a639b22c7c add-llvm-1601-1602 (#37026) 2023-04-20 19:56:52 -07:00
Wouter Deconinck
4f13e2fa15 py-ocnn: new package (octree-based sparse CNN) (#37030)
O-CNN is an octree-based sparse convolutional neural network framework for 3D deep learning. It is built on py-torch.
2023-04-20 21:43:47 -05:00
Bernhard Kaindl
e3109a96d4 bcache: Simplify check if -lintl shall be added to LDFLAGS (#36569)
Replace my initial libintl check with the much nicer check for
"intl" in self.spec["gettext"].libs.names. Thanks to Chris Green!

Co-authored-by: Bernhard Kaindl <bkaindl@gmail.com>
2023-04-20 18:56:49 -07:00
Pariksheet Nanda
0b606b01dc uqtk: bump (#36670)
1. support version 3.1.3, which now depends on sundials@6

2. support version 3.1.2:, which broke the two patch files and
   therefore the two patch files have been replaced by more flexible
   filter_file() commands inside a patch() function.

3. rename the variant for python extension from using the package name
   "+pyuqtk" to the more standard "+python"

4. add maintainers @omsai and the upstream developer @bjdebus who
   offered to help with the spack packaging.

5. swig should only be a build-time dependency.  swig is only
   necessary until @:3.1.0

6. confirmed python dependencies are correct by inspecting imports,
   subset python dependencies type to build, run, and confirmed all
   31 build-time tests pass including the 9 python tests:

```console
$ spack env create uqtk-dev
$ spack add uqtk@3.1.3
$ spack install --test root && cat $(spack location -i uqtk)/.spack/install-time-test-log.txt
==> Testing package uqtk-3.1.3-nok6fut
==> [2023-04-19-14:56:25.005361] Running build-time tests
==> [2023-04-19-14:56:25.005536] RUN-TESTS: build-time tests [check]
==> [2023-04-19-14:56:25.009543] '/home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/gmake-4.4.1-b6g4apmfvxz3bn4eabh37dehcrg65fj7/bin/make' '-j4' '-n' 'test'
==> [2023-04-19-14:56:25.014903] '/home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/gmake-4.4.1-b6g4apmfvxz3bn4eabh37dehcrg65fj7/bin/make' '-j4' 'test'
Running tests...
/home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/cmake-3.26.3-zjmsfz23j5l4ytniz26uzvxonlu5qebr/bin/ctest --force-new-ctest-process
Test project /tmp/omsai/spack-stage/spack-stage-uqtk-3.1.3-nok6fut47h42cnaau7wkoohgqy5f2qqa/spack-build-nok6fut
      Start  1: ArrayReadAndWrite
      Start  2: ArrayDelColumn
      Start  3: Array1DMiscTest
      Start  4: Array2DMiscTest
 1/31 Test  #1: ArrayReadAndWrite ................   Passed    0.01 sec
      Start  5: ArraySortTest
 2/31 Test  #2: ArrayDelColumn ...................   Passed    0.01 sec
      Start  6: MultiIndexTest
 3/31 Test  #3: Array1DMiscTest ..................   Passed    0.01 sec
      Start  7: CorrTest
 4/31 Test  #4: Array2DMiscTest ..................   Passed    0.01 sec
      Start  8: QuadLUTest
 5/31 Test  #5: ArraySortTest ....................   Passed    0.02 sec
      Start  9: MCMC2dTest
 6/31 Test  #6: MultiIndexTest ...................   Passed    0.01 sec
      Start 10: MCMCRandomTest
 7/31 Test  #8: QuadLUTest .......................   Passed    0.02 sec
      Start 11: MCMCNestedTest
 8/31 Test #10: MCMCRandomTest ...................   Passed    0.02 sec
      Start 12: Deriv1dTest
 9/31 Test #12: Deriv1dTest ......................   Passed    0.01 sec
      Start 13: SecondDeriv1dTest
10/31 Test #13: SecondDeriv1dTest ................   Passed    0.01 sec
      Start 14: GradHessianTest
11/31 Test #11: MCMCNestedTest ...................   Passed    0.03 sec
      Start 15: GradientPCETest
12/31 Test #14: GradHessianTest ..................   Passed    0.01 sec
      Start 16: PCE1dTest
13/31 Test #15: GradientPCETest ..................   Passed    0.01 sec
      Start 17: PCEImplTest
14/31 Test #16: PCE1dTest ........................   Passed    0.01 sec
      Start 18: PCELogTest
15/31 Test #18: PCELogTest .......................   Passed    0.01 sec
      Start 19: Hessian2dTest
16/31 Test #19: Hessian2dTest ....................   Passed    0.01 sec
      Start 20: BCS1dTest
17/31 Test #20: BCS1dTest ........................   Passed    0.01 sec
      Start 21: BCS2dTest
18/31 Test #21: BCS2dTest ........................   Passed    0.01 sec
      Start 22: LowRankRegrTest
19/31 Test #22: LowRankRegrTest ..................   Passed    0.01 sec
      Start 23: PyModTest
20/31 Test #17: PCEImplTest ......................   Passed    0.07 sec
      Start 24: PyArrayTest
21/31 Test #23: PyModTest ........................   Passed    0.08 sec
      Start 25: PyArrayTest2
22/31 Test #25: PyArrayTest2 .....................   Passed    0.30 sec
      Start 26: PyQuadTest
23/31 Test #24: PyArrayTest ......................   Passed    1.44 sec
      Start 27: PyBCSTest1D
24/31 Test #26: PyQuadTest .......................   Passed    1.68 sec
      Start 28: PyBCSTest2D
25/31 Test #27: PyBCSTest1D ......................   Passed    1.66 sec
      Start 29: PyBADPTest
26/31 Test  #7: CorrTest .........................   Passed    3.43 sec
      Start 30: PyRegressionTest
27/31 Test #28: PyBCSTest2D ......................   Passed    1.50 sec
      Start 31: PyGalerkinTest
28/31 Test  #9: MCMC2dTest .......................   Passed    3.90 sec
29/31 Test #29: PyBADPTest .......................   Passed    1.66 sec
30/31 Test #30: PyRegressionTest .................   Passed    1.72 sec
31/31 Test #31: PyGalerkinTest ...................   Passed    1.63 sec

100% tests passed, 0 tests failed out of 31

Total Test time (real) =   5.35 sec
==> [2023-04-19-14:56:30.382797] '/home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/gmake-4.4.1-b6g4apmfvxz3bn4eabh37dehcrg65fj7/bin/make' '-j4' '-n' 'check'
==> [2023-04-19-14:56:30.385983] Target 'check' not found in Makefile
```
2023-04-20 18:53:39 -07:00
afzpatel
134b954c7f enabling test for rccl hsakmt-roct and rocm-opencl (#35465)
* initial commit for enabling test for rccl hsakmt-roct and rocm-opencl
* fix styling and cleaning code
* adding missing imports and minor fixes
* minor style fix
* moidfying hsakmt-roct test to run right after installation
2023-04-20 18:39:49 -07:00
Daniel Ahlin
bf970ebf9d nccl-fastsocket: initial packaging for nccl-fastsocket (#36557)
* nccl-fastsocket: Add NCCL transport plugin for GCP
* nccl-fastsocket: remove auto-gen. header and fix maintainers
* Update var/spack/repos/builtin/packages/nccl-fastsocket/package.py
* nccl-fastsocket: Add rationale for setting LD_LIBRARY_PATH

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-04-20 21:38:40 -04:00
MatthewLieber
af47b9170c osu-micro-benchmarks: adding sha for 7.1 release (#36702)
* adding sha for 7.1 release
* add a new version

---------

Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2023-04-20 18:33:58 -07:00
Ashwin Kumar Karnad
bf04551bf5 Fix bigdft-suite compilation (#36612)
(from d20f284100)
2023-04-20 18:18:11 -07:00
Wouter Deconinck
a419ffcf50 osg-ca-certs: igtf link should point to version, not 'current' (#35977)
* osg-ca-certs: igtf link should point to version, not 'current'
* osg-ca-certs: new version 1.110.igtf.1.119
* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2023-04-20 18:09:27 -07:00
Cory Bloor
de7c82f13f hiprand: split into new package (#36798) 2023-04-20 17:48:54 -07:00
Adam J. Stewart
37fb2c8dce py-kornia: add v0.6.12 (#37074) 2023-04-20 20:48:35 -04:00
Alec Scott
329fa0f067 libxaw3d: add v1.6.4 (#36854) 2023-04-20 17:35:32 -07:00
snehring
9d97ed1190 bamutil: fix filter_file invocation (#36978) 2023-04-20 17:25:51 -07:00
snehring
794fc47722 gmap-gsnap: adding new version 2023-03-24 (#36983) 2023-04-20 17:12:30 -07:00
Erik Schnetter
5842e17085 netlib-lapack: New version 3.11.0 (#36984) 2023-04-20 17:10:47 -07:00
Annop Wongwathanarat
5ef7e90462 lammps: add linking with acfl for FFT (#37000) 2023-04-20 16:48:24 -07:00
Adam J. Stewart
05215e016b ML CI: fix mirror name (#37007) 2023-04-20 16:45:15 -07:00
Pieter Ghysels
1ddde85221 Upgrade to STRUMPACK v7.1.0, update minimum CMake version (#37014)
* Upgrade to STRUMPACK v7.1.0, update minimum CMake version
* Update to v7.1.1, which has a fix for ROCm
2023-04-20 16:42:36 -07:00
Glenn Johnson
da8be02e66 ants: add version 2.4.3 (#37031)
* ants: add version 2.4.3
  - add version 2.4.3
  - deprecate old git version
* [@spackbot] updating style on behalf of glennpj

---------

Co-authored-by: glennpj <glennpj@users.noreply.github.com>
2023-04-20 16:31:27 -07:00
Rémi Lacroix
c348776096 Add new package MozJPEG (#37052)
* Add new package MozJPEG
  MozJPEG is a patched version of libjpeg-turbo which improves JPEG compression efficiency achieving higher visual quality and smaller file sizes at the same time.
* MozJPEG: Add myself as a maintainer and fix style
2023-04-20 19:28:07 -04:00
Glenn Johnson
683b933f68 atompaw: add version 4.2.0.2 (#37035) 2023-04-20 16:07:33 -07:00
Alec Scott
5c5f3c00a3 emacs: default to +tls true (#37038)
* emacs: default to +tls true
* Add myself as a maintainer for emacs pkg
2023-04-20 15:53:11 -07:00
AMD Toolchain Support
d5c549f1e6 stream optimization for aocc (#37039) 2023-04-20 15:45:17 -07:00
Olivier Cessenat
8fb38e3982 poppler-data: new version 0.4.12 (#37042) 2023-04-20 15:35:51 -07:00
Olivier Cessenat
61ce48c2ac poppler: new version 23.04.0 (#37043) 2023-04-20 15:34:40 -07:00
Olivier Cessenat
af19e51966 gxsview: new version 2022.11.04 (#37050) 2023-04-20 15:32:02 -07:00
Olivier Cessenat
04aaaa8270 netpbm: new version 10.73.43 (#37051) 2023-04-20 15:31:03 -07:00
Adam J. Stewart
f174bca689 py-lightly: add v1.4.2 (#37053)
* py-lightly: add v1.4.2
* pytorch and lightning 2.0 now supported
2023-04-20 15:29:53 -07:00
Cameron Book
7c9359d57e Add scotch-7.0.3 checksum. (#37054) 2023-04-20 15:26:50 -07:00
Kelly (KT) Thompson
09100ac5d9 Provide version 1.16 of lcov; volunteer to be maintainer. (#37056) 2023-04-20 13:51:39 -07:00
Emil Briggs
2b2c84aa8a rmgdft: new version 5.2.0 (#37059)
* Update for v5.0.4 release.
* Updated for version 5.0.5.
* Updated for new release.
2023-04-20 13:38:31 -07:00
snehring
a513272665 prism: adding new version 4.7 and java version restriction (#37061) 2023-04-20 13:36:01 -07:00
Matthew Thompson
843c0c060b gftl: add version 1.9.0, 1.10.0 (#37062) 2023-04-20 13:32:10 -07:00
Matthew Thompson
772772f14d gftl-shared: add version 1.6.0 (#37063) 2023-04-20 13:25:54 -07:00
Erik Schnetter
be133cd3d6 mpitrampoline: New version 5.3.0 (#37065) 2023-04-20 13:23:30 -07:00
Matthew Thompson
0ffedf2eba fargparse: add version 1.5.0 (#37066) 2023-04-20 13:22:08 -07:00
Matthew Thompson
82cfccaf85 pfunit: add version 4.7.0 (#37067) 2023-04-20 13:21:10 -07:00
Matthew Thompson
7d9e531de2 yafyaml: add version 1.1.0 (#37068) 2023-04-20 13:19:47 -07:00
Matthew Thompson
c0f096467e pflogger: add version 1.9.5, 1.10.0 (#37069) 2023-04-20 13:18:25 -07:00
Vicente Bolea
9684b03bff adios2: add latest release (#36563) 2023-04-20 14:50:51 -05:00
Alec Scott
1fb5707235 r-renv: add v0.17.3 (#36944) 2023-04-20 12:33:29 -05:00
Brian Vanderwende
381f1b76a7 Add RPC lib path to wrapper flags for HDF4 (#35628) 2023-04-20 08:49:04 -07:00
Massimiliano Culpo
1b7cf171ce Use core API to create a Makefile during bootstrapping (#37023) 2023-04-20 15:11:56 +02:00
Adam J. Stewart
01913d08e7 google-cloud-cli: add new package (#36830)
* google-cloud-cli: add new package

* black fixes

* Less verbose

* [@spackbot] updating style on behalf of adamjstewart

* More robust if ver doesn't exist for platform

* Deprecate ancient GEE

* Fix ppc64le bug

---------

Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2023-04-19 16:12:03 -07:00
Adam J. Stewart
d5fa062e4a py-einops: add v0.6.1 (#37027) 2023-04-19 15:23:19 -07:00
Erik Schnetter
b164c03b09 coreutils: New version 9.3 (#37021) 2023-04-19 14:18:34 -07:00
Harmen Stoppels
d51af675ef make version(...) kwargs explicit (#36998)
- [x] Replace `version(ver, checksum=None, **kwargs)` signature with
      `version(ver, checksum=None, *, sha256=..., ...)` explicitly listing all arguments.
- [x] Fix various issues in packages:
  - `tags` instead of `tag`
  - `default` instead of `preferred`
  - `sha26` instead of `sha256`
  - etc

Also, use `sha256=...` consistently.

Note: setting `sha256` currently doesn't validate the checksum length, so you could do
`sha256="a"*32` and it would get checked as `md5`... but that's something for another PR.
2023-04-19 14:17:47 -07:00
Wouter Deconinck
c7508dc216 py-torch: define property cmake_prefix_paths (#37012)
* py-torch: define property cmake_prefix_paths

`py-torch` installs `libtorch` and a cmake config in a non-standard location. This points downstream code to the relevant locations. From there it should pick up the correctly library and include paths for C++ projects.

* py-torch: python_platlib suggestion

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

* [@spackbot] updating style on behalf of wdconinc

* py-torch: back to self.spec["python"].package.platlib

* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2023-04-19 17:12:45 -04:00
Veselin Dobrev
6ca41cfbcb Add mfem v4.5.2 and related updates/tweaks in other packages (#36154)
* Add mfem v4.5.2 and related updates/tweaks in other packages

* [mfem] Add the release source link for MFEM v4.5.2

* [mfem] Remove 'goxberry' (his request) from MFEM's maintainers list
2023-04-19 05:55:31 -07:00
Harmen Stoppels
ae909b3688 Extract depfile logic from cli command into a core module (#36995) 2023-04-19 14:36:29 +02:00
Alec Scott
3a5e48f476 installer.py: drop build edges of installed packages by default (#36707)
This means that `spack install` will now build the minimal set of packages
required to install the root(s).

To opt out of build edge pruning, use `spack install --include-build-deps`.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-04-19 10:00:40 +02:00
Alec Scott
899838b325 apachetop: add v0.23.2 (#37017) 2023-04-19 09:48:52 +02:00
Alec Scott
001bf93ea3 r-rcpptoml: add v0.2.2 (#36886) 2023-04-19 02:07:40 -04:00
Todd Gamblin
b260234faf editing: add higher-precedence SPACK_EDITOR environment variable
Other tools like git support `GIT_EDITOR` which takes higher precedence than the
standard `VISUAL` or `EDITOR` variables. This adds similar support for Spack, in the
`SPACK_EDITOR` env var.

- [x] consolidate editor code from hooks into `spack.util.editor`
- [x] add more editor tests
- [x] add support for `SPACK_EDITOR`
- [x] add a documentation section for controlling the editor and reference it
2023-04-18 16:23:00 -07:00
Todd Gamblin
2f30da1762 refactor: unify use of spack.util.editor
Code from `spack.util.editor` was duplicated into our licensing hook in #11968. We
really only want one place where editor search logic is implemented. This consolidates
the logic into `spack.util.editor`, including a special case to run `gvim` with `-f`.

- [x] consolidate editor search logic in spack.util.editor
- [x] add tests for licensing case, where `Executable` is used instead of `os.execv`
- [x] make `_exec_func` argument of `editor()` into public `exec_fn` arg
- [x] add type annotations
2023-04-18 16:23:00 -07:00
Massimiliano Culpo
d92c21ec97 Fix compilation on Cray (target: any) (#37011)
fixes #36628

Fix using compilers that declare "target: any" in their
configuration. This should happen only on Cray with the
module based programming environment.
2023-04-18 15:47:52 -07:00
Benjamin Meyers
5960d74dca Update and fix py-dgl+cuda (#36823)
* Update and fix py-dgl+cuda

* [@spackbot] updating style on behalf of meyersbs

* Update py-dgl
2023-04-18 15:56:18 -05:00
Jonathon Anderson
c7232f4505 lammps: backport fix for +rocm+kokkos+kspace (#36850)
* lammps: backport hipfft fix for ROCm-based builds

* lammps: Mark incompatibility with Kokkos 4.x for old versions
2023-04-18 15:41:18 -05:00
Jonathon Anderson
08fd8c8d0a spack ci: preserve custom attributes in build jobs (#36651)
* Simplify test/cmd/ci.py::test_ci_generate_with_custom_scripts

* Rearrange the build-job logic in generate_gitlab_ci_yaml

* Preserve all unknown attributes in build jobs

* Slip tests for custom attributes in the tests for other job types

* Support custom artifacts

* [@spackbot] updating style on behalf of blue42u

* Don't bother sorting needs

---------

Co-authored-by: blue42u <blue42u@users.noreply.github.com>
2023-04-18 15:40:43 -05:00
Alec Scott
eb72217228 r-httpuv: add v1.6.9 (#36951) 2023-04-18 15:12:13 -05:00
Alec Scott
945d032f08 r-git2r: add v0.31.0 (#36864) 2023-04-18 15:08:24 -05:00
Alec Scott
78bfeb11ae r-highr: add v0.10 (#36867) 2023-04-18 15:06:24 -05:00
kwryankrattiger
9745865250 DaV SDK: Enable ParaView raytracing with in SDK (#36844)
* DaV SDK: Enable ParaView raytracing with in SDK

* CI: Drop swr testing from Data Vis SDK

* ISPC: extend LLVM requirement to main

* DaV SDK: Disallow concretizing develop unifyfs

No longer needed after mochi-margo patch
2023-04-18 13:39:47 -05:00
Benjamin Meyers
accbf2cffc New packages: py-ogb, py-outdated, py-littleutils (#36824)
* New packages: py-ogb, py-outdated, py-littleutils

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-18 11:08:57 -05:00
Annop Wongwathanarat
5d8ca81e82 py-scipy: link with OpenMP version of armpl-gcc when requested (#37002) 2023-04-18 11:08:29 -05:00
Harmen Stoppels
11e5b0cd91 fix typo (#36997) 2023-04-18 08:07:57 -05:00
Todd Gamblin
6845f41d67 Revert addition of SPACK_EDITOR pending review.
This reverts commit d8a26905ee.
This reverts commit 1ee049ccc3.

These were spuriously pushed to `develop`.
2023-04-18 03:57:24 -07:00
Todd Gamblin
1ee049ccc3 editing: add higher-precedence SPACK_EDITOR environment variable
Other tools like git support `GIT_EDITOR` which takes higher precedence than the
standard `VISUAL` or `EDITOR` variables. This adds similar support for Spack, in the
`SPACK_EDITOR` env var.

- [x] consolidate editor code from hooks into `spack.util.editor`
- [x] add more editor tests
- [x] add support for `SPACK_EDITOR`
- [x] add a documentation section for controlling the editor and reference it
2023-04-18 03:42:56 -07:00
Todd Gamblin
d8a26905ee refactor: unify use of spack.util.editor
Code from `spack.util.editor` was duplicated into our licensing hook in #11968. We
really only want one place where editor search logic is implemented. This consolidates
the logic into `spack.util.editor`, including a special case to run `gvim` with `-f`.

- [x] consolidate editor search logic in spack.util.editor
- [x] add tests for licensing case, where `Executable` is used instead of `os.execv`
- [x] make `_exec_func` argument of `editor()` into public `exec_fn` arg
- [x] add type annotations
2023-04-18 03:00:04 -07:00
Greg Becker
480b7f397e Allow users to remove items from hierarchy per-path (#31351)
* lmod modules: allow users to remove items from hierarchy per-spec

This allows MPI wrappers that depend on MPI to be removed from the MPI portion of
the hierarchy and be made available when the appropriate compiler is loaded.

module load gcc
module load mpi-wrapper  # implicitly loads mpi
module load hdf5

This allows users to treat an mpi wrapper like an mpi program
2023-04-17 22:17:11 -07:00
Wouter Deconinck
2bc1779a71 py-html5lib, madgraph5amc: correct hashes of empty files (#36979)
* py-html5lib: correct hashes of empty files

Going through and fixing hashes that are due to empty string.
```console
$ grep -Ir $(echo -n | sha256sum | awk '{print$1}') $SPACK_ROOT/var/spack/repos/builtin
/home/wdconinc/git/spack/var/spack/repos/builtin/packages/madgraph5amc/package.py:        sha256="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
/home/wdconinc/git/spack/var/spack/repos/builtin/packages/py-html5lib/package.py:    version("0.99", sha256="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
```

```console
$ spack checksum py-html5lib 0.99
==> Found 1 version of py-html5lib:
  
  0.99  https://files.pythonhosted.org/packages/source/h/html5lib/html5lib-0.99.tar.gz

==> Fetching https://files.pythonhosted.org/packages/source/h/html5lib/html5lib-0.99.tar.gz

    version("0.99", sha256="aff6fd3031c563883197e5a04b7df324086ff5f358278a0386808c463a077e59")
```

* madgraph5: remove incorrectly hashed version
2023-04-17 23:14:10 -04:00
Wouter Deconinck
9ea7937f6d qt: new version 5.15.9 (#36709)
This adds the new LTS version of Qt5. No build system changes needed.

The bundled libjpeg and sqlite versions were updated, but it is unclear if these are actual build requirements, and we have not been tracking these specific versions in the version dependencies (likely due to exactly this lack of clarity).

Compare: https://github.com/qt/qtbase/compare/v5.15.8-lts-lgpl...v5.15.9-lts-lgpl
2023-04-17 15:06:44 -04:00
Harmen Stoppels
381c0af988 Revert "move depfile logic into its own module, separate traversal logic from model (#36911)" (#36985)
This reverts commit a676f706a8.
2023-04-17 20:58:38 +02:00
Paul Kuberry
4519b42214 xyce: patch issue affecting MPICH (#36826) 2023-04-17 10:19:08 -07:00
Rémi Lacroix
8e50c08b3f Add NetCDF95 package. (#36959)
* Add NetCDF95 package.
  NetCDF95 is an alternative Fortran interface to the NetCDF library which uses Fortran   2003 features.
* [@spackbot] updating style on behalf of RemiLacroix-IDRIS

---------

Co-authored-by: RemiLacroix-IDRIS <RemiLacroix-IDRIS@users.noreply.github.com>
2023-04-17 10:02:54 -07:00
Tim Haines
121ef695e3 Boost: add version 1.82.0 (#36924) 2023-04-17 18:35:45 +02:00
Sergey Kosukhin
275bfc15b4 netcdf-c: major refactoring, new variants and versions (#36485) 2023-04-17 17:59:10 +02:00
Adam J. Stewart
036695ac94 CI: update Linux images in ML pipelines (#36766)
Add missing openssl/curl/pkgconfig deps to py-tokenizers

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-04-17 17:42:03 +02:00
Alec Scott
19b55d6b27 r-rstantools: add v2.3.1 (#36890) 2023-04-17 08:53:06 -05:00
Alec Scott
993303f840 r-r-utils: add v2.12.2 (#36884) 2023-04-17 08:29:41 -05:00
Harmen Stoppels
a676f706a8 move depfile logic into its own module, separate traversal logic from model (#36911) 2023-04-17 15:27:01 +02:00
Alec Scott
2081ab8be1 cgl: add v0.60.7 (#36940) 2023-04-17 15:07:34 +02:00
Alec Scott
f2efec7fcc masurca: add v4.1.0 (#36942) 2023-04-17 15:07:17 +02:00
Alec Scott
e7b549216c spot: add v2.11.4 (#36943) 2023-04-17 15:06:56 +02:00
Alec Scott
426570fc3f glab: add v1.28.0 (#36946) 2023-04-17 15:06:32 +02:00
Carlos Bederián
0e55055394 plumed: add 2.8.2, 2.7.6 and their supported gromacs combinations (#36929)
* plumed: Add 2.8.2, 2.7.6

* gromacs: add plumed 2.8.2 and 2.7.6 support
2023-04-17 15:05:31 +02:00
Alec Scott
1bbeb61668 slang: add v2.3.3 (#36952) 2023-04-17 15:04:57 +02:00
Alec Scott
376d87619b transdecoder: add v5.7.0 (#36953) 2023-04-17 15:04:41 +02:00
Alec Scott
f82b4a68b8 Add "build" stage to many Go packages (#36795) 2023-04-17 15:03:09 +02:00
Adam J. Stewart
abb236e98a py-lightly: py-torch+distributed required (#36955) 2023-04-17 15:02:13 +02:00
Adam J. Stewart
adf0ce6621 py-sphinx: add new versions (#36938) 2023-04-17 15:01:32 +02:00
Alec Scott
5368049128 ruby-rake: add v13.0.6 (#36945) 2023-04-17 15:00:39 +02:00
Alec Scott
8afa166edf hepmc3: add v3.2.6 (#36941) 2023-04-17 15:00:22 +02:00
Taillefumier Mathieu
79a1b3bc12 Add umpire support to SIRIUS (#36958) 2023-04-17 08:53:11 -04:00
Glenn Johnson
4b6ab53a10 Add dependency changes to R packages (#36937)
This PR adds dependency changes that were missed with some recent merges
of R package updates.
2023-04-17 09:50:46 +02:00
Harmen Stoppels
58f389779a rust: depend on curl+nghttp2 (#36947) 2023-04-16 21:50:37 -05:00
Wouter Deconinck
508cad0bbc apptainer: new versions 1.1.6, 1.1.7 (#36838)
* apptainer: new versions 1.0.6, 1.0.7

No changes to build system required. https://github.com/apptainer/apptainer/compare/v1.1.5...v1.1.7

* apptainer: rm hanging chad
2023-04-16 18:51:06 -07:00
Juan Miguel Carceller
d22fa1be19 Change extend to append (#36939)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2023-04-16 18:40:48 -07:00
Wouter Deconinck
77830d92bd libmypaint: change extend to append (#36957)
* libmypaint: change extend to append

For same reason as #36939, `extend` takes a list as argument, while `append` takes list entry. Here `append` should be used.

* libmypaint: depends_on intltool
2023-04-16 18:37:48 -07:00
Alec Scott
14075f9f4c r-jsonlite: add v1.8.4 (#36872) 2023-04-15 22:02:50 -04:00
Alec Scott
fc58f5d174 r-progressr: add v0.13.0 (#36881) 2023-04-15 21:57:48 -04:00
Alec Scott
25ba8702c7 r-hoardr: add v0.5.3 (#36869) 2023-04-15 21:37:42 -04:00
Alec Scott
b064f9d1e0 r-sn: add v2.1.1 (#36891) 2023-04-15 13:09:25 -05:00
Alec Scott
d43690a91b r-rstan: add v2.21.8 (#36889) 2023-04-15 13:07:57 -05:00
Alec Scott
b6c2487f74 r-timedate: add v4022.108 (#36897) 2023-04-15 09:31:54 -07:00
Alec Scott
32c3ce204d libctl: add v4.5.1 (#36852) 2023-04-15 09:20:43 -05:00
Alec Scott
8893605b1e r-yulab-utils: add v0.0.6 (#36900) 2023-04-15 08:33:32 -05:00
Alec Scott
1345e98ae7 r-spades-tools: add v1.0.1 (#36892) 2023-04-15 15:25:05 +02:00
Alec Scott
7dfcb37975 r-svglite: add v2.1.1 (#36893) 2023-04-15 15:24:49 +02:00
Alec Scott
7854f64e1e r-taxizedb: add v0.3.1 (#36894) 2023-04-15 15:24:33 +02:00
Alec Scott
e18f6ffc28 r-tibble: add v3.2.1 (#36895) 2023-04-15 15:24:19 +02:00
Alec Scott
9e463adac1 r-tidytree: add v0.4.2 (#36896) 2023-04-15 15:24:04 +02:00
Alec Scott
839f820127 sdl2: add v2.26.5 (#36901) 2023-04-15 15:22:26 +02:00
Alec Scott
1c0b028aaa r-utf8: add v1.2.3 (#36898) 2023-04-15 15:22:10 +02:00
Alec Scott
db38f4d75a r-xts: add v0.13.0 (#36899) 2023-04-15 15:21:54 +02:00
Alec Scott
4cbc0c420c r-dendextend: add v1.17.1 (#36861) 2023-04-15 08:15:17 -05:00
Alec Scott
856b6d6d01 r-curl: add v5.0.0 (#36860) 2023-04-15 08:03:41 -05:00
Alec Scott
51fb778358 r-earth: add v5.3.2 (#36863) 2023-04-15 07:57:03 -05:00
Howard Pritchard
cad16f5d3d OpenMPI: tell it where libcuda.so is (#36784)
starting with the 5.0.x release stream the cuda related configury
items in Open MPI once again need --with-cuda-libdir so that
libcuda.so can be found at configure time, otherwise no cuda
support unless someone copies libcuda.so to
$CUDA_HOME/lib64

related to #36760

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-04-15 14:53:15 +02:00
Annop Wongwathanarat
cf817bdd4e openblas: add -Wno-error=implicit-function-declaration for Arm compiler (#36821) 2023-04-15 14:45:35 +02:00
Annop Wongwathanarat
22984edb1b netlib-scalapack: add -Wno-error=implicit-function-declaration for Arm compiler (#36822) 2023-04-15 14:44:44 +02:00
Annop Wongwathanarat
03ba24b370 scorpio: add -Wno-error=implicit-function-declaration for Arm compiler (#36827) 2023-04-15 14:43:28 +02:00
Annop Wongwathanarat
6d366c39ae libffi: add -Wno-error=implicit-function-declaration for Arm compiler (#36832) 2023-04-15 14:42:13 +02:00
Jon Rood
242c1e4535 gingko: remove redundant build type variant (#36703) 2023-04-15 14:41:48 +02:00
Annop Wongwathanarat
5071174194 superlu-dist: add -Wno-error=implicit-function-declaration for Arm compiler (#36831) 2023-04-15 14:40:54 +02:00
dependabot[bot]
2651def9fa build(deps): bump actions/checkout from 3.5.1 to 3.5.2 (#36848)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](83b7061638...8e5e7e5ab8)

---
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>
2023-04-15 14:37:52 +02:00
Alec Scott
a37ed72a07 cub: add v2.1.0 (#36851) 2023-04-15 14:33:55 +02:00
Alec Scott
0bd54147d8 openjpeg: add v2.5.0 (#36858) 2023-04-15 14:33:02 +02:00
Alec Scott
0d5394e184 r-blockmodeling: add v1.1.4 (#36859) 2023-04-15 14:32:01 +02:00
Alec Scott
ff732bdb4d r-dt: add v0.27 (#36862) 2023-04-15 14:30:47 +02:00
Alec Scott
0ccc044f79 r-gson: add v0.1.0 (#36865) 2023-04-15 14:29:09 +02:00
Alec Scott
a465856cef r-gtools: add v3.9.4 (#36866) 2023-04-15 14:28:53 +02:00
Alec Scott
0e8f23f202 r-hms: add v1.1.3 (#36868) 2023-04-15 14:28:05 +02:00
Alec Scott
f936a1ef7e r-httr: add v1.4.5 (#36870) 2023-04-15 14:27:25 +02:00
Alec Scott
54bcdb8dec r-isoband: add v0.2.7 (#36871) 2023-04-15 14:27:10 +02:00
Alec Scott
2022b38fe2 r-listenv: add v0.9.0 (#36873) 2023-04-15 14:26:26 +02:00
Alec Scott
06d3b882ad r-lubridate: add v1.9.2 (#36874) 2023-04-15 14:25:49 +02:00
Alec Scott
4508803643 r-nimble: add v0.13.1 (#36875) 2023-04-15 14:25:34 +02:00
Alec Scott
f5c5a4a0b1 r-openssl: add v2.0.6 (#36876) 2023-04-15 14:25:18 +02:00
Alec Scott
60ee39d3d8 r-pbkrtest: add v0.5.2 (#36877) 2023-04-15 14:25:04 +02:00
Alec Scott
3b98ad4479 r-phangorn: add v2.11.1 (#36878) 2023-04-15 14:24:50 +02:00
Alec Scott
78c54a42bb r-pkgmaker: add v0.32.8 (#36879) 2023-04-15 14:24:33 +02:00
Alec Scott
0d624d9842 r-plyr: add v1.8.8 (#36880) 2023-04-15 14:24:18 +02:00
Alec Scott
b0eaab8242 r-psych: add v2.3.3 (#36882) 2023-04-15 14:23:22 +02:00
Alec Scott
4655936389 r-qtl: add v1.58 (#36883) 2023-04-15 14:20:26 +02:00
Alec Scott
7f319429fd r-rcppparallel: add v5.1.7 (#36885) 2023-04-15 14:20:02 +02:00
Alec Scott
7c20aaaab8 r-rlang: add v1.1.0 (#36887) 2023-04-15 14:19:18 +02:00
Alec Scott
a3d49a56a8 r-rrblup: add v4.6.2 (#36888) 2023-04-15 14:19:02 +02:00
finkandreas
e7238a0f26 suite-sparse: fix build with GPU targets 2023-04-15 14:18:45 +02:00
Juan Miguel Carceller
161485a774 cairo: add a dependency on which (#36908) 2023-04-15 14:16:41 +02:00
Alec Scott
b6c3cbff6f ncio: add v1.1.2 (#36857) 2023-04-15 14:09:00 +02:00
Alec Scott
55adddc239 aspcud: add v1.9.6 (#36912) 2023-04-15 14:08:43 +02:00
Alec Scott
903626c899 conserver: add v8.2.7 (#36913) 2023-04-15 14:07:16 +02:00
Alec Scott
afc6560429 exa: add v0.10.1 (#36914) 2023-04-15 14:06:57 +02:00
Alec Scott
03be2635eb libverto: add v0.3.2 (#36915) 2023-04-15 14:06:39 +02:00
Alec Scott
efa51e124d r-dorng: add v1.8.6 (#36916) 2023-04-15 14:06:20 +02:00
Alec Scott
6ab070d2ae r-gower: add v1.0.1 (#36917) 2023-04-15 14:05:53 +02:00
Alec Scott
433afe39a7 r-grbase: add v1.8.9 (#36918) 2023-04-15 14:05:36 +02:00
Alec Scott
9ba4b0cab8 r-tigris: add v2.0.1 (#36919) 2023-04-15 14:05:13 +02:00
Alec Scott
554d9125ef routino: add v3.3.3 (#36920) 2023-04-15 14:04:52 +02:00
Alec Scott
9e4dd4972f trident: add v23.01.1 (#36921) 2023-04-15 14:03:53 +02:00
Alec Scott
39c7b10735 double-conversion: add v3.2.1 (#36931) 2023-04-15 13:52:28 +02:00
Alec Scott
4bb4225f09 kraken: add v1.1.1 (#36932) 2023-04-15 13:51:34 +02:00
Alec Scott
1582ce6397 r-bayesplot: add v1.10.0 (#36933) 2023-04-15 13:50:58 +02:00
Caleb Robinson
becebe99b4 Updating torchgeo to 0.4.1 (#36793)
* Updating torchgeo to 0.4.1

* Added some commas

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

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

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

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

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

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

* Changed fiona bounds

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-14 22:17:35 -04:00
Adam J. Stewart
e3bb6d98fb py-pyupgrade: add v3.3.1 (#36926) 2023-04-14 17:18:00 -07:00
Juan Miguel Carceller
89b8445eb0 Add jmcarcell to the maintainers of some packages (#36909)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2023-04-14 17:03:50 -07:00
Dan Bonachea
b7c2cc9b85 upcxx: Fixes for Cray targets (#36708)
* upcxx: Enhance auto-detection for HPE Cray EX platforms

1. Some Cray EX systems use ALPS instead of SLURM, ensure we default
   the pmi-runcmd appropriately.

2. Some Cray EX systems run a stock kernel and lack a Cray PrgEnv
   (yes, really), so add a check for libfabric CXI provider as a
   last resort for detecting Cray EX, and ensure we don't choke on
   a lack of `$CRAYPE_DIR`.

* upcxx: Cray XC improvements

1. Future-proof Cray XC detection, in case Spack ever starts reporting
   it as "linux".
2. Revert cray-libsci workaround for ALCF Theta. The workaround no longer
   appears to be necessary, and is actually causing failures on Theta now.

* upcxx: Add level_zero variant detection
2023-04-14 16:17:41 -07:00
Sergey Kosukhin
5efd689803 proj: fix installation of datum grid with Autotools (#36906) 2023-04-14 18:18:21 -04:00
Adam J. Stewart
4d11001046 Issue Templates: improve details formatting (#36923) 2023-04-14 12:16:22 -05:00
Doug Jacobsen
690394fabc Change environment modifications to escape with double quotes (#36789)
This commit changes the environment modifications class to escape
strings with double quotes instead of single quotes.

Single quotes prevent the expansion of enviornment variables that are
nested within environment variable definitions.
2023-04-14 10:13:17 -07:00
John W. Parent
7d083cf138 cmake: add version 3.26.3 (#36648) 2023-04-14 11:03:36 -04:00
Scott Wittenburg
bfa94c5781 gitlab ci: Better tagging of "service" jobs (#36846)
- Tag non-rebuild jobs to target a cheaper (and more highly available)
subset of runners.

- Add missing resource requests to these jobs as well.
2023-04-14 09:03:12 -06:00
kwryankrattiger
3710774d02 VTK-m: use conflict with virtuals variant with ROCm (#36845) 2023-04-14 16:55:46 +02:00
Alec Scott
32808f4fb5 yambo: add v5.1.1 (#36905) 2023-04-14 07:13:33 -04:00
Alec Scott
7c2fc29b6a tempestremap: add v2.1.6 (#36903) 2023-04-14 07:03:35 -04:00
Alec Scott
5504fd6730 speex: add v1.2.1 (#36902) 2023-04-14 12:28:37 +02:00
Alec Scott
7066b61be3 vecmem: add v0.24.0 (#36904) 2023-04-14 12:27:12 +02:00
Massimiliano Culpo
9ec289857c netcdf: fix bugs introduced with multiple build systems split (#36825)
Fixes #36689

- The "base" builder class should be last in the MRO
- `filter_compiler_wrappers` needs to be moved to builders
- Decorating a function from a mixin class require using
   the correct metaclass for the mixin
2023-04-14 10:59:12 +02:00
Massimiliano Culpo
92144d6375 lz4: fix bug on darwin, use makefile by default (#36820)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-04-14 09:43:59 +02:00
Wouter Deconinck
0c2aafec33 cernlib: depends_on openssl when platform=linux (#36837)
Fixes #36836.
2023-04-14 09:17:13 +02:00
Adam J. Stewart
2380810d60 py-lightning: add v1.9.5 (#36803) 2023-04-14 09:08:19 +02:00
Alec Scott
7786da9117 kubernetes: add v1.27.0 and split off new package kubectl (#36780) 2023-04-14 09:07:42 +02:00
Wouter Deconinck
87dca0130c (py-)onnx: new version 1.13.0, 1.13.1 (for py-torch@2) (#36797)
* (py-)onnx: new version 1.13.0, 1.13.1 (for py-torch@2)

ONNX has a new version 1.13.1 which is required for py-torch +onnx_ml.
This version adds python 3.11 support, Mac M1/M2 support. No build
system changes changes.

- https://github.com/onnx/onnx/releases/tag/v1.13.0 (main changes)
- https://github.com/onnx/onnx/releases/tag/v1.13.1 (bugfixes)
- https://github.com/onnx/onnx/commits/main/CMakeLists.txt (top 6
  commits are on top of the last 1.12 release)
- https://github.com/onnx/onnx/blob/v1.13.1/requirements.txt
- https://github.com/onnx/onnx/blob/v1.13.1/requirements-release.txt

* py-onnx: update dependencies

* Apply suggestions from code review

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

* protobuf: new version 3.22.2, depends_on abseil-cpp

* onnx: require c++14 for protobuf

* py-protobuf: new preferred version 3.20.3

* protobuf: new versions 3.20.2, 3.20.3

* [@spackbot] updating style on behalf of wdconinc

* protobuf: no double depends_on abseil-cpp

* py-protobuf: no preferred 3.20.3

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2023-04-13 21:25:58 -05:00
MikeG
f171d7ed15 py-dask-mpi: remove jupyter-server-proxy (#36680)
* py-dask-mpi: remove jupyter-server-proxy

This dependency isn't a 'hard' one; it optionally simplifies getting access to the web consoles.
See: https://github.com/dask/dask-mpi/pull/102

* Add patch to remove unnecessary dependency

* review comments

* pass formatting
2023-04-13 21:22:59 -05:00
Nisarg Patel
e2812a6e96 Update m4 (#36835)
* Update m4

For %oneapi & %intel, we explicitly set -O0 so dependents of m4 do not break
        # The default optimization level for icx/icpx is "-O2", 
        # but building m4 with this level breaks the build of dependents. 
        # So we set it explicitely to "-O0".

* [@spackbot] updating style on behalf of hpcnpatel
2023-04-13 21:02:43 -04:00
Adam J. Stewart
2b47a7a22f py-lightly: add new package (#36839) 2023-04-13 19:16:22 -05:00
eugeneswalker
a9db5620f5 remove x86_64_v3 tags (#36828) 2023-04-13 15:29:15 -05:00
Erik Schnetter
f4833a9869 mpiwrapper: New version 2.10.3 (#36816) 2023-04-13 20:28:51 +02:00
dependabot[bot]
4a44e4bed9 build(deps): bump actions/checkout from 3.5.0 to 3.5.1 (#36815)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8f4b7f8486...83b7061638)

---
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>
2023-04-13 20:28:26 +02:00
Erik Schnetter
44e2d1cd03 mpitrampoline: add v5.2.3 (#36814) 2023-04-13 20:27:55 +02:00
Wouter Deconinck
ff319e9863 Resolve <include-fragment> tags e.g. in github release pages (#36674)
This aims to resolve #34164 by resolving the <include-fragment> tags
that GitHub has started using for their release pages, see
https://github.github.io/include-fragment-element/.

This feels a bit hacky but intended as a starting point for discussion.
After reading a page during spidering, it first parses for
include-fragments, gets them all, and treats them all as separate pages.
Then it looks for href links in both the page itself and the fragments.

Co-authored-by: Alec Scott <alec@bcs.sh>
2023-04-13 20:26:26 +02:00
Massimiliano Culpo
d918ae0bde containerize: strip binaries in a less aggressive way (#36683) 2023-04-13 17:09:34 +02:00
kwryankrattiger
b940468890 CI: Update Data Vis SDK image (#36761)
Supersedes #34224
2023-04-13 09:54:42 -05:00
Daniel Ahlin
0707ffd4e4 gromacs: Specify c++ stdlib for aocc (#36553)
Co-authored-by: Christoph Junghans <junghans@lanl.gov>
2023-04-13 07:39:58 -04:00
John W. Parent
7801577cd5 lz4: fixup incorrect builder method signature (#36812) 2023-04-13 12:33:55 +02:00
Jack Morrison
8668635f1f libfabric: Add v1.18.0; Drop linux-headers dependency (#36805)
* Remove libfabric dependency on linux-headers package when building with OPX support.
* Add libfabric verison 1.18.0
2023-04-12 21:50:19 -04:00
Daniel Ahlin
49fe67572e gromacs: Intel oneapi 2023 fixes (#36555)
* gromacs: oneapi@2023 - g++-dependency and MKL path

Fixes to build with oneapi@2023 and MKL 2023.
* Depend on gcc and add GMX_GPLUSPLUS_PATH to it
* MKL seems to be picked up without explicit directives
  and the old directives fails (at least for my tests) with MKL
  2023.

* gromacs: oneapi@2023 fix - address style errors

* gromacs: add danielahlin as maintainer

Adding danielahlin as maintainer as discussed in https://github.com/spack/spack/pull/36555#issuecomment-1496224128 and https://github.com/spack/spack/pull/36555#issuecomment-1504682712

* Update package.py

---------

Co-authored-by: Christoph Junghans <christoph.junghans@gmail.com>
Co-authored-by: Christoph Junghans <junghans@lanl.gov>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-04-12 19:19:42 -06:00
John W. Parent
ced6353e14 Paraview package: build on Windows (#36583)
* Prevent use of x11
* Don't define mpi compilers in cmake interface as MSMPI has no compiler
  wrapper.
2023-04-12 21:18:32 -04:00
Massimiliano Culpo
32f2d7ab7e libgcrypt: add v1.10.2 (#36799) 2023-04-12 16:10:12 -04:00
John W. Parent
135a6a07f1 WGL: remove invalid variant detection (#36579)
Plat variant was removed in a previous PR, now prevent that variant from
being detected externally.
2023-04-12 13:04:51 -07:00
Massimiliano Culpo
a7ae996e6b Stop installing codecov from pip (#36804)
It shouldn't be needed since we use Codecov's Github action

See here for more information https://community.codecov.com/t/codecov-yanked-from-pypi-all-versions/4259
2023-04-12 19:28:55 +02:00
Wouter Deconinck
e08c02c471 py-hatchling: new version 1.14.0; new pkgs py-calver, py-trove-classifiers (#36796)
* py-hatchling: new version 1.14.0; new pkgs py-calver, py-trove-classifiers

Hatchling 1.14.0 adds a new dependency on trove-classifiers, which in turn
depends on calver. So, those two packages needed to be added as well.

- f8915309d3
- https://github.com/pypa/trove-classifiers/blob/2023.3.9/pyproject.toml
- https://github.com/di/calver/blob/2022.06.26/pyproject.toml

* Apply suggestions from code review

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-12 12:52:10 -04:00
dependabot[bot]
385834bd43 build(deps): bump codecov/codecov-action from 3.1.1 to 3.1.2 (#36794)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](d9f34f8cd5...40a12dcee2)

---
updated-dependencies:
- dependency-name: codecov/codecov-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>
2023-04-12 11:28:39 -04:00
Yang Zongze
46e45507dc hpddm: add new versions (#36769) 2023-04-12 08:59:33 +02:00
Simon Pintarelli
e3a420daed umpire: depends on camp~cuda when ~cuda (#36788) 2023-04-12 01:54:41 -04:00
Matthieu Dorier
78af0545c4 duckdb: add new package (#36682) 2023-04-12 07:26:53 +02:00
Kevin Huck
c3f207428c apex: add v2.6.2 (#36686) 2023-04-12 07:24:23 +02:00
Laura Weber
169704f72a sublime-text: Add licensing information (#36690) 2023-04-12 07:18:41 +02:00
Laura Weber
d4b8589b35 tecplot: Add version 2022r2, Licensing, Env setup (#36695) 2023-04-12 07:15:20 +02:00
Adam J. Stewart
60b573727e PROJ: googletest only needed to test (#36691) 2023-04-12 07:01:52 +02:00
Adam J. Stewart
e3e395769d py-tensorboard: add new versions (#36712) 2023-04-12 07:00:57 +02:00
Wouter Deconinck
8da72eb40b scitokens-cpp: new versions 0.7.1, 1.0.0 (#36714)
Two new versions were released since 0.7.0.

- https://github.com/scitokens/scitokens-cpp/releases/tag/v0.7.1
- https://github.com/scitokens/scitokens-cpp/releases/tag/v1.0.0

Some changes to dependencies:
- openssl always was an explicit requirement (but transitively satisfied by curl),
- cmake 3.10 required for both new versions.

Tested that all these new versions build fine:
```console
18:04:40 wdconinc@menelaos ~/git/spack (develop *$%>) $ spack find -lvx
==> In environment scitokens-cpp
==> Root specs
------- scitokens-cpp@0.7.0  ------- scitokens-cpp@0.7.1  ------- scitokens-cpp@1.0.0

==> Installed packages
-- linux-ubuntu23.04-skylake / gcc@12.2.0 -----------------------
uvwdosd cmake@3.26.3~doc+ncurses+ownlibs~qt build_system=generic build_type=Release          5gqdlyl scitokens-cpp@0.7.1~ipo build_system=cmake build_type=RelWithDebInfo generator=make
r4bdoii scitokens-cpp@0.7.0~ipo build_system=cmake build_type=RelWithDebInfo generator=make  xnnvbsf scitokens-cpp@1.0.0~ipo build_system=cmake build_type=RelWithDebInfo generator=make
==> 4 installed packages
```
2023-04-12 06:59:55 +02:00
Alec Scott
55fd89a576 glab: add v1.27.0 (#36723) 2023-04-12 06:55:29 +02:00
Alec Scott
a8b8c080a8 libcap: add v2.68 (#36725) 2023-04-12 06:55:15 +02:00
Alec Scott
76024ed28c nginx: add v1.23.4 (#36726) 2023-04-12 06:54:59 +02:00
Alec Scott
2eef4bd42a apr: add v1.7.3 (#36733) 2023-04-12 06:52:40 +02:00
Alec Scott
7df17ad7d6 feh: add v3.10 (#36734) 2023-04-12 06:52:21 +02:00
Alec Scott
729675bcf6 libgpg-error: add v1.47 (#36735) 2023-04-12 06:52:05 +02:00
Alec Scott
c12ce32b55 libxcomposite: add v0.4.6 (#36736) 2023-04-12 06:51:31 +02:00
Alec Scott
1d5e085549 libxrandr: add v1.5.3 (#36737) 2023-04-12 06:51:18 +02:00
Alec Scott
d68378d312 libxxf86misc: add v1.0.4 (#36738) 2023-04-12 06:51:04 +02:00
Alec Scott
9e9d5f72a9 perl-exporter-tiny: add v1.006002 (#36739) 2023-04-12 06:50:47 +02:00
Alec Scott
7212aae423 solr: add v8.11.2 (#36748) 2023-04-12 06:50:31 +02:00
Alec Scott
77da0707b0 talloc: add v2.4.0 (#36749) 2023-04-12 06:50:13 +02:00
Alec Scott
850b3bf27a task: add v2.6.2 (#36750) 2023-04-12 06:49:58 +02:00
Alec Scott
e0546f1b99 thrift: add v0.18.1 (#36751) 2023-04-12 06:49:44 +02:00
Alec Scott
a2365b68c2 xcb-proto: add v1.15.2 (#36752) 2023-04-12 06:49:13 +02:00
Alec Scott
f898406ae7 xerces-c: add v3.2.4 (#36753) 2023-04-12 06:48:55 +02:00
Alec Scott
6d96977980 xkeyboard-config: add v2.34 (#36754) 2023-04-12 06:48:39 +02:00
Adam J. Stewart
d79423fe9e protobuf: add new versions (#36711) 2023-04-12 06:47:42 +02:00
Glenn Johnson
f4658a520c r-hydrogof: add new package and dependencies (#36763)
- r-hydrogof
- r-hydrotsm
- r-automap
2023-04-12 06:39:06 +02:00
Alec Scott
94615285d1 sed: add v4.9 (#36747) 2023-04-12 06:38:22 +02:00
willdunklin
bf81f812a5 ascent: patch v0.9.0 for finding RAJA (#36645) 2023-04-12 06:36:48 +02:00
Adam J. Stewart
4863d6f21b py-fiona: add v1.9.3 (#36765) 2023-04-12 06:33:35 +02:00
Wouter Deconinck
2e242897e0 simsipm: add v2.0.2 (#36718) 2023-04-12 06:27:30 +02:00
Thomas Madlener
31c583581f lhapdf: Pass additional python lib dirs only if possible (#36771) 2023-04-12 06:25:54 +02:00
Howard Pritchard
781769545f Open MPI: fix pmix dependency for 5.0.x releases (#36773)
The Open MPI 5.0.x release stream needs PMIx 4.2(?).x  not 5
(which transates to pmix-master).

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-04-12 06:22:56 +02:00
Annop Wongwathanarat
575bd1c3f8 acfl: add version 23.04 (#36775) 2023-04-12 06:15:18 +02:00
Annop Wongwathanarat
6cfb9339ee armpl-gcc: add version 23.04 (#36776) 2023-04-12 06:13:57 +02:00
afzpatel
9ddfdec193 Enable rocm support and gtest variant for ucx (#36693) 2023-04-12 06:12:44 +02:00
Alec Scott
4ba49f3814 libxcursor: add v1.2.1 (#36777) 2023-04-12 06:10:42 +02:00
Alec Scott
b83ff386b8 libxmu: add v1.1.4 (#36778) 2023-04-12 06:09:07 +02:00
snehring
d5d8b81e21 py-drep: adding new version 3.4.2 (#36625) 2023-04-11 20:25:38 -05:00
Jonathon Anderson
8e12eef4e1 py-torch: Update conflicts for +/~tensorpipe (#36781)
* py-torch: Update conflicts for +/~tensorpipe

* [@spackbot] updating style on behalf of blue42u

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

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

* [@spackbot] updating style on behalf of blue42u

---------

Co-authored-by: blue42u <blue42u@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-11 20:24:42 -05:00
John W. Parent
f1c0775245 Perl package: fix 64-bit detection on Windows (#36785) 2023-04-11 19:08:15 -04:00
John W. Parent
530669346a Windows/MSVC: propagate all VCVARS changes to Spack env (#36582)
MSVC compilers rely on vcvars environment setup scripts to establish
build environement variables neccesary for all projects to build
successfully. Prior to this we were only piping LIB, INCLUDE, and PATH
change through.

Instead we need to propegate all changes to the env variables made by
VCVARs in order to establish robust support for the MSVC compiler.
This most significantly impacts projects that need to be build with
NMake and MSBuild
2023-04-11 19:04:34 -04:00
kwryankrattiger
68f50f9b11 Fides 1.2 (#36787)
* VTK-m: Add conflict for 64 bit ids and Ascent types

* Fides: Add version 1.2

* [@spackbot] updating style on behalf of kwryankrattiger
2023-04-11 18:44:10 -04:00
Michael Kuhn
9996812067 meson: add 1.1.0 (#36790) 2023-04-11 18:07:55 -04:00
Alec Scott
2bf8284659 go: add v1.20.3 and v1.19.8 (#36791) 2023-04-11 17:34:31 -04:00
markus-ferrell
3edb044706 Windows testing: reenable tests for "spack dependents" (#36786)
All the tests worked out of the box. This just removes the skip statements.
2023-04-11 14:30:40 -07:00
eugeneswalker
0e9b5a05e8 mgard: add 2023-03-31, 2023-01-10 (#36585) 2023-04-11 23:16:14 +02:00
Alec Scott
d75343031e xtrans: add v1.4.0 (#36779) 2023-04-11 23:12:05 +02:00
kwryankrattiger
6e659cc38b ParaView: Need VTKm for CUDA (#36620) 2023-04-11 15:41:23 -05:00
Wouter Deconinck
ae2dd867a1 Update package.py (#36722)
No changes to the package recipe required.

Changelog: https://gitlab.com/Pythia8/releases/-/compare/pythia8306...pythia8309
2023-04-11 08:37:54 -07:00
Juan Miguel Carceller
d7dc26aeb7 Limit version of intel-tbb (#36731)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2023-04-11 08:11:14 -07:00
Wouter Deconinck
ea04ad108f xrootd: new version 5.5.4 (#36721)
No changes to the build recipe required. Changelog at https://github.com/xrootd/xrootd/compare/v5.5.3...v5.5.4.

Built successfully on my test system:
```console
[+] /opt/software/linux-ubuntu23.04-skylake/gcc-12.2.0/xrootd-5.5.4-cgyz43ivwwqkc7bhdofnxhl2fusysg3m
```
2023-04-11 08:07:59 -07:00
Nisarg Patel
eecd2f984f Update opencoarray to v2.10.1 and fgsl to v1.5.0 (#36626) 2023-04-11 16:29:10 +02:00
Harmen Stoppels
1c3961bdd0 Remove a unit-test that monkey-patches os.stat (#36757)
"test_create_stage_root_bad_uid" started failing as pytest updated to v7.3.0
2023-04-11 14:02:35 +02:00
eugeneswalker
a88fdb216f ci: gpu-tests stack: swap x86_64-{cuda,rocm} for x86_64 (#36759) 2023-04-10 17:01:18 -07:00
Alec Scott
8feeb07d4f r-caretensemble: add v2.0.2 (#36742) 2023-04-10 17:39:28 -05:00
kwryankrattiger
b2310f9e64 Ci backwards compat (#36045)
* CI: Fixup docs for bootstrap.

* CI: Add compatibility shim

* Add an update method for CI

Update requires manually renaming section to `ci`. After
this patch, updating and using the deprecated `gitlab-ci` section
should be possible.

* Fix typos in generate warnings

* Fixup CI schema validation

* Add unit tests for legacy CI

* Add deprecated CI stack for continuous testing

* Allow updating gitlab-ci section directly with env update

* Make warning give good advice for updating gitlab-ci

* Fix typo in CI name

* Remove white space

* Remove unneeded component of deprected-ci
2023-04-10 16:46:45 -05:00
Alec Scott
2c7d7388da r-gsodr: add v3.1.8 (#36746) 2023-04-10 17:37:39 -04:00
Alec Scott
1f7b1f5ee1 r-conquer: add v1.3.3 (#36743) 2023-04-10 17:34:49 -04:00
Alec Scott
6054daf1e0 r-data-table: add v1.14.8 (#36744) 2023-04-10 17:34:28 -04:00
Alec Scott
15bbd0724d r-cachem: add v1.0.7 (#36741) 2023-04-10 17:34:06 -04:00
Alec Scott
5771500255 r-ff: add v4.0.9 (#36745) 2023-04-10 16:03:03 -05:00
Alec Scott
4d535ed50f r-blob: add v1.2.4 (#36740) 2023-04-10 15:50:03 -05:00
Alec Scott
219c49db04 r-intervals: add v0.15.3 (#36727) 2023-04-10 15:48:17 -05:00
snehring
4006ce28aa armadillo: add new version 12.2.0 (#36755) 2023-04-10 12:37:51 -07:00
Thomas Madlener
cb9ae0fa77 krb5, xrootd: Make usable with OpenSSL 3 (#36728) 2023-04-10 05:34:08 -04:00
Michael Kuhn
c35e59a6c4 zstd: add 1.5.5 (#36717) 2023-04-09 21:02:18 +02:00
Jonathon Anderson
c32aeea1a4 py-wheel: Add dependency on python+ctypes (#36716) 2023-04-09 10:59:05 -05:00
Adam J. Stewart
6de3786c36 cuDNN: LD_LIBRARY_PATH required (#36466) 2023-04-08 12:05:34 -05:00
SXS Bot
3869761216 spectre: add v2023.04.07 (#36704)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2023-04-07 21:17:22 -04:00
Vanessasaurus
04209599ef Automated deployment to update package flux-pmix 2023-04-07 (#36700)
* Automated deployment to update package flux-pmix 2023-04-07
* fix style

Signed-off-by: vsoch <vsoch@users.noreply.github.com>

---------

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2023-04-07 20:27:32 -04:00
Wouter Deconinck
9d05e65578 wayland: new version 1.22 (#36694)
No build system changes compared to the previous release, https://gitlab.freedesktop.org/wayland/wayland/-/compare/1.21.0...1.22.0
2023-04-07 16:58:15 -07:00
John W. Parent
9d7b79d8e1 Windows support: correct 64-bit check (#36578) 2023-04-07 16:50:54 -07:00
Wouter Deconinck
65ee864232 cppzmq: new versions 4.8.1, 4.9.0 (updated cmake dependency) (#36699)
* cppzmq: new versions 4.8.1, 4.9.0 (updated cmake dependency)
  No important changes in the build system,    https://github.com/zeromq/cppzmq/compare/v4.7.1...v4.9.0, other than the more recent cmake required starting with 4.8.0.
  There is also a patch version 4.8.0, but presumably 4.8.1 is preferred.
* cppzmq: add maintainer
2023-04-07 09:36:22 -07:00
Richard Berger
4703c3bcb8 lammps: add missing hipfft dependency (#36697) 2023-04-07 09:28:28 -07:00
Massimiliano Culpo
a7b2196eab Fix incorrect reformatting of spack.yaml (#36698)
* Extract a method to warn when the manifest is not up-to-date

* Extract methods to update the repository and ensure dir exists

* Simplify further the write method, add failing unit-test

* Fix the function computing YAML equivalence between two instances
2023-04-07 13:37:28 +02:00
kwryankrattiger
4ace1e660a Ecp hdf5 vol (#35195)
* ECP-SDK: enable hdf5 VOL adapters
- When +hdf5, enable VOL adapters suitable for the SDK.
- Each VOL package must prepend to the HDF5_PLUGIN_PATH.
- hdf5: 1.13.3 will break existing VOL packages, constrain
  VOLs related to SDK and add note to keep 1.13.2 available.
- hdf5-vol-async:
    - Do not set HDF5_VOL_CONNECTOR, consumers must opt-in.
    - Enforce DAG constraints on MPI to require threaded version.
    - Depend on an explicit version of argbots to relax
      concretization issues in other spack environments.
- paraview: fix compiler flag usage for the 110 ABI (followup to #33617).
* ECP Data and ViS: Add constraits for HDF5 VOLS
* CI: HDF5 1.14 builds without VisIt
* hdf5-vol-async: Update docs string

---------

Co-authored-by: Stephen McDowell <stephen.mcdowell@kitware.com>
2023-04-06 15:21:11 -07:00
SoniaScard
12eff8daad Packages/ophidia server (#36632)
* ophidia-server: new package at v1.7
* Merge
* Update package.py
  Fix style in package.py
* Fix maintainers syntax

---------

Co-authored-by: SoniaScard <SoniaScard@users.noreply.github.com>
2023-04-06 17:11:52 -04:00
Adam J. Stewart
017d66eb79 abseil-cpp: add v20230125.2 (#36636) 2023-04-06 13:29:42 -07:00
kwryankrattiger
9e11d0e489 ParaView: add latest release v5.11.1 (#36577)
* ParaView: add latest release v5.11.1

* ParaView: No longer need XDMF patch after 5.11.1
2023-04-06 11:18:42 -07:00
Miroslav Stoyanov
74ad92e16b manually add mpi home to testing (#36633) 2023-04-06 10:52:43 -07:00
Jonathon Anderson
3e2d03984e Fix py-torch build on Linux >=6.0.3 (#35983)
* Fix py-torch build on Linux >=6.0.3

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-06 13:48:05 -04:00
Adam J. Stewart
bd8dc1919b py-grpcio: add v1.52.0 (#36637) 2023-04-06 10:46:52 -07:00
Adam J. Stewart
6922e8f282 py-portpicker: add new package (#36638) 2023-04-06 10:39:15 -07:00
kwryankrattiger
a70f307f7e ParaView: Add variant for raytracing (#36640)
* ParaView: Add variant for raytracing

* [@spackbot] updating style on behalf of kwryankrattiger
2023-04-06 10:30:00 -07:00
Wouter Deconinck
c338d2fb02 root: depends_on vc@1.3.0: (open-ended) (#36663) 2023-04-06 09:51:20 -07:00
Vanessasaurus
b32edd3a72 Automated deployment to update package flux-core 2023-04-06 (#36676)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2023-04-06 12:47:51 -04:00
John W. Parent
44e15da92c Spack on Windows: spack.bat comment syntax (#36531)
Comments must start with `rem` in most cases.
2023-04-06 09:43:27 -07:00
Cameron Stanavige
685dd7272a veloc/scr component releases (#36672)
VeloC/SCR component releases needed for upcoming VeloC release.

* AXL v0.8.0
* ER  v0.4.0
* KVTree v1.4.0
* Rankstr v0.3.0
* Redset v0.3.0
* Shuffile v0.3.0
* Spath v0.3.0

Added some dependency compatibility restraints as the new componenet
versions have a change to how their cmake config works.
2023-04-06 09:27:32 -07:00
Massimiliano Culpo
0b9694575f spack install: fail if --log-file and not --log-format (#36684)
fixes #34551

"spack install" now fails if a user passed the --logfile option without specifying a log format.
2023-04-06 09:09:18 -07:00
Rocco Meli
6e490f2239 GNINA: add cuDNN variant and make RDKit optional (#36270)
* add cuDNN variant and make RDKit optional
* [@spackbot] updating style on behalf of RMeli
* add newer version of rdkit

---------

Co-authored-by: RMeli <RMeli@users.noreply.github.com>
2023-04-06 08:49:02 -07:00
Massimiliano Culpo
0ce548a850 singularity: deprecate all versions pre-fork, remove maintainer (#36654) 2023-04-06 11:31:10 +02:00
Alec Scott
d19475c3b4 crmc: add v2.0.1 (#36236)
Hint: The diff for this file is large because it initially had CRLF (DOS) eol style.
2023-04-06 06:12:56 +02:00
Andrey Perestoronin
3d1320c834 intel-oneapi-openvpl-2023.1.0 (#36668) 2023-04-05 17:48:12 -04:00
Andrey Perestoronin
bb735fb896 intel 2023.1.0 release fix versioning (#36665) 2023-04-05 16:58:11 -04:00
Jen Herting
767046f8da [py-mizani] added version 0.8.1 (#36500) 2023-04-05 16:57:56 -04:00
Axel Huebl
8f800aca72 openPMD-api: 0.15.1 Patch version.hpp (#36662)
Forgot to bump a version in the public header during release.
2023-04-05 16:28:24 -04:00
Jen Herting
65556eb53e New package: py-qiskit-ibm-provider and more (#36661)
* [py-singledispatchmethod] new package

* [py-singledispatchmethod] added missing dependency

* new package required for qiskit

* [py-rustworkx]

- removed redundant dependency on py-wheel
- added dependency on py-numpy

* [py-websocket-client] added version 1.5.1

* modified it is ahead of upstream

* [py-qiskit-terra]

- flake8
- removed duplicate dependencies
- fixed acceptable range for py-symengine

* [py-qiskit-terra] tweedledum no longer needed

* [py-qiskit-terra] depends on py-singledispatchmethod

* [py-qiskit-ibm-provider] new package

---------

Co-authored-by: Sid Pendelberry <sid@rit.edu>
2023-04-05 14:51:35 -04:00
Massimiliano Culpo
a080cf0193 archspec: add v0.2.0, deprecate old versions (#36653)
* archspec: add v0.2.0, deprecate old versions

* Simplify version ranges

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

* Remove py-setuptools

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-04-05 14:51:12 -04:00
Massimiliano Culpo
3e1c6b27a4 Update archspec to HEAD of develop (#36657) 2023-04-05 13:23:42 -04:00
Jen Herting
f28219cdda [py-backports-zoneinfo] New package (#36499)
* [py-backports-zoneinfo] New package

* [py-backports-zoneinfo] removed references to python 3.6
2023-04-05 12:05:20 -05:00
Daniel Ahlin
4206478f5e gromacs: add cufftmp variant to enable distributed PME when using CUDA (#36552)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-04-05 12:30:24 -04:00
Dan Bonachea
eebfb1cf07 UPC++/GASNet-EX 2023.3.0 update (#36629) 2023-04-05 13:55:17 +02:00
Mikael Simberg
8235e1f38a pika: Add version 0.14.0 (#36652)
* Rename PIKA_WITH_P2300_REFERENCE_IMPLEMENTATION CMake option in pika package

* Remove unnecessary use of self in pika package

* Use append instead of list += for single options in pika package

* Add pika 0.14.0
2023-04-05 13:18:48 +02:00
Massimiliano Culpo
a1703fa437 binutils: deprecate old version, build static on darwin (#36646)
The issue comes from libctf.
2023-04-05 09:20:09 +02:00
Massimiliano Culpo
4b3cc800ff minisign: add v0.11 (#36647) 2023-04-04 23:59:27 -04:00
Thomas-Ulrich
5cf7c60d74 add tandem package (#36546)
* add tandem package
* apply black
* fix import
* fix year of license
* add version 1.0 and associated compile fix
* change git to property
* add conflict to intel
2023-04-04 18:37:20 -07:00
SoniaScard
674c22f815 Packages/ophidia primitives (#36575)
* ophidia-primitives: new package at v1.7
* ophidia-primitives: Add mantainers
* ophidia-primitives: Fix style
* ophidia-primitives: update configure arguments
* Fix style in package.py
---------

Co-authored-by: SoniaScard <SoniaScard@users.noreply.github.com>
Co-authored-by: Donatello Elia <eldoo@users.noreply.github.com>
2023-04-04 18:30:22 -07:00
Luc Berger
5a4890cef8 Kokkos: add release 4.0.0 (#36532)
* Kokkos: add release 4.0.0
* Kokkos: updating default c++ standard requirement
  Now Kokkos requires c++17 as its new minimum c++ standard library.
* Kokkos: adding support for new GPU architectures
  The new updates include NVIDIA Hopper and AMD Navi
* Kokkos: fixing style...
* paraview +rocm: constrain kokkos dep to @:3.7.01

---------

Co-authored-by: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com>
Co-authored-by: eugeneswalker <eugenesunsetwalker@gmail.com>
2023-04-04 18:23:53 -07:00
afzpatel
66a9a9caa8 Enable tests for rocm packages - rocm-smi-lib, rocm-cmake and rocm-clang-ocl (#35299)
* initial commit for enabling test for rocm-smi-lib, rocm-cmake and rocm-clang-ocl
* fix styling and cleaning code
* disabling some tests for rocm-smi-lib
* fix style errors
2023-04-04 18:11:26 -07:00
Adam J. Stewart
c3a41c742e bazel: new versions, macOS patches (#36641) 2023-04-04 17:28:05 -04:00
Massimiliano Culpo
664c12c7be zig: add v0.10.1 (#36639) 2023-04-04 21:57:30 +02:00
John W. Parent
44306d3492 hdf5 package: fix wrapper handling on Windows(#36265)
* msmpi has no wrappers so don't set MPI_CXX_COMPILER etc. for that
  MPI implementation
* hdf5 on Windows does not have h5cc etc., so do not try to filter
  them on Windows
2023-04-04 11:40:30 -07:00
Howard Pritchard
354d498971 OpeMPI: make memchecker variant sticky (#36329)
related to #36255

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-04-04 14:23:07 -04:00
willdunklin
d2fd68071e sensei: fix ascent constraints (#36622) 2023-04-04 11:49:13 -05:00
eugeneswalker
1a2510d031 suite-sparse ^openblas~shared threads=openmp: add -fopenmp (#36521)
* suite-sparse ^openblas~shared threads=openmp: add -fopenmp to cflags, cxxflags

* use compiler.openmp_flag
2023-04-04 08:52:34 -07:00
Jonathon Anderson
78f5b2a2c6 Add workflow:rules:always to spack ci output (#36011) 2023-04-04 10:03:58 -05:00
Wouter Deconinck
d0cd340628 py-uproot, py-awkward, py-awkward-cpp: new versions (#36421)
* py-uproot: new versions 5.0.4, 5.0.5

No changed in dependency versions

* py-awkward-cpp: new versions

* py-awkward: new versions

* py-awkward: new version in 1.10.* series
2023-04-04 09:46:29 -05:00
Filippo Spiga
6a2f80e2c6 Adding NVIDIA HPC SDK 23.3 (#36624)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-04-04 14:55:26 +02:00
Valentin Volkl
ed0c6cd0f3 frontier-client: fix build with clang (#29590) 2023-04-04 08:23:32 -04:00
Jean Luca Bez
6aa4c29119 update h5bench VOL-ASYNC dependecy with fixes (#36514) 2023-04-04 10:39:17 +02:00
Harmen Stoppels
dc1399386c Make spack config update work on environments (#36542)
Previously `spack -e bla config update <section>` would treat the
environment config scope as standard config file instead of a single
file config scope. This fixes that.
2023-04-04 10:19:05 +02:00
Matthew Thompson
6fca0f8018 pfunit: fix error with BUILD_SHARED_LIBS (#36554) 2023-04-04 10:15:26 +02:00
Wouter Deconinck
88cc949841 libdrm: new version 2.4.115 (#35586)
https://gitlab.freedesktop.org/mesa/drm/-/compare/libdrm-2.4.114...libdrm-2.4.115 only bugfixes
2023-04-04 10:14:19 +02:00
Juan Miguel Carceller
c81d0a9e97 acts: add a dependency on git-lfs (#36517)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2023-04-04 10:13:11 +02:00
John W. Parent
e4794274d6 Add versions 3.24.4, 3.25.3 (#36001)
Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2023-04-04 10:11:21 +02:00
Harmen Stoppels
2b112dd02c llvm: add missing zstd dep (#36613) 2023-04-04 10:06:41 +02:00
Alex Richert
5da231969e esmf: add static netcdf-c support (#34579) 2023-04-04 10:01:21 +02:00
Valentin Volkl
c3b0806f6c lhapdfsets: fix an error by avoiding the lhapdf command (#35997)
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2023-04-04 09:56:10 +02:00
George Malerbo
77d55ebbd1 sdl2-ttf: add new package 2023-04-04 09:49:39 +02:00
Harmen Stoppels
e9a1d0a157 filter __spack_path_placeholder__ in generated module files after buildcache install (#36611)
* filter __spack_path_placeholder__ in generated module files after buildcache install

* fix windows
2023-04-04 09:45:43 +02:00
Weiqun Zhang
5560017ebe amrex: add v23.04 (#36596) 2023-04-04 09:41:48 +02:00
Adam J. Stewart
87da3a07bb PyTorch: fix ppc64le patching (#36621) 2023-04-04 09:27:23 +02:00
Daryl W. Grunau
712b30c9c5 eospac: expose version 6.5.6 (#36615)
Co-authored-by: Daryl W. Grunau <dwg@lanl.gov>
2023-04-03 23:31:14 -04:00
Andrey Perestoronin
dc194ec14c added new packages (#36608) 2023-04-03 23:30:51 -04:00
Daniel Ahlin
5c0004bbc1 gromacs: make package inherit from CudaPackage (#36551)
To conform to spack way of specifying cuda_arch. This commit does
not change version-specific gencode handling for older gromacs
versions
2023-04-03 23:10:47 -04:00
Adam J. Stewart
3d923fd5b8 py-pillow: add v9.5.0 (#36593) 2023-04-03 20:13:03 -05:00
Adam J. Stewart
a8c400bae0 py-pandas: add v2.0.0 (#36617) 2023-04-03 20:12:48 -05:00
Xavier Delaruelle
7a77ecbdb6 modules: remove default symlink on uninstall (#36454)
When app is uninstalled, if it matches a default, then remove the
default symlink targeting its modulefile.

Until now, when a default were uninstalled, the default symlink were
left pointing to a nonexistent modulefile.
2023-04-03 22:54:18 +02:00
Mikael Simberg
91636f0e9d Bump required CMake version for stdexec (#36605) 2023-04-03 16:04:14 -04:00
Massimiliano Culpo
f91968cf6f Improve Dockerfile recipe generation (#35187)
- Update default image to Ubuntu 22.04 (previously was still Ubuntu 18.04)
- Optionally use depfiles to install the environment within the container
- Allow extending Dockerfile Jinja2 template
- Allow extending Singularity definition file Jinja2 template
- Deprecate previous options to add extra instructions
2023-04-03 21:05:19 +02:00
Benjamin Meyers
3d149a7db2 New package py-pycorenlp (#36609) 2023-04-03 13:40:56 -05:00
Cory Bloor
cfea2d1010 hip: mathlibs inherit CudaPackage and ROCmPackage (#34586)
Unless the amdgpu_target is overriden, the libraries will default to
being built for cuda, since amdgpu_target=none is both default and in
conflict with +rocm. This requires a custom Disjoint set to include
both the 'auto' variant used by the rocm mathlibs and the 'none'
variant used by ROCmPackage.

* Fix search for hip+cuda in hipcub@5.1 and later

This patch is not strictly necessary, but it may fix the search for HIP
in certain environments.

* Backport fix for CUDA 11.5 to hipsparse
2023-04-03 20:28:24 +02:00
vijay kallesh
0860139c83 Updated homepage URL (#36519) 2023-04-03 11:21:13 -07:00
Vanessasaurus
182ef042ce Automated deployment to update package flux-sched 2023-04-01 (#36591)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2023-04-03 10:48:27 -07:00
Massimiliano Culpo
9d68100891 Rework error handling within the ASP logic program (#36536)
* Reduce effort on grounding by employing cardinality constraints

If we use a cardinality constraint instead of a rule
using pair of values, we'll end up grounding 1 rule
instead of all the possible pair combinations of the
allowed values.

* Display all errors from concretization, instead of just one

If clingo produces multiple "error" facts, we now print all
of them in the error message. Before we were printing just
the one with the least priority.

Consolidate a few common patterns in concretize.lp to ensure
that certain node attributes have one and only one value
assigned.

All errors are displayed, so use a single criterion
instead of three.

* Account for weights in concretize.lp

To recover the optimization order we had before, account
for weights of errors when minimizing.

The priority is mapped to powers of 10, so to effectively
get back the same results as with priorities.
2023-04-03 19:23:29 +02:00
Axel Huebl
ebffc53b93 openPMD-api: 0.15.1 (#36604)
Latest patch release, fixing build issues.
2023-04-03 16:39:34 +02:00
Robert Cohn
4c3edac454 namd: add oneapi support (#36139) 2023-04-03 16:39:09 +02:00
Matin Raayai
5e33f6bbc5 External Detection for llvm-amdgpu (#36595)
* Added external detection of llvm-amdgpu.

* Style cleaning for llvm-amdgpu.
2023-04-03 14:51:58 +02:00
Harmen Stoppels
a19f13f57a zstd: fix makefile build, default to makefile (#36606) 2023-04-03 14:50:38 +02:00
Harmen Stoppels
93cad90413 openblas: use "all" target since it's marked sequential (#35905)
openblas likes to concurrently writes to the same archive from different
targets, and solves that through .NOTPARALLEL: all

We run `make x y z` which is not affected by `NOTPARALLEL`, running into
races.
2023-04-03 11:45:38 +02:00
Xavier Delaruelle
7e4927b892 modules: correctly detect explicit installation (#36533)
When generating modulefile, correctly detect software installation asked
by user as explicit installation.

Explicit installation status were previously fetched from database
record of spec, which was only set after modulefile generation.

Code is updated to pass down the explicit status of software
installation to the object that generates modulefiles.

Fixes #34730.
Fixes #12105.

A value for the explicit argument has to be set when creating a new
installation, but for operations on existing installation, this value is
retrieved from database. Such operations are: module rm, module refresh,
module setdefaults or when get_module function is used.

Update on the way tests that mimics an installation, thus explicit
argument has to be set under such situation.
2023-04-03 11:19:18 +02:00
Harmen Stoppels
88548ba76f binutils 2.40: add missing zstd dep (#36598) 2023-04-03 06:41:38 +02:00
Laura Weber
2117e37a0b sublime-text: Fix the dependencies of the recent update (#36562) 2023-04-02 19:53:54 +02:00
Tristan Carel
ac62817ba0 petsc: simplify dependencies with hypre (#36573)
* petsc: simplify dependencies with hypre

* add propagation of `complex` variant to hypre
2023-04-02 10:00:10 -05:00
Harmen Stoppels
08cf82b977 papyrus: disable tests (#36599) 2023-04-02 13:34:25 +02:00
Leonard-Anderson-NNL
4242989f22 New package: py-mike and dependency. (#36587)
Co-authored-by: Cloud User <leonardanderson@leonardander004.hzterscemazurawp3xenxzahla.bx.internal.cloudapp.net>
2023-04-01 21:53:48 -05:00
Juan Miguel Carceller
b524351e10 root: vc variant: root accepts only vc version 1.3.0 (#36594)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2023-04-01 21:47:34 +02:00
Alex Richert
b9bde03df5 yafyaml: Add fismahigh variant to comply with FISMA standards (#36471) 2023-04-01 21:12:00 +02:00
Satish Balay
5c3bc36fde petsc,py-petsc4py,slepc,py-slepc4py: add version 3.19.0 (#36588) 2023-04-01 12:40:19 -05:00
John W. Parent
2a2c9cdf02 CMake: add version 3.26.2 (#36567) 2023-04-01 15:21:13 +02:00
Bernhard Kaindl
8b98564840 libxpm: Fix linking with libintl (#36568)
Original Author of this change: Chris Green <greenc@fnal.gov>

Two changes:
- Remove adding the library path using -L: It is obsolete now
  that we have the library paths in before the system paths.
- Link with -linto only if the gettext recipe provides it:
  When we are on a glibc system, we can use external gettext,
  which means we use the libintl inside libc.so: no -lintl then.

This change was already submitted in #35450 and reviewed but is
stuck in this big PR which is trying to do too in a single PR.
2023-04-01 15:11:14 +02:00
John W. Parent
d79c8179fc Perl package: change attr to method (#36580)
This fixes a bug in the Windows build of Perl.

An attribute defined in package class is inaccessible from the install
method due to builder: refactor it to be a method.
2023-03-31 21:57:55 -04:00
John W. Parent
1175831203 netcdf-c package: fix patch applied on Windows (#36581) 2023-03-31 20:52:36 -04:00
Rocco Meli
210b2e8caa MDAnalysis 2.4.3 (#36541)
* mda 2.4.3

* black

* mda update and reshuffle

* add tidynamics
2023-03-31 18:47:56 +00:00
John W. Parent
a8e2961010 Allow configurable stage names (#36509)
Add `config:stage_name` which is a Spec format string that can
customize the names of stages created by Spack. This was primarily
created to allow generating shorter stage names on Windows (along
with `config:build_stage`, this can be used to create stages with
short absolute paths).

By default, this is not set and the prior name stage format is used.

This also removes the username component that is always added to
Stage paths on Windows (if users want to include this, they can
add it to the `build_stage`).
2023-03-31 11:46:47 -07:00
Alec Scott
a6a364d3b8 py-aioitertools: add v0.11.0 (#36540)
* py-aioitertools: add v0.11.0

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

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

* Update package.py

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-31 14:16:12 -04:00
Harmen Stoppels
46bbce1922 compiler wrapper: fix -Xlinker parsing (#35929)
* compiler wrapper: fix -Xlinker parsing
* handle the case of -rpath without value; avoid that we drop the flag
* also handle the -Xlinker -rpath -Xlinker without further args case...
* fix test
* get rid of global $rp var, reduce branching
2023-03-31 09:47:24 -07:00
Satish Balay
14465e61ae petsc: builds break with gnu-make-4.4.1 (#35906)
Use 'make' detected by spack within petsc build
2023-03-31 09:28:48 -07:00
kwryankrattiger
4064191fbc Ascent: Drop VTK-h dependency for 0.9 (#36458)
* Ascent: Drop VTK-h dependency for 0.9

* Ascent: Remove duplicate OpenMP constraints

* Ascent: 0.9.0 cannot build with vtk-m@2

* Ascent: Only needs vtkm when using vtkh

* Ascent: Require fides when building with ADIOS2
2023-03-31 11:24:45 -05:00
renjithravindrankannath
7bb64b526f rocsparse: exclude v5.4 from being patched (#36571) 2023-03-31 18:14:04 +02:00
Cameron Rutherford
4f42092f4f hiop: add v0.7.2 (#36570) 2023-03-31 11:33:26 -04:00
Tristan Carel
3b5b9e8474 steps: add variants gmsh and kokkos (#36543) 2023-03-31 11:27:58 -04:00
Paul Romano
aabd76cb74 OpenMC: add v0.13.3 (#36564)
* OpenMC: add v0.13.3

* Add missing version in list for py-openmc
2023-03-31 11:18:26 -04:00
H. Joe Lee
fbde853360 hdf5: add a map variant (#35523)
* hdf5: add map variant
* hdf5: add mininum version for map variant
* hdf5: fix black error
2023-03-31 10:48:08 -04:00
Benjamin Meyers
951f691d1b New: py-dalib, py-qdldl, py-qpsolvers; Update: py-ecos, py-scs, py-osqp (#36549)
* New: py-dalib, py-qdldl, py-qpsolvers; Update: py-ecos, py-scs, py-osqp

* [@spackbot] updating style on behalf of meyersbs

* Update py-qpsolvers homepage

* Add when clause to py-future
2023-03-31 09:34:02 -05:00
Benjamin Meyers
27978fd355 New package py-json2html (#36111)
* New package py-json2html

* Remove deprecated python deps
2023-03-31 09:32:31 -05:00
John W. Parent
349b5d982b Add latet CMake release (#36119) 2023-03-31 08:28:49 -04:00
Ashwin Kumar Karnad
c2c56c1ca1 octopus: Add sparskit variant (#36494)
Co-authored-by: Hans Fangohr <fangohr@users.noreply.github.com>
Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2023-03-31 08:18:53 -04:00
Weston Ortiz
7e06b5bc88 goma: add additional versions up to 7.4.3 (#36561) 2023-03-31 06:49:12 -04:00
Miroslav Stoyanov
17cec3b101 Deprecate old tasmanian (#36534)
* deprecated old versions and deps
* syntax fix

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-03-31 06:48:48 -04:00
Harmen Stoppels
b0e7b8c794 typehint a few globals (#36544) 2023-03-31 08:32:56 +02:00
Alec Scott
98ac3acc92 py-aiobotocore: add v2.5.0 (#36538)
* py-aiobotocore: add v2.5.0

* Fix dependencies for v2.5.0

* Add py-botocore@1.29.76
2023-03-30 20:52:37 -05:00
Benjamin Meyers
7d66c3b5d1 New package py-coclust (#36548)
* New package py-coclust

* [@spackbot] updating style on behalf of meyersbs
2023-03-30 20:41:15 -05:00
Benjamin Meyers
ae9a65ae56 New package py-soyclustering (#36550)
* New package py-soyclustering

* [@spackbot] updating style on behalf of meyersbs
2023-03-30 20:33:33 -05:00
Michael Kuhn
996442ea9b py-h5py: add 3.8.0 (#35960) 2023-03-30 20:20:55 -05:00
marcosmazz
bd20b7b8b7 QE v7.1 add post-processing tools installation (#36484)
* QE v7.1 add post-processing tools installation

Quantum-Espersso@7.1 ships with an incoplete CMakeLists.txt that prevents the installation of post-processing tools.
Added patches, is fixed in two different commits in upstream.

* fixed style

* removed spaces

* added MR references
2023-03-30 16:28:14 -07:00
Scott Wittenburg
08426ec492 gitlab ci: request more memory for publish job (#36560) 2023-03-31 00:19:59 +02:00
Adam J. Stewart
f863859bde py-lightning: add v2.0.1 (#36565) 2023-03-30 17:57:31 -04:00
Ashwin Kumar Karnad
07559d778e octopus: Add berkeleygw variant (#36495)
* octopus: Add berkeleygw variant
* octopus: style fix
2023-03-30 14:57:05 -07:00
Edoardo Aprà
33833a4f32 nwche: add v7.2.0 (#36193)
* removed env variables now default. added spec fftw3. removed obsolete version 7.0.0

* tweak NWCHEM_MODULES based on version
2023-03-30 22:15:56 +02:00
Adam J. Stewart
e544bb6271 py-scipy: py-pythan is only a build dep (#36528) 2023-03-30 16:13:17 -04:00
Massimiliano Culpo
e1a104e3a2 Add type-hints to spack.bootstrap (#36491) 2023-03-30 22:12:18 +02:00
Alex Richert
f5624f096c perl: add patching to allow building with intel@19.1.3 (#35666) 2023-03-30 13:07:33 -04:00
Cyrus Harrison
d82fc158ca add conduit 0.8.7 release (#36357) 2023-03-30 12:40:35 -04:00
Ashwin Kumar Karnad
709c5c4844 octopus: add etsf-io variant (#36490) 2023-03-30 18:15:04 +02:00
Ashwin Kumar Karnad
e356390575 octopus: Add NFFT variant (#36489) 2023-03-30 18:04:29 +02:00
Ashwin Kumar Karnad
906a8c56af octopus+cgal: requires boost: add --with-boost=spec["boost"].prefix (#36472) 2023-03-30 17:37:11 +02:00
Adam J. Stewart
6c5d3299fe Feature Request template: remove spack version requirement (#36503) 2023-03-30 16:39:36 +02:00
Richard Berger
fefa4b8cc4 r3d: add pic variant (#36476) 2023-03-30 16:37:35 +02:00
Erik Heeren
2ca471745c easyloggingpp: new package (#36487) 2023-03-30 16:35:33 +02:00
Alec Scott
3756d5761b poke: add v3.0 (#36479) 2023-03-30 16:32:05 +02:00
Nathalie Furmento
0c05f2bc21 Add StarPU latest release 1.4.0 (#36518)
* starpu: add v1.4.0
2023-03-30 09:59:00 -04:00
Harmen Stoppels
054cbe84de python: sequential make install :( (#35557) 2023-03-30 07:16:11 -04:00
Eric Brugger
a185343493 VisIt: Update to VisIt 3.3.2. (#36510) 2023-03-30 03:34:20 -04:00
Massimiliano Culpo
16404034dc Fix a couple of minor bugs with ASP weights (#36522)
Reorder versions so that deprecated ones are last. 

Account for default not used when the variant exists.
2023-03-30 01:08:57 -04:00
Sergey Kosukhin
516a023173 py-findlibs: add patch to support paths under lib64 (#36524) 2023-03-30 01:04:15 -04:00
Jack Morrison
f8064cd744 * Add new linux-headers version 6.2.8. (#36474)
* Add new libfabric versions 1.17.1, 1.17.0, 1.16.0, 1.15.2.
* Add libfabric dependency on numactl and linux-headers when building
  with OPX provider support.
* Set libfabric flag_handler to pass compiler flags as arguments to
  configure.
2023-03-29 21:34:33 -05:00
Adam J. Stewart
781c87840d py-kornia: add v0.6.11 (#36512) 2023-03-29 14:33:23 -05:00
Adam J. Stewart
b9a3254b66 py-black: add v23.3.0 (#36513) 2023-03-29 14:33:08 -05:00
Adam J. Stewart
20d2e6a9fd py-pyproj: add v3.5.0 (#36504)
* py-pyproj: add v3.5.0
* PROJ: add v9, fix datum grid installation
* [@spackbot] updating style on behalf of adamjstewart

---------

Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2023-03-29 12:30:39 -07:00
snehring
b6390e335c gmap-gsnap: Adding new version and perl run dep (#36508) 2023-03-29 12:28:17 -07:00
Ivan Maidanski
3e09f04241 libatomic_ops: add v7.8.0 (#36515) 2023-03-29 12:23:16 -07:00
Harmen Stoppels
67c4ada08b py-cython: set upperbound for backported patch (#36525) 2023-03-29 12:43:40 -04:00
Adam J. Stewart
701e46464d Python: add Apple Clang version conflicts (#36511)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-03-29 10:49:10 -04:00
Harmen Stoppels
dba57ff113 ci: require x86_64_v3 everywhere (#36158) 2023-03-29 15:58:48 +02:00
Massimiliano Culpo
7579eaf75a Fix dyninst build with old boost (#36198)
Fix patching old boost versions to account for builders.

Add a proper version constraint on boost for recent dyninst.
The constraint can be found in dyninst source code under
"cmake/Boost.cmake" which contains:

  set(_boost_min_version 1.70.0)

Co-authored-by: Greg Becker <becker33@llnl.gov>
2023-03-29 15:26:51 +02:00
julian-zeidler
aa99063065 charliecloud: add squashfuse variant, add v0.32, v0.31 (#36404) 2023-03-29 01:33:05 -04:00
John W. Parent
18c21d0c32 Add CMake version 3.26.1 (#36349) 2023-03-28 21:03:39 -04:00
John W. Parent
6b03c9f285 Windows: spack.bat CLI handling robustness (#36281)
* Current develop spack.bat file cannot handle any reserved characters
  being passed via the CLI, particularly '=' and '?'. To address this,
  re-do the CLI parsing for loop to use custom logic to allow for more
  granular handling of CLI args.
* We take a less-than-ideal approach to escaping local scope and
  handling unset variables as well as the actual parsing of CL
  arguments. To address this, don't quote the args and then try to
  parse the quotes we just added (resulting in spack flags being
  undefined). Instead, leverage batch script features. Since we are
  not unnecessarily quoting things, we don't need to think about
  removing them, and in the case of paths with spaces, we should _not_
  be removing the quotes as we currently do.
2023-03-28 16:50:37 -07:00
John W. Parent
7ffe2fadfe WGL package: correct libs/headers detection (#35113)
Corrects libs detection with a more specific root, otherwise there
can be inconsistencies between version of WGL requested and the
version picked up by `find_libraries`.

Corrects headers detection - win-sdk, win-wdk, and WGL headers all
exist under the same directory, so we can compute the headers for WGL
without querying the spec for win-sdk (which causes errors).

This commit also removes the `plat` variant of `wgl`, which is
redundant with the Spec's target.
2023-03-28 16:31:10 -07:00
Ashwin Kumar Karnad
a3a9b48ed7 octopus: Add pnfft variant (#36492) 2023-03-28 13:50:36 -07:00
Laura Weber
e0fb737e8e SublimeText: add Sublime Text 4, build 4143 (#36480)
* Add Sublime Text 4, build 4143
* Reformatted with black
* Manual formatting adjustments.
2023-03-28 13:49:27 -07:00
Alec Scott
5e70943d1b perl-extutils-makemaker: add v7.70 (#36478) 2023-03-28 13:43:20 -07:00
Alec Scott
a48abfee75 at-spi2-core: add v2.48.0 (#36477) 2023-03-28 13:37:58 -07:00
Erik Heeren
af86759116 glm: add version 0.9.9.3 (#36486) 2023-03-28 13:34:21 -07:00
Erik Schnetter
6a868ec9c5 snappy: New version 1.1.10 (#36473) 2023-03-28 13:09:17 -07:00
Ryan Marcellino
c6ab42a86a xdotool: add version 3.20211022.1 (#36505) 2023-03-28 12:56:13 -07:00
Ryan Marcellino
a771bfadd1 py-pyautogui: add v0.9.53 (#36498) 2023-03-28 13:50:29 -05:00
Todd Gamblin
d76a8b7de7 retry: bugfix: package requirements with git commits (#35057) (#36347)
- [x] Specs that define 'new' versions in the require: section need to generate associated facts to indicate that those versions are valid.
- [x] add test to verify success with unknown versions.
- [x] remove unneeded check that was leading to extra complexity and test
      failures (at this point, all `hash=version` does not require listing out that version
      in `packages.yaml`)
- [x] unique index for origin (dont reuse 0)

Co-authored-by: Peter Josef Scheibel <scheibel1@llnl.gov>
2023-03-28 11:18:54 -07:00
MatthewLieber
9a93f223d6 mvapich: add pmi_version variant, add process_manager=none (#36324)
Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2023-03-28 19:46:42 +02:00
Howard Pritchard
b8735fd1e4 PMIX: add current 4.2.x releases (#36496)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-03-28 10:13:26 -07:00
Erik Schnetter
eb80f4d9af simulationio: New version 9.0.3 (#36465)
* simulationio: New version 9.0.3
* simulationio: Require swig @3
2023-03-28 10:09:13 -07:00
Gerhard Theurich
9160e78729 Add ESMF v8.4.1, and number of other changes to improve ESMF integration with Spack (#35980)
* Add v8.4.1, and a few other changes.
    Minor adjustments for better alignment between Spack and ESMF native
    build. For ESMF >= 8.3.1 now Spack defaults to using
    external-parallelio. Before use internal version, which was PIO-1 all
    the way up to v8.3.0b10 anyway! Xerces is disabled by default.
* Deal with two long lines flagged by prechecks/style.
* Try to satisfy prechecks/style.
* Try to satisfy flake8 rules wrt indentation of continuation lines.
* Now trying to satisfy "black reformatting".
* For "black" formatting really put that ugly comma at the end before
closing parentheses. Interesting.
* Support building against external-parallelio even w/o mpi, but select the
   external-parallelio dependency accordingly.
* Correct C compiler setting.
* Handle `pnetcdf` variant consistent with how `ParallelIO` does it. And
  also pass the `pnetcdf` variant down to the `external-parallelio`
  dependency if set.
* Long line formatting again.
* Simplify handling of tarball URL construction and update sha256
  checksums.
* Align version check with recommended self.spec.satisfies().
* Deprecate v8.4.0 which has a bug that can cause memory corruption, fixed
  in v8.4.1.
* Use double quotes vs single quotes as per style-check... although
  https://spack-tutorial.readthedocs.io/en/latest/tutorial_packaging.html#querying-spec-versions
  clearly shows it with single quotes.
2023-03-28 09:33:49 -07:00
Eric Brugger
0d829b632f VisIt: Update to VisIt 3.3.1. (#36464) 2023-03-28 10:08:03 -04:00
eugeneswalker
c88b30b426 e4s power ci: ecp-data-vis-sdk: disable visit due to build issues (#36475) 2023-03-28 06:02:47 -04:00
Harmen Stoppels
d862edcce0 macos: set new ad-hoc signature with codesign after binary string replacement (#35585) 2023-03-28 00:33:35 -04:00
Erik Heeren
3b497359b7 ISPC: unblock 1.17-1.19 (#36346)
* ispc: attempts at getting more recent versions to work
* ispc: more attempts to get newer versions to build
* ispc: cleanup
* llvm: remove ispc_patches variant again
* ispc: unpin ncurses
* ispc: satisfy style checks
* ispc: 1.19 is only compatible with LLVM 13-15 
  otherwise it would not build against develop, as this now has LLVM 16
* ispc: relax LLVM version to what ispc requires itself
  verified that it builds against LLVM 13, 14, 15, but not 12 and 16
* ispc: use spec.satisfies instead of version comparison
  according to suggestions from review and docs, this is the canonical way to do it
* ispc: checksum 1.18.1
  just in order to include all versions, also checked that it builds

---------

Co-authored-by: Martin Aumüller <aumuell@reserv.at>
2023-03-27 11:30:36 -07:00
G-Ragghianti
4c599980da Package heffte: Enable smoke test to find MPI launcher (#35724)
* Enable smoke test to find MPI launcher
* Adding self as maintainer
* Style fix
* Update var/spack/repos/builtin/packages/heffte/package.py

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-03-27 11:26:56 -07:00
Ashwin Kumar Karnad
7266cc9b92 octopus: Update compiler flags (#36446)
* octopus: set the right compiler flags
  https://github.com/fangohr/octopus-in-spack/pull/70
* octopus: fix pep8 style issue
2023-03-27 11:13:28 -07:00
Annop Wongwathanarat
cc4a528274 sw4lite: add linking with libarmflang (#36461) 2023-03-27 11:08:53 -07:00
Shihab Shahriar Khan
efbfe38f63 arborx: make explicit the need to specify cuda_arch when +cuda (#36450) 2023-03-27 10:49:17 -07:00
Harmen Stoppels
5072e48dab Add llnl.util.filesystem.find_first (#36083)
Add a `find_first` method that locates one instance of a file
that matches a specified pattern by recursively searching a directory
tree. Unlike other `find` methods, this only locates one file at most,
so can use optimizations that avoid searching the entire tree:
Typically the relevant files are at low depth, so it makes sense to
locate files through iterative deepening and early exit.
2023-03-27 09:42:16 -07:00
Satish Balay
c5b3fc6929 py-mpi4py: always force rebuild cython sources (#36460) 2023-03-27 10:05:31 -05:00
kaanolgu
deca4ce107 Babelstream Spack Package (#36164) 2023-03-27 17:04:28 +02:00
Jose E. Roman
e612436e26 New patch release SLEPc 3.18.3 (#36401)
Thanks-To: Satish Balay
2023-03-27 09:47:18 -05:00
Wouter Deconinck
fd19759783 xrootd: update patch (#36350)
Due to case change, a patch in xrootd doesn't apply cleanly. This fixes the patch by turning it into a `filter_file` with a more limited regex match.
2023-03-27 11:36:24 +02:00
Paul R. C. Kent
3265215f1d py-pyscf: add v2.2.0,2.1.1,2.1.0 libcint: add v5.2.0 (#35497)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-27 11:34:17 +02:00
Auriane R
428e5726c1 Rename p2300 variant with stdexec (#36322) 2023-03-27 11:24:25 +02:00
dependabot[bot]
e0570c819c build(deps): bump actions/checkout from 3.4.0 to 3.5.0 (#36418)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...8f4b7f8486)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2023-03-27 09:16:07 +00:00
Xavier Delaruelle
ea60220a84 modules: enhance help message (#36410)
Update tcl and lmod modulefile template to provide more information on
help message (name, version and target) like done on whatis for lmod
modulefiles.
2023-03-27 10:48:25 +02:00
Dennis Klein
84d67190a6 fairlogger: new versions, deprecations and various other updates (#36405) 2023-03-27 10:46:15 +02:00
Alec Scott
80a34ae9cc perl-moose: add v2.2203 (#36368) 2023-03-27 10:42:39 +02:00
Tamara Dahlgren
7beb57cb05 Bugfix: add perl-data-optlist 0.113 dependency (#36411) 2023-03-27 10:42:15 +02:00
Wouter Deconinck
055c30acfb root: new version 6.28.02 (#36419)
Only bugfixes: https://root.cern/doc/v628/release-notes.html#release-6.2802.

Builds fine on my test system:
```
[+] /opt/software/linux-ubuntu23.04-skylake/gcc-12.2.0/root-6.28.02-zwzhoz6d4323lggrqi66y6prg4hlzwie
```
2023-03-27 10:34:00 +02:00
Alec Scott
3cd61b9b83 libslirp: add v4.7.0 (#36423) 2023-03-27 10:33:25 +02:00
Alec Scott
6e8f449882 perl-exporter-tiny: add v1.006001 (#36424) 2023-03-27 10:33:07 +02:00
Alec Scott
51b0023638 perl-params-validate: add v1.31 (#36425) 2023-03-27 10:32:51 +02:00
Alec Scott
f02c374181 perl-time-hires: add v1.9758 (#36426) 2023-03-27 10:32:36 +02:00
Alec Scott
ff3245382e perl-time-piece: add v1.3401 (#36427) 2023-03-27 10:32:20 +02:00
Wouter Deconinck
ebc492f1e8 Xorg docs: new versions (#36455) 2023-03-27 04:22:34 -04:00
Alec Scott
5b8f005962 perl-try-tiny: add v0.31 (#36428) 2023-03-27 10:05:54 +02:00
Alec Scott
b11febbbc9 perl-uri: add v5.08 (#36429) 2023-03-27 10:05:35 +02:00
Alec Scott
5837d4c587 perl-xml-parser-lite: add v0.722 (#36430) 2023-03-27 10:04:15 +02:00
Alec Scott
e5ea7b6e32 perl-xml-parser: add v2.46 (#36431) 2023-03-27 10:04:00 +02:00
Alec Scott
c69a1af5c7 perl-xml-simple: add v2.25 (#36432) 2023-03-27 10:03:44 +02:00
Alec Scott
b40f9f72ed perl-xml-writer: add v0.900 (#36433) 2023-03-27 10:03:30 +02:00
Alec Scott
ab3fd38eda perl-yaml-libyaml: add v0.84 (#36434) 2023-03-27 10:03:10 +02:00
Alec Scott
5b9b8902ac perl-yaml-tiny: add v1.74 (#36435) 2023-03-27 10:02:52 +02:00
Alec Scott
8671f32b14 perl-yaml: add v1.30 (#36436) 2023-03-27 10:02:33 +02:00
Alec Scott
24f41ad050 postgresql: add v15.2 (#36438) 2023-03-27 10:02:17 +02:00
Alec Scott
732153c9e2 pstreams: add v1.0.3 (#36440) 2023-03-27 09:57:26 +02:00
Adam J. Stewart
227d19ef02 py-pytest-cov: add v4.0.0 (#36447) 2023-03-27 09:56:50 +02:00
Alec Scott
7600422183 presentproto: add v1.1 (#36439) 2023-03-27 09:51:52 +02:00
Wouter Deconinck
c2b4f5bf45 libpthread-stubs: adapt to XorgPackage (#36453)
This resolves a loose end from #36241 (missed due to package name). `libpthread-stubs` is another package from the xcb project that is now tracked through https://gitlab.freedesktop.org/xorg/ instead. No new versions; no changed hashes.
2023-03-27 09:48:55 +02:00
Satish Balay
56d98c3f0a petsc, py-petsc4py: add v3.18.4, v3.18.5 (#36406)
* py-petsc4py: update ldshared-dev.patch [to work with current @main]

* petsc4py: always force rebuild cython sources
2023-03-27 09:44:43 +02:00
Axel Huebl
37fadd9b2f openPMD-api: 0.15.0 (#36452) 2023-03-27 09:42:09 +02:00
AMD Toolchain Support
72318ba364 LAMMPS: Add Intel Package Support for AOCC 4.0 (#36155)
Add AOCC support for LAMMPS INTEL Package

Co-authored-by: Tooley, Phil <phil.tooley@amd.com>
Co-authored-by: usivakum <Umashankar.Sivakumar@amd.com>
2023-03-27 09:23:03 +02:00
Wouter Deconinck
32416eedd8 lhapdf: new version 6.5.4 (#36451) 2023-03-27 09:14:50 +02:00
Wouter Deconinck
417a5e4c3e sherpa: new bugfix version 2.2.15 (#36420)
Minor bugfix only, https://gitlab.com/sherpa-team/sherpa/-/compare/v2.2.14...v2.2.15
2023-03-27 09:14:23 +02:00
Wouter Deconinck
85f1eb4534 py-versioneer: new versions, depends_on py-tomli (#36415) 2023-03-26 08:55:24 -05:00
Alec Scott
39100c5336 gobject-introspection: add v1.72.1 (#36422) 2023-03-26 13:02:42 +02:00
Wouter Deconinck
9f59d4f199 py-build: new versions 0.10.0 (-> flit) (#36416)
* py-build: new versions 0.10.0 (-> flit)

py-build switched to flit with 0.10, https://github.com/pypa/build/blob/0.10.0/pyproject.toml

```
==> py-build: Successfully installed py-build-0.10.0-twgngkplyegllaovlp45r76nsk7bqezw
```

* py-pyproject-hooks: new package 1.0.0

* py-build: depends_on py-pyproject-hooks

* py-pyproject-hooks: use pypi url and hash

* py-build: replace patch with filter_file

* py-build: remove patch in favor of filter_file
2023-03-25 21:49:24 -05:00
Wouter Deconinck
334f704d36 py-iniconfig: new version 2.0.0 (-> hatchling) (#36413)
* py-iniconfig: new version 2.0.0 (-> hatchling)

py-iniconfig switched to hatchling with v2.0.0:
https://github.com/pytest-dev/iniconfig/blob/v2.0.0/pyproject.toml

```
==> py-iniconfig: Successfully installed py-iniconfig-2.0.0-ttoip2aalmxqqybv3vnozcabk47vg2yn
```

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-25 16:19:08 -05:00
Alec Scott
eb7b18e827 py-agate-dbf: add v0.2.2 (#36445) 2023-03-25 16:17:34 -05:00
Alec Scott
9a4b710f4e py-advancedhtmlparser: add v9.0.1 (#36444) 2023-03-25 16:16:51 -05:00
Alec Scott
d7a75b4fae py-absl-py: add v1.4.0 (#36443) 2023-03-25 16:15:52 -05:00
Alec Scott
c20feda19c py-about-time: add v4.2.1 (#36442) 2023-03-25 16:15:00 -05:00
Alec Scott
e2a170f8a2 py-a2wsgi: add v1.7.0 (#36441) 2023-03-25 13:37:45 -05:00
Wouter Deconinck
6777f2d9e9 py-pathspec: new versions through 0.11.1 (-> flit) (#36414)
py-pathspec changed from setuptools to using flit as the build system:
https://github.com/cpburnz/python-pathspec/blob/v0.11.1/pyproject.toml

```
==> py-pathspec: Successfully installed py-pathspec-0.11.1-5jxzfunl4o7ubzpwq5442diobkg7t5fl
```
2023-03-25 11:31:47 -05:00
Eric Brugger
a7175979cd Silo: Add conflict for silo 4.11 and gcc 11.1. (#36335) 2023-03-25 11:50:59 +01:00
Xavier Delaruelle
c4923fe3b3 modules: add support for append_flags/remove_flags (#36402)
Adapt tcl and lmod modulefile templates to generate append-path or
remove-path commands in modulefile when respectively append_flags or
remove_flags commands are defined in package for run environment.

Fixes #10299.
2023-03-24 15:38:24 -04:00
Dennis Klein
ae504ce2fe fairmq: add new package (#36400) 2023-03-24 15:33:23 -04:00
Arnur Nigmetov
e4edcf6104 henson: simplify args logic with define_from_variant (#36398)
Co-authored-by: Arnur Nigmetov <nigmetov@tugraz.at>
2023-03-24 15:28:20 -04:00
AMD Toolchain Support
693eea499c Changes to AOCC spack recipe to use new compiler download URLs (#36353) 2023-03-24 12:24:29 -07:00
John W. Parent
a451f55340 Expat package: add CMake-build option (#35109)
* Add option to optionally build with CMake
* Autotools is preferred where available
* Unlike the autotools-based build, the CMake-based build creates
  either static or shared libs, not both (the default is shared
  and is controlled with a new "shared" variant that only exists
  when building with cmake)
* Note that `cmake~ownlibs` depends on expat, so would require
  `expat build_system=autotools` (to avoid a cyclic dependency)
2023-03-24 11:10:46 -07:00
Jim Edwards
15f7b72557 gfortran version fix (#36351)
* gfortran version fix
* modified approach to get gfortran version
* add checksum for v8.4.1
2023-03-24 10:47:44 -07:00
Alec Scott
6bf33b2b7f perl-module-corelist: add v5.20230320 (#36366)
* perl-module-corelist: add v5.20230320
* [@spackbot] updating style on behalf of alecbcs

---------

Co-authored-by: alecbcs <alecbcs@users.noreply.github.com>
2023-03-24 10:23:57 -07:00
Alec Scott
dac62c8cf8 perl-module-build: add v0.4232 (#36365) 2023-03-24 10:21:17 -07:00
Adam J. Stewart
30b8b0e6f5 py-timmm: add v0.6.13 (#36377) 2023-03-24 13:19:27 -04:00
Alec Scott
8741d2a7ed perl-moo: add v2.005005 (#36367) 2023-03-24 10:00:36 -07:00
Alec Scott
4ec1d860fc perl-mro-compat: add v0.15 (#36369) 2023-03-24 09:55:46 -07:00
Alec Scott
df614169bd perl-net-http: add v6.22 (#36370) 2023-03-24 09:54:11 -07:00
Alec Scott
1029590672 perl-padwalker: add v2.5 (#36372) 2023-03-24 09:46:34 -07:00
Alec Scott
c7e2346d8b perl-package-deprecationmanager: add v0.18 (#36371) 2023-03-24 09:46:14 -07:00
Alec Scott
93631d7512 perl-parallel-forkmanager: add v2.02 (#36373) 2023-03-24 09:44:39 -07:00
Alec Scott
54e5dc3eb5 perl-path-tiny: add v0.144 (#36374) 2023-03-24 09:43:12 -07:00
Alec Scott
0a9eea593b perl-pdf-api2: add v2.044 (#36375) 2023-03-24 09:41:39 -07:00
Alec Scott
17e50f519a perl-pegex: add v0.75 (#36376) 2023-03-24 09:39:13 -07:00
Alec Scott
d15fe6a345 perl-perl4-corelibs: add v0.005 (#36379) 2023-03-24 15:55:53 +01:00
Alec Scott
3504866185 perl-perlio-utf8-strict: add v0.010 (#36380) 2023-03-24 15:55:37 +01:00
Alec Scott
d0aee3aa30 perl-scalar-list-utils: add v1.63 (#36381) 2023-03-24 15:55:17 +01:00
Alec Scott
bbf7ff348a perl-statistics-descriptive: add v3.0800 (#36382) 2023-03-24 15:54:59 +01:00
Alec Scott
c6ec5a71a7 perl-sub-exporter: add v0.989 (#36383) 2023-03-24 15:54:43 +01:00
Alec Scott
56358c5901 perl-sub-install: add v0.929 (#36384) 2023-03-24 15:54:05 +01:00
Alec Scott
06d8196dfd perl-sub-name: add v0.26 (#36385) 2023-03-24 15:53:47 +01:00
Alec Scott
6a119b911c perl-sub-quote: add v2.006008 (#36386) 2023-03-24 15:53:32 +01:00
Alec Scott
5e1cfeaad0 perl-svg: add v2.87 (#36387) 2023-03-24 15:53:16 +01:00
Alec Scott
d199c1a7cf perl-test-deep: add v1.204 (#36388) 2023-03-24 15:52:57 +01:00
Alec Scott
795ee106f0 perl-test-differences: add v0.69 (#36389) 2023-03-24 15:43:43 +01:00
Alec Scott
00f4021e6a perl-test-fatal: add v0.017 (#36390) 2023-03-24 15:42:54 +01:00
Alec Scott
d367fded81 perl-test-most: add v0.38 (#36391) 2023-03-24 15:41:40 +01:00
Alec Scott
56c086ea17 perl-test-needs: add v0.002010 (#36392) 2023-03-24 15:41:21 +01:00
Alec Scott
4dcca72e89 perl-test-requires: add v0.11 (#36393) 2023-03-24 15:41:03 +01:00
Alec Scott
8326ef0772 perl-test-warnings: add v0.031 (#36394) 2023-03-24 15:14:59 +01:00
Alec Scott
27456f53aa perl-text-csv: add v2.02 (#36395) 2023-03-24 15:13:06 +01:00
Alec Scott
326442b169 perl-text-format: add v0.62 (#36396) 2023-03-24 15:12:43 +01:00
Alec Scott
ef2b31f7d1 perl-text-simpletable: add v2.07 (#36397) 2023-03-24 15:12:27 +01:00
Alec Scott
f2abf90bfc gh: add v2.25.1 (#36364) 2023-03-24 14:46:37 +01:00
Xavier Delaruelle
906151075d modules tcl: simplify env modification block in template (#36334)
Simplify environment modification block in modulefile Tcl template by
always setting a path delimiter to the prepend-path, append-path and
remove-path commands.

Remove --delim option to the setenv command as this command does not
allow such option.

Update test_prepend_path_separator test to explicitly check the 6
path-like commands that should be present in generated modulefile.
2023-03-24 10:28:10 +01:00
Massimiliano Culpo
d0d5526110 Add a pre-check job to bootstrap the environment on Python 3.6 (#36358)
* Add a pre-check job that just bootstrap the environment on Python 3.6
* py-typing-extension: restore information on Python 3.6 installation
* Fix job name, try to run quick test on installed python packages
2023-03-24 04:08:42 +00:00
Wouter Deconinck
729b8113cc git: new version 2.40.0 (#36354)
Release notes: https://github.com/git/git/blob/v2.40.0/Documentation/RelNotes/2.40.0.txt (nothing worrisome there).

Commit history with recent changes to installation procedure: https://github.com/git/git/commits/master/INSTALL (nothing worrisome there).

This builds fine on my system,
```
==> git: Successfully installed git-2.40.0-sb7gmy64ivwstfwwjyff7y5mbbc7vtos
```
2023-03-24 00:08:27 -04:00
John W. Parent
c59bebbff9 zstd package: add Cmake build (#35104)
* This enables building zstd on Windows
* CMake is now the default for all systems
2023-03-23 16:58:12 -07:00
Harmen Stoppels
118d8e4f57 unit tests: don't hard-code arch in compiler config (#36360)
This breaks when testing on non-x86_64 machines outside CI
2023-03-23 23:22:45 +01:00
Dr. Christian Tacke
2d9c913eb1 faircmakemodules: Add new package (#36345)
Co-authored-by: Dennis Klein <d.klein@gsi.de>
2023-03-23 17:48:24 -04:00
Massimiliano Culpo
b0e54bc0ac Fix regression on compiler constraint (#36342)
fixes #36339

We were missing a rule that enforced a match between
the `node_compiler` and the compiler used to satisfy
a requirement.

Fix compiler with custom, made up version too
2023-03-23 20:43:13 +01:00
Adam J. Stewart
d20fee0c42 Update various Jupyter packages (#36332)
* Update various Jupyter packages
* Fix missing versions
2023-03-23 10:55:06 -07:00
Dr. Christian Tacke
fdd94d1ee9 fairlogger: 1.9 and older are incompatible with fmt 9+ (#36336)
Co-authored-by: Dennis Klein <d.klein@gsi.de>
2023-03-23 10:50:18 -07:00
Sergey Kosukhin
fa37ff51e7 libzip: add version 1.3.2 (#36337)
* libzip: add property 'headers'
* libzip: add version 1.3.2
2023-03-23 10:48:14 -07:00
Matthieu Dorier
2853051e48 [mochi-margo] margo version 0.13.1 added (#36344) 2023-03-23 10:08:55 -07:00
Matthew Thompson
862e9a59c4 gcc: fix for apple-clang conflicts (#36165)
* gcc: fix for apple-clang conflict

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

Use variant by @adamjstewart

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-23 13:03:09 -04:00
Harmen Stoppels
4dc9d9f60e Revert "Bugfix: package requirements with git commits (#35057)" (#36341)
This reverts commit 3d597e29be.
2023-03-23 12:10:46 +01:00
Peter Scheibel
3d597e29be Bugfix: package requirements with git commits (#35057)
* Specs that define 'new' versions in the require: section need to generate
  associated facts to indicate that those versions are valid.

* add test to verify success with unknown versions.
2023-03-23 01:58:20 -07:00
Ted Stern
739a67eda8 Revert "wrf: fix patches for aarch64 config (#35984)" (#36333)
This reverts commit 99893a6475.
2023-03-23 07:50:56 +01:00
Xavier Delaruelle
47d710dc4d modules tcl: switch default all:autoload from none to direct (#36269)
Since environment-modules has support for autoloading since 4.2,
and Spack-builds of it enable it by default, use the same autoload
default for tcl as lmod.
2023-03-23 07:49:17 +01:00
Stan Tomov
101c5b51bb magma: add v2.7.1 (#35610) 2023-03-22 19:04:56 -04:00
Adam J. Stewart
f4e4d83a02 LLVM OpenMP: add v16.0.0 (#36330) 2023-03-22 16:25:02 -05:00
Adam J. Stewart
68979f8740 py-papermill: add new package (#36328) 2023-03-22 14:00:40 -07:00
Mathew Cleveland
37fbfcf7fe Add opppy-0_1_6 and opppy-0_1_7 releases to the spack recipes (#36326)
* add opppy-0_1_6 and opppy-0_1_7 releases to the spack recipes
* update urls
* remove sphinx from the dependency list
* cleanup OPPPY versions to capture OPPPY-0_1_1 tag descrepency
* one more attempt at fixing the url for opppy-0_1_1 (simpler fix)

---------

Co-authored-by: Cleveland <cleveland@lanl.gov>
Co-authored-by: clevelam <clevelam@users.noreply.github.com>
2023-03-22 16:57:49 -04:00
Leopold Talirz
311d3be18e docs: mention cuda multi-arch capability (#36321) 2023-03-22 16:52:53 -04:00
MatthewLieber
2393e456ee Osu/mv2 hwloc2 (#36325)
* Revert "Remove legacy yaml from buildcache fetch (#34347)"
  This reverts commit b58ec9e2b9.
* Revert "Revert "Remove legacy yaml from buildcache fetch (#34347)""
  This reverts commit f91ec2e8da.
* add variant for hwloc v2
* running black

---------

Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2023-03-22 11:49:12 -07:00
Vincent Michaud-Rioux
e09caf2ab8 Add py-pennylane-lightning-kokkos package. (#36257)
* update python package

* change package inheritance

* small update

* enable cpp tests

* small update

* Add flaky package

* Restructure PennyLane deps and order

* Change Lightning defaults and add libomp support for MacOS

* Replace explicit git url with PyPI

* Add Flaky support

* Update PennyLane and PennyLane Lightning support

* fix format

* update packages versioning

* Add patching and default updates for lightning package

* Format

* fix patch version

* update py-flaky package

* update py-pennylane-lightning package

* update py-pennylane package

* remove explicity python dependence

* Remove redundant lines from patch-file

* Update SHA for new patch

* Initial commit for PLLKokkos.

* Comment verbose variant.

* Update develop commit version and restore verbose option.

* Add backends.

* Add mesa package dep (libxml2). Fix rocm install for py-pennylane-lightning-kokkos.

* Restore sycl backend.

* Revert mesa package.

* Make py-pe-li-kokkos into CudaPackage, ROCmPackage.

* Do not force kokkos+wrapper when +cuda

* Few mods following comments on py-pll.

* Update versions of py-pennylane*.

* Remove py-pennylane-lightning patch.

* Remove redundant preferred=True.

* Fix lint in py-pennylane-lightning-kokkos.

* Update var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py

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

* Ninja and pip not required at runtime. Set lower bound on PL/PLL versions.

* Remove v0.29.0 from pennylane.

* Add AmintorDusko as maintainer.

---------

Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com>
Co-authored-by: Lee J. O'Riordan <lee@xanadu.ai>
Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-22 10:06:05 -05:00
Adam J. Stewart
f15efd27bd py-lightning: fix dependencies (#36213) 2023-03-22 14:08:19 +01:00
Adam J. Stewart
668fb7f5dd grep: fix +pcre in 3.9 (#36169) 2023-03-22 09:49:41 +01:00
Alec Scott
e1a5228a16 perl-inline: add v0.86 (#36299) 2023-03-22 03:47:17 -05:00
Wouter Deconinck
8a48f9a479 xcb-util-*: new versions, migration to freedesktop.org (#36241)
The xcb-utils have been migrated to the gitlab.freedesktop.org, from the
previous separate location. That means that a URL change is needed to
pick up newer version
([ref](https://lists.freedesktop.org/archives/xcb/2022-October/011422.html)).

This replaces the `homepage` and `url` with the latest (to an `xz`
file), adds a `url_for_version` function to resolve past versions, and
add the latest versions. Because of the `url_for_version` I don't think
we can use the `xorg_mirror_path` approach here.

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2023-03-22 09:45:16 +01:00
Alec Scott
6551ad8711 perl-file-slurper: add v0.014 (#36305) 2023-03-22 03:38:17 -05:00
Alec Scott
a2479c13a6 perl-exception-class: add v1.45 (#36315) 2023-03-22 03:35:42 -05:00
snehring
59fecb353c Add missing deps for braker and bcftools (#36279) 2023-03-22 09:25:13 +01:00
Alec Scott
d0098876e0 perl-io-tty: add v1.17 (#36295) 2023-03-22 03:24:54 -05:00
snehring
8d2f08ae85 shapemapper: add new package (#36282) 2023-03-22 09:20:59 +01:00
Alec Scott
d71ee98bad perl-io-html: add v1.004 (#36296) 2023-03-22 03:20:32 -05:00
Alec Scott
ed989be8eb perl-file-which: add v1.27 (#36304) 2023-03-22 04:17:33 -04:00
Alec Scott
00d45d052d perl-error: add v0.17029 (#36316) 2023-03-22 03:14:33 -05:00
Alec Scott
f86f30ad71 perl-list-moreutils and moreutils-xs: add v0.430 (#36291) 2023-03-22 03:10:28 -05:00
Alec Scott
4f4c9f440e perl-graph-readwrite: add v2.10 (#36302) 2023-03-22 03:09:51 -05:00
Adam J. Stewart
848ab435a5 py-torch: OpenMP support doesn't work on Apple Silicon (#36287) 2023-03-22 09:06:42 +01:00
Adam J. Stewart
2418bf446d py-jupyter-client: add v8.1.0 (#36288) 2023-03-22 09:06:10 +01:00
Alec Scott
893bb8d7c7 perl-libwww-perl: add v6.68 (#36292) 2023-03-22 03:04:16 -05:00
Alec Scott
9e6d048af2 perl-mce: add v1.884 (#36289) 2023-03-22 08:57:52 +01:00
Alec Scott
d17321ffc0 perl-log-log4perl: add v1.49 (#36290) 2023-03-22 08:57:36 +01:00
Alec Scott
38912d17f7 perl-json: add v4.10 (#36293) 2023-03-22 08:54:21 +01:00
Alec Scott
3185bd81b1 perl-ipc-run: add v20220807.0 (#36294) 2023-03-22 02:53:24 -05:00
Alec Scott
25035a302e perl-io-compress: add v2.204 (#36297) 2023-03-22 08:51:14 +01:00
Alec Scott
85c1b16213 perl-inline-c: add v0.81 (#36298) 2023-03-22 08:50:43 +01:00
Alec Scott
e2bc51fcad perl-exporter-tiny: add v1.006000 (#36313) 2023-03-22 02:47:38 -05:00
Alec Scott
c3b56f789c perl-http-message: add v6.44 (#36300) 2023-03-22 08:41:37 +01:00
Alec Scott
492ec0e783 perl-http-cookies: add v6.10 (#36301) 2023-03-22 08:41:16 +01:00
Alec Scott
653057e93a perl-graph: add v0.20105 (#36303) 2023-03-22 08:40:21 +01:00
Alec Scott
87c1cfaf03 perl-file-sharedir-install: add v0.14 (#36306) 2023-03-22 08:38:20 +01:00
Alec Scott
647bb5124e perl-file-pushd: add v1.016 (#36307) 2023-03-22 08:38:00 +01:00
Alec Scott
7c646a5dbd perl-file-homedir: add v1.006 (#36308) 2023-03-22 08:37:41 +01:00
Alec Scott
692d624f45 perl-file-copy-recursive: add v0.45 (#36309) 2023-03-22 08:37:22 +01:00
Alec Scott
98adc0b3f9 gh: add v2.25.0 (#36319) 2023-03-22 02:37:03 -05:00
Alec Scott
628dbce6f6 perl-ffi-checklib: add v0.31 (#36310) 2023-03-22 08:30:40 +01:00
Alec Scott
49079d6f88 perl-extutils-makemaker: add v7.68 (#36311) 2023-03-22 08:29:52 +01:00
Alec Scott
ff23a2a2ee perl-extutils-depends: add v0.8001 (#36312) 2023-03-22 08:29:35 +01:00
Alec Scott
725389ff32 perl-exporter-lite: add v0.09 (#36314) 2023-03-22 08:28:05 +01:00
Alec Scott
781959603d perl-devel-stacktrace: add v2.04 (#36317) 2023-03-22 08:26:27 +01:00
Alec Scott
787fe3283f perl-devel-overloadinfo: add v0.007 (#36318) 2023-03-22 08:25:18 +01:00
Alec Scott
c9c2b5e6bb coreutils: add v9.2 (#36320) 2023-03-22 08:23:55 +01:00
John W. Parent
97bdf28b29 libxml2: enable build on Windows (#36261)
Add Nmake-based builder for Windows
2023-03-21 23:33:22 -04:00
Christian F. A. Negre
f49e9591b7 lcc: new package (#36100)
* lcc: new package
* update CMake version per `CMakeLists.txt`

---------

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2023-03-21 11:32:32 -07:00
Thomas Bouvier
a0bc32c319 nccl-tests: add version v2.13.6 (#36160) 2023-03-21 11:17:29 -07:00
Adam J. Stewart
52bcd0eda1 py-fiona: add v1.9.2 (#36278) 2023-03-21 12:39:55 -05:00
John W. Parent
2e9d0e146e netcdf-c[xx]: CMake/Windows build (#34935)
netcdf-cxx and netcdf-c now build with CMake rather than Autotools.
netcdf-c can still optionally build with Autotools (but defaults to
CMake). With some additional patches to the CMake files, netcdf-c
can use CMake to build on Windows.
2023-03-21 10:15:50 -07:00
downloadico
84ab72557a Update abinit version (#36264)
* abinit: add version 9.8.3
* require hdf5 up to 1.8 and libxc up to version 5
* abinit: constrained versions of libxc and hdf5
* fixed bad syntax for format
* fixed error looking for fftw in spec.
* Changed to look for fftw-api in spec.
* Update var/spack/repos/builtin/packages/abinit/package.py

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-03-21 10:09:38 -07:00
Wouter Deconinck
1d62d9460d xrootd: new version 5.5.2, 5.5.3 (#36271)
Only bugfixes, no build system changes, https://github.com/xrootd/xrootd/compare/v5.5.1...v5.5.3
2023-03-21 11:32:58 -04:00
Mosè Giordano
b9f32b1e7a curl: Add version 8.0.1 (#36256)
r: restrict compatibility with curl
2023-03-21 12:25:39 +01:00
Adam J. Stewart
2b539129f0 py-pillow: add v9.3.0 and v9.4.0 (#36259) 2023-03-21 06:08:21 -04:00
Michael Kuhn
9288ece826 environment-modules: add main branch (#36268) 2023-03-21 03:13:27 -04:00
Matthieu Dorier
9b09d8bc49 valijson: add new package (#36250) 2023-03-21 03:13:03 -04:00
Ryan Marcellino
4d90f464e1 py-parsl: add v1.2.0 (#36266) 2023-03-21 02:38:03 -04:00
Thomas Madlener
6edc480736 podio: Add version 0.16.3 (#36253) 2023-03-21 02:27:58 -04:00
Ryan Marcellino
649e9ae0ad py-cryptography: add v3.3.2 (#36267) 2023-03-21 02:23:25 -04:00
Adam J. Stewart
98ece85e63 py-timm: does not yet support Python 3.11 (#36260) 2023-03-21 02:23:03 -04:00
Mosè Giordano
fa57e62744 julia: Relax compatibility with curl (#36262)
Curl version 8 has a compatible ABI/API with version 7.
2023-03-21 02:18:02 -04:00
Ken Raffenetti
880c819d97 mpich: add 4.1.1 release (#35901) 2023-03-21 00:03:57 -04:00
Eric Martin
5fedb10370 py-reportseff: add new package (#36113)
* py-reportseff: add new package

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

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

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

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

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

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

* Add py-importlib-metadata preqreq

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-03-20 22:17:01 -05:00
Jen Herting
9787253842 [srcml-identifier-getter-tool] New package (#35763)
* [srcml-identifier-getter-tool] New package
* [srcml-identifier-getter-tool] formatting
2023-03-20 18:08:35 -07:00
Alec Scott
3984a1e159 babl: add v0.1.102 (#35837)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-03-20 17:33:10 -07:00
Carsten Uphoff
bfca1729fa Add double batched FFT library package (#36086)
* Add double batched FFT library package
* Fix style
* Add error when unsupported compiler is uesd

---------

Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>
2023-03-20 16:25:37 -07:00
Sangu Mbekelu
8d8a008ef2 new mosesdecoder package (#36252)
* new mosesdecoder package
* [@spackbot] updating style on behalf of Sangu-Mbekelu

---------

Co-authored-by: Sangu Mbekelu <s.mbekelu9@gmail.com>
2023-03-20 16:04:04 -07:00
Erik Schnetter
b7505aa726 universal: New package (#36168)
* universal: New package
* universal: Update to version 3.68
2023-03-20 15:36:38 -07:00
Wouter Deconinck
2cecb4b00c Xorg apps: updated versions to current latest (#36242)
* Xorg apps: updated versions to current latest

This updates all xorg apps to the latest versions, adding updated
requirements where needed.

No major version increases in any packages.

Minor version increases in some packages (build changes, if any, are
indicated below):
- rgb
- xauth
- xcalc
- xclock
- xeyes: xi >= 1.7, x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage
- xfontsel
- xfs: xfont2 >= 2.0.1
- xinit
- xpr
- xrdb

Bugfix version increases in many packages, with no expected impact on
dependencies or interfaces.

Summary of dependency changes:
- xeyes:
  - depends_on("libxi@1.7:", when="@1.2:")
  - depends_on("libxcb@1.9:", when="@1.2:")
- xfs:
  - depends_on("libxfont@1.4.5:", when="@:1.1")
  - depends_on("libxfont2@2.0.1:", when="@1.2:")

* setxkbmap: depends_on libxrandr when @1.3.3:

* constype: new version
2023-03-20 15:26:28 -07:00
John W. Parent
8695d96bd1 NASM package: fix build on Windows (#35100) 2023-03-20 14:45:00 -07:00
John W. Parent
fa0749bfb8 lz4: switch to CMake build (#35101)
Add support for building with CMake and make it the default build
system on all platforms. By doing this, lz4 can now be built on
Windows. The makefile-based build remains as an option.
2023-03-20 14:39:19 -07:00
Wouter Deconinck
b431c4dc06 wayland: new versions, new build system (meson) (#36217)
* wayland: new versions, new build system (meson)

* wayland-protocols: new version, new build system (meson)

* [@spackbot] updating style on behalf of wdconinc

* wayland-protocols: added maintainer

* wayland: added maintainer

* wayland-protocols: no need to import build systems, per flake8

* wayland: no need to import build system, per flake8

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

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2023-03-20 12:31:45 -07:00
Peter Scheibel
c3e41153ac Package requirements: allow single specs in requirement lists (#36258)
If you have a "require:" section in your packages config, and you
use it to specify a list of requirements, the list elements can
now include strings (before this, each element in the list had to
be a `one_of` or `any_of` specification, which is awkward if you
wanted to apply just one spec with no alternatives).
2023-03-20 12:30:33 -07:00
Andrew-Dunning-NNL
e1752ca382 new package py-oracledb (#36191)
* new package py-oracledb

* py-oracledb use python3.6:
2023-03-20 14:14:05 -04:00
Erik Heeren
2bcd4e0ecd py-pint-xarray: new package (#36106)
* py-pint-xarray: new package

* py-pint-xarray: review remarks
2023-03-20 10:34:33 -05:00
Erik Heeren
550bda3096 py-pdf2image: new package (#36088)
* py-pdf2image: new package

* py-pdf2image: 1.16.3 source now available on pypi

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-20 10:33:59 -05:00
Adam J. Stewart
334bc69a64 Python: add several new versions (#36249) 2023-03-20 10:18:13 -05:00
Harmen Stoppels
88d78025a6 spack install: simplify behavior when inside environments (#35206)
Example one:

```
spack install --add x y z
```

is equivalent to

```
spack add x y z
spack concretize
spack install --only-concrete
```

where `--only-concrete` installs without modifying spack.yaml/spack.lock

Example two:

```
spack install
```

concretizes current spack.yaml if outdated and installs all specs.

Example three:

```
spack install x y z
```

concretizes current spack.yaml if outdated and installs *only* concrete
specs in the environment that match abstract specs `x`, `y`, or `z`.
2023-03-20 13:51:30 +01:00
Miroslav Stoyanov
7e981d83fd heffte: update versions and arch flags (#36095)
* update versions and arch flags
* style update
* more style issues
* fix hashes and testing problem
* return the old versions, but they are really bad
* fix style

---------

Co-authored-by: Gerald Ragghianti <gerald@ragghianti.com>
2023-03-20 08:13:13 -04:00
Adam J. Stewart
b28e9e651d libpng: add v1.6.39 (#36247) 2023-03-20 07:23:23 -04:00
Adam J. Stewart
5dc8ed2694 Remove unused ignore parameter of extends() directive (#35588)
The `ignore` parameter was only used for `spack activate/deactivate`, and it isn't used
by Spack Environments which have their own handling of file conflicts. We should remove it.

Everything that handles `ignore=` was removed in #29317 and included in 0.19, when we
removed `spack activate` and `spack deactivate` in favor of environments.  So all of these
usages removed here were already being ignored by Spack.
2023-03-20 07:22:59 -04:00
Jean-Baptiste Besnard
199f71ea48 LULESH: fix space in rpath for +visual (#36094) 2023-03-20 11:16:58 +01:00
Harmen Stoppels
b8e5fc061d ci.py: remove redundant wrapper around get (#36188) 2023-03-20 10:56:19 +01:00
Adam J. Stewart
b77a4331bc GEOS: add v3.11.2 (#36189) 2023-03-20 10:54:41 +01:00
Rob Falgout
adcdf4a7e2 hypre: add v2.28.0 (#36187) 2023-03-20 10:41:56 +01:00
Erik Schnetter
dfd63ccd73 lrzip: New version 0.651 (#36196) 2023-03-20 10:35:57 +01:00
Alec Scott
2bfcfd1f72 perl: add v5.37.9 (#36205) 2023-03-20 10:34:44 +01:00
Alec Scott
7518362706 perl-b-hooks-endofscope: add v0.26 (#36208) 2023-03-20 10:32:37 +01:00
Alec Scott
13d8bc47c8 perl-capture-tiny: add v0.48 (#36209) 2023-03-20 10:32:16 +01:00
Alec Scott
d5c0d1ce58 perl-class-inspector: add v1.36 (#36211) 2023-03-20 10:31:59 +01:00
Alec Scott
46bd481124 perl-alien-build: add v2.78 (#36206) 2023-03-20 10:31:10 +01:00
Alec Scott
e92b996db9 perl-app-cmd: add v0.335 (#36207) 2023-03-20 10:14:37 +01:00
Alec Scott
eb1723332e perl-cgi: add v4.56 (#36210) 2023-03-20 10:13:20 +01:00
Erik Schnetter
3afef0635f rclone: New version 1.62.2 (#36197) 2023-03-20 10:12:59 +01:00
Alec Scott
032385ae51 perl-dbi: add v1.643 (#36218) 2023-03-20 10:07:15 +01:00
Alec Scott
7a9578ce7d perl-dbd-sqlite: add v1.72 (#36219) 2023-03-20 10:06:55 +01:00
Alec Scott
e155df5ada perl-db-file: add v1.858 (#36221) 2023-03-20 10:06:11 +01:00
Alec Scott
005af3e755 perl-date-manip: add v6.91 (#36222) 2023-03-20 10:05:52 +01:00
Alec Scott
85e721c16c perl-data-optlist: add v0.113 (#36223) 2023-03-20 10:05:14 +01:00
Alec Scott
e61ae290a2 perl-cpan-meta-check: add v0.017 (#36224) 2023-03-20 10:04:58 +01:00
Alec Scott
782d3b889a perl-config-general: add v2.65 (#36225) 2023-03-20 10:04:11 +01:00
Alec Scott
3a7e5372d0 perl-compress-raw-zlib: add v2.204 (#36226) 2023-03-20 10:03:26 +01:00
Alec Scott
114e9b528f perl-compress-raw-bzip2: add v2.204 (#36227) 2023-03-20 10:02:59 +01:00
Alec Scott
8e3021cdb1 perl-clone: add v0.46 (#36228) 2023-03-20 10:02:19 +01:00
Alec Scott
9542d46395 perl-class-method-modifiers: add v2.15 (#36229) 2023-03-20 10:01:59 +01:00
Alec Scott
0825e9a95e perl-class-load: add v0.25 (#36230) 2023-03-20 10:01:45 +01:00
Alec Scott
b586c8cf1d lis: add v2.1.0 (#36231) 2023-03-20 10:01:11 +01:00
Alec Scott
eba3f5503b bazel: add v6.1.1 (#36234) 2023-03-20 10:00:48 +01:00
Harmen Stoppels
e30a89fb7c llvm: add v16 (#36239) 2023-03-20 09:54:31 +01:00
Alec Scott
0646c953e5 homer: add v4.11.1 (#36232) 2023-03-20 09:52:58 +01:00
Alec Scott
d6d68b892a perl-dbd-pg: add v3.16.1 (#36220) 2023-03-20 09:52:13 +01:00
Mark W. Krentel
8b1c5d910d intel-xed: add version 2022.10.11 (#36244) 2023-03-20 09:29:51 +01:00
Alec Scott
a800361344 pax-utils: add v1.3.3 (#36204) 2023-03-20 09:28:12 +01:00
Alec Scott
631a3d849f openldap: add v2.6.4 (#36202) 2023-03-20 09:27:40 +01:00
Alec Scott
af09297a76 gpgme: add v1.19.0 (#36201) 2023-03-20 09:27:20 +01:00
Alec Scott
1b27a2dda5 code-server: add v4.11.0 (#36200) 2023-03-20 09:26:58 +01:00
Alec Scott
3ebe5939e3 autodiff: add v1.0.1 (#36199) 2023-03-20 09:26:24 +01:00
Alec Scott
c9a4bf8d3f elfutils: add v0.189 (#35859) 2023-03-20 09:26:01 +01:00
Adam J. Stewart
973e37823c py-tensorboard-data-server: add v0.7.0 (#36248) 2023-03-20 09:25:33 +01:00
Xavier Delaruelle
41d7fe0a50 modules tcl: fix autoload mechanism in template (#36237)
Adapt tcl modulefile template to call "module load" on autoload
dependency without testing if this dependency is already loaded or not.

The is-loaded test is not necessary, as module commands know how to cope
with an already loaded module. With environment-modules 4.2+ (released
in 2018) it is also important to have this "module load" command even if
dependency is already loaded in order to record that the modulefile
declares such dependency. This is important if you want to keep a
consistent environment when a dependent module is unloaded.

The "Autoloading" verbose message is also removed as recent module
commands will report such information to the user (depending on the
verbosity configured for the module command).

Such change has been test successfully with Modules 3.2 (EL7), 4.5 (EL8)
and 5.2 (latest) and also with Lmod 7 and 8 (as it is mentionned in
Spack docs that Lmod can be used along with tcl modules). Dependencies
are correctly loaded or unloaded, whether they are loaded/unloaded or
not.

This change fixes Tcl quoting issue introduced in #32853.

Fixes #19155.
2023-03-20 09:23:40 +01:00
Adam J. Stewart
1af863a1e3 bash: add v5.2.15 (#36245) 2023-03-20 09:14:41 +01:00
Adam J. Stewart
75714d30f5 gawk: fix build on Apple Silicon (#36246) 2023-03-20 09:14:00 +01:00
Alec Scott
d5e30ac5f1 diffutils: add v3.9 (#35852) 2023-03-20 08:37:36 +01:00
Alec Scott
8c4265f033 harminv: add v1.4.2 and update URL to maintained git repository (#36062) 2023-03-20 08:36:25 +01:00
Angus Gibson
b8b6ae42a0 py-setuptools-git-versioning: new package (#36123)
* py-setuptools-git-versioning: new package

* Apply suggestions from code review

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-19 20:02:14 -04:00
Wouter Deconinck
5532350d4b qt-* (Qt6 pkgs): new version 6.4.3 (#36235) 2023-03-19 09:07:43 -05:00
Alec Scott
620effec1b bumpversion: add v0.6.0 and bump2version dependency (#36021)
* bumpversion: add v0.6.0

* Add bump2version dependency package
2023-03-18 21:51:06 -06:00
Xavier Delaruelle
df97827a7b Fix case spelling for Lmod and Tcl (#36215) 2023-03-19 01:42:50 +00:00
Wouter Deconinck
4ffdde94ef py-hepunits: new versions 2.2.0, 2.2.1, 2.3.0, 2.3.1 (#35545)
* py-hepunits: new versions 2.2.0, 2.2.1, 2.3.0, 2.3.1

Python 2 support dropped in 2.2 series.

Ref: https://github.com/scikit-hep/hepunits/compare/v2.1.1...v2.3.1

* py-hepunits: py-hatchling as of version 2.3

* [@spackbot] updating style on behalf of wdconinc

* py-hepunits: only depends_on toml through 2.1.1

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2023-03-18 17:18:04 -05:00
Benjamin Meyers
5b04146f8a New package py-pyhull (#36107)
* New package py-pyhull

* [@spackbot] updating style on behalf of meyersbs
2023-03-18 17:02:31 -05:00
Benjamin Meyers
eddbbb867d New package py-seekpath (#36108)
* New package py-seekpath

* [@spackbot] updating style on behalf of meyersbs
2023-03-18 17:01:43 -05:00
Benjamin Meyers
32154e6fc7 New package py-pyisemail (#36112) 2023-03-18 17:00:46 -05:00
Adam J. Stewart
6618b0c830 py-scikit-image: add v0.20.0 (#36167)
* py-scikit-image: add v0.20.0

* [@spackbot] updating style on behalf of adamjstewart

---------

Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2023-03-18 16:49:39 -05:00
Massimiliano Culpo
d84c6ad29e cmake build system: make "generator" a variant (#35552) 2023-03-18 16:39:04 +01:00
Massimiliano Culpo
2f07c64f2d Fix wrong computation of concrete specs due to a bug in intersects (#36194)
fixes #36190
2023-03-18 12:50:52 +01:00
Alec Scott
ca5cab8498 patchelf: add v0.17.2 (#36203) 2023-03-18 11:09:58 +01:00
Alec Scott
5f8ee20c7c ffmpeg: add v6.0 (#35857)
* ffmpeg: add v6.0

* Add limit to py-torchvision to prevent ffmpeg v6.0
2023-03-18 02:47:44 -04:00
Harmen Stoppels
fd70a2cc07 cython: force through env variable (#35995) 2023-03-17 19:54:24 -04:00
Alec Scott
31201f91bc libsigsegv: add v2.14 (#36070) 2023-03-17 18:39:26 -04:00
Ben Morgan
da0b76047d geant4: new version 11.0.4 (#36185) 2023-03-17 17:58:42 -04:00
Massimiliano Culpo
0478e5f684 Improve wording of audit message (#36180) 2023-03-17 17:43:35 -04:00
Alec Scott
4f7c147d50 libpciaccess: add v0.17 (#36076) 2023-03-17 17:33:44 -04:00
Amintor Dusko
73a887ee7c Update PennyLane and PennyLane Lightning (#35406) 2023-03-17 17:28:26 -04:00
John W. Parent
8195f27a66 Windows: properly handle symlink failures (#36003)
In the Windows filesystem logic for creating a symlink, we intend to
fall back to a copy when the symlink cannot be created (for some
configuration settings on Windows it is not possible for the user
to create a symlink). It turns out we were overly-broad in which
exceptions lead to this fallback, and the subsequent copy would
also fail: at least one case where this occurred is when we
attempted to create a symlink that already existed.

The updated logic expressly avoids falling back to a copy when the
file/symlink already exists.
2023-03-17 10:19:32 -07:00
Alec Scott
a60fa7ff7d libxdmcp: add v1.1.4 (#36074) 2023-03-17 13:11:10 -04:00
Adam J. Stewart
6272853030 Bazel: limit parallelism (#36002)
* Bazel: limit parallelism

* Patch packages that don't directly invoke bazel

* Style fixes

* flag comes after build, not bazel

* flag comes after build, not bazel

* command is only attribute if specific package
2023-03-17 11:13:27 -05:00
Seth R. Johnson
507b42c54f veccore: new version 0.8.1 (#36184) 2023-03-17 09:19:04 -04:00
Szilárd Páll
3897c1308e Switch GROMACS build type to Release (#36181)
The current default RelWithDebInfo gives significantly slower builds
so it should not be the default.
2023-03-17 07:17:06 -06:00
Valentin Volkl
b54d208aea boost: add patch for 1.81.0 (#35964) 2023-03-17 11:42:43 +01:00
Edoardo Aprà
612aa744f6 nwchem: add v7.2.0 (#36061) 2023-03-17 11:41:33 +01:00
Massimiliano Culpo
97193a25ce Mitigation for GitVersion bug when no =reference is given (#36159)
* ASP-based solver: use satisfies instead of intersects

They are semantically equivalent for concrete versions,
but the GitVersion.intersects implementation is buggy

* Mitigation for git version bug

fixes #36134

This commit works around the issue in #36134, by using
GitVersion.satisfies instead of GitVersion.intersects

There are still underlying issues when trying to infer the
"reference version" when no explicit one is given, but:

1. They are not reproducible with our synthetic repo
2. They occur only when the `git.<xxx>` form of Git version
   is used

Here we just work around the user facing issue and ensure
the tests are correct with our synthetic repository.
2023-03-17 11:36:29 +01:00
Vicente Bolea
5bf96561ee vtk-m: update to latest release (#35590)
* vtk-m: add v2.0.0
* Update var/spack/repos/builtin/packages/vtk-m/package.py

---------

Co-authored-by: Kenneth Moreland <morelandkd@ornl.gov>
2023-03-17 11:19:13 +01:00
Cameron Book
f2ba1d276b nccmp: add more constrain to dependencies, add configure args (#35539) 2023-03-17 11:10:36 +01:00
dependabot[bot]
4e060ba933 build(deps): bump actions/checkout from 3.3.0 to 3.4.0 (#36140)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](ac59398561...24cb908017)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2023-03-17 10:58:57 +01:00
afzpatel
dd15c37021 hipcub and rocprim: enable testing (#35660) 2023-03-17 10:56:54 +01:00
Harmen Stoppels
141c154948 openssh: 9.2, 9.3 (#36162) 2023-03-17 10:31:39 +01:00
Alec Scott
e51447c2c0 nano: add v7.2 (#36148) 2023-03-17 10:16:27 +01:00
Adam J. Stewart
a84fb716a0 Update the PyTorch ecosystem (#36132)
* py-pytorch-lightning: add v2.0.0

* py-lightning-utilities: add v0.8.0

* Update all PyTorch packages

* Open-CE does not yet have patches for PyTorch 2 on ppc64le
2023-03-17 10:13:44 +01:00
M. Eric Irrgang
a11f06885f Fix --test behavior for gromacs package. (#35674)
For `spack install --test=all gromacs`
* remove the `test` target from the `check()` call and just use
  the `check` target, in accordance with usual GROMACS test protocol
* build the test binaries explicitly during the build phase

Additional minor updates are necessary. This change
updates the package structure to the newer format with a
separate Builder class so we can override `check()`.
However, note that additional modernization should be
undertaken with care.
2023-03-17 10:11:22 +01:00
Massimiliano Culpo
8517a74f37 ASP-based solver: tweak heuristic, modify compiler encoding (#35989)
This PR does 2 unrelated things:
1. It changes the encoding of the compilers
2. It tweaks the heuristic for the solves in a0d8817907

Both were initially motivated by trying to get a performance gain but, while 2 showed significant speed-ups[^1], 1 instead didn't. I kept it anyhow, since I think the code related to compilers is more consolidated with the new encoding and we might get some performance improvement out of it if we can base our errors on the `node_compiler(Package, CompilerID)` atoms instead of `attrs`.

[^1]: In general the changes in the heuristic brought a ~10% speed-up on the tests I did. I'll post detailed results below.

Add a warning about compilers.yaml that is triggered if there are multiple compilers with the same spec, os and
target (since they can't be selected by users with the spec syntax only).
2023-03-17 00:39:41 -07:00
Alec Scott
34ef01a5c8 libx11: add v1.8.4 (#36075) 2023-03-17 00:04:07 -04:00
Michael Kuhn
86e49a63ce lmod: add 8.7.20 (#36177) 2023-03-17 02:07:31 +01:00
John W. Parent
d76845e875 libpng package: build with CMake (#35105) 2023-03-16 16:44:53 -07:00
Matthew Thompson
97d6c741b0 Fix for ESMF post_install on macOS (#36087) 2023-03-16 16:32:54 -07:00
Bill Williams
09fd3e8e61 Add explicit configure args to fix instrumentation-time paths (#36089) 2023-03-16 16:30:48 -07:00
Stephen Sachs
e341dac014 [pmix] master branch uses git submodule config/oac (#36104)
* [pmix] master branch uses git submodule config/oac
* Add comment for future versions
2023-03-16 16:04:56 -07:00
Stephen Sachs
38383743e7 pmix, openmpi, and prrte need to use the same configure to find the same deps (#36105)
* [openmpi] 5.0.0.rc10 onwards needs munge

This is the error you will see when munge is missing from `PKG_CONFIG_PATH`:

```
configure:63942: checking for pmix pkg-config cflags
configure:63956: check_package_pkgconfig_run_results=Package munge was not found in the pkg-config search path.
Perhaps you should add the directory containing `munge.pc'
to the PKG_CONFIG_PATH environment variable
Package 'munge', required by 'pmix', not found
configure:63959: $? = 1
configure:63966: pkg-config output: Package munge was not found in the pkg-config search path.
Perhaps you should add the directory containing `munge.pc'
to the PKG_CONFIG_PATH environment variable
Package 'munge', required by 'pmix', not found
configure:63972: result: error
configure:63974: error: An error occurred retrieving pmix cppflags from pkg-config
```

* Use same PKG_CONFIG_PATH defaults for ompi+pmix+prrte

The issue I tried to fix in https://github.com/spack/spack/pull/36105 comes from
different default search paths in different `pkg-config` executables used in
`openmpi` and `pmix` package. As these tools (`openmpi`, `pmix`, and `prrte`)
all use the same mechanisms to detect dependencies, the `pkg-config` environment
they use should also be equal.
2023-03-16 16:02:02 -07:00
Rémi Lacroix
8b94cc4ec2 libaio: Add version 0.3.113 (#36101) 2023-03-16 14:27:50 -07:00
Wouter Deconinck
0a55b44092 autodiff: new version 1.0.0 (#36121)
No more https://0ver.org. No changes to build system since 0.6.12.
2023-03-16 14:20:43 -07:00
Erik Heeren
d97bb895e8 Ospray (#36128)
* ospray: denoiser and GLM variants
* ospray: denoiser defaults to True to preserve previous behaviour
2023-03-16 14:11:03 -07:00
Erik Schnetter
e8482d9e79 openssl: New version 3.1.0 (#36166) 2023-03-16 16:03:06 -04:00
Richard Berger
3f3565e890 LAMMPS: add new versions (#35592)
* LAMMPS: add new stable version 20220623.3
* LAMMPS: add new patch version 20230208
2023-03-16 12:52:48 -07:00
Michael Kuhn
3bb35fbaf6 meson: add 1.0.1 (#35987) 2023-03-16 15:28:09 -04:00
Dom Heinzeller
4572052c63 Modify info print of ESMF_CPP due to permission denied errors in spack on MSU Hercules (#35969)
* Skip info print of ESMF_CPP due to permission denied errors in spack on MSU Hercules
* Better version of patch
2023-03-16 12:22:57 -07:00
Harmen Stoppels
ba00da61e4 reduce spec.json.sig file size (#36157)
Since GPG clear-sign cannot deal with lines longer than 19995 characters
and doesn't even error but simply truncates those linese (don't ask me
why...), we have to be careful not to hit that line limit when reducing
the filesize.

So, instead this PR sets the indent level to 0 and drops the whitespace
after `: `, which still reduces file size by 50% or so.
2023-03-16 19:46:13 +01:00
John W. Parent
825599a510 Windows: target arch based on spec target arch (#35797)
Update packages to check Spec's target rather than the host platform.
2023-03-16 11:31:19 -07:00
renjithravindrankannath
4f6f1b620f Include rocm-openmp-extras header and omp library (#36142) 2023-03-16 11:21:55 -07:00
Rocco Meli
08dc2d4020 add rdkit for gninavis and remove mpi (#36117) 2023-03-16 11:03:26 -07:00
Pierre Jolivet
6af84c4574 slepc: add HPDDM wrappers (#36118) 2023-03-16 12:32:07 -05:00
Harmen Stoppels
50cc1d12f9 Revert "minify spec.json in buildcache (#36138)" (#36156)
This reverts commit 1a8eefe09b.
2023-03-16 10:30:52 +01:00
Alec Scott
c29168eff1 openfst: add v1.8.2 (#36143) 2023-03-16 09:23:21 +01:00
Alec Scott
5ed1efab40 openal-soft: add v1.23.0 (#36144) 2023-03-16 09:23:05 +01:00
Alec Scott
887d70410d octave: add v8.1.0 (#36145) 2023-03-16 09:22:50 +01:00
Alec Scott
a9936141ee nginx: add v1.23.3 (#36146) 2023-03-16 09:22:31 +01:00
Alec Scott
5744fc3637 netdata: add v1.38.1 (#36147) 2023-03-16 09:21:54 +01:00
Alec Scott
b13c201f46 mpdecimal: add v2.5.1 (#36149) 2023-03-16 09:20:15 +01:00
Alec Scott
e2ab46251b mpc: add v1.3.1 (#36150) 2023-03-16 09:19:56 +01:00
Alec Scott
193c927bd2 mosh: add v1.4.0 (#36151) 2023-03-16 09:18:20 +01:00
Alec Scott
9d195da8ee mkfontscale: add v1.2.2 (#36152) 2023-03-16 09:18:04 +01:00
Alec Scott
132b89178e erlang: add v25.3 (#36153) 2023-03-16 09:17:47 +01:00
Adam J. Stewart
6491e08f5d qt-base: add qmake attribute (#36114) 2023-03-15 20:53:59 -05:00
kwryankrattiger
bb73dfc02e Hotfix: CI: Add CI target for gpu-test stack (#36136) 2023-03-15 21:13:02 -04:00
Howard Pritchard
64fa902ba6 UCX: make version support level more realistic (#36127)
Per feedback from the UCX community, we rarely do update
releases to anything but the current and one previous main
release stream.

Update comments in the UCX spack file to reflect this.

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-03-15 17:09:41 -04:00
Harmen Stoppels
1a8eefe09b minify spec.json in buildcache (#36138)
saves about 50% of data, which is significant
for hundreds of thousands of spec.json files
in our buildcaches.
2023-03-15 16:54:03 -04:00
Alec Scott
85d51bfd9a extrae: add v4.0.3 (#36059) 2023-03-15 15:24:38 -04:00
Alec Scott
e5d78e3780 libpipeline: add v1.5.7 (#36068) 2023-03-15 15:19:54 -04:00
Annop Wongwathanarat
99893a6475 wrf: fix patches for aarch64 config (#35984) 2023-03-15 12:40:00 +01:00
Annop Wongwathanarat
5f8f89b9c9 py-numpy: enable linking with armpl-gcc and acfl for BLAS and LAPACK (#35417)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-15 12:38:14 +01:00
Mosè Giordano
028535030c julia: Some improvements to the package (#36054) 2023-03-15 11:10:50 +01:00
Robert Blake
0e295afb1c cardioid: fix homepage (#36099) 2023-03-15 09:19:34 +01:00
Mark W. Krentel
e58c84e63e hpctoolkit: add branch 2023.03.stable (#36096) 2023-03-15 09:18:18 +01:00
Howard Pritchard
37904c3342 UCX: add 1.14.0 (#36098)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-03-15 09:17:55 +01:00
Adam J. Stewart
9f116c7bb1 GDAL: add v3.6.3 (#36097) 2023-03-15 09:16:48 +01:00
Shahzeb Siddiqui
b5f3b5bf78 Remove leftover command from documentation (#36116)
The command refers to dotkit files, which are not supported since a long time.
2023-03-14 20:48:28 -04:00
Erik Heeren
93887edba8 py-pyshacl: patch dependency typo (#36084)
* py-pyshacl: patch dependency typo

* py-pyshacl: satisfy flake8

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-14 20:18:27 -04:00
John W. Parent
cd42fc5cc8 Libogg and libtheora: build on windows (#35099)
Adds builders appropriate for building these packages on Windows.
It is intended that builds on other platforms are unaffected (e.g.
they build with Autotools as before on Linux).
2023-03-14 16:46:49 -07:00
Sajid Ali
9a1254063a Fix HDF5+mpi~fortran (#35400)
* HDF5+mpi~fortran
* fix style
2023-03-14 19:04:34 -04:00
Alec Scott
32f8ee6d58 libxfont: add v1.5.4 (#36072) 2023-03-14 18:59:34 -04:00
Harmen Stoppels
25239924fa postgresql: fix typo (#36115) 2023-03-14 18:00:27 -04:00
Erik Heeren
7b27cd2f94 py-pint: new versions (#36102)
* py-pint: new versions

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

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

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

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-14 18:00:01 -04:00
Gregory Lee
02e579d23d gobject-introspection 1.7.2 also requires libffi@:3.3 (#35606) 2023-03-14 14:05:40 -07:00
Matthias Wolf
6add885bb2 py-antspyx: new package (#30964)
* py-antspyx: new package

Also adds required dependencies.

Requires options to ITK to enable the right support libraries, and
patches to remove tune the setup and provide resources rather than
downloading libraries/"submodules" on the fly.

* Fix patch URL

* Style fixes.

* bump version and re-include `git clone ...` as resource
2023-03-14 16:51:38 -04:00
Harmen Stoppels
96b205ce6c environment.matching_spec: linear time traversal (#35534)
... and use colors in disambiguate message for clarity.

This commit avoids the loop:

```
for root in roots:
  for dep in deps(root):
    ...
```

instead it ensures each node is visited once and only once.

Also adds a small optimization when searching for concrete specs, since
we can assume uniqueness of dag hash, so it's fine to early exit.
2023-03-14 11:18:10 -07:00
Alec Scott
1711e186fe go: add v1.20.2 and v1.19.7 (#36065) 2023-03-14 18:28:57 +01:00
Rocco Meli
16f70ca78d pexsi: add v1.2 and v2.0 (#36049) 2023-03-14 16:02:11 +01:00
Alec Scott
2437a1d554 makedepend: add v1.0.8 (#36078) 2023-03-14 09:43:28 -04:00
Alec Scott
a6432bc770 armadillo: add v12.0.1 (#36051) 2023-03-14 09:43:04 -04:00
Alec Scott
ae6902b7ab looptools: add v2.16 (#36077) 2023-03-14 09:38:13 -04:00
Harmen Stoppels
40019dacd9 Use bfs in get_spec_filter_list (#36093) 2023-03-14 14:34:56 +01:00
Sangu Mbekelu
5c48304d07 new py-ultralytics package (#35890)
* new py-ultralytics package

* [@spackbot] updating style on behalf of Sangu-Mbekelu

* Update package.py

modified dependencies

---------

Co-authored-by: Sangu Mbekelu <s.mbekelu9@gmail.com>
2023-03-14 09:33:55 -04:00
Alec Scott
bab2f0a1b0 cbc: add v2.10.8 (#36055) 2023-03-14 09:23:43 -04:00
Alec Scott
ecc781fb3c libpcap: add v1.10.3 (#36067) 2023-03-14 09:19:49 -04:00
Harmen Stoppels
1691b7caac Fix typo affecting Gitlab CI (#36103)
Introduced in #35944
2023-03-14 14:18:05 +01:00
Seth R. Johnson
4f848f9200 vecgeom: new version 1.2.2 (#36085) 2023-03-14 08:48:18 -04:00
Alec Scott
08298b6766 mariadb-c-client: add v3.3.4 (#36079) 2023-03-14 08:37:58 -04:00
Alec Scott
11a509a40e man-db: add v2.11.2 (#36080) 2023-03-14 08:32:55 -04:00
Alec Scott
e3a7ad8112 libssh: add v0.8.9 (#36069) 2023-03-14 08:23:35 -04:00
Alec Scott
6efec2b2bd libxfont2: add v2.0.6 (#36073) 2023-03-14 08:16:00 -04:00
Alec Scott
ecd6fc00fd libtasn1: add v4.19.0 (#36071) 2023-03-14 08:07:12 -04:00
Alec Scott
87dc28a2f7 kmergenie: add v1.7051 (#36066) 2023-03-14 08:03:08 -04:00
Alec Scott
b2633e9057 fjcontrib: add v1.051 (#36060) 2023-03-14 08:02:46 -04:00
Alec Scott
116bc396c2 ccache: add v4.8 (#36056) 2023-03-14 08:02:23 -04:00
Alec Scott
39049e2bde hugo: add v0.111.3 (#36063) 2023-03-14 07:54:08 -04:00
Alec Scott
309969053e coinutils: add v2.11.6 (#36058) 2023-03-14 07:53:26 -04:00
Alec Scott
3fbd06023c cgl: add v0.60.6 (#36057) 2023-03-14 07:53:11 -04:00
Benjamin Meyers
853b964947 New packages: py-robocrys, py-matminer, py-pubchempy (#35941)
Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2023-03-14 07:27:51 -04:00
Harmen Stoppels
f7da7db9b2 use stage dir for buildcache create (#36091) 2023-03-14 09:35:47 +01:00
Michael Kuhn
5bae742826 concretizer: add mode to reuse dependencies only (#30990)
This adds a new mode for `concretizer:reuse` called `dependencies`,
which only reuses dependencies. Currently, `spack install foo` will
reuse older versions of `foo`, which might be surprising to users.
2023-03-14 09:22:20 +01:00
Rocco Meli
03636cd6ac Update MDAnalysis and addition of MDAnalysisTests (#36052)
* update mda dependencies

* apply black

* mdanalysis draft

* update

* small fixes

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-13 15:01:24 -05:00
nkgh77
ee1ea1f430 octave: better specification of MKL and AMDFFTW libraries (#35935) 2023-03-13 10:06:42 +01:00
Alec Scott
ff019f868b libiberty: add v2.40 (#36042) 2023-03-13 09:30:44 +01:00
Adam J. Stewart
2bbc6390dc py-earthengine-api: add v0.1.344 (#36053) 2023-03-13 09:27:15 +01:00
Harmen Stoppels
2107b6bf00 Set build_jobs dynamically in CI to avoid oversubscription (#35996)
Co-authored-by: Zack Galbreath <zack.galbreath@kitware.com>
Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
2023-03-13 08:29:58 +01:00
Alec Scott
31de7ea56c font-util: add v1.4.0 (#35860) 2023-03-12 21:24:01 +01:00
Jen Herting
55870efbcc New package: py-inflect (#35942)
Co-authored-by: Alex C Leute <aclrc@sporcsubmit.rc.rit.edu>
Co-authored-by: qwertos <qwertos@users.noreply.github.com>
2023-03-12 20:44:51 +01:00
Sangu Mbekelu
c38b463954 added a new verison of py-certifi (#35940)
Co-authored-by: Sangu Mbekelu <s.mbekelu9@gmail.com>
2023-03-12 10:52:17 -04:00
Michael Kuhn
5a4bc51bc0 cube: add 4.8 and 4.7.1 (#35959) 2023-03-12 11:38:32 +01:00
Massimiliano Culpo
528aca7c88 Revert "banner: add v3.5 (#36019)" (#36046)
This reverts commit 61af6b8f37.
2023-03-12 11:31:47 +01:00
Michael Kuhn
9fcfdf7a97 zstd: add v1.5.4 (#35438) 2023-03-12 05:42:20 -04:00
Greg Becker
66bf9bc7a6 cce compiler: bugfix for version regex to avoid conflation with apple-clang (#35974)
Currently apple-clang is detected as cce, and it should not be.
---------

Co-authored-by: becker33 <becker33@users.noreply.github.com>
2023-03-12 08:17:09 +00:00
Jonathon Anderson
dee5cb1aeb gloo: fix build on Linux >=6.0.3 (#35992) 2023-03-12 08:53:31 +01:00
Cameron Book
25666f9254 gsi-ncdiag: add new package (#35999) 2023-03-12 08:42:55 +01:00
Brian Van Essen
d78d112f18 aluminum, lbann: add new versions and deprecate old ones (#35954) 2023-03-12 08:40:13 +01:00
Alec Scott
1a97fddf5a at-spi2-core: add v2.47.90 (#36014) 2023-03-12 08:34:48 +01:00
Heiko Bauke
29d989a048 mpl: add v0.3.0 (#36015) 2023-03-12 08:33:27 +01:00
dependabot[bot]
79bba432df build(deps): bump docker/setup-buildx-action from 2.4.1 to 2.5.0 (#36008)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f03ac48505...4b4e9c3e2d)

---
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>
2023-03-12 08:32:17 +01:00
Alec Scott
ef4971d2e1 actsvg: add v0.4.30 (#36012) 2023-03-12 08:30:08 +01:00
Adam J. Stewart
1cc7ea651a py-torchmetrics: add v0.11.4 (#36016) 2023-03-12 08:29:41 +01:00
Alec Scott
16fd615fad autoconf-archive: add v2023.02.20 (#36017) 2023-03-12 08:29:02 +01:00
Alec Scott
61af6b8f37 banner: add v3.5 (#36019) 2023-03-12 08:28:17 +01:00
Alec Scott
7c3c6011de cni-plugins: add v1.2.0 (#36024) 2023-03-12 08:27:49 +01:00
Alec Scott
36d6660739 commons-lang3: add v3.12.0 (#36025) 2023-03-12 08:26:28 +01:00
Alec Scott
9199dabc0b cryptopp: add v8.7.0 (#36026) 2023-03-12 08:25:51 +01:00
Houjun Tang
9f6b2f8e96 HDF5-vol-async: add "memcpy" variant (#36013) 2023-03-12 08:25:11 +01:00
Alec Scott
ba1fd789e0 datamash: add v1.8 (#36027) 2023-03-12 08:24:16 +01:00
Alec Scott
013b2dec1e dbus: add v1.13.6 (#36028) 2023-03-12 08:23:42 +01:00
Alec Scott
d9cf959010 dbus-glib: add v0.112 (#36029) 2023-03-12 08:22:51 +01:00
Alec Scott
a76066ec42 gh: add v2.24.3 (#36032) 2023-03-12 08:21:58 +01:00
Alec Scott
8ce6a5355e ghostscript: add v10.0.0 (#36033) 2023-03-12 08:21:25 +01:00
Alec Scott
e61a1a6e74 hugo: add v0.111.2 (#36035) 2023-03-12 08:19:07 +01:00
Alec Scott
16d7270700 hydra: add v4.1.1 (#36036) 2023-03-12 08:18:34 +01:00
Alec Scott
e77e93b66a glab: add v1.26.0 (#36034) 2023-03-12 08:17:32 +01:00
Alec Scott
0c2a801ff2 libbson: add v1.23.2 (#36037) 2023-03-12 08:17:00 +01:00
Alec Scott
c84ce77969 libcap: add v2.67 (#36038) 2023-03-12 08:16:44 +01:00
Alec Scott
3464570b55 libdmx: add v1.1.4 (#36039) 2023-03-12 08:16:26 +01:00
Alec Scott
2a1428e5d4 libfontenc: add v1.1.7 (#36040) 2023-03-12 08:16:10 +01:00
Alec Scott
6f15cef281 libfs: add v1.0.9 (#36041) 2023-03-12 08:15:55 +01:00
Alec Scott
6fbda46c12 bazel: add v6.1.0 (#36020) 2023-03-12 08:14:25 +01:00
Adam J. Stewart
6c9d079cfb py-torch: NNPACK requires AVX2 (#35994) 2023-03-12 08:03:27 +01:00
Michael Kuhn
a741350e69 glib: add 2.74.6 (#35708) 2023-03-11 19:17:26 -05:00
Karen C. Tsai
fe5865da0d Add spackage for py-sphinx-rtd-dark-mode (#35946) 2023-03-11 14:27:23 -05:00
Mosè Giordano
1e9a654f17 curl: Allow compiling recent versions with MbedTLS 2 (#35947)
Curl 7.79 started supporting MbedTLS 3, but it did not drop support for v2.
2023-03-11 14:17:13 -05:00
Harmen Stoppels
844701b974 get --dev and drop set -x (#36010) 2023-03-10 22:59:57 -08:00
Alec Scott
1d081565db gmake: add v4.4.1 (#35872)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-03-11 01:14:27 -05:00
eugeneswalker
39abe69c97 py-exarl: new package (#35828)
* py-exarl: new package

* fix style

* extend copyright to 2023

* add maintainer
2023-03-10 18:26:00 -08:00
Alec Scott
f5228cf59c go: refactor bootstrapping process (#35823)
* Refactor go bootstrapping to include binary or gcc bootstrap
2023-03-10 16:27:49 -08:00
Harmen Stoppels
08d7f47278 curl flag is not universally supported (#36009) 2023-03-10 16:20:32 -08:00
Alec Scott
92c6112991 gdk-pixbuf: add v2.42.10 (#35867) 2023-03-10 18:02:56 -05:00
Alec Scott
3605105cf1 editres: add v1.0.8 (#35854) 2023-03-10 18:02:36 -05:00
Harmen Stoppels
26fd1ac5b0 hotfix: fix double double quotes (#36005) 2023-03-10 13:41:01 -08:00
Zack Galbreath
e1301df60c ci: version bump for ghcr.io/spack/e4s-amazonlinux-2 (#35976)
* ci: version bump for ghcr.io/spack/e4s-amazonlinux-2

This new image comes with GnuPG v2.4.0

* py-cython: upperbounds for Python versions

* fix py-gevent nonsense

---------

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2023-03-10 13:32:11 -08:00
kwryankrattiger
181bb54372 Hotfix: Fix CI unit test after CI refactor (#36004)
* Hotfix: Fix CI unit test after CI refactor
2023-03-10 13:31:40 -08:00
kwryankrattiger
f3595da600 CI boilerplate reduction (#34272)
* CI configuration boilerplate reduction and refactor

Configuration:
- New notation for list concatenation (prepend/append)
- New notation for string concatenation (prepend/append)
- Break out configuration files for: ci.yaml, cdash.yaml, view.yaml
- Spack CI section refactored to improve self-consistency and
composability
  - Scripts are now lists of lists and/or lists of strings
  - Job attributes are now listed under precedence ordered list that are
  composed/merged using Spack config merge rules.
  - "service-jobs" are identified explicitly rather than as a batch

CI:
- Consolidate common, platform, and architecture configurations for all CI stacks into composable configuration files
- Make padding consistent across all stacks (256)
- Merge all package -> runner mappings to be consistent across all
stacks

Unit Test:
- Refactor CI module unit-tests for refactor configuration

Docs:
- Add docs for new notations in configuration.rst
- Rewrite docs on CI pipelines to be consistent with refactored CI
workflow

* Script verbose environ, dev bootstrap

* Port #35409
2023-03-10 12:25:35 -07:00
Scott Wittenburg
16c67ff9b4 ci: Increase the amount of pruning possible for PR pipelines (#35944)
By setting the traversal depth to 1, only specs matching the changed
package and direct dependents of those (and of course all dependencies
of that set) are removed from pruning candidacy.
2023-03-10 11:19:52 -08:00
Alec Scott
ce7409bbf7 feh: add v3.9.1 (#35858) 2023-03-10 11:08:50 -08:00
kwryankrattiger
369914c3e1 Add packages OSPRay, rkcommon, Open VKL, and Open Image Denoise (#35530) 2023-03-10 19:35:46 +01:00
Matthew Thompson
64e0ca5a89 Update yaFyaml, pFlogger, and gFTL versions, add list_url (#35968)
* Update yaFyaml, pFlogger, and gFTL versions
* Add list_url
2023-03-10 09:57:15 -08:00
Erik Heeren
51a5377ceb py-deap: newer version can use newer setuptools (#35986)
* py-deap: newer version can use newer setuptools

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-10 10:57:36 -05:00
H. Joe Lee
243627104e scons: add version 4.5.1. (#35990) 2023-03-10 10:47:52 -05:00
Adam J. Stewart
e817b0b9d0 py-scikit-learn: add v1.2.2 (#35982) 2023-03-10 06:38:49 -05:00
Valentin Volkl
eb59097576 rivet: remove tag (deleted by upstream developers) (#35971) 2023-03-10 04:58:16 -05:00
SXS Bot
73c1f3f893 spectre: add v2023.03.09 (#35972)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2023-03-10 04:53:09 -05:00
nicolas le goff
566fb51d71 cgns: enable tools (#35713) 2023-03-10 08:59:23 +01:00
Paul R. C. Kent
617f44f9ed QMCPACK v3.16.0 (#35967) 2023-03-09 19:53:58 -05:00
Greg Becker
a51f4b77d9 reorder_flags: properly handle flags from concrete reused specs (#35951) 2023-03-09 16:46:47 -08:00
Michael Kuhn
9e6afc7dec scalasca: add 2.6.1 (#35970) 2023-03-09 15:13:53 -05:00
Matthieu Dorier
68874a72fb [liburing] Adds liburing package (#35762)
* [liburing] Adds liburing package
* Update var/spack/repos/builtin/packages/liburing/package.py
* [liburing] Added conflicts for darwin and windows platforms

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-03-09 11:03:32 -08:00
Harshula Jayasuriya
e560beed19 concretizer.yaml: document valid values for granularity (#35961) 2023-03-09 19:51:11 +01:00
Vanessasaurus
de586bb66c Automated deployment to update package flux-core 2023-03-09 (#35956)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2023-03-09 10:25:57 -08:00
Michael Kuhn
846cd05c7e scorep: fix dependencies (#35966)
The overlapping dependency version ranges caused the concretizer to pick
version 7.1 even though version 8.0 is available:
```
==> Error: No version for 'cubelib' satisfies '@4.7.1' and '@4.8'
```

Moreover, Score-P 8.0 requires libbfd:
```
configure: error: bfd.h required
```
2023-03-09 10:12:37 -08:00
Alec Scott
1ef313b604 bdftopcf: add v1.1 (#35845) 2023-03-09 11:40:25 -05:00
Rocco Meli
73026f4f4b Deprecate elpa rc2 (#35953) 2023-03-09 09:28:14 -05:00
Alec Scott
08dd6d1a21 fontconfig: add v2.14.2 (#35861) 2023-03-09 09:13:07 -05:00
Mark W. Krentel
e9173a59fd hpctoolkit: adjust dependency and conflict for xz (#35950)
Hpctoolkit doesn't build cleanly with xz 5.2.7 and 5.2.8 due to a
misuse of the symver attribute.  This is now fixed in 5.2.9 and later.
2023-03-09 08:37:21 -05:00
Benjamin Meyers
7401c97037 New packages: py-fireworks, py-flask-paginate (#35939)
* New packages: py-fireworks, py-flask-paginate

* [@spackbot] updating style on behalf of meyersbs
2023-03-09 04:54:26 -05:00
Benjamin Meyers
15433cfaf1 New package py-custodian (#35938)
* New package py-custodian

* [@spackbot] updating style on behalf of meyersbs
2023-03-09 04:50:31 -05:00
Benjamin Meyers
99aa0ef0cd Update py-boltons (#35937) 2023-03-09 04:46:25 -05:00
Alec Scott
28934e5f77 gawk: add v5.2.1 (#35863) 2023-03-08 21:36:43 -05:00
Michael Kuhn
f08598427d git: add 2.39.2 (#35911) 2023-03-08 19:40:16 -05:00
Michael Kuhn
cc4f7c224a libuv-julia: fix mtime again (#35945)
On some systems touch runs out of order,
so set a equal mtimes to the relevant files
2023-03-08 19:02:38 -05:00
Maciej Wójcik
ee5b2936e4 gcc: Patch building of GCC 5.1-12.1 with glibc >= 2.36 (#35798) 2023-03-08 22:29:57 +01:00
Teo
f7a6446d3f Halide: Add 15.0.0 (#35924) 2023-03-08 16:22:16 -05:00
Tamara Dahlgren
624e28ee03 nek5000/nekcem: test_install -> check_install (#35925) 2023-03-08 16:05:29 -05:00
Auriane R
784e5f5789 Add pika 0.13.0 and pika-algorithms 0.1.2 (#35933)
* Add last release of pika-algorithms + version constraint

* Add pika release 0.13.0
2023-03-08 16:05:11 -05:00
Michael Kuhn
180618b25a p7zip: update checksum for 17.05 (#35923)
See https://github.com/p7zip-project/p7zip/issues/220
2023-03-08 16:04:57 -05:00
Emil Briggs
aefcce51fc rmgdft: add version 5.0.5 (#35922)
* Updated for version 5.0.5.
2023-03-08 15:59:09 -05:00
Weiqun Zhang
884a356b1e amrex: add v23.03 (#35765) 2023-03-08 15:45:16 -05:00
Jean-Baptiste Besnard
ee69f2d516 intel-mpi-benchmarks: variant and conflicts fixes (#35670) 2023-03-08 15:33:28 -05:00
renjithravindrankannath
bc5bb06f1f Provide openmp from rocm-open-extras when tensile uses openmp (#35767)
* Provide openmp from rocm-open-extras when tensile uses openmp
* Correcting audit check failure in rocm-openmp-extras dependency
* Fixing style check error
* rocm-openmp-extras required instead of llvm-amdgpu both varient
2023-03-08 09:57:35 -08:00
Peter Scheibel
1b8561f752 add logging to help users debug where external file searches are taking a long time (#35900) 2023-03-08 09:46:13 -08:00
nicolas le goff
7d54c24939 qwt: lift restrictions on qt version and added an opengl variant and VisIt use (#35734) 2023-03-08 18:38:33 +01:00
Robert Underwood
960923287d gdb: version 13.1 and debuginfod support (#35769)
* gdb: version 13.1 and debuginfod
* gdb: update to autotools helpers

---------

Co-authored-by: Robert Underwood <runderwood@anl.gov>
2023-03-08 08:54:47 -08:00
Scott Wittenburg
4a9ffdcfa2 gitlab ci: Provide a knob to control untouched spec pruning (#35274)
When untouched spec pruning is enabled, specs possibly affected
by a change cannot be pruned from a pipeline.

Previously spack looked at all specs matching changed package
names, and traversed dependents of each, all the way to the
environment root, to compute the set of environment specs
possibly affected by a change (and thus, not candidates for
pruning).

With this PR, when untouched spec pruning is enabled, a new
environment variable can control how far towards the root spack
traverses to compute the set of specs possibly affected by a
change.  SPACK_UNTOUCHED_PRUNING_DEPENDENT_DEPTH can be set
to any numeric value before the "spack ci generate" command
is called to control this traversal depth parameter.  Setting
it to "0" traverses only touched specs, setting it to "1"
traverses only touched specs and their direct dependents, and
so on.  Omitting the variable results in the previous behavior
of traversing all the way to the root.  Setting it to a negative
value means no traversal is done, and always yields an empty
set of possibly affected specs (which would result in the max
pruning possible).
2023-03-08 09:38:07 -07:00
Harmen Stoppels
22d4e79037 buildcache create: reproducible tarballs (#35623)
Currently `spack buildcache create` creates compressed tarballs that
differ between each invocation, thanks to:

1. The gzip header containing mtime set to time.time()
2. The generated buildinfo file which has a different mtime every time.

To avoid this, you have to explicitly construct GZipFile yourself, since
the Python API doesn't expose the mtime arg, and we have to manually
create the tarinfo object for the buildinfo metadata file.

Normalize mode: regular files & hardlinks executable by user, dirs, symlinks: set 0o755 permissions in tarfile; other files use 0o644
2023-03-08 15:51:55 +00:00
Sangu Mbekelu
2777ca83eb new py-thop package (#35889)
* "new py-thop package"

* [@spackbot] updating style on behalf of Sangu-Mbekelu

* Update package.py

modified the url and dependencies

---------

Co-authored-by: Sangu Mbekelu <s.mbekelu9@gmail.com>
2023-03-08 09:12:27 -06:00
Erik Heeren
a2423f5736 py-openmesh: new package (#35907)
* py-openmesh: new package

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-08 09:11:34 -06:00
Aaron Black
81765e0278 mfem: add missing cublas for cuda support (#35608) 2023-03-08 09:14:46 -05:00
Erik Heeren
0d4f9b26b8 py-parse-type: new package (#35909) 2023-03-08 07:13:30 -05:00
Gerhard Theurich
87c21a58d1 parallelio: new version (#35553) 2023-03-08 07:13:13 -05:00
Alberto Invernizzi
5900378cff newly released 0.8.3 (#35910) 2023-03-08 07:05:13 -05:00
Massimiliano Culpo
d54611af2c Split satisfies(..., strict=True/False) into two functions (#35681)
This commit formalizes `satisfies(lhs, rhs, strict=True/False)`
and splits it into two functions: `satisfies(lhs, rhs)` and
`intersects(lhs, rhs)`.

- `satisfies(lhs, rhs)` means: all concrete specs matching the
   left hand side also match the right hand side
- `intersects(lhs, rhs)` means: there exist concrete specs
   matching both lhs and rhs.

`intersects` now has the property that it's commutative,
which previously was not guaranteed.

For abstract specs, `intersects(lhs, rhs)` implies that
`constrain(lhs, rhs)` works.

What's *not* done in this PR is ensuring that
`intersects(concrete, abstract)` returns false when the
abstract spec has additional properties not present in the
concrete spec, but `constrain(concrete, abstract)` will
raise an error.

To accomplish this, some semantics have changed, as well
as bugfixes to ArchSpec:
- GitVersion is now interpreted as a more constrained
  version
- Compiler flags are interpreted as strings since their
  order is important
- Abstract specs respect variant type (bool / multivalued)
2023-03-08 13:00:53 +01:00
Benjamin Meyers
39adb65dc7 New package: py-imbalanced-learn (#35895)
* New package: py-imbalanced-learn

* Fix typo

* [@spackbot] updating style on behalf of meyersbs

* Update var/spack/repos/builtin/packages/py-imbalanced-learn/package.py

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-08 07:00:09 -05:00
Rocco Meli
db15e1895f bump elpa (#35908) 2023-03-08 06:59:52 -05:00
Benjamin Meyers
7610926e5e Update and fix py-meldmd (#35783)
* Update/fix py-meldmd; update openmm

* Restrict filter_file based on openmm version

* Updates based on Adam's feedback

* [@spackbot] updating style on behalf of meyersbs

* Break up long filter_file

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-08 06:59:35 -05:00
Benjamin Meyers
703f687ca0 Update py-seaborn to @0.12.2 (#35896) 2023-03-08 06:54:17 -05:00
Annop Wongwathanarat
983a56e729 gromacs: add sve variant on aarch64 (#35614) 2023-03-08 10:25:36 +01:00
Brian Vanderwende
cbd0770497 ESMF should use Spack wrappers directly (#35749) 2023-03-08 10:21:51 +01:00
Tamara Dahlgren
b06648eb64 docs: added platform conflicts example, fix quotes (#35771) 2023-03-08 10:10:01 +01:00
QuellynSnead
80d784c401 singularity-eos: (#35625)
The Cray fortran compiler names fortran modules in uppercase by
default. Compile with the "-ef" flag to produce the lowercase
name that singularity-eos is expecting.
2023-03-08 09:58:34 +01:00
downloadico
5b3ad0adaa pgplot: made dependent packages set environment variables from pgplot (#35803) 2023-03-08 09:48:12 +01:00
Richard Berger
3feadc0a36 lammps: GPU/Kokkos package updates (#35885) 2023-03-08 09:46:05 +01:00
Alec Scott
8ec86e05c4 ico: add v1.0.6 (#35881) 2023-03-08 09:33:22 +01:00
Alec Scott
b34fd98915 ftxui: add v4.0.0 (#35868) 2023-03-08 09:33:08 +01:00
Tim Haines
a93d143f17 boost: add v1.81.0 (#34613) 2023-03-08 09:28:17 +01:00
Alec Scott
d0ced9da94 lucene: add v9.5.0 (#35917) 2023-03-08 09:12:51 +01:00
Harmen Stoppels
c37d6f97dc compiler wrapper: parse Wl and Xlinker properly (#35912)
Two fixes:

1. `-Wl,a,b,c,d` is a comma separated list of linker arguments, we
   incorrectly assume key/value pairs, which runs into issues with for
   example `-Wl,--enable-new-dtags,-rpath,/x`
2. `-Xlinker,xxx` is not a think, so it shouldn't be parsed.
2023-03-08 09:03:31 +01:00
Adam J. Stewart
ec73157a34 py-mypy: add v1.1.1 (#35926) 2023-03-08 08:16:01 +01:00
Alec Scott
e447c365ee help2man: add v1.49.3 (#35877) 2023-03-08 02:01:58 -05:00
Alec Scott
c5c67145d3 iso-codes: add v4.13.0 (#35915) 2023-03-08 01:18:10 -05:00
Alec Scott
a5bc83d635 httpie: add v3.2.1 (#35879)
* httpie: add v3.2.1

* Add additional 3.2.1 dependencies to httpie

* Add version condition to dependency

* Reorder dependencies for efficiency

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-08 01:05:44 -05:00
Alec Scott
1760553b70 lua-luaposix: add v36.1 (#35918) 2023-03-08 00:30:28 -05:00
Alec Scott
62d9bf5fef listres: add v1.0.5 (#35921) 2023-03-07 22:12:35 -05:00
Alec Scott
cb49da1b6f lndir: add v1.0.4 (#35920) 2023-03-07 21:54:19 -05:00
Alec Scott
c79d9ac5bd erlang: add v25.2 (#35856) 2023-03-07 20:29:52 -05:00
Alec Scott
871ca3e805 jchronoss: add v1.2.1 (#35916) 2023-03-07 19:58:21 -05:00
Harmen Stoppels
89176bd3f6 libxc: use gitlab release tarballs for v6.0.0 and greater (#35894)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-03-07 19:57:59 -05:00
Alec Scott
b29a607ceb isl: add v0.25 (#35884) 2023-03-07 18:03:01 -05:00
Alec Scott
0c06ecc711 iceauth: add v1.0.9 (#35880) 2023-03-07 18:02:45 -05:00
Alec Scott
73d1e36da5 imake: add v1.0.9 (#35882) 2023-03-07 18:02:29 -05:00
Erik Heeren
0d57c2ab24 py-numpy-stl: new package (#35892) 2023-03-07 18:02:13 -05:00
Alec Scott
272e69b2fd htslib: add v1.17 (#35883) 2023-03-07 18:01:58 -05:00
Alec Scott
8efde89c0e hivex: add v1.3.23 (#35878) 2023-03-07 18:01:43 -05:00
Alec Scott
c7ec47c658 graphviz: add v7.1.0 (#35876) 2023-03-07 17:56:08 -05:00
Alec Scott
013e82f74f grep: add v3.9 (#35875) 2023-03-07 17:55:46 -05:00
Alec Scott
fff7e6d626 gradle: add v8.0.2 (#35873) 2023-03-07 17:50:06 -05:00
Alec Scott
ac1fe8765a gprolog: add v1.5.0 (#35874) 2023-03-07 17:23:21 -05:00
Alec Scott
acbf46d786 glpk: add v5.0 (#35871) 2023-03-07 17:22:56 -05:00
Alec Scott
a753fa12fb gegl: add v0.4.42 (#35866) 2023-03-07 17:22:35 -05:00
Alec Scott
27b2dc1608 fonttosfnt: add v1.2.2 (#35862) 2023-03-07 17:16:43 -05:00
Alec Scott
d8f8b42bcb fslsfonts: add v1.0.6 (#35869) 2023-03-07 16:58:59 -05:00
Alec Scott
3995428ad2 gatk: add v4.3.0.0 (#35864) 2023-03-07 16:53:15 -05:00
Alec Scott
76d41b7f9f fstobdf: add v1.0.7 (#35870) 2023-03-07 16:36:08 -05:00
Samuel Li
a7501105b1 update SPERR package (#35810)
* update SPERR package
* remove blank line
* update SPERR package
* remove blank line
---------

Co-authored-by: Samuel Li <Sam@Navada>
2023-03-07 12:26:43 -08:00
Adam J. Stewart
da33334488 py-pytorch-lightning: add v1.9.4 (#35791) 2023-03-07 12:08:47 -08:00
Adam J. Stewart
68dfcd10e6 py-pytorch-lightning: torch~distributed not supported in 1.9.0 (#35809) 2023-03-07 12:05:39 -08:00
Alec Scott
4e6a8a40b7 cloog: add v0.18.4 (#35849) 2023-03-07 11:55:00 -08:00
Alec Scott
20f663d089 dnsmasq: add v2.89 (#35851) 2023-03-07 11:54:37 -08:00
Cody Balos
acf61daf99 sundials: add new version (#35796) 2023-03-07 11:52:05 -08:00
Alec Scott
a0233d2560 cmocka: add v1.1.7 (#35848) 2023-03-07 11:49:42 -08:00
Alec Scott
8c989e0aee apr: add v1.7.2, apr-util 1.6.3 (#35832)
* apr: add v1.7.2
* apr-util: add v1.6.3
2023-03-07 11:48:39 -08:00
Alec Scott
2f5e7fb38c awscli: add v1.27.84 (#35836)
* awscli: add v1.27.84

* Add botocore dependency to awscli

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

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

* Add py-botocore@1.29.84 dependency

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-07 13:38:17 -06:00
Alec Scott
b9bc911921 cget: add v0.2.0 (#35846) 2023-03-07 13:10:56 -05:00
Alec Scott
462df718ff bc: add v1.07.1 (#35844) 2023-03-07 13:10:33 -05:00
Alec Scott
b20271a8e8 code-server: add v4.10.1 (#35855) 2023-03-07 12:06:01 -05:00
Alec Scott
a62992b4b1 easybuild: add v4.7.0 (#35853)
* easybuild: add v4.7.0

* Add v0.4.7 to all easybuild dependencies

* Reorder versions newest to oldest

* Fix styling on easybuild dependency loop
2023-03-07 12:05:39 -05:00
Alec Scott
818459e6fc dash: add v0.5.12 (#35850) 2023-03-07 11:48:05 -05:00
Alec Scott
38bd499c09 colordiff: add v1.0.21 (#35847) 2023-03-07 11:47:43 -05:00
Alec Scott
f9de4c2da8 aspell: add v0.60.8 (#35834) 2023-03-07 11:47:21 -05:00
Rocco Meli
335ae31a59 Update biopython, gsd, and griddataformats (#35827)
* update mda dependencies

* apply black

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

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

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

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

* remove numpy upper bound

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

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-07 11:47:04 -05:00
Alec Scott
c4e5ee8831 beforelight: add v1.0.6 (#35843) 2023-03-07 11:32:17 -05:00
Alec Scott
73c358819b busybox: add v1.36.0 (#35840) 2023-03-07 11:31:52 -05:00
Alec Scott
6f396aff99 bitmap: add v1.1.0 (#35839) 2023-03-07 11:20:26 -05:00
Alec Scott
047b99fab9 blktrace: add v1.3.0 (#35842) 2023-03-07 10:56:31 -05:00
Alec Scott
a12a290ee1 bmake: add v20230303 (#35841) 2023-03-07 10:56:05 -05:00
Alec Scott
bd6c9085f0 atk: add v2.38.0 (#35833) 2023-03-07 10:55:48 -05:00
Alec Scott
c0a0d60378 appres: add v1.0.6 (#35831) 2023-03-07 10:55:29 -05:00
Alec Scott
bc84ca126e ace: add v7.1.0 (#35829) 2023-03-07 10:55:08 -05:00
Alec Scott
3bb7570e02 alglib: add v3.20.0 (#35830) 2023-03-07 10:44:09 -05:00
Adam J. Stewart
a5b80662ae py-matplotlib: add v3.7.1 (#35822) 2023-03-06 19:02:20 -05:00
John W. Parent
0c5360e3fd Proj: to CMake (#35108)
* update proj

* re-add autotools support

* style

* Setup env in builders

* Drop direct windows conflict for older versions

* Default to CMake

Add new style class definiton

* Proj: setup_run_environment in package not builder

* Proj: move run env changes to pkg, rm cmake arg

* Set PROJ_LIB during build

* Style

* Rm redundant configure arg
2023-03-06 17:23:34 -05:00
Greg Becker
2ff337a2a5 compiler flags: fix multiple compilers with different flags (#35721)
Currently, if two compilers with the same spec differ on the flags, the concretizer will:

1. mix both sets of flags for the spec in the ASP program
2. error noting that the set of flags from the compiler (both of them) doesn't match the set from the lower priority compiler

This PR fixes both -- only flags from the highest priority compiler with a given spec are considered.
2023-03-06 10:29:48 -08:00
Erik Heeren
f3841774f7 py-elasticsearch: new versions (#35764)
* py-elasticsearch: new versions

Also add py-elastic-transport as a new dependency

* py-elasticsearch: py-urllib3 is no longer a dependency

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-06 10:30:31 -06:00
Alec Scott
97c2dd3a5a Add Hugo v0.111.1 (#35824) 2023-03-05 18:33:23 +01:00
Alec Scott
3aae80ca07 curl: add v7.88.1 and deprecate previous versions due to CVEs (#35825)
* curl: add v7.88.1 and deprecate previous versions due to CVEs

* Add self as a maintainer to curl
2023-03-05 18:32:56 +01:00
Alec Scott
973bc92813 libarchive: add v3.6.2 and deprecate previous versions due to CVE-2022-36227 (#35826) 2023-03-05 18:22:41 +01:00
Todd Gamblin
42a02411b4 windows: use sys.platform == "win32" instead of is_windows (#35640)
`mypy` only understands `sys.platform == "win32"`, not indirect assignments of that
value to things like `is_windows`. If we don't use the accepted platform checks, `mypy`
registers many Windows-only symbols as not present on Linux, when it should skip the
checks for platform-specific code.
2023-03-05 07:58:05 -08:00
Erik Heeren
4561536403 py-simpervisor: correct pypi (#35785) 2023-03-04 10:44:03 -06:00
MicK7
6b694749d3 Update python linting packages (#35811)
* add 2.14.2 py-astroid version

* add py-pylint 2.26.2

* fix black

* fix py-dill depends_on

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

* fix py-astroid minor versionning

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

* modify typing_extensions depends_on

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-03 16:06:56 -06:00
MatthewLieber
c0f48b30cf Start using paths found in extra_rpaths in compilers.yaml when building (#35376)
* Start using paths found in extra_rpaths in compilers.yaml when building

* running black and changing maintainer list

* changing import order to pass isort

---------

Co-authored-by: Matthew Lieber <lieber.31@osu.edu>
2023-03-03 13:29:59 -08:00
Massimiliano Culpo
046416479a Polish spack.util.environment (#35812)
Update `spack.util.environment` to remove legacy idioms.
* Remove kwargs from method signature and use a class for traces
* Uppercase a few global variables
* spack.util.environment: add type-hints
* Improve docstrings
* Fixed most style issues reported by pylint
2023-03-03 16:17:27 -05:00
Lucas Frérot
b17113b63d snakemake: added versions 7.19.0-7.22.0 (#35535)
* snakemake: added versions 7.19.0-7.22.0

* snakemake: corrected +reports dependencies
2023-03-03 12:46:29 -06:00
Loïc Pottier
479f5a74a3 py-ipdb: updating versions (#35654)
* py-ipdb: updating versions

Signed-off-by: Loïc Pottier <pottier1@llnl.gov>

* py-ipdb: fixing versions problem and deleting 10.1 which is too old for Python > 3.6

Signed-off-by: Loïc Pottier <pottier1@llnl.gov>

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

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

* py-ipdb: removed useless dependencies

Signed-off-by: Loïc Pottier <pottier1@llnl.gov>

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

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

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

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

* py-ipdb: missing @

Signed-off-by: Loïc Pottier <pottier1@llnl.gov>

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

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

---------

Signed-off-by: Loïc Pottier <pottier1@llnl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-03 05:28:40 -05:00
kwryankrattiger
895886959f CI: Fix timeout for VisIt and ParaView (#35787)
ref. #35400
2023-03-03 09:13:14 +01:00
Jean Luca Bez
0bdb0b07fd update github URL (#35789) 2023-03-03 00:23:23 -05:00
Ishaan Desai
817b59900a Update pyprecice v2.5.0.2 (#35788)
* Update versions 2.5.0.0 and 2.5.0.1

* Applying review changes

* Updating incorrect checksum for v2.4.0.0

* Add for loop to define depends_on for preCICE versions and bindings versions

* Formatting

* Missing comma

* Add pyprecice v2.5.0.2
2023-03-03 00:19:17 -05:00
Erik Heeren
2ddd66ca48 py-jupyter-server-proxy: fix dependency condition (#35784)
Too much copypasta
2023-03-03 00:18:31 -05:00
H. Joe Lee
7ddd796f89 scons: add a new version (#35652)
* scons: add a new version

* scons: address @adamjstewart review
2023-03-02 15:14:59 -06:00
downloadico
1e2ef16b39 Add e3sm scorpio (#35794)
* e3sm-scorpio: add e3sm-scorpio package
   This is the Scorpio package from the e3sm.org site.
* fixed style errors
* removed unneeded dependency on cmake
2023-03-02 15:48:55 -05:00
Adam J. Stewart
77355fd348 py-nbstripout: add new package (#35786) 2023-03-02 10:47:48 -07:00
Adam J. Stewart
1facf99f51 py-rtoml: add new package (#35780) 2023-03-02 09:43:36 -08:00
Robert Underwood
07c8939679 julia: fix for libuv and Julia (#35776)
Use correct `shlib_symbol_version` for Julia 1.8, work around issue where libuv-julia's git checkout has arbitrary mtime, causing make to regenerate configure scripts, sometimes.
2023-03-02 16:36:55 +01:00
Erik Heeren
28f4b5729a py-chart-studio: new package (#35759)
* py-chart-studio: new package

* py-chart-studio: add missing six dependency
2023-03-02 08:40:37 -06:00
M. Eric Irrgang
dd7af323ed Add a py-gmxapi package. (#35738)
* Add a `py-gmxapi` package.

This package provides the Python package for the GROMACS
public API. The Python package is not strongly coupled to
a specific GROMACS _version_, but its compiled extension module
is strongly coupled to a specific GROMACS _installation_.

* Update conflict info.

In order to allow `^gromacs@2022.1` while rejecting `^gromacs@2022`,
we need to compare to `gromacs@2022.0`.

* Apply suggestions from code review

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

* Apply suggestions from code review.

* Simplify build system structure.
* Update dependencies for completeness.

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

Per code review, pretend gmxapi <0.4 doesn't exist, for simplicity.

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

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-02 08:37:17 -06:00
Axel Huebl
2ba1f700e6 WarpX: add v23.03 (#35775)
Update `warpx` & `py-warpx` to the latest release.
2023-03-02 04:19:08 -08:00
Adam J. Stewart
739ab89b65 py-kornia: add v0.6.10 (#35554) 2023-03-02 01:08:39 -08:00
Adam J. Stewart
7e5099627f py-pytorch-lightning: add v1.9.3 (#35629) 2023-03-02 00:23:34 -08:00
Brian Van Essen
eb29889f6e Detection of Cray's slingshot detection has relied on the presence of (#35779)
a shared library /lib64/libcxi.so, which seems to also appear on other
non-slingshot systems.  This patch also checks to make sure that there
is a Cray programming enviornment in /opt/cray/pe in addition to the
shared library.
2023-03-01 23:19:20 -08:00
Dmitriy
ae27df4113 Add py-mpi4py as a dependency for henson (#35743)
* Add py-mpi4py as a dependency

* Add maintainers per spackbot's request

* Add type=(build,run) per adamjstewart's suggestion
2023-03-01 22:43:31 -08:00
Adam J. Stewart
ae2c8c02a2 py-torchgeo: kornia backwards-incompatible change (#35570) 2023-03-01 22:13:23 -08:00
Adam J. Stewart
caff9e4292 py-scipy: add v1.10.1 (#35581) 2023-03-01 16:04:23 -08:00
Harmen Stoppels
beb3414b4d py-pygments 2.12; fix py-docutils, again (#35394)
* py-pygments 2.12; fix py-docutils, again

`2.12` is the latest for which our style hack works, beyond that we need
our own package to make a plugin.

Old docutils needs old setuptools

* py-setuptools is always a dep

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

* Update the range

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-01 15:53:41 -08:00
Alex Richert
ed07cee852 Add capitalized symlinks for libesmf.{a,so} (#35774)
* Add capitalized symlinks for libesmf.{a,so}
* Add import of lib suffixes
2023-03-01 15:28:46 -08:00
Rémi Lacroix
7c1a164219 GitHub CLI: Add version 2.23.0 (#35761) 2023-03-01 13:59:28 -08:00
Howard Pritchard
18e0b893f2 papi: more fixes for Intel OneAPI compiler (#34048)
The Intel OneAPI's extreme pickiness continues to bring out
buggy/noncompliant code.

This patch fixes an error in the configure.in embedded 'c' test code
and also in a file with an initialized, but unused, variable.

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-03-01 13:33:55 -08:00
Garth N. Wells
df5b25764b Update FEniCSx libraries to v0.6 (#35600)
* Updates to release 0.6.

* Dep updates

* Dep version fix

* Another version fix

* Fix typo

* UFL version fix

* Update var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py

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

* Update var/spack/repos/builtin/packages/py-fenics-ffcx/package.py

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

* Some updates following review

* Update var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py

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

* More updates

* More updates

* build/run updates

* Small fix

* Fix version number.

* specify lower bounds for python dependencies

* address style issues

* address style issues

* address PR comments

* amend setuptools dependency to be of type build only

* amend setuptools dependency to be of type run and build for ffcx and ufl

* add build dependency to ensure import tests pass

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Matthew Archer <ma595@cam.ac.uk>
2023-03-01 13:18:23 -08:00
Tiziano Müller
44705b0a6e cp2k: fix builds on macOS, workaround reported issue with __contains__ (#35584)
Co-authored-by: Robert Cohn <rscohn2@gmail.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-03-01 12:01:00 -08:00
Erik Heeren
3bb03ea7d1 py-dbf: new versions and dependency (#35760) 2023-03-01 10:49:27 -08:00
luker
3c411bf135 Fix superlu-dist package for cray fortran (#35728)
The superlu-dist code developers modified the code such that the patch
is no longer needer for `@7.2.0:`  (the patch will actually fail)
2023-03-01 10:49:06 -08:00
Erik Heeren
f2363c1cb5 Py dask mpi (#35679)
* py-dask-mpi: new package with dependencies

* py-hatch-jupyter-builder is not needed after all

* skip_modules seems cleaner

* Update var/spack/repos/builtin/packages/py-jupyter-server-proxy/package.py

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-01 11:35:55 -06:00
Adam J. Stewart
7188eeb604 py-fiona: add upper bounds to Python versions (#35658)
* py-fiona: add upper bounds to Python versions

* Add error msg
2023-03-01 09:53:20 -06:00
Adam J. Stewart
583d89e95a Simplify spack help --spec output (#35626) 2023-03-01 16:26:59 +01:00
Mosè Giordano
4a24401ed0 wrf: Fix compilation with GCC 10+ (#35177)
Flags `-fallow-argument-mismatch -fallow-invalid-boz` set in `FFLAGS`/`FCFLAGS`
environment variables don't really have effect in older versions of WRF, we need
to force them in the compiler wrappers.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-03-01 07:14:42 -08:00
Wouter Deconinck
2796794b19 py-particle: new versions 0.16.*, 0.20.*, 0.21.* (#35547)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-01 14:49:37 +01:00
Wouter Deconinck
dd854e86d9 sartre: new package (#32713) 2023-03-01 14:36:16 +01:00
Valentin Volkl
1500246ab7 vc: improvements for testing (#28887) 2023-03-01 14:29:43 +01:00
MatthewLieber
206cd94c0b mvapich2-gdr/mvapich2x: add v2.3.7, update package config (#33066)
Co-authored-by: Nick Contini <contini.26@osu.edu>
2023-03-01 14:24:34 +01:00
Houjun Tang
ff1a425c8d hdf5-vol-async: add v1.5 (#35636) 2023-03-01 14:16:56 +01:00
Wouter Deconinck
ab999d5af9 dd4hep: depends_on root +webgui when +ddeve ^root @6.28: (#35624) 2023-03-01 14:13:50 +01:00
H. Joe Lee
513ff34e66 dpdk: add a new build system and version (#35647) 2023-03-01 14:08:41 +01:00
H. Joe Lee
b59c8e9a43 isa-l_crypto: add a new package (#35651) 2023-03-01 14:06:37 +01:00
H. Joe Lee
9483e34d15 isa-l: add a new package (#35650) 2023-03-01 14:06:22 +01:00
Alex Richert
7e02139cad upp: add v10.0.8 (#35667) 2023-03-01 14:00:27 +01:00
Alex Richert
a08d86c201 grib-util: fix dependency constraints (#35668) 2023-03-01 13:59:45 +01:00
Hans Fangohr
4e70532cd1 OOMMF: set preferred version (#35675)
With the last merge request for OOMMF [1], the intention was to have version
20b0_20220930 as the preferred version, and provide 20b0_20220930-vanilla as an
additional version for the unlikely case anybody needed that.

I made the (wrong) assumption that the `version` listed first in the `package.py` file
would be the preferred version. This merge request is to correct that by
explicitly tagging the preferred version with `preferred=True`.

[1] https://github.com/spack/spack/pull/33072/files
2023-03-01 13:53:59 +01:00
Glenn Johnson
2d2a1c82d4 docbook: resolve conflict in spack env view (#35682)
If the docbook packages
- docbook-xml
- docbook-xsl

are installed in a spack environment view the catalog files will be in
conflict in the view directory. This PR resolves that by adding an
appropriate prefix to each catalog name so that they are unique in the
view. The resulting XML_CATALOG_FILES environment variable will then be
able to point to both of them.
2023-03-01 04:17:46 -08:00
Wouter Deconinck
a47ebe5784 dd4hep: new versions 1.25, 1.25.1 (#35665) 2023-03-01 12:56:03 +01:00
acastanedam
4f97bb118f elk: add v8.3.22 and fix a few issues (#35678) 2023-03-01 12:55:02 +01:00
Harmen Stoppels
d71eca74a3 mbedtls: new versions and deprecations [CVE-2022-46392] (#35715)
* Add new versions and deprecations [CVE-2022-46392]
* remove maintainer, order versions by major no
2023-03-01 03:14:00 -08:00
Tamara Dahlgren
f88dec43df cbench: renamed test_blas_linkage to check_blas_linkage (#35690) 2023-03-01 12:03:23 +01:00
Wouter Deconinck
2e8306d324 py-uproot: new versions 4.3.*, 5.0.* (#35548) 2023-03-01 11:53:38 +01:00
Adam J. Stewart
d64d77e99e py-torchmetrics: add v0.11.2-3 (#35755) 2023-03-01 02:48:35 -08:00
Cyrus Harrison
d7b11af731 ascent: add v0.9.0 (#35211) 2023-03-01 11:48:15 +01:00
Annop Wongwathanarat
68372a4dfe hpcg: add arm compiler (#35710) 2023-03-01 11:46:12 +01:00
Bill Williams
54500a5fca scorep: more precise dependencies for v7/v8 (#35712) 2023-03-01 11:45:07 +01:00
Adam J. Stewart
146464e063 Docs: fix link to PythonPackage docs (#35725) 2023-03-01 11:14:05 +01:00
Massimiliano Culpo
07e251c887 Remove handling of deprecated target names (graviton) (#35537)
* Update target names for Gitlab pipelines

* Remove handling of deprecated names for graviton
2023-03-01 11:03:12 +01:00
Mosè Giordano
f9f51cb930 Add new versions of Julia dependencies (#35622) 2023-03-01 01:52:28 -08:00
nicolas le goff
ad3c22fae9 gts: add missing pkgconfig dependency (#35657) 2023-03-01 10:49:09 +01:00
AMD Toolchain Support
bedcc5449a quantum-espresso: fix building with aocc (#35612)
Co-authored-by: Tooley, Phil <phil.tooley@amd.com>
2023-03-01 10:47:42 +01:00
Henning Glawe
a1a54fa8b7 nfft: add v3.2.4 (#35757) 2023-03-01 01:42:23 -08:00
Edward Hartnett
2a97bcbd5a bacio: add v2.6.0, including handling of shared library builds (#35490) 2023-03-01 10:29:12 +01:00
Mark W. Krentel
99fb4c4a47 hpctoolkit: add version 2023.03.01, add python variant (#35662)
1. add version 2023.03.01
 2. add variant 'python' that supports unwinding python source
 3. clean up some things with the cray variant
 4. require the latest libmonitor
 5. fix sha256 checksum for url patch
 6. delete rocm 5.3 from older versions
2023-03-01 09:44:32 +01:00
Brian Vanderwende
5b52685216 NCO: add v5.1.4 and v5.1.0 (#35753) 2023-03-01 09:27:25 +01:00
Alex Richert
53a924c20f Fix bufr package typo (libufr->libbufr) (#35740) 2023-02-28 15:56:30 -08:00
Annop Wongwathanarat
09ad541e98 armcomputelibrary: add version 23.02 (#35723) 2023-02-28 23:51:05 +01:00
M. Eric Irrgang
b109e16fba Back-port a patch for filesystem logic in gmx executable. (#35672)
* Backport a patch for relocatable `gmx` executable.

* spack style fixes
2023-02-28 14:18:00 -07:00
Mark W. Krentel
043a80ff9e hpcviewer: add version 2023.02 (#35648) 2023-02-28 11:13:30 -08:00
Matthieu Dorier
b7f7af1713 c-raft: add new package (#35735)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-02-28 11:16:02 -07:00
Rémi Lacroix
e5bd319c19 git-lfs: Add version 3.3.0 (#35671) 2023-02-27 23:58:56 -05:00
Tim Haines
90ad65a6e7 Dyninst: add version 12.3.0 (#35630) 2023-02-27 16:13:47 -08:00
Luke Diorio-Toth
779e80b7c1 Package/py pysam macos (#33851)
* cleaned up style, linked to external htslib

* removed htslib/bcfrools/samtools deps, use bundled libs instead

the pysam package includes the necessary libs to link to, so it wasn't even using linked libs when building

* fixed style

* revert to using external htslib

currently uses bundled samtools and bcftools, and there is no way to use external versions for those dependencies

* added libs property to htslibs package

added support for lib64

* added htslib name
2023-02-27 16:25:21 -06:00
Annop Wongwathanarat
502e216ee2 onednn: add variant to use Arm Compute Library on aarch64 (#35643)
* onednn: add variant to use Arm Compute Library on aarch64

* Update cmake version

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

* Shorten macro definition

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

* Update cpu/gpu_runtime variants

* Update acl variant when 1.7+

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

* [@spackbot] updating style on behalf of annop-w

* Add dependencies for new runtimes

* Fix dependency package name to oneapi-level-zero

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-02-27 13:58:03 -06:00
Wouter Deconinck
d6ff426d48 py-awkward: new version 1.10.*, 2.0.* (#35549)
* py-awkward: new version 1.10.*, 2.0.*

Lots of changes in 2.0.*, see https://github.com/scikit-hep/awkward/releases. This will need some extra testing.

* py-awkward: hatchling

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

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

* py-scikit-build-core: new and improved py-scikit-build

* py-awkward-cpp: new package

* py-awkward: add depends_on py-awkward-cpp

* py-awkward: depends_on py-packaging

* py-awkward-cpp: new versions pinned by py-awkward

* py-scikit-build-core: additional depends_on

* py-awkward: branch master deprecated

* py-pytest-subprocess: new package

* py-pytest: new version 7.2.1

* py-scikit-build-core: add tests dependencies

* [@spackbot] updating style on behalf of wdconinc

* py-scikit-build-core: two more test dependencies

* py-pytest: depends_on py-exceptiongroup

* py-awkward: add pytest support

* py-pytest: suggestions from review

* py-scikit-build-core: suggestions from review

* Update var/spack/repos/builtin/packages/py-awkward-cpp/package.py

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

* py-awkward: depends_on pyyaml when @:1, order old deps last

* [@spackbot] updating style on behalf of wdconinc

* py-awkward: move some opt deps to test, order test deps

* py-awkward: remove test dependencies

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-02-27 13:51:13 -06:00
Michael Kuhn
c4311a250a pango: add 1.50.13 (#35709) 2023-02-27 09:38:17 -08:00
dlkuehn
ceaa304f5f osi: add version 0.108.7 (#35689)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-02-27 09:10:01 -07:00
dlkuehn
038efa4173 clp: add version 1.17.7 (#35688)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-02-27 07:23:00 -08:00
Harmen Stoppels
773fd5ad84 hpctoolkit: fix broken patches (#35711)
The patches don't have a stable checksum.
2023-02-27 10:50:48 +01:00
Seth R. Johnson
9b46e92e13 Celeritas: new versions 0.2.1 and 0.1.5 (#35704)
* celeritas: new versions 0.1.5 and 0.2.1

* celeritas: deprecate old versions
2023-02-27 09:36:28 +00:00
Howard Pritchard
f004311611 OpenMPI: add the 4.1.5 release (#35677)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-02-27 00:57:36 -08:00
Glenn Johnson
a4b949492b r-twosamplemr: add new package and dependencies (#35683) 2023-02-27 07:38:27 +01:00
Larry Knox
6ab792fb03 hdf5-vol-cache: add v1.1 (#35685) 2023-02-27 07:35:30 +01:00
Alex Richert
313c7386c4 go: set GOMAXPROCS to limit number of build processes (#35703) 2023-02-27 07:26:50 +01:00
Adam J. Stewart
b0b4a05d44 py-nbqa: add new package (#35707) 2023-02-27 07:22:48 +01:00
Alberto Invernizzi
4e13b5374f fix dump problem (#35673)
if dump file existed it was not truncating the file, resulting in
a file with unaltered filesize, with the new content at the beginning,
"padded" with the tail of the old content, since the new content was
not enough to overwrite it.
2023-02-24 21:32:33 -08:00
Vinícius
07897900eb ompss-2 dependencies (#35642) 2023-02-24 21:22:17 -08:00
Axel Huebl
d286146c64 WarpX 23.02 (#35633)
Update `warpx` & `py-warpx` to the latest release.
2023-02-23 17:09:28 -08:00
Todd Gamblin
6b27aebeb4 colify.py: get rid of **kwargs (#35641)
`colify` is an old module in Spack that still uses `**kwargs` liberally. 

We should be more explicit. Doing this eliminates the need for many 
checks (can't pass the wrong arg if it isn't allowed) and makes the 
function documentation more clear.
2023-02-23 11:18:54 -08:00
Mosè Giordano
5c7cccd052 p7zip: Add new versions from fork (#35627) 2023-02-23 13:10:28 +01:00
Rémi Lacroix
26c314f04f htop: Add version 3.2.2 (#35621) 2023-02-23 03:22:18 -08:00
Rémi Lacroix
9982d76bb1 ncdu: Add version 1.18.1 (#35620) 2023-02-23 03:21:56 -08:00
Harmen Stoppels
3d41b71664 buildcache push: ensure bool arguments for include_* (#35632)
Fixes a bug introduced in 44ed0de8c0
where the push method of binary_distribution now takes named args
include_root and include_depedencies, to avoid the **kwarg hole.

But the call site wasn't update and we passed a dict of keys/values instead
of arguments, which resulted in a call like this:

```
push(include_root={"include_root": True, "include_dependencies": False})
```

This commit fixes that, and adds a test to see if we push the correct packages.
2023-02-23 01:44:47 +01:00
Wouter Deconinck
e27d3c4f75 collier: new versions 1.2.6, 1.2.7 (#35580)
Additional functionality, per https://collier.hepforge.org/releasehist.html. No mention of build changes.
2023-02-22 13:18:11 -08:00
Adam J. Stewart
5545fd34c0 py-mpi4jax: add new package (#35551)
* py-mpi4jax: add new package
* [@spackbot] updating style on behalf of adamjstewart

---------

Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2023-02-22 13:12:35 -08:00
luker
6ebf9f65c0 Add CCE support to hipfort (#35609)
* Add CCE support to hipfort
* Update package.py
2023-02-22 10:59:54 -08:00
Harmen Stoppels
3be9af8c13 copy_files_to_artifacts: error -> warning (#35613)
This error shows up a lot, typically it's harmless because an error
happened before the source build even started, in which case we don't
have build logs to copy. So, warn instead of error, cause it distracts
from the actual CI error.
2023-02-22 11:53:42 +00:00
Harmen Stoppels
6e477d547d add cdash arg to source build only (#35565) 2023-02-22 11:08:32 +01:00
Harmen Stoppels
9d6630e245 spack build-env: error when deps are not installed (#35533)
Currently we attempt to setup the build environment even when
dependencies are not installed, which typically results in error while
searching for libraries or executables in a dependency's prefix.

With this change, we get a more user friendly error:

```
$ spack build-env perl
==> Error: Not all dependencies of perl are installed, cannot setup build environment:
 -   qpj6dw5  perl@5.36.0%apple-clang@14.0.0+cpanm+open+shared+threads build_system=generic arch=darwin-ventura-m1
 -   jq2plbe      ^berkeley-db@18.1.40%apple-clang@14.0.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-ventura-m1
...
$ echo $?
1
```
2023-02-22 10:35:44 +01:00
psakievich
b8d15e816b Allow users to specify root env dir (#32836)
* Allow users to specify root env dir

Environments managed by spack have some advantages over anonymous Environments
but they are tucked away inside spack's directory tree. This PR gives
users the ability to specify where the environments should live.

See #32823

This is also taken as an opportunity to ensure that all references are to "managed environments",
rather than "named environments". Prior to this PR some references to the latter persisted.

Co-authored-by: Tom Scogland <scogland1@llnl.gov>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: Gregory Becker <becker33@llnl.gov>
2023-02-22 00:37:14 +00:00
Cameron Rutherford
0a233ce83a ExaGO 1.5.1 release (#35595)
* Update exago w/ 1.5.1 and small updates to hiop.
* Fix styling.
* Add RAJA back to ExaGO package.
* Update RAJA requirement for ExaGO and HiOp.
* Update last RAJA requirement in HiOp.
2023-02-21 14:56:59 -08:00
G-Ragghianti
27ee08f5bb Package slate: Improved MPI launcher search for smoke tests (#35448)
* Improved MPI launcher search for smoke tests
* Improving mpi launcher search
* Removing redundant logic
2023-02-21 13:10:01 -08:00
Massimiliano Culpo
cb4c60c709 Revert "Disable module generation by default (#35564)" (#35603)
This reverts commit 5b8917188a.
2023-02-21 21:53:07 +01:00
Wouter Deconinck
8e84dcd7ef root: new version 6.28.00 (#35556)
* root: new version 6.28.00
  Full changelog: https://github.com/root-project/root/compare/v6-26-10...v6-28-00
  Based on the CMakeLists.txt file, no major build system changes. Upgraded requirements for cmake added.
* root: variant jemalloc deprecated
* root: rm define gsl_shared because unused
  "`gsl_shared` is unused" per https://github.com/root-project/root/pull/12203 (and has always been unused)
* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2023-02-21 12:20:46 -08:00
MicK7
447ad2a3e3 Add new sphinx rtd theme release 1.2.0 (#35579)
* Add new sphinx rtd theme release 1.2.0

The new release helps with supporting more recent version of docutils

* set docutils officially supported version

* add jquery dependency for sphinx-rtd-theme

* add conflict with jquery version

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

* correct dependency

* fix version dependency

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

* set sphinx version

* fix sha256

* add version for flit-core

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-02-21 11:53:21 -08:00
Adam J. Stewart
6f65ff4952 py-nbmake: add new versions (#35591) 2023-02-21 11:46:43 -08:00
Adam J. Stewart
16adda3db9 py-jax: add v0.4.3 (#35460)
* py-jax: add v0.4.3

* Minimum version is minimum

* py-jax no longer has cuda variant

* Enable CUDA by default

* Link to discussion of upper bound
2023-02-21 13:14:27 -06:00
Oliver Perks
cddef35ef8 cmake: changed the regex to search for externals (#31688) 2023-02-21 17:29:14 +01:00
Rocco Meli
1636c89aba Add pyedr and panedr (#35576)
* add pyedr

* black

* add panedr

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

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

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

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

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-02-21 09:55:19 -06:00
Alec Scott
9110f5dfb6 ant: add v1.10.13 and deprecate previous versions due to CVE (#35572) 2023-02-21 15:18:07 +01:00
Harmen Stoppels
bc24a8f290 Spec.satisfies should be commutative when strict=False (#35598)
The call:
```
x.satisfies(y[, strict=False])
```
is commutative, and tests non-empty intersection, whereas:
```
x.satsifies(y, strict=True)
```
is not commutative, and tests set-inclusion.

There are 2 fast paths. When strict=False both self and other need to 
be concrete, when strict=True we can optimize when other is concrete.
2023-02-21 14:30:47 +01:00
simon-Leary42
33bf1fd033 nonexistent module concise error message (#35502) 2023-02-21 04:50:56 -08:00
Harmen Stoppels
5b8917188a Disable module generation by default (#35564)
a) It's used by site administrators, so it's niche
b) If it's used by site administrators, they likely need to modify the config anyhow, so the default config only serves as an example to get started
c) it's too arbitrary to enable tcl, but disable lmod
2023-02-21 10:00:37 +01:00
luker
fbd5c5c2cd superlu-dist: extend when to apply a patch (#32985) 2023-02-21 07:41:59 +01:00
Massimiliano Culpo
55e3026152 ccls: add v0.20220729 (#35593) 2023-02-21 07:13:58 +01:00
Massimiliano Culpo
874f76e45e mvapich2: update checksum (#35587)
See #29340

Co-authored-by: Nat Shineman <shineman.5@buckeyemail.osu.edu>
2023-02-21 06:55:11 +01:00
Thomas Madlener
ebc24b7063 dd4hep: extend conflict on CMake (#27125) 2023-02-20 21:33:11 -08:00
Adam J. Stewart
ce9f8143cc Fix view support for optional Python extensions (#35489)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-02-20 11:58:28 -08:00
Harmen Stoppels
c1ff7bbf04 environment views: better, earlier error on clash (#35541)
Spack generally ignores file-file projection clashes in environment
views, but would eventually error when linking the `.spack` directory
for two specs of the same package.

This leads to obscure errors where users have no clue what the issue is
and how to fix it. On top of that, the error comes very late, since it
happens when the .spack dir contents are linked (which happens after
everything else)

This PR improves that by doing a quick check ahead of time if clashes
are going to be anticipated (by simply checking for clashes in the
projection of each spec's .spack metadir). If there are clashes, a
human-readable error is thrown which shows two of the conflicting specs,
and tells users to user unify:true, view:false, or set up custom
projections.
2023-02-20 19:14:27 +01:00
Rocco Meli
aa708c8981 Add pytng (#35575)
* add pytng

* black

* add setuptools

* fix

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

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

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-02-20 11:15:19 -06:00
simonleary-umass-edu
712d358f7e apptainer use the --with-suid configure option (#35513) 2023-02-20 17:39:28 +01:00
Ben Wibking
e8238fe330 Patchel shutil.copystat to avoid PermissionError on Lustre (#27247) 2023-02-20 17:28:03 +01:00
Alec Scott
e8a19aa089 Add Alluxio v2.9.1 and deprecate previous versions due to CVE (#35574) 2023-02-20 07:54:45 -08:00
Alec Scott
4a844a971a httpd: add v2.4.55 and deprecate previous versions due to CVE-2022-31813 (#35571) 2023-02-20 07:35:16 -08:00
Harmen Stoppels
5e337d907b spack ci: remove 120s db timeout since 60s is the default now (#35566) 2023-02-20 14:41:26 +01:00
Harmen Stoppels
208c9585b8 Revert "lib/spack/spack/store.py: Fix #28170 for padding relocation (#33122)" (#35077)
This reverts commit c721aab006.
2023-02-20 13:56:11 +01:00
Alec Scott
1ae4ca611e Add restic v0.15.1 (#35563) 2023-02-20 12:53:10 +01:00
Alec Scott
54eddb2301 Add py-python-lsp-server v1.7.1 (#35561) 2023-02-20 12:52:55 +01:00
Alec Scott
01dafb8047 Add activemq v5.17.3 and deprecate previous version due to CVE (#35573) 2023-02-20 12:49:54 +01:00
Greg Becker
6ef2c33b0e scale mpi dependency is incorrect (#35385) 2023-02-20 02:49:38 -08:00
Paul Kuberry
beddf4dcc4 xyce: add patch for pymi parameter merge and add maintainer (#35421)
* xyce: add maintainer

* xyce: add patch for pymi parameter merge
2023-02-20 11:37:17 +01:00
Alec Scott
e143065448 Add go v1.20.1, 1.19.6 and un-deprecate previous versions without CVEs (#35560) 2023-02-20 11:33:07 +01:00
Patrick Bridges
9d9ea07424 Fix kokkos package.py to filter spack wrappers in launch compiler and cmake configs (#35494)
Kokkos when compiled by spack without +wrapper could potentially capture the spack compiler wrappers, resulting in cmake configs and kokkos_launch_compiler trying to run the spack compiler wrapper after installation.
2023-02-20 01:23:37 -08:00
elenimath
c769582709 Pass tests argument to solver method when concretizing together (#35290)
to make the workaround for #29447 work with `concretizer:unify:true` option
2023-02-20 10:21:24 +01:00
Sebastian Ehlert
1958c2f986 Update xtb 6.6.0 (#35436) 2023-02-20 10:17:32 +01:00
Rocco Meli
3016da79fe Add GNINA and related packages (#35439) 2023-02-20 10:14:00 +01:00
Adam J. Stewart
0500a3cec0 py-torchbenchmark: add new package (#35443) 2023-02-20 10:12:20 +01:00
Emil Briggs
313797e3d4 Update for v5.0.4 release. (#35511) 2023-02-20 09:52:38 +01:00
Wouter Deconinck
ae189cfab8 geant4: new version 11.1.1 (#35528)
Bugfix release only. No changes in build system.
2023-02-20 09:47:13 +01:00
Wouter Deconinck
7c09ab174b acts: new versions 23.1.0, 23.2.0, 23.2.1 (#35540)
* acts: new versions 23.1.0, 23.2.0, 23.2.1

- https://github.com/acts-project/acts/compare/v23.0.0...v23.1.0: no changes needed to package.py
- https://github.com/acts-project/acts/compare/v23.1.0...v23.2.0: no changes needed to package.py
- https://github.com/acts-project/acts/compare/v23.2.0...v23.2.1: no changes needed to package.py

* actsvg: new versions 0.4.27, 0.4.28 (and updated list_url)

* acts: depends_on actsvg@0.4.28: when acts@23.2: +svg

* autodiff: new version 0.6.5-0.6.12 (and list_url fix)

* vecmem: new versions 0.13.0-0.22.0 (and list_url fix)
2023-02-20 09:42:58 +01:00
Wouter Deconinck
c14b6b80cc clhep: new versions 2.4.6.2, 2.4.6.3, 2.4.6.4 (#35542)
Mostly minor changes in random and support for c++20. No build system changes needed.

Ref: https://gitlab.cern.ch/CLHEP/CLHEP/-/compare/CLHEP_2_4_6_2...CLHEP_2_4_6_4
2023-02-20 09:41:43 +01:00
Wouter Deconinck
899d2708a3 lhapdf: new versions 6.5.2, 6.5.3 (#35543)
https://gitlab.com/hepcedar/lhapdf/-/compare/lhapdf-6.5.3...lhapdf-6.5.1: bugfixes only
2023-02-20 09:41:26 +01:00
Wouter Deconinck
5ccc2e1a8e whizard: new version 3.1.0 (#35550)
https://gitlab.tp.nt.uni-siegen.de/whizard/public/-/compare/v3.0.3...v3.1.0, no changes to package.py needed.
2023-02-20 09:40:23 +01:00
Adam J. Stewart
7c01d3ba35 Fix broken links in docs (#35582) 2023-02-20 09:21:18 +01:00
Thomas Bouvier
81f11d5562 py-pyarrow: fix build environment (#35567)
* `py-pyarrow`: fix build environment

* Use `satisfies()` for specs
2023-02-19 12:48:14 -08:00
Adam J. Stewart
747f032ec2 pandoc: disable texlive variant by default (#35569) 2023-02-19 13:22:51 +01:00
Alec Scott
97ea182ee0 hugo: add v0.110.0, v0.108.0, v0.107.0 (#35562) 2023-02-19 00:19:11 +01:00
Harmen Stoppels
011c28a538 openblas: fix prereqs / make race (#35395)
Fix a race in the makefile where the shared lib was built before the
object files were available.

See https://github.com/xianyi/OpenBLAS/issues/3899
2023-02-18 12:27:34 -08:00
Harmen Stoppels
86320eb569 Improve error handling in buildcache downloads (#35568)
The checksum exception was not detailed enough and not reraised when using cache only, resulting in useless error messages.

Now it dumps the file path, expected
hash, computed hash, and the downloaded file summary.
2023-02-18 19:22:48 +01:00
Adam J. Stewart
c42a4ec1ec Ignore black reformat in git blame (#35544) 2023-02-18 01:03:50 -08:00
Harmen Stoppels
fb644de086 clang/apple-clang correct c/c++ standard flags (#35062) 2023-02-17 23:18:01 +01:00
Sinan
352d56d6b0 package_qgis_add_v328 (#35500)
* package_qgis_add_v328

* restore long term release

---------

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
2023-02-17 14:58:47 -06:00
G-Ragghianti
b711d5a6a4 Moving official repo and download locations for slate, blaspp, and lapackpp (#35521) 2023-02-17 09:58:48 -08:00
Adam J. Stewart
983c68cc30 py-pyinstrument: add v4.4.0 (#35525) 2023-02-17 04:35:34 -08:00
Wouter Deconinck
7d8d538a71 gaudi: add v36.10 (#35527)
Bugfixes only, https://gitlab.cern.ch/gaudi/Gaudi/-/compare/v36r9...v36r10
2023-02-17 04:27:24 -08:00
Jim Edwards
fa3ced5242 add PIC flag in mpi-serial build (#35524) 2023-02-17 04:27:11 -08:00
Annop Wongwathanarat
73fcda19d2 armcomputelibrary: new package (#35515) 2023-02-17 04:14:23 -08:00
Sebastian Ehlert
65ee062bf6 Fix build for scine-xtb (#35386) 2023-02-17 04:14:08 -08:00
John W. Parent
573f7bf4cd Windows: enforce carriage return for .bat files (#35514)
Batch scripts in general will not function without carriage return line
endings on Windows. We rely on these scripts to support cmd, so we
should not allow these scripts to be converted to lf.

Note: Windows 11 supports lf line endings due to the use of Windows
Terminal. Once support for Windows 10 is dropped, this change can be
reverted.
2023-02-17 04:01:25 -08:00
H. Joe Lee
9f3f4b38e8 fio: add a new version (#35522)
The latest is 3.33.
2023-02-17 04:01:18 -08:00
Harmen Stoppels
476a29e1b6 Increase db timeout 3s -> 60s (#35517)
When running many concurrent spack install processes that need to write
to the db, Spack regularly times out. This is because writing to the DB
after another process has written to it requires deserialization of the
db, mutating it in memory, and serializing it again, which takes some
time. On top of that, I believe there's a 1 second retry when a write
lock cannot be obtained, so I think this means only 3 processes can
really write to the DB at the same time before timing out.
2023-02-17 08:42:41 +01:00
Adam J. Stewart
603569e321 Style: black 23, skip magic trailing comma (#35351)
* Style: black 23, skip magic trailing commas

* isort should use same line length as black

* Fix unused import

* Update version of black used in CI

* Update new packages

* Update new packages
2023-02-16 23:06:12 -06:00
Teo
b935809948 Halide: new variants and bug fixes (#35495)
* Update package.py

Initial new stuff

* Update package.py

* Update package.py

* Update package.py

* fix targets

* non-llvm backends

* ooops

* fix style

* Somehow that was not caught?

Somehow that was not caught?

* style

* Last fix

make capitalization consistent with Halide not LLVM...
2023-02-16 22:58:54 -06:00
Erik Heeren
b278a02406 py-pynrrd: new package (#35505) 2023-02-16 22:52:52 -06:00
Erik Heeren
9ff64b1627 py-cmake-format: new version, new variants (#35485)
* py-cmake-format: new version, new variants

* Update var/spack/repos/builtin/packages/py-cmake-format/package.py

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-02-16 22:51:40 -06:00
genric
5fc5ef8c58 py-luigi: add v3.2.0 (#35507) 2023-02-16 22:51:04 -06:00
Christopher Christofi
946816d787 py-cufflinks: new package version with 0.17.3 (#35427)
* py-cufflinks: new package version with 0.17.3

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-02-16 22:43:35 -06:00
Adam J. Stewart
03fb5c6aa9 py-fiona: python is a link dep (#35516) 2023-02-16 17:56:12 -08:00
AMD Toolchain Support
68f82357c8 added support zen4 support for gromacs (#35503)
Co-authored-by: Umashankar Sivakumar <Umashankar.Sivakumar@amd.com>
2023-02-16 16:38:58 -08:00
Andrew-Dunning-NNL
f073a9d589 dakota: run acceptance tests (#29654)
* dakota: run acceptance tests
* dakota: updated style guide
2023-02-16 16:28:21 -08:00
Massimiliano Culpo
d17cc42a48 fuse-overlayfs: add v1.10 (#35512) 2023-02-16 16:23:06 -08:00
Andrew-Dunning-NNL
0468205751 rdma-core: add static variant (#35308)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-02-16 16:01:19 -08:00
Harmen Stoppels
68b711c1ad view: fix issue with non-contributing specs (#34661)
Specs that did not contribute any files to an env view caused a problem
where zip(specs, files grouped by prefix) got "out of sync", causing the
wrong merge map to be passed to a package's `add_files_to_view`, which
specifically caused an issue where *sometimes* bin/python ended up as a
symlink instead of a copy.

One such example is kokkos + kokkos-nvcc-wrapper, as the latter package
only provides the file bin/nvcc_wrapper, which is also added to view by
kokkos, causing kokkos-nvcc-wrapper to contribute 0 files.

The test feels a bit contrived, but it captures the problem... pkg a is
added first and has 0 files to contribute, pkg b adds a single file, and
we check if pkg b receives a merge map (and a does not).
2023-02-16 10:36:22 -08:00
Alex Richert
69369429b6 esmf: use setup_build_environment instead of edit (#35249) 2023-02-16 19:01:34 +01:00
Erik Schnetter
f360ce7035 openssl: New version 1.1.1t (#35419)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-02-16 09:48:28 -08:00
Harmen Stoppels
96ac4c7f98 simplify cdash filename (#35509) 2023-02-16 18:25:39 +01:00
Massimiliano Culpo
df72ba0d46 pfunit: add v4.6.3, clean up recipe (#35510)
* pfunit: add v4.6.3

* pfunit: use CMakePackage methods to define arguments

* pfunit: deprecate v3.X, make a variant conditional

* pfunit: simplify setting up environment variables

Reading the docs it seems only v3
needs F90_VENDOR to be set

* pfunit: fix option names

The names set before were unused

* pfunit: shared libraries seem not to be supported

See https://github.com/Goddard-Fortran-Ecosystem/pFUnit/issues/308#issuecomment-874725759
2023-02-16 18:10:16 +01:00
Mosè Giordano
b2e6da36ef openblas: Use more stable URL as source (#35428) 2023-02-16 18:02:59 +01:00
Carlos Bederián
832c435588 gromacs: add 2021.7, 2022.5, 2023, and some requirements (#35413) 2023-02-16 17:55:16 +01:00
Mosè Giordano
5079086019 cp2k: explicitly use C99 standard (#34957) 2023-02-16 17:45:06 +01:00
Erik Heeren
bfe06f694c Add py-mlflow and its dependencies (#34463)
* Add py-mlflow and its dependencies
* mlflow: fix syntax error in package.py
* py-mlflow: cleanup
  Process review remarks, add missing dependencies, add skinny variant
* Apply suggestions from code review
* Fix flake8 issues
* More formatting fixes
* Fix py-waitress dependency version
* py-mlflow: platform-specific dependency
* Update var/spack/repos/builtin/packages/py-mlflow/package.py
* Update var/spack/repos/builtin/packages/py-mlflow/package.py
* Process review remarks
* Fix typo in dependency version
* py-shap: fix dependencies
* py-arrow: fix dependencies
* py-slicer: remove py-setuptools explicit version
* py-pyarrow: dataset variant and pass options through environment
  It appears there are some issues when using `pip install` instead of
  `python setup.py` - this setup_build_environment should fix that.
* py-pyarrow: review remark
* Decouple setup_build_environment from install_options
* py-pyarrow: style
* Bump licenses to 2023

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Matthias Wolf <matthias.wolf@epfl.ch>
2023-02-16 08:40:56 -08:00
Joel Falcou
ae022e98d8 EVE 2023.02.15 update (#35493) 2023-02-16 08:26:17 -08:00
Phil Carns
3e1ba67e00 bump mochi-margo to 0.13 (#35499) 2023-02-16 08:21:45 -08:00
Thomas Bouvier
6eea171077 thrift: add v0.17.0 (#35210) 2023-02-16 16:57:25 +01:00
Richard Berger
1734127b7a lammps: refactor variants, add new versions (#34011) 2023-02-16 16:43:36 +01:00
Harmen Stoppels
44ed0de8c0 spack buildcache create: push all deps / cleanup (#34860) 2023-02-16 14:08:49 +00:00
Harmen Stoppels
09eb86e077 spack uninstall: follow run/link edges on --dependents (#34058)
`spack gc` removes build deps of explicitly installed specs, but somehow
if you take one of the specs that `spack gc` would remove, and feed it
to `spack uninstall /<hash>` by hash, it complains about all the
dependents that still rely on it.

This resolves the inconsistency by only following run/link type deps in
spack uninstall.

That way you can finally do `spack uninstall cmake` without having to
remove all packages built with cmake.
2023-02-16 14:26:30 +01:00
Massimiliano Culpo
50691ccdd9 Avoid verifying variants in default package requirements (#35037)
Default package requirements might contain
variants that are not defined in each package,
so we shouldn't verify them when emitting facts
for the ASP solver.

Account for group when enforcing requirements

packages:all : don't emit facts for requirement conditions
that can't apply to current spec
2023-02-16 11:57:26 +01:00
Harmen Stoppels
ce693ff304 buildcache create: avoid prefix copy (#35173) 2023-02-16 11:52:10 +01:00
Harmen Stoppels
18027d07d4 CHANGELOG.md: v0.19.1 (#35429) 2023-02-16 11:34:57 +01:00
Sergey Kosukhin
f31e8adc6b netcdf-c: add patch to enable '@4.9.0:~mpi+parallel-netcdf' (#35462) 2023-02-16 11:02:54 +01:00
rfbgo
a6731b732e Add support for star-ccm-plus v17 (#35056) 2023-02-16 10:53:52 +01:00
Rémi Lacroix
a00b92a69f cp2k: add v2023.1 (#35346) 2023-02-16 10:33:48 +01:00
Sreenivasa Murthy Kolam
90261029d8 ROCm packages: add v5.4.3 release (#35478) 2023-02-16 10:14:31 +01:00
Adam J. Stewart
85966a96b1 py-pytorch-lightning: add v1.9.2 2023-02-15 20:09:15 +01:00
John W. Parent
417d8ef547 XZ package: enable building on Windows (#35095)
* Convert XZ to multi build system
* Add MSBuild builder to XZ to support Windows compatibility
2023-02-15 09:17:32 -08:00
Adam J. Stewart
dd434ec413 Use the maintainers directive in all base classes (#35324)
* Use the `maintainers` directive in all base classes
* Update unit tests
2023-02-15 01:33:29 -08:00
Hector Martinez-Seara
1894b64851 Orca: Added required runtime libraries (#35481)
* Update package.py
  Several libraries are need to be present at run time so that the code can be run in parallel. 
  I have added them as dependencies and to LD_LIBRARY_PATH. Orca comes as a binary so the libraries cannot be added as RPATH at compilation time.
  Also, orca 5.0.3 was compiled against 4.1.1, not 4.1.2.
2023-02-14 16:17:37 -08:00
2591 changed files with 54951 additions and 31639 deletions

View File

@@ -1,3 +1,5 @@
# .git-blame-ignore-revs
# Formatted entire codebase with black
# Formatted entire codebase with black 23
603569e321013a1a63a637813c94c2834d0a0023
# Formatted entire codebase with black 22
f52f6e99dbf1131886a80112b8c79dfc414afb7c

1
.gitattributes vendored
View File

@@ -1,3 +1,4 @@
*.py diff=python
*.lp linguist-language=Prolog
lib/spack/external/* linguist-vendored
*.bat text eol=crlf

View File

@@ -9,7 +9,7 @@ body:
Thanks for taking the time to report this build failure. To proceed with the report please:
1. Title the issue `Installation issue: <name-of-the-package>`.
2. Provide the information required below.
We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively!
- type: textarea
id: reproduce
@@ -29,7 +29,9 @@ body:
description: |
Please post the error message from spack inside the `<details>` tag below:
value: |
<details><summary>Error message</summary><pre>
<details><summary>Error message</summary>
<pre>
...
</pre></details>
validations:
@@ -53,7 +55,7 @@ body:
Please upload the following files:
* **`spack-build-out.txt`**
* **`spack-build-env.txt`**
They should be present in the stage directory of the failing build. Also upload any `config.log` or similar file if one exists.
- type: markdown
attributes:

View File

@@ -1,4 +1,4 @@
name: "\U0001F38A Feature request"
name: "\U0001F38A Feature request"
description: Suggest adding a feature that is not yet in Spack
labels: [feature]
body:
@@ -29,13 +29,11 @@ body:
attributes:
label: General information
options:
- label: I have run `spack --version` and reported the version of Spack
required: true
- label: I have searched the issues of this repo and believe this is not a duplicate
required: true
- type: markdown
attributes:
value: |
If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on [our Slack](https://slack.spack.io/) first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.
Other than that, thanks for taking the time to contribute to Spack!

View File

@@ -21,7 +21,9 @@ body:
description: |
Please post the error message from spack inside the `<details>` tag below:
value: |
<details><summary>Error message</summary><pre>
<details><summary>Error message</summary>
<pre>
...
</pre></details>
validations:

View File

@@ -19,13 +19,13 @@ jobs:
package-audits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
with:
python-version: ${{inputs.python_version}}
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools pytest codecov coverage[toml]
pip install --upgrade pip setuptools pytest coverage[toml]
- name: Package audits (with coverage)
if: ${{ inputs.with_coverage == 'true' }}
run: |
@@ -38,7 +38,7 @@ jobs:
run: |
. share/spack/setup-env.sh
$(which spack) audit packages
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # @v2.1.0
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # @v2.1.0
if: ${{ inputs.with_coverage == 'true' }}
with:
flags: unittests,linux,audits

View File

@@ -24,7 +24,7 @@ jobs:
make patch unzip which xz python3 python3-devel tree \
cmake bison bison-devel libstdc++-static
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Setup non-root user
@@ -62,7 +62,7 @@ jobs:
make patch unzip xz-utils python3 python3-dev tree \
cmake bison
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Setup non-root user
@@ -99,7 +99,7 @@ jobs:
bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
make patch unzip xz-utils python3 python3-dev tree
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Setup non-root user
@@ -133,7 +133,7 @@ jobs:
make patch unzip which xz python3 python3-devel tree \
cmake bison
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Setup repo
@@ -158,7 +158,7 @@ jobs:
run: |
brew install cmake bison@2.7 tree
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Bootstrap clingo
run: |
source share/spack/setup-env.sh
@@ -179,7 +179,7 @@ jobs:
run: |
brew install tree
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Bootstrap clingo
run: |
set -ex
@@ -204,7 +204,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Setup repo
@@ -247,7 +247,7 @@ jobs:
bzip2 curl file g++ gcc patchelf gfortran git gzip \
make patch unzip xz-utils python3 python3-dev tree
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Setup non-root user
@@ -283,7 +283,7 @@ jobs:
make patch unzip xz-utils python3 python3-dev tree \
gawk
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Setup non-root user
@@ -316,7 +316,7 @@ jobs:
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
@@ -333,7 +333,7 @@ jobs:
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh

View File

@@ -45,12 +45,18 @@ jobs:
[leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'],
[ubuntu-bionic, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:18.04'],
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04']]
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04'],
[almalinux8, 'linux/amd64,linux/arm64,linux/ppc64le', 'almalinux:8'],
[almalinux9, 'linux/amd64,linux/arm64,linux/ppc64le', 'almalinux:9'],
[rockylinux8, 'linux/amd64,linux/arm64', 'rockylinux:8'],
[rockylinux9, 'linux/amd64,linux/arm64,linux/ppc64le', 'rockylinux:9'],
[fedora37, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:37'],
[fedora38, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:38']]
name: Build ${{ matrix.dockerfile[0] }}
if: github.repository == 'spack/spack'
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
- name: Set Container Tag Normal (Nightly)
run: |
@@ -89,7 +95,7 @@ jobs:
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # @v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # @v1
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # @v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # @v1

View File

@@ -35,7 +35,7 @@ jobs:
core: ${{ steps.filter.outputs.core }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0

View File

@@ -47,10 +47,10 @@ jobs:
on_develop: false
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -62,7 +62,7 @@ jobs:
cmake bison libbison-dev kcov
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools pytest codecov[toml] pytest-xdist pytest-cov
pip install --upgrade pip setuptools pytest pytest-xdist pytest-cov
pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black"
- name: Setup git configuration
run: |
@@ -87,17 +87,17 @@ jobs:
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
with:
flags: unittests,linux,${{ matrix.concretizer }}
# Test shell integration
shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
with:
python-version: '3.11'
- name: Install System packages
@@ -107,7 +107,7 @@ jobs:
sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools pytest codecov coverage[toml] pytest-xdist
pip install --upgrade pip setuptools pytest coverage[toml] pytest-xdist
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
@@ -118,7 +118,7 @@ jobs:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
with:
flags: shelltests,linux
@@ -133,10 +133,11 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
- 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
useradd spack-test
@@ -151,10 +152,10 @@ jobs:
clingo-cffi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
with:
python-version: '3.11'
- name: Install System packages
@@ -163,7 +164,7 @@ jobs:
sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools pytest codecov coverage[toml] pytest-cov clingo pytest-xdist
pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
@@ -175,7 +176,7 @@ jobs:
SPACK_TEST_SOLVER: clingo
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # @v2.1.0
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # @v2.1.0
with:
flags: unittests,linux,clingo
# Run unit tests on MacOS
@@ -185,16 +186,16 @@ jobs:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools
pip install --upgrade pytest codecov coverage[toml] pytest-xdist pytest-cov
pip install --upgrade pip setuptools
pip install --upgrade pytest coverage[toml] pytest-xdist pytest-cov
- name: Setup Homebrew packages
run: |
brew install dash fish gcc gnupg2 kcov
@@ -210,6 +211,6 @@ jobs:
$(which spack) solve zlib
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
$(which spack) unit-test --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
with:
flags: unittests,macos

View File

@@ -18,8 +18,8 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
with:
python-version: '3.11'
cache: 'pip'
@@ -35,16 +35,16 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python packages
run: |
python3 -m pip install --upgrade pip six setuptools types-six black==22.12.0 mypy isort clingo flake8
python3 -m pip install --upgrade pip setuptools types-six black==23.1.0 mypy isort clingo flake8
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
@@ -58,3 +58,29 @@ jobs:
with:
with_coverage: ${{ inputs.with_coverage }}
python_version: '3.11'
# Check that spack can bootstrap the development environment on Python 3.6 - RHEL8
bootstrap-dev-rhel8:
runs-on: ubuntu-latest
container: registry.access.redhat.com/ubi8/ubi
steps:
- name: Install dependencies
run: |
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
- 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
useradd spack-test
chown -R spack-test .
- name: Bootstrap Spack development environment
shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
spack -d bootstrap now --dev
spack style -t black
spack unit-test -V

View File

@@ -15,15 +15,15 @@ jobs:
unit-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov pytest-cov clingo
python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
- name: Create local develop
run: |
./.github/workflows/setup_git.ps1
@@ -33,21 +33,21 @@ jobs:
./share/spack/qa/validate_last_exit.ps1
coverage combine -a
coverage xml
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
with:
flags: unittests,windows
unit-tests-cmd:
runs-on: windows-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov coverage pytest-cov clingo
python -m pip install --upgrade pip pywin32 setuptools coverage pytest-cov clingo
- name: Create local develop
run: |
./.github/workflows/setup_git.ps1
@@ -57,99 +57,24 @@ jobs:
./share/spack/qa/validate_last_exit.ps1
coverage combine -a
coverage xml
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
with:
flags: unittests,windows
build-abseil:
runs-on: windows-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov coverage
python -m pip install --upgrade pip pywin32 setuptools coverage
- name: Build Test
run: |
spack compiler find
spack external find cmake
spack external find ninja
spack -d install abseil-cpp
# TODO: johnwparent - reduce the size of the installer operations
# make-installer:
# runs-on: windows-latest
# steps:
# - name: Disable Windows Symlinks
# run: |
# git config --global core.symlinks false
# shell:
# powershell
# - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
# with:
# fetch-depth: 0
# - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
# with:
# python-version: 3.9
# - name: Install Python packages
# run: |
# python -m pip install --upgrade pip six pywin32 setuptools
# - name: Add Light and Candle to Path
# run: |
# $env:WIX >> $GITHUB_PATH
# - name: Run Installer
# run: |
# ./share/spack/qa/setup_spack_installer.ps1
# spack make-installer -s . -g SILENT pkg
# echo "installer_root=$((pwd).Path)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# env:
# ProgressPreference: SilentlyContinue
# - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
# with:
# name: Windows Spack Installer Bundle
# path: ${{ env.installer_root }}\pkg\Spack.exe
# - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
# with:
# name: Windows Spack Installer
# path: ${{ env.installer_root}}\pkg\Spack.msi
# execute-installer:
# needs: make-installer
# runs-on: windows-latest
# defaults:
# run:
# shell: pwsh
# steps:
# - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
# with:
# python-version: 3.9
# - name: Install Python packages
# run: |
# python -m pip install --upgrade pip six pywin32 setuptools
# - name: Setup installer directory
# run: |
# mkdir -p spack_installer
# echo "spack_installer=$((pwd).Path)\spack_installer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# - uses: actions/download-artifact@v3
# with:
# name: Windows Spack Installer Bundle
# path: ${{ env.spack_installer }}
# - name: Execute Bundled Installer
# run: |
# $proc = Start-Process ${{ env.spack_installer }}\spack.exe "/install /quiet" -Passthru
# $handle = $proc.Handle # cache proc.Handle
# $proc.WaitForExit();
# $LASTEXITCODE
# env:
# ProgressPreference: SilentlyContinue
# - uses: actions/download-artifact@v3
# with:
# name: Windows Spack Installer
# path: ${{ env.spack_installer }}
# - name: Execute MSI
# run: |
# $proc = Start-Process ${{ env.spack_installer }}\spack.msi "/quiet" -Passthru
# $handle = $proc.Handle # cache proc.Handle
# $proc.WaitForExit();
# $LASTEXITCODE

View File

@@ -1,3 +1,28 @@
# v0.19.1 (2023-02-07)
### Spack Bugfixes
* `buildcache create`: make "file exists" less verbose (#35019)
* `spack mirror create`: don't change paths to urls (#34992)
* Improve error message for requirements (#33988)
* uninstall: fix accidental cubic complexity (#34005)
* scons: fix signature for `install_args` (#34481)
* Fix `combine_phase_logs` text encoding issues (#34657)
* Use a module-like object to propagate changes in the MRO, when setting build env (#34059)
* PackageBase should not define builder legacy attributes (#33942)
* Forward lookup of the "run_tests" attribute (#34531)
* Bugfix for timers (#33917, #33900)
* Fix path handling in prefix inspections (#35318)
* Fix libtool filter for Fujitsu compilers (#34916)
* Bug fix for duplicate rpath errors on macOS when creating build caches (#34375)
* FileCache: delete the new cache file on exception (#34623)
* Propagate exceptions from Spack python console (#34547)
* Tests: Fix a bug/typo in a `config_values.py` fixture (#33886)
* Various CI fixes (#33953, #34560, #34560, #34828)
* Docs: remove monitors and analyzers, typos (#34358, #33926)
* bump release version for tutorial command (#33859)
# v0.19.0 (2022-11-11)
`v0.19.0` is a major feature release.

View File

@@ -72,6 +72,7 @@ config:
root: $TMP_DIR/install
misc_cache: $$user_cache_path/cache
source_cache: $$user_cache_path/source
environments_root: $TMP_DIR/envs
EOF
cat >"$SPACK_USER_CONFIG_PATH/bootstrap.yaml" <<EOF
bootstrap:

View File

@@ -50,24 +50,69 @@ setlocal enabledelayedexpansion
:: flags will always start with '-', e.g. --help or -V
:: subcommands will never start with '-'
:: everything after the subcommand is an arg
for %%x in (%*) do (
set t="%%~x"
:: we cannot allow batch "for" loop to directly process CL args
:: a number of batch reserved characters are commonly passed to
:: spack and allowing batch's "for" method to process the raw inputs
:: results in a large number of formatting issues
:: instead, treat the entire CLI as one string
:: and split by space manually
:: capture cl args in variable named cl_args
set cl_args=%*
:process_cl_args
rem tokens=1* returns the first processed token produced
rem by tokenizing the input string cl_args on spaces into
rem the named variable %%g
rem While this make look like a for loop, it only
rem executes a single time for each of the cl args
rem the actual iterative loop is performed by the
rem goto process_cl_args stanza
rem we are simply leveraging the "for" method's string
rem tokenization
for /f "tokens=1*" %%g in ("%cl_args%") do (
set t=%%~g
rem remainder of string is composed into %%h
rem these are the cl args yet to be processed
rem assign cl_args var to only the args to be processed
rem effectively discarding the current arg %%g
rem this will be nul when we have no further tokens to process
set cl_args=%%h
rem process the first space delineated cl arg
rem of this iteration
if "!t:~0,1!" == "-" (
if defined _sp_subcommand (
:: We already have a subcommand, processing args now
set "_sp_args=!_sp_args! !t!"
rem We already have a subcommand, processing args now
if not defined _sp_args (
set "_sp_args=!t!"
) else (
set "_sp_args=!_sp_args! !t!"
)
) else (
set "_sp_flags=!_sp_flags! !t!"
shift
if not defined _sp_flags (
set "_sp_flags=!t!"
shift
) else (
set "_sp_flags=!_sp_flags! !t!"
shift
)
)
) else if not defined _sp_subcommand (
set "_sp_subcommand=!t!"
shift
) else (
set "_sp_args=!_sp_args! !t!"
shift
if not defined _sp_args (
set "_sp_args=!t!"
shift
) else (
set "_sp_args=!_sp_args! !t!"
shift
)
)
)
rem if this is not nil, we have more tokens to process
rem start above process again with remaining unprocessed cl args
if defined cl_args goto :process_cl_args
:: --help, -h and -V flags don't require further output parsing.
:: If we encounter, execute and exit
@@ -95,31 +140,21 @@ if not defined _sp_subcommand (
:: pass parsed variables outside of local scope. Need to do
:: this because delayedexpansion can only be set by setlocal
echo %_sp_flags%>flags
echo %_sp_args%>args
echo %_sp_subcommand%>subcmd
endlocal
set /p _sp_subcommand=<subcmd
set /p _sp_flags=<flags
set /p _sp_args=<args
if "%_sp_subcommand%"=="ECHO is off." (set "_sp_subcommand=")
if "%_sp_subcommand%"=="ECHO is on." (set "_sp_subcommand=")
if "%_sp_flags%"=="ECHO is off." (set "_sp_flags=")
if "%_sp_flags%"=="ECHO is on." (set "_sp_flags=")
if "%_sp_args%"=="ECHO is off." (set "_sp_args=")
if "%_sp_args%"=="ECHO is on." (set "_sp_args=")
del subcmd
del flags
del args
endlocal & (
set "_sp_flags=%_sp_flags%"
set "_sp_args=%_sp_args%"
set "_sp_subcommand=%_sp_subcommand%"
)
:: Filter out some commands. For any others, just run the command.
if %_sp_subcommand% == "cd" (
if "%_sp_subcommand%" == "cd" (
goto :case_cd
) else if %_sp_subcommand% == "env" (
) else if "%_sp_subcommand%" == "env" (
goto :case_env
) else if %_sp_subcommand% == "load" (
) else if "%_sp_subcommand%" == "load" (
goto :case_load
) else if %_sp_subcommand% == "unload" (
) else if "%_sp_subcommand%" == "unload" (
goto :case_load
) else (
goto :default_case
@@ -154,20 +189,20 @@ goto :end_switch
if NOT defined _sp_args (
goto :default_case
)
set args_no_quote=%_sp_args:"=%
if NOT "%args_no_quote%"=="%args_no_quote:--help=%" (
if NOT "%_sp_args%"=="%_sp_args:--help=%" (
goto :default_case
) else if NOT "%args_no_quote%"=="%args_no_quote: -h=%" (
) else if NOT "%_sp_args%"=="%_sp_args: -h=%" (
goto :default_case
) else if NOT "%args_no_quote%"=="%args_no_quote:--bat=%" (
) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
goto :default_case
) else if NOT "%args_no_quote%"=="%args_no_quote:deactivate=%" (
) else if NOT "%_sp_args%"=="%_sp_args:deactivate=%" (
for /f "tokens=* USEBACKQ" %%I in (
`call python %spack% %_sp_flags% env deactivate --bat %args_no_quote:deactivate=%`
`call python %spack% %_sp_flags% env deactivate --bat %_sp_args:deactivate=%`
) do %%I
) else if NOT "%args_no_quote%"=="%args_no_quote:activate=%" (
) else if NOT "%_sp_args%"=="%_sp_args:activate=%" (
for /f "tokens=* USEBACKQ" %%I in (
`python %spack% %_sp_flags% env activate --bat %args_no_quote:activate=%`
`python %spack% %_sp_flags% env activate --bat %_sp_args:activate=%`
) do %%I
) else (
goto :default_case
@@ -188,7 +223,7 @@ if defined _sp_args (
for /f "tokens=* USEBACKQ" %%I in (
`python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`) do %%I
)
goto :end_switch
:case_unload
@@ -226,7 +261,7 @@ for %%Z in ("%_pa_new_path%") do if EXIST %%~sZ\NUL (
exit /b 0
:: set module system roots
:_sp_multi_pathadd
:_sp_multi_pathadd
for %%I in (%~2) do (
for %%Z in (%_sp_compatible_sys_types%) do (
:pathadd "%~1" "%%I\%%Z"

View File

@@ -13,16 +13,18 @@ concretizer:
# Whether to consider installed packages or packages from buildcaches when
# concretizing specs. If `true`, we'll try to use as many installs/binaries
# as possible, rather than building. If `false`, we'll always give you a fresh
# concretization.
reuse: true
# concretization. If `dependencies`, we'll only reuse dependencies but
# give you a fresh concretization for your root specs.
reuse: dependencies
# Options that tune which targets are considered for concretization. The
# concretization process is very sensitive to the number targets, and the time
# needed to reach a solution increases noticeably with the number of targets
# considered.
targets:
# Determine whether we want to target specific or generic microarchitectures.
# An example of the first kind might be for instance "skylake" or "bulldozer",
# while generic microarchitectures are for instance "aarch64" or "x86_64_v4".
# Determine whether we want to target specific or generic
# microarchitectures. Valid values are: "microarchitectures" or "generic".
# An example of "microarchitectures" would be "skylake" or "bulldozer",
# while an example of "generic" would be "aarch64" or "x86_64_v4".
granularity: microarchitectures
# If "false" allow targets that are incompatible with the current host (for
# instance concretize with target "icelake" while running on "haswell").
@@ -33,4 +35,4 @@ concretizer:
# environments can always be activated. When "false" perform concretization separately
# on each root spec, allowing different versions and variants of the same package in
# an environment.
unify: true
unify: true

View File

@@ -81,6 +81,10 @@ config:
source_cache: $spack/var/spack/cache
## Directory where spack managed environments are created and stored
# environments_root: $spack/var/spack/environments
# Cache directory for miscellaneous files, like the package index.
# This can be purged with `spack clean --misc-cache`
misc_cache: $user_cache_path/cache
@@ -181,7 +185,7 @@ config:
# when Spack needs to manage its own package metadata and all operations are
# expected to complete within the default time limit. The timeout should
# therefore generally be left untouched.
db_lock_timeout: 3
db_lock_timeout: 60
# How long to wait when attempting to modify a package (e.g. to install it).

View File

@@ -23,8 +23,20 @@ packages:
providers:
elf: [libelf]
fuse: [macfuse]
gl: [apple-gl]
glu: [apple-glu]
unwind: [apple-libunwind]
uuid: [apple-libuuid]
apple-gl:
buildable: false
externals:
- spec: apple-gl@4.1.0
prefix: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
apple-glu:
buildable: false
externals:
- spec: apple-glu@1.3.0
prefix: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
apple-libunwind:
buildable: false
externals:

View File

@@ -40,13 +40,12 @@ modules:
roots:
tcl: $spack/share/spack/modules
lmod: $spack/share/spack/lmod
# What type of modules to use
enable:
- tcl
# What type of modules to use ("tcl" and/or "lmod")
enable: []
tcl:
all:
autoload: none
autoload: direct
# Default configurations if lmod is enabled
lmod:

View File

@@ -20,7 +20,7 @@ packages:
awk: [gawk]
blas: [openblas, amdblis]
D: [ldc]
daal: [intel-daal]
daal: [intel-oneapi-daal]
elf: [elfutils]
fftw-api: [fftw, amdfftw]
flame: [libflame, amdlibflame]
@@ -28,9 +28,9 @@ packages:
gl: [glx, osmesa]
glu: [mesa-glu, openglu]
golang: [go, gcc]
go-external-or-gccgo-bootstrap: [go-bootstrap, gcc]
go-or-gccgo-bootstrap: [go-bootstrap, gcc]
iconv: [libiconv]
ipp: [intel-ipp]
ipp: [intel-oneapi-ipp]
java: [openjdk, jdk, ibm-java]
jpeg: [libjpeg-turbo, libjpeg]
lapack: [openblas, amdlibflame]
@@ -40,7 +40,7 @@ packages:
lua-lang: [lua, lua-luajit-openresty, lua-luajit]
luajit: [lua-luajit-openresty, lua-luajit]
mariadb-client: [mariadb-c-client, mariadb]
mkl: [intel-mkl]
mkl: [intel-oneapi-mkl]
mpe: [mpe2]
mpi: [openmpi, mpich]
mysql-client: [mysql, mariadb-c-client]

View File

@@ -3,3 +3,4 @@ config:
concretizer: clingo
build_stage::
- '$spack/.staging'
stage_name: '{name}-{version}-{hash:7}'

View File

@@ -19,3 +19,4 @@ packages:
- msvc
providers:
mpi: [msmpi]
gl: [wgl]

View File

@@ -5,3 +5,4 @@ llnl*.rst
_build
.spack-env
spack.lock
_spack_root

View File

@@ -942,7 +942,7 @@ first ``libelf`` above, you would run:
$ spack load /qmm4kso
To see which packages that you have loaded to your enviornment you would
To see which packages that you have loaded to your environment you would
use ``spack find --loaded``.
.. code-block:: console
@@ -1103,16 +1103,31 @@ Below are more details about the specifiers that you can add to specs.
Version specifier
^^^^^^^^^^^^^^^^^
A version specifier comes somewhere after a package name and starts
with ``@``. It can be a single version, e.g. ``@1.0``, ``@3``, or
``@1.2a7``. Or, it can be a range of versions, such as ``@1.0:1.5``
(all versions between ``1.0`` and ``1.5``, inclusive). Version ranges
can be open, e.g. ``:3`` means any version up to and including ``3``.
This would include ``3.4`` and ``3.4.2``. ``4.2:`` means any version
above and including ``4.2``. Finally, a version specifier can be a
set of arbitrary versions, such as ``@1.0,1.5,1.7`` (``1.0``, ``1.5``,
or ``1.7``). When you supply such a specifier to ``spack install``,
it constrains the set of versions that Spack will install.
A version specifier ``pkg@<specifier>`` comes after a package name
and starts with ``@``. It can be something abstract that matches
multiple known versions, or a specific version. During concretization,
Spack will pick the optimal version within the spec's constraints
according to policies set for the particular Spack installation.
The version specifier can be *a specific version*, such as ``@=1.0.0`` or
``@=1.2a7``. Or, it can be *a range of versions*, such as ``@1.0:1.5``.
Version ranges are inclusive, so this example includes both ``1.0``
and any ``1.5.x`` version. Version ranges can be unbounded, e.g. ``@:3``
means any version up to and including ``3``. This would include ``3.4``
and ``3.4.2``. Similarly, ``@4.2:`` means any version above and including
``4.2``. As a short-hand, ``@3`` is equivalent to the range ``@3:3`` and
includes any version with major version ``3``.
Notice that you can distinguish between the specific version ``@=3.2`` and
the range ``@3.2``. This is useful for packages that follow a versioning
scheme that omits the zero patch version number: ``3.2``, ``3.2.1``,
``3.2.2``, etc. In general it is preferable to use the range syntax
``@3.2``, since ranges also match versions with one-off suffixes, such as
``3.2-custom``.
A version specifier can also be a list of ranges and specific versions,
separated by commas. For example, ``@1.0:1.5,=1.7.1`` matches any version
in the range ``1.0:1.5`` and the specific version ``1.7.1``.
For packages with a ``git`` attribute, ``git`` references
may be specified instead of a numerical version i.e. branches, tags
@@ -1121,36 +1136,35 @@ reference provided. Acceptable syntaxes for this are:
.. code-block:: sh
# branches and tags
foo@git.develop # use the develop branch
foo@git.0.19 # use the 0.19 tag
# commit hashes
foo@abcdef1234abcdef1234abcdef1234abcdef1234 # 40 character hashes are automatically treated as git commits
foo@git.abcdef1234abcdef1234abcdef1234abcdef1234
Spack versions from git reference either have an associated version supplied by the user,
or infer a relationship to known versions from the structure of the git repository. If an
associated version is supplied by the user, Spack treats the git version as equivalent to that
version for all version comparisons in the package logic (e.g. ``depends_on('foo', when='@1.5')``).
# branches and tags
foo@git.develop # use the develop branch
foo@git.0.19 # use the 0.19 tag
The associated version can be assigned with ``[git ref]=[version]`` syntax, with the caveat that the specified version is known to Spack from either the package definition, or in the configuration preferences (i.e. ``packages.yaml``).
Spack always needs to associate a Spack version with the git reference,
which is used for version comparison. This Spack version is heuristically
taken from the closest valid git tag among ancestors of the git ref.
Once a Spack version is associated with a git ref, it always printed with
the git ref. For example, if the commit ``@git.abcdefg`` is tagged
``0.19``, then the spec will be shown as ``@git.abcdefg=0.19``.
If the git ref is not exactly a tag, then the distance to the nearest tag
is also part of the resolved version. ``@git.abcdefg=0.19.git.8`` means
that the commit is 8 commits away from the ``0.19`` tag.
In cases where Spack cannot resolve a sensible version from a git ref,
users can specify the Spack version to use for the git ref. This is done
by appending ``=`` and the Spack version to the git ref. For example:
.. code-block:: sh
foo@git.my_ref=3.2 # use the my_ref tag or branch, but treat it as version 3.2 for version comparisons
foo@git.abcdef1234abcdef1234abcdef1234abcdef1234=develop # use the given commit, but treat it as develop for version comparisons
If an associated version is not supplied then the tags in the git repo are used to determine
the most recent previous version known to Spack. Details about how versions are compared
and how Spack determines if one version is less than another are discussed in the developer guide.
If the version spec is not provided, then Spack will choose one
according to policies set for the particular spack installation. If
the spec is ambiguous, i.e. it could match multiple versions, Spack
will choose a version within the spec's constraints according to
policies set for the particular Spack installation.
Details about how versions are compared and how Spack determines if
one version is less than another are discussed in the developer guide.

View File

@@ -18,7 +18,7 @@ your Spack mirror and then downloaded and installed by others.
Whenever a mirror provides prebuilt packages, Spack will take these packages
into account during concretization and installation, making ``spack install``
signficantly faster.
significantly faster.
.. note::
@@ -36,7 +36,7 @@ Build caches are created via:
.. code-block:: console
$ spack buildcache create <path/url/mirror name> <spec>
$ spack buildcache push <path/url/mirror name> <spec>
This command takes the locally installed spec and its dependencies, and
creates tarballs of their install prefixes. It also generates metadata files,
@@ -48,7 +48,7 @@ Here is an example where a build cache is created in a local directory named
.. code-block:: console
$ spack buildcache create --allow-root ./spack-cache ninja
$ spack buildcache push --allow-root ./spack-cache ninja
==> Pushing binary packages to file:///home/spackuser/spack/spack-cache/build_cache
Not that ``ninja`` must be installed locally for this to work.
@@ -177,7 +177,7 @@ need to be adjusted for better re-locatability.
--------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^
``spack buildcache create``
``spack buildcache push``
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create tarball of installed Spack package and all dependencies.

View File

@@ -325,42 +325,99 @@ on the command line, because it can specify constraints on packages
is not possible to specify constraints on dependencies while also keeping
those dependencies optional.
The package requirements configuration is specified in ``packages.yaml``
keyed by package name:
^^^^^^^^^^^^^^^^^^^
Requirements syntax
^^^^^^^^^^^^^^^^^^^
The package requirements configuration is specified in ``packages.yaml``,
keyed by package name and expressed using the Spec syntax. In the simplest
case you can specify attributes that you always want the package to have
by providing a single spec string to ``require``:
.. code-block:: yaml
packages:
libfabric:
require: "@1.13.2"
In the above example, ``libfabric`` will always build with version 1.13.2. If you
need to compose multiple configuration scopes ``require`` accepts a list of
strings:
.. code-block:: yaml
packages:
libfabric:
require:
- "@1.13.2"
- "%gcc"
In this case ``libfabric`` will always build with version 1.13.2 **and** using GCC
as a compiler.
For more complex use cases, require accepts also a list of objects. These objects
must have either a ``any_of`` or a ``one_of`` field, containing a list of spec strings,
and they can optionally have a ``when`` and a ``message`` attribute:
.. code-block:: yaml
packages:
openmpi:
require:
- any_of: ["~cuda", "%gcc"]
- any_of: ["@4.1.5", "%gcc"]
message: "in this example only 4.1.5 can build with other compilers"
``any_of`` is a list of specs. One of those specs must be satisfied
and it is also allowed for the concretized spec to match more than one.
In the above example, that means you could build ``openmpi@4.1.5%gcc``,
``openmpi@4.1.5%clang`` or ``openmpi@3.9%gcc``, but
not ``openmpi@3.9%clang``.
If a custom message is provided, and the requirement is not satisfiable,
Spack will print the custom error message:
.. code-block:: console
$ spack spec openmpi@3.9%clang
==> Error: in this example only 4.1.5 can build with other compilers
We could express a similar requirement using the ``when`` attribute:
.. code-block:: yaml
packages:
openmpi:
require:
- any_of: ["%gcc"]
when: "@:4.1.4"
message: "in this example only 4.1.5 can build with other compilers"
In the example above, if the version turns out to be 4.1.4 or less, we require the compiler to be GCC.
For readability, Spack also allows a ``spec`` key accepting a string when there is only a single
constraint:
.. code-block:: yaml
packages:
openmpi:
require:
- spec: "%gcc"
when: "@:4.1.4"
message: "in this example only 4.1.5 can build with other compilers"
This code snippet and the one before it are semantically equivalent.
Finally, instead of ``any_of`` you can use ``one_of`` which also takes a list of specs. The final
concretized spec must match one and only one of them:
.. code-block:: yaml
packages:
mpich:
require:
- one_of: ["+cuda", "+rocm"]
require:
- one_of: ["+cuda", "+rocm"]
Requirements are expressed using Spec syntax (the same as what is provided
to ``spack install``). In the simplest case, you can specify attributes
that you always want the package to have by providing a single spec to
``require``; in the above example, ``libfabric`` will always build
with version 1.13.2.
You can provide a more-relaxed constraint and allow the concretizer to
choose between a set of options using ``any_of`` or ``one_of``:
* ``any_of`` is a list of specs. One of those specs must be satisfied
and it is also allowed for the concretized spec to match more than one.
In the above example, that means you could build ``openmpi+cuda%gcc``,
``openmpi~cuda%clang`` or ``openmpi~cuda%gcc`` (in the last case,
note that both specs in the ``any_of`` for ``openmpi`` are
satisfied).
* ``one_of`` is also a list of specs, and the final concretized spec
must match exactly one of them. In the above example, that means
you could build ``mpich+cuda`` or ``mpich+rocm`` but not
``mpich+cuda+rocm`` (note the current package definition for
``mpich`` already includes a conflict, so this is redundant but
still demonstrates the concept).
In the example above, that means you could build ``mpich+cuda`` or ``mpich+rocm`` but not ``mpich+cuda+rocm``.
.. note::
@@ -368,6 +425,13 @@ choose between a set of options using ``any_of`` or ``one_of``:
preference: items that appear earlier in the list are preferred
(note that these preferences can be ignored in favor of others).
.. note::
When using a conditional requirement, Spack is allowed to actively avoid the triggering
condition (the ``when=...`` spec) if that leads to a concrete spec with better scores in
the optimization criteria. To check the current optimization criteria and their
priorities you can run ``spack solve zlib``.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Setting default requirements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@@ -28,11 +28,14 @@ This package provides the following variants:
* **cuda_arch**
This variant supports the optional specification of the architecture.
This variant supports the optional specification of one or multiple architectures.
Valid values are maintained in the ``cuda_arch_values`` property and
are the numeric character equivalent of the compute capability version
(e.g., '10' for version 1.0). Each provided value affects associated
``CUDA`` dependencies and compiler conflicts.
The variant builds both PTX code for the _virtual_ architecture
(e.g. ``compute_10``) and binary code for the _real_ architecture (e.g. ``sm_10``).
GPUs and their compute capability versions are listed at
https://developer.nvidia.com/cuda-gpus .

View File

@@ -124,7 +124,7 @@ Using oneAPI Tools Installed by Spack
=====================================
Spack can be a convenient way to install and configure compilers and
libaries, even if you do not intend to build a Spack package. If you
libraries, even if you do not intend to build a Spack package. If you
want to build a Makefile project using Spack-installed oneAPI compilers,
then use spack to configure your environment::

View File

@@ -397,7 +397,7 @@ for specifics and examples for ``packages.yaml`` files.
.. If your system administrator did not provide modules for pre-installed Intel
tools, you could do well to ask for them, because installing multiple copies
of the Intel tools, as is wont to happen once Spack is in the picture, is
of the Intel tools, as is won't to happen once Spack is in the picture, is
bound to stretch disk space and patience thin. If you *are* the system
administrator and are still new to modules, then perhaps it's best to follow
the `next section <Installing Intel tools within Spack_>`_ and install the tools
@@ -653,7 +653,7 @@ follow `the next section <intel-install-libs_>`_ instead.
* If you specified a custom variant (for example ``+vtune``) you may want to add this as your
preferred variant in the packages configuration for the ``intel-parallel-studio`` package
as described in :ref:`package-preferences`. Otherwise you will have to specify
the variant everytime ``intel-parallel-studio`` is being used as ``mkl``, ``fftw`` or ``mpi``
the variant every time ``intel-parallel-studio`` is being used as ``mkl``, ``fftw`` or ``mpi``
implementation to avoid pulling in a different variant.
* To set the Intel compilers for default use in Spack, instead of the usual ``%gcc``,

View File

@@ -366,7 +366,7 @@ If the ``pyproject.toml`` lists ``mesonpy`` as the ``build-backend``,
it uses the meson build system. Meson uses the default
``pyproject.toml`` keys to list dependencies.
See https://meson-python.readthedocs.io/en/latest/usage/start.html
See https://meson-python.readthedocs.io/en/latest/tutorials/introduction.html
for more information.
"""
@@ -582,7 +582,7 @@ libraries. Make sure not to add modules/packages containing the word
"test", as these likely won't end up in the installation directory,
or may require test dependencies like pytest to be installed.
Instead of defining the ``import_modules`` explicity, only the subset
Instead of defining the ``import_modules`` explicitly, only the subset
of module names to be skipped can be defined by using ``skip_modules``.
If a defined module has submodules, they are skipped as well, e.g.,
in case the ``plotting`` modules should be excluded from the

View File

@@ -58,9 +58,7 @@ Testing
``WafPackage`` also provides ``test`` and ``installtest`` methods,
which are run after the ``build`` and ``install`` phases, respectively.
By default, these phases do nothing, but you can override them to
run package-specific unit tests. For example, the
`py-py2cairo <https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/py-py2cairo/package.py>`_
package uses:
run package-specific unit tests.
.. code-block:: python

View File

@@ -89,6 +89,7 @@
# Enable todo items
todo_include_todos = True
#
# Disable duplicate cross-reference warnings.
#
@@ -214,8 +215,9 @@ def setup(sphinx):
("py:class", "spack.repo._PrependFileLoader"),
("py:class", "spack.build_systems._checks.BaseBuilder"),
# Spack classes that intersphinx is unable to resolve
("py:class", "spack.version.VersionBase"),
("py:class", "spack.version.StandardVersion"),
("py:class", "spack.spec.DependencySpec"),
("py:class", "spack.install_test.Pb"),
]
# The reST default role (used for this markup: `text`) to use for all documents.
@@ -353,9 +355,7 @@ class SpackStyle(DefaultStyle):
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
("index", "Spack.tex", "Spack Documentation", "Todd Gamblin", "manual"),
]
latex_documents = [("index", "Spack.tex", "Spack Documentation", "Todd Gamblin", "manual")]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
@@ -402,7 +402,7 @@ class SpackStyle(DefaultStyle):
"Spack",
"One line description of project.",
"Miscellaneous",
),
)
]
# Documents to append as an appendix to all manuals.
@@ -418,6 +418,4 @@ class SpackStyle(DefaultStyle):
# -- Extension configuration -------------------------------------------------
# sphinx.ext.intersphinx
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
}
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

View File

@@ -222,7 +222,7 @@ and location. (See the *Configuration settings* section of ``man
ccache`` to learn more about the default settings and how to change
them). Please note that we currently disable ccache's ``hash_dir``
feature to avoid an issue with the stage directory (see
https://github.com/LLNL/spack/pull/3761#issuecomment-294352232).
https://github.com/spack/spack/pull/3761#issuecomment-294352232).
-----------------------
``shared_linking:type``

View File

@@ -20,8 +20,9 @@ case you want to skip directly to specific docs:
* :ref:`packages.yaml <build-settings>`
* :ref:`repos.yaml <repositories>`
You can also add any of these as inline configuration in ``spack.yaml``
in an :ref:`environment <environment-configuration>`.
You can also add any of these as inline configuration in the YAML
manifest file (``spack.yaml``) describing an :ref:`environment
<environment-configuration>`.
-----------
YAML Format
@@ -227,6 +228,9 @@ You can get the name to use for ``<platform>`` by running ``spack arch
--platform``. The system config scope has a ``<platform>`` section for
sites at which ``/etc`` is mounted on multiple heterogeneous machines.
.. _config-scope-precedence:
----------------
Scope Precedence
----------------
@@ -239,6 +243,11 @@ lower-precedence settings. Completely ignoring higher-level configuration
options is supported with the ``::`` notation for keys (see
:ref:`config-overrides` below).
There are also special notations for string concatenation and precendense override.
Using the ``+:`` notation can be used to force *prepending* strings or lists. For lists, this is identical
to the default behavior. Using the ``-:`` works similarly, but for *appending* values.
:ref:`config-prepend-append`
^^^^^^^^^^^
Simple keys
^^^^^^^^^^^
@@ -279,6 +288,47 @@ command:
- ~/.spack/stage
.. _config-prepend-append:
^^^^^^^^^^^^^^^^^^^^
String Concatenation
^^^^^^^^^^^^^^^^^^^^
Above, the user ``config.yaml`` *completely* overrides specific settings in the
default ``config.yaml``. Sometimes, it is useful to add a suffix/prefix
to a path or name. To do this, you can use the ``-:`` notation for *append*
string concatenation at the end of a key in a configuration file. For example:
.. code-block:: yaml
:emphasize-lines: 1
:caption: ~/.spack/config.yaml
config:
install_tree-: /my/custom/suffix/
Spack will then append to the lower-precedence configuration under the
``install_tree-:`` section:
.. code-block:: console
$ spack config get config
config:
install_tree: /some/other/directory/my/custom/suffix
build_stage:
- $tempdir/$user/spack-stage
- ~/.spack/stage
Similarly, ``+:`` can be used to *prepend* to a path or name:
.. code-block:: yaml
:emphasize-lines: 1
:caption: ~/.spack/config.yaml
config:
install_tree+: /my/custom/suffix/
.. _config-overrides:
^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@@ -444,6 +444,120 @@ attribute:
The minimum version of Singularity required to build a SIF (Singularity Image Format)
image from the recipes generated by Spack is ``3.5.3``.
------------------------------
Extending the Jinja2 Templates
------------------------------
The Dockerfile and the Singularity definition file that Spack can generate are based on
a few Jinja2 templates that are rendered according to the environment being containerized.
Even though Spack allows a great deal of customization by just setting appropriate values for
the configuration options, sometimes that is not enough.
In those cases, a user can directly extend the template that Spack uses to render the image
to e.g. set additional environment variables or perform specific operations either before or
after a given stage of the build. Let's consider as an example the following structure:
.. code-block:: console
$ tree /opt/environment
/opt/environment
├── data
│ └── data.csv
├── spack.yaml
├── data
└── templates
└── container
└── CustomDockerfile
containing both the custom template extension and the environment manifest file. To use a custom
template, the environment must register the directory containing it, and declare its use under the
``container`` configuration:
.. code-block:: yaml
:emphasize-lines: 7-8,12
spack:
specs:
- hdf5~mpi
concretizer:
unify: true
config:
template_dirs:
- /opt/environment/templates
container:
format: docker
depfile: true
template: container/CustomDockerfile
The template extension can override two blocks, named ``build_stage`` and ``final_stage``, similarly to
the example below:
.. code-block::
:emphasize-lines: 3,8
{% extends "container/Dockerfile" %}
{% block build_stage %}
RUN echo "Start building"
{{ super() }}
{% endblock %}
{% block final_stage %}
{{ super() }}
COPY data /share/myapp/data
{% endblock %}
The recipe that gets generated contains the two extra instruction that we added in our template extension:
.. code-block:: Dockerfile
:emphasize-lines: 4,43
# Build stage with Spack pre-installed and ready to be used
FROM spack/ubuntu-jammy:latest as builder
RUN echo "Start building"
# What we want to install and how we want to install it
# is specified in a manifest file (spack.yaml)
RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - hdf5~mpi" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " template_dirs:" \
&& echo " - /tmp/environment/templates" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml
# Install the software, remove unnecessary deps
RUN cd /opt/spack-environment && spack env activate . && spack concretize && spack env depfile -o Makefile && make -j $(nproc) && spack gc -y
# Strip all the binaries
RUN find -L /opt/view/* -type f -exec readlink -f '{}' \; | \
xargs file -i | \
grep 'charset=binary' | \
grep 'x-executable\|x-archive\|x-sharedlib' | \
awk -F: '{print $1}' | xargs strip -s
# Modifications to the environment that are necessary to run
RUN cd /opt/spack-environment && \
spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh
# Bare OS image to run the installed executables
FROM ubuntu:22.04
COPY --from=builder /opt/spack-environment /opt/spack-environment
COPY --from=builder /opt/software /opt/software
COPY --from=builder /opt/._view /opt/._view
COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh
COPY data /share/myapp/data
ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l", "-c", "$*", "--" ]
CMD [ "/bin/bash" ]
.. _container_config_options:
-----------------------
@@ -464,6 +578,10 @@ to customize the generation of container recipes:
- The format of the recipe
- ``docker`` or ``singularity``
- Yes
* - ``depfile``
- Whether to use a depfile for installation, or not
- True or False (default)
- No
* - ``images:os``
- Operating system used as a base for the image
- See :ref:`containers-supported-os`
@@ -498,7 +616,7 @@ to customize the generation of container recipes:
- No
* - ``os_packages:command``
- Tool used to manage system packages
- ``apt``, ``yum``
- ``apt``, ``yum``, ``zypper``, ``apk``, ``yum_amazon``
- Only with custom base images
* - ``os_packages:update``
- Whether or not to update the list of available packages
@@ -512,14 +630,6 @@ to customize the generation of container recipes:
- System packages needed at run-time
- Valid packages for the current OS
- No
* - ``extra_instructions:build``
- Extra instructions (e.g. `RUN`, `COPY`, etc.) at the end of the ``build`` stage
- Anything understood by the current ``format``
- No
* - ``extra_instructions:final``
- Extra instructions (e.g. `RUN`, `COPY`, etc.) at the end of the ``final`` stage
- Anything understood by the current ``format``
- No
* - ``labels``
- Labels to tag the image
- Pairs of key-value strings

View File

@@ -118,7 +118,7 @@ make another change, test that change, etc. We use `pytest
<http://pytest.org/>`_ as our tests framework, and these types of
arguments are just passed to the ``pytest`` command underneath. See `the
pytest docs
<http://doc.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests>`_
<https://doc.pytest.org/en/latest/how-to/usage.html#specifying-which-tests-to-run>`_
for more details on test selection syntax.
``spack unit-test`` has a few special options that can help you
@@ -147,7 +147,7 @@ you want to know about. For example, to see just the tests in
You can also combine any of these options with a ``pytest`` keyword
search. See the `pytest usage docs
<https://docs.pytest.org/en/stable/usage.html#specifying-tests-selecting-tests>`_:
<https://doc.pytest.org/en/latest/how-to/usage.html#specifying-which-tests-to-run>`_
for more details on test selection syntax. For example, to see the names of all tests that have "spec"
or "concretize" somewhere in their names:

View File

@@ -472,7 +472,7 @@ use my new hook as follows:
.. code-block:: python
def post_log_write(message, level):
"""Do something custom with the messsage and level every time we write
"""Do something custom with the message and level every time we write
to the log
"""
print('running post_log_write!')

View File

@@ -58,9 +58,9 @@ Using Environments
Here we follow a typical use case of creating, concretizing,
installing and loading an environment.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Creating a named Environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Creating a managed Environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An environment is created by:
@@ -72,7 +72,8 @@ Spack then creates the directory ``var/spack/environments/myenv``.
.. note::
All named environments are stored in the ``var/spack/environments`` folder.
All managed environments by default are stored in the ``var/spack/environments`` folder.
This location can be changed by setting the ``environments_root`` variable in ``config.yaml``.
In the ``var/spack/environments/myenv`` directory, Spack creates the
file ``spack.yaml`` and the hidden directory ``.spack-env``.
@@ -93,9 +94,9 @@ an Environment, the ``.spack-env`` directory also contains:
* ``logs/``: A directory containing the build logs for the packages
in this Environment.
Spack Environments can also be created from either a ``spack.yaml``
manifest or a ``spack.lock`` lockfile. To create an Environment from a
``spack.yaml`` manifest:
Spack Environments can also be created from either a manifest file
(usually but not necessarily named, ``spack.yaml``) or a lockfile.
To create an Environment from a manifest:
.. code-block:: console
@@ -173,7 +174,7 @@ Anonymous specs can be created in place using the command:
$ spack env create -d .
In this case Spack simply creates a spack.yaml file in the requested
In this case Spack simply creates a ``spack.yaml`` file in the requested
directory.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -346,7 +347,7 @@ the Environment and then install the concretized specs.
(see :ref:`build-jobs`). To speed up environment builds further, independent
packages can be installed in parallel by launching more Spack instances. For
example, the following will build at most four packages in parallel using
three background jobs:
three background jobs:
.. code-block:: console
@@ -394,7 +395,7 @@ version (and other constraints) passed as the spec argument to the
For packages with ``git`` attributes, git branches, tags, and commits can
also be used as valid concrete versions (see :ref:`version-specifier`).
This means that for a package ``foo``, ``spack develop foo@git.main`` will clone
This means that for a package ``foo``, ``spack develop foo@git.main`` will clone
the ``main`` branch of the package, and ``spack install`` will install from
that git clone if ``foo`` is in the environment.
Further development on ``foo`` can be tested by reinstalling the environment,
@@ -588,10 +589,11 @@ user support groups providing a large software stack for their HPC center.
.. admonition:: Re-concretization of user specs
When using *unified* concretization (when possible), the entire set of specs will be
re-concretized after any addition of new user specs, to ensure that
the environment remains consistent / minimal. When instead unified concretization is
disabled, only the new specs will be concretized after any addition.
The ``spack concretize`` command without additional arguments will *not* change any
previously concretized specs. This may prevent it from finding a solution when using
``unify: true``, and it may prevent it from finding a minimal solution when using
``unify: when_possible``. You can force Spack to ignore the existing concrete environment
with ``spack concretize -f``.
^^^^^^^^^^^^^
Spec Matrices
@@ -1120,19 +1122,19 @@ index once every package is pushed. Note how this target uses the generated
SPACK ?= spack
BUILDCACHE_DIR = $(CURDIR)/tarballs
.PHONY: all
all: push
include env.mk
example/push/%: example/install/%
@mkdir -p $(dir $@)
$(info About to push $(SPEC) to a buildcache)
$(SPACK) -e . buildcache create --allow-root --only=package --directory $(BUILDCACHE_DIR) /$(HASH)
@touch $@
push: $(addprefix example/push/,$(example/SPACK_PACKAGE_IDS))
$(info Updating the buildcache index)
$(SPACK) -e . buildcache update-index --directory $(BUILDCACHE_DIR)

View File

@@ -21,7 +21,7 @@ be present on the machine where Spack is run:
:header-rows: 1
These requirements can be easily installed on most modern Linux systems;
on macOS, the Command Line Tools package is required, and a full XCode suite
on macOS, the Command Line Tools package is required, and a full XCode suite
may be necessary for some packages such as Qt and apple-gl. Spack is designed
to run on HPC platforms like Cray. Not all packages should be expected
to work on all platforms.
@@ -41,12 +41,9 @@ A build matrix showing which packages are working on which systems is shown belo
.. code-block:: console
yum update -y
yum install -y epel-release
yum update -y
yum --enablerepo epel groupinstall -y "Development Tools"
yum --enablerepo epel install -y curl findutils gcc-c++ gcc gcc-gfortran git gnupg2 hostname iproute redhat-lsb-core make patch python3 python3-pip python3-setuptools unzip
python3 -m pip install boto3
dnf install epel-release
dnf group install "Development Tools"
dnf install curl findutils gcc-gfortran gnupg2 hostname iproute redhat-lsb-core python3 python3-pip python3-setuptools unzip python3-boto3
.. tab-item:: macOS Brew
@@ -368,7 +365,8 @@ Manual compiler configuration
If auto-detection fails, you can manually configure a compiler by
editing your ``~/.spack/<platform>/compilers.yaml`` file. You can do this by running
``spack config edit compilers``, which will open the file in your ``$EDITOR``.
``spack config edit compilers``, which will open the file in
:ref:`your favorite editor <controlling-the-editor>`.
Each compiler configuration in the file looks like this:
@@ -1506,7 +1504,7 @@ Spack On Windows
Windows support for Spack is currently under development. While this work is still in an early stage,
it is currently possible to set up Spack and perform a few operations on Windows. This section will guide
you through the steps needed to install Spack and start running it on a fresh Windows machine.
you through the steps needed to install Spack and start running it on a fresh Windows machine.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Step 1: Install prerequisites
@@ -1516,7 +1514,7 @@ To use Spack on Windows, you will need the following packages:
Required:
* Microsoft Visual Studio
* Python
* Python
* Git
Optional:
@@ -1547,8 +1545,8 @@ Intel Fortran
"""""""""""""
For Fortran-based packages on Windows, we strongly recommend Intel's oneAPI Fortran compilers.
The suite is free to download from Intel's website, located at
https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/fortran-compiler.html#gs.70t5tw.
The suite is free to download from Intel's website, located at
https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/fortran-compiler.html.
The executable of choice for Spack will be Intel's Beta Compiler, ifx, which supports the classic
compiler's (ifort's) frontend and runtime libraries by using LLVM.
@@ -1597,8 +1595,8 @@ in a Windows CMD prompt.
.. note::
If you chose to install Spack into a directory on Windows that is set up to require Administrative
Privleges, Spack will require elevated privleges to run.
Administrative Privleges can be denoted either by default such as
Privileges, Spack will require elevated privileges to run.
Administrative Privileges can be denoted either by default such as
``C:\Program Files``, or aministrator applied administrative restrictions
on a directory that spack installs files to such as ``C:\Users``
@@ -1694,7 +1692,7 @@ Spack console via:
spack install cpuinfo
If in the previous step, you did not have CMake or Ninja installed, running the command above should boostrap both packages
If in the previous step, you did not have CMake or Ninja installed, running the command above should bootstrap both packages
"""""""""""""""""""""""""""
Windows Compatible Packages

View File

@@ -163,7 +163,7 @@ your site.
Mirror environment
^^^^^^^^^^^^^^^^^^
To create a mirror of all packages required by a concerte environment, activate the environment and call ``spack mirror create -a``.
To create a mirror of all packages required by a concrete environment, activate the environment and call ``spack mirror create -a``.
This is especially useful to create a mirror of an environment concretized on another machine.
.. code-block:: console

View File

@@ -13,7 +13,7 @@ The use of module systems to manage user environment in a controlled way
is a common practice at HPC centers that is often embraced also by
individual programmers on their development machines. To support this
common practice Spack integrates with `Environment Modules
<http://modules.sourceforge.net/>`_ and `LMod
<http://modules.sourceforge.net/>`_ and `Lmod
<http://lmod.readthedocs.io/en/latest/>`_ by providing post-install hooks
that generate module files and commands to manipulate them.
@@ -26,8 +26,8 @@ Using module files via Spack
----------------------------
If you have installed a supported module system you should be able to
run either ``module avail`` or ``use -l spack`` to see what module
files have been installed. Here is sample output of those programs,
run ``module avail`` to see what module
files have been installed. Here is sample output of those programs,
showing lots of installed packages:
.. code-block:: console
@@ -51,12 +51,7 @@ showing lots of installed packages:
help2man-1.47.4-gcc-4.8-kcnqmau lua-luaposix-33.4.0-gcc-4.8-mdod2ry netlib-scalapack-2.0.2-gcc-6.3.0-rgqfr6d py-scipy-0.19.0-gcc-6.3.0-kr7nat4 zlib-1.2.11-gcc-6.3.0-7cqp6cj
The names should look familiar, as they resemble the output from ``spack find``.
You *can* use the modules here directly. For example, you could type either of these commands
to load the ``cmake`` module:
.. code-block:: console
$ use cmake-3.7.2-gcc-6.3.0-fowuuby
For example, you could type the following command to load the ``cmake`` module:
.. code-block:: console
@@ -93,9 +88,9 @@ the different file formats that can be generated by Spack:
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
| | **Hook name** | **Default root directory** | **Default template file** | **Compatible tools** |
+=============================+====================+===============================+==============================================+======================+
| **TCL - Non-Hierarchical** | ``tcl`` | share/spack/modules | share/spack/templates/modules/modulefile.tcl | Env. Modules/LMod |
| **Tcl - Non-Hierarchical** | ``tcl`` | share/spack/modules | share/spack/templates/modules/modulefile.tcl | Env. Modules/Lmod |
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
| **Lua - Hierarchical** | ``lmod`` | share/spack/lmod | share/spack/templates/modules/modulefile.lua | LMod |
| **Lua - Hierarchical** | ``lmod`` | share/spack/lmod | share/spack/templates/modules/modulefile.lua | Lmod |
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
@@ -396,13 +391,13 @@ name and version for all packages that depend on mpi.
When specifying module names by projection for Lmod modules, we
recommend NOT including names of dependencies (e.g., MPI, compilers)
that are already in the LMod hierarchy.
that are already in the Lmod hierarchy.
.. note::
TCL modules
TCL modules also allow for explicit conflicts between modulefiles.
Tcl modules
Tcl modules also allow for explicit conflicts between modulefiles.
.. code-block:: yaml
@@ -426,9 +421,9 @@ that are already in the LMod hierarchy.
.. note::
LMod hierarchical module files
Lmod hierarchical module files
When ``lmod`` is activated Spack will generate a set of hierarchical lua module
files that are understood by LMod. The hierarchy will always contain the
files that are understood by Lmod. The hierarchy will always contain the
two layers ``Core`` / ``Compiler`` but can be further extended to
any of the virtual dependencies present in Spack. A case that could be useful in
practice is for instance:
@@ -450,7 +445,7 @@ that are already in the LMod hierarchy.
that will generate a hierarchy in which the ``lapack`` and ``mpi`` layer can be switched
independently. This allows a site to build the same libraries or applications against different
implementations of ``mpi`` and ``lapack``, and let LMod switch safely from one to the
implementations of ``mpi`` and ``lapack``, and let Lmod switch safely from one to the
other.
All packages built with a compiler in ``core_compilers`` and all
@@ -460,12 +455,12 @@ that are already in the LMod hierarchy.
.. warning::
Consistency of Core packages
The user is responsible for maintining consistency among core packages, as ``core_specs``
bypasses the hierarchy that allows LMod to safely switch between coherent software stacks.
bypasses the hierarchy that allows Lmod to safely switch between coherent software stacks.
.. warning::
Deep hierarchies and ``lmod spider``
For hierarchies that are deeper than three layers ``lmod spider`` may have some issues.
See `this discussion on the LMod project <https://github.com/TACC/Lmod/issues/114>`_.
See `this discussion on the Lmod project <https://github.com/TACC/Lmod/issues/114>`_.
""""""""""""""""""""""
Select default modules
@@ -534,7 +529,7 @@ installed to ``/spack/prefix/foo``, if ``foo`` installs executables to
update ``MANPATH``.
The default list of environment variables in this config section
inludes ``PATH``, ``MANPATH``, ``ACLOCAL_PATH``, ``PKG_CONFIG_PATH``
includes ``PATH``, ``MANPATH``, ``ACLOCAL_PATH``, ``PKG_CONFIG_PATH``
and ``CMAKE_PREFIX_PATH``, as well as ``DYLD_FALLBACK_LIBRARY_PATH``
on macOS. On Linux however, the corresponding ``LD_LIBRARY_PATH``
variable is *not* set, because it affects the behavior of
@@ -634,8 +629,9 @@ by its dependency; when the dependency is autoloaded, the executable will be in
PATH. Similarly for scripting languages such as Python, packages and their dependencies
have to be loaded together.
Autoloading is enabled by default for LMod, as it has great builtin support for through
the ``depends_on`` function. For Environment Modules it is disabled by default.
Autoloading is enabled by default for Lmod and Environment Modules. The former
has builtin support for through the ``depends_on`` function. The latter uses
``module load`` statement to load and track dependencies.
Autoloading can also be enabled conditionally:
@@ -655,12 +651,14 @@ The allowed values for the ``autoload`` statement are either ``none``,
``direct`` or ``all``.
.. note::
TCL prerequisites
Tcl prerequisites
In the ``tcl`` section of the configuration file it is possible to use
the ``prerequisites`` directive that accepts the same values as
``autoload``. It will produce module files that have a ``prereq``
statement, which can be used to autoload dependencies in some versions
of Environment Modules.
statement, which autoloads dependencies on Environment Modules when its
``auto_handling`` configuration option is enabled. If Environment Modules
is installed with Spack, ``auto_handling`` is enabled by default starting
version 4.2. Otherwise it is enabled by default since version 5.0.
------------------------
Maintaining Module Files

File diff suppressed because it is too large Load Diff

View File

@@ -9,27 +9,32 @@
CI Pipelines
============
Spack provides commands that support generating and running automated build
pipelines designed for Gitlab CI. At the highest level it works like this:
provide a spack environment describing the set of packages you care about,
and include within that environment file a description of how those packages
should be mapped to Gitlab runners. Spack can then generate a ``.gitlab-ci.yml``
file containing job descriptions for all your packages that can be run by a
properly configured Gitlab CI instance. When run, the generated pipeline will
build and deploy binaries, and it can optionally report to a CDash instance
Spack provides commands that support generating and running automated build pipelines in CI instances. At the highest
level it works like this: provide a spack environment describing the set of packages you care about, and include a
description of how those packages should be mapped to Gitlab runners. Spack can then generate a ``.gitlab-ci.yml``
file containing job descriptions for all your packages that can be run by a properly configured CI instance. When
run, the generated pipeline will build and deploy binaries, and it can optionally report to a CDash instance
regarding the health of the builds as they evolve over time.
------------------------------
Getting started with pipelines
------------------------------
It is fairly straightforward to get started with automated build pipelines. At
a minimum, you'll need to set up a Gitlab instance (more about Gitlab CI
`here <https://about.gitlab.com/product/continuous-integration/>`_) and configure
at least one `runner <https://docs.gitlab.com/runner/>`_. Then the basic steps
for setting up a build pipeline are as follows:
To get started with automated build pipelines a Gitlab instance with version ``>= 12.9``
(more about Gitlab CI `here <https://about.gitlab.com/product/continuous-integration/>`_)
with at least one `runner <https://docs.gitlab.com/runner/>`_ configured is required. This
can be done quickly by setting up a local Gitlab instance.
#. Create a repository on your gitlab instance
It is possible to set up pipelines on gitlab.com, but the builds there are limited to
60 minutes and generic hardware. It is possible to
`hook up <https://about.gitlab.com/blog/2018/04/24/getting-started-gitlab-ci-gcp>`_
Gitlab to Google Kubernetes Engine (`GKE <https://cloud.google.com/kubernetes-engine/>`_)
or Amazon Elastic Kubernetes Service (`EKS <https://aws.amazon.com/eks>`_), though those
topics are outside the scope of this document.
After setting up a Gitlab instance for running CI, the basic steps for setting up a build pipeline are as follows:
#. Create a repository in the Gitlab instance with CI and a runner enabled.
#. Add a ``spack.yaml`` at the root containing your pipeline environment
#. Add a ``.gitlab-ci.yml`` at the root containing two jobs (one to generate
the pipeline dynamically, and one to run the generated jobs).
@@ -40,13 +45,6 @@ See the :ref:`functional_example` section for a minimal working example. See al
the :ref:`custom_Workflow` section for a link to an example of a custom workflow
based on spack pipelines.
While it is possible to set up pipelines on gitlab.com, as illustrated above, the
builds there are limited to 60 minutes and generic hardware. It is also possible to
`hook up <https://about.gitlab.com/blog/2018/04/24/getting-started-gitlab-ci-gcp>`_
Gitlab to Google Kubernetes Engine (`GKE <https://cloud.google.com/kubernetes-engine/>`_)
or Amazon Elastic Kubernetes Service (`EKS <https://aws.amazon.com/eks>`_), though those
topics are outside the scope of this document.
Spack's pipelines are now making use of the
`trigger <https://docs.gitlab.com/ee/ci/yaml/#trigger>`_ syntax to run
dynamically generated
@@ -132,29 +130,35 @@ And here's the spack environment built by the pipeline represented as a
mirrors: { "mirror": "s3://spack-public/mirror" }
gitlab-ci:
before_script:
- git clone ${SPACK_REPO}
- pushd spack && git checkout ${SPACK_CHECKOUT_VERSION} && popd
- . "./spack/share/spack/setup-env.sh"
script:
- pushd ${SPACK_CONCRETE_ENV_DIR} && spack env activate --without-view . && popd
- spack -d ci rebuild
mappings:
- match: ["os=ubuntu18.04"]
runner-attributes:
image:
name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
entrypoint: [""]
tags:
- docker
ci:
enable-artifacts-buildcache: True
rebuild-index: False
pipeline-gen:
- any-job:
before_script:
- git clone ${SPACK_REPO}
- pushd spack && git checkout ${SPACK_CHECKOUT_VERSION} && popd
- . "./spack/share/spack/setup-env.sh"
- build-job:
tags: [docker]
image:
name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
entrypoint: [""]
The elements of this file important to spack ci pipelines are described in more
detail below, but there are a couple of things to note about the above working
example:
.. note::
There is no ``script`` attribute specified for here. The reason for this is
Spack CI will automatically generate reasonable default scripts. More
detail on what is in these scripts can be found below.
Also notice the ``before_script`` section. It is required when using any of the
default scripts to source the ``setup-env.sh`` script in order to inform
the default scripts where to find the ``spack`` executable.
Normally ``enable-artifacts-buildcache`` is not recommended in production as it
results in large binary artifacts getting transferred back and forth between
gitlab and the runners. But in this example on gitlab.com where there is no
@@ -174,7 +178,7 @@ during subsequent pipeline runs.
With the addition of reproducible builds (#22887) a previously working
pipeline will require some changes:
* In the build jobs (``runner-attributes``), the environment location changed.
* In the build-jobs, the environment location changed.
This will typically show as a ``KeyError`` in the failing job. Be sure to
point to ``${SPACK_CONCRETE_ENV_DIR}``.
@@ -196,9 +200,9 @@ ci pipelines. These commands are covered in more detail in this section.
.. _cmd-spack-ci:
^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^
``spack ci``
^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^
Super-command for functionality related to generating pipelines and executing
pipeline jobs.
@@ -227,7 +231,7 @@ Using ``--prune-dag`` or ``--no-prune-dag`` configures whether or not jobs are
generated for specs that are already up to date on the mirror. If enabling
DAG pruning using ``--prune-dag``, more information may be required in your
``spack.yaml`` file, see the :ref:`noop_jobs` section below regarding
``service-job-attributes``.
``noop-job``.
The optional ``--check-index-only`` argument can be used to speed up pipeline
generation by telling spack to consider only remote buildcache indices when
@@ -263,11 +267,11 @@ generated by jobs in the pipeline.
.. _cmd-spack-ci-rebuild:
^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^
``spack ci rebuild``
^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^
The purpose of ``spack ci rebuild`` is straightforward: take its assigned
The purpose of ``spack ci rebuild`` is to take an assigned
spec and ensure a binary of a successful build exists on the target mirror.
If the binary does not already exist, it is built from source and pushed
to the mirror. The associated stand-alone tests are optionally run against
@@ -280,7 +284,7 @@ directory. The script is run in a job to install the spec from source. The
resulting binary package is pushed to the mirror. If ``cdash`` is configured
for the environment, then the build results will be uploaded to the site.
Environment variables and values in the ``gitlab-ci`` section of the
Environment variables and values in the ``ci::pipeline-gen`` section of the
``spack.yaml`` environment file provide inputs to this process. The
two main sources of environment variables are variables written into
``.gitlab-ci.yml`` by ``spack ci generate`` and the GitLab CI runtime.
@@ -298,21 +302,23 @@ A snippet from an example ``spack.yaml`` file illustrating use of this
option *and* specification of a package with broken tests is given below.
The inclusion of a spec for building ``gptune`` is not shown here. Note
that ``--tests`` is passed to ``spack ci rebuild`` as part of the
``gitlab-ci`` script.
``build-job`` script.
.. code-block:: yaml
gitlab-ci:
script:
- . "./share/spack/setup-env.sh"
- spack --version
- cd ${SPACK_CONCRETE_ENV_DIR}
- spack env activate --without-view .
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
- if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg; fi
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
- spack -d ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
ci:
pipeline-gen:
- build-job
script:
- . "./share/spack/setup-env.sh"
- spack --version
- cd ${SPACK_CONCRETE_ENV_DIR}
- spack env activate --without-view .
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
- if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg; fi
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
- spack -d ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
broken-tests-packages:
- gptune
@@ -354,113 +360,31 @@ arguments you can pass to ``spack ci reproduce-build`` in order to reproduce
a particular build locally.
------------------------------------
A pipeline-enabled spack environment
Job Types
------------------------------------
Here's an example of a spack environment file that has been enhanced with
sections describing a build pipeline:
^^^^^^^^^^^^^^^
Rebuild (build)
^^^^^^^^^^^^^^^
.. code-block:: yaml
Rebuild jobs, denoted as ``build-job``'s in the ``pipeline-gen`` list, are jobs
associated with concrete specs that have been marked for rebuild. By default a simple
script for doing rebuild is generated, but may be modified as needed.
spack:
definitions:
- pkgs:
- readline@7.0
- compilers:
- '%gcc@5.5.0'
- oses:
- os=ubuntu18.04
- os=centos7
specs:
- matrix:
- [$pkgs]
- [$compilers]
- [$oses]
mirrors:
cloud_gitlab: https://mirror.spack.io
gitlab-ci:
mappings:
- match:
- os=ubuntu18.04
runner-attributes:
tags:
- spack-kube
image: spack/ubuntu-bionic
- match:
- os=centos7
runner-attributes:
tags:
- spack-kube
image: spack/centos7
cdash:
build-group: Release Testing
url: https://cdash.spack.io
project: Spack
site: Spack AWS Gitlab Instance
The default script does three main steps, change directories to the pipelines concrete
environment, activate the concrete environment, and run the ``spack ci rebuild`` command:
Hopefully, the ``definitions``, ``specs``, ``mirrors``, etc. sections are already
familiar, as they are part of spack :ref:`environments`. So let's take a more
in-depth look some of the pipeline-related sections in that environment file
that might not be as familiar.
.. code-block:: bash
The ``gitlab-ci`` section is used to configure how the pipeline workload should be
generated, mainly how the jobs for building specs should be assigned to the
configured runners on your instance. Each entry within the list of ``mappings``
corresponds to a known gitlab runner, where the ``match`` section is used
in assigning a release spec to one of the runners, and the ``runner-attributes``
section is used to configure the spec/job for that particular runner.
Both the top-level ``gitlab-ci`` section as well as each ``runner-attributes``
section can also contain the following keys: ``image``, ``tags``, ``variables``,
``before_script``, ``script``, and ``after_script``. If any of these keys are
provided at the ``gitlab-ci`` level, they will be used as the defaults for any
``runner-attributes``, unless they are overridden in those sections. Specifying
any of these keys at the ``runner-attributes`` level generally overrides the
keys specified at the higher level, with a couple exceptions. Any ``variables``
specified at both levels result in those dictionaries getting merged in the
resulting generated job, and any duplicate variable names get assigned the value
provided in the specific ``runner-attributes``. If ``tags`` are specified both
at the ``gitlab-ci`` level as well as the ``runner-attributes`` level, then the
lists of tags are combined, and any duplicates are removed.
See the section below on using a custom spack for an example of how these keys
could be used.
There are other pipeline options you can configure within the ``gitlab-ci`` section
as well.
The ``bootstrap`` section allows you to specify lists of specs from
your ``definitions`` that should be staged ahead of the environment's ``specs`` (this
section is described in more detail below). The ``enable-artifacts-buildcache`` key
takes a boolean and determines whether the pipeline uses artifacts to store and
pass along the buildcaches from one stage to the next (the default if you don't
provide this option is ``False``).
The optional ``broken-specs-url`` key tells Spack to check against a list of
specs that are known to be currently broken in ``develop``. If any such specs
are found, the ``spack ci generate`` command will fail with an error message
informing the user what broken specs were encountered. This allows the pipeline
to fail early and avoid wasting compute resources attempting to build packages
that will not succeed.
The optional ``cdash`` section provides information that will be used by the
``spack ci generate`` command (invoked by ``spack ci start``) for reporting
to CDash. All the jobs generated from this environment will belong to a
"build group" within CDash that can be tracked over time. As the release
progresses, this build group may have jobs added or removed. The url, project,
and site are used to specify the CDash instance to which build results should
be reported.
Take a look at the
`schema <https://github.com/spack/spack/blob/develop/lib/spack/spack/schema/gitlab_ci.py>`_
for the gitlab-ci section of the spack environment file, to see precisely what
syntax is allowed there.
cd ${concrete_environment_dir}
spack env activate --without-view .
spack ci rebuild
.. _rebuild_index:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note about rebuilding buildcache index
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
Update Index (reindex)
^^^^^^^^^^^^^^^^^^^^^^
By default, while a pipeline job may rebuild a package, create a buildcache
entry, and push it to the mirror, it does not automatically re-generate the
@@ -475,21 +399,44 @@ not correctly reflect the mirror's contents at the end of a pipeline.
To make sure the buildcache index is up to date at the end of your pipeline,
spack generates a job to update the buildcache index of the target mirror
at the end of each pipeline by default. You can disable this behavior by
adding ``rebuild-index: False`` inside the ``gitlab-ci`` section of your
spack environment. Spack will assign the job any runner attributes found
on the ``service-job-attributes``, if you have provided that in your
``spack.yaml``.
adding ``rebuild-index: False`` inside the ``ci`` section of your
spack environment.
Reindex jobs do not allow modifying the ``script`` attribute since it is automatically
generated using the target mirror listed in the ``mirrors::mirror`` configuration.
^^^^^^^^^^^^^^^^^
Signing (signing)
^^^^^^^^^^^^^^^^^
This job is run after all of the rebuild jobs are completed and is intended to be used
to sign the package binaries built by a protected CI run. Signing jobs are generated
only if a signing job ``script`` is specified and the spack CI job type is protected.
Note, if an ``any-job`` section contains a script, this will not implicitly create a
``signing`` job, a signing job may only exist if it is explicitly specified in the
configuration with a ``script`` attribute. Specifying a signing job without a script
does not create a signing job and the job configuration attributes will be ignored.
Signing jobs are always assigned the runner tags ``aws``, ``protected``, and ``notary``.
^^^^^^^^^^^^^^^^^
Cleanup (cleanup)
^^^^^^^^^^^^^^^^^
When using ``temporary-storage-url-prefix`` the cleanup job will destroy the mirror
created for the associated Gitlab pipeline. Cleanup jobs do not allow modifying the
script, but do expect that the spack command is in the path and require a
``before_script`` to be specified that sources the ``setup-env.sh`` script.
.. _noop_jobs:
^^^^^^^^^^^^^^^^^^^^^^^
Note about "no-op" jobs
^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^
No Op (noop)
^^^^^^^^^^^^
If no specs in an environment need to be rebuilt during a given pipeline run
(meaning all are already up to date on the mirror), a single successful job
(a NO-OP) is still generated to avoid an empty pipeline (which GitLab
considers to be an error). An optional ``service-job-attributes`` section
considers to be an error). The ``noop-job*`` sections
can be added to your ``spack.yaml`` where you can provide ``tags`` and
``image`` or ``variables`` for the generated NO-OP job. This section also
supports providing ``before_script``, ``script``, and ``after_script``, in
@@ -499,51 +446,100 @@ Following is an example of this section added to a ``spack.yaml``:
.. code-block:: yaml
spack:
specs:
- openmpi
mirrors:
cloud_gitlab: https://mirror.spack.io
gitlab-ci:
mappings:
- match:
- os=centos8
runner-attributes:
tags:
- custom
- tag
image: spack/centos7
service-job-attributes:
tags: ['custom', 'tag']
image:
name: 'some.image.registry/custom-image:latest'
entrypoint: ['/bin/bash']
script:
- echo "Custom message in a custom script"
spack:
ci:
pipeline-gen:
- noop-job:
tags: ['custom', 'tag']
image:
name: 'some.image.registry/custom-image:latest'
entrypoint: ['/bin/bash']
script::
- echo "Custom message in a custom script"
The example above illustrates how you can provide the attributes used to run
the NO-OP job in the case of an empty pipeline. The only field for the NO-OP
job that might be generated for you is ``script``, but that will only happen
if you do not provide one yourself.
if you do not provide one yourself. Notice in this example the ``script``
uses the ``::`` notation to prescribe override behavior. Without this, the
``echo`` command would have been prepended to the automatically generated script
rather than replacing it.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Assignment of specs to runners
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
------------------------------------
ci.yaml
------------------------------------
The ``mappings`` section corresponds to a list of runners, and during assignment
of specs to runners, the list is traversed in order looking for matches, the
first runner that matches a release spec is assigned to build that spec. The
``match`` section within each runner mapping section is a list of specs, and
if any of those specs match the release spec (the ``spec.satisfies()`` method
is used), then that runner is considered a match.
Here's an example of a spack configuration file describing a build pipeline:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Configuration of specs/jobs for a runner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: yaml
Once a runner has been chosen to build a release spec, the ``runner-attributes``
section provides information determining details of the job in the context of
the runner. The ``runner-attributes`` section must have a ``tags`` key, which
ci:
target: gitlab
rebuild_index: True
broken-specs-url: https://broken.specs.url
broken-tests-packages:
- gptune
pipeline-gen:
- submapping:
- match:
- os=ubuntu18.04
build-job:
tags:
- spack-kube
image: spack/ubuntu-bionic
- match:
- os=centos7
build-job:
tags:
- spack-kube
image: spack/centos7
cdash:
build-group: Release Testing
url: https://cdash.spack.io
project: Spack
site: Spack AWS Gitlab Instance
The ``ci`` config section is used to configure how the pipeline workload should be
generated, mainly how the jobs for building specs should be assigned to the
configured runners on your instance. The main section for configuring pipelines
is ``pipeline-gen``, which is a list of job attribute sections that are merged,
using the same rules as Spack configs (:ref:`config-scope-precedence`), from the bottom up.
The order sections are applied is to be consistent with how spack orders scope precedence when merging lists.
There are two main section types, ``<type>-job`` sections and ``submapping``
sections.
^^^^^^^^^^^^^^^^^^^^^^
Job Attribute Sections
^^^^^^^^^^^^^^^^^^^^^^
Each type of job may have attributes added or removed via sections in the ``pipeline-gen``
list. Job type specific attributes may be specified using the keys ``<type>-job`` to
add attributes to all jobs of type ``<type>`` or ``<type>-job-remove`` to remove attributes
of type ``<type>``. Each section may only contain one type of job attribute specification, ie. ,
``build-job`` and ``noop-job`` may not coexist but ``build-job`` and ``build-job-remove`` may.
.. note::
The ``*-remove`` specifications are applied before the additive attribute specification.
For example, in the case where both ``build-job`` and ``build-job-remove`` are listed in
the same ``pipeline-gen`` section, the value will still exist in the merged build-job after
applying the section.
All of the attributes specified are forwarded to the generated CI jobs, however special
treatment is applied to the attributes ``tags``, ``image``, ``variables``, ``script``,
``before_script``, and ``after_script`` as they are components recognized explicitly by the
Spack CI generator. For the ``tags`` attribute, Spack will remove reserved tags
(:ref:`reserved_tags`) from all jobs specified in the config. In some cases, such as for
``signing`` jobs, reserved tags will be added back based on the type of CI that is being run.
Once a runner has been chosen to build a release spec, the ``build-job*``
sections provide information determining details of the job in the context of
the runner. At lease one of the ``build-job*`` sections must contain a ``tags`` key, which
is a list containing at least one tag used to select the runner from among the
runners known to the gitlab instance. For Docker executor type runners, the
``image`` key is used to specify the Docker image used to build the release spec
@@ -554,7 +550,7 @@ information on to the runner that it needs to do its work (e.g. scheduler
parameters, etc.). Any ``variables`` provided here will be added, verbatim, to
each job.
The ``runner-attributes`` section also allows users to supply custom ``script``,
The ``build-job`` section also allows users to supply custom ``script``,
``before_script``, and ``after_script`` sections to be applied to every job
scheduled on that runner. This allows users to do any custom preparation or
cleanup tasks that fit their particular workflow, as well as completely
@@ -565,46 +561,45 @@ environment directory is located within your ``--artifacts_root`` (or if not
provided, within your ``$CI_PROJECT_DIR``), activates that environment for
you, and invokes ``spack ci rebuild``.
.. _staging_algorithm:
Sections that specify scripts (``script``, ``before_script``, ``after_script``) are all
read as lists of commands or lists of lists of commands. It is recommended to write scripts
as lists of lists if scripts will be composed via merging. The default behavior of merging
lists will remove duplicate commands and potentially apply unwanted reordering, whereas
merging lists of lists will preserve the local ordering and never removes duplicate
commands. When writing commands to the CI target script, all lists are expanded and
flattened into a single list.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Summary of ``.gitlab-ci.yml`` generation algorithm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^
Submapping Sections
^^^^^^^^^^^^^^^^^^^
All specs yielded by the matrix (or all the specs in the environment) have their
dependencies computed, and the entire resulting set of specs are staged together
before being run through the ``gitlab-ci/mappings`` entries, where each staged
spec is assigned a runner. "Staging" is the name given to the process of
figuring out in what order the specs should be built, taking into consideration
Gitlab CI rules about jobs/stages. In the staging process the goal is to maximize
the number of jobs in any stage of the pipeline, while ensuring that the jobs in
any stage only depend on jobs in previous stages (since those jobs are guaranteed
to have completed already). As a runner is determined for a job, the information
in the ``runner-attributes`` is used to populate various parts of the job
description that will be used by Gitlab CI. Once all the jobs have been assigned
a runner, the ``.gitlab-ci.yml`` is written to disk.
A special case of attribute specification is the ``submapping`` section which may be used
to apply job attributes to build jobs based on the package spec associated with the rebuild
job. Submapping is specified as a list of spec ``match`` lists associated with
``build-job``/``build-job-remove`` sections. There are two options for ``match_behavior``,
either ``first`` or ``merge`` may be specified. In either case, the ``submapping`` list is
processed from the bottom up, and then each ``match`` list is searched for a string that
satisfies the check ``spec.satisfies({match_item})`` for each concrete spec.
The short example provided above would result in the ``readline``, ``ncurses``,
and ``pkgconf`` packages getting staged and built on the runner chosen by the
``spack-k8s`` tag. In this example, spack assumes the runner is a Docker executor
type runner, and thus certain jobs will be run in the ``centos7`` container,
and others in the ``ubuntu-18.04`` container. The resulting ``.gitlab-ci.yml``
will contain 6 jobs in three stages. Once the jobs have been generated, the
presence of a ``SPACK_CDASH_AUTH_TOKEN`` environment variable during the
``spack ci generate`` command would result in all of the jobs being put in a
build group on CDash called "Release Testing" (that group will be created if
it didn't already exist).
The the case of ``match_behavior: first``, the first ``match`` section in the list of
``submappings`` that contains a string that satisfies the spec will apply it's
``build-job*`` attributes to the rebuild job associated with that spec. This is the
default behavior and will be the method if no ``match_behavior`` is specified.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Optional compiler bootstrapping
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The the case of ``merge`` match, all of the ``match`` sections in the list of
``submappings`` that contain a string that satisfies the spec will have the associated
``build-job*`` attributes applied to the rebuild job associated with that spec. Again,
the attributes will be merged starting from the bottom match going up to the top match.
Spack pipelines also have support for bootstrapping compilers on systems that
may not already have the desired compilers installed. The idea here is that
you can specify a list of things to bootstrap in your ``definitions``, and
spack will guarantee those will be installed in a phase of the pipeline before
your release specs, so that you can rely on those packages being available in
the binary mirror when you need them later on in the pipeline. At the moment
In the case that no match is found in a submapping section, no additional attributes will be applied.
^^^^^^^^^^^^^
Bootstrapping
^^^^^^^^^^^^^
The ``bootstrap`` section allows you to specify lists of specs from
your ``definitions`` that should be staged ahead of the environment's ``specs``. At the moment
the only viable use-case for bootstrapping is to install compilers.
Here's an example of what bootstrapping some compilers might look like:
@@ -637,18 +632,18 @@ Here's an example of what bootstrapping some compilers might look like:
exclude:
- '%gcc@7.3.0 os=centos7'
- '%gcc@5.5.0 os=ubuntu18.04'
gitlab-ci:
ci:
bootstrap:
- name: compiler-pkgs
compiler-agnostic: true
mappings:
# mappings similar to the example higher up in this description
pipeline-gen:
# similar to the example higher up in this description
...
The example above adds a list to the ``definitions`` called ``compiler-pkgs``
(you can add any number of these), which lists compiler packages that should
be staged ahead of the full matrix of release specs (in this example, only
readline). Then within the ``gitlab-ci`` section, note the addition of a
readline). Then within the ``ci`` section, note the addition of a
``bootstrap`` section, which can contain a list of items, each referring to
a list in the ``definitions`` section. These items can either
be a dictionary or a string. If you supply a dictionary, it must have a name
@@ -680,6 +675,86 @@ environment/stack file, and in that case no bootstrapping will be done (only the
specs will be staged for building) and the runners will be expected to already
have all needed compilers installed and configured for spack to use.
^^^^^^^^^^^^^^^^^^^
Pipeline Buildcache
^^^^^^^^^^^^^^^^^^^
The ``enable-artifacts-buildcache`` key
takes a boolean and determines whether the pipeline uses artifacts to store and
pass along the buildcaches from one stage to the next (the default if you don't
provide this option is ``False``).
^^^^^^^^^^^^^^^^
Broken Specs URL
^^^^^^^^^^^^^^^^
The optional ``broken-specs-url`` key tells Spack to check against a list of
specs that are known to be currently broken in ``develop``. If any such specs
are found, the ``spack ci generate`` command will fail with an error message
informing the user what broken specs were encountered. This allows the pipeline
to fail early and avoid wasting compute resources attempting to build packages
that will not succeed.
^^^^^
CDash
^^^^^
The optional ``cdash`` section provides information that will be used by the
``spack ci generate`` command (invoked by ``spack ci start``) for reporting
to CDash. All the jobs generated from this environment will belong to a
"build group" within CDash that can be tracked over time. As the release
progresses, this build group may have jobs added or removed. The url, project,
and site are used to specify the CDash instance to which build results should
be reported.
Take a look at the
`schema <https://github.com/spack/spack/blob/develop/lib/spack/spack/schema/ci.py>`_
for the ci section of the spack environment file, to see precisely what
syntax is allowed there.
.. _reserved_tags:
^^^^^^^^^^^^^
Reserved Tags
^^^^^^^^^^^^^
Spack has a subset of tags (``public``, ``protected``, and ``notary``) that it reserves
for classifying runners that may require special permissions or access. The tags
``public`` and ``protected`` are used to distinguish between runners that use public
permissions and runners with protected permissions. The ``notary`` tag is a special tag
that is used to indicate runners that have access to the highly protected information
used for signing binaries using the ``signing`` job.
.. _staging_algorithm:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Summary of ``.gitlab-ci.yml`` generation algorithm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
All specs yielded by the matrix (or all the specs in the environment) have their
dependencies computed, and the entire resulting set of specs are staged together
before being run through the ``ci/pipeline-gen`` entries, where each staged
spec is assigned a runner. "Staging" is the name given to the process of
figuring out in what order the specs should be built, taking into consideration
Gitlab CI rules about jobs/stages. In the staging process the goal is to maximize
the number of jobs in any stage of the pipeline, while ensuring that the jobs in
any stage only depend on jobs in previous stages (since those jobs are guaranteed
to have completed already). As a runner is determined for a job, the information
in the merged ``any-job*`` and ``build-job*`` sections is used to populate various parts of the job
description that will be used by the target CI pipelines. Once all the jobs have been assigned
a runner, the ``.gitlab-ci.yml`` is written to disk.
The short example provided above would result in the ``readline``, ``ncurses``,
and ``pkgconf`` packages getting staged and built on the runner chosen by the
``spack-k8s`` tag. In this example, spack assumes the runner is a Docker executor
type runner, and thus certain jobs will be run in the ``centos7`` container,
and others in the ``ubuntu-18.04`` container. The resulting ``.gitlab-ci.yml``
will contain 6 jobs in three stages. Once the jobs have been generated, the
presence of a ``SPACK_CDASH_AUTH_TOKEN`` environment variable during the
``spack ci generate`` command would result in all of the jobs being put in a
build group on CDash called "Release Testing" (that group will be created if
it didn't already exist).
-------------------------------------
Using a custom spack in your pipeline
-------------------------------------
@@ -726,23 +801,21 @@ generated by ``spack ci generate``. You also want your generated rebuild jobs
spack:
...
gitlab-ci:
mappings:
- match:
- os=ubuntu18.04
runner-attributes:
tags:
- spack-kube
image: spack/ubuntu-bionic
before_script:
- git clone ${SPACK_REPO}
- pushd spack && git checkout ${SPACK_REF} && popd
- . "./spack/share/spack/setup-env.sh"
script:
- spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR}
- spack -d ci rebuild
after_script:
- rm -rf ./spack
ci:
pipeline-gen:
- build-job:
tags:
- spack-kube
image: spack/ubuntu-bionic
before_script:
- git clone ${SPACK_REPO}
- pushd spack && git checkout ${SPACK_REF} && popd
- . "./spack/share/spack/setup-env.sh"
script:
- spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR}
- spack -d ci rebuild
after_script:
- rm -rf ./spack
Now all of the generated rebuild jobs will use the same shell script to clone
spack before running their actual workload.
@@ -831,3 +904,4 @@ verify binary packages (when installing or creating buildcaches). You could
also have already trusted a key spack know about, or if no key is present anywhere,
spack will install specs using ``--no-check-signature`` and create buildcaches
using ``-u`` (for unsigned binaries).

View File

@@ -32,11 +32,16 @@ A package repository a directory structured like this::
...
The top-level ``repo.yaml`` file contains configuration metadata for the
repository, and the ``packages`` directory contains subdirectories for
each package in the repository. Each package directory contains a
``package.py`` file and any patches or other files needed to build the
repository. The packages subdirectory, typically ``packages``, contains
subdirectories for each package in the repository. Each package directory
contains a ``package.py`` file and any patches or other files needed to build the
package.
The ``repo.yaml`` file may also contain a ``subdirectory`` key,
which can modify the name of the subdirectory used for packages. As seen above,
the default value is ``packages``. An empty string (``subdirectory: ''``) requires
a flattened repo structure in which the package names are top-level subdirectories.
Package repositories allow you to:
1. Maintain your own packages separately from Spack;
@@ -373,6 +378,24 @@ You can supply a custom namespace with a second argument, e.g.:
repo:
namespace: 'llnl.comp'
You can also create repositories with custom structure with the ``-d/--subdirectory``
argument, e.g.:
.. code-block:: console
$ spack repo create -d applications myrepo apps
==> Created repo with namespace 'apps'.
==> To register it with Spack, run this command:
spack repo add ~/myrepo
$ ls myrepo
applications/ repo.yaml
$ cat myrepo/repo.yaml
repo:
namespace: apps
subdirectory: applications
^^^^^^^^^^^^^^^^^^
``spack repo add``
^^^^^^^^^^^^^^^^^^

View File

@@ -10,3 +10,4 @@ python-levenshtein
# https://stackoverflow.com/questions/67542699
docutils <0.17
pygments <2.13
urllib3 <2

187
lib/spack/env/cc vendored
View File

@@ -427,6 +427,62 @@ isystem_include_dirs_list=""
libs_list=""
other_args_list=""
# Global state for keeping track of -Wl,-rpath -Wl,/path
wl_expect_rpath=no
# Same, but for -Xlinker -rpath -Xlinker /path
xlinker_expect_rpath=no
parse_Wl() {
while [ $# -ne 0 ]; do
if [ "$wl_expect_rpath" = yes ]; then
if system_dir "$1"; then
append system_rpath_dirs_list "$1"
else
append rpath_dirs_list "$1"
fi
wl_expect_rpath=no
else
case "$1" in
-rpath=*)
arg="${1#-rpath=}"
if [ -z "$arg" ]; then
shift; continue
elif system_dir "$arg"; then
append system_rpath_dirs_list "$arg"
else
append rpath_dirs_list "$arg"
fi
;;
--rpath=*)
arg="${1#--rpath=}"
if [ -z "$arg" ]; then
shift; continue
elif system_dir "$arg"; then
append system_rpath_dirs_list "$arg"
else
append rpath_dirs_list "$arg"
fi
;;
-rpath|--rpath)
wl_expect_rpath=yes
;;
"$dtags_to_strip")
;;
-Wl)
# Nested -Wl,-Wl means we're in NAG compiler territory, we don't support
# it.
return 1
;;
*)
append other_args_list "-Wl,$1"
;;
esac
fi
shift
done
}
while [ $# -ne 0 ]; do
@@ -526,88 +582,79 @@ while [ $# -ne 0 ]; do
append other_args_list "-l$arg"
;;
-Wl,*)
arg="${1#-Wl,}"
if [ -z "$arg" ]; then shift; arg="$1"; fi
case "$arg" in
-rpath=*) rp="${arg#-rpath=}" ;;
--rpath=*) rp="${arg#--rpath=}" ;;
-rpath,*) rp="${arg#-rpath,}" ;;
--rpath,*) rp="${arg#--rpath,}" ;;
-rpath|--rpath)
shift; arg="$1"
case "$arg" in
-Wl,*)
rp="${arg#-Wl,}"
;;
*)
die "-Wl,-rpath was not followed by -Wl,*"
;;
esac
;;
"$dtags_to_strip")
: # We want to remove explicitly this flag
;;
*)
append other_args_list "-Wl,$arg"
;;
esac
;;
-Xlinker,*)
arg="${1#-Xlinker,}"
if [ -z "$arg" ]; then shift; arg="$1"; fi
case "$arg" in
-rpath=*) rp="${arg#-rpath=}" ;;
--rpath=*) rp="${arg#--rpath=}" ;;
-rpath|--rpath)
shift; arg="$1"
case "$arg" in
-Xlinker,*)
rp="${arg#-Xlinker,}"
;;
*)
die "-Xlinker,-rpath was not followed by -Xlinker,*"
;;
esac
;;
*)
append other_args_list "-Xlinker,$arg"
;;
esac
IFS=,
if ! parse_Wl ${1#-Wl,}; then
append other_args_list "$1"
fi
unset IFS
;;
-Xlinker)
if [ "$2" = "-rpath" ]; then
if [ "$3" != "-Xlinker" ]; then
die "-Xlinker,-rpath was not followed by -Xlinker,*"
shift
if [ $# -eq 0 ]; then
# -Xlinker without value: let the compiler error about it.
append other_args_list -Xlinker
xlinker_expect_rpath=no
break
elif [ "$xlinker_expect_rpath" = yes ]; then
# Register the path of -Xlinker -rpath <other args> -Xlinker <path>
if system_dir "$1"; then
append system_rpath_dirs_list "$1"
else
append rpath_dirs_list "$1"
fi
shift 3;
rp="$1"
elif [ "$2" = "$dtags_to_strip" ]; then
shift # We want to remove explicitly this flag
xlinker_expect_rpath=no
else
append other_args_list "$1"
case "$1" in
-rpath=*)
arg="${1#-rpath=}"
if system_dir "$arg"; then
append system_rpath_dirs_list "$arg"
else
append rpath_dirs_list "$arg"
fi
;;
--rpath=*)
arg="${1#--rpath=}"
if system_dir "$arg"; then
append system_rpath_dirs_list "$arg"
else
append rpath_dirs_list "$arg"
fi
;;
-rpath|--rpath)
xlinker_expect_rpath=yes
;;
"$dtags_to_strip")
;;
*)
append other_args_list -Xlinker
append other_args_list "$1"
;;
esac
fi
;;
"$dtags_to_strip")
;;
*)
if [ "$1" = "$dtags_to_strip" ]; then
: # We want to remove explicitly this flag
else
append other_args_list "$1"
fi
append other_args_list "$1"
;;
esac
# test rpaths against system directories in one place.
if [ -n "$rp" ]; then
if system_dir "$rp"; then
append system_rpath_dirs_list "$rp"
else
append rpath_dirs_list "$rp"
fi
fi
shift
done
# We found `-Xlinker -rpath` but no matching value `-Xlinker /path`. Just append
# `-Xlinker -rpath` again and let the compiler or linker handle the error during arg
# parsing.
if [ "$xlinker_expect_rpath" = yes ]; then
append other_args_list -Xlinker
append other_args_list -rpath
fi
# Same, but for -Wl flags.
if [ "$wl_expect_rpath" = yes ]; then
append other_args_list -Wl,-rpath
fi
#
# Add flags from Spack's cppflags, cflags, cxxflags, fcflags, fflags, and
# ldflags. We stick to the order that gmake puts the flags in by default.

View File

@@ -18,7 +18,7 @@
* Homepage: https://pypi.python.org/pypi/archspec
* Usage: Labeling, comparison and detection of microarchitectures
* Version: 0.2.0 (commit e44bad9c7b6defac73696f64078b2fe634719b62)
* Version: 0.2.1 (commit 4b1f21802a23b536bbcce73d3c631a566b20e8bd)
astunparse
----------------
@@ -101,10 +101,7 @@
* Usage: Used for config files. Ruamel is based on PyYAML but is more
actively maintained and has more features, including round-tripping
comments read from config files.
* Version: 0.11.15 (last version supporting Python 2.6)
* Note: This package has been slightly modified to improve Python 2.6
compatibility -- some ``{}`` format strings were replaced, and the
import for ``OrderedDict`` was tweaked.
* Version: 0.17.21
six
---

View File

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

View File

@@ -1,21 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2022 Anthon van der Neut, Ruamel bvba
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,57 @@
# coding: utf-8
if False: # MYPY
from typing import Dict, Any # NOQA
_package_data = dict(
full_package_name='ruamel.yaml',
version_info=(0, 17, 21),
__version__='0.17.21',
version_timestamp='2022-02-12 09:49:22',
author='Anthon van der Neut',
author_email='a.van.der.neut@ruamel.eu',
description='ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order', # NOQA
entry_points=None,
since=2014,
extras_require={
':platform_python_implementation=="CPython" and python_version<"3.11"': ['ruamel.yaml.clib>=0.2.6'], # NOQA
'jinja2': ['ruamel.yaml.jinja2>=0.2'],
'docs': ['ryd'],
},
classifiers=[
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: Markup',
'Typing :: Typed',
],
keywords='yaml 1.2 parser round-trip preserve quotes order config',
read_the_docs='yaml',
supported=[(3, 5)], # minimum
tox=dict(
env='*f', # f for 3.5
fl8excl='_test/lib',
),
# universal=True,
python_requires='>=3',
rtfd='yaml',
) # type: Dict[Any, Any]
version_info = _package_data['version_info']
__version__ = _package_data['__version__']
try:
from .cyaml import * # NOQA
__with_libyaml__ = True
except (ImportError, ValueError): # for Jython
__with_libyaml__ = False
from ruamel.yaml.main import * # NOQA

View File

@@ -0,0 +1,20 @@
# coding: utf-8
if False: # MYPY
from typing import Any, Dict, Optional, List, Union, Optional, Iterator # NOQA
anchor_attrib = '_yaml_anchor'
class Anchor:
__slots__ = 'value', 'always_dump'
attrib = anchor_attrib
def __init__(self):
# type: () -> None
self.value = None
self.always_dump = False
def __repr__(self):
# type: () -> Any
ad = ', (always dump)' if self.always_dump else ""
return 'Anchor({!r}{})'.format(self.value, ad)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,268 @@
# coding: utf-8
# partially from package six by Benjamin Peterson
import sys
import os
import io
import traceback
from abc import abstractmethod
import collections.abc
# fmt: off
if False: # MYPY
from typing import Any, Dict, Optional, List, Union, BinaryIO, IO, Text, Tuple # NOQA
from typing import Optional # NOQA
# fmt: on
_DEFAULT_YAML_VERSION = (1, 2)
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict # type: ignore
# to get the right name import ... as ordereddict doesn't do that
class ordereddict(OrderedDict): # type: ignore
if not hasattr(OrderedDict, 'insert'):
def insert(self, pos, key, value):
# type: (int, Any, Any) -> None
if pos >= len(self):
self[key] = value
return
od = ordereddict()
od.update(self)
for k in od:
del self[k]
for index, old_key in enumerate(od):
if pos == index:
self[key] = value
self[old_key] = od[old_key]
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
# replace with f-strings when 3.5 support is dropped
# ft = '42'
# assert _F('abc {ft!r}', ft=ft) == 'abc %r' % ft
# 'abc %r' % ft -> _F('abc {ft!r}' -> f'abc {ft!r}'
def _F(s, *superfluous, **kw):
# type: (Any, Any, Any) -> Any
if superfluous:
raise TypeError
return s.format(**kw)
StringIO = io.StringIO
BytesIO = io.BytesIO
if False: # MYPY
# StreamType = Union[BinaryIO, IO[str], IO[unicode], StringIO]
# StreamType = Union[BinaryIO, IO[str], StringIO] # type: ignore
StreamType = Any
StreamTextType = StreamType # Union[Text, StreamType]
VersionType = Union[List[int], str, Tuple[int, int]]
builtins_module = 'builtins'
def with_metaclass(meta, *bases):
# type: (Any, Any) -> Any
"""Create a base class with a metaclass."""
return meta('NewBase', bases, {})
DBG_TOKEN = 1
DBG_EVENT = 2
DBG_NODE = 4
_debug = None # type: Optional[int]
if 'RUAMELDEBUG' in os.environ:
_debugx = os.environ.get('RUAMELDEBUG')
if _debugx is None:
_debug = 0
else:
_debug = int(_debugx)
if bool(_debug):
class ObjectCounter:
def __init__(self):
# type: () -> None
self.map = {} # type: Dict[Any, Any]
def __call__(self, k):
# type: (Any) -> None
self.map[k] = self.map.get(k, 0) + 1
def dump(self):
# type: () -> None
for k in sorted(self.map):
sys.stdout.write('{} -> {}'.format(k, self.map[k]))
object_counter = ObjectCounter()
# used from yaml util when testing
def dbg(val=None):
# type: (Any) -> Any
global _debug
if _debug is None:
# set to true or false
_debugx = os.environ.get('YAMLDEBUG')
if _debugx is None:
_debug = 0
else:
_debug = int(_debugx)
if val is None:
return _debug
return _debug & val
class Nprint:
def __init__(self, file_name=None):
# type: (Any) -> None
self._max_print = None # type: Any
self._count = None # type: Any
self._file_name = file_name
def __call__(self, *args, **kw):
# type: (Any, Any) -> None
if not bool(_debug):
return
out = sys.stdout if self._file_name is None else open(self._file_name, 'a')
dbgprint = print # to fool checking for print statements by dv utility
kw1 = kw.copy()
kw1['file'] = out
dbgprint(*args, **kw1)
out.flush()
if self._max_print is not None:
if self._count is None:
self._count = self._max_print
self._count -= 1
if self._count == 0:
dbgprint('forced exit\n')
traceback.print_stack()
out.flush()
sys.exit(0)
if self._file_name:
out.close()
def set_max_print(self, i):
# type: (int) -> None
self._max_print = i
self._count = None
def fp(self, mode='a'):
# type: (str) -> Any
out = sys.stdout if self._file_name is None else open(self._file_name, mode)
return out
nprint = Nprint()
nprintf = Nprint('/var/tmp/ruamel.yaml.log')
# char checkers following production rules
def check_namespace_char(ch):
# type: (Any) -> bool
if '\x21' <= ch <= '\x7E': # ! to ~
return True
if '\xA0' <= ch <= '\uD7FF':
return True
if ('\uE000' <= ch <= '\uFFFD') and ch != '\uFEFF': # excl. byte order mark
return True
if '\U00010000' <= ch <= '\U0010FFFF':
return True
return False
def check_anchorname_char(ch):
# type: (Any) -> bool
if ch in ',[]{}':
return False
return check_namespace_char(ch)
def version_tnf(t1, t2=None):
# type: (Any, Any) -> Any
"""
return True if ruamel.yaml version_info < t1, None if t2 is specified and bigger else False
"""
from ruamel.yaml import version_info # NOQA
if version_info < t1:
return True
if t2 is not None and version_info < t2:
return None
return False
class MutableSliceableSequence(collections.abc.MutableSequence): # type: ignore
__slots__ = ()
def __getitem__(self, index):
# type: (Any) -> Any
if not isinstance(index, slice):
return self.__getsingleitem__(index)
return type(self)([self[i] for i in range(*index.indices(len(self)))]) # type: ignore
def __setitem__(self, index, value):
# type: (Any, Any) -> None
if not isinstance(index, slice):
return self.__setsingleitem__(index, value)
assert iter(value)
# nprint(index.start, index.stop, index.step, index.indices(len(self)))
if index.step is None:
del self[index.start : index.stop]
for elem in reversed(value):
self.insert(0 if index.start is None else index.start, elem)
else:
range_parms = index.indices(len(self))
nr_assigned_items = (range_parms[1] - range_parms[0] - 1) // range_parms[2] + 1
# need to test before changing, in case TypeError is caught
if nr_assigned_items < len(value):
raise TypeError(
'too many elements in value {} < {}'.format(nr_assigned_items, len(value))
)
elif nr_assigned_items > len(value):
raise TypeError(
'not enough elements in value {} > {}'.format(
nr_assigned_items, len(value)
)
)
for idx, i in enumerate(range(*range_parms)):
self[i] = value[idx]
def __delitem__(self, index):
# type: (Any) -> None
if not isinstance(index, slice):
return self.__delsingleitem__(index)
# nprint(index.start, index.stop, index.step, index.indices(len(self)))
for i in reversed(range(*index.indices(len(self)))):
del self[i]
@abstractmethod
def __getsingleitem__(self, index):
# type: (Any) -> Any
raise IndexError
@abstractmethod
def __setsingleitem__(self, index, value):
# type: (Any, Any) -> None
raise IndexError
@abstractmethod
def __delsingleitem__(self, index):
# type: (Any) -> None
raise IndexError

View File

@@ -0,0 +1,243 @@
# coding: utf-8
import warnings
from ruamel.yaml.error import MarkedYAMLError, ReusedAnchorWarning
from ruamel.yaml.compat import _F, nprint, nprintf # NOQA
from ruamel.yaml.events import (
StreamStartEvent,
StreamEndEvent,
MappingStartEvent,
MappingEndEvent,
SequenceStartEvent,
SequenceEndEvent,
AliasEvent,
ScalarEvent,
)
from ruamel.yaml.nodes import MappingNode, ScalarNode, SequenceNode
if False: # MYPY
from typing import Any, Dict, Optional, List # NOQA
__all__ = ['Composer', 'ComposerError']
class ComposerError(MarkedYAMLError):
pass
class Composer:
def __init__(self, loader=None):
# type: (Any) -> None
self.loader = loader
if self.loader is not None and getattr(self.loader, '_composer', None) is None:
self.loader._composer = self
self.anchors = {} # type: Dict[Any, Any]
@property
def parser(self):
# type: () -> Any
if hasattr(self.loader, 'typ'):
self.loader.parser
return self.loader._parser
@property
def resolver(self):
# type: () -> Any
# assert self.loader._resolver is not None
if hasattr(self.loader, 'typ'):
self.loader.resolver
return self.loader._resolver
def check_node(self):
# type: () -> Any
# Drop the STREAM-START event.
if self.parser.check_event(StreamStartEvent):
self.parser.get_event()
# If there are more documents available?
return not self.parser.check_event(StreamEndEvent)
def get_node(self):
# type: () -> Any
# Get the root node of the next document.
if not self.parser.check_event(StreamEndEvent):
return self.compose_document()
def get_single_node(self):
# type: () -> Any
# Drop the STREAM-START event.
self.parser.get_event()
# Compose a document if the stream is not empty.
document = None # type: Any
if not self.parser.check_event(StreamEndEvent):
document = self.compose_document()
# Ensure that the stream contains no more documents.
if not self.parser.check_event(StreamEndEvent):
event = self.parser.get_event()
raise ComposerError(
'expected a single document in the stream',
document.start_mark,
'but found another document',
event.start_mark,
)
# Drop the STREAM-END event.
self.parser.get_event()
return document
def compose_document(self):
# type: (Any) -> Any
# Drop the DOCUMENT-START event.
self.parser.get_event()
# Compose the root node.
node = self.compose_node(None, None)
# Drop the DOCUMENT-END event.
self.parser.get_event()
self.anchors = {}
return node
def return_alias(self, a):
# type: (Any) -> Any
return a
def compose_node(self, parent, index):
# type: (Any, Any) -> Any
if self.parser.check_event(AliasEvent):
event = self.parser.get_event()
alias = event.anchor
if alias not in self.anchors:
raise ComposerError(
None,
None,
_F('found undefined alias {alias!r}', alias=alias),
event.start_mark,
)
return self.return_alias(self.anchors[alias])
event = self.parser.peek_event()
anchor = event.anchor
if anchor is not None: # have an anchor
if anchor in self.anchors:
# raise ComposerError(
# "found duplicate anchor %r; first occurrence"
# % (anchor), self.anchors[anchor].start_mark,
# "second occurrence", event.start_mark)
ws = (
'\nfound duplicate anchor {!r}\nfirst occurrence {}\nsecond occurrence '
'{}'.format((anchor), self.anchors[anchor].start_mark, event.start_mark)
)
warnings.warn(ws, ReusedAnchorWarning)
self.resolver.descend_resolver(parent, index)
if self.parser.check_event(ScalarEvent):
node = self.compose_scalar_node(anchor)
elif self.parser.check_event(SequenceStartEvent):
node = self.compose_sequence_node(anchor)
elif self.parser.check_event(MappingStartEvent):
node = self.compose_mapping_node(anchor)
self.resolver.ascend_resolver()
return node
def compose_scalar_node(self, anchor):
# type: (Any) -> Any
event = self.parser.get_event()
tag = event.tag
if tag is None or tag == '!':
tag = self.resolver.resolve(ScalarNode, event.value, event.implicit)
node = ScalarNode(
tag,
event.value,
event.start_mark,
event.end_mark,
style=event.style,
comment=event.comment,
anchor=anchor,
)
if anchor is not None:
self.anchors[anchor] = node
return node
def compose_sequence_node(self, anchor):
# type: (Any) -> Any
start_event = self.parser.get_event()
tag = start_event.tag
if tag is None or tag == '!':
tag = self.resolver.resolve(SequenceNode, None, start_event.implicit)
node = SequenceNode(
tag,
[],
start_event.start_mark,
None,
flow_style=start_event.flow_style,
comment=start_event.comment,
anchor=anchor,
)
if anchor is not None:
self.anchors[anchor] = node
index = 0
while not self.parser.check_event(SequenceEndEvent):
node.value.append(self.compose_node(node, index))
index += 1
end_event = self.parser.get_event()
if node.flow_style is True and end_event.comment is not None:
if node.comment is not None:
nprint(
'Warning: unexpected end_event commment in sequence '
'node {}'.format(node.flow_style)
)
node.comment = end_event.comment
node.end_mark = end_event.end_mark
self.check_end_doc_comment(end_event, node)
return node
def compose_mapping_node(self, anchor):
# type: (Any) -> Any
start_event = self.parser.get_event()
tag = start_event.tag
if tag is None or tag == '!':
tag = self.resolver.resolve(MappingNode, None, start_event.implicit)
node = MappingNode(
tag,
[],
start_event.start_mark,
None,
flow_style=start_event.flow_style,
comment=start_event.comment,
anchor=anchor,
)
if anchor is not None:
self.anchors[anchor] = node
while not self.parser.check_event(MappingEndEvent):
# key_event = self.parser.peek_event()
item_key = self.compose_node(node, None)
# if item_key in node.value:
# raise ComposerError("while composing a mapping",
# start_event.start_mark,
# "found duplicate key", key_event.start_mark)
item_value = self.compose_node(node, item_key)
# node.value[item_key] = item_value
node.value.append((item_key, item_value))
end_event = self.parser.get_event()
if node.flow_style is True and end_event.comment is not None:
node.comment = end_event.comment
node.end_mark = end_event.end_mark
self.check_end_doc_comment(end_event, node)
return node
def check_end_doc_comment(self, end_event, node):
# type: (Any, Any) -> None
if end_event.comment and end_event.comment[1]:
# pre comments on an end_event, no following to move to
if node.comment is None:
node.comment = [None, None]
assert not isinstance(node, ScalarEvent)
# this is a post comment on a mapping node, add as third element
# in the list
node.comment.append(end_event.comment[1])
end_event.comment[1] = None

View File

@@ -0,0 +1,14 @@
# coding: utf-8
import warnings
from ruamel.yaml.util import configobj_walker as new_configobj_walker
if False: # MYPY
from typing import Any # NOQA
def configobj_walker(cfg):
# type: (Any) -> Any
warnings.warn('configobj_walker has moved to ruamel.yaml.util, please update your code')
return new_configobj_walker(cfg)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,183 @@
# coding: utf-8
from _ruamel_yaml import CParser, CEmitter # type: ignore
from ruamel.yaml.constructor import Constructor, BaseConstructor, SafeConstructor
from ruamel.yaml.representer import Representer, SafeRepresenter, BaseRepresenter
from ruamel.yaml.resolver import Resolver, BaseResolver
if False: # MYPY
from typing import Any, Union, Optional # NOQA
from ruamel.yaml.compat import StreamTextType, StreamType, VersionType # NOQA
__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader', 'CBaseDumper', 'CSafeDumper', 'CDumper']
# this includes some hacks to solve the usage of resolver by lower level
# parts of the parser
class CBaseLoader(CParser, BaseConstructor, BaseResolver): # type: ignore
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
CParser.__init__(self, stream)
self._parser = self._composer = self
BaseConstructor.__init__(self, loader=self)
BaseResolver.__init__(self, loadumper=self)
# self.descend_resolver = self._resolver.descend_resolver
# self.ascend_resolver = self._resolver.ascend_resolver
# self.resolve = self._resolver.resolve
class CSafeLoader(CParser, SafeConstructor, Resolver): # type: ignore
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
CParser.__init__(self, stream)
self._parser = self._composer = self
SafeConstructor.__init__(self, loader=self)
Resolver.__init__(self, loadumper=self)
# self.descend_resolver = self._resolver.descend_resolver
# self.ascend_resolver = self._resolver.ascend_resolver
# self.resolve = self._resolver.resolve
class CLoader(CParser, Constructor, Resolver): # type: ignore
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
CParser.__init__(self, stream)
self._parser = self._composer = self
Constructor.__init__(self, loader=self)
Resolver.__init__(self, loadumper=self)
# self.descend_resolver = self._resolver.descend_resolver
# self.ascend_resolver = self._resolver.ascend_resolver
# self.resolve = self._resolver.resolve
class CBaseDumper(CEmitter, BaseRepresenter, BaseResolver): # type: ignore
def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
block_seq_indent=None,
top_level_colon_align=None,
prefix_colon=None,
):
# type: (StreamType, Any, Any, Any, Optional[bool], Optional[int], Optional[int], Optional[bool], Any, Any, Optional[bool], Optional[bool], Any, Any, Any, Any, Any) -> None # NOQA
CEmitter.__init__(
self,
stream,
canonical=canonical,
indent=indent,
width=width,
encoding=encoding,
allow_unicode=allow_unicode,
line_break=line_break,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version,
tags=tags,
)
self._emitter = self._serializer = self._representer = self
BaseRepresenter.__init__(
self,
default_style=default_style,
default_flow_style=default_flow_style,
dumper=self,
)
BaseResolver.__init__(self, loadumper=self)
class CSafeDumper(CEmitter, SafeRepresenter, Resolver): # type: ignore
def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
block_seq_indent=None,
top_level_colon_align=None,
prefix_colon=None,
):
# type: (StreamType, Any, Any, Any, Optional[bool], Optional[int], Optional[int], Optional[bool], Any, Any, Optional[bool], Optional[bool], Any, Any, Any, Any, Any) -> None # NOQA
self._emitter = self._serializer = self._representer = self
CEmitter.__init__(
self,
stream,
canonical=canonical,
indent=indent,
width=width,
encoding=encoding,
allow_unicode=allow_unicode,
line_break=line_break,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version,
tags=tags,
)
self._emitter = self._serializer = self._representer = self
SafeRepresenter.__init__(
self, default_style=default_style, default_flow_style=default_flow_style
)
Resolver.__init__(self)
class CDumper(CEmitter, Representer, Resolver): # type: ignore
def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
block_seq_indent=None,
top_level_colon_align=None,
prefix_colon=None,
):
# type: (StreamType, Any, Any, Any, Optional[bool], Optional[int], Optional[int], Optional[bool], Any, Any, Optional[bool], Optional[bool], Any, Any, Any, Any, Any) -> None # NOQA
CEmitter.__init__(
self,
stream,
canonical=canonical,
indent=indent,
width=width,
encoding=encoding,
allow_unicode=allow_unicode,
line_break=line_break,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version,
tags=tags,
)
self._emitter = self._serializer = self._representer = self
Representer.__init__(
self, default_style=default_style, default_flow_style=default_flow_style
)
Resolver.__init__(self)

View File

@@ -0,0 +1,219 @@
# coding: utf-8
from ruamel.yaml.emitter import Emitter
from ruamel.yaml.serializer import Serializer
from ruamel.yaml.representer import (
Representer,
SafeRepresenter,
BaseRepresenter,
RoundTripRepresenter,
)
from ruamel.yaml.resolver import Resolver, BaseResolver, VersionedResolver
if False: # MYPY
from typing import Any, Dict, List, Union, Optional # NOQA
from ruamel.yaml.compat import StreamType, VersionType # NOQA
__all__ = ['BaseDumper', 'SafeDumper', 'Dumper', 'RoundTripDumper']
class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver):
def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
block_seq_indent=None,
top_level_colon_align=None,
prefix_colon=None,
):
# type: (Any, StreamType, Any, Any, Optional[bool], Optional[int], Optional[int], Optional[bool], Any, Any, Optional[bool], Optional[bool], Any, Any, Any, Any, Any) -> None # NOQA
Emitter.__init__(
self,
stream,
canonical=canonical,
indent=indent,
width=width,
allow_unicode=allow_unicode,
line_break=line_break,
block_seq_indent=block_seq_indent,
dumper=self,
)
Serializer.__init__(
self,
encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version,
tags=tags,
dumper=self,
)
BaseRepresenter.__init__(
self,
default_style=default_style,
default_flow_style=default_flow_style,
dumper=self,
)
BaseResolver.__init__(self, loadumper=self)
class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver):
def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
block_seq_indent=None,
top_level_colon_align=None,
prefix_colon=None,
):
# type: (StreamType, Any, Any, Optional[bool], Optional[int], Optional[int], Optional[bool], Any, Any, Optional[bool], Optional[bool], Any, Any, Any, Any, Any) -> None # NOQA
Emitter.__init__(
self,
stream,
canonical=canonical,
indent=indent,
width=width,
allow_unicode=allow_unicode,
line_break=line_break,
block_seq_indent=block_seq_indent,
dumper=self,
)
Serializer.__init__(
self,
encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version,
tags=tags,
dumper=self,
)
SafeRepresenter.__init__(
self,
default_style=default_style,
default_flow_style=default_flow_style,
dumper=self,
)
Resolver.__init__(self, loadumper=self)
class Dumper(Emitter, Serializer, Representer, Resolver):
def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
block_seq_indent=None,
top_level_colon_align=None,
prefix_colon=None,
):
# type: (StreamType, Any, Any, Optional[bool], Optional[int], Optional[int], Optional[bool], Any, Any, Optional[bool], Optional[bool], Any, Any, Any, Any, Any) -> None # NOQA
Emitter.__init__(
self,
stream,
canonical=canonical,
indent=indent,
width=width,
allow_unicode=allow_unicode,
line_break=line_break,
block_seq_indent=block_seq_indent,
dumper=self,
)
Serializer.__init__(
self,
encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version,
tags=tags,
dumper=self,
)
Representer.__init__(
self,
default_style=default_style,
default_flow_style=default_flow_style,
dumper=self,
)
Resolver.__init__(self, loadumper=self)
class RoundTripDumper(Emitter, Serializer, RoundTripRepresenter, VersionedResolver):
def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
block_seq_indent=None,
top_level_colon_align=None,
prefix_colon=None,
):
# type: (StreamType, Any, Optional[bool], Optional[int], Optional[int], Optional[int], Optional[bool], Any, Any, Optional[bool], Optional[bool], Any, Any, Any, Any, Any) -> None # NOQA
Emitter.__init__(
self,
stream,
canonical=canonical,
indent=indent,
width=width,
allow_unicode=allow_unicode,
line_break=line_break,
block_seq_indent=block_seq_indent,
top_level_colon_align=top_level_colon_align,
prefix_colon=prefix_colon,
dumper=self,
)
Serializer.__init__(
self,
encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version,
tags=tags,
dumper=self,
)
RoundTripRepresenter.__init__(
self,
default_style=default_style,
default_flow_style=default_flow_style,
dumper=self,
)
VersionedResolver.__init__(self, loader=self)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,332 @@
# coding: utf-8
import warnings
import textwrap
from ruamel.yaml.compat import _F
if False: # MYPY
from typing import Any, Dict, Optional, List, Text # NOQA
__all__ = [
'FileMark',
'StringMark',
'CommentMark',
'YAMLError',
'MarkedYAMLError',
'ReusedAnchorWarning',
'UnsafeLoaderWarning',
'MarkedYAMLWarning',
'MarkedYAMLFutureWarning',
]
class StreamMark:
__slots__ = 'name', 'index', 'line', 'column'
def __init__(self, name, index, line, column):
# type: (Any, int, int, int) -> None
self.name = name
self.index = index
self.line = line
self.column = column
def __str__(self):
# type: () -> Any
where = _F(
' in "{sname!s}", line {sline1:d}, column {scolumn1:d}',
sname=self.name,
sline1=self.line + 1,
scolumn1=self.column + 1,
)
return where
def __eq__(self, other):
# type: (Any) -> bool
if self.line != other.line or self.column != other.column:
return False
if self.name != other.name or self.index != other.index:
return False
return True
def __ne__(self, other):
# type: (Any) -> bool
return not self.__eq__(other)
class FileMark(StreamMark):
__slots__ = ()
class StringMark(StreamMark):
__slots__ = 'name', 'index', 'line', 'column', 'buffer', 'pointer'
def __init__(self, name, index, line, column, buffer, pointer):
# type: (Any, int, int, int, Any, Any) -> None
StreamMark.__init__(self, name, index, line, column)
self.buffer = buffer
self.pointer = pointer
def get_snippet(self, indent=4, max_length=75):
# type: (int, int) -> Any
if self.buffer is None: # always False
return None
head = ""
start = self.pointer
while start > 0 and self.buffer[start - 1] not in '\0\r\n\x85\u2028\u2029':
start -= 1
if self.pointer - start > max_length / 2 - 1:
head = ' ... '
start += 5
break
tail = ""
end = self.pointer
while end < len(self.buffer) and self.buffer[end] not in '\0\r\n\x85\u2028\u2029':
end += 1
if end - self.pointer > max_length / 2 - 1:
tail = ' ... '
end -= 5
break
snippet = self.buffer[start:end]
caret = '^'
caret = '^ (line: {})'.format(self.line + 1)
return (
' ' * indent
+ head
+ snippet
+ tail
+ '\n'
+ ' ' * (indent + self.pointer - start + len(head))
+ caret
)
def __str__(self):
# type: () -> Any
snippet = self.get_snippet()
where = _F(
' in "{sname!s}", line {sline1:d}, column {scolumn1:d}',
sname=self.name,
sline1=self.line + 1,
scolumn1=self.column + 1,
)
if snippet is not None:
where += ':\n' + snippet
return where
def __repr__(self):
# type: () -> Any
snippet = self.get_snippet()
where = _F(
' in "{sname!s}", line {sline1:d}, column {scolumn1:d}',
sname=self.name,
sline1=self.line + 1,
scolumn1=self.column + 1,
)
if snippet is not None:
where += ':\n' + snippet
return where
class CommentMark:
__slots__ = ('column',)
def __init__(self, column):
# type: (Any) -> None
self.column = column
class YAMLError(Exception):
pass
class MarkedYAMLError(YAMLError):
def __init__(
self,
context=None,
context_mark=None,
problem=None,
problem_mark=None,
note=None,
warn=None,
):
# type: (Any, Any, Any, Any, Any, Any) -> None
self.context = context
self.context_mark = context_mark
self.problem = problem
self.problem_mark = problem_mark
self.note = note
# warn is ignored
def __str__(self):
# type: () -> Any
lines = [] # type: List[str]
if self.context is not None:
lines.append(self.context)
if self.context_mark is not None and (
self.problem is None
or self.problem_mark is None
or self.context_mark.name != self.problem_mark.name
or self.context_mark.line != self.problem_mark.line
or self.context_mark.column != self.problem_mark.column
):
lines.append(str(self.context_mark))
if self.problem is not None:
lines.append(self.problem)
if self.problem_mark is not None:
lines.append(str(self.problem_mark))
if self.note is not None and self.note:
note = textwrap.dedent(self.note)
lines.append(note)
return '\n'.join(lines)
class YAMLStreamError(Exception):
pass
class YAMLWarning(Warning):
pass
class MarkedYAMLWarning(YAMLWarning):
def __init__(
self,
context=None,
context_mark=None,
problem=None,
problem_mark=None,
note=None,
warn=None,
):
# type: (Any, Any, Any, Any, Any, Any) -> None
self.context = context
self.context_mark = context_mark
self.problem = problem
self.problem_mark = problem_mark
self.note = note
self.warn = warn
def __str__(self):
# type: () -> Any
lines = [] # type: List[str]
if self.context is not None:
lines.append(self.context)
if self.context_mark is not None and (
self.problem is None
or self.problem_mark is None
or self.context_mark.name != self.problem_mark.name
or self.context_mark.line != self.problem_mark.line
or self.context_mark.column != self.problem_mark.column
):
lines.append(str(self.context_mark))
if self.problem is not None:
lines.append(self.problem)
if self.problem_mark is not None:
lines.append(str(self.problem_mark))
if self.note is not None and self.note:
note = textwrap.dedent(self.note)
lines.append(note)
if self.warn is not None and self.warn:
warn = textwrap.dedent(self.warn)
lines.append(warn)
return '\n'.join(lines)
class ReusedAnchorWarning(YAMLWarning):
pass
class UnsafeLoaderWarning(YAMLWarning):
text = """
The default 'Loader' for 'load(stream)' without further arguments can be unsafe.
Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK.
Alternatively include the following in your code:
import warnings
warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)
In most other cases you should consider using 'safe_load(stream)'"""
pass
warnings.simplefilter('once', UnsafeLoaderWarning)
class MantissaNoDotYAML1_1Warning(YAMLWarning):
def __init__(self, node, flt_str):
# type: (Any, Any) -> None
self.node = node
self.flt = flt_str
def __str__(self):
# type: () -> Any
line = self.node.start_mark.line
col = self.node.start_mark.column
return """
In YAML 1.1 floating point values should have a dot ('.') in their mantissa.
See the Floating-Point Language-Independent Type for YAML Version 1.1 specification
( http://yaml.org/type/float.html ). This dot is not required for JSON nor for YAML 1.2
Correct your float: "{}" on line: {}, column: {}
or alternatively include the following in your code:
import warnings
warnings.simplefilter('ignore', ruamel.yaml.error.MantissaNoDotYAML1_1Warning)
""".format(
self.flt, line, col
)
warnings.simplefilter('once', MantissaNoDotYAML1_1Warning)
class YAMLFutureWarning(Warning):
pass
class MarkedYAMLFutureWarning(YAMLFutureWarning):
def __init__(
self,
context=None,
context_mark=None,
problem=None,
problem_mark=None,
note=None,
warn=None,
):
# type: (Any, Any, Any, Any, Any, Any) -> None
self.context = context
self.context_mark = context_mark
self.problem = problem
self.problem_mark = problem_mark
self.note = note
self.warn = warn
def __str__(self):
# type: () -> Any
lines = [] # type: List[str]
if self.context is not None:
lines.append(self.context)
if self.context_mark is not None and (
self.problem is None
or self.problem_mark is None
or self.context_mark.name != self.problem_mark.name
or self.context_mark.line != self.problem_mark.line
or self.context_mark.column != self.problem_mark.column
):
lines.append(str(self.context_mark))
if self.problem is not None:
lines.append(self.problem)
if self.problem_mark is not None:
lines.append(str(self.problem_mark))
if self.note is not None and self.note:
note = textwrap.dedent(self.note)
lines.append(note)
if self.warn is not None and self.warn:
warn = textwrap.dedent(self.warn)
lines.append(warn)
return '\n'.join(lines)

View File

@@ -0,0 +1,196 @@
# coding: utf-8
from ruamel.yaml.compat import _F
# Abstract classes.
if False: # MYPY
from typing import Any, Dict, Optional, List # NOQA
SHOW_LINES = False
def CommentCheck():
# type: () -> None
pass
class Event:
__slots__ = 'start_mark', 'end_mark', 'comment'
def __init__(self, start_mark=None, end_mark=None, comment=CommentCheck):
# type: (Any, Any, Any) -> None
self.start_mark = start_mark
self.end_mark = end_mark
# assert comment is not CommentCheck
if comment is CommentCheck:
comment = None
self.comment = comment
def __repr__(self):
# type: () -> Any
if True:
arguments = []
if hasattr(self, 'value'):
# if you use repr(getattr(self, 'value')) then flake8 complains about
# abuse of getattr with a constant. When you change to self.value
# then mypy throws an error
arguments.append(repr(self.value)) # type: ignore
for key in ['anchor', 'tag', 'implicit', 'flow_style', 'style']:
v = getattr(self, key, None)
if v is not None:
arguments.append(_F('{key!s}={v!r}', key=key, v=v))
if self.comment not in [None, CommentCheck]:
arguments.append('comment={!r}'.format(self.comment))
if SHOW_LINES:
arguments.append(
'({}:{}/{}:{})'.format(
self.start_mark.line,
self.start_mark.column,
self.end_mark.line,
self.end_mark.column,
)
)
arguments = ', '.join(arguments) # type: ignore
else:
attributes = [
key
for key in ['anchor', 'tag', 'implicit', 'value', 'flow_style', 'style']
if hasattr(self, key)
]
arguments = ', '.join(
[_F('{k!s}={attr!r}', k=key, attr=getattr(self, key)) for key in attributes]
)
if self.comment not in [None, CommentCheck]:
arguments += ', comment={!r}'.format(self.comment)
return _F(
'{self_class_name!s}({arguments!s})',
self_class_name=self.__class__.__name__,
arguments=arguments,
)
class NodeEvent(Event):
__slots__ = ('anchor',)
def __init__(self, anchor, start_mark=None, end_mark=None, comment=None):
# type: (Any, Any, Any, Any) -> None
Event.__init__(self, start_mark, end_mark, comment)
self.anchor = anchor
class CollectionStartEvent(NodeEvent):
__slots__ = 'tag', 'implicit', 'flow_style', 'nr_items'
def __init__(
self,
anchor,
tag,
implicit,
start_mark=None,
end_mark=None,
flow_style=None,
comment=None,
nr_items=None,
):
# type: (Any, Any, Any, Any, Any, Any, Any, Optional[int]) -> None
NodeEvent.__init__(self, anchor, start_mark, end_mark, comment)
self.tag = tag
self.implicit = implicit
self.flow_style = flow_style
self.nr_items = nr_items
class CollectionEndEvent(Event):
__slots__ = ()
# Implementations.
class StreamStartEvent(Event):
__slots__ = ('encoding',)
def __init__(self, start_mark=None, end_mark=None, encoding=None, comment=None):
# type: (Any, Any, Any, Any) -> None
Event.__init__(self, start_mark, end_mark, comment)
self.encoding = encoding
class StreamEndEvent(Event):
__slots__ = ()
class DocumentStartEvent(Event):
__slots__ = 'explicit', 'version', 'tags'
def __init__(
self,
start_mark=None,
end_mark=None,
explicit=None,
version=None,
tags=None,
comment=None,
):
# type: (Any, Any, Any, Any, Any, Any) -> None
Event.__init__(self, start_mark, end_mark, comment)
self.explicit = explicit
self.version = version
self.tags = tags
class DocumentEndEvent(Event):
__slots__ = ('explicit',)
def __init__(self, start_mark=None, end_mark=None, explicit=None, comment=None):
# type: (Any, Any, Any, Any) -> None
Event.__init__(self, start_mark, end_mark, comment)
self.explicit = explicit
class AliasEvent(NodeEvent):
__slots__ = 'style'
def __init__(self, anchor, start_mark=None, end_mark=None, style=None, comment=None):
# type: (Any, Any, Any, Any, Any) -> None
NodeEvent.__init__(self, anchor, start_mark, end_mark, comment)
self.style = style
class ScalarEvent(NodeEvent):
__slots__ = 'tag', 'implicit', 'value', 'style'
def __init__(
self,
anchor,
tag,
implicit,
value,
start_mark=None,
end_mark=None,
style=None,
comment=None,
):
# type: (Any, Any, Any, Any, Any, Any, Any, Any) -> None
NodeEvent.__init__(self, anchor, start_mark, end_mark, comment)
self.tag = tag
self.implicit = implicit
self.value = value
self.style = style
class SequenceStartEvent(CollectionStartEvent):
__slots__ = ()
class SequenceEndEvent(CollectionEndEvent):
__slots__ = ()
class MappingStartEvent(CollectionStartEvent):
__slots__ = ()
class MappingEndEvent(CollectionEndEvent):
__slots__ = ()

View File

@@ -0,0 +1,75 @@
# coding: utf-8
from ruamel.yaml.reader import Reader
from ruamel.yaml.scanner import Scanner, RoundTripScanner
from ruamel.yaml.parser import Parser, RoundTripParser
from ruamel.yaml.composer import Composer
from ruamel.yaml.constructor import (
BaseConstructor,
SafeConstructor,
Constructor,
RoundTripConstructor,
)
from ruamel.yaml.resolver import VersionedResolver
if False: # MYPY
from typing import Any, Dict, List, Union, Optional # NOQA
from ruamel.yaml.compat import StreamTextType, VersionType # NOQA
__all__ = ['BaseLoader', 'SafeLoader', 'Loader', 'RoundTripLoader']
class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, VersionedResolver):
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
self.comment_handling = None
Reader.__init__(self, stream, loader=self)
Scanner.__init__(self, loader=self)
Parser.__init__(self, loader=self)
Composer.__init__(self, loader=self)
BaseConstructor.__init__(self, loader=self)
VersionedResolver.__init__(self, version, loader=self)
class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, VersionedResolver):
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
self.comment_handling = None
Reader.__init__(self, stream, loader=self)
Scanner.__init__(self, loader=self)
Parser.__init__(self, loader=self)
Composer.__init__(self, loader=self)
SafeConstructor.__init__(self, loader=self)
VersionedResolver.__init__(self, version, loader=self)
class Loader(Reader, Scanner, Parser, Composer, Constructor, VersionedResolver):
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
self.comment_handling = None
Reader.__init__(self, stream, loader=self)
Scanner.__init__(self, loader=self)
Parser.__init__(self, loader=self)
Composer.__init__(self, loader=self)
Constructor.__init__(self, loader=self)
VersionedResolver.__init__(self, version, loader=self)
class RoundTripLoader(
Reader,
RoundTripScanner,
RoundTripParser,
Composer,
RoundTripConstructor,
VersionedResolver,
):
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
# self.reader = Reader.__init__(self, stream)
self.comment_handling = None # issue 385
Reader.__init__(self, stream, loader=self)
RoundTripScanner.__init__(self, loader=self)
RoundTripParser.__init__(self, loader=self)
Composer.__init__(self, loader=self)
RoundTripConstructor.__init__(self, preserve_quotes=preserve_quotes, loader=self)
VersionedResolver.__init__(self, version, loader=self)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,135 @@
# coding: utf-8
import sys
from ruamel.yaml.compat import _F
if False: # MYPY
from typing import Dict, Any, Text # NOQA
class Node:
__slots__ = 'tag', 'value', 'start_mark', 'end_mark', 'comment', 'anchor'
def __init__(self, tag, value, start_mark, end_mark, comment=None, anchor=None):
# type: (Any, Any, Any, Any, Any, Any) -> None
self.tag = tag
self.value = value
self.start_mark = start_mark
self.end_mark = end_mark
self.comment = comment
self.anchor = anchor
def __repr__(self):
# type: () -> Any
value = self.value
# if isinstance(value, list):
# if len(value) == 0:
# value = '<empty>'
# elif len(value) == 1:
# value = '<1 item>'
# else:
# value = f'<{len(value)} items>'
# else:
# if len(value) > 75:
# value = repr(value[:70]+' ... ')
# else:
# value = repr(value)
value = repr(value)
return _F(
'{class_name!s}(tag={self_tag!r}, value={value!s})',
class_name=self.__class__.__name__,
self_tag=self.tag,
value=value,
)
def dump(self, indent=0):
# type: (int) -> None
if isinstance(self.value, str):
sys.stdout.write(
'{}{}(tag={!r}, value={!r})\n'.format(
' ' * indent, self.__class__.__name__, self.tag, self.value
)
)
if self.comment:
sys.stdout.write(' {}comment: {})\n'.format(' ' * indent, self.comment))
return
sys.stdout.write(
'{}{}(tag={!r})\n'.format(' ' * indent, self.__class__.__name__, self.tag)
)
if self.comment:
sys.stdout.write(' {}comment: {})\n'.format(' ' * indent, self.comment))
for v in self.value:
if isinstance(v, tuple):
for v1 in v:
v1.dump(indent + 1)
elif isinstance(v, Node):
v.dump(indent + 1)
else:
sys.stdout.write('Node value type? {}\n'.format(type(v)))
class ScalarNode(Node):
"""
styles:
? -> set() ? key, no value
" -> double quoted
' -> single quoted
| -> literal style
> -> folding style
"""
__slots__ = ('style',)
id = 'scalar'
def __init__(
self, tag, value, start_mark=None, end_mark=None, style=None, comment=None, anchor=None
):
# type: (Any, Any, Any, Any, Any, Any, Any) -> None
Node.__init__(self, tag, value, start_mark, end_mark, comment=comment, anchor=anchor)
self.style = style
class CollectionNode(Node):
__slots__ = ('flow_style',)
def __init__(
self,
tag,
value,
start_mark=None,
end_mark=None,
flow_style=None,
comment=None,
anchor=None,
):
# type: (Any, Any, Any, Any, Any, Any, Any) -> None
Node.__init__(self, tag, value, start_mark, end_mark, comment=comment)
self.flow_style = flow_style
self.anchor = anchor
class SequenceNode(CollectionNode):
__slots__ = ()
id = 'sequence'
class MappingNode(CollectionNode):
__slots__ = ('merge',)
id = 'mapping'
def __init__(
self,
tag,
value,
start_mark=None,
end_mark=None,
flow_style=None,
comment=None,
anchor=None,
):
# type: (Any, Any, Any, Any, Any, Any, Any) -> None
CollectionNode.__init__(
self, tag, value, start_mark, end_mark, flow_style, comment, anchor
)
self.merge = None

View File

@@ -0,0 +1,884 @@
# coding: utf-8
# The following YAML grammar is LL(1) and is parsed by a recursive descent
# parser.
#
# stream ::= STREAM-START implicit_document? explicit_document*
# STREAM-END
# implicit_document ::= block_node DOCUMENT-END*
# explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
# block_node_or_indentless_sequence ::=
# ALIAS
# | properties (block_content |
# indentless_block_sequence)?
# | block_content
# | indentless_block_sequence
# block_node ::= ALIAS
# | properties block_content?
# | block_content
# flow_node ::= ALIAS
# | properties flow_content?
# | flow_content
# properties ::= TAG ANCHOR? | ANCHOR TAG?
# block_content ::= block_collection | flow_collection | SCALAR
# flow_content ::= flow_collection | SCALAR
# block_collection ::= block_sequence | block_mapping
# flow_collection ::= flow_sequence | flow_mapping
# block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)*
# BLOCK-END
# indentless_sequence ::= (BLOCK-ENTRY block_node?)+
# block_mapping ::= BLOCK-MAPPING_START
# ((KEY block_node_or_indentless_sequence?)?
# (VALUE block_node_or_indentless_sequence?)?)*
# BLOCK-END
# flow_sequence ::= FLOW-SEQUENCE-START
# (flow_sequence_entry FLOW-ENTRY)*
# flow_sequence_entry?
# FLOW-SEQUENCE-END
# flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
# flow_mapping ::= FLOW-MAPPING-START
# (flow_mapping_entry FLOW-ENTRY)*
# flow_mapping_entry?
# FLOW-MAPPING-END
# flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
#
# FIRST sets:
#
# stream: { STREAM-START <}
# explicit_document: { DIRECTIVE DOCUMENT-START }
# implicit_document: FIRST(block_node)
# block_node: { ALIAS TAG ANCHOR SCALAR BLOCK-SEQUENCE-START
# BLOCK-MAPPING-START FLOW-SEQUENCE-START FLOW-MAPPING-START }
# flow_node: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START FLOW-MAPPING-START }
# block_content: { BLOCK-SEQUENCE-START BLOCK-MAPPING-START
# FLOW-SEQUENCE-START FLOW-MAPPING-START SCALAR }
# flow_content: { FLOW-SEQUENCE-START FLOW-MAPPING-START SCALAR }
# block_collection: { BLOCK-SEQUENCE-START BLOCK-MAPPING-START }
# flow_collection: { FLOW-SEQUENCE-START FLOW-MAPPING-START }
# block_sequence: { BLOCK-SEQUENCE-START }
# block_mapping: { BLOCK-MAPPING-START }
# block_node_or_indentless_sequence: { ALIAS ANCHOR TAG SCALAR
# BLOCK-SEQUENCE-START BLOCK-MAPPING-START FLOW-SEQUENCE-START
# FLOW-MAPPING-START BLOCK-ENTRY }
# indentless_sequence: { ENTRY }
# flow_collection: { FLOW-SEQUENCE-START FLOW-MAPPING-START }
# flow_sequence: { FLOW-SEQUENCE-START }
# flow_mapping: { FLOW-MAPPING-START }
# flow_sequence_entry: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START
# FLOW-MAPPING-START KEY }
# flow_mapping_entry: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START
# FLOW-MAPPING-START KEY }
# need to have full path with import, as pkg_resources tries to load parser.py in __init__.py
# only to not do anything with the package afterwards
# and for Jython too
from ruamel.yaml.error import MarkedYAMLError
from ruamel.yaml.tokens import * # NOQA
from ruamel.yaml.events import * # NOQA
from ruamel.yaml.scanner import Scanner, RoundTripScanner, ScannerError # NOQA
from ruamel.yaml.scanner import BlankLineComment
from ruamel.yaml.comments import C_PRE, C_POST, C_SPLIT_ON_FIRST_BLANK
from ruamel.yaml.compat import _F, nprint, nprintf # NOQA
if False: # MYPY
from typing import Any, Dict, Optional, List, Optional # NOQA
__all__ = ['Parser', 'RoundTripParser', 'ParserError']
def xprintf(*args, **kw):
# type: (Any, Any) -> Any
return nprintf(*args, **kw)
pass
class ParserError(MarkedYAMLError):
pass
class Parser:
# Since writing a recursive-descendant parser is a straightforward task, we
# do not give many comments here.
DEFAULT_TAGS = {'!': '!', '!!': 'tag:yaml.org,2002:'}
def __init__(self, loader):
# type: (Any) -> None
self.loader = loader
if self.loader is not None and getattr(self.loader, '_parser', None) is None:
self.loader._parser = self
self.reset_parser()
def reset_parser(self):
# type: () -> None
# Reset the state attributes (to clear self-references)
self.current_event = self.last_event = None
self.tag_handles = {} # type: Dict[Any, Any]
self.states = [] # type: List[Any]
self.marks = [] # type: List[Any]
self.state = self.parse_stream_start # type: Any
def dispose(self):
# type: () -> None
self.reset_parser()
@property
def scanner(self):
# type: () -> Any
if hasattr(self.loader, 'typ'):
return self.loader.scanner
return self.loader._scanner
@property
def resolver(self):
# type: () -> Any
if hasattr(self.loader, 'typ'):
return self.loader.resolver
return self.loader._resolver
def check_event(self, *choices):
# type: (Any) -> bool
# Check the type of the next event.
if self.current_event is None:
if self.state:
self.current_event = self.state()
if self.current_event is not None:
if not choices:
return True
for choice in choices:
if isinstance(self.current_event, choice):
return True
return False
def peek_event(self):
# type: () -> Any
# Get the next event.
if self.current_event is None:
if self.state:
self.current_event = self.state()
return self.current_event
def get_event(self):
# type: () -> Any
# Get the next event and proceed further.
if self.current_event is None:
if self.state:
self.current_event = self.state()
# assert self.current_event is not None
# if self.current_event.end_mark.line != self.peek_event().start_mark.line:
xprintf('get_event', repr(self.current_event), self.peek_event().start_mark.line)
self.last_event = value = self.current_event
self.current_event = None
return value
# stream ::= STREAM-START implicit_document? explicit_document*
# STREAM-END
# implicit_document ::= block_node DOCUMENT-END*
# explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
def parse_stream_start(self):
# type: () -> Any
# Parse the stream start.
token = self.scanner.get_token()
self.move_token_comment(token)
event = StreamStartEvent(token.start_mark, token.end_mark, encoding=token.encoding)
# Prepare the next state.
self.state = self.parse_implicit_document_start
return event
def parse_implicit_document_start(self):
# type: () -> Any
# Parse an implicit document.
if not self.scanner.check_token(DirectiveToken, DocumentStartToken, StreamEndToken):
self.tag_handles = self.DEFAULT_TAGS
token = self.scanner.peek_token()
start_mark = end_mark = token.start_mark
event = DocumentStartEvent(start_mark, end_mark, explicit=False)
# Prepare the next state.
self.states.append(self.parse_document_end)
self.state = self.parse_block_node
return event
else:
return self.parse_document_start()
def parse_document_start(self):
# type: () -> Any
# Parse any extra document end indicators.
while self.scanner.check_token(DocumentEndToken):
self.scanner.get_token()
# Parse an explicit document.
if not self.scanner.check_token(StreamEndToken):
version, tags = self.process_directives()
if not self.scanner.check_token(DocumentStartToken):
raise ParserError(
None,
None,
_F(
"expected '<document start>', but found {pt!r}",
pt=self.scanner.peek_token().id,
),
self.scanner.peek_token().start_mark,
)
token = self.scanner.get_token()
start_mark = token.start_mark
end_mark = token.end_mark
# if self.loader is not None and \
# end_mark.line != self.scanner.peek_token().start_mark.line:
# self.loader.scalar_after_indicator = False
event = DocumentStartEvent(
start_mark, end_mark, explicit=True, version=version, tags=tags,
comment=token.comment
) # type: Any
self.states.append(self.parse_document_end)
self.state = self.parse_document_content
else:
# Parse the end of the stream.
token = self.scanner.get_token()
event = StreamEndEvent(token.start_mark, token.end_mark, comment=token.comment)
assert not self.states
assert not self.marks
self.state = None
return event
def parse_document_end(self):
# type: () -> Any
# Parse the document end.
token = self.scanner.peek_token()
start_mark = end_mark = token.start_mark
explicit = False
if self.scanner.check_token(DocumentEndToken):
token = self.scanner.get_token()
end_mark = token.end_mark
explicit = True
event = DocumentEndEvent(start_mark, end_mark, explicit=explicit)
# Prepare the next state.
if self.resolver.processing_version == (1, 1):
self.state = self.parse_document_start
else:
self.state = self.parse_implicit_document_start
return event
def parse_document_content(self):
# type: () -> Any
if self.scanner.check_token(
DirectiveToken, DocumentStartToken, DocumentEndToken, StreamEndToken
):
event = self.process_empty_scalar(self.scanner.peek_token().start_mark)
self.state = self.states.pop()
return event
else:
return self.parse_block_node()
def process_directives(self):
# type: () -> Any
yaml_version = None
self.tag_handles = {}
while self.scanner.check_token(DirectiveToken):
token = self.scanner.get_token()
if token.name == 'YAML':
if yaml_version is not None:
raise ParserError(
None, None, 'found duplicate YAML directive', token.start_mark
)
major, minor = token.value
if major != 1:
raise ParserError(
None,
None,
'found incompatible YAML document (version 1.* is required)',
token.start_mark,
)
yaml_version = token.value
elif token.name == 'TAG':
handle, prefix = token.value
if handle in self.tag_handles:
raise ParserError(
None,
None,
_F('duplicate tag handle {handle!r}', handle=handle),
token.start_mark,
)
self.tag_handles[handle] = prefix
if bool(self.tag_handles):
value = yaml_version, self.tag_handles.copy() # type: Any
else:
value = yaml_version, None
if self.loader is not None and hasattr(self.loader, 'tags'):
self.loader.version = yaml_version
if self.loader.tags is None:
self.loader.tags = {}
for k in self.tag_handles:
self.loader.tags[k] = self.tag_handles[k]
for key in self.DEFAULT_TAGS:
if key not in self.tag_handles:
self.tag_handles[key] = self.DEFAULT_TAGS[key]
return value
# block_node_or_indentless_sequence ::= ALIAS
# | properties (block_content | indentless_block_sequence)?
# | block_content
# | indentless_block_sequence
# block_node ::= ALIAS
# | properties block_content?
# | block_content
# flow_node ::= ALIAS
# | properties flow_content?
# | flow_content
# properties ::= TAG ANCHOR? | ANCHOR TAG?
# block_content ::= block_collection | flow_collection | SCALAR
# flow_content ::= flow_collection | SCALAR
# block_collection ::= block_sequence | block_mapping
# flow_collection ::= flow_sequence | flow_mapping
def parse_block_node(self):
# type: () -> Any
return self.parse_node(block=True)
def parse_flow_node(self):
# type: () -> Any
return self.parse_node()
def parse_block_node_or_indentless_sequence(self):
# type: () -> Any
return self.parse_node(block=True, indentless_sequence=True)
def transform_tag(self, handle, suffix):
# type: (Any, Any) -> Any
return self.tag_handles[handle] + suffix
def parse_node(self, block=False, indentless_sequence=False):
# type: (bool, bool) -> Any
if self.scanner.check_token(AliasToken):
token = self.scanner.get_token()
event = AliasEvent(token.value, token.start_mark, token.end_mark) # type: Any
self.state = self.states.pop()
return event
anchor = None
tag = None
start_mark = end_mark = tag_mark = None
if self.scanner.check_token(AnchorToken):
token = self.scanner.get_token()
self.move_token_comment(token)
start_mark = token.start_mark
end_mark = token.end_mark
anchor = token.value
if self.scanner.check_token(TagToken):
token = self.scanner.get_token()
tag_mark = token.start_mark
end_mark = token.end_mark
tag = token.value
elif self.scanner.check_token(TagToken):
token = self.scanner.get_token()
start_mark = tag_mark = token.start_mark
end_mark = token.end_mark
tag = token.value
if self.scanner.check_token(AnchorToken):
token = self.scanner.get_token()
start_mark = tag_mark = token.start_mark
end_mark = token.end_mark
anchor = token.value
if tag is not None:
handle, suffix = tag
if handle is not None:
if handle not in self.tag_handles:
raise ParserError(
'while parsing a node',
start_mark,
_F('found undefined tag handle {handle!r}', handle=handle),
tag_mark,
)
tag = self.transform_tag(handle, suffix)
else:
tag = suffix
# if tag == '!':
# raise ParserError("while parsing a node", start_mark,
# "found non-specific tag '!'", tag_mark,
# "Please check 'http://pyyaml.org/wiki/YAMLNonSpecificTag'
# and share your opinion.")
if start_mark is None:
start_mark = end_mark = self.scanner.peek_token().start_mark
event = None
implicit = tag is None or tag == '!'
if indentless_sequence and self.scanner.check_token(BlockEntryToken):
comment = None
pt = self.scanner.peek_token()
if self.loader and self.loader.comment_handling is None:
if pt.comment and pt.comment[0]:
comment = [pt.comment[0], []]
pt.comment[0] = None
elif self.loader:
if pt.comment:
comment = pt.comment
end_mark = self.scanner.peek_token().end_mark
event = SequenceStartEvent(
anchor, tag, implicit, start_mark, end_mark, flow_style=False, comment=comment
)
self.state = self.parse_indentless_sequence_entry
return event
if self.scanner.check_token(ScalarToken):
token = self.scanner.get_token()
# self.scanner.peek_token_same_line_comment(token)
end_mark = token.end_mark
if (token.plain and tag is None) or tag == '!':
implicit = (True, False)
elif tag is None:
implicit = (False, True)
else:
implicit = (False, False)
# nprint('se', token.value, token.comment)
event = ScalarEvent(
anchor,
tag,
implicit,
token.value,
start_mark,
end_mark,
style=token.style,
comment=token.comment,
)
self.state = self.states.pop()
elif self.scanner.check_token(FlowSequenceStartToken):
pt = self.scanner.peek_token()
end_mark = pt.end_mark
event = SequenceStartEvent(
anchor,
tag,
implicit,
start_mark,
end_mark,
flow_style=True,
comment=pt.comment,
)
self.state = self.parse_flow_sequence_first_entry
elif self.scanner.check_token(FlowMappingStartToken):
pt = self.scanner.peek_token()
end_mark = pt.end_mark
event = MappingStartEvent(
anchor,
tag,
implicit,
start_mark,
end_mark,
flow_style=True,
comment=pt.comment,
)
self.state = self.parse_flow_mapping_first_key
elif block and self.scanner.check_token(BlockSequenceStartToken):
end_mark = self.scanner.peek_token().start_mark
# should inserting the comment be dependent on the
# indentation?
pt = self.scanner.peek_token()
comment = pt.comment
# nprint('pt0', type(pt))
if comment is None or comment[1] is None:
comment = pt.split_old_comment()
# nprint('pt1', comment)
event = SequenceStartEvent(
anchor, tag, implicit, start_mark, end_mark, flow_style=False, comment=comment
)
self.state = self.parse_block_sequence_first_entry
elif block and self.scanner.check_token(BlockMappingStartToken):
end_mark = self.scanner.peek_token().start_mark
comment = self.scanner.peek_token().comment
event = MappingStartEvent(
anchor, tag, implicit, start_mark, end_mark, flow_style=False, comment=comment
)
self.state = self.parse_block_mapping_first_key
elif anchor is not None or tag is not None:
# Empty scalars are allowed even if a tag or an anchor is
# specified.
event = ScalarEvent(anchor, tag, (implicit, False), "", start_mark, end_mark)
self.state = self.states.pop()
else:
if block:
node = 'block'
else:
node = 'flow'
token = self.scanner.peek_token()
raise ParserError(
_F('while parsing a {node!s} node', node=node),
start_mark,
_F('expected the node content, but found {token_id!r}', token_id=token.id),
token.start_mark,
)
return event
# block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)*
# BLOCK-END
def parse_block_sequence_first_entry(self):
# type: () -> Any
token = self.scanner.get_token()
# move any comment from start token
# self.move_token_comment(token)
self.marks.append(token.start_mark)
return self.parse_block_sequence_entry()
def parse_block_sequence_entry(self):
# type: () -> Any
if self.scanner.check_token(BlockEntryToken):
token = self.scanner.get_token()
self.move_token_comment(token)
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
self.states.append(self.parse_block_sequence_entry)
return self.parse_block_node()
else:
self.state = self.parse_block_sequence_entry
return self.process_empty_scalar(token.end_mark)
if not self.scanner.check_token(BlockEndToken):
token = self.scanner.peek_token()
raise ParserError(
'while parsing a block collection',
self.marks[-1],
_F('expected <block end>, but found {token_id!r}', token_id=token.id),
token.start_mark,
)
token = self.scanner.get_token() # BlockEndToken
event = SequenceEndEvent(token.start_mark, token.end_mark, comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
# indentless_sequence ::= (BLOCK-ENTRY block_node?)+
# indentless_sequence?
# sequence:
# - entry
# - nested
def parse_indentless_sequence_entry(self):
# type: () -> Any
if self.scanner.check_token(BlockEntryToken):
token = self.scanner.get_token()
self.move_token_comment(token)
if not self.scanner.check_token(
BlockEntryToken, KeyToken, ValueToken, BlockEndToken
):
self.states.append(self.parse_indentless_sequence_entry)
return self.parse_block_node()
else:
self.state = self.parse_indentless_sequence_entry
return self.process_empty_scalar(token.end_mark)
token = self.scanner.peek_token()
c = None
if self.loader and self.loader.comment_handling is None:
c = token.comment
start_mark = token.start_mark
else:
start_mark = self.last_event.end_mark # type: ignore
c = self.distribute_comment(token.comment, start_mark.line) # type: ignore
event = SequenceEndEvent(start_mark, start_mark, comment=c)
self.state = self.states.pop()
return event
# block_mapping ::= BLOCK-MAPPING_START
# ((KEY block_node_or_indentless_sequence?)?
# (VALUE block_node_or_indentless_sequence?)?)*
# BLOCK-END
def parse_block_mapping_first_key(self):
# type: () -> Any
token = self.scanner.get_token()
self.marks.append(token.start_mark)
return self.parse_block_mapping_key()
def parse_block_mapping_key(self):
# type: () -> Any
if self.scanner.check_token(KeyToken):
token = self.scanner.get_token()
self.move_token_comment(token)
if not self.scanner.check_token(KeyToken, ValueToken, BlockEndToken):
self.states.append(self.parse_block_mapping_value)
return self.parse_block_node_or_indentless_sequence()
else:
self.state = self.parse_block_mapping_value
return self.process_empty_scalar(token.end_mark)
if self.resolver.processing_version > (1, 1) and self.scanner.check_token(ValueToken):
self.state = self.parse_block_mapping_value
return self.process_empty_scalar(self.scanner.peek_token().start_mark)
if not self.scanner.check_token(BlockEndToken):
token = self.scanner.peek_token()
raise ParserError(
'while parsing a block mapping',
self.marks[-1],
_F('expected <block end>, but found {token_id!r}', token_id=token.id),
token.start_mark,
)
token = self.scanner.get_token()
self.move_token_comment(token)
event = MappingEndEvent(token.start_mark, token.end_mark, comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
def parse_block_mapping_value(self):
# type: () -> Any
if self.scanner.check_token(ValueToken):
token = self.scanner.get_token()
# value token might have post comment move it to e.g. block
if self.scanner.check_token(ValueToken):
self.move_token_comment(token)
else:
if not self.scanner.check_token(KeyToken):
self.move_token_comment(token, empty=True)
# else: empty value for this key cannot move token.comment
if not self.scanner.check_token(KeyToken, ValueToken, BlockEndToken):
self.states.append(self.parse_block_mapping_key)
return self.parse_block_node_or_indentless_sequence()
else:
self.state = self.parse_block_mapping_key
comment = token.comment
if comment is None:
token = self.scanner.peek_token()
comment = token.comment
if comment:
token._comment = [None, comment[1]]
comment = [comment[0], None]
return self.process_empty_scalar(token.end_mark, comment=comment)
else:
self.state = self.parse_block_mapping_key
token = self.scanner.peek_token()
return self.process_empty_scalar(token.start_mark)
# flow_sequence ::= FLOW-SEQUENCE-START
# (flow_sequence_entry FLOW-ENTRY)*
# flow_sequence_entry?
# FLOW-SEQUENCE-END
# flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
#
# Note that while production rules for both flow_sequence_entry and
# flow_mapping_entry are equal, their interpretations are different.
# For `flow_sequence_entry`, the part `KEY flow_node? (VALUE flow_node?)?`
# generate an inline mapping (set syntax).
def parse_flow_sequence_first_entry(self):
# type: () -> Any
token = self.scanner.get_token()
self.marks.append(token.start_mark)
return self.parse_flow_sequence_entry(first=True)
def parse_flow_sequence_entry(self, first=False):
# type: (bool) -> Any
if not self.scanner.check_token(FlowSequenceEndToken):
if not first:
if self.scanner.check_token(FlowEntryToken):
self.scanner.get_token()
else:
token = self.scanner.peek_token()
raise ParserError(
'while parsing a flow sequence',
self.marks[-1],
_F("expected ',' or ']', but got {token_id!r}", token_id=token.id),
token.start_mark,
)
if self.scanner.check_token(KeyToken):
token = self.scanner.peek_token()
event = MappingStartEvent(
None, None, True, token.start_mark, token.end_mark, flow_style=True
) # type: Any
self.state = self.parse_flow_sequence_entry_mapping_key
return event
elif not self.scanner.check_token(FlowSequenceEndToken):
self.states.append(self.parse_flow_sequence_entry)
return self.parse_flow_node()
token = self.scanner.get_token()
event = SequenceEndEvent(token.start_mark, token.end_mark, comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
def parse_flow_sequence_entry_mapping_key(self):
# type: () -> Any
token = self.scanner.get_token()
if not self.scanner.check_token(ValueToken, FlowEntryToken, FlowSequenceEndToken):
self.states.append(self.parse_flow_sequence_entry_mapping_value)
return self.parse_flow_node()
else:
self.state = self.parse_flow_sequence_entry_mapping_value
return self.process_empty_scalar(token.end_mark)
def parse_flow_sequence_entry_mapping_value(self):
# type: () -> Any
if self.scanner.check_token(ValueToken):
token = self.scanner.get_token()
if not self.scanner.check_token(FlowEntryToken, FlowSequenceEndToken):
self.states.append(self.parse_flow_sequence_entry_mapping_end)
return self.parse_flow_node()
else:
self.state = self.parse_flow_sequence_entry_mapping_end
return self.process_empty_scalar(token.end_mark)
else:
self.state = self.parse_flow_sequence_entry_mapping_end
token = self.scanner.peek_token()
return self.process_empty_scalar(token.start_mark)
def parse_flow_sequence_entry_mapping_end(self):
# type: () -> Any
self.state = self.parse_flow_sequence_entry
token = self.scanner.peek_token()
return MappingEndEvent(token.start_mark, token.start_mark)
# flow_mapping ::= FLOW-MAPPING-START
# (flow_mapping_entry FLOW-ENTRY)*
# flow_mapping_entry?
# FLOW-MAPPING-END
# flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
def parse_flow_mapping_first_key(self):
# type: () -> Any
token = self.scanner.get_token()
self.marks.append(token.start_mark)
return self.parse_flow_mapping_key(first=True)
def parse_flow_mapping_key(self, first=False):
# type: (Any) -> Any
if not self.scanner.check_token(FlowMappingEndToken):
if not first:
if self.scanner.check_token(FlowEntryToken):
self.scanner.get_token()
else:
token = self.scanner.peek_token()
raise ParserError(
'while parsing a flow mapping',
self.marks[-1],
_F("expected ',' or '}}', but got {token_id!r}", token_id=token.id),
token.start_mark,
)
if self.scanner.check_token(KeyToken):
token = self.scanner.get_token()
if not self.scanner.check_token(
ValueToken, FlowEntryToken, FlowMappingEndToken
):
self.states.append(self.parse_flow_mapping_value)
return self.parse_flow_node()
else:
self.state = self.parse_flow_mapping_value
return self.process_empty_scalar(token.end_mark)
elif self.resolver.processing_version > (1, 1) and self.scanner.check_token(
ValueToken
):
self.state = self.parse_flow_mapping_value
return self.process_empty_scalar(self.scanner.peek_token().end_mark)
elif not self.scanner.check_token(FlowMappingEndToken):
self.states.append(self.parse_flow_mapping_empty_value)
return self.parse_flow_node()
token = self.scanner.get_token()
event = MappingEndEvent(token.start_mark, token.end_mark, comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
def parse_flow_mapping_value(self):
# type: () -> Any
if self.scanner.check_token(ValueToken):
token = self.scanner.get_token()
if not self.scanner.check_token(FlowEntryToken, FlowMappingEndToken):
self.states.append(self.parse_flow_mapping_key)
return self.parse_flow_node()
else:
self.state = self.parse_flow_mapping_key
return self.process_empty_scalar(token.end_mark)
else:
self.state = self.parse_flow_mapping_key
token = self.scanner.peek_token()
return self.process_empty_scalar(token.start_mark)
def parse_flow_mapping_empty_value(self):
# type: () -> Any
self.state = self.parse_flow_mapping_key
return self.process_empty_scalar(self.scanner.peek_token().start_mark)
def process_empty_scalar(self, mark, comment=None):
# type: (Any, Any) -> Any
return ScalarEvent(None, None, (True, False), "", mark, mark, comment=comment)
def move_token_comment(self, token, nt=None, empty=False):
# type: (Any, Optional[Any], Optional[bool]) -> Any
pass
class RoundTripParser(Parser):
"""roundtrip is a safe loader, that wants to see the unmangled tag"""
def transform_tag(self, handle, suffix):
# type: (Any, Any) -> Any
# return self.tag_handles[handle]+suffix
if handle == '!!' and suffix in (
'null',
'bool',
'int',
'float',
'binary',
'timestamp',
'omap',
'pairs',
'set',
'str',
'seq',
'map',
):
return Parser.transform_tag(self, handle, suffix)
return handle + suffix
def move_token_comment(self, token, nt=None, empty=False):
# type: (Any, Optional[Any], Optional[bool]) -> Any
token.move_old_comment(self.scanner.peek_token() if nt is None else nt, empty=empty)
class RoundTripParserSC(RoundTripParser):
"""roundtrip is a safe loader, that wants to see the unmangled tag"""
# some of the differences are based on the superclass testing
# if self.loader.comment_handling is not None
def move_token_comment(self, token, nt=None, empty=False):
# type: (Any, Any, Any, Optional[bool]) -> None
token.move_new_comment(self.scanner.peek_token() if nt is None else nt, empty=empty)
def distribute_comment(self, comment, line):
# type: (Any, Any) -> Any
# ToDo, look at indentation of the comment to determine attachment
if comment is None:
return None
if not comment[0]:
return None
if comment[0][0] != line + 1:
nprintf('>>>dcxxx', comment, line)
assert comment[0][0] == line + 1
# if comment[0] - line > 1:
# return
typ = self.loader.comment_handling & 0b11
# nprintf('>>>dca', comment, line, typ)
if typ == C_POST:
return None
if typ == C_PRE:
c = [None, None, comment[0]]
comment[0] = None
return c
# nprintf('>>>dcb', comment[0])
for _idx, cmntidx in enumerate(comment[0]):
# nprintf('>>>dcb', cmntidx)
if isinstance(self.scanner.comments[cmntidx], BlankLineComment):
break
else:
return None # no space found
if _idx == 0:
return None # first line was blank
# nprintf('>>>dcc', idx)
if typ == C_SPLIT_ON_FIRST_BLANK:
c = [None, None, comment[0][:_idx]]
comment[0] = comment[0][_idx:]
return c
raise NotImplementedError # reserved

View File

@@ -0,0 +1,302 @@
# coding: utf-8
# This module contains abstractions for the input stream. You don't have to
# looks further, there are no pretty code.
#
# We define two classes here.
#
# Mark(source, line, column)
# It's just a record and its only use is producing nice error messages.
# Parser does not use it for any other purposes.
#
# Reader(source, data)
# Reader determines the encoding of `data` and converts it to unicode.
# Reader provides the following methods and attributes:
# reader.peek(length=1) - return the next `length` characters
# reader.forward(length=1) - move the current position to `length`
# characters.
# reader.index - the number of the current character.
# reader.line, stream.column - the line and the column of the current
# character.
import codecs
from ruamel.yaml.error import YAMLError, FileMark, StringMark, YAMLStreamError
from ruamel.yaml.compat import _F # NOQA
from ruamel.yaml.util import RegExp
if False: # MYPY
from typing import Any, Dict, Optional, List, Union, Text, Tuple, Optional # NOQA
# from ruamel.yaml.compat import StreamTextType # NOQA
__all__ = ['Reader', 'ReaderError']
class ReaderError(YAMLError):
def __init__(self, name, position, character, encoding, reason):
# type: (Any, Any, Any, Any, Any) -> None
self.name = name
self.character = character
self.position = position
self.encoding = encoding
self.reason = reason
def __str__(self):
# type: () -> Any
if isinstance(self.character, bytes):
return _F(
"'{self_encoding!s}' codec can't decode byte #x{ord_self_character:02x}: "
'{self_reason!s}\n'
' in "{self_name!s}", position {self_position:d}',
self_encoding=self.encoding,
ord_self_character=ord(self.character),
self_reason=self.reason,
self_name=self.name,
self_position=self.position,
)
else:
return _F(
'unacceptable character #x{self_character:04x}: {self_reason!s}\n'
' in "{self_name!s}", position {self_position:d}',
self_character=self.character,
self_reason=self.reason,
self_name=self.name,
self_position=self.position,
)
class Reader:
# Reader:
# - determines the data encoding and converts it to a unicode string,
# - checks if characters are in allowed range,
# - adds '\0' to the end.
# Reader accepts
# - a `bytes` object,
# - a `str` object,
# - a file-like object with its `read` method returning `str`,
# - a file-like object with its `read` method returning `unicode`.
# Yeah, it's ugly and slow.
def __init__(self, stream, loader=None):
# type: (Any, Any) -> None
self.loader = loader
if self.loader is not None and getattr(self.loader, '_reader', None) is None:
self.loader._reader = self
self.reset_reader()
self.stream = stream # type: Any # as .read is called
def reset_reader(self):
# type: () -> None
self.name = None # type: Any
self.stream_pointer = 0
self.eof = True
self.buffer = ""
self.pointer = 0
self.raw_buffer = None # type: Any
self.raw_decode = None
self.encoding = None # type: Optional[Text]
self.index = 0
self.line = 0
self.column = 0
@property
def stream(self):
# type: () -> Any
try:
return self._stream
except AttributeError:
raise YAMLStreamError('input stream needs to specified')
@stream.setter
def stream(self, val):
# type: (Any) -> None
if val is None:
return
self._stream = None
if isinstance(val, str):
self.name = '<unicode string>'
self.check_printable(val)
self.buffer = val + '\0'
elif isinstance(val, bytes):
self.name = '<byte string>'
self.raw_buffer = val
self.determine_encoding()
else:
if not hasattr(val, 'read'):
raise YAMLStreamError('stream argument needs to have a read() method')
self._stream = val
self.name = getattr(self.stream, 'name', '<file>')
self.eof = False
self.raw_buffer = None
self.determine_encoding()
def peek(self, index=0):
# type: (int) -> Text
try:
return self.buffer[self.pointer + index]
except IndexError:
self.update(index + 1)
return self.buffer[self.pointer + index]
def prefix(self, length=1):
# type: (int) -> Any
if self.pointer + length >= len(self.buffer):
self.update(length)
return self.buffer[self.pointer : self.pointer + length]
def forward_1_1(self, length=1):
# type: (int) -> None
if self.pointer + length + 1 >= len(self.buffer):
self.update(length + 1)
while length != 0:
ch = self.buffer[self.pointer]
self.pointer += 1
self.index += 1
if ch in '\n\x85\u2028\u2029' or (
ch == '\r' and self.buffer[self.pointer] != '\n'
):
self.line += 1
self.column = 0
elif ch != '\uFEFF':
self.column += 1
length -= 1
def forward(self, length=1):
# type: (int) -> None
if self.pointer + length + 1 >= len(self.buffer):
self.update(length + 1)
while length != 0:
ch = self.buffer[self.pointer]
self.pointer += 1
self.index += 1
if ch == '\n' or (ch == '\r' and self.buffer[self.pointer] != '\n'):
self.line += 1
self.column = 0
elif ch != '\uFEFF':
self.column += 1
length -= 1
def get_mark(self):
# type: () -> Any
if self.stream is None:
return StringMark(
self.name, self.index, self.line, self.column, self.buffer, self.pointer
)
else:
return FileMark(self.name, self.index, self.line, self.column)
def determine_encoding(self):
# type: () -> None
while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
self.update_raw()
if isinstance(self.raw_buffer, bytes):
if self.raw_buffer.startswith(codecs.BOM_UTF16_LE):
self.raw_decode = codecs.utf_16_le_decode # type: ignore
self.encoding = 'utf-16-le'
elif self.raw_buffer.startswith(codecs.BOM_UTF16_BE):
self.raw_decode = codecs.utf_16_be_decode # type: ignore
self.encoding = 'utf-16-be'
else:
self.raw_decode = codecs.utf_8_decode # type: ignore
self.encoding = 'utf-8'
self.update(1)
NON_PRINTABLE = RegExp(
'[^\x09\x0A\x0D\x20-\x7E\x85' '\xA0-\uD7FF' '\uE000-\uFFFD' '\U00010000-\U0010FFFF' ']'
)
_printable_ascii = ('\x09\x0A\x0D' + "".join(map(chr, range(0x20, 0x7F)))).encode('ascii')
@classmethod
def _get_non_printable_ascii(cls, data): # type: ignore
# type: (Text, bytes) -> Optional[Tuple[int, Text]]
ascii_bytes = data.encode('ascii') # type: ignore
non_printables = ascii_bytes.translate(None, cls._printable_ascii) # type: ignore
if not non_printables:
return None
non_printable = non_printables[:1]
return ascii_bytes.index(non_printable), non_printable.decode('ascii')
@classmethod
def _get_non_printable_regex(cls, data):
# type: (Text) -> Optional[Tuple[int, Text]]
match = cls.NON_PRINTABLE.search(data)
if not bool(match):
return None
return match.start(), match.group()
@classmethod
def _get_non_printable(cls, data):
# type: (Text) -> Optional[Tuple[int, Text]]
try:
return cls._get_non_printable_ascii(data) # type: ignore
except UnicodeEncodeError:
return cls._get_non_printable_regex(data)
def check_printable(self, data):
# type: (Any) -> None
non_printable_match = self._get_non_printable(data)
if non_printable_match is not None:
start, character = non_printable_match
position = self.index + (len(self.buffer) - self.pointer) + start
raise ReaderError(
self.name,
position,
ord(character),
'unicode',
'special characters are not allowed',
)
def update(self, length):
# type: (int) -> None
if self.raw_buffer is None:
return
self.buffer = self.buffer[self.pointer :]
self.pointer = 0
while len(self.buffer) < length:
if not self.eof:
self.update_raw()
if self.raw_decode is not None:
try:
data, converted = self.raw_decode(self.raw_buffer, 'strict', self.eof)
except UnicodeDecodeError as exc:
character = self.raw_buffer[exc.start]
if self.stream is not None:
position = self.stream_pointer - len(self.raw_buffer) + exc.start
elif self.stream is not None:
position = self.stream_pointer - len(self.raw_buffer) + exc.start
else:
position = exc.start
raise ReaderError(self.name, position, character, exc.encoding, exc.reason)
else:
data = self.raw_buffer
converted = len(data)
self.check_printable(data)
self.buffer += data
self.raw_buffer = self.raw_buffer[converted:]
if self.eof:
self.buffer += '\0'
self.raw_buffer = None
break
def update_raw(self, size=None):
# type: (Optional[int]) -> None
if size is None:
size = 4096
data = self.stream.read(size)
if self.raw_buffer is None:
self.raw_buffer = data
else:
self.raw_buffer += data
self.stream_pointer += len(data)
if not data:
self.eof = True
# try:
# import psyco
# psyco.bind(Reader)
# except ImportError:
# pass

File diff suppressed because it is too large Load Diff

View File

@@ -1,54 +1,166 @@
# coding: utf-8
from __future__ import absolute_import
import re
try:
from .error import * # NOQA
from .nodes import * # NOQA
from .compat import string_types
except (ImportError, ValueError): # for Jython
from ruamel.yaml.error import * # NOQA
from ruamel.yaml.nodes import * # NOQA
from ruamel.yaml.compat import string_types
if False: # MYPY
from typing import Any, Dict, List, Union, Text, Optional # NOQA
from ruamel.yaml.compat import VersionType # NOQA
from ruamel.yaml.compat import _DEFAULT_YAML_VERSION, _F # NOQA
from ruamel.yaml.error import * # NOQA
from ruamel.yaml.nodes import MappingNode, ScalarNode, SequenceNode # NOQA
from ruamel.yaml.util import RegExp # NOQA
__all__ = ['BaseResolver', 'Resolver', 'VersionedResolver']
_DEFAULT_VERSION = (1, 2)
# fmt: off
# resolvers consist of
# - a list of applicable version
# - a tag
# - a regexp
# - a list of first characters to match
implicit_resolvers = [
([(1, 2)],
'tag:yaml.org,2002:bool',
RegExp('''^(?:true|True|TRUE|false|False|FALSE)$''', re.X),
list('tTfF')),
([(1, 1)],
'tag:yaml.org,2002:bool',
RegExp('''^(?:y|Y|yes|Yes|YES|n|N|no|No|NO
|true|True|TRUE|false|False|FALSE
|on|On|ON|off|Off|OFF)$''', re.X),
list('yYnNtTfFoO')),
([(1, 2)],
'tag:yaml.org,2002:float',
RegExp('''^(?:
[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+]?[0-9]+)?
|[-+]?(?:[0-9][0-9_]*)(?:[eE][-+]?[0-9]+)
|[-+]?\\.[0-9_]+(?:[eE][-+][0-9]+)?
|[-+]?\\.(?:inf|Inf|INF)
|\\.(?:nan|NaN|NAN))$''', re.X),
list('-+0123456789.')),
([(1, 1)],
'tag:yaml.org,2002:float',
RegExp('''^(?:
[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+]?[0-9]+)?
|[-+]?(?:[0-9][0-9_]*)(?:[eE][-+]?[0-9]+)
|\\.[0-9_]+(?:[eE][-+][0-9]+)?
|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]* # sexagesimal float
|[-+]?\\.(?:inf|Inf|INF)
|\\.(?:nan|NaN|NAN))$''', re.X),
list('-+0123456789.')),
([(1, 2)],
'tag:yaml.org,2002:int',
RegExp('''^(?:[-+]?0b[0-1_]+
|[-+]?0o?[0-7_]+
|[-+]?[0-9_]+
|[-+]?0x[0-9a-fA-F_]+)$''', re.X),
list('-+0123456789')),
([(1, 1)],
'tag:yaml.org,2002:int',
RegExp('''^(?:[-+]?0b[0-1_]+
|[-+]?0?[0-7_]+
|[-+]?(?:0|[1-9][0-9_]*)
|[-+]?0x[0-9a-fA-F_]+
|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$''', re.X), # sexagesimal int
list('-+0123456789')),
([(1, 2), (1, 1)],
'tag:yaml.org,2002:merge',
RegExp('^(?:<<)$'),
['<']),
([(1, 2), (1, 1)],
'tag:yaml.org,2002:null',
RegExp('''^(?: ~
|null|Null|NULL
| )$''', re.X),
['~', 'n', 'N', '']),
([(1, 2), (1, 1)],
'tag:yaml.org,2002:timestamp',
RegExp('''^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
|[0-9][0-9][0-9][0-9] -[0-9][0-9]? -[0-9][0-9]?
(?:[Tt]|[ \\t]+)[0-9][0-9]?
:[0-9][0-9] :[0-9][0-9] (?:\\.[0-9]*)?
(?:[ \\t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$''', re.X),
list('0123456789')),
([(1, 2), (1, 1)],
'tag:yaml.org,2002:value',
RegExp('^(?:=)$'),
['=']),
# The following resolver is only for documentation purposes. It cannot work
# because plain scalars cannot start with '!', '&', or '*'.
([(1, 2), (1, 1)],
'tag:yaml.org,2002:yaml',
RegExp('^(?:!|&|\\*)$'),
list('!&*')),
]
# fmt: on
class ResolverError(YAMLError):
pass
class BaseResolver(object):
class BaseResolver:
DEFAULT_SCALAR_TAG = u'tag:yaml.org,2002:str'
DEFAULT_SEQUENCE_TAG = u'tag:yaml.org,2002:seq'
DEFAULT_MAPPING_TAG = u'tag:yaml.org,2002:map'
DEFAULT_SCALAR_TAG = 'tag:yaml.org,2002:str'
DEFAULT_SEQUENCE_TAG = 'tag:yaml.org,2002:seq'
DEFAULT_MAPPING_TAG = 'tag:yaml.org,2002:map'
yaml_implicit_resolvers = {}
yaml_path_resolvers = {}
yaml_implicit_resolvers = {} # type: Dict[Any, Any]
yaml_path_resolvers = {} # type: Dict[Any, Any]
def __init__(self):
self._loader_version = None
self.resolver_exact_paths = []
self.resolver_prefix_paths = []
def __init__(self, loadumper=None):
# type: (Any, Any) -> None
self.loadumper = loadumper
if self.loadumper is not None and getattr(self.loadumper, '_resolver', None) is None:
self.loadumper._resolver = self.loadumper
self._loader_version = None # type: Any
self.resolver_exact_paths = [] # type: List[Any]
self.resolver_prefix_paths = [] # type: List[Any]
@property
def parser(self):
# type: () -> Any
if self.loadumper is not None:
if hasattr(self.loadumper, 'typ'):
return self.loadumper.parser
return self.loadumper._parser
return None
@classmethod
def add_implicit_resolver(cls, tag, regexp, first):
def add_implicit_resolver_base(cls, tag, regexp, first):
# type: (Any, Any, Any) -> None
if 'yaml_implicit_resolvers' not in cls.__dict__:
cls.yaml_implicit_resolvers = cls.yaml_implicit_resolvers.copy()
# deepcopy doesn't work here
cls.yaml_implicit_resolvers = dict(
(k, cls.yaml_implicit_resolvers[k][:]) for k in cls.yaml_implicit_resolvers
)
if first is None:
first = [None]
for ch in first:
cls.yaml_implicit_resolvers.setdefault(ch, []).append(
(tag, regexp))
cls.yaml_implicit_resolvers.setdefault(ch, []).append((tag, regexp))
@classmethod
def add_implicit_resolver(cls, tag, regexp, first):
# type: (Any, Any, Any) -> None
if 'yaml_implicit_resolvers' not in cls.__dict__:
# deepcopy doesn't work here
cls.yaml_implicit_resolvers = dict(
(k, cls.yaml_implicit_resolvers[k][:]) for k in cls.yaml_implicit_resolvers
)
if first is None:
first = [None]
for ch in first:
cls.yaml_implicit_resolvers.setdefault(ch, []).append((tag, regexp))
implicit_resolvers.append(([(1, 2), (1, 1)], tag, regexp, first))
# @classmethod
# def add_implicit_resolver(cls, tag, regexp, first):
@classmethod
def add_path_resolver(cls, tag, path, kind=None):
# type: (Any, Any, Any) -> None
# Note: `add_path_resolver` is experimental. The API could be changed.
# `new_path` is a pattern that is matched against the path from the
# root to the node that is being considered. `node_path` elements are
@@ -63,7 +175,7 @@ def add_path_resolver(cls, tag, path, kind=None):
# against a sequence value with the index equal to `index_check`.
if 'yaml_path_resolvers' not in cls.__dict__:
cls.yaml_path_resolvers = cls.yaml_path_resolvers.copy()
new_path = []
new_path = [] # type: List[Any]
for element in path:
if isinstance(element, (list, tuple)):
if len(element) == 2:
@@ -72,7 +184,9 @@ def add_path_resolver(cls, tag, path, kind=None):
node_check = element[0]
index_check = True
else:
raise ResolverError("Invalid path element: %s" % element)
raise ResolverError(
_F('Invalid path element: {element!s}', element=element)
)
else:
node_check = None
index_check = element
@@ -82,13 +196,18 @@ def add_path_resolver(cls, tag, path, kind=None):
node_check = SequenceNode
elif node_check is dict:
node_check = MappingNode
elif node_check not in [ScalarNode, SequenceNode, MappingNode] \
and not isinstance(node_check, string_types) \
and node_check is not None:
raise ResolverError("Invalid node checker: %s" % node_check)
if not isinstance(index_check, (string_types, int)) \
and index_check is not None:
raise ResolverError("Invalid index checker: %s" % index_check)
elif (
node_check not in [ScalarNode, SequenceNode, MappingNode]
and not isinstance(node_check, str)
and node_check is not None
):
raise ResolverError(
_F('Invalid node checker: {node_check!s}', node_check=node_check)
)
if not isinstance(index_check, (str, int)) and index_check is not None:
raise ResolverError(
_F('Invalid index checker: {index_check!s}', index_check=index_check)
)
new_path.append((node_check, index_check))
if kind is str:
kind = ScalarNode
@@ -96,12 +215,12 @@ def add_path_resolver(cls, tag, path, kind=None):
kind = SequenceNode
elif kind is dict:
kind = MappingNode
elif kind not in [ScalarNode, SequenceNode, MappingNode] \
and kind is not None:
raise ResolverError("Invalid node kind: %s" % kind)
elif kind not in [ScalarNode, SequenceNode, MappingNode] and kind is not None:
raise ResolverError(_F('Invalid node kind: {kind!s}', kind=kind))
cls.yaml_path_resolvers[tuple(new_path), kind] = tag
def descend_resolver(self, current_node, current_index):
# type: (Any, Any) -> None
if not self.yaml_path_resolvers:
return
exact_paths = {}
@@ -109,13 +228,11 @@ def descend_resolver(self, current_node, current_index):
if current_node:
depth = len(self.resolver_prefix_paths)
for path, kind in self.resolver_prefix_paths[-1]:
if self.check_resolver_prefix(depth, path, kind,
current_node, current_index):
if self.check_resolver_prefix(depth, path, kind, current_node, current_index):
if len(path) > depth:
prefix_paths.append((path, kind))
else:
exact_paths[kind] = self.yaml_path_resolvers[path,
kind]
exact_paths[kind] = self.yaml_path_resolvers[path, kind]
else:
for path, kind in self.yaml_path_resolvers:
if not path:
@@ -126,39 +243,40 @@ def descend_resolver(self, current_node, current_index):
self.resolver_prefix_paths.append(prefix_paths)
def ascend_resolver(self):
# type: () -> None
if not self.yaml_path_resolvers:
return
self.resolver_exact_paths.pop()
self.resolver_prefix_paths.pop()
def check_resolver_prefix(self, depth, path, kind,
current_node, current_index):
node_check, index_check = path[depth-1]
if isinstance(node_check, string_types):
def check_resolver_prefix(self, depth, path, kind, current_node, current_index):
# type: (int, Any, Any, Any, Any) -> bool
node_check, index_check = path[depth - 1]
if isinstance(node_check, str):
if current_node.tag != node_check:
return
return False
elif node_check is not None:
if not isinstance(current_node, node_check):
return
return False
if index_check is True and current_index is not None:
return
if (index_check is False or index_check is None) \
and current_index is None:
return
if isinstance(index_check, string_types):
if not (isinstance(current_index, ScalarNode) and
index_check == current_index.value):
return
elif isinstance(index_check, int) and not isinstance(index_check,
bool):
return False
if (index_check is False or index_check is None) and current_index is None:
return False
if isinstance(index_check, str):
if not (
isinstance(current_index, ScalarNode) and index_check == current_index.value
):
return False
elif isinstance(index_check, int) and not isinstance(index_check, bool):
if index_check != current_index:
return
return False
return True
def resolve(self, kind, value, implicit):
# type: (Any, Any, Any) -> Any
if kind is ScalarNode and implicit[0]:
if value == u'':
resolvers = self.yaml_implicit_resolvers.get(u'', [])
if value == "":
resolvers = self.yaml_implicit_resolvers.get("", [])
else:
resolvers = self.yaml_implicit_resolvers.get(value[0], [])
resolvers += self.yaml_implicit_resolvers.get(None, [])
@@ -166,7 +284,7 @@ def resolve(self, kind, value, implicit):
if regexp.match(value):
return tag
implicit = implicit[1]
if self.yaml_path_resolvers:
if bool(self.yaml_path_resolvers):
exact_paths = self.resolver_exact_paths[-1]
if kind in exact_paths:
return exact_paths[kind]
@@ -181,158 +299,37 @@ def resolve(self, kind, value, implicit):
@property
def processing_version(self):
# type: () -> Any
return None
class Resolver(BaseResolver):
pass
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:bool',
re.compile(u'''^(?:yes|Yes|YES|no|No|NO
|true|True|TRUE|false|False|FALSE
|on|On|ON|off|Off|OFF)$''', re.X),
list(u'yYnNtTfFoO'))
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:float',
re.compile(u'''^(?:
[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+]?[0-9]+)?
|[-+]?(?:[0-9][0-9_]*)(?:[eE][-+]?[0-9]+)
|\\.[0-9_]+(?:[eE][-+][0-9]+)?
|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*
|[-+]?\\.(?:inf|Inf|INF)
|\\.(?:nan|NaN|NAN))$''', re.X),
list(u'-+0123456789.'))
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:int',
re.compile(u'''^(?:[-+]?0b[0-1_]+
|[-+]?0o?[0-7_]+
|[-+]?(?:0|[1-9][0-9_]*)
|[-+]?0x[0-9a-fA-F_]+
|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$''', re.X),
list(u'-+0123456789'))
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:merge',
re.compile(u'^(?:<<)$'),
[u'<'])
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:null',
re.compile(u'''^(?: ~
|null|Null|NULL
| )$''', re.X),
[u'~', u'n', u'N', u''])
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:timestamp',
re.compile(u'''^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
|[0-9][0-9][0-9][0-9] -[0-9][0-9]? -[0-9][0-9]?
(?:[Tt]|[ \\t]+)[0-9][0-9]?
:[0-9][0-9] :[0-9][0-9] (?:\\.[0-9]*)?
(?:[ \\t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$''', re.X),
list(u'0123456789'))
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:value',
re.compile(u'^(?:=)$'),
[u'='])
# The following resolver is only for documentation purposes. It cannot work
# because plain scalars cannot start with '!', '&', or '*'.
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:yaml',
re.compile(u'^(?:!|&|\\*)$'),
list(u'!&*'))
# resolvers consist of
# - a list of applicable version
# - a tag
# - a regexp
# - a list of first characters to match
implicit_resolvers = [
([(1, 2)],
u'tag:yaml.org,2002:bool',
re.compile(u'''^(?:true|True|TRUE|false|False|FALSE)$''', re.X),
list(u'tTfF')),
([(1, 1)],
u'tag:yaml.org,2002:bool',
re.compile(u'''^(?:yes|Yes|YES|no|No|NO
|true|True|TRUE|false|False|FALSE
|on|On|ON|off|Off|OFF)$''', re.X),
list(u'yYnNtTfFoO')),
([(1, 2), (1, 1)],
u'tag:yaml.org,2002:float',
re.compile(u'''^(?:
[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+]?[0-9]+)?
|[-+]?(?:[0-9][0-9_]*)(?:[eE][-+]?[0-9]+)
|\\.[0-9_]+(?:[eE][-+][0-9]+)?
|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*
|[-+]?\\.(?:inf|Inf|INF)
|\\.(?:nan|NaN|NAN))$''', re.X),
list(u'-+0123456789.')),
([(1, 2)],
u'tag:yaml.org,2002:int',
re.compile(u'''^(?:[-+]?0b[0-1_]+
|[-+]?0o?[0-7_]+
|[-+]?(?:0|[1-9][0-9_]*)
|[-+]?0x[0-9a-fA-F_]+)$''', re.X),
list(u'-+0123456789')),
([(1, 1)],
u'tag:yaml.org,2002:int',
re.compile(u'''^(?:[-+]?0b[0-1_]+
|[-+]?0o?[0-7_]+
|[-+]?(?:0|[1-9][0-9_]*)
|[-+]?0x[0-9a-fA-F_]+
|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$''', re.X),
list(u'-+0123456789')),
([(1, 2), (1, 1)],
u'tag:yaml.org,2002:merge',
re.compile(u'^(?:<<)$'),
[u'<']),
([(1, 2), (1, 1)],
u'tag:yaml.org,2002:null',
re.compile(u'''^(?: ~
|null|Null|NULL
| )$''', re.X),
[u'~', u'n', u'N', u'']),
([(1, 2), (1, 1)],
u'tag:yaml.org,2002:timestamp',
re.compile(u'''^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
|[0-9][0-9][0-9][0-9] -[0-9][0-9]? -[0-9][0-9]?
(?:[Tt]|[ \\t]+)[0-9][0-9]?
:[0-9][0-9] :[0-9][0-9] (?:\\.[0-9]*)?
(?:[ \\t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$''', re.X),
list(u'0123456789')),
([(1, 2), (1, 1)],
u'tag:yaml.org,2002:value',
re.compile(u'^(?:=)$'),
[u'=']),
# The following resolver is only for documentation purposes. It cannot work
# because plain scalars cannot start with '!', '&', or '*'.
([(1, 2), (1, 1)],
u'tag:yaml.org,2002:yaml',
re.compile(u'^(?:!|&|\\*)$'),
list(u'!&*')),
]
for ir in implicit_resolvers:
if (1, 2) in ir[0]:
Resolver.add_implicit_resolver_base(*ir[1:])
class VersionedResolver(BaseResolver):
"""
contrary to the "normal" resolver, the smart resolver delays loading
the pattern matching rules. That way it can decide to load 1.1 rules
or the (default) 1.2 that no longer support octal without 0o, sexagesimals
or the (default) 1.2 rules, that no longer support octal without 0o, sexagesimals
and Yes/No/On/Off booleans.
"""
def __init__(self, version=None):
BaseResolver.__init__(self)
def __init__(self, version=None, loader=None, loadumper=None):
# type: (Optional[VersionType], Any, Any) -> None
if loader is None and loadumper is not None:
loader = loadumper
BaseResolver.__init__(self, loader)
self._loader_version = self.get_loader_version(version)
self._version_implicit_resolver = {}
self._version_implicit_resolver = {} # type: Dict[Any, Any]
def add_version_implicit_resolver(self, version, tag, regexp, first):
# type: (VersionType, Any, Any, Any) -> None
if first is None:
first = [None]
impl_resolver = self._version_implicit_resolver.setdefault(version, {})
@@ -340,19 +337,23 @@ def add_version_implicit_resolver(self, version, tag, regexp, first):
impl_resolver.setdefault(ch, []).append((tag, regexp))
def get_loader_version(self, version):
# type: (Optional[VersionType]) -> Any
if version is None or isinstance(version, tuple):
return version
if isinstance(version, list):
return tuple(version)
# assume string
return tuple(map(int, version.split(u'.')))
return tuple(map(int, version.split('.')))
@property
def resolver(self):
def versioned_resolver(self):
# type: () -> Any
"""
select the resolver based on the version we are parsing
"""
version = self.processing_version
if isinstance(version, str):
version = tuple(map(int, version.split('.')))
if version not in self._version_implicit_resolver:
for x in implicit_resolvers:
if version in x[0]:
@@ -360,17 +361,18 @@ def resolver(self):
return self._version_implicit_resolver[version]
def resolve(self, kind, value, implicit):
# type: (Any, Any, Any) -> Any
if kind is ScalarNode and implicit[0]:
if value == u'':
resolvers = self.resolver.get(u'', [])
if value == "":
resolvers = self.versioned_resolver.get("", [])
else:
resolvers = self.resolver.get(value[0], [])
resolvers += self.resolver.get(None, [])
resolvers = self.versioned_resolver.get(value[0], [])
resolvers += self.versioned_resolver.get(None, [])
for tag, regexp in resolvers:
if regexp.match(value):
return tag
implicit = implicit[1]
if self.yaml_path_resolvers:
if bool(self.yaml_path_resolvers):
exact_paths = self.resolver_exact_paths[-1]
if kind in exact_paths:
return exact_paths[kind]
@@ -385,13 +387,19 @@ def resolve(self, kind, value, implicit):
@property
def processing_version(self):
# type: () -> Any
try:
version = self.yaml_version
version = self.loadumper._scanner.yaml_version
except AttributeError:
# dumping
version = self.use_version
try:
if hasattr(self.loadumper, 'typ'):
version = self.loadumper.version
else:
version = self.loadumper._serializer.use_version # dumping
except AttributeError:
version = None
if version is None:
version = self._loader_version
if version is None:
version = _DEFAULT_VERSION
version = _DEFAULT_YAML_VERSION
return version

View File

@@ -0,0 +1,47 @@
# coding: utf-8
"""
You cannot subclass bool, and this is necessary for round-tripping anchored
bool values (and also if you want to preserve the original way of writing)
bool.__bases__ is type 'int', so that is what is used as the basis for ScalarBoolean as well.
You can use these in an if statement, but not when testing equivalence
"""
from ruamel.yaml.anchor import Anchor
if False: # MYPY
from typing import Text, Any, Dict, List # NOQA
__all__ = ['ScalarBoolean']
class ScalarBoolean(int):
def __new__(cls, *args, **kw):
# type: (Any, Any, Any) -> Any
anchor = kw.pop('anchor', None)
b = int.__new__(cls, *args, **kw)
if anchor is not None:
b.yaml_set_anchor(anchor, always_dump=True)
return b
@property
def anchor(self):
# type: () -> Any
if not hasattr(self, Anchor.attrib):
setattr(self, Anchor.attrib, Anchor())
return getattr(self, Anchor.attrib)
def yaml_anchor(self, any=False):
# type: (bool) -> Any
if not hasattr(self, Anchor.attrib):
return None
if any or self.anchor.always_dump:
return self.anchor
return None
def yaml_set_anchor(self, value, always_dump=False):
# type: (Any, bool) -> None
self.anchor.value = value
self.anchor.always_dump = always_dump

View File

@@ -0,0 +1,124 @@
# coding: utf-8
import sys
from ruamel.yaml.anchor import Anchor
if False: # MYPY
from typing import Text, Any, Dict, List # NOQA
__all__ = ['ScalarFloat', 'ExponentialFloat', 'ExponentialCapsFloat']
class ScalarFloat(float):
def __new__(cls, *args, **kw):
# type: (Any, Any, Any) -> Any
width = kw.pop('width', None)
prec = kw.pop('prec', None)
m_sign = kw.pop('m_sign', None)
m_lead0 = kw.pop('m_lead0', 0)
exp = kw.pop('exp', None)
e_width = kw.pop('e_width', None)
e_sign = kw.pop('e_sign', None)
underscore = kw.pop('underscore', None)
anchor = kw.pop('anchor', None)
v = float.__new__(cls, *args, **kw)
v._width = width
v._prec = prec
v._m_sign = m_sign
v._m_lead0 = m_lead0
v._exp = exp
v._e_width = e_width
v._e_sign = e_sign
v._underscore = underscore
if anchor is not None:
v.yaml_set_anchor(anchor, always_dump=True)
return v
def __iadd__(self, a): # type: ignore
# type: (Any) -> Any
return float(self) + a
x = type(self)(self + a)
x._width = self._width
x._underscore = self._underscore[:] if self._underscore is not None else None # NOQA
return x
def __ifloordiv__(self, a): # type: ignore
# type: (Any) -> Any
return float(self) // a
x = type(self)(self // a)
x._width = self._width
x._underscore = self._underscore[:] if self._underscore is not None else None # NOQA
return x
def __imul__(self, a): # type: ignore
# type: (Any) -> Any
return float(self) * a
x = type(self)(self * a)
x._width = self._width
x._underscore = self._underscore[:] if self._underscore is not None else None # NOQA
x._prec = self._prec # check for others
return x
def __ipow__(self, a): # type: ignore
# type: (Any) -> Any
return float(self) ** a
x = type(self)(self ** a)
x._width = self._width
x._underscore = self._underscore[:] if self._underscore is not None else None # NOQA
return x
def __isub__(self, a): # type: ignore
# type: (Any) -> Any
return float(self) - a
x = type(self)(self - a)
x._width = self._width
x._underscore = self._underscore[:] if self._underscore is not None else None # NOQA
return x
@property
def anchor(self):
# type: () -> Any
if not hasattr(self, Anchor.attrib):
setattr(self, Anchor.attrib, Anchor())
return getattr(self, Anchor.attrib)
def yaml_anchor(self, any=False):
# type: (bool) -> Any
if not hasattr(self, Anchor.attrib):
return None
if any or self.anchor.always_dump:
return self.anchor
return None
def yaml_set_anchor(self, value, always_dump=False):
# type: (Any, bool) -> None
self.anchor.value = value
self.anchor.always_dump = always_dump
def dump(self, out=sys.stdout):
# type: (Any) -> Any
out.write(
'ScalarFloat({}| w:{}, p:{}, s:{}, lz:{}, _:{}|{}, w:{}, s:{})\n'.format(
self,
self._width, # type: ignore
self._prec, # type: ignore
self._m_sign, # type: ignore
self._m_lead0, # type: ignore
self._underscore, # type: ignore
self._exp, # type: ignore
self._e_width, # type: ignore
self._e_sign, # type: ignore
)
)
class ExponentialFloat(ScalarFloat):
def __new__(cls, value, width=None, underscore=None):
# type: (Any, Any, Any) -> Any
return ScalarFloat.__new__(cls, value, width=width, underscore=underscore)
class ExponentialCapsFloat(ScalarFloat):
def __new__(cls, value, width=None, underscore=None):
# type: (Any, Any, Any) -> Any
return ScalarFloat.__new__(cls, value, width=width, underscore=underscore)

View File

@@ -0,0 +1,127 @@
# coding: utf-8
from ruamel.yaml.anchor import Anchor
if False: # MYPY
from typing import Text, Any, Dict, List # NOQA
__all__ = ['ScalarInt', 'BinaryInt', 'OctalInt', 'HexInt', 'HexCapsInt', 'DecimalInt']
class ScalarInt(int):
def __new__(cls, *args, **kw):
# type: (Any, Any, Any) -> Any
width = kw.pop('width', None)
underscore = kw.pop('underscore', None)
anchor = kw.pop('anchor', None)
v = int.__new__(cls, *args, **kw)
v._width = width
v._underscore = underscore
if anchor is not None:
v.yaml_set_anchor(anchor, always_dump=True)
return v
def __iadd__(self, a): # type: ignore
# type: (Any) -> Any
x = type(self)(self + a)
x._width = self._width # type: ignore
x._underscore = ( # type: ignore
self._underscore[:] if self._underscore is not None else None # type: ignore
) # NOQA
return x
def __ifloordiv__(self, a): # type: ignore
# type: (Any) -> Any
x = type(self)(self // a)
x._width = self._width # type: ignore
x._underscore = ( # type: ignore
self._underscore[:] if self._underscore is not None else None # type: ignore
) # NOQA
return x
def __imul__(self, a): # type: ignore
# type: (Any) -> Any
x = type(self)(self * a)
x._width = self._width # type: ignore
x._underscore = ( # type: ignore
self._underscore[:] if self._underscore is not None else None # type: ignore
) # NOQA
return x
def __ipow__(self, a): # type: ignore
# type: (Any) -> Any
x = type(self)(self ** a)
x._width = self._width # type: ignore
x._underscore = ( # type: ignore
self._underscore[:] if self._underscore is not None else None # type: ignore
) # NOQA
return x
def __isub__(self, a): # type: ignore
# type: (Any) -> Any
x = type(self)(self - a)
x._width = self._width # type: ignore
x._underscore = ( # type: ignore
self._underscore[:] if self._underscore is not None else None # type: ignore
) # NOQA
return x
@property
def anchor(self):
# type: () -> Any
if not hasattr(self, Anchor.attrib):
setattr(self, Anchor.attrib, Anchor())
return getattr(self, Anchor.attrib)
def yaml_anchor(self, any=False):
# type: (bool) -> Any
if not hasattr(self, Anchor.attrib):
return None
if any or self.anchor.always_dump:
return self.anchor
return None
def yaml_set_anchor(self, value, always_dump=False):
# type: (Any, bool) -> None
self.anchor.value = value
self.anchor.always_dump = always_dump
class BinaryInt(ScalarInt):
def __new__(cls, value, width=None, underscore=None, anchor=None):
# type: (Any, Any, Any, Any) -> Any
return ScalarInt.__new__(cls, value, width=width, underscore=underscore, anchor=anchor)
class OctalInt(ScalarInt):
def __new__(cls, value, width=None, underscore=None, anchor=None):
# type: (Any, Any, Any, Any) -> Any
return ScalarInt.__new__(cls, value, width=width, underscore=underscore, anchor=anchor)
# mixed casing of A-F is not supported, when loading the first non digit
# determines the case
class HexInt(ScalarInt):
"""uses lower case (a-f)"""
def __new__(cls, value, width=None, underscore=None, anchor=None):
# type: (Any, Any, Any, Any) -> Any
return ScalarInt.__new__(cls, value, width=width, underscore=underscore, anchor=anchor)
class HexCapsInt(ScalarInt):
"""uses upper case (A-F)"""
def __new__(cls, value, width=None, underscore=None, anchor=None):
# type: (Any, Any, Any, Any) -> Any
return ScalarInt.__new__(cls, value, width=width, underscore=underscore, anchor=anchor)
class DecimalInt(ScalarInt):
"""needed if anchor"""
def __new__(cls, value, width=None, underscore=None, anchor=None):
# type: (Any, Any, Any, Any) -> Any
return ScalarInt.__new__(cls, value, width=width, underscore=underscore, anchor=anchor)

View File

@@ -0,0 +1,152 @@
# coding: utf-8
from ruamel.yaml.anchor import Anchor
if False: # MYPY
from typing import Text, Any, Dict, List # NOQA
__all__ = [
'ScalarString',
'LiteralScalarString',
'FoldedScalarString',
'SingleQuotedScalarString',
'DoubleQuotedScalarString',
'PlainScalarString',
# PreservedScalarString is the old name, as it was the first to be preserved on rt,
# use LiteralScalarString instead
'PreservedScalarString',
]
class ScalarString(str):
__slots__ = Anchor.attrib
def __new__(cls, *args, **kw):
# type: (Any, Any) -> Any
anchor = kw.pop('anchor', None)
ret_val = str.__new__(cls, *args, **kw)
if anchor is not None:
ret_val.yaml_set_anchor(anchor, always_dump=True)
return ret_val
def replace(self, old, new, maxreplace=-1):
# type: (Any, Any, int) -> Any
return type(self)((str.replace(self, old, new, maxreplace)))
@property
def anchor(self):
# type: () -> Any
if not hasattr(self, Anchor.attrib):
setattr(self, Anchor.attrib, Anchor())
return getattr(self, Anchor.attrib)
def yaml_anchor(self, any=False):
# type: (bool) -> Any
if not hasattr(self, Anchor.attrib):
return None
if any or self.anchor.always_dump:
return self.anchor
return None
def yaml_set_anchor(self, value, always_dump=False):
# type: (Any, bool) -> None
self.anchor.value = value
self.anchor.always_dump = always_dump
class LiteralScalarString(ScalarString):
__slots__ = 'comment' # the comment after the | on the first line
style = '|'
def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor)
PreservedScalarString = LiteralScalarString
class FoldedScalarString(ScalarString):
__slots__ = ('fold_pos', 'comment') # the comment after the > on the first line
style = '>'
def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor)
class SingleQuotedScalarString(ScalarString):
__slots__ = ()
style = "'"
def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor)
class DoubleQuotedScalarString(ScalarString):
__slots__ = ()
style = '"'
def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor)
class PlainScalarString(ScalarString):
__slots__ = ()
style = ''
def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor)
def preserve_literal(s):
# type: (Text) -> Text
return LiteralScalarString(s.replace('\r\n', '\n').replace('\r', '\n'))
def walk_tree(base, map=None):
# type: (Any, Any) -> None
"""
the routine here walks over a simple yaml tree (recursing in
dict values and list items) and converts strings that
have multiple lines to literal scalars
You can also provide an explicit (ordered) mapping for multiple transforms
(first of which is executed):
map = ruamel.yaml.compat.ordereddict
map['\n'] = preserve_literal
map[':'] = SingleQuotedScalarString
walk_tree(data, map=map)
"""
from collections.abc import MutableMapping, MutableSequence
if map is None:
map = {'\n': preserve_literal}
if isinstance(base, MutableMapping):
for k in base:
v = base[k] # type: Text
if isinstance(v, str):
for ch in map:
if ch in v:
base[k] = map[ch](v)
break
else:
walk_tree(v, map=map)
elif isinstance(base, MutableSequence):
for idx, elem in enumerate(base):
if isinstance(elem, str):
for ch in map:
if ch in elem:
base[idx] = map[ch](elem)
break
else:
walk_tree(elem, map=map)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,241 @@
# coding: utf-8
from ruamel.yaml.error import YAMLError
from ruamel.yaml.compat import nprint, DBG_NODE, dbg, nprintf # NOQA
from ruamel.yaml.util import RegExp
from ruamel.yaml.events import (
StreamStartEvent,
StreamEndEvent,
MappingStartEvent,
MappingEndEvent,
SequenceStartEvent,
SequenceEndEvent,
AliasEvent,
ScalarEvent,
DocumentStartEvent,
DocumentEndEvent,
)
from ruamel.yaml.nodes import MappingNode, ScalarNode, SequenceNode
if False: # MYPY
from typing import Any, Dict, Union, Text, Optional # NOQA
from ruamel.yaml.compat import VersionType # NOQA
__all__ = ['Serializer', 'SerializerError']
class SerializerError(YAMLError):
pass
class Serializer:
# 'id' and 3+ numbers, but not 000
ANCHOR_TEMPLATE = 'id%03d'
ANCHOR_RE = RegExp('id(?!000$)\\d{3,}')
def __init__(
self,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
dumper=None,
):
# type: (Any, Optional[bool], Optional[bool], Optional[VersionType], Any, Any) -> None # NOQA
self.dumper = dumper
if self.dumper is not None:
self.dumper._serializer = self
self.use_encoding = encoding
self.use_explicit_start = explicit_start
self.use_explicit_end = explicit_end
if isinstance(version, str):
self.use_version = tuple(map(int, version.split('.')))
else:
self.use_version = version # type: ignore
self.use_tags = tags
self.serialized_nodes = {} # type: Dict[Any, Any]
self.anchors = {} # type: Dict[Any, Any]
self.last_anchor_id = 0
self.closed = None # type: Optional[bool]
self._templated_id = None
@property
def emitter(self):
# type: () -> Any
if hasattr(self.dumper, 'typ'):
return self.dumper.emitter
return self.dumper._emitter
@property
def resolver(self):
# type: () -> Any
if hasattr(self.dumper, 'typ'):
self.dumper.resolver
return self.dumper._resolver
def open(self):
# type: () -> None
if self.closed is None:
self.emitter.emit(StreamStartEvent(encoding=self.use_encoding))
self.closed = False
elif self.closed:
raise SerializerError('serializer is closed')
else:
raise SerializerError('serializer is already opened')
def close(self):
# type: () -> None
if self.closed is None:
raise SerializerError('serializer is not opened')
elif not self.closed:
self.emitter.emit(StreamEndEvent())
self.closed = True
# def __del__(self):
# self.close()
def serialize(self, node):
# type: (Any) -> None
if dbg(DBG_NODE):
nprint('Serializing nodes')
node.dump()
if self.closed is None:
raise SerializerError('serializer is not opened')
elif self.closed:
raise SerializerError('serializer is closed')
self.emitter.emit(
DocumentStartEvent(
explicit=self.use_explicit_start, version=self.use_version, tags=self.use_tags
)
)
self.anchor_node(node)
self.serialize_node(node, None, None)
self.emitter.emit(DocumentEndEvent(explicit=self.use_explicit_end))
self.serialized_nodes = {}
self.anchors = {}
self.last_anchor_id = 0
def anchor_node(self, node):
# type: (Any) -> None
if node in self.anchors:
if self.anchors[node] is None:
self.anchors[node] = self.generate_anchor(node)
else:
anchor = None
try:
if node.anchor.always_dump:
anchor = node.anchor.value
except: # NOQA
pass
self.anchors[node] = anchor
if isinstance(node, SequenceNode):
for item in node.value:
self.anchor_node(item)
elif isinstance(node, MappingNode):
for key, value in node.value:
self.anchor_node(key)
self.anchor_node(value)
def generate_anchor(self, node):
# type: (Any) -> Any
try:
anchor = node.anchor.value
except: # NOQA
anchor = None
if anchor is None:
self.last_anchor_id += 1
return self.ANCHOR_TEMPLATE % self.last_anchor_id
return anchor
def serialize_node(self, node, parent, index):
# type: (Any, Any, Any) -> None
alias = self.anchors[node]
if node in self.serialized_nodes:
node_style = getattr(node, 'style', None)
if node_style != '?':
node_style = None
self.emitter.emit(AliasEvent(alias, style=node_style))
else:
self.serialized_nodes[node] = True
self.resolver.descend_resolver(parent, index)
if isinstance(node, ScalarNode):
# here check if the node.tag equals the one that would result from parsing
# if not equal quoting is necessary for strings
detected_tag = self.resolver.resolve(ScalarNode, node.value, (True, False))
default_tag = self.resolver.resolve(ScalarNode, node.value, (False, True))
implicit = (
(node.tag == detected_tag),
(node.tag == default_tag),
node.tag.startswith('tag:yaml.org,2002:'),
)
self.emitter.emit(
ScalarEvent(
alias,
node.tag,
implicit,
node.value,
style=node.style,
comment=node.comment,
)
)
elif isinstance(node, SequenceNode):
implicit = node.tag == self.resolver.resolve(SequenceNode, node.value, True)
comment = node.comment
end_comment = None
seq_comment = None
if node.flow_style is True:
if comment: # eol comment on flow style sequence
seq_comment = comment[0]
# comment[0] = None
if comment and len(comment) > 2:
end_comment = comment[2]
else:
end_comment = None
self.emitter.emit(
SequenceStartEvent(
alias,
node.tag,
implicit,
flow_style=node.flow_style,
comment=node.comment,
)
)
index = 0
for item in node.value:
self.serialize_node(item, node, index)
index += 1
self.emitter.emit(SequenceEndEvent(comment=[seq_comment, end_comment]))
elif isinstance(node, MappingNode):
implicit = node.tag == self.resolver.resolve(MappingNode, node.value, True)
comment = node.comment
end_comment = None
map_comment = None
if node.flow_style is True:
if comment: # eol comment on flow style sequence
map_comment = comment[0]
# comment[0] = None
if comment and len(comment) > 2:
end_comment = comment[2]
self.emitter.emit(
MappingStartEvent(
alias,
node.tag,
implicit,
flow_style=node.flow_style,
comment=node.comment,
nr_items=len(node.value),
)
)
for key, value in node.value:
self.serialize_node(key, node, None)
self.serialize_node(value, node, key)
self.emitter.emit(MappingEndEvent(comment=[map_comment, end_comment]))
self.resolver.ascend_resolver()
def templated_id(s):
# type: (Text) -> Any
return Serializer.ANCHOR_RE.match(s)

View File

@@ -0,0 +1,61 @@
# coding: utf-8
import datetime
import copy
# ToDo: at least on PY3 you could probably attach the tzinfo correctly to the object
# a more complete datetime might be used by safe loading as well
if False: # MYPY
from typing import Any, Dict, Optional, List # NOQA
class TimeStamp(datetime.datetime):
def __init__(self, *args, **kw):
# type: (Any, Any) -> None
self._yaml = dict(t=False, tz=None, delta=0) # type: Dict[Any, Any]
def __new__(cls, *args, **kw): # datetime is immutable
# type: (Any, Any) -> Any
return datetime.datetime.__new__(cls, *args, **kw)
def __deepcopy__(self, memo):
# type: (Any) -> Any
ts = TimeStamp(self.year, self.month, self.day, self.hour, self.minute, self.second)
ts._yaml = copy.deepcopy(self._yaml)
return ts
def replace(
self,
year=None,
month=None,
day=None,
hour=None,
minute=None,
second=None,
microsecond=None,
tzinfo=True,
fold=None,
):
# type: (Any, Any, Any, Any, Any, Any, Any, Any, Any) -> Any
if year is None:
year = self.year
if month is None:
month = self.month
if day is None:
day = self.day
if hour is None:
hour = self.hour
if minute is None:
minute = self.minute
if second is None:
second = self.second
if microsecond is None:
microsecond = self.microsecond
if tzinfo is True:
tzinfo = self.tzinfo
if fold is None:
fold = self.fold
ts = type(self)(year, month, day, hour, minute, second, microsecond, tzinfo, fold=fold)
ts._yaml = copy.deepcopy(self._yaml)
return ts

View File

@@ -0,0 +1,404 @@
# coding: utf-8
from ruamel.yaml.compat import _F, nprintf # NOQA
if False: # MYPY
from typing import Text, Any, Dict, Optional, List # NOQA
from .error import StreamMark # NOQA
SHOW_LINES = True
class Token:
__slots__ = 'start_mark', 'end_mark', '_comment'
def __init__(self, start_mark, end_mark):
# type: (StreamMark, StreamMark) -> None
self.start_mark = start_mark
self.end_mark = end_mark
def __repr__(self):
# type: () -> Any
# attributes = [key for key in self.__slots__ if not key.endswith('_mark') and
# hasattr('self', key)]
attributes = [key for key in self.__slots__ if not key.endswith('_mark')]
attributes.sort()
# arguments = ', '.join(
# [_F('{key!s}={gattr!r})', key=key, gattr=getattr(self, key)) for key in attributes]
# )
arguments = [
_F('{key!s}={gattr!r}', key=key, gattr=getattr(self, key)) for key in attributes
]
if SHOW_LINES:
try:
arguments.append('line: ' + str(self.start_mark.line))
except: # NOQA
pass
try:
arguments.append('comment: ' + str(self._comment))
except: # NOQA
pass
return '{}({})'.format(self.__class__.__name__, ', '.join(arguments))
@property
def column(self):
# type: () -> int
return self.start_mark.column
@column.setter
def column(self, pos):
# type: (Any) -> None
self.start_mark.column = pos
# old style ( <= 0.17) is a TWO element list with first being the EOL
# comment concatenated with following FLC/BLNK; and second being a list of FLC/BLNK
# preceding the token
# new style ( >= 0.17 ) is a THREE element list with the first being a list of
# preceding FLC/BLNK, the second EOL and the third following FLC/BLNK
# note that new style has differing order, and does not consist of CommentToken(s)
# but of CommentInfo instances
# any non-assigned values in new style are None, but first and last can be empty list
# new style routines add one comment at a time
# going to be deprecated in favour of add_comment_eol/post
def add_post_comment(self, comment):
# type: (Any) -> None
if not hasattr(self, '_comment'):
self._comment = [None, None]
else:
assert len(self._comment) in [2, 5] # make sure it is version 0
# if isinstance(comment, CommentToken):
# if comment.value.startswith('# C09'):
# raise
self._comment[0] = comment
# going to be deprecated in favour of add_comment_pre
def add_pre_comments(self, comments):
# type: (Any) -> None
if not hasattr(self, '_comment'):
self._comment = [None, None]
else:
assert len(self._comment) == 2 # make sure it is version 0
assert self._comment[1] is None
self._comment[1] = comments
return
# new style
def add_comment_pre(self, comment):
# type: (Any) -> None
if not hasattr(self, '_comment'):
self._comment = [[], None, None] # type: ignore
else:
assert len(self._comment) == 3
if self._comment[0] is None:
self._comment[0] = [] # type: ignore
self._comment[0].append(comment) # type: ignore
def add_comment_eol(self, comment, comment_type):
# type: (Any, Any) -> None
if not hasattr(self, '_comment'):
self._comment = [None, None, None]
else:
assert len(self._comment) == 3
assert self._comment[1] is None
if self.comment[1] is None:
self._comment[1] = [] # type: ignore
self._comment[1].extend([None] * (comment_type + 1 - len(self.comment[1]))) # type: ignore # NOQA
# nprintf('commy', self.comment, comment_type)
self._comment[1][comment_type] = comment # type: ignore
def add_comment_post(self, comment):
# type: (Any) -> None
if not hasattr(self, '_comment'):
self._comment = [None, None, []] # type: ignore
else:
assert len(self._comment) == 3
if self._comment[2] is None:
self._comment[2] = [] # type: ignore
self._comment[2].append(comment) # type: ignore
# def get_comment(self):
# # type: () -> Any
# return getattr(self, '_comment', None)
@property
def comment(self):
# type: () -> Any
return getattr(self, '_comment', None)
def move_old_comment(self, target, empty=False):
# type: (Any, bool) -> Any
"""move a comment from this token to target (normally next token)
used to combine e.g. comments before a BlockEntryToken to the
ScalarToken that follows it
empty is a special for empty values -> comment after key
"""
c = self.comment
if c is None:
return
# don't push beyond last element
if isinstance(target, (StreamEndToken, DocumentStartToken)):
return
delattr(self, '_comment')
tc = target.comment
if not tc: # target comment, just insert
# special for empty value in key: value issue 25
if empty:
c = [c[0], c[1], None, None, c[0]]
target._comment = c
# nprint('mco2:', self, target, target.comment, empty)
return self
if c[0] and tc[0] or c[1] and tc[1]:
raise NotImplementedError(_F('overlap in comment {c!r} {tc!r}', c=c, tc=tc))
if c[0]:
tc[0] = c[0]
if c[1]:
tc[1] = c[1]
return self
def split_old_comment(self):
# type: () -> Any
""" split the post part of a comment, and return it
as comment to be added. Delete second part if [None, None]
abc: # this goes to sequence
# this goes to first element
- first element
"""
comment = self.comment
if comment is None or comment[0] is None:
return None # nothing to do
ret_val = [comment[0], None]
if comment[1] is None:
delattr(self, '_comment')
return ret_val
def move_new_comment(self, target, empty=False):
# type: (Any, bool) -> Any
"""move a comment from this token to target (normally next token)
used to combine e.g. comments before a BlockEntryToken to the
ScalarToken that follows it
empty is a special for empty values -> comment after key
"""
c = self.comment
if c is None:
return
# don't push beyond last element
if isinstance(target, (StreamEndToken, DocumentStartToken)):
return
delattr(self, '_comment')
tc = target.comment
if not tc: # target comment, just insert
# special for empty value in key: value issue 25
if empty:
c = [c[0], c[1], c[2]]
target._comment = c
# nprint('mco2:', self, target, target.comment, empty)
return self
# if self and target have both pre, eol or post comments, something seems wrong
for idx in range(3):
if c[idx] is not None and tc[idx] is not None:
raise NotImplementedError(_F('overlap in comment {c!r} {tc!r}', c=c, tc=tc))
# move the comment parts
for idx in range(3):
if c[idx]:
tc[idx] = c[idx]
return self
# class BOMToken(Token):
# id = '<byte order mark>'
class DirectiveToken(Token):
__slots__ = 'name', 'value'
id = '<directive>'
def __init__(self, name, value, start_mark, end_mark):
# type: (Any, Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.name = name
self.value = value
class DocumentStartToken(Token):
__slots__ = ()
id = '<document start>'
class DocumentEndToken(Token):
__slots__ = ()
id = '<document end>'
class StreamStartToken(Token):
__slots__ = ('encoding',)
id = '<stream start>'
def __init__(self, start_mark=None, end_mark=None, encoding=None):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.encoding = encoding
class StreamEndToken(Token):
__slots__ = ()
id = '<stream end>'
class BlockSequenceStartToken(Token):
__slots__ = ()
id = '<block sequence start>'
class BlockMappingStartToken(Token):
__slots__ = ()
id = '<block mapping start>'
class BlockEndToken(Token):
__slots__ = ()
id = '<block end>'
class FlowSequenceStartToken(Token):
__slots__ = ()
id = '['
class FlowMappingStartToken(Token):
__slots__ = ()
id = '{'
class FlowSequenceEndToken(Token):
__slots__ = ()
id = ']'
class FlowMappingEndToken(Token):
__slots__ = ()
id = '}'
class KeyToken(Token):
__slots__ = ()
id = '?'
# def x__repr__(self):
# return 'KeyToken({})'.format(
# self.start_mark.buffer[self.start_mark.index:].split(None, 1)[0])
class ValueToken(Token):
__slots__ = ()
id = ':'
class BlockEntryToken(Token):
__slots__ = ()
id = '-'
class FlowEntryToken(Token):
__slots__ = ()
id = ','
class AliasToken(Token):
__slots__ = ('value',)
id = '<alias>'
def __init__(self, value, start_mark, end_mark):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value
class AnchorToken(Token):
__slots__ = ('value',)
id = '<anchor>'
def __init__(self, value, start_mark, end_mark):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value
class TagToken(Token):
__slots__ = ('value',)
id = '<tag>'
def __init__(self, value, start_mark, end_mark):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value
class ScalarToken(Token):
__slots__ = 'value', 'plain', 'style'
id = '<scalar>'
def __init__(self, value, plain, start_mark, end_mark, style=None):
# type: (Any, Any, Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value
self.plain = plain
self.style = style
class CommentToken(Token):
__slots__ = '_value', 'pre_done'
id = '<comment>'
def __init__(self, value, start_mark=None, end_mark=None, column=None):
# type: (Any, Any, Any, Any) -> None
if start_mark is None:
assert column is not None
self._column = column
Token.__init__(self, start_mark, None) # type: ignore
self._value = value
@property
def value(self):
# type: () -> str
if isinstance(self._value, str):
return self._value
return "".join(self._value)
@value.setter
def value(self, val):
# type: (Any) -> None
self._value = val
def reset(self):
# type: () -> None
if hasattr(self, 'pre_done'):
delattr(self, 'pre_done')
def __repr__(self):
# type: () -> Any
v = '{!r}'.format(self.value)
if SHOW_LINES:
try:
v += ', line: ' + str(self.start_mark.line)
except: # NOQA
pass
try:
v += ', col: ' + str(self.start_mark.column)
except: # NOQA
pass
return 'CommentToken({})'.format(v)
def __eq__(self, other):
# type: (Any) -> bool
if self.start_mark != other.start_mark:
return False
if self.end_mark != other.end_mark:
return False
if self.value != other.value:
return False
return True
def __ne__(self, other):
# type: (Any) -> bool
return not self.__eq__(other)

View File

@@ -0,0 +1,256 @@
# coding: utf-8
"""
some helper functions that might be generally useful
"""
import datetime
from functools import partial
import re
if False: # MYPY
from typing import Any, Dict, Optional, List, Text # NOQA
from .compat import StreamTextType # NOQA
class LazyEval:
"""
Lightweight wrapper around lazily evaluated func(*args, **kwargs).
func is only evaluated when any attribute of its return value is accessed.
Every attribute access is passed through to the wrapped value.
(This only excludes special cases like method-wrappers, e.g., __hash__.)
The sole additional attribute is the lazy_self function which holds the
return value (or, prior to evaluation, func and arguments), in its closure.
"""
def __init__(self, func, *args, **kwargs):
# type: (Any, Any, Any) -> None
def lazy_self():
# type: () -> Any
return_value = func(*args, **kwargs)
object.__setattr__(self, 'lazy_self', lambda: return_value)
return return_value
object.__setattr__(self, 'lazy_self', lazy_self)
def __getattribute__(self, name):
# type: (Any) -> Any
lazy_self = object.__getattribute__(self, 'lazy_self')
if name == 'lazy_self':
return lazy_self
return getattr(lazy_self(), name)
def __setattr__(self, name, value):
# type: (Any, Any) -> None
setattr(self.lazy_self(), name, value)
RegExp = partial(LazyEval, re.compile)
timestamp_regexp = RegExp(
"""^(?P<year>[0-9][0-9][0-9][0-9])
-(?P<month>[0-9][0-9]?)
-(?P<day>[0-9][0-9]?)
(?:((?P<t>[Tt])|[ \\t]+) # explictly not retaining extra spaces
(?P<hour>[0-9][0-9]?)
:(?P<minute>[0-9][0-9])
:(?P<second>[0-9][0-9])
(?:\\.(?P<fraction>[0-9]*))?
(?:[ \\t]*(?P<tz>Z|(?P<tz_sign>[-+])(?P<tz_hour>[0-9][0-9]?)
(?::(?P<tz_minute>[0-9][0-9]))?))?)?$""",
re.X,
)
def create_timestamp(
year, month, day, t, hour, minute, second, fraction, tz, tz_sign, tz_hour, tz_minute
):
# type: (Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any) -> Any
# create a timestamp from match against timestamp_regexp
MAX_FRAC = 999999
year = int(year)
month = int(month)
day = int(day)
if not hour:
return datetime.date(year, month, day)
hour = int(hour)
minute = int(minute)
second = int(second)
frac = 0
if fraction:
frac_s = fraction[:6]
while len(frac_s) < 6:
frac_s += '0'
frac = int(frac_s)
if len(fraction) > 6 and int(fraction[6]) > 4:
frac += 1
if frac > MAX_FRAC:
fraction = 0
else:
fraction = frac
else:
fraction = 0
delta = None
if tz_sign:
tz_hour = int(tz_hour)
tz_minute = int(tz_minute) if tz_minute else 0
delta = datetime.timedelta(
hours=tz_hour, minutes=tz_minute, seconds=1 if frac > MAX_FRAC else 0
)
if tz_sign == '-':
delta = -delta
elif frac > MAX_FRAC:
delta = -datetime.timedelta(seconds=1)
# should do something else instead (or hook this up to the preceding if statement
# in reverse
# if delta is None:
# return datetime.datetime(year, month, day, hour, minute, second, fraction)
# return datetime.datetime(year, month, day, hour, minute, second, fraction,
# datetime.timezone.utc)
# the above is not good enough though, should provide tzinfo. In Python3 that is easily
# doable drop that kind of support for Python2 as it has not native tzinfo
data = datetime.datetime(year, month, day, hour, minute, second, fraction)
if delta:
data -= delta
return data
# originally as comment
# https://github.com/pre-commit/pre-commit/pull/211#issuecomment-186466605
# if you use this in your code, I suggest adding a test in your test suite
# that check this routines output against a known piece of your YAML
# before upgrades to this code break your round-tripped YAML
def load_yaml_guess_indent(stream, **kw):
# type: (StreamTextType, Any) -> Any
"""guess the indent and block sequence indent of yaml stream/string
returns round_trip_loaded stream, indent level, block sequence indent
- block sequence indent is the number of spaces before a dash relative to previous indent
- if there are no block sequences, indent is taken from nested mappings, block sequence
indent is unset (None) in that case
"""
from .main import YAML
# load a YAML document, guess the indentation, if you use TABs you are on your own
def leading_spaces(line):
# type: (Any) -> int
idx = 0
while idx < len(line) and line[idx] == ' ':
idx += 1
return idx
if isinstance(stream, str):
yaml_str = stream # type: Any
elif isinstance(stream, bytes):
# most likely, but the Reader checks BOM for this
yaml_str = stream.decode('utf-8')
else:
yaml_str = stream.read()
map_indent = None
indent = None # default if not found for some reason
block_seq_indent = None
prev_line_key_only = None
key_indent = 0
for line in yaml_str.splitlines():
rline = line.rstrip()
lline = rline.lstrip()
if lline.startswith('- '):
l_s = leading_spaces(line)
block_seq_indent = l_s - key_indent
idx = l_s + 1
while line[idx] == ' ': # this will end as we rstripped
idx += 1
if line[idx] == '#': # comment after -
continue
indent = idx - key_indent
break
if map_indent is None and prev_line_key_only is not None and rline:
idx = 0
while line[idx] in ' -':
idx += 1
if idx > prev_line_key_only:
map_indent = idx - prev_line_key_only
if rline.endswith(':'):
key_indent = leading_spaces(line)
idx = 0
while line[idx] == ' ': # this will end on ':'
idx += 1
prev_line_key_only = idx
continue
prev_line_key_only = None
if indent is None and map_indent is not None:
indent = map_indent
yaml = YAML()
return yaml.load(yaml_str, **kw), indent, block_seq_indent # type: ignore
def configobj_walker(cfg):
# type: (Any) -> Any
"""
walks over a ConfigObj (INI file with comments) generating
corresponding YAML output (including comments
"""
from configobj import ConfigObj # type: ignore
assert isinstance(cfg, ConfigObj)
for c in cfg.initial_comment:
if c.strip():
yield c
for s in _walk_section(cfg):
if s.strip():
yield s
for c in cfg.final_comment:
if c.strip():
yield c
def _walk_section(s, level=0):
# type: (Any, int) -> Any
from configobj import Section
assert isinstance(s, Section)
indent = ' ' * level
for name in s.scalars:
for c in s.comments[name]:
yield indent + c.strip()
x = s[name]
if '\n' in x:
i = indent + ' '
x = '|\n' + i + x.strip().replace('\n', '\n' + i)
elif ':' in x:
x = "'" + x.replace("'", "''") + "'"
line = '{0}{1}: {2}'.format(indent, name, x)
c = s.inline_comments[name]
if c:
line += ' ' + c
yield line
for name in s.sections:
for c in s.comments[name]:
yield indent + c.strip()
line = '{0}{1}:'.format(indent, name)
c = s.inline_comments[name]
if c:
line += ' ' + c
yield line
for val in _walk_section(s[name], level=level + 1):
yield val
# def config_obj_2_rt_yaml(cfg):
# from .comments import CommentedMap, CommentedSeq
# from configobj import ConfigObj
# assert isinstance(cfg, ConfigObj)
# #for c in cfg.initial_comment:
# # if c.strip():
# # pass
# cm = CommentedMap()
# for name in s.sections:
# cm[name] = d = CommentedMap()
#
#
# #for c in cfg.final_comment:
# # if c.strip():
# # yield c
# return cm

View File

@@ -0,0 +1,8 @@
"""
Run the `archspec` CLI as a module.
"""
import sys
from .cli import main
sys.exit(main())

View File

@@ -6,19 +6,61 @@
archspec command line interface
"""
import click
import argparse
import typing
import archspec
import archspec.cpu
@click.group(name="archspec")
@click.version_option(version=archspec.__version__)
def main():
"""archspec command line interface"""
def _make_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
"archspec",
description="archspec command line interface",
add_help=False,
)
parser.add_argument(
"--version",
"-V",
help="Show the version and exit.",
action="version",
version=f"archspec, version {archspec.__version__}",
)
parser.add_argument("--help", "-h", help="Show the help and exit.", action="help")
subcommands = parser.add_subparsers(
title="command",
metavar="COMMAND",
dest="command",
)
cpu_command = subcommands.add_parser(
"cpu",
help="archspec command line interface for CPU",
description="archspec command line interface for CPU",
)
cpu_command.set_defaults(run=cpu)
return parser
@main.command()
def cpu():
"""archspec command line interface for CPU"""
click.echo(archspec.cpu.host())
def cpu() -> int:
"""Run the `archspec cpu` subcommand."""
print(archspec.cpu.host())
return 0
def main(argv: typing.Optional[typing.List[str]] = None) -> int:
"""Run the `archspec` command line interface."""
parser = _make_parser()
try:
args = parser.parse_args(argv)
except SystemExit as err:
return err.code
if args.command is None:
parser.print_help()
return 0
return args.run()

View File

@@ -268,15 +268,14 @@ def tuplify(ver):
return flags
msg = (
"cannot produce optimized binary for micro-architecture '{0}'"
" with {1}@{2} [supported compiler versions are {3}]"
)
msg = msg.format(
self.name,
compiler,
version,
", ".join([x["versions"] for x in compiler_info]),
"cannot produce optimized binary for micro-architecture '{0}' with {1}@{2}"
)
if compiler_info:
versions = [x["versions"] for x in compiler_info]
msg += f' [supported compiler versions are {", ".join(versions)}]'
else:
msg += " [no supported compiler versions]"
msg = msg.format(self.name, compiler, version)
raise UnsupportedMicroarchitecture(msg)

View File

@@ -102,7 +102,8 @@
"name": "x86-64",
"flags": "-march={name} -mtune=generic"
}
]
],
"nvhpc": []
}
},
"x86_64_v2": {
@@ -157,7 +158,8 @@
"name": "x86-64-v2",
"flags": "-march={name} -mtune=generic"
}
]
],
"nvhpc": []
}
},
"x86_64_v3": {
@@ -228,6 +230,13 @@
"name": "x86-64-v3",
"flags": "-march={name} -mtune=generic"
}
],
"nvhpc" : [
{
"versions": ":",
"name": "px",
"flags": "-tp {name} -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mxsave"
}
]
}
},
@@ -304,6 +313,13 @@
"name": "x86-64-v4",
"flags": "-march={name} -mtune=generic"
}
],
"nvhpc": [
{
"versions": ":",
"name": "px",
"flags": "-tp {name} -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
}
]
}
},
@@ -358,7 +374,8 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
],
"nvhpc": []
}
},
"core2": {
@@ -412,7 +429,8 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
],
"nvhpc": []
}
},
"nehalem": {
@@ -477,7 +495,8 @@
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
]
],
"nvhpc": []
}
},
"westmere": {
@@ -539,7 +558,8 @@
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
]
],
"nvhpc": []
}
},
"sandybridge": {
@@ -609,6 +629,12 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"flags": "-tp {name}"
}
]
}
},
@@ -681,6 +707,12 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"flags": "-tp {name}"
}
]
}
},
@@ -758,6 +790,12 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"flags": "-tp {name}"
}
]
}
},
@@ -827,6 +865,13 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "haswell",
"flags": "-tp {name}"
}
]
}
},
@@ -899,6 +944,13 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "haswell",
"flags": "-tp {name}"
}
]
}
},
@@ -1063,6 +1115,13 @@
"name": "skylake-avx512",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "skylake",
"flags": "-tp {name}"
}
]
}
},
@@ -1143,6 +1202,13 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "skylake",
"flags": "-tp {name}"
}
]
}
},
@@ -1222,6 +1288,13 @@
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "skylake",
"flags": "-tp {name}"
}
]
}
},
@@ -1329,6 +1402,13 @@
"name": "icelake-client",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "skylake",
"flags": "-tp {name}"
}
]
}
},
@@ -1387,7 +1467,8 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse2"
}
]
],
"nvhpc": []
}
},
"bulldozer": {
@@ -1451,6 +1532,12 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
],
"nvhpc": [
{
"versions": ":",
"flags": "-tp {name}"
}
]
}
},
@@ -1519,6 +1606,12 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
],
"nvhpc": [
{
"versions": ":",
"flags": "-tp {name}"
}
]
}
},
@@ -1588,6 +1681,13 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse4.2"
}
],
"nvhpc": [
{
"versions": ":",
"name": "piledriver",
"flags": "-tp {name}"
}
]
}
},
@@ -1663,6 +1763,13 @@
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "piledriver",
"flags": "-tp {name}"
}
]
}
},
@@ -1741,6 +1848,12 @@
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"flags": "-tp {name}"
}
]
}
},
@@ -1820,6 +1933,12 @@
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": "20.5:",
"flags": "-tp {name}"
}
]
}
},
@@ -1902,6 +2021,12 @@
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": "21.11:",
"flags": "-tp {name}"
}
]
}
},
@@ -1958,18 +2083,28 @@
"compilers": {
"gcc": [
{
"versions": "10.3:",
"versions": "10.3:13.0",
"name": "znver3",
"flags": "-march={name} -mtune={name} -mavx512f -mavx512dq -mavx512ifma -mavx512cd -mavx512bw -mavx512vl -mavx512vbmi -mavx512vbmi2 -mavx512vnni -mavx512bitalg"
},
{
"versions": "13.1:",
"name": "znver4",
"flags": "-march={name} -mtune={name}"
}
],
"clang": [
{
"versions": "12.0:",
"versions": "12.0:15.9",
"name": "znver3",
"flags": "-march={name} -mtune={name} -mavx512f -mavx512dq -mavx512ifma -mavx512cd -mavx512bw -mavx512vl -mavx512vbmi -mavx512vbmi2 -mavx512vnni -mavx512bitalg"
},
{
"versions": "16.0:",
"name": "znver4",
"flags": "-march={name} -mtune={name}"
}
],
],
"aocc": [
{
"versions": "3.0:3.9",
@@ -1982,7 +2117,15 @@
"name": "znver4",
"flags": "-march={name} -mtune={name}"
}
]
],
"nvhpc": [
{
"versions": "21.11:",
"name": "zen3",
"flags": "-tp {name}",
"warnings": "zen4 is not fully supported by nvhpc yet, falling back to zen3"
}
]
}
},
"ppc64": {
@@ -2087,7 +2230,8 @@
"versions": ":",
"flags": "-mcpu={name} -mtune={name}"
}
]
],
"nvhpc": []
}
},
"power8le": {
@@ -2116,6 +2260,13 @@
"name": "power8",
"flags": "-mcpu={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "pwr8",
"flags": "-tp {name}"
}
]
}
},
@@ -2139,6 +2290,13 @@
"name": "power9",
"flags": "-mcpu={name} -mtune={name}"
}
],
"nvhpc": [
{
"versions": ":",
"name": "pwr9",
"flags": "-tp {name}"
}
]
}
},
@@ -2170,7 +2328,8 @@
"versions": ":",
"flags": "-march=armv8-a -mtune=generic"
}
]
],
"nvhpc": []
}
},
"armv8.1a": {
@@ -2552,6 +2711,13 @@
"versions": "20:",
"flags" : "-march=armv8.2-a+fp16+rcpc+dotprod+crypto"
}
],
"nvhpc" : [
{
"versions": "22.5:",
"name": "neoverse-n1",
"flags": "-tp {name}"
}
]
}
},
@@ -2617,15 +2783,31 @@
"flags" : "-march=armv8.2-a+crypto+fp16 -mtune=cortex-a72"
},
{
"versions": "8.0:8.9",
"versions": "8.0:8.4",
"flags" : "-march=armv8.2-a+fp16+dotprod+crypto -mtune=cortex-a72"
},
{
"versions": "9.0:9.9",
"versions": "8.5:8.9",
"flags" : "-mcpu=neoverse-v1"
},
{
"versions": "10.0:",
{
"versions": "9.0:9.3",
"flags" : "-march=armv8.2-a+fp16+dotprod+crypto -mtune=cortex-a72"
},
{
"versions": "9.4:9.9",
"flags" : "-mcpu=neoverse-v1"
},
{
"versions": "10.0:10.1",
"flags" : "-march=armv8.2-a+fp16+dotprod+crypto -mtune=cortex-a72"
},
{
"versions": "10.2",
"flags" : "-mcpu=zeus"
},
{
"versions": "10.3:",
"flags" : "-mcpu=neoverse-v1"
}
@@ -2657,6 +2839,13 @@
"versions": "22:",
"flags" : "-march=armv8.4-a+sve+ssbs+fp16+bf16+crypto+i8mm+rng"
}
],
"nvhpc" : [
{
"versions": "22.5:",
"name": "neoverse-n1",
"flags": "-tp {name}"
}
]
}
},
@@ -2782,6 +2971,10 @@
{
"versions": "13.0:",
"flags" : "-mcpu=apple-m1"
},
{
"versions": "16.0:",
"flags" : "-mcpu=apple-m2"
}
],
"apple-clang": [
@@ -2790,8 +2983,12 @@
"flags" : "-march=armv8.5-a"
},
{
"versions": "13.0:",
"flags" : "-mcpu=vortex"
"versions": "13.0:14.0.2",
"flags" : "-mcpu=apple-m1"
},
{
"versions": "14.0.2:",
"flags" : "-mcpu=apple-m2"
}
]
}

View File

@@ -1,2 +0,0 @@
import pkg_resources
pkg_resources.declare_namespace(__name__)

View File

@@ -1,38 +0,0 @@
ruamel.yaml
===========
``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python.
* `Overview <http://yaml.readthedocs.org/en/latest/overview.html>`_
* `Installing <http://yaml.readthedocs.org/en/latest/install.html>`_
* `Details <http://yaml.readthedocs.org/en/latest/detail.html>`_
* `Examples <http://yaml.readthedocs.org/en/latest/example.html>`_
* `Differences with PyYAML <http://yaml.readthedocs.org/en/latest/pyyaml.html>`_
.. image:: https://readthedocs.org/projects/yaml/badge/?version=stable
:target: https://yaml.readthedocs.org/en/stable
ChangeLog
=========
::
0.11.15 (2016-XX-XX):
- Change to prevent FutureWarning in NumPy, as reported by tgehring
("comparison to None will result in an elementwise object comparison in the future")
0.11.14 (2016-07-06):
- fix preserve_quotes missing on original Loaders (as reported
by Leynos, bitbucket issue 38)
0.11.13 (2016-07-06):
- documentation only, automated linux wheels
0.11.12 (2016-07-06):
- added support for roundtrip of single/double quoted scalars using:
ruamel.yaml.round_trip_load(stream, preserve_quotes=True)
0.11.0 (2016-02-18):
- RoundTripLoader loads 1.2 by default (no sexagesimals, 012 octals nor
yes/no/on/off booleans

View File

@@ -1,85 +0,0 @@
# coding: utf-8
from __future__ import print_function
from __future__ import absolute_import
# install_requires of ruamel.base is not really required but the old
# ruamel.base installed __init__.py, and thus a new version should
# be installed at some point
_package_data = dict(
full_package_name="ruamel.yaml",
version_info=(0, 11, 15),
author="Anthon van der Neut",
author_email="a.van.der.neut@ruamel.eu",
description="ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order", # NOQA
entry_points=None,
install_requires=dict(
any=[],
py26=["ruamel.ordereddict"],
py27=["ruamel.ordereddict"]
),
ext_modules=[dict(
name="_ruamel_yaml",
src=["ext/_ruamel_yaml.c", "ext/api.c", "ext/writer.c", "ext/dumper.c",
"ext/loader.c", "ext/reader.c", "ext/scanner.c", "ext/parser.c",
"ext/emitter.c"],
lib=[],
# test='#include "ext/yaml.h"\n\nint main(int argc, char* argv[])\n{\nyaml_parser_t parser;\nparser = parser; /* prevent warning */\nreturn 0;\n}\n' # NOQA
)
],
classifiers=[
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: Implementation :: Jython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup"
],
windows_wheels=True,
read_the_docs='yaml',
many_linux='libyaml-devel',
)
# < from ruamel.util.new import _convert_version
def _convert_version(tup):
"""create a PEP 386 pseudo-format conformant string from tuple tup"""
ret_val = str(tup[0]) # first is always digit
next_sep = "." # separator for next extension, can be "" or "."
for x in tup[1:]:
if isinstance(x, int):
ret_val += next_sep + str(x)
next_sep = '.'
continue
first_letter = x[0].lower()
next_sep = ''
if first_letter in 'abcr':
ret_val += 'rc' if first_letter == 'r' else first_letter
elif first_letter in 'pd':
ret_val += '.post' if first_letter == 'p' else '.dev'
return ret_val
# <
version_info = _package_data['version_info']
__version__ = _convert_version(version_info)
del _convert_version
try:
from .cyaml import * # NOQA
__with_libyaml__ = True
except (ImportError, ValueError): # for Jython
__with_libyaml__ = False
# body extracted to main.py
try:
from .main import * # NOQA
except ImportError:
from ruamel.yaml.main import * # NOQA

View File

@@ -1,486 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
from __future__ import print_function
"""
stuff to deal with comments and formatting on dict/list/ordereddict/set
these are not really related, formatting could be factored out as
a separate base
"""
import sys
if sys.version_info >= (3, 3):
from collections.abc import MutableSet
else:
from collections import MutableSet
__all__ = ["CommentedSeq", "CommentedMap", "CommentedOrderedMap",
"CommentedSet", 'comment_attrib', 'merge_attrib']
try:
from .compat import ordereddict
except ImportError:
from ruamel.yaml.compat import ordereddict
comment_attrib = '_yaml_comment'
format_attrib = '_yaml_format'
line_col_attrib = '_yaml_line_col'
anchor_attrib = '_yaml_anchor'
merge_attrib = '_yaml_merge'
tag_attrib = '_yaml_tag'
class Comment(object):
# sys.getsize tested the Comment objects, __slots__ make them bigger
# and adding self.end did not matter
attrib = comment_attrib
def __init__(self):
self.comment = None # [post, [pre]]
# map key (mapping/omap/dict) or index (sequence/list) to a list of
# dict: post_key, pre_key, post_value, pre_value
# list: pre item, post item
self._items = {}
# self._start = [] # should not put these on first item
self._end = [] # end of document comments
def __str__(self):
if self._end:
end = ',\n end=' + str(self._end)
else:
end = ''
return "Comment(comment={0},\n items={1}{2})".format(
self.comment, self._items, end)
@property
def items(self):
return self._items
@property
def end(self):
return self._end
@end.setter
def end(self, value):
self._end = value
@property
def start(self):
return self._start
@start.setter
def start(self, value):
self._start = value
# to distinguish key from None
def NoComment():
pass
class Format(object):
attrib = format_attrib
def __init__(self):
self._flow_style = None
def set_flow_style(self):
self._flow_style = True
def set_block_style(self):
self._flow_style = False
def flow_style(self, default=None):
"""if default (the flow_style) is None, the flow style tacked on to
the object explicitly will be taken. If that is None as well the
default flow style rules the format down the line, or the type
of the constituent values (simple -> flow, map/list -> block)"""
if self._flow_style is None:
return default
return self._flow_style
class LineCol(object):
attrib = line_col_attrib
def __init__(self):
self.line = None
self.col = None
self.data = None
def add_kv_line_col(self, key, data):
if self.data is None:
self.data = {}
self.data[key] = data
def key(self, k):
return self._kv(k, 0, 1)
def value(self, k):
return self._kv(k, 2, 3)
def _kv(self, k, x0, x1):
if self.data is None:
return None
data = self.data[k]
return data[x0], data[x1]
def item(self, idx):
if self.data is None:
return None
return self.data[idx][0], self.data[idx][1]
def add_idx_line_col(self, key, data):
if self.data is None:
self.data = {}
self.data[key] = data
class Anchor(object):
attrib = anchor_attrib
def __init__(self):
self.value = None
self.always_dump = False
class Tag(object):
"""store tag information for roundtripping"""
attrib = tag_attrib
def __init__(self):
self.value = None
class CommentedBase(object):
@property
def ca(self):
if not hasattr(self, Comment.attrib):
setattr(self, Comment.attrib, Comment())
return getattr(self, Comment.attrib)
def yaml_end_comment_extend(self, comment, clear=False):
if clear:
self.ca.end = []
self.ca.end.extend(comment)
def yaml_key_comment_extend(self, key, comment, clear=False):
l = self.ca._items.setdefault(key, [None, None, None, None])
if clear or l[1] is None:
if comment[1] is not None:
assert isinstance(comment[1], list)
l[1] = comment[1]
else:
l[1].extend(comment[0])
l[0] = comment[0]
def yaml_value_comment_extend(self, key, comment, clear=False):
l = self.ca._items.setdefault(key, [None, None, None, None])
if clear or l[3] is None:
if comment[1] is not None:
assert isinstance(comment[1], list)
l[3] = comment[1]
else:
l[3].extend(comment[0])
l[2] = comment[0]
def yaml_set_start_comment(self, comment, indent=0):
"""overwrites any preceding comment lines on an object
expects comment to be without `#` and possible have mutlple lines
"""
from .error import Mark
from .tokens import CommentToken
pre_comments = self._yaml_get_pre_comment()
if comment[-1] == '\n':
comment = comment[:-1] # strip final newline if there
start_mark = Mark(None, None, None, indent, None, None)
for com in comment.split('\n'):
pre_comments.append(CommentToken('# ' + com + '\n', start_mark, None))
@property
def fa(self):
"""format attribute
set_flow_style()/set_block_style()"""
if not hasattr(self, Format.attrib):
setattr(self, Format.attrib, Format())
return getattr(self, Format.attrib)
def yaml_add_eol_comment(self, comment, key=NoComment, column=None):
"""
there is a problem as eol comments should start with ' #'
(but at the beginning of the line the space doesn't have to be before
the #. The column index is for the # mark
"""
from .tokens import CommentToken
from .error import Mark
if column is None:
column = self._yaml_get_column(key)
if comment[0] != '#':
comment = '# ' + comment
if column is None:
if comment[0] == '#':
comment = ' ' + comment
column = 0
start_mark = Mark(None, None, None, column, None, None)
ct = [CommentToken(comment, start_mark, None), None]
self._yaml_add_eol_comment(ct, key=key)
@property
def lc(self):
if not hasattr(self, LineCol.attrib):
setattr(self, LineCol.attrib, LineCol())
return getattr(self, LineCol.attrib)
def _yaml_set_line_col(self, line, col):
self.lc.line = line
self.lc.col = col
def _yaml_set_kv_line_col(self, key, data):
self.lc.add_kv_line_col(key, data)
def _yaml_set_idx_line_col(self, key, data):
self.lc.add_idx_line_col(key, data)
@property
def anchor(self):
if not hasattr(self, Anchor.attrib):
setattr(self, Anchor.attrib, Anchor())
return getattr(self, Anchor.attrib)
def yaml_anchor(self):
if not hasattr(self, Anchor.attrib):
return None
return self.anchor
def yaml_set_anchor(self, value, always_dump=False):
self.anchor.value = value
self.anchor.always_dump = always_dump
@property
def tag(self):
if not hasattr(self, Tag.attrib):
setattr(self, Tag.attrib, Tag())
return getattr(self, Tag.attrib)
def yaml_set_tag(self, value):
self.tag.value = value
class CommentedSeq(list, CommentedBase):
__slots__ = [Comment.attrib, ]
def _yaml_add_comment(self, comment, key=NoComment):
if key is not NoComment:
self.yaml_key_comment_extend(key, comment)
else:
self.ca.comment = comment
def _yaml_add_eol_comment(self, comment, key):
self._yaml_add_comment(comment, key=key)
def _yaml_get_columnX(self, key):
return self.ca.items[key][0].start_mark.column
def insert(self, idx, val):
"""the comments after the insertion have to move forward"""
list.insert(self, idx, val)
for list_index in sorted(self.ca.items, reverse=True):
if list_index < idx:
break
self.ca.items[list_index+1] = self.ca.items.pop(list_index)
def pop(self, idx):
res = list.pop(self, idx)
self.ca.items.pop(idx, None) # might not be there -> default value
for list_index in sorted(self.ca.items):
if list_index < idx:
continue
self.ca.items[list_index-1] = self.ca.items.pop(list_index)
return res
def _yaml_get_column(self, key):
column = None
sel_idx = None
pre, post = key-1, key+1
if pre in self.ca.items:
sel_idx = pre
elif post in self.ca.items:
sel_idx = post
else:
# self.ca.items is not ordered
for row_idx, k1 in enumerate(self):
if row_idx >= key:
break
if row_idx not in self.ca.items:
continue
sel_idx = row_idx
if sel_idx is not None:
column = self._yaml_get_columnX(sel_idx)
return column
def _yaml_get_pre_comment(self):
if self.ca.comment is None:
pre_comments = []
self.ca.comment = [None, pre_comments]
else:
pre_comments = self.ca.comment[1] = []
return pre_comments
class CommentedMap(ordereddict, CommentedBase):
__slots__ = [Comment.attrib, ]
def _yaml_add_comment(self, comment, key=NoComment, value=NoComment):
"""values is set to key to indicate a value attachment of comment"""
if key is not NoComment:
self.yaml_key_comment_extend(key, comment)
return
if value is not NoComment:
self.yaml_value_comment_extend(value, comment)
else:
self.ca.comment = comment
def _yaml_add_eol_comment(self, comment, key):
"""add on the value line, with value specified by the key"""
self._yaml_add_comment(comment, value=key)
def _yaml_get_columnX(self, key):
return self.ca.items[key][2].start_mark.column
def _yaml_get_column(self, key):
column = None
sel_idx = None
pre, post, last = None, None, None
for x in self:
if pre is not None and x != key:
post = x
break
if x == key:
pre = last
last = x
if pre in self.ca.items:
sel_idx = pre
elif post in self.ca.items:
sel_idx = post
else:
# self.ca.items is not ordered
for row_idx, k1 in enumerate(self):
if k1 >= key:
break
if k1 not in self.ca.items:
continue
sel_idx = k1
if sel_idx is not None:
column = self._yaml_get_columnX(sel_idx)
return column
def _yaml_get_pre_comment(self):
if self.ca.comment is None:
pre_comments = []
self.ca.comment = [None, pre_comments]
else:
pre_comments = self.ca.comment[1] = []
return pre_comments
def update(self, *vals, **kwds):
try:
ordereddict.update(self, *vals, **kwds)
except TypeError:
# probably a dict that is used
for x in vals:
self[x] = vals[x]
def insert(self, pos, key, value, comment=None):
"""insert key value into given position
attach comment if provided
"""
ordereddict.insert(self, pos, key, value)
if comment is not None:
self.yaml_add_eol_comment(comment, key=key)
def mlget(self, key, default=None, list_ok=False):
"""multi-level get that expects dicts within dicts"""
if not isinstance(key, list):
return self.get(key, default)
# assume that the key is a list of recursively accessible dicts
def get_one_level(key_list, level, d):
if not list_ok:
assert isinstance(d, dict)
if level >= len(key_list):
if level > len(key_list):
raise IndexError
return d[key_list[level-1]]
return get_one_level(key_list, level+1, d[key_list[level-1]])
try:
return get_one_level(key, 1, self)
except KeyError:
return default
except (TypeError, IndexError):
if not list_ok:
raise
return default
def __getitem__(self, key):
try:
return ordereddict.__getitem__(self, key)
except KeyError:
for merged in getattr(self, merge_attrib, []):
if key in merged[1]:
return merged[1][key]
raise
def get(self, key, default=None):
try:
return self.__getitem__(key)
except:
return default
@property
def merge(self):
if not hasattr(self, merge_attrib):
setattr(self, merge_attrib, [])
return getattr(self, merge_attrib)
def add_yaml_merge(self, value):
self.merge.extend(value)
class CommentedOrderedMap(CommentedMap):
__slots__ = [Comment.attrib, ]
class CommentedSet(MutableSet, CommentedMap):
__slots__ = [Comment.attrib, 'odict']
def __init__(self, values=None):
self.odict = ordereddict()
MutableSet.__init__(self)
if values is not None:
self |= values
def add(self, value):
"""Add an element."""
self.odict[value] = None
def discard(self, value):
"""Remove an element. Do not raise an exception if absent."""
del self.odict[value]
def __contains__(self, x):
return x in self.odict
def __iter__(self):
for x in self.odict:
yield x
def __len__(self):
return len(self.odict)
def __repr__(self):
return 'set({0!r})'.format(self.odict.keys())

View File

@@ -1,123 +0,0 @@
# coding: utf-8
from __future__ import print_function
# partially from package six by Benjamin Peterson
import sys
import os
import types
try:
from ruamel.ordereddict import ordereddict
except:
try:
from collections.abc import OrderedDict
except ImportError:
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
# to get the right name import ... as ordereddict doesn't do that
class ordereddict(OrderedDict):
if not hasattr(OrderedDict, 'insert'):
def insert(self, pos, key, value):
if pos >= len(self):
self[key] = value
return
od = ordereddict()
od.update(self)
for k in od:
del self[k]
for index, old_key in enumerate(od):
if pos == index:
self[key] = value
self[old_key] = od[old_key]
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if PY3:
def utf8(s):
return s
def to_str(s):
return s
def to_unicode(s):
return s
else:
def utf8(s):
return s.encode('utf-8')
def to_str(s):
return str(s)
def to_unicode(s):
return unicode(s)
if PY3:
string_types = str,
integer_types = int,
class_types = type,
text_type = str
binary_type = bytes
MAXSIZE = sys.maxsize
unichr = chr
import io
StringIO = io.StringIO
BytesIO = io.BytesIO
else:
string_types = basestring,
integer_types = (int, long)
class_types = (type, types.ClassType)
text_type = unicode
binary_type = str
unichr = unichr # to allow importing
import StringIO
StringIO = StringIO.StringIO
import cStringIO
BytesIO = cStringIO.StringIO
if PY3:
builtins_module = 'builtins'
else:
builtins_module = '__builtin__'
def with_metaclass(meta, *bases):
"""Create a base class with a metaclass."""
return meta("NewBase", bases, {})
DBG_TOKEN = 1
DBG_EVENT = 2
DBG_NODE = 4
_debug = None
# used from yaml util when testing
def dbg(val=None):
global _debug
if _debug is None:
# set to true or false
_debug = os.environ.get('YAMLDEBUG')
if _debug is None:
_debug = 0
else:
_debug = int(_debug)
if val is None:
return _debug
return _debug & val
def nprint(*args, **kw):
if dbg:
print(*args, **kw)

View File

@@ -1,182 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
from __future__ import print_function
try:
from .error import MarkedYAMLError
from .compat import utf8
except (ImportError, ValueError): # for Jython
from ruamel.yaml.error import MarkedYAMLError
from ruamel.yaml.compat import utf8
from ruamel.yaml.events import (
StreamStartEvent, StreamEndEvent, MappingStartEvent, MappingEndEvent,
SequenceStartEvent, SequenceEndEvent, AliasEvent, ScalarEvent,
)
from ruamel.yaml.nodes import (
MappingNode, ScalarNode, SequenceNode,
)
__all__ = ['Composer', 'ComposerError']
class ComposerError(MarkedYAMLError):
pass
class Composer(object):
def __init__(self):
self.anchors = {}
def check_node(self):
# Drop the STREAM-START event.
if self.check_event(StreamStartEvent):
self.get_event()
# If there are more documents available?
return not self.check_event(StreamEndEvent)
def get_node(self):
# Get the root node of the next document.
if not self.check_event(StreamEndEvent):
return self.compose_document()
def get_single_node(self):
# Drop the STREAM-START event.
self.get_event()
# Compose a document if the stream is not empty.
document = None
if not self.check_event(StreamEndEvent):
document = self.compose_document()
# Ensure that the stream contains no more documents.
if not self.check_event(StreamEndEvent):
event = self.get_event()
raise ComposerError(
"expected a single document in the stream",
document.start_mark, "but found another document",
event.start_mark)
# Drop the STREAM-END event.
self.get_event()
return document
def compose_document(self):
# Drop the DOCUMENT-START event.
self.get_event()
# Compose the root node.
node = self.compose_node(None, None)
# Drop the DOCUMENT-END event.
self.get_event()
self.anchors = {}
return node
def compose_node(self, parent, index):
if self.check_event(AliasEvent):
event = self.get_event()
alias = event.anchor
if alias not in self.anchors:
raise ComposerError(
None, None, "found undefined alias %r"
% utf8(alias), event.start_mark)
return self.anchors[alias]
event = self.peek_event()
anchor = event.anchor
if anchor is not None: # have an anchor
if anchor in self.anchors:
raise ComposerError(
"found duplicate anchor %r; first occurence"
% utf8(anchor), self.anchors[anchor].start_mark,
"second occurence", event.start_mark)
self.descend_resolver(parent, index)
if self.check_event(ScalarEvent):
node = self.compose_scalar_node(anchor)
elif self.check_event(SequenceStartEvent):
node = self.compose_sequence_node(anchor)
elif self.check_event(MappingStartEvent):
node = self.compose_mapping_node(anchor)
self.ascend_resolver()
return node
def compose_scalar_node(self, anchor):
event = self.get_event()
tag = event.tag
if tag is None or tag == u'!':
tag = self.resolve(ScalarNode, event.value, event.implicit)
node = ScalarNode(tag, event.value,
event.start_mark, event.end_mark, style=event.style,
comment=event.comment)
if anchor is not None:
self.anchors[anchor] = node
return node
def compose_sequence_node(self, anchor):
start_event = self.get_event()
tag = start_event.tag
if tag is None or tag == u'!':
tag = self.resolve(SequenceNode, None, start_event.implicit)
node = SequenceNode(tag, [],
start_event.start_mark, None,
flow_style=start_event.flow_style,
comment=start_event.comment, anchor=anchor)
if anchor is not None:
self.anchors[anchor] = node
index = 0
while not self.check_event(SequenceEndEvent):
node.value.append(self.compose_node(node, index))
index += 1
end_event = self.get_event()
if node.flow_style is True and end_event.comment is not None:
if node.comment is not None:
print('Warning: unexpected end_event commment in sequence '
'node {0}'.format(node.flow_style))
node.comment = end_event.comment
node.end_mark = end_event.end_mark
self.check_end_doc_comment(end_event, node)
return node
def compose_mapping_node(self, anchor):
start_event = self.get_event()
tag = start_event.tag
if tag is None or tag == u'!':
tag = self.resolve(MappingNode, None, start_event.implicit)
node = MappingNode(tag, [],
start_event.start_mark, None,
flow_style=start_event.flow_style,
comment=start_event.comment, anchor=anchor)
if anchor is not None:
self.anchors[anchor] = node
while not self.check_event(MappingEndEvent):
# key_event = self.peek_event()
item_key = self.compose_node(node, None)
# if item_key in node.value:
# raise ComposerError("while composing a mapping",
# start_event.start_mark,
# "found duplicate key", key_event.start_mark)
item_value = self.compose_node(node, item_key)
# node.value[item_key] = item_value
node.value.append((item_key, item_value))
end_event = self.get_event()
if node.flow_style is True and end_event.comment is not None:
node.comment = end_event.comment
node.end_mark = end_event.end_mark
self.check_end_doc_comment(end_event, node)
return node
def check_end_doc_comment(self, end_event, node):
if end_event.comment and end_event.comment[1]:
# pre comments on an end_event, no following to move to
if node.comment is None:
node.comment = [None, None]
assert not isinstance(node, ScalarEvent)
# this is a post comment on a mapping node, add as third element
# in the list
node.comment.append(end_event.comment[1])
end_event.comment[1] = None

View File

@@ -1,9 +0,0 @@
# coding: utf-8
import warnings
from ruamel.yaml.util import configobj_walker as new_configobj_walker
def configobj_walker(cfg):
warnings.warn("configobj_walker has move to ruamel.yaml.util, please update your code")
return new_configobj_walker(cfg)

File diff suppressed because it is too large Load Diff

View File

@@ -1,102 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
__all__ = ['BaseDumper', 'SafeDumper', 'Dumper', 'RoundTripDumper']
try:
from .emitter import * # NOQA
from .serializer import * # NOQA
from .representer import * # NOQA
from .resolver import * # NOQA
except (ImportError, ValueError): # for Jython
from ruamel.yaml.emitter import * # NOQA
from ruamel.yaml.serializer import * # NOQA
from ruamel.yaml.representer import * # NOQA
from ruamel.yaml.resolver import * # NOQA
class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver):
def __init__(self, stream,
default_style=None, default_flow_style=None,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=None, explicit_start=None, explicit_end=None,
version=None, tags=None, block_seq_indent=None,
top_level_colon_align=None, prefix_colon=None):
Emitter.__init__(self, stream, canonical=canonical,
indent=indent, width=width,
allow_unicode=allow_unicode, line_break=line_break,
block_seq_indent=block_seq_indent)
Serializer.__init__(self, encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version, tags=tags)
Representer.__init__(self, default_style=default_style,
default_flow_style=default_flow_style)
Resolver.__init__(self)
class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver):
def __init__(self, stream,
default_style=None, default_flow_style=None,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=None, explicit_start=None, explicit_end=None,
version=None, tags=None, block_seq_indent=None,
top_level_colon_align=None, prefix_colon=None):
Emitter.__init__(self, stream, canonical=canonical,
indent=indent, width=width,
allow_unicode=allow_unicode, line_break=line_break,
block_seq_indent=block_seq_indent)
Serializer.__init__(self, encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version, tags=tags)
SafeRepresenter.__init__(self, default_style=default_style,
default_flow_style=default_flow_style)
Resolver.__init__(self)
class Dumper(Emitter, Serializer, Representer, Resolver):
def __init__(self, stream,
default_style=None, default_flow_style=None,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=None, explicit_start=None, explicit_end=None,
version=None, tags=None, block_seq_indent=None,
top_level_colon_align=None, prefix_colon=None):
Emitter.__init__(self, stream, canonical=canonical,
indent=indent, width=width,
allow_unicode=allow_unicode, line_break=line_break,
block_seq_indent=block_seq_indent)
Serializer.__init__(self, encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version, tags=tags)
Representer.__init__(self, default_style=default_style,
default_flow_style=default_flow_style)
Resolver.__init__(self)
class RoundTripDumper(Emitter, Serializer, RoundTripRepresenter, VersionedResolver):
def __init__(self, stream,
default_style=None, default_flow_style=None,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=None, explicit_start=None, explicit_end=None,
version=None, tags=None, block_seq_indent=None,
top_level_colon_align=None, prefix_colon=None):
Emitter.__init__(self, stream, canonical=canonical,
indent=indent, width=width,
allow_unicode=allow_unicode, line_break=line_break,
block_seq_indent=block_seq_indent,
top_level_colon_align=top_level_colon_align,
prefix_colon=prefix_colon)
Serializer.__init__(self, encoding=encoding,
explicit_start=explicit_start,
explicit_end=explicit_end,
version=version, tags=tags)
RoundTripRepresenter.__init__(self, default_style=default_style,
default_flow_style=default_flow_style)
VersionedResolver.__init__(self)

File diff suppressed because it is too large Load Diff

View File

@@ -1,85 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
__all__ = ['Mark', 'YAMLError', 'MarkedYAMLError']
try:
from .compat import utf8
except (ImportError, ValueError): # for Jython
from ruamel.yaml.compat import utf8
class Mark(object):
def __init__(self, name, index, line, column, buffer, pointer):
self.name = name
self.index = index
self.line = line
self.column = column
self.buffer = buffer
self.pointer = pointer
def get_snippet(self, indent=4, max_length=75):
if self.buffer is None:
return None
head = ''
start = self.pointer
while (start > 0 and
self.buffer[start-1] not in u'\0\r\n\x85\u2028\u2029'):
start -= 1
if self.pointer-start > max_length/2-1:
head = ' ... '
start += 5
break
tail = ''
end = self.pointer
while (end < len(self.buffer) and
self.buffer[end] not in u'\0\r\n\x85\u2028\u2029'):
end += 1
if end-self.pointer > max_length/2-1:
tail = ' ... '
end -= 5
break
snippet = utf8(self.buffer[start:end])
return ' '*indent + head + snippet + tail + '\n' \
+ ' '*(indent+self.pointer-start+len(head)) + '^'
def __str__(self):
snippet = self.get_snippet()
where = " in \"%s\", line %d, column %d" \
% (self.name, self.line+1, self.column+1)
if snippet is not None:
where += ":\n"+snippet
return where
class YAMLError(Exception):
pass
class MarkedYAMLError(YAMLError):
def __init__(self, context=None, context_mark=None,
problem=None, problem_mark=None, note=None):
self.context = context
self.context_mark = context_mark
self.problem = problem
self.problem_mark = problem_mark
self.note = note
def __str__(self):
lines = []
if self.context is not None:
lines.append(self.context)
if self.context_mark is not None \
and (self.problem is None or self.problem_mark is None or
self.context_mark.name != self.problem_mark.name or
self.context_mark.line != self.problem_mark.line or
self.context_mark.column != self.problem_mark.column):
lines.append(str(self.context_mark))
if self.problem is not None:
lines.append(self.problem)
if self.problem_mark is not None:
lines.append(str(self.problem_mark))
if self.note is not None:
lines.append(self.note)
return '\n'.join(lines)

View File

@@ -1,106 +0,0 @@
# coding: utf-8
# Abstract classes.
def CommentCheck():
pass
class Event(object):
def __init__(self, start_mark=None, end_mark=None, comment=CommentCheck):
self.start_mark = start_mark
self.end_mark = end_mark
# assert comment is not CommentCheck
if comment is CommentCheck:
comment = None
self.comment = comment
def __repr__(self):
attributes = [key for key in ['anchor', 'tag', 'implicit', 'value',
'flow_style', 'style']
if hasattr(self, key)]
arguments = ', '.join(['%s=%r' % (key, getattr(self, key))
for key in attributes])
if self.comment not in [None, CommentCheck]:
arguments += ', comment={!r}'.format(self.comment)
return '%s(%s)' % (self.__class__.__name__, arguments)
class NodeEvent(Event):
def __init__(self, anchor, start_mark=None, end_mark=None, comment=None):
Event.__init__(self, start_mark, end_mark, comment)
self.anchor = anchor
class CollectionStartEvent(NodeEvent):
def __init__(self, anchor, tag, implicit, start_mark=None, end_mark=None,
flow_style=None, comment=None):
Event.__init__(self, start_mark, end_mark, comment)
self.anchor = anchor
self.tag = tag
self.implicit = implicit
self.flow_style = flow_style
class CollectionEndEvent(Event):
pass
# Implementations.
class StreamStartEvent(Event):
def __init__(self, start_mark=None, end_mark=None, encoding=None,
comment=None):
Event.__init__(self, start_mark, end_mark, comment)
self.encoding = encoding
class StreamEndEvent(Event):
pass
class DocumentStartEvent(Event):
def __init__(self, start_mark=None, end_mark=None,
explicit=None, version=None, tags=None, comment=None):
Event.__init__(self, start_mark, end_mark, comment)
self.explicit = explicit
self.version = version
self.tags = tags
class DocumentEndEvent(Event):
def __init__(self, start_mark=None, end_mark=None,
explicit=None, comment=None):
Event.__init__(self, start_mark, end_mark, comment)
self.explicit = explicit
class AliasEvent(NodeEvent):
pass
class ScalarEvent(NodeEvent):
def __init__(self, anchor, tag, implicit, value,
start_mark=None, end_mark=None, style=None, comment=None):
NodeEvent.__init__(self, anchor, start_mark, end_mark, comment)
self.tag = tag
self.implicit = implicit
self.value = value
self.style = style
class SequenceStartEvent(CollectionStartEvent):
pass
class SequenceEndEvent(CollectionEndEvent):
pass
class MappingStartEvent(CollectionStartEvent):
pass
class MappingEndEvent(CollectionEndEvent):
pass

View File

@@ -1,61 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
__all__ = ['BaseLoader', 'SafeLoader', 'Loader', 'RoundTripLoader']
try:
from .reader import * # NOQA
from .scanner import * # NOQA
from .parser import * # NOQA
from .composer import * # NOQA
from .constructor import * # NOQA
from .resolver import * # NOQA
except (ImportError, ValueError): # for Jython
from ruamel.yaml.reader import * # NOQA
from ruamel.yaml.scanner import * # NOQA
from ruamel.yaml.parser import * # NOQA
from ruamel.yaml.composer import * # NOQA
from ruamel.yaml.constructor import * # NOQA
from ruamel.yaml.resolver import * # NOQA
class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
def __init__(self, stream, version=None, preserve_quotes=None):
Reader.__init__(self, stream)
Scanner.__init__(self)
Parser.__init__(self)
Composer.__init__(self)
BaseConstructor.__init__(self)
BaseResolver.__init__(self)
class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
def __init__(self, stream, version=None, preserve_quotes=None):
Reader.__init__(self, stream)
Scanner.__init__(self)
Parser.__init__(self)
Composer.__init__(self)
SafeConstructor.__init__(self)
Resolver.__init__(self)
class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
def __init__(self, stream, version=None, preserve_quotes=None):
Reader.__init__(self, stream)
Scanner.__init__(self)
Parser.__init__(self)
Composer.__init__(self)
Constructor.__init__(self)
Resolver.__init__(self)
class RoundTripLoader(Reader, RoundTripScanner, RoundTripParser, Composer,
RoundTripConstructor, VersionedResolver):
def __init__(self, stream, version=None, preserve_quotes=None):
Reader.__init__(self, stream)
RoundTripScanner.__init__(self)
RoundTripParser.__init__(self)
Composer.__init__(self)
RoundTripConstructor.__init__(self, preserve_quotes=preserve_quotes)
VersionedResolver.__init__(self, version)

View File

@@ -1,395 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
from ruamel.yaml.error import * # NOQA
from ruamel.yaml.tokens import * # NOQA
from ruamel.yaml.events import * # NOQA
from ruamel.yaml.nodes import * # NOQA
from ruamel.yaml.loader import * # NOQA
from ruamel.yaml.dumper import * # NOQA
from ruamel.yaml.compat import StringIO, BytesIO, with_metaclass, PY3
# import io
def scan(stream, Loader=Loader):
"""
Scan a YAML stream and produce scanning tokens.
"""
loader = Loader(stream)
try:
while loader.check_token():
yield loader.get_token()
finally:
loader.dispose()
def parse(stream, Loader=Loader):
"""
Parse a YAML stream and produce parsing events.
"""
loader = Loader(stream)
try:
while loader.check_event():
yield loader.get_event()
finally:
loader.dispose()
def compose(stream, Loader=Loader):
"""
Parse the first YAML document in a stream
and produce the corresponding representation tree.
"""
loader = Loader(stream)
try:
return loader.get_single_node()
finally:
loader.dispose()
def compose_all(stream, Loader=Loader):
"""
Parse all YAML documents in a stream
and produce corresponding representation trees.
"""
loader = Loader(stream)
try:
while loader.check_node():
yield loader.get_node()
finally:
loader.dispose()
def load(stream, Loader=Loader, version=None, preserve_quotes=None):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
"""
loader = Loader(stream, version, preserve_quotes=preserve_quotes)
try:
return loader.get_single_data()
finally:
loader.dispose()
def load_all(stream, Loader=Loader, version=None):
"""
Parse all YAML documents in a stream
and produce corresponding Python objects.
"""
loader = Loader(stream, version)
try:
while loader.check_data():
yield loader.get_data()
finally:
loader.dispose()
def safe_load(stream, version=None):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags.
"""
return load(stream, SafeLoader, version)
def safe_load_all(stream, version=None):
"""
Parse all YAML documents in a stream
and produce corresponding Python objects.
Resolve only basic YAML tags.
"""
return load_all(stream, SafeLoader, version)
def round_trip_load(stream, version=None, preserve_quotes=None):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags.
"""
return load(stream, RoundTripLoader, version, preserve_quotes=preserve_quotes)
def round_trip_load_all(stream, version=None, preserve_quotes=None):
"""
Parse all YAML documents in a stream
and produce corresponding Python objects.
Resolve only basic YAML tags.
"""
return load_all(stream, RoundTripLoader, version, preserve_quotes=preserve_quotes)
def emit(events, stream=None, Dumper=Dumper,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None):
"""
Emit YAML parsing events into a stream.
If stream is None, return the produced string instead.
"""
getvalue = None
if stream is None:
stream = StringIO()
getvalue = stream.getvalue
dumper = Dumper(stream, canonical=canonical, indent=indent, width=width,
allow_unicode=allow_unicode, line_break=line_break)
try:
for event in events:
dumper.emit(event)
finally:
dumper.dispose()
if getvalue:
return getvalue()
enc = None if PY3 else 'utf-8'
def serialize_all(nodes, stream=None, Dumper=Dumper,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=enc, explicit_start=None, explicit_end=None,
version=None, tags=None):
"""
Serialize a sequence of representation trees into a YAML stream.
If stream is None, return the produced string instead.
"""
getvalue = None
if stream is None:
if encoding is None:
stream = StringIO()
else:
stream = BytesIO()
getvalue = stream.getvalue
dumper = Dumper(stream, canonical=canonical, indent=indent, width=width,
allow_unicode=allow_unicode, line_break=line_break,
encoding=encoding, version=version, tags=tags,
explicit_start=explicit_start, explicit_end=explicit_end)
try:
dumper.open()
for node in nodes:
dumper.serialize(node)
dumper.close()
finally:
dumper.dispose()
if getvalue:
return getvalue()
def serialize(node, stream=None, Dumper=Dumper, **kwds):
"""
Serialize a representation tree into a YAML stream.
If stream is None, return the produced string instead.
"""
return serialize_all([node], stream, Dumper=Dumper, **kwds)
def dump_all(documents, stream=None, Dumper=Dumper,
default_style=None, default_flow_style=None,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=enc, explicit_start=None, explicit_end=None,
version=None, tags=None, block_seq_indent=None,
top_level_colon_align=None, prefix_colon=None):
"""
Serialize a sequence of Python objects into a YAML stream.
If stream is None, return the produced string instead.
"""
getvalue = None
if top_level_colon_align is True:
top_level_colon_align = max([len(str(x)) for x in documents[0]])
if stream is None:
if encoding is None:
stream = StringIO()
else:
stream = BytesIO()
getvalue = stream.getvalue
dumper = Dumper(stream, default_style=default_style,
default_flow_style=default_flow_style,
canonical=canonical, indent=indent, width=width,
allow_unicode=allow_unicode, line_break=line_break,
encoding=encoding, explicit_start=explicit_start,
explicit_end=explicit_end, version=version,
tags=tags, block_seq_indent=block_seq_indent,
top_level_colon_align=top_level_colon_align, prefix_colon=prefix_colon,
)
try:
dumper.open()
for data in documents:
dumper.represent(data)
dumper.close()
finally:
dumper.dispose()
if getvalue:
return getvalue()
def dump(data, stream=None, Dumper=Dumper,
default_style=None, default_flow_style=None,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=enc, explicit_start=None, explicit_end=None,
version=None, tags=None, block_seq_indent=None):
"""
Serialize a Python object into a YAML stream.
If stream is None, return the produced string instead.
default_style None, '', '"', "'", '|', '>'
"""
return dump_all([data], stream, Dumper=Dumper,
default_style=default_style,
default_flow_style=default_flow_style,
canonical=canonical,
indent=indent, width=width,
allow_unicode=allow_unicode,
line_break=line_break,
encoding=encoding, explicit_start=explicit_start,
explicit_end=explicit_end,
version=version, tags=tags, block_seq_indent=block_seq_indent)
def safe_dump_all(documents, stream=None, **kwds):
"""
Serialize a sequence of Python objects into a YAML stream.
Produce only basic YAML tags.
If stream is None, return the produced string instead.
"""
return dump_all(documents, stream, Dumper=SafeDumper, **kwds)
def safe_dump(data, stream=None, **kwds):
"""
Serialize a Python object into a YAML stream.
Produce only basic YAML tags.
If stream is None, return the produced string instead.
"""
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
def round_trip_dump(data, stream=None, Dumper=RoundTripDumper,
default_style=None, default_flow_style=None,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None,
encoding=enc, explicit_start=None, explicit_end=None,
version=None, tags=None, block_seq_indent=None,
top_level_colon_align=None, prefix_colon=None):
allow_unicode = True if allow_unicode is None else allow_unicode
return dump_all([data], stream, Dumper=Dumper,
default_style=default_style,
default_flow_style=default_flow_style,
canonical=canonical,
indent=indent, width=width,
allow_unicode=allow_unicode,
line_break=line_break,
encoding=encoding, explicit_start=explicit_start,
explicit_end=explicit_end,
version=version, tags=tags, block_seq_indent=block_seq_indent,
top_level_colon_align=top_level_colon_align, prefix_colon=prefix_colon)
def add_implicit_resolver(tag, regexp, first=None,
Loader=Loader, Dumper=Dumper):
"""
Add an implicit scalar detector.
If an implicit scalar value matches the given regexp,
the corresponding tag is assigned to the scalar.
first is a sequence of possible initial characters or None.
"""
Loader.add_implicit_resolver(tag, regexp, first)
Dumper.add_implicit_resolver(tag, regexp, first)
def add_path_resolver(tag, path, kind=None, Loader=Loader, Dumper=Dumper):
"""
Add a path based resolver for the given tag.
A path is a list of keys that forms a path
to a node in the representation tree.
Keys can be string values, integers, or None.
"""
Loader.add_path_resolver(tag, path, kind)
Dumper.add_path_resolver(tag, path, kind)
def add_constructor(tag, constructor, Loader=Loader):
"""
Add a constructor for the given tag.
Constructor is a function that accepts a Loader instance
and a node object and produces the corresponding Python object.
"""
Loader.add_constructor(tag, constructor)
def add_multi_constructor(tag_prefix, multi_constructor, Loader=Loader):
"""
Add a multi-constructor for the given tag prefix.
Multi-constructor is called for a node if its tag starts with tag_prefix.
Multi-constructor accepts a Loader instance, a tag suffix,
and a node object and produces the corresponding Python object.
"""
Loader.add_multi_constructor(tag_prefix, multi_constructor)
def add_representer(data_type, representer, Dumper=Dumper):
"""
Add a representer for the given type.
Representer is a function accepting a Dumper instance
and an instance of the given data type
and producing the corresponding representation node.
"""
Dumper.add_representer(data_type, representer)
def add_multi_representer(data_type, multi_representer, Dumper=Dumper):
"""
Add a representer for the given type.
Multi-representer is a function accepting a Dumper instance
and an instance of the given data type or subtype
and producing the corresponding representation node.
"""
Dumper.add_multi_representer(data_type, multi_representer)
class YAMLObjectMetaclass(type):
"""
The metaclass for YAMLObject.
"""
def __init__(cls, name, bases, kwds):
super(YAMLObjectMetaclass, cls).__init__(name, bases, kwds)
if 'yaml_tag' in kwds and kwds['yaml_tag'] is not None:
cls.yaml_loader.add_constructor(cls.yaml_tag, cls.from_yaml)
cls.yaml_dumper.add_representer(cls, cls.to_yaml)
class YAMLObject(with_metaclass(YAMLObjectMetaclass)):
"""
An object that can dump itself to a YAML stream
and load itself from a YAML stream.
"""
__slots__ = () # no direct instantiation, so allow immutable subclasses
yaml_loader = Loader
yaml_dumper = Dumper
yaml_tag = None
yaml_flow_style = None
@classmethod
def from_yaml(cls, loader, node):
"""
Convert a representation node to a Python object.
"""
return loader.construct_yaml_object(node, cls)
@classmethod
def to_yaml(cls, dumper, data):
"""
Convert a Python object to a representation node.
"""
return dumper.represent_yaml_object(cls.yaml_tag, data, cls,
flow_style=cls.yaml_flow_style)

View File

@@ -1,86 +0,0 @@
# coding: utf-8
from __future__ import print_function
class Node(object):
def __init__(self, tag, value, start_mark, end_mark, comment=None):
self.tag = tag
self.value = value
self.start_mark = start_mark
self.end_mark = end_mark
self.comment = comment
self.anchor = None
def __repr__(self):
value = self.value
# if isinstance(value, list):
# if len(value) == 0:
# value = '<empty>'
# elif len(value) == 1:
# value = '<1 item>'
# else:
# value = '<%d items>' % len(value)
# else:
# if len(value) > 75:
# value = repr(value[:70]+u' ... ')
# else:
# value = repr(value)
value = repr(value)
return '%s(tag=%r, value=%s)' % (self.__class__.__name__,
self.tag, value)
def dump(self, indent=0):
if isinstance(self.value, basestring):
print('{0}{1}(tag={!r}, value={!r})'.format(
' ' * indent, self.__class__.__name__, self.tag, self.value))
if self.comment:
print(' {0}comment: {1})'.format(
' ' * indent, self.comment))
return
print('{0}{1}(tag={!r})'.format(
' ' * indent, self.__class__.__name__, self.tag))
if self.comment:
print(' {0}comment: {1})'.format(
' ' * indent, self.comment))
for v in self.value:
if isinstance(v, tuple):
for v1 in v:
v1.dump(indent+1)
elif isinstance(v, Node):
v.dump(indent+1)
else:
print('Node value type?', type(v))
class ScalarNode(Node):
"""
styles:
? -> set() ? key, no value
" -> double quoted
' -> single quoted
| -> literal style
> ->
"""
id = 'scalar'
def __init__(self, tag, value, start_mark=None, end_mark=None, style=None,
comment=None):
Node.__init__(self, tag, value, start_mark, end_mark, comment=comment)
self.style = style
class CollectionNode(Node):
def __init__(self, tag, value, start_mark=None, end_mark=None,
flow_style=None, comment=None, anchor=None):
Node.__init__(self, tag, value, start_mark, end_mark, comment=comment)
self.flow_style = flow_style
self.anchor = anchor
class SequenceNode(CollectionNode):
id = 'sequence'
class MappingNode(CollectionNode):
id = 'mapping'

View File

@@ -1,675 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
# The following YAML grammar is LL(1) and is parsed by a recursive descent
# parser.
#
# stream ::= STREAM-START implicit_document? explicit_document*
# STREAM-END
# implicit_document ::= block_node DOCUMENT-END*
# explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
# block_node_or_indentless_sequence ::=
# ALIAS
# | properties (block_content |
# indentless_block_sequence)?
# | block_content
# | indentless_block_sequence
# block_node ::= ALIAS
# | properties block_content?
# | block_content
# flow_node ::= ALIAS
# | properties flow_content?
# | flow_content
# properties ::= TAG ANCHOR? | ANCHOR TAG?
# block_content ::= block_collection | flow_collection | SCALAR
# flow_content ::= flow_collection | SCALAR
# block_collection ::= block_sequence | block_mapping
# flow_collection ::= flow_sequence | flow_mapping
# block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)*
# BLOCK-END
# indentless_sequence ::= (BLOCK-ENTRY block_node?)+
# block_mapping ::= BLOCK-MAPPING_START
# ((KEY block_node_or_indentless_sequence?)?
# (VALUE block_node_or_indentless_sequence?)?)*
# BLOCK-END
# flow_sequence ::= FLOW-SEQUENCE-START
# (flow_sequence_entry FLOW-ENTRY)*
# flow_sequence_entry?
# FLOW-SEQUENCE-END
# flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
# flow_mapping ::= FLOW-MAPPING-START
# (flow_mapping_entry FLOW-ENTRY)*
# flow_mapping_entry?
# FLOW-MAPPING-END
# flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
#
# FIRST sets:
#
# stream: { STREAM-START }
# explicit_document: { DIRECTIVE DOCUMENT-START }
# implicit_document: FIRST(block_node)
# block_node: { ALIAS TAG ANCHOR SCALAR BLOCK-SEQUENCE-START
# BLOCK-MAPPING-START FLOW-SEQUENCE-START FLOW-MAPPING-START }
# flow_node: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START FLOW-MAPPING-START }
# block_content: { BLOCK-SEQUENCE-START BLOCK-MAPPING-START
# FLOW-SEQUENCE-START FLOW-MAPPING-START SCALAR }
# flow_content: { FLOW-SEQUENCE-START FLOW-MAPPING-START SCALAR }
# block_collection: { BLOCK-SEQUENCE-START BLOCK-MAPPING-START }
# flow_collection: { FLOW-SEQUENCE-START FLOW-MAPPING-START }
# block_sequence: { BLOCK-SEQUENCE-START }
# block_mapping: { BLOCK-MAPPING-START }
# block_node_or_indentless_sequence: { ALIAS ANCHOR TAG SCALAR
# BLOCK-SEQUENCE-START BLOCK-MAPPING-START FLOW-SEQUENCE-START
# FLOW-MAPPING-START BLOCK-ENTRY }
# indentless_sequence: { ENTRY }
# flow_collection: { FLOW-SEQUENCE-START FLOW-MAPPING-START }
# flow_sequence: { FLOW-SEQUENCE-START }
# flow_mapping: { FLOW-MAPPING-START }
# flow_sequence_entry: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START
# FLOW-MAPPING-START KEY }
# flow_mapping_entry: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START
# FLOW-MAPPING-START KEY }
__all__ = ['Parser', 'RoundTripParser', 'ParserError']
# need to have full path, as pkg_resources tries to load parser.py in __init__.py
# only to not do anything with the package afterwards
# and for Jython too
from ruamel.yaml.error import MarkedYAMLError # NOQA
from ruamel.yaml.tokens import * # NOQA
from ruamel.yaml.events import * # NOQA
from ruamel.yaml.scanner import * # NOQA
from ruamel.yaml.compat import utf8 # NOQA
class ParserError(MarkedYAMLError):
pass
class Parser(object):
# Since writing a recursive-descendant parser is a straightforward task, we
# do not give many comments here.
DEFAULT_TAGS = {
u'!': u'!',
u'!!': u'tag:yaml.org,2002:',
}
def __init__(self):
self.current_event = None
self.yaml_version = None
self.tag_handles = {}
self.states = []
self.marks = []
self.state = self.parse_stream_start
def dispose(self):
# Reset the state attributes (to clear self-references)
self.states = []
self.state = None
def check_event(self, *choices):
# Check the type of the next event.
if self.current_event is None:
if self.state:
self.current_event = self.state()
if self.current_event is not None:
if not choices:
return True
for choice in choices:
if isinstance(self.current_event, choice):
return True
return False
def peek_event(self):
# Get the next event.
if self.current_event is None:
if self.state:
self.current_event = self.state()
return self.current_event
def get_event(self):
# Get the next event and proceed further.
if self.current_event is None:
if self.state:
self.current_event = self.state()
value = self.current_event
self.current_event = None
return value
# stream ::= STREAM-START implicit_document? explicit_document*
# STREAM-END
# implicit_document ::= block_node DOCUMENT-END*
# explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
def parse_stream_start(self):
# Parse the stream start.
token = self.get_token()
token.move_comment(self.peek_token())
event = StreamStartEvent(token.start_mark, token.end_mark,
encoding=token.encoding)
# Prepare the next state.
self.state = self.parse_implicit_document_start
return event
def parse_implicit_document_start(self):
# Parse an implicit document.
if not self.check_token(DirectiveToken, DocumentStartToken,
StreamEndToken):
self.tag_handles = self.DEFAULT_TAGS
token = self.peek_token()
start_mark = end_mark = token.start_mark
event = DocumentStartEvent(start_mark, end_mark,
explicit=False)
# Prepare the next state.
self.states.append(self.parse_document_end)
self.state = self.parse_block_node
return event
else:
return self.parse_document_start()
def parse_document_start(self):
# Parse any extra document end indicators.
while self.check_token(DocumentEndToken):
self.get_token()
# Parse an explicit document.
if not self.check_token(StreamEndToken):
token = self.peek_token()
start_mark = token.start_mark
version, tags = self.process_directives()
if not self.check_token(DocumentStartToken):
raise ParserError(None, None,
"expected '<document start>', but found %r"
% self.peek_token().id,
self.peek_token().start_mark)
token = self.get_token()
end_mark = token.end_mark
event = DocumentStartEvent(
start_mark, end_mark,
explicit=True, version=version, tags=tags)
self.states.append(self.parse_document_end)
self.state = self.parse_document_content
else:
# Parse the end of the stream.
token = self.get_token()
event = StreamEndEvent(token.start_mark, token.end_mark,
comment=token.comment)
assert not self.states
assert not self.marks
self.state = None
return event
def parse_document_end(self):
# Parse the document end.
token = self.peek_token()
start_mark = end_mark = token.start_mark
explicit = False
if self.check_token(DocumentEndToken):
token = self.get_token()
end_mark = token.end_mark
explicit = True
event = DocumentEndEvent(start_mark, end_mark, explicit=explicit)
# Prepare the next state.
self.state = self.parse_document_start
return event
def parse_document_content(self):
if self.check_token(
DirectiveToken,
DocumentStartToken, DocumentEndToken, StreamEndToken):
event = self.process_empty_scalar(self.peek_token().start_mark)
self.state = self.states.pop()
return event
else:
return self.parse_block_node()
def process_directives(self):
self.yaml_version = None
self.tag_handles = {}
while self.check_token(DirectiveToken):
token = self.get_token()
if token.name == u'YAML':
if self.yaml_version is not None:
raise ParserError(
None, None,
"found duplicate YAML directive", token.start_mark)
major, minor = token.value
if major != 1:
raise ParserError(
None, None,
"found incompatible YAML document (version 1.* is "
"required)",
token.start_mark)
self.yaml_version = token.value
elif token.name == u'TAG':
handle, prefix = token.value
if handle in self.tag_handles:
raise ParserError(None, None,
"duplicate tag handle %r" % utf8(handle),
token.start_mark)
self.tag_handles[handle] = prefix
if self.tag_handles:
value = self.yaml_version, self.tag_handles.copy()
else:
value = self.yaml_version, None
for key in self.DEFAULT_TAGS:
if key not in self.tag_handles:
self.tag_handles[key] = self.DEFAULT_TAGS[key]
return value
# block_node_or_indentless_sequence ::= ALIAS
# | properties (block_content | indentless_block_sequence)?
# | block_content
# | indentless_block_sequence
# block_node ::= ALIAS
# | properties block_content?
# | block_content
# flow_node ::= ALIAS
# | properties flow_content?
# | flow_content
# properties ::= TAG ANCHOR? | ANCHOR TAG?
# block_content ::= block_collection | flow_collection | SCALAR
# flow_content ::= flow_collection | SCALAR
# block_collection ::= block_sequence | block_mapping
# flow_collection ::= flow_sequence | flow_mapping
def parse_block_node(self):
return self.parse_node(block=True)
def parse_flow_node(self):
return self.parse_node()
def parse_block_node_or_indentless_sequence(self):
return self.parse_node(block=True, indentless_sequence=True)
def transform_tag(self, handle, suffix):
return self.tag_handles[handle] + suffix
def parse_node(self, block=False, indentless_sequence=False):
if self.check_token(AliasToken):
token = self.get_token()
event = AliasEvent(token.value, token.start_mark, token.end_mark)
self.state = self.states.pop()
else:
anchor = None
tag = None
start_mark = end_mark = tag_mark = None
if self.check_token(AnchorToken):
token = self.get_token()
start_mark = token.start_mark
end_mark = token.end_mark
anchor = token.value
if self.check_token(TagToken):
token = self.get_token()
tag_mark = token.start_mark
end_mark = token.end_mark
tag = token.value
elif self.check_token(TagToken):
token = self.get_token()
start_mark = tag_mark = token.start_mark
end_mark = token.end_mark
tag = token.value
if self.check_token(AnchorToken):
token = self.get_token()
end_mark = token.end_mark
anchor = token.value
if tag is not None:
handle, suffix = tag
if handle is not None:
if handle not in self.tag_handles:
raise ParserError(
"while parsing a node", start_mark,
"found undefined tag handle %r" % utf8(handle),
tag_mark)
tag = self.transform_tag(handle, suffix)
else:
tag = suffix
# if tag == u'!':
# raise ParserError("while parsing a node", start_mark,
# "found non-specific tag '!'", tag_mark,
# "Please check 'http://pyyaml.org/wiki/YAMLNonSpecificTag'
# and share your opinion.")
if start_mark is None:
start_mark = end_mark = self.peek_token().start_mark
event = None
implicit = (tag is None or tag == u'!')
if indentless_sequence and self.check_token(BlockEntryToken):
end_mark = self.peek_token().end_mark
event = SequenceStartEvent(anchor, tag, implicit,
start_mark, end_mark)
self.state = self.parse_indentless_sequence_entry
else:
if self.check_token(ScalarToken):
token = self.get_token()
end_mark = token.end_mark
if (token.plain and tag is None) or tag == u'!':
implicit = (True, False)
elif tag is None:
implicit = (False, True)
else:
implicit = (False, False)
event = ScalarEvent(
anchor, tag, implicit, token.value,
start_mark, end_mark, style=token.style,
comment=token.comment
)
self.state = self.states.pop()
elif self.check_token(FlowSequenceStartToken):
end_mark = self.peek_token().end_mark
event = SequenceStartEvent(
anchor, tag, implicit,
start_mark, end_mark, flow_style=True)
self.state = self.parse_flow_sequence_first_entry
elif self.check_token(FlowMappingStartToken):
end_mark = self.peek_token().end_mark
event = MappingStartEvent(
anchor, tag, implicit,
start_mark, end_mark, flow_style=True)
self.state = self.parse_flow_mapping_first_key
elif block and self.check_token(BlockSequenceStartToken):
end_mark = self.peek_token().start_mark
# should inserting the comment be dependent on the
# indentation?
pt = self.peek_token()
comment = pt.comment
# print('pt0', type(pt))
if comment is None or comment[1] is None:
comment = pt.split_comment()
# print('pt1', comment)
event = SequenceStartEvent(
anchor, tag, implicit, start_mark, end_mark,
flow_style=False,
comment=comment,
)
self.state = self.parse_block_sequence_first_entry
elif block and self.check_token(BlockMappingStartToken):
end_mark = self.peek_token().start_mark
comment = self.peek_token().comment
event = MappingStartEvent(
anchor, tag, implicit, start_mark, end_mark,
flow_style=False, comment=comment)
self.state = self.parse_block_mapping_first_key
elif anchor is not None or tag is not None:
# Empty scalars are allowed even if a tag or an anchor is
# specified.
event = ScalarEvent(anchor, tag, (implicit, False), u'',
start_mark, end_mark)
self.state = self.states.pop()
else:
if block:
node = 'block'
else:
node = 'flow'
token = self.peek_token()
raise ParserError(
"while parsing a %s node" % node, start_mark,
"expected the node content, but found %r" % token.id,
token.start_mark)
return event
# block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)*
# BLOCK-END
def parse_block_sequence_first_entry(self):
token = self.get_token()
# move any comment from start token
# token.move_comment(self.peek_token())
self.marks.append(token.start_mark)
return self.parse_block_sequence_entry()
def parse_block_sequence_entry(self):
if self.check_token(BlockEntryToken):
token = self.get_token()
token.move_comment(self.peek_token())
if not self.check_token(BlockEntryToken, BlockEndToken):
self.states.append(self.parse_block_sequence_entry)
return self.parse_block_node()
else:
self.state = self.parse_block_sequence_entry
return self.process_empty_scalar(token.end_mark)
if not self.check_token(BlockEndToken):
token = self.peek_token()
raise ParserError(
"while parsing a block collection", self.marks[-1],
"expected <block end>, but found %r" %
token.id, token.start_mark)
token = self.get_token() # BlockEndToken
event = SequenceEndEvent(token.start_mark, token.end_mark,
comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
# indentless_sequence ::= (BLOCK-ENTRY block_node?)+
# indentless_sequence?
# sequence:
# - entry
# - nested
def parse_indentless_sequence_entry(self):
if self.check_token(BlockEntryToken):
token = self.get_token()
token.move_comment(self.peek_token())
if not self.check_token(BlockEntryToken,
KeyToken, ValueToken, BlockEndToken):
self.states.append(self.parse_indentless_sequence_entry)
return self.parse_block_node()
else:
self.state = self.parse_indentless_sequence_entry
return self.process_empty_scalar(token.end_mark)
token = self.peek_token()
event = SequenceEndEvent(token.start_mark, token.start_mark,
comment=token.comment)
self.state = self.states.pop()
return event
# block_mapping ::= BLOCK-MAPPING_START
# ((KEY block_node_or_indentless_sequence?)?
# (VALUE block_node_or_indentless_sequence?)?)*
# BLOCK-END
def parse_block_mapping_first_key(self):
token = self.get_token()
self.marks.append(token.start_mark)
return self.parse_block_mapping_key()
def parse_block_mapping_key(self):
if self.check_token(KeyToken):
token = self.get_token()
token.move_comment(self.peek_token())
if not self.check_token(KeyToken, ValueToken, BlockEndToken):
self.states.append(self.parse_block_mapping_value)
return self.parse_block_node_or_indentless_sequence()
else:
self.state = self.parse_block_mapping_value
return self.process_empty_scalar(token.end_mark)
if not self.check_token(BlockEndToken):
token = self.peek_token()
raise ParserError(
"while parsing a block mapping", self.marks[-1],
"expected <block end>, but found %r" % token.id,
token.start_mark)
token = self.get_token()
token.move_comment(self.peek_token())
event = MappingEndEvent(token.start_mark, token.end_mark,
comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
def parse_block_mapping_value(self):
if self.check_token(ValueToken):
token = self.get_token()
# value token might have post comment move it to e.g. block
token.move_comment(self.peek_token())
if not self.check_token(KeyToken, ValueToken, BlockEndToken):
self.states.append(self.parse_block_mapping_key)
return self.parse_block_node_or_indentless_sequence()
else:
self.state = self.parse_block_mapping_key
return self.process_empty_scalar(token.end_mark)
else:
self.state = self.parse_block_mapping_key
token = self.peek_token()
return self.process_empty_scalar(token.start_mark)
# flow_sequence ::= FLOW-SEQUENCE-START
# (flow_sequence_entry FLOW-ENTRY)*
# flow_sequence_entry?
# FLOW-SEQUENCE-END
# flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
#
# Note that while production rules for both flow_sequence_entry and
# flow_mapping_entry are equal, their interpretations are different.
# For `flow_sequence_entry`, the part `KEY flow_node? (VALUE flow_node?)?`
# generate an inline mapping (set syntax).
def parse_flow_sequence_first_entry(self):
token = self.get_token()
self.marks.append(token.start_mark)
return self.parse_flow_sequence_entry(first=True)
def parse_flow_sequence_entry(self, first=False):
if not self.check_token(FlowSequenceEndToken):
if not first:
if self.check_token(FlowEntryToken):
self.get_token()
else:
token = self.peek_token()
raise ParserError(
"while parsing a flow sequence", self.marks[-1],
"expected ',' or ']', but got %r" % token.id,
token.start_mark)
if self.check_token(KeyToken):
token = self.peek_token()
event = MappingStartEvent(None, None, True,
token.start_mark, token.end_mark,
flow_style=True)
self.state = self.parse_flow_sequence_entry_mapping_key
return event
elif not self.check_token(FlowSequenceEndToken):
self.states.append(self.parse_flow_sequence_entry)
return self.parse_flow_node()
token = self.get_token()
event = SequenceEndEvent(token.start_mark, token.end_mark,
comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
def parse_flow_sequence_entry_mapping_key(self):
token = self.get_token()
if not self.check_token(ValueToken,
FlowEntryToken, FlowSequenceEndToken):
self.states.append(self.parse_flow_sequence_entry_mapping_value)
return self.parse_flow_node()
else:
self.state = self.parse_flow_sequence_entry_mapping_value
return self.process_empty_scalar(token.end_mark)
def parse_flow_sequence_entry_mapping_value(self):
if self.check_token(ValueToken):
token = self.get_token()
if not self.check_token(FlowEntryToken, FlowSequenceEndToken):
self.states.append(self.parse_flow_sequence_entry_mapping_end)
return self.parse_flow_node()
else:
self.state = self.parse_flow_sequence_entry_mapping_end
return self.process_empty_scalar(token.end_mark)
else:
self.state = self.parse_flow_sequence_entry_mapping_end
token = self.peek_token()
return self.process_empty_scalar(token.start_mark)
def parse_flow_sequence_entry_mapping_end(self):
self.state = self.parse_flow_sequence_entry
token = self.peek_token()
return MappingEndEvent(token.start_mark, token.start_mark)
# flow_mapping ::= FLOW-MAPPING-START
# (flow_mapping_entry FLOW-ENTRY)*
# flow_mapping_entry?
# FLOW-MAPPING-END
# flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
def parse_flow_mapping_first_key(self):
token = self.get_token()
self.marks.append(token.start_mark)
return self.parse_flow_mapping_key(first=True)
def parse_flow_mapping_key(self, first=False):
if not self.check_token(FlowMappingEndToken):
if not first:
if self.check_token(FlowEntryToken):
self.get_token()
else:
token = self.peek_token()
raise ParserError(
"while parsing a flow mapping", self.marks[-1],
"expected ',' or '}', but got %r" % token.id,
token.start_mark)
if self.check_token(KeyToken):
token = self.get_token()
if not self.check_token(ValueToken,
FlowEntryToken, FlowMappingEndToken):
self.states.append(self.parse_flow_mapping_value)
return self.parse_flow_node()
else:
self.state = self.parse_flow_mapping_value
return self.process_empty_scalar(token.end_mark)
elif not self.check_token(FlowMappingEndToken):
self.states.append(self.parse_flow_mapping_empty_value)
return self.parse_flow_node()
token = self.get_token()
event = MappingEndEvent(token.start_mark, token.end_mark,
comment=token.comment)
self.state = self.states.pop()
self.marks.pop()
return event
def parse_flow_mapping_value(self):
if self.check_token(ValueToken):
token = self.get_token()
if not self.check_token(FlowEntryToken, FlowMappingEndToken):
self.states.append(self.parse_flow_mapping_key)
return self.parse_flow_node()
else:
self.state = self.parse_flow_mapping_key
return self.process_empty_scalar(token.end_mark)
else:
self.state = self.parse_flow_mapping_key
token = self.peek_token()
return self.process_empty_scalar(token.start_mark)
def parse_flow_mapping_empty_value(self):
self.state = self.parse_flow_mapping_key
return self.process_empty_scalar(self.peek_token().start_mark)
def process_empty_scalar(self, mark):
return ScalarEvent(None, None, (True, False), u'', mark, mark)
class RoundTripParser(Parser):
"""roundtrip is a safe loader, that wants to see the unmangled tag"""
def transform_tag(self, handle, suffix):
# return self.tag_handles[handle]+suffix
if handle == '!!' and suffix in (u'null', u'bool', u'int', u'float', u'binary',
u'timestamp', u'omap', u'pairs', u'set', u'str',
u'seq', u'map'):
return Parser.transform_tag(self, handle, suffix)
return handle+suffix

View File

@@ -1,213 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
# This module contains abstractions for the input stream. You don't have to
# looks further, there are no pretty code.
#
# We define two classes here.
#
# Mark(source, line, column)
# It's just a record and its only use is producing nice error messages.
# Parser does not use it for any other purposes.
#
# Reader(source, data)
# Reader determines the encoding of `data` and converts it to unicode.
# Reader provides the following methods and attributes:
# reader.peek(length=1) - return the next `length` characters
# reader.forward(length=1) - move the current position to `length`
# characters.
# reader.index - the number of the current character.
# reader.line, stream.column - the line and the column of the current
# character.
import codecs
import re
try:
from .error import YAMLError, Mark
from .compat import text_type, binary_type, PY3
except (ImportError, ValueError): # for Jython
from ruamel.yaml.error import YAMLError, Mark
from ruamel.yaml.compat import text_type, binary_type, PY3
__all__ = ['Reader', 'ReaderError']
class ReaderError(YAMLError):
def __init__(self, name, position, character, encoding, reason):
self.name = name
self.character = character
self.position = position
self.encoding = encoding
self.reason = reason
def __str__(self):
if isinstance(self.character, binary_type):
return "'%s' codec can't decode byte #x%02x: %s\n" \
" in \"%s\", position %d" \
% (self.encoding, ord(self.character), self.reason,
self.name, self.position)
else:
return "unacceptable character #x%04x: %s\n" \
" in \"%s\", position %d" \
% (self.character, self.reason,
self.name, self.position)
class Reader(object):
# Reader:
# - determines the data encoding and converts it to a unicode string,
# - checks if characters are in allowed range,
# - adds '\0' to the end.
# Reader accepts
# - a `str` object (PY2) / a `bytes` object (PY3),
# - a `unicode` object (PY2) / a `str` object (PY3),
# - a file-like object with its `read` method returning `str`,
# - a file-like object with its `read` method returning `unicode`.
# Yeah, it's ugly and slow.
def __init__(self, stream):
self.name = None
self.stream = None
self.stream_pointer = 0
self.eof = True
self.buffer = u''
self.pointer = 0
self.raw_buffer = None
self.raw_decode = None
self.encoding = None
self.index = 0
self.line = 0
self.column = 0
if isinstance(stream, text_type):
self.name = "<unicode string>"
self.check_printable(stream)
self.buffer = stream+u'\0'
elif isinstance(stream, binary_type):
self.name = "<byte string>"
self.raw_buffer = stream
self.determine_encoding()
else:
self.stream = stream
self.name = getattr(stream, 'name', "<file>")
self.eof = False
self.raw_buffer = None
self.determine_encoding()
def peek(self, index=0):
try:
return self.buffer[self.pointer+index]
except IndexError:
self.update(index+1)
return self.buffer[self.pointer+index]
def prefix(self, length=1):
if self.pointer+length >= len(self.buffer):
self.update(length)
return self.buffer[self.pointer:self.pointer+length]
def forward(self, length=1):
if self.pointer+length+1 >= len(self.buffer):
self.update(length+1)
while length:
ch = self.buffer[self.pointer]
self.pointer += 1
self.index += 1
if ch in u'\n\x85\u2028\u2029' \
or (ch == u'\r' and self.buffer[self.pointer] != u'\n'):
self.line += 1
self.column = 0
elif ch != u'\uFEFF':
self.column += 1
length -= 1
def get_mark(self):
if self.stream is None:
return Mark(self.name, self.index, self.line, self.column,
self.buffer, self.pointer)
else:
return Mark(self.name, self.index, self.line, self.column,
None, None)
def determine_encoding(self):
while not self.eof and (self.raw_buffer is None or
len(self.raw_buffer) < 2):
self.update_raw()
if isinstance(self.raw_buffer, binary_type):
if self.raw_buffer.startswith(codecs.BOM_UTF16_LE):
self.raw_decode = codecs.utf_16_le_decode
self.encoding = 'utf-16-le'
elif self.raw_buffer.startswith(codecs.BOM_UTF16_BE):
self.raw_decode = codecs.utf_16_be_decode
self.encoding = 'utf-16-be'
else:
self.raw_decode = codecs.utf_8_decode
self.encoding = 'utf-8'
self.update(1)
NON_PRINTABLE = re.compile(
u'[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD]')
def check_printable(self, data):
match = self.NON_PRINTABLE.search(data)
if match:
character = match.group()
position = self.index+(len(self.buffer)-self.pointer)+match.start()
raise ReaderError(self.name, position, ord(character),
'unicode', "special characters are not allowed")
def update(self, length):
if self.raw_buffer is None:
return
self.buffer = self.buffer[self.pointer:]
self.pointer = 0
while len(self.buffer) < length:
if not self.eof:
self.update_raw()
if self.raw_decode is not None:
try:
data, converted = self.raw_decode(self.raw_buffer,
'strict', self.eof)
except UnicodeDecodeError as exc:
if PY3:
character = self.raw_buffer[exc.start]
else:
character = exc.object[exc.start]
if self.stream is not None:
position = self.stream_pointer - \
len(self.raw_buffer) + exc.start
else:
position = exc.start
raise ReaderError(self.name, position, character,
exc.encoding, exc.reason)
else:
data = self.raw_buffer
converted = len(data)
self.check_printable(data)
self.buffer += data
self.raw_buffer = self.raw_buffer[converted:]
if self.eof:
self.buffer += u'\0'
self.raw_buffer = None
break
def update_raw(self, size=None):
if size is None:
size = 4096 if PY3 else 1024
data = self.stream.read(size)
if self.raw_buffer is None:
self.raw_buffer = data
else:
self.raw_buffer += data
self.stream_pointer += len(data)
if not data:
self.eof = True
# try:
# import psyco
# psyco.bind(Reader)
# except ImportError:
# pass

View File

@@ -1,888 +0,0 @@
# coding: utf-8
from __future__ import absolute_import
from __future__ import print_function
try:
from .error import * # NOQA
from .nodes import * # NOQA
from .compat import text_type, binary_type, to_unicode, PY2, PY3, ordereddict
from .scalarstring import * # NOQA
except (ImportError, ValueError): # for Jython
from ruamel.yaml.error import * # NOQA
from ruamel.yaml.nodes import * # NOQA
from ruamel.yaml.compat import text_type, binary_type, to_unicode, PY2, PY3, ordereddict
from ruamel.yaml.scalarstring import * # NOQA
import datetime
import sys
import types
if PY3:
import copyreg
import base64
else:
import copy_reg as copyreg
__all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer',
'RepresenterError', 'RoundTripRepresenter']
class RepresenterError(YAMLError):
pass
class BaseRepresenter(object):
yaml_representers = {}
yaml_multi_representers = {}
def __init__(self, default_style=None, default_flow_style=None):
self.default_style = default_style
self.default_flow_style = default_flow_style
self.represented_objects = {}
self.object_keeper = []
self.alias_key = None
def represent(self, data):
node = self.represent_data(data)
self.serialize(node)
self.represented_objects = {}
self.object_keeper = []
self.alias_key = None
if PY2:
def get_classobj_bases(self, cls):
bases = [cls]
for base in cls.__bases__:
bases.extend(self.get_classobj_bases(base))
return bases
def represent_data(self, data):
if self.ignore_aliases(data):
self.alias_key = None
else:
self.alias_key = id(data)
if self.alias_key is not None:
if self.alias_key in self.represented_objects:
node = self.represented_objects[self.alias_key]
# if node is None:
# raise RepresenterError(
# "recursive objects are not allowed: %r" % data)
return node
# self.represented_objects[alias_key] = None
self.object_keeper.append(data)
data_types = type(data).__mro__
if PY2:
# if type(data) is types.InstanceType:
if isinstance(data, types.InstanceType):
data_types = self.get_classobj_bases(data.__class__) + \
list(data_types)
if data_types[0] in self.yaml_representers:
node = self.yaml_representers[data_types[0]](self, data)
else:
for data_type in data_types:
if data_type in self.yaml_multi_representers:
node = self.yaml_multi_representers[data_type](self, data)
break
else:
if None in self.yaml_multi_representers:
node = self.yaml_multi_representers[None](self, data)
elif None in self.yaml_representers:
node = self.yaml_representers[None](self, data)
else:
node = ScalarNode(None, text_type(data))
# if alias_key is not None:
# self.represented_objects[alias_key] = node
return node
def represent_key(self, data):
"""
David Fraser: Extract a method to represent keys in mappings, so that
a subclass can choose not to quote them (for example)
used in repesent_mapping
https://bitbucket.org/davidfraser/pyyaml/commits/d81df6eb95f20cac4a79eed95ae553b5c6f77b8c
"""
return self.represent_data(data)
@classmethod
def add_representer(cls, data_type, representer):
if 'yaml_representers' not in cls.__dict__:
cls.yaml_representers = cls.yaml_representers.copy()
cls.yaml_representers[data_type] = representer
@classmethod
def add_multi_representer(cls, data_type, representer):
if 'yaml_multi_representers' not in cls.__dict__:
cls.yaml_multi_representers = cls.yaml_multi_representers.copy()
cls.yaml_multi_representers[data_type] = representer
def represent_scalar(self, tag, value, style=None):
if style is None:
style = self.default_style
node = ScalarNode(tag, value, style=style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
return node
def represent_sequence(self, tag, sequence, flow_style=None):
value = []
node = SequenceNode(tag, value, flow_style=flow_style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
best_style = True
for item in sequence:
node_item = self.represent_data(item)
if not (isinstance(node_item, ScalarNode) and not node_item.style):
best_style = False
value.append(node_item)
if flow_style is None:
if self.default_flow_style is not None:
node.flow_style = self.default_flow_style
else:
node.flow_style = best_style
return node
def represent_omap(self, tag, omap, flow_style=None):
value = []
node = SequenceNode(tag, value, flow_style=flow_style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
best_style = True
for item_key in omap:
item_val = omap[item_key]
node_item = self.represent_data({item_key: item_val})
# if not (isinstance(node_item, ScalarNode) \
# and not node_item.style):
# best_style = False
value.append(node_item)
if flow_style is None:
if self.default_flow_style is not None:
node.flow_style = self.default_flow_style
else:
node.flow_style = best_style
return node
def represent_mapping(self, tag, mapping, flow_style=None):
value = []
node = MappingNode(tag, value, flow_style=flow_style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
best_style = True
if hasattr(mapping, 'items'):
mapping = list(mapping.items())
try:
mapping = sorted(mapping)
except TypeError:
pass
for item_key, item_value in mapping:
node_key = self.represent_key(item_key)
node_value = self.represent_data(item_value)
if not (isinstance(node_key, ScalarNode) and not node_key.style):
best_style = False
if not (isinstance(node_value, ScalarNode) and not
node_value.style):
best_style = False
value.append((node_key, node_value))
if flow_style is None:
if self.default_flow_style is not None:
node.flow_style = self.default_flow_style
else:
node.flow_style = best_style
return node
def ignore_aliases(self, data):
return False
class SafeRepresenter(BaseRepresenter):
def ignore_aliases(self, data):
# https://docs.python.org/3/reference/expressions.html#parenthesized-forms :
# "i.e. two occurrences of the empty tuple may or may not yield the same object"
# so "data is ()" should not be used
if data is None or data == ():
return True
if isinstance(data, (binary_type, text_type, bool, int, float)):
return True
def represent_none(self, data):
return self.represent_scalar(u'tag:yaml.org,2002:null',
u'null')
if PY3:
def represent_str(self, data):
return self.represent_scalar(u'tag:yaml.org,2002:str', data)
def represent_binary(self, data):
if hasattr(base64, 'encodebytes'):
data = base64.encodebytes(data).decode('ascii')
else:
data = base64.encodestring(data).decode('ascii')
return self.represent_scalar(u'tag:yaml.org,2002:binary', data,
style='|')
else:
def represent_str(self, data):
tag = None
style = None
try:
data = unicode(data, 'ascii')
tag = u'tag:yaml.org,2002:str'
except UnicodeDecodeError:
try:
data = unicode(data, 'utf-8')
tag = u'tag:yaml.org,2002:str'
except UnicodeDecodeError:
data = data.encode('base64')
tag = u'tag:yaml.org,2002:binary'
style = '|'
return self.represent_scalar(tag, data, style=style)
def represent_unicode(self, data):
return self.represent_scalar(u'tag:yaml.org,2002:str', data)
def represent_bool(self, data):
if data:
value = u'true'
else:
value = u'false'
return self.represent_scalar(u'tag:yaml.org,2002:bool', value)
def represent_int(self, data):
return self.represent_scalar(u'tag:yaml.org,2002:int', text_type(data))
if PY2:
def represent_long(self, data):
return self.represent_scalar(u'tag:yaml.org,2002:int',
text_type(data))
inf_value = 1e300
while repr(inf_value) != repr(inf_value*inf_value):
inf_value *= inf_value
def represent_float(self, data):
if data != data or (data == 0.0 and data == 1.0):
value = u'.nan'
elif data == self.inf_value:
value = u'.inf'
elif data == -self.inf_value:
value = u'-.inf'
else:
value = to_unicode(repr(data)).lower()
# Note that in some cases `repr(data)` represents a float number
# without the decimal parts. For instance:
# >>> repr(1e17)
# '1e17'
# Unfortunately, this is not a valid float representation according
# to the definition of the `!!float` tag. We fix this by adding
# '.0' before the 'e' symbol.
if u'.' not in value and u'e' in value:
value = value.replace(u'e', u'.0e', 1)
return self.represent_scalar(u'tag:yaml.org,2002:float', value)
def represent_list(self, data):
# pairs = (len(data) > 0 and isinstance(data, list))
# if pairs:
# for item in data:
# if not isinstance(item, tuple) or len(item) != 2:
# pairs = False
# break
# if not pairs:
return self.represent_sequence(u'tag:yaml.org,2002:seq', data)
# value = []
# for item_key, item_value in data:
# value.append(self.represent_mapping(u'tag:yaml.org,2002:map',
# [(item_key, item_value)]))
# return SequenceNode(u'tag:yaml.org,2002:pairs', value)
def represent_dict(self, data):
return self.represent_mapping(u'tag:yaml.org,2002:map', data)
def represent_ordereddict(self, data):
return self.represent_omap(u'tag:yaml.org,2002:omap', data)
def represent_set(self, data):
value = {}
for key in data:
value[key] = None
return self.represent_mapping(u'tag:yaml.org,2002:set', value)
def represent_date(self, data):
value = to_unicode(data.isoformat())
return self.represent_scalar(u'tag:yaml.org,2002:timestamp', value)
def represent_datetime(self, data):
value = to_unicode(data.isoformat(' '))
return self.represent_scalar(u'tag:yaml.org,2002:timestamp', value)
def represent_yaml_object(self, tag, data, cls, flow_style=None):
if hasattr(data, '__getstate__'):
state = data.__getstate__()
else:
state = data.__dict__.copy()
return self.represent_mapping(tag, state, flow_style=flow_style)
def represent_undefined(self, data):
raise RepresenterError("cannot represent an object: %s" % data)
SafeRepresenter.add_representer(type(None),
SafeRepresenter.represent_none)
SafeRepresenter.add_representer(str,
SafeRepresenter.represent_str)
if PY2:
SafeRepresenter.add_representer(unicode,
SafeRepresenter.represent_unicode)
else:
SafeRepresenter.add_representer(bytes,
SafeRepresenter.represent_binary)
SafeRepresenter.add_representer(bool,
SafeRepresenter.represent_bool)
SafeRepresenter.add_representer(int,
SafeRepresenter.represent_int)
if PY2:
SafeRepresenter.add_representer(long,
SafeRepresenter.represent_long)
SafeRepresenter.add_representer(float,
SafeRepresenter.represent_float)
SafeRepresenter.add_representer(list,
SafeRepresenter.represent_list)
SafeRepresenter.add_representer(tuple,
SafeRepresenter.represent_list)
SafeRepresenter.add_representer(dict,
SafeRepresenter.represent_dict)
SafeRepresenter.add_representer(set,
SafeRepresenter.represent_set)
SafeRepresenter.add_representer(ordereddict,
SafeRepresenter.represent_ordereddict)
SafeRepresenter.add_representer(datetime.date,
SafeRepresenter.represent_date)
SafeRepresenter.add_representer(datetime.datetime,
SafeRepresenter.represent_datetime)
SafeRepresenter.add_representer(None,
SafeRepresenter.represent_undefined)
class Representer(SafeRepresenter):
if PY2:
def represent_str(self, data):
tag = None
style = None
try:
data = unicode(data, 'ascii')
tag = u'tag:yaml.org,2002:str'
except UnicodeDecodeError:
try:
data = unicode(data, 'utf-8')
tag = u'tag:yaml.org,2002:python/str'
except UnicodeDecodeError:
data = data.encode('base64')
tag = u'tag:yaml.org,2002:binary'
style = '|'
return self.represent_scalar(tag, data, style=style)
def represent_unicode(self, data):
tag = None
try:
data.encode('ascii')
tag = u'tag:yaml.org,2002:python/unicode'
except UnicodeEncodeError:
tag = u'tag:yaml.org,2002:str'
return self.represent_scalar(tag, data)
def represent_long(self, data):
tag = u'tag:yaml.org,2002:int'
if int(data) is not data:
tag = u'tag:yaml.org,2002:python/long'
return self.represent_scalar(tag, to_unicode(data))
def represent_complex(self, data):
if data.imag == 0.0:
data = u'%r' % data.real
elif data.real == 0.0:
data = u'%rj' % data.imag
elif data.imag > 0:
data = u'%r+%rj' % (data.real, data.imag)
else:
data = u'%r%rj' % (data.real, data.imag)
return self.represent_scalar(u'tag:yaml.org,2002:python/complex', data)
def represent_tuple(self, data):
return self.represent_sequence(u'tag:yaml.org,2002:python/tuple', data)
def represent_name(self, data):
name = u'%s.%s' % (data.__module__, data.__name__)
return self.represent_scalar(u'tag:yaml.org,2002:python/name:' +
name, u'')
def represent_module(self, data):
return self.represent_scalar(
u'tag:yaml.org,2002:python/module:'+data.__name__, u'')
if PY2:
def represent_instance(self, data):
# For instances of classic classes, we use __getinitargs__ and
# __getstate__ to serialize the data.
# If data.__getinitargs__ exists, the object must be reconstructed
# by calling cls(**args), where args is a tuple returned by
# __getinitargs__. Otherwise, the cls.__init__ method should never
# be called and the class instance is created by instantiating a
# trivial class and assigning to the instance's __class__ variable.
# If data.__getstate__ exists, it returns the state of the object.
# Otherwise, the state of the object is data.__dict__.
# We produce either a !!python/object or !!python/object/new node.
# If data.__getinitargs__ does not exist and state is a dictionary,
# we produce a !!python/object node . Otherwise we produce a
# !!python/object/new node.
cls = data.__class__
class_name = u'%s.%s' % (cls.__module__, cls.__name__)
args = None
state = None
if hasattr(data, '__getinitargs__'):
args = list(data.__getinitargs__())
if hasattr(data, '__getstate__'):
state = data.__getstate__()
else:
state = data.__dict__
if args is None and isinstance(state, dict):
return self.represent_mapping(
u'tag:yaml.org,2002:python/object:'+class_name, state)
if isinstance(state, dict) and not state:
return self.represent_sequence(
u'tag:yaml.org,2002:python/object/new:' +
class_name, args)
value = {}
if args:
value['args'] = args
value['state'] = state
return self.represent_mapping(
u'tag:yaml.org,2002:python/object/new:'+class_name, value)
def represent_object(self, data):
# We use __reduce__ API to save the data. data.__reduce__ returns
# a tuple of length 2-5:
# (function, args, state, listitems, dictitems)
# For reconstructing, we calls function(*args), then set its state,
# listitems, and dictitems if they are not None.
# A special case is when function.__name__ == '__newobj__'. In this
# case we create the object with args[0].__new__(*args).
# Another special case is when __reduce__ returns a string - we don't
# support it.
# We produce a !!python/object, !!python/object/new or
# !!python/object/apply node.
cls = type(data)
if cls in copyreg.dispatch_table:
reduce = copyreg.dispatch_table[cls](data)
elif hasattr(data, '__reduce_ex__'):
reduce = data.__reduce_ex__(2)
elif hasattr(data, '__reduce__'):
reduce = data.__reduce__()
else:
raise RepresenterError("cannot represent object: %r" % data)
reduce = (list(reduce)+[None]*5)[:5]
function, args, state, listitems, dictitems = reduce
args = list(args)
if state is None:
state = {}
if listitems is not None:
listitems = list(listitems)
if dictitems is not None:
dictitems = dict(dictitems)
if function.__name__ == '__newobj__':
function = args[0]
args = args[1:]
tag = u'tag:yaml.org,2002:python/object/new:'
newobj = True
else:
tag = u'tag:yaml.org,2002:python/object/apply:'
newobj = False
function_name = u'%s.%s' % (function.__module__, function.__name__)
if not args and not listitems and not dictitems \
and isinstance(state, dict) and newobj:
return self.represent_mapping(
u'tag:yaml.org,2002:python/object:'+function_name, state)
if not listitems and not dictitems \
and isinstance(state, dict) and not state:
return self.represent_sequence(tag+function_name, args)
value = {}
if args:
value['args'] = args
if state or not isinstance(state, dict):
value['state'] = state
if listitems:
value['listitems'] = listitems
if dictitems:
value['dictitems'] = dictitems
return self.represent_mapping(tag+function_name, value)
if PY2:
Representer.add_representer(str,
Representer.represent_str)
Representer.add_representer(unicode,
Representer.represent_unicode)
Representer.add_representer(long,
Representer.represent_long)
Representer.add_representer(complex,
Representer.represent_complex)
Representer.add_representer(tuple,
Representer.represent_tuple)
Representer.add_representer(type,
Representer.represent_name)
if PY2:
Representer.add_representer(types.ClassType,
Representer.represent_name)
Representer.add_representer(types.FunctionType,
Representer.represent_name)
Representer.add_representer(types.BuiltinFunctionType,
Representer.represent_name)
Representer.add_representer(types.ModuleType,
Representer.represent_module)
if PY2:
Representer.add_multi_representer(types.InstanceType,
Representer.represent_instance)
Representer.add_multi_representer(object,
Representer.represent_object)
try:
from .comments import CommentedMap, CommentedOrderedMap, CommentedSeq, \
CommentedSet, comment_attrib, merge_attrib
except ImportError: # for Jython
from ruamel.yaml.comments import CommentedMap, CommentedOrderedMap, \
CommentedSeq, CommentedSet, comment_attrib, merge_attrib
class RoundTripRepresenter(SafeRepresenter):
# need to add type here and write out the .comment
# in serializer and emitter
def __init__(self, default_style=None, default_flow_style=None):
if default_flow_style is None:
default_flow_style = False
SafeRepresenter.__init__(self, default_style=default_style,
default_flow_style=default_flow_style)
def represent_none(self, data):
return self.represent_scalar(u'tag:yaml.org,2002:null',
u'')
def represent_preserved_scalarstring(self, data):
tag = None
style = '|'
if PY2 and not isinstance(data, unicode):
data = unicode(data, 'ascii')
tag = u'tag:yaml.org,2002:str'
return self.represent_scalar(tag, data, style=style)
def represent_single_quoted_scalarstring(self, data):
tag = None
style = "'"
if PY2 and not isinstance(data, unicode):
data = unicode(data, 'ascii')
tag = u'tag:yaml.org,2002:str'
return self.represent_scalar(tag, data, style=style)
def represent_double_quoted_scalarstring(self, data):
tag = None
style = '"'
if PY2 and not isinstance(data, unicode):
data = unicode(data, 'ascii')
tag = u'tag:yaml.org,2002:str'
return self.represent_scalar(tag, data, style=style)
def represent_sequence(self, tag, sequence, flow_style=None):
value = []
# if the flow_style is None, the flow style tacked on to the object
# explicitly will be taken. If that is None as well the default flow
# style rules
try:
flow_style = sequence.fa.flow_style(flow_style)
except AttributeError:
flow_style = flow_style
try:
anchor = sequence.yaml_anchor()
except AttributeError:
anchor = None
node = SequenceNode(tag, value, flow_style=flow_style, anchor=anchor)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
best_style = True
try:
comment = getattr(sequence, comment_attrib)
item_comments = comment.items
node.comment = comment.comment
try:
node.comment.append(comment.end)
except AttributeError:
pass
except AttributeError:
item_comments = {}
for idx, item in enumerate(sequence):
node_item = self.represent_data(item)
node_item.comment = item_comments.get(idx)
if not (isinstance(node_item, ScalarNode) and not node_item.style):
best_style = False
value.append(node_item)
if flow_style is None:
if self.default_flow_style is not None:
node.flow_style = self.default_flow_style
else:
node.flow_style = best_style
return node
def represent_mapping(self, tag, mapping, flow_style=None):
value = []
try:
flow_style = mapping.fa.flow_style(flow_style)
except AttributeError:
flow_style = flow_style
try:
anchor = mapping.yaml_anchor()
except AttributeError:
anchor = None
node = MappingNode(tag, value, flow_style=flow_style, anchor=anchor)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
best_style = True
# no sorting! !!
try:
comment = getattr(mapping, comment_attrib)
node.comment = comment.comment
if node.comment and node.comment[1]:
for ct in node.comment[1]:
ct.reset()
item_comments = comment.items
for v in item_comments.values():
if v and v[1]:
for ct in v[1]:
ct.reset()
try:
node.comment.append(comment.end)
except AttributeError:
pass
except AttributeError:
item_comments = {}
for item_key, item_value in mapping.items():
node_key = self.represent_key(item_key)
node_value = self.represent_data(item_value)
item_comment = item_comments.get(item_key)
if item_comment:
assert getattr(node_key, 'comment', None) is None
node_key.comment = item_comment[:2]
nvc = getattr(node_value, 'comment', None)
if nvc is not None: # end comment already there
nvc[0] = item_comment[2]
nvc[1] = item_comment[3]
else:
node_value.comment = item_comment[2:]
if not (isinstance(node_key, ScalarNode) and not node_key.style):
best_style = False
if not (isinstance(node_value, ScalarNode) and not
node_value.style):
best_style = False
value.append((node_key, node_value))
if flow_style is None:
if self.default_flow_style is not None:
node.flow_style = self.default_flow_style
else:
node.flow_style = best_style
merge_list = [m[1] for m in getattr(mapping, merge_attrib, [])]
if merge_list:
# because of the call to represent_data here, the anchors
# are marked as being used and thereby created
if len(merge_list) == 1:
arg = self.represent_data(merge_list[0])
else:
arg = self.represent_data(merge_list)
arg.flow_style = True
value.insert(0,
(ScalarNode(u'tag:yaml.org,2002:merge', '<<'), arg))
return node
def represent_omap(self, tag, omap, flow_style=None):
value = []
try:
flow_style = omap.fa.flow_style(flow_style)
except AttributeError:
flow_style = flow_style
try:
anchor = omap.yaml_anchor()
except AttributeError:
anchor = None
node = SequenceNode(tag, value, flow_style=flow_style, anchor=anchor)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
best_style = True
try:
comment = getattr(omap, comment_attrib)
node.comment = comment.comment
if node.comment and node.comment[1]:
for ct in node.comment[1]:
ct.reset()
item_comments = comment.items
for v in item_comments.values():
if v and v[1]:
for ct in v[1]:
ct.reset()
try:
node.comment.append(comment.end)
except AttributeError:
pass
except AttributeError:
item_comments = {}
for item_key in omap:
item_val = omap[item_key]
node_item = self.represent_data({item_key: item_val})
# node item has two scalars in value: node_key and node_value
item_comment = item_comments.get(item_key)
if item_comment:
if item_comment[1]:
node_item.comment = [None, item_comment[1]]
assert getattr(node_item.value[0][0], 'comment', None) is None
node_item.value[0][0].comment = [item_comment[0], None]
nvc = getattr(node_item.value[0][1], 'comment', None)
if nvc is not None: # end comment already there
nvc[0] = item_comment[2]
nvc[1] = item_comment[3]
else:
node_item.value[0][1].comment = item_comment[2:]
# if not (isinstance(node_item, ScalarNode) \
# and not node_item.style):
# best_style = False
value.append(node_item)
if flow_style is None:
if self.default_flow_style is not None:
node.flow_style = self.default_flow_style
else:
node.flow_style = best_style
return node
def represent_set(self, setting):
flow_style = False
tag = u'tag:yaml.org,2002:set'
# return self.represent_mapping(tag, value)
value = []
flow_style = setting.fa.flow_style(flow_style)
try:
anchor = setting.yaml_anchor()
except AttributeError:
anchor = None
node = MappingNode(tag, value, flow_style=flow_style, anchor=anchor)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
best_style = True
# no sorting! !!
try:
comment = getattr(setting, comment_attrib)
node.comment = comment.comment
if node.comment and node.comment[1]:
for ct in node.comment[1]:
ct.reset()
item_comments = comment.items
for v in item_comments.values():
if v and v[1]:
for ct in v[1]:
ct.reset()
try:
node.comment.append(comment.end)
except AttributeError:
pass
except AttributeError:
item_comments = {}
for item_key in setting.odict:
node_key = self.represent_key(item_key)
node_value = self.represent_data(None)
item_comment = item_comments.get(item_key)
if item_comment:
assert getattr(node_key, 'comment', None) is None
node_key.comment = item_comment[:2]
node_key.style = node_value.style = "?"
if not (isinstance(node_key, ScalarNode) and not node_key.style):
best_style = False
if not (isinstance(node_value, ScalarNode) and not
node_value.style):
best_style = False
value.append((node_key, node_value))
best_style = best_style
return node
def represent_dict(self, data):
"""write out tag if saved on loading"""
try:
t = data.tag.value
except AttributeError:
t = None
if t:
while t and t[0] == '!':
t = t[1:]
tag = 'tag:yaml.org,2002:' + t
else:
tag = u'tag:yaml.org,2002:map'
return self.represent_mapping(tag, data)
RoundTripRepresenter.add_representer(type(None),
RoundTripRepresenter.represent_none)
RoundTripRepresenter.add_representer(
PreservedScalarString,
RoundTripRepresenter.represent_preserved_scalarstring)
RoundTripRepresenter.add_representer(
SingleQuotedScalarString,
RoundTripRepresenter.represent_single_quoted_scalarstring)
RoundTripRepresenter.add_representer(
DoubleQuotedScalarString,
RoundTripRepresenter.represent_double_quoted_scalarstring)
RoundTripRepresenter.add_representer(CommentedSeq,
RoundTripRepresenter.represent_list)
RoundTripRepresenter.add_representer(CommentedMap,
RoundTripRepresenter.represent_dict)
RoundTripRepresenter.add_representer(CommentedOrderedMap,
RoundTripRepresenter.represent_ordereddict)
if sys.version_info >= (2, 7):
import collections
RoundTripRepresenter.add_representer(collections.OrderedDict,
RoundTripRepresenter.represent_ordereddict)
RoundTripRepresenter.add_representer(CommentedSet,
RoundTripRepresenter.represent_set)

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