Compare commits

..

792 Commits

Author SHA1 Message Date
Gregory Becker
5d0bb647a3 typo 2023-05-15 18:02:11 -07:00
Gregory Becker
bfb72c7fd6 update tests for new outputs 2023-05-15 18:00:02 -07:00
Gregory Becker
08a5a59b21 try adding all environment specs to installer 2023-05-15 10:38:11 -07:00
Gregory Becker
cebd482300 test 2023-05-01 12:39:33 -07:00
becker33
84a1fc415d [@spackbot] updating style on behalf of becker33 2023-04-11 18:34:35 +00:00
Gregory Becker
394f2a58d3 spack install --overwrite: envs respect option 2023-04-10 15:41:30 -07: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
1121 changed files with 17558 additions and 8814 deletions

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

@@ -19,7 +19,7 @@ jobs:
package-audits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
with:
python-version: ${{inputs.python_version}}

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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- 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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- 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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- 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@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh

View File

@@ -50,7 +50,7 @@ jobs:
if: github.repository == 'spack/spack'
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
- name: Set Container Tag Normal (Nightly)
run: |
@@ -89,7 +89,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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0

View File

@@ -47,7 +47,7 @@ jobs:
on_develop: false
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
@@ -94,7 +94,7 @@ jobs:
shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
@@ -133,7 +133,7 @@ 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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
- name: Setup repo and non-root user
run: |
git --version
@@ -151,7 +151,7 @@ jobs:
clingo-cffi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
@@ -185,7 +185,7 @@ jobs:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2

View File

@@ -18,7 +18,7 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
with:
python-version: '3.11'
@@ -35,7 +35,7 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # @v2
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # @v2
@@ -58,3 +58,28 @@ 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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # @v2
- name: Setup repo and non-root user
run: |
git --version
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,7 +15,7 @@ jobs:
unit-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
@@ -39,7 +39,7 @@ jobs:
unit-tests-cmd:
runs-on: windows-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
@@ -63,7 +63,7 @@ jobs:
build-abseil:
runs-on: windows-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
with:
fetch-depth: 0
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
@@ -87,7 +87,7 @@ jobs:
# git config --global core.symlinks false
# shell:
# powershell
# - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
# - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
# with:
# fetch-depth: 0
# - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435

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

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

@@ -46,7 +46,7 @@ modules:
tcl:
all:
autoload: none
autoload: direct
# Default configurations if lmod is enabled
lmod:

View File

@@ -28,7 +28,7 @@ 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]
java: [openjdk, jdk, ibm-java]

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

@@ -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

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::

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

@@ -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

@@ -227,6 +227,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 +242,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 +287,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`
@@ -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

@@ -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

@@ -1597,8 +1597,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 +1694,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

@@ -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).

178
lib/spack/env/cc vendored
View File

@@ -427,6 +427,55 @@ 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() {
# drop -Wl
shift
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 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)
wl_expect_rpath=yes
;;
"$dtags_to_strip")
;;
*)
append other_args_list "-Wl,$1"
;;
esac
fi
shift
done
}
while [ $# -ne 0 ]; do
@@ -526,88 +575,77 @@ 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=,
parse_Wl $1
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.0-dev (commit f3667f95030c6573842fb5f6df0d647285597509)
astunparse
----------------

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

@@ -2782,6 +2782,10 @@
{
"versions": "13.0:",
"flags" : "-mcpu=apple-m1"
},
{
"versions": "16.0:",
"flags" : "-mcpu=apple-m2"
}
],
"apple-clang": [
@@ -2790,8 +2794,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

@@ -5,19 +5,20 @@
import collections
import collections.abc
import errno
import fnmatch
import glob
import hashlib
import itertools
import numbers
import os
import posixpath
import re
import shutil
import stat
import sys
import tempfile
from contextlib import contextmanager
from sys import platform as _platform
from typing import Callable, List, Match, Optional, Tuple, Union
from typing import Callable, Iterable, List, Match, Optional, Tuple, Union
from llnl.util import tty
from llnl.util.lang import dedupe, memoized
@@ -26,9 +27,7 @@
from spack.util.executable import Executable, which
from spack.util.path import path_to_os_path, system_path_filter
is_windows = _platform == "win32"
if not is_windows:
if sys.platform != "win32":
import grp
import pwd
else:
@@ -154,7 +153,7 @@ def lookup(name):
def getuid():
if is_windows:
if sys.platform == "win32":
import ctypes
if ctypes.windll.shell32.IsUserAnAdmin() == 0:
@@ -167,7 +166,7 @@ def getuid():
@system_path_filter
def rename(src, dst):
# On Windows, os.rename will fail if the destination file already exists
if is_windows:
if sys.platform == "win32":
# Windows path existence checks will sometimes fail on junctions/links/symlinks
# so check for that case
if os.path.exists(dst) or os.path.islink(dst):
@@ -196,7 +195,7 @@ def _get_mime_type():
"""Generate method to call `file` system command to aquire mime type
for a specified path
"""
if is_windows:
if sys.platform == "win32":
# -h option (no-dereference) does not exist in Windows
return file_command("-b", "--mime-type")
else:
@@ -551,7 +550,7 @@ def get_owner_uid(path, err_msg=None):
else:
p_stat = os.stat(path)
if _platform != "win32":
if sys.platform != "win32":
owner_uid = p_stat.st_uid
else:
sid = win32security.GetFileSecurity(
@@ -584,7 +583,7 @@ def group_ids(uid=None):
Returns:
(list of int): gids of groups the user is a member of
"""
if is_windows:
if sys.platform == "win32":
tty.warn("Function is not supported on Windows")
return []
@@ -604,7 +603,7 @@ def group_ids(uid=None):
@system_path_filter(arg_slice=slice(1))
def chgrp(path, group, follow_symlinks=True):
"""Implement the bash chgrp function on a single path"""
if is_windows:
if sys.platform == "win32":
raise OSError("Function 'chgrp' is not supported on Windows")
if isinstance(group, str):
@@ -1131,7 +1130,7 @@ def open_if_filename(str_or_file, mode="r"):
@system_path_filter
def touch(path):
"""Creates an empty file at the specified path."""
if is_windows:
if sys.platform == "win32":
perms = os.O_WRONLY | os.O_CREAT
else:
perms = os.O_WRONLY | os.O_CREAT | os.O_NONBLOCK | os.O_NOCTTY
@@ -1193,7 +1192,7 @@ def temp_cwd():
yield tmp_dir
finally:
kwargs = {}
if is_windows:
if sys.platform == "win32":
kwargs["ignore_errors"] = False
kwargs["onerror"] = readonly_file_handler(ignore_errors=True)
shutil.rmtree(tmp_dir, **kwargs)
@@ -1438,7 +1437,7 @@ def visit_directory_tree(root, visitor, rel_path="", depth=0):
try:
isdir = f.is_dir()
except OSError as e:
if is_windows and hasattr(e, "winerror") and e.winerror == 5 and islink:
if sys.platform == "win32" and hasattr(e, "winerror") and e.winerror == 5 and islink:
# if path is a symlink, determine destination and
# evaluate file vs directory
link_target = resolve_link_target_relative_to_the_link(f)
@@ -1547,11 +1546,11 @@ def readonly_file_handler(ignore_errors=False):
"""
def error_remove_readonly(func, path, exc):
if not is_windows:
if sys.platform != "win32":
raise RuntimeError("This method should only be invoked on Windows")
excvalue = exc[1]
if (
is_windows
sys.platform == "win32"
and func in (os.rmdir, os.remove, os.unlink)
and excvalue.errno == errno.EACCES
):
@@ -1581,7 +1580,7 @@ def remove_linked_tree(path):
# Windows readonly files cannot be removed by Python
# directly.
if is_windows:
if sys.platform == "win32":
kwargs["ignore_errors"] = False
kwargs["onerror"] = readonly_file_handler(ignore_errors=True)
@@ -1674,6 +1673,38 @@ def fix_darwin_install_name(path):
break
def find_first(root: str, files: Union[Iterable[str], str], bfs_depth: int = 2) -> Optional[str]:
"""Find the first file matching a pattern.
The following
.. code-block:: console
$ find /usr -name 'abc*' -o -name 'def*' -quit
is equivalent to:
>>> find_first("/usr", ["abc*", "def*"])
Any glob pattern supported by fnmatch can be used.
The search order of this method is breadth-first over directories,
until depth bfs_depth, after which depth-first search is used.
Parameters:
root (str): The root directory to start searching from
files (str or Iterable): File pattern(s) to search for
bfs_depth (int): (advanced) parameter that specifies at which
depth to switch to depth-first search.
Returns:
str or None: The matching file or None when no file is found.
"""
if isinstance(files, str):
files = [files]
return FindFirstFile(root, *files, bfs_depth=bfs_depth).find()
def find(root, files, recursive=True):
"""Search for ``files`` starting from the ``root`` directory.
@@ -2095,7 +2126,7 @@ def names(self):
# on non Windows platform
# Windows valid library extensions are:
# ['.dll', '.lib']
valid_exts = [".dll", ".lib"] if is_windows else [".dylib", ".so", ".a"]
valid_exts = [".dll", ".lib"] if sys.platform == "win32" else [".dylib", ".so", ".a"]
for ext in valid_exts:
i = name.rfind(ext)
if i != -1:
@@ -2243,7 +2274,7 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
message = message.format(find_libraries.__name__, type(libraries))
raise TypeError(message)
if is_windows:
if sys.platform == "win32":
static_ext = "lib"
# For linking (runtime=False) you need the .lib files regardless of
# whether you are doing a shared or static link
@@ -2275,7 +2306,7 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
# finally search all of root recursively. The search stops when the first
# match is found.
common_lib_dirs = ["lib", "lib64"]
if is_windows:
if sys.platform == "win32":
common_lib_dirs.extend(["bin", "Lib"])
for subdir in common_lib_dirs:
@@ -2410,7 +2441,7 @@ def _link(self, path, dest_dir):
# For py2 compatibility, we have to catch the specific Windows error code
# associate with trying to create a file that already exists (winerror 183)
except OSError as e:
if e.winerror == 183:
if sys.platform == "win32" and (e.winerror == 183 or e.errno == errno.EEXIST):
# We have either already symlinked or we are encoutering a naming clash
# either way, we don't want to overwrite existing libraries
already_linked = islink(dest_file)
@@ -2723,3 +2754,105 @@ def filesummary(path, print_bytes=16) -> Tuple[int, bytes]:
return size, short_contents
except OSError:
return 0, b""
class FindFirstFile:
"""Uses hybrid iterative deepening to locate the first matching
file. Up to depth ``bfs_depth`` it uses iterative deepening, which
mimics breadth-first with the same memory footprint as depth-first
search, after which it switches to ordinary depth-first search using
``os.walk``."""
def __init__(self, root: str, *file_patterns: str, bfs_depth: int = 2):
"""Create a small summary of the given file. Does not error
when file does not exist.
Args:
root (str): directory in which to recursively search
file_patterns (str): glob file patterns understood by fnmatch
bfs_depth (int): until this depth breadth-first traversal is used,
when no match is found, the mode is switched to depth-first search.
"""
self.root = root
self.bfs_depth = bfs_depth
self.match: Callable
# normcase is trivial on posix
regex = re.compile("|".join(fnmatch.translate(os.path.normcase(p)) for p in file_patterns))
# On case sensitive filesystems match against normcase'd paths.
if os.path is posixpath:
self.match = regex.match
else:
self.match = lambda p: regex.match(os.path.normcase(p))
def find(self) -> Optional[str]:
"""Run the file search
Returns:
str or None: path of the matching file
"""
self.file = None
# First do iterative deepening (i.e. bfs through limited depth dfs)
for i in range(self.bfs_depth + 1):
if self._find_at_depth(self.root, i):
return self.file
# Then fall back to depth-first search
return self._find_dfs()
def _find_at_depth(self, path, max_depth, depth=0) -> bool:
"""Returns True when done. Notice search can be done
either because a file was found, or because it recursed
through all directories."""
try:
entries = os.scandir(path)
except OSError:
return True
done = True
with entries:
# At max depth we look for matching files.
if depth == max_depth:
for f in entries:
# Exit on match
if self.match(f.name):
self.file = os.path.join(path, f.name)
return True
# is_dir should not require a stat call, so it's a good optimization.
if self._is_dir(f):
done = False
return done
# At lower depth only recurse into subdirs
for f in entries:
if not self._is_dir(f):
continue
# If any subdir is not fully traversed, we're not done yet.
if not self._find_at_depth(os.path.join(path, f.name), max_depth, depth + 1):
done = False
# Early exit when we've found something.
if self.file:
return True
return done
def _is_dir(self, f: os.DirEntry) -> bool:
"""Returns True when f is dir we can enter (and not a symlink)."""
try:
return f.is_dir(follow_symlinks=False)
except OSError:
return False
def _find_dfs(self) -> Optional[str]:
"""Returns match or None"""
for dirpath, _, filenames in os.walk(self.root):
for file in filenames:
if self.match(file):
return os.path.join(dirpath, file)
return None

View File

@@ -5,15 +5,13 @@
import errno
import os
import shutil
import sys
import tempfile
from os.path import exists, join
from sys import platform as _platform
from llnl.util import lang
is_windows = _platform == "win32"
if is_windows:
if sys.platform == "win32":
from win32file import CreateHardLink
@@ -23,7 +21,7 @@ def symlink(real_path, link_path):
On Windows, use junctions if os.symlink fails.
"""
if not is_windows:
if sys.platform != "win32":
os.symlink(real_path, link_path)
elif _win32_can_symlink():
# Windows requires target_is_directory=True when the target is a dir.
@@ -32,9 +30,15 @@ def symlink(real_path, link_path):
try:
# Try to use junctions
_win32_junction(real_path, link_path)
except OSError:
# If all else fails, fall back to copying files
shutil.copyfile(real_path, link_path)
except OSError as e:
if e.errno == errno.EEXIST:
# EEXIST error indicates that file we're trying to "link"
# is already present, don't bother trying to copy which will also fail
# just raise
raise
else:
# If all else fails, fall back to copying files
shutil.copyfile(real_path, link_path)
def islink(path):
@@ -99,7 +103,7 @@ def _win32_is_junction(path):
if os.path.islink(path):
return False
if is_windows:
if sys.platform == "win32":
import ctypes.wintypes
GetFileAttributes = ctypes.windll.kernel32.GetFileAttributesW

View File

@@ -25,7 +25,7 @@ def architecture_compatible(self, target, constraint):
return (
not target.architecture
or not constraint.architecture
or target.architecture.satisfies(constraint.architecture)
or target.architecture.intersects(constraint.architecture)
)
@memoized
@@ -104,7 +104,7 @@ def compiler_compatible(self, parent, child, **kwargs):
for cversion in child.compiler.versions:
# For a few compilers use specialized comparisons.
# Otherwise match on version match.
if pversion.satisfies(cversion):
if pversion.intersects(cversion):
return True
elif parent.compiler.name == "gcc" and self._gcc_compiler_compare(
pversion, cversion

View File

@@ -695,8 +695,11 @@ def _ensure_variant_defaults_are_parsable(pkgs, error_cls):
try:
variant.validate_or_raise(vspec, pkg_cls=pkg_cls)
except spack.variant.InvalidVariantValueError:
error_msg = "The variant '{}' default value in package '{}' cannot be validated"
errors.append(error_cls(error_msg.format(variant_name, pkg_name), []))
error_msg = (
"The default value of the variant '{}' in package '{}' failed validation"
)
question = "Is it among the allowed values?"
errors.append(error_cls(error_msg.format(variant_name, pkg_name), [question]))
return errors
@@ -721,7 +724,7 @@ def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls
dependency_pkg_cls = None
try:
dependency_pkg_cls = spack.repo.path.get_pkg_class(s.name)
assert any(v.satisfies(s.versions) for v in list(dependency_pkg_cls.versions))
assert any(v.intersects(s.versions) for v in list(dependency_pkg_cls.versions))
except Exception:
summary = (
"{0}: dependency on {1} cannot be satisfied " "by known versions of {1.name}"

View File

@@ -6,6 +6,8 @@
import codecs
import collections
import hashlib
import io
import itertools
import json
import multiprocessing.pool
import os
@@ -20,7 +22,9 @@
import urllib.parse
import urllib.request
import warnings
from contextlib import closing
from contextlib import closing, contextmanager
from gzip import GzipFile
from typing import Union
from urllib.error import HTTPError, URLError
import ruamel.yaml as yaml
@@ -39,6 +43,7 @@
import spack.platforms
import spack.relocate as relocate
import spack.repo
import spack.stage
import spack.store
import spack.traverse as traverse
import spack.util.crypto
@@ -498,7 +503,9 @@ def _binary_index():
#: Singleton binary_index instance
binary_index = llnl.util.lang.Singleton(_binary_index)
binary_index: Union[BinaryCacheIndex, llnl.util.lang.Singleton] = llnl.util.lang.Singleton(
_binary_index
)
class NoOverwriteException(spack.error.SpackError):
@@ -739,34 +746,31 @@ def get_buildfile_manifest(spec):
return data
def write_buildinfo_file(spec, workdir, rel=False):
"""
Create a cache file containing information
required for the relocation
"""
def prefixes_to_hashes(spec):
return {
str(s.prefix): s.dag_hash()
for s in itertools.chain(
spec.traverse(root=True, deptype="link"), spec.dependencies(deptype="run")
)
}
def get_buildinfo_dict(spec, rel=False):
"""Create metadata for a tarball"""
manifest = get_buildfile_manifest(spec)
prefix_to_hash = dict()
prefix_to_hash[str(spec.package.prefix)] = spec.dag_hash()
deps = spack.build_environment.get_rpath_deps(spec.package)
for d in deps + spec.dependencies(deptype="run"):
prefix_to_hash[str(d.prefix)] = d.dag_hash()
# Create buildinfo data and write it to disk
buildinfo = {}
buildinfo["sbang_install_path"] = spack.hooks.sbang.sbang_install_path()
buildinfo["relative_rpaths"] = rel
buildinfo["buildpath"] = spack.store.layout.root
buildinfo["spackprefix"] = spack.paths.prefix
buildinfo["relative_prefix"] = os.path.relpath(spec.prefix, spack.store.layout.root)
buildinfo["relocate_textfiles"] = manifest["text_to_relocate"]
buildinfo["relocate_binaries"] = manifest["binary_to_relocate"]
buildinfo["relocate_links"] = manifest["link_to_relocate"]
buildinfo["hardlinks_deduped"] = manifest["hardlinks_deduped"]
buildinfo["prefix_to_hash"] = prefix_to_hash
filename = buildinfo_file_name(workdir)
with open(filename, "w") as outfile:
outfile.write(syaml.dump(buildinfo, default_flow_style=True))
return {
"sbang_install_path": spack.hooks.sbang.sbang_install_path(),
"relative_rpaths": rel,
"buildpath": spack.store.layout.root,
"spackprefix": spack.paths.prefix,
"relative_prefix": os.path.relpath(spec.prefix, spack.store.layout.root),
"relocate_textfiles": manifest["text_to_relocate"],
"relocate_binaries": manifest["binary_to_relocate"],
"relocate_links": manifest["link_to_relocate"],
"hardlinks_deduped": manifest["hardlinks_deduped"],
"prefix_to_hash": prefixes_to_hashes(spec),
}
def tarball_directory_name(spec):
@@ -1139,6 +1143,68 @@ def generate_key_index(key_prefix, tmpdir=None):
shutil.rmtree(tmpdir)
@contextmanager
def gzip_compressed_tarfile(path):
"""Create a reproducible, compressed tarfile"""
# Create gzip compressed tarball of the install prefix
# 1) Use explicit empty filename and mtime 0 for gzip header reproducibility.
# If the filename="" is dropped, Python will use fileobj.name instead.
# This should effectively mimick `gzip --no-name`.
# 2) On AMD Ryzen 3700X and an SSD disk, we have the following on compression speed:
# compresslevel=6 gzip default: llvm takes 4mins, roughly 2.1GB
# compresslevel=9 python default: llvm takes 12mins, roughly 2.1GB
# So we follow gzip.
with open(path, "wb") as fileobj, closing(
GzipFile(filename="", mode="wb", compresslevel=6, mtime=0, fileobj=fileobj)
) as gzip_file, tarfile.TarFile(name="", mode="w", fileobj=gzip_file) as tar:
yield tar
def deterministic_tarinfo(tarinfo: tarfile.TarInfo):
# We only add files, symlinks, hardlinks, and directories
# No character devices, block devices and FIFOs should ever enter a tarball.
if tarinfo.isdev():
return None
# For distribution, it makes no sense to user/group data; since (a) they don't exist
# on other machines, and (b) they lead to surprises as `tar x` run as root will change
# ownership if it can. We want to extract as the current user. By setting owner to root,
# root will extract as root, and non-privileged user will extract as themselves.
tarinfo.uid = 0
tarinfo.gid = 0
tarinfo.uname = ""
tarinfo.gname = ""
# Reset mtime to epoch time, our prefixes are not truly immutable, so files may get
# touched; as long as the content does not change, this ensures we get stable tarballs.
tarinfo.mtime = 0
# Normalize mode
if tarinfo.isfile() or tarinfo.islnk():
# If user can execute, use 0o755; else 0o644
# This is to avoid potentially unsafe world writable & exeutable files that may get
# extracted when Python or tar is run with privileges
tarinfo.mode = 0o644 if tarinfo.mode & 0o100 == 0 else 0o755
else: # symbolic link and directories
tarinfo.mode = 0o755
return tarinfo
def tar_add_metadata(tar: tarfile.TarFile, path: str, data: dict):
# Serialize buildinfo for the tarball
bstring = syaml.dump(data, default_flow_style=True).encode("utf-8")
tarinfo = tarfile.TarInfo(name=path)
tarinfo.size = len(bstring)
tar.addfile(deterministic_tarinfo(tarinfo), io.BytesIO(bstring))
def _do_create_tarball(tarfile_path, binaries_dir, pkg_dir, buildinfo):
with gzip_compressed_tarfile(tarfile_path) as tar:
tar.add(name=binaries_dir, arcname=pkg_dir, filter=deterministic_tarinfo)
tar_add_metadata(tar, buildinfo_file_name(pkg_dir), buildinfo)
def _build_tarball(
spec,
out_url,
@@ -1156,15 +1222,37 @@ def _build_tarball(
if not spec.concrete:
raise ValueError("spec must be concrete to build tarball")
# set up some paths
tmpdir = tempfile.mkdtemp()
cache_prefix = build_cache_prefix(tmpdir)
with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir:
_build_tarball_in_stage_dir(
spec,
out_url,
stage_dir=tmpdir,
force=force,
relative=relative,
unsigned=unsigned,
allow_root=allow_root,
key=key,
regenerate_index=regenerate_index,
)
def _build_tarball_in_stage_dir(
spec,
out_url,
stage_dir,
force=False,
relative=False,
unsigned=False,
allow_root=False,
key=None,
regenerate_index=False,
):
cache_prefix = build_cache_prefix(stage_dir)
tarfile_name = tarball_name(spec, ".spack")
tarfile_dir = os.path.join(cache_prefix, tarball_directory_name(spec))
tarfile_path = os.path.join(tarfile_dir, tarfile_name)
spackfile_path = os.path.join(cache_prefix, tarball_path_name(spec, ".spack"))
remote_spackfile_path = url_util.join(out_url, os.path.relpath(spackfile_path, tmpdir))
remote_spackfile_path = url_util.join(out_url, os.path.relpath(spackfile_path, stage_dir))
mkdirp(tarfile_dir)
if web_util.url_exists(remote_spackfile_path):
@@ -1183,7 +1271,7 @@ def _build_tarball(
signed_specfile_path = "{0}.sig".format(specfile_path)
remote_specfile_path = url_util.join(
out_url, os.path.relpath(specfile_path, os.path.realpath(tmpdir))
out_url, os.path.relpath(specfile_path, os.path.realpath(stage_dir))
)
remote_signed_specfile_path = "{0}.sig".format(remote_specfile_path)
@@ -1199,7 +1287,7 @@ def _build_tarball(
raise NoOverwriteException(url_util.format(remote_specfile_path))
pkg_dir = os.path.basename(spec.prefix.rstrip(os.path.sep))
workdir = os.path.join(tmpdir, pkg_dir)
workdir = os.path.join(stage_dir, pkg_dir)
# TODO: We generally don't want to mutate any files, but when using relative
# mode, Spack unfortunately *does* mutate rpaths and links ahead of time.
@@ -1217,39 +1305,22 @@ def _build_tarball(
os.remove(temp_tarfile_path)
else:
binaries_dir = spec.prefix
mkdirp(os.path.join(workdir, ".spack"))
# create info for later relocation and create tar
write_buildinfo_file(spec, workdir, relative)
buildinfo = get_buildinfo_dict(spec, relative)
# optionally make the paths in the binaries relative to each other
# in the spack install tree before creating tarball
try:
if relative:
make_package_relative(workdir, spec, allow_root)
elif not allow_root:
ensure_package_relocatable(workdir, binaries_dir)
except Exception as e:
shutil.rmtree(workdir)
shutil.rmtree(tarfile_dir)
shutil.rmtree(tmpdir)
tty.die(e)
if relative:
make_package_relative(workdir, spec, buildinfo, allow_root)
elif not allow_root:
ensure_package_relocatable(buildinfo, binaries_dir)
# create gzip compressed tarball of the install prefix
# On AMD Ryzen 3700X and an SSD disk, we have the following on compression speed:
# compresslevel=6 gzip default: llvm takes 4mins, roughly 2.1GB
# compresslevel=9 python default: llvm takes 12mins, roughly 2.1GB
# So we follow gzip.
with closing(tarfile.open(tarfile_path, "w:gz", compresslevel=6)) as tar:
tar.add(name=binaries_dir, arcname=pkg_dir)
if not relative:
# Add buildinfo file
buildinfo_path = buildinfo_file_name(workdir)
buildinfo_arcname = buildinfo_file_name(pkg_dir)
tar.add(name=buildinfo_path, arcname=buildinfo_arcname)
_do_create_tarball(tarfile_path, binaries_dir, pkg_dir, buildinfo)
# remove copy of install directory
shutil.rmtree(workdir)
if relative:
shutil.rmtree(workdir)
# get the sha256 checksum of the tarball
checksum = checksum_tarball(tarfile_path)
@@ -1275,7 +1346,11 @@ def _build_tarball(
spec_dict["buildinfo"] = buildinfo
with open(specfile_path, "w") as outfile:
outfile.write(sjson.dump(spec_dict))
# Note: when using gpg clear sign, we need to avoid long lines (19995 chars).
# If lines are longer, they are truncated without error. Thanks GPG!
# So, here we still add newlines, but no indent, so save on file size and
# line length.
json.dump(spec_dict, outfile, indent=0, separators=(",", ":"))
# sign the tarball and spec file with gpg
if not unsigned:
@@ -1292,18 +1367,15 @@ def _build_tarball(
tty.debug('Buildcache for "{0}" written to \n {1}'.format(spec, remote_spackfile_path))
try:
# push the key to the build cache's _pgp directory so it can be
# imported
if not unsigned:
push_keys(out_url, keys=[key], regenerate_index=regenerate_index, tmpdir=tmpdir)
# push the key to the build cache's _pgp directory so it can be
# imported
if not unsigned:
push_keys(out_url, keys=[key], regenerate_index=regenerate_index, tmpdir=stage_dir)
# create an index.json for the build_cache directory so specs can be
# found
if regenerate_index:
generate_package_index(url_util.join(out_url, os.path.relpath(cache_prefix, tmpdir)))
finally:
shutil.rmtree(tmpdir)
# create an index.json for the build_cache directory so specs can be
# found
if regenerate_index:
generate_package_index(url_util.join(out_url, os.path.relpath(cache_prefix, stage_dir)))
return None
@@ -1536,13 +1608,12 @@ def download_tarball(spec, unsigned=False, mirrors_for_spec=None):
return None
def make_package_relative(workdir, spec, allow_root):
def make_package_relative(workdir, spec, buildinfo, allow_root):
"""
Change paths in binaries to relative paths. Change absolute symlinks
to relative symlinks.
"""
prefix = spec.prefix
buildinfo = read_buildinfo_file(workdir)
old_layout_root = buildinfo["buildpath"]
orig_path_names = list()
cur_path_names = list()
@@ -1566,9 +1637,8 @@ def make_package_relative(workdir, spec, allow_root):
relocate.make_link_relative(cur_path_names, orig_path_names)
def ensure_package_relocatable(workdir, binaries_dir):
def ensure_package_relocatable(buildinfo, binaries_dir):
"""Check if package binaries are relocatable."""
buildinfo = read_buildinfo_file(workdir)
binaries = [os.path.join(binaries_dir, f) for f in buildinfo["relocate_binaries"]]
relocate.ensure_binaries_are_relocatable(binaries)
@@ -1729,7 +1799,15 @@ def is_backup_file(file):
relocate.relocate_text(text_names, prefix_to_prefix_text)
# relocate the install prefixes in binary files including dependencies
relocate.relocate_text_bin(files_to_relocate, prefix_to_prefix_bin)
changed_files = relocate.relocate_text_bin(files_to_relocate, prefix_to_prefix_bin)
# Add ad-hoc signatures to patched macho files when on macOS.
if "macho" in platform.binary_formats and sys.platform == "darwin":
codesign = which("codesign")
if not codesign:
return
for binary in changed_files:
codesign("-fs-", binary)
# If we are installing back to the same location
# relocate the sbang location if the spack directory changed
@@ -1948,7 +2026,7 @@ def install_root_node(spec, allow_root, unsigned=False, force=False, sha256=None
with spack.util.path.filter_padding():
tty.msg('Installing "{0}" from a buildcache'.format(spec.format()))
extract_tarball(spec, download_result, allow_root, unsigned, force)
spack.hooks.post_install(spec)
spack.hooks.post_install(spec, False)
spack.store.db.add(spec, spack.store.layout)

View File

@@ -9,6 +9,7 @@
import sys
import sysconfig
import warnings
from typing import Dict, Optional, Sequence, Union
import archspec.cpu
@@ -21,8 +22,10 @@
from .config import spec_for_current_python
QueryInfo = Dict[str, "spack.spec.Spec"]
def _python_import(module):
def _python_import(module: str) -> bool:
try:
__import__(module)
except ImportError:
@@ -30,7 +33,9 @@ def _python_import(module):
return True
def _try_import_from_store(module, query_spec, query_info=None):
def _try_import_from_store(
module: str, query_spec: Union[str, "spack.spec.Spec"], query_info: Optional[QueryInfo] = None
) -> bool:
"""Return True if the module can be imported from an already
installed spec, False otherwise.
@@ -52,7 +57,7 @@ def _try_import_from_store(module, query_spec, query_info=None):
module_paths = [
os.path.join(candidate_spec.prefix, pkg.purelib),
os.path.join(candidate_spec.prefix, pkg.platlib),
] # type: list[str]
]
path_before = list(sys.path)
# NOTE: try module_paths first and last, last allows an existing version in path
@@ -89,7 +94,7 @@ def _try_import_from_store(module, query_spec, query_info=None):
return False
def _fix_ext_suffix(candidate_spec):
def _fix_ext_suffix(candidate_spec: "spack.spec.Spec"):
"""Fix the external suffixes of Python extensions on the fly for
platforms that may need it
@@ -157,7 +162,11 @@ def _fix_ext_suffix(candidate_spec):
os.symlink(abs_path, link_name)
def _executables_in_store(executables, query_spec, query_info=None):
def _executables_in_store(
executables: Sequence[str],
query_spec: Union["spack.spec.Spec", str],
query_info: Optional[QueryInfo] = None,
) -> bool:
"""Return True if at least one of the executables can be retrieved from
a spec in store, False otherwise.
@@ -193,7 +202,7 @@ def _executables_in_store(executables, query_spec, query_info=None):
return False
def _root_spec(spec_str):
def _root_spec(spec_str: str) -> str:
"""Add a proper compiler and target to a spec used during bootstrapping.
Args:

View File

@@ -7,6 +7,7 @@
import contextlib
import os.path
import sys
from typing import Any, Dict, Generator, MutableSequence, Sequence
from llnl.util import tty
@@ -24,12 +25,12 @@
_REF_COUNT = 0
def is_bootstrapping():
def is_bootstrapping() -> bool:
"""Return True if we are in a bootstrapping context, False otherwise."""
return _REF_COUNT > 0
def spec_for_current_python():
def spec_for_current_python() -> str:
"""For bootstrapping purposes we are just interested in the Python
minor version (all patches are ABI compatible with the same minor).
@@ -41,14 +42,14 @@ def spec_for_current_python():
return f"python@{version_str}"
def root_path():
def root_path() -> str:
"""Root of all the bootstrap related folders"""
return spack.util.path.canonicalize_path(
spack.config.get("bootstrap:root", spack.paths.default_user_bootstrap_path)
)
def store_path():
def store_path() -> str:
"""Path to the store used for bootstrapped software"""
enabled = spack.config.get("bootstrap:enable", True)
if not enabled:
@@ -59,7 +60,7 @@ def store_path():
@contextlib.contextmanager
def spack_python_interpreter():
def spack_python_interpreter() -> Generator:
"""Override the current configuration to set the interpreter under
which Spack is currently running as the only Python external spec
available.
@@ -76,18 +77,18 @@ def spack_python_interpreter():
yield
def _store_path():
def _store_path() -> str:
bootstrap_root_path = root_path()
return spack.util.path.canonicalize_path(os.path.join(bootstrap_root_path, "store"))
def _config_path():
def _config_path() -> str:
bootstrap_root_path = root_path()
return spack.util.path.canonicalize_path(os.path.join(bootstrap_root_path, "config"))
@contextlib.contextmanager
def ensure_bootstrap_configuration():
def ensure_bootstrap_configuration() -> Generator:
"""Swap the current configuration for the one used to bootstrap Spack.
The context manager is reference counted to ensure we don't swap multiple
@@ -107,7 +108,7 @@ def ensure_bootstrap_configuration():
_REF_COUNT -= 1
def _read_and_sanitize_configuration():
def _read_and_sanitize_configuration() -> Dict[str, Any]:
"""Read the user configuration that needs to be reused for bootstrapping
and remove the entries that should not be copied over.
"""
@@ -120,9 +121,11 @@ def _read_and_sanitize_configuration():
return user_configuration
def _bootstrap_config_scopes():
def _bootstrap_config_scopes() -> Sequence["spack.config.ConfigScope"]:
tty.debug("[BOOTSTRAP CONFIG SCOPE] name=_builtin")
config_scopes = [spack.config.InternalConfigScope("_builtin", spack.config.config_defaults)]
config_scopes: MutableSequence["spack.config.ConfigScope"] = [
spack.config.InternalConfigScope("_builtin", spack.config.config_defaults)
]
configuration_paths = (spack.config.configuration_defaults_path, ("bootstrap", _config_path()))
for name, path in configuration_paths:
platform = spack.platforms.host().name
@@ -137,7 +140,7 @@ def _bootstrap_config_scopes():
return config_scopes
def _add_compilers_if_missing():
def _add_compilers_if_missing() -> None:
arch = spack.spec.ArchSpec.frontend_arch()
if not spack.compilers.compilers_for_arch(arch):
new_compilers = spack.compilers.find_new_compilers()
@@ -146,7 +149,7 @@ def _add_compilers_if_missing():
@contextlib.contextmanager
def _ensure_bootstrap_configuration():
def _ensure_bootstrap_configuration() -> Generator:
bootstrap_store_path = store_path()
user_configuration = _read_and_sanitize_configuration()
with spack.environment.no_active_environment():

View File

@@ -29,7 +29,7 @@
import os.path
import sys
import uuid
from typing import Callable, List, Optional
from typing import Any, Callable, Dict, List, Optional, Tuple
from llnl.util import tty
from llnl.util.lang import GroupedExceptionHandler
@@ -66,6 +66,9 @@
_bootstrap_methods = {}
ConfigDictionary = Dict[str, Any]
def bootstrapper(bootstrapper_type: str):
"""Decorator to register classes implementing bootstrapping
methods.
@@ -86,7 +89,7 @@ class Bootstrapper:
config_scope_name = ""
def __init__(self, conf):
def __init__(self, conf: ConfigDictionary) -> None:
self.conf = conf
self.name = conf["name"]
self.metadata_dir = spack.util.path.canonicalize_path(conf["metadata"])
@@ -100,7 +103,7 @@ def __init__(self, conf):
self.url = url
@property
def mirror_scope(self):
def mirror_scope(self) -> spack.config.InternalConfigScope:
"""Mirror scope to be pushed onto the bootstrapping configuration when using
this bootstrapper.
"""
@@ -121,7 +124,7 @@ def try_import(self, module: str, abstract_spec_str: str) -> bool:
"""
return False
def try_search_path(self, executables: List[str], abstract_spec_str: str) -> bool:
def try_search_path(self, executables: Tuple[str], abstract_spec_str: str) -> bool:
"""Try to search some executables in the prefix of specs satisfying the abstract
spec passed as argument.
@@ -139,13 +142,15 @@ def try_search_path(self, executables: List[str], abstract_spec_str: str) -> boo
class BuildcacheBootstrapper(Bootstrapper):
"""Install the software needed during bootstrapping from a buildcache."""
def __init__(self, conf):
def __init__(self, conf) -> None:
super().__init__(conf)
self.last_search = None
self.last_search: Optional[ConfigDictionary] = None
self.config_scope_name = f"bootstrap_buildcache-{uuid.uuid4()}"
@staticmethod
def _spec_and_platform(abstract_spec_str):
def _spec_and_platform(
abstract_spec_str: str,
) -> Tuple[spack.spec.Spec, spack.platforms.Platform]:
"""Return the spec object and platform we need to use when
querying the buildcache.
@@ -158,7 +163,7 @@ def _spec_and_platform(abstract_spec_str):
bincache_platform = spack.platforms.real_host()
return abstract_spec, bincache_platform
def _read_metadata(self, package_name):
def _read_metadata(self, package_name: str) -> Any:
"""Return metadata about the given package."""
json_filename = f"{package_name}.json"
json_dir = self.metadata_dir
@@ -167,7 +172,13 @@ def _read_metadata(self, package_name):
data = json.load(stream)
return data
def _install_by_hash(self, pkg_hash, pkg_sha256, index, bincache_platform):
def _install_by_hash(
self,
pkg_hash: str,
pkg_sha256: str,
index: List[spack.spec.Spec],
bincache_platform: spack.platforms.Platform,
) -> None:
index_spec = next(x for x in index if x.dag_hash() == pkg_hash)
# Reconstruct the compiler that we need to use for bootstrapping
compiler_entry = {
@@ -192,7 +203,13 @@ def _install_by_hash(self, pkg_hash, pkg_sha256, index, bincache_platform):
match, allow_root=True, unsigned=True, force=True, sha256=pkg_sha256
)
def _install_and_test(self, abstract_spec, bincache_platform, bincache_data, test_fn):
def _install_and_test(
self,
abstract_spec: spack.spec.Spec,
bincache_platform: spack.platforms.Platform,
bincache_data,
test_fn,
) -> bool:
# Ensure we see only the buildcache being used to bootstrap
with spack.config.override(self.mirror_scope):
# This index is currently needed to get the compiler used to build some
@@ -208,7 +225,7 @@ def _install_and_test(self, abstract_spec, bincache_platform, bincache_data, tes
# This will be None for things that don't depend on python
python_spec = item.get("python", None)
# Skip specs which are not compatible
if not abstract_spec.satisfies(candidate_spec):
if not abstract_spec.intersects(candidate_spec):
continue
if python_spec is not None and python_spec not in abstract_spec:
@@ -217,13 +234,14 @@ def _install_and_test(self, abstract_spec, bincache_platform, bincache_data, tes
for _, pkg_hash, pkg_sha256 in item["binaries"]:
self._install_by_hash(pkg_hash, pkg_sha256, index, bincache_platform)
info = {}
info: ConfigDictionary = {}
if test_fn(query_spec=abstract_spec, query_info=info):
self.last_search = info
return True
return False
def try_import(self, module, abstract_spec_str):
def try_import(self, module: str, abstract_spec_str: str) -> bool:
info: ConfigDictionary
test_fn, info = functools.partial(_try_import_from_store, module), {}
if test_fn(query_spec=abstract_spec_str, query_info=info):
return True
@@ -235,7 +253,8 @@ def try_import(self, module, abstract_spec_str):
data = self._read_metadata(module)
return self._install_and_test(abstract_spec, bincache_platform, data, test_fn)
def try_search_path(self, executables, abstract_spec_str):
def try_search_path(self, executables: Tuple[str], abstract_spec_str: str) -> bool:
info: ConfigDictionary
test_fn, info = functools.partial(_executables_in_store, executables), {}
if test_fn(query_spec=abstract_spec_str, query_info=info):
self.last_search = info
@@ -251,13 +270,13 @@ def try_search_path(self, executables, abstract_spec_str):
class SourceBootstrapper(Bootstrapper):
"""Install the software needed during bootstrapping from sources."""
def __init__(self, conf):
def __init__(self, conf) -> None:
super().__init__(conf)
self.last_search = None
self.last_search: Optional[ConfigDictionary] = None
self.config_scope_name = f"bootstrap_source-{uuid.uuid4()}"
def try_import(self, module, abstract_spec_str):
info = {}
def try_import(self, module: str, abstract_spec_str: str) -> bool:
info: ConfigDictionary = {}
if _try_import_from_store(module, abstract_spec_str, query_info=info):
self.last_search = info
return True
@@ -293,8 +312,8 @@ def try_import(self, module, abstract_spec_str):
return True
return False
def try_search_path(self, executables, abstract_spec_str):
info = {}
def try_search_path(self, executables: Tuple[str], abstract_spec_str: str) -> bool:
info: ConfigDictionary = {}
if _executables_in_store(executables, abstract_spec_str, query_info=info):
self.last_search = info
return True
@@ -323,13 +342,13 @@ def try_search_path(self, executables, abstract_spec_str):
return False
def create_bootstrapper(conf):
def create_bootstrapper(conf: ConfigDictionary):
"""Return a bootstrap object built according to the configuration argument"""
btype = conf["type"]
return _bootstrap_methods[btype](conf)
def source_is_enabled_or_raise(conf):
def source_is_enabled_or_raise(conf: ConfigDictionary):
"""Raise ValueError if the source is not enabled for bootstrapping"""
trusted, name = spack.config.get("bootstrap:trusted"), conf["name"]
if not trusted.get(name, False):
@@ -454,7 +473,7 @@ def ensure_executables_in_path_or_raise(
raise RuntimeError(msg)
def _add_externals_if_missing():
def _add_externals_if_missing() -> None:
search_list = [
# clingo
spack.repo.path.get_pkg_class("cmake"),
@@ -468,41 +487,41 @@ def _add_externals_if_missing():
spack.detection.update_configuration(detected_packages, scope="bootstrap")
def clingo_root_spec():
def clingo_root_spec() -> str:
"""Return the root spec used to bootstrap clingo"""
return _root_spec("clingo-bootstrap@spack+python")
def ensure_clingo_importable_or_raise():
def ensure_clingo_importable_or_raise() -> None:
"""Ensure that the clingo module is available for import."""
ensure_module_importable_or_raise(module="clingo", abstract_spec=clingo_root_spec())
def gnupg_root_spec():
def gnupg_root_spec() -> str:
"""Return the root spec used to bootstrap GnuPG"""
return _root_spec("gnupg@2.3:")
def ensure_gpg_in_path_or_raise():
def ensure_gpg_in_path_or_raise() -> None:
"""Ensure gpg or gpg2 are in the PATH or raise."""
return ensure_executables_in_path_or_raise(
executables=["gpg2", "gpg"], abstract_spec=gnupg_root_spec()
)
def patchelf_root_spec():
def patchelf_root_spec() -> str:
"""Return the root spec used to bootstrap patchelf"""
# 0.13.1 is the last version not to require C++17.
return _root_spec("patchelf@0.13.1:")
def verify_patchelf(patchelf):
def verify_patchelf(patchelf: "spack.util.executable.Executable") -> bool:
"""Older patchelf versions can produce broken binaries, so we
verify the version here.
Arguments:
patchelf (spack.util.executable.Executable): patchelf executable
patchelf: patchelf executable
"""
out = patchelf("--version", output=str, error=os.devnull, fail_on_error=False).strip()
if patchelf.returncode != 0:
@@ -517,7 +536,7 @@ def verify_patchelf(patchelf):
return version >= spack.version.Version("0.13.1")
def ensure_patchelf_in_path_or_raise():
def ensure_patchelf_in_path_or_raise() -> None:
"""Ensure patchelf is in the PATH or raise."""
# The old concretizer is not smart and we're doing its job: if the latest patchelf
# does not concretize because the compiler doesn't support C++17, we try to
@@ -534,7 +553,7 @@ def ensure_patchelf_in_path_or_raise():
)
def ensure_core_dependencies():
def ensure_core_dependencies() -> None:
"""Ensure the presence of all the core dependencies."""
if sys.platform.lower() == "linux":
ensure_patchelf_in_path_or_raise()
@@ -543,7 +562,7 @@ def ensure_core_dependencies():
ensure_clingo_importable_or_raise()
def all_core_root_specs():
def all_core_root_specs() -> List[str]:
"""Return a list of all the core root specs that may be used to bootstrap Spack"""
return [clingo_root_spec(), gnupg_root_spec(), patchelf_root_spec()]

View File

@@ -9,6 +9,7 @@
import pathlib
import sys
import warnings
from typing import List
import archspec.cpu
@@ -27,7 +28,7 @@ class BootstrapEnvironment(spack.environment.Environment):
"""Environment to install dependencies of Spack for a given interpreter and architecture"""
@classmethod
def spack_dev_requirements(cls):
def spack_dev_requirements(cls) -> List[str]:
"""Spack development requirements"""
return [
isort_root_spec(),
@@ -38,7 +39,7 @@ def spack_dev_requirements(cls):
]
@classmethod
def environment_root(cls):
def environment_root(cls) -> pathlib.Path:
"""Environment root directory"""
bootstrap_root_path = root_path()
python_part = spec_for_current_python().replace("@", "")
@@ -52,12 +53,12 @@ def environment_root(cls):
)
@classmethod
def view_root(cls):
def view_root(cls) -> pathlib.Path:
"""Location of the view"""
return cls.environment_root().joinpath("view")
@classmethod
def pythonpaths(cls):
def pythonpaths(cls) -> List[str]:
"""Paths to be added to sys.path or PYTHONPATH"""
python_dir_part = f"python{'.'.join(str(x) for x in sys.version_info[:2])}"
glob_expr = str(cls.view_root().joinpath("**", python_dir_part, "**"))
@@ -68,21 +69,21 @@ def pythonpaths(cls):
return result
@classmethod
def bin_dirs(cls):
def bin_dirs(cls) -> List[pathlib.Path]:
"""Paths to be added to PATH"""
return [cls.view_root().joinpath("bin")]
@classmethod
def spack_yaml(cls):
def spack_yaml(cls) -> pathlib.Path:
"""Environment spack.yaml file"""
return cls.environment_root().joinpath("spack.yaml")
def __init__(self):
def __init__(self) -> None:
if not self.spack_yaml().exists():
self._write_spack_yaml_file()
super().__init__(self.environment_root())
def update_installations(self):
def update_installations(self) -> None:
"""Update the installations of this environment.
The update is done using a depfile on Linux and macOS, and using the ``install_all``
@@ -103,7 +104,7 @@ def update_installations(self):
self._install_with_depfile()
self.write(regenerate=True)
def update_syspath_and_environ(self):
def update_syspath_and_environ(self) -> None:
"""Update ``sys.path`` and the PATH, PYTHONPATH environment variables to point to
the environment view.
"""
@@ -119,7 +120,7 @@ def update_syspath_and_environ(self):
+ [str(x) for x in self.pythonpaths()]
)
def _install_with_depfile(self):
def _install_with_depfile(self) -> None:
spackcmd = spack.util.executable.which("spack")
spackcmd(
"-e",
@@ -141,7 +142,7 @@ def _install_with_depfile(self):
**kwargs,
)
def _write_spack_yaml_file(self):
def _write_spack_yaml_file(self) -> None:
tty.msg(
"[BOOTSTRAPPING] Spack has missing dependencies, creating a bootstrapping environment"
)
@@ -159,32 +160,32 @@ def _write_spack_yaml_file(self):
self.spack_yaml().write_text(template.render(context), encoding="utf-8")
def isort_root_spec():
def isort_root_spec() -> str:
"""Return the root spec used to bootstrap isort"""
return _root_spec("py-isort@4.3.5:")
def mypy_root_spec():
def mypy_root_spec() -> str:
"""Return the root spec used to bootstrap mypy"""
return _root_spec("py-mypy@0.900:")
def black_root_spec():
def black_root_spec() -> str:
"""Return the root spec used to bootstrap black"""
return _root_spec("py-black@:23.1.0")
def flake8_root_spec():
def flake8_root_spec() -> str:
"""Return the root spec used to bootstrap flake8"""
return _root_spec("py-flake8")
def pytest_root_spec():
def pytest_root_spec() -> str:
"""Return the root spec used to bootstrap flake8"""
return _root_spec("py-pytest")
def ensure_environment_dependencies():
def ensure_environment_dependencies() -> None:
"""Ensure Spack dependencies from the bootstrap environment are installed and ready to use"""
with BootstrapEnvironment() as env:
env.update_installations()

View File

@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Query the status of bootstrapping on this machine"""
import platform
from typing import List, Optional, Sequence, Tuple, Union
import spack.util.executable
@@ -19,8 +20,12 @@
pytest_root_spec,
)
ExecutablesType = Union[str, Sequence[str]]
RequiredResponseType = Tuple[bool, Optional[str]]
SpecLike = Union["spack.spec.Spec", str]
def _required_system_executable(exes, msg):
def _required_system_executable(exes: ExecutablesType, msg: str) -> RequiredResponseType:
"""Search for an executable is the system path only."""
if isinstance(exes, str):
exes = (exes,)
@@ -29,7 +34,9 @@ def _required_system_executable(exes, msg):
return False, msg
def _required_executable(exes, query_spec, msg):
def _required_executable(
exes: ExecutablesType, query_spec: SpecLike, msg: str
) -> RequiredResponseType:
"""Search for an executable in the system path or in the bootstrap store."""
if isinstance(exes, str):
exes = (exes,)
@@ -38,7 +45,7 @@ def _required_executable(exes, query_spec, msg):
return False, msg
def _required_python_module(module, query_spec, msg):
def _required_python_module(module: str, query_spec: SpecLike, msg: str) -> RequiredResponseType:
"""Check if a Python module is available in the current interpreter or
if it can be loaded from the bootstrap store
"""
@@ -47,7 +54,7 @@ def _required_python_module(module, query_spec, msg):
return False, msg
def _missing(name, purpose, system_only=True):
def _missing(name: str, purpose: str, system_only: bool = True) -> str:
"""Message to be printed if an executable is not found"""
msg = '[{2}] MISSING "{0}": {1}'
if not system_only:
@@ -55,7 +62,7 @@ def _missing(name, purpose, system_only=True):
return msg.format(name, purpose, "@*y{{-}}")
def _core_requirements():
def _core_requirements() -> List[RequiredResponseType]:
_core_system_exes = {
"make": _missing("make", "required to build software from sources"),
"patch": _missing("patch", "required to patch source code before building"),
@@ -80,7 +87,7 @@ def _core_requirements():
return result
def _buildcache_requirements():
def _buildcache_requirements() -> List[RequiredResponseType]:
_buildcache_exes = {
"file": _missing("file", "required to analyze files for buildcaches"),
("gpg2", "gpg"): _missing("gpg2", "required to sign/verify buildcaches", False),
@@ -103,7 +110,7 @@ def _buildcache_requirements():
return result
def _optional_requirements():
def _optional_requirements() -> List[RequiredResponseType]:
_optional_exes = {
"zstd": _missing("zstd", "required to compress/decompress code archives"),
"svn": _missing("svn", "required to manage subversion repositories"),
@@ -114,7 +121,7 @@ def _optional_requirements():
return result
def _development_requirements():
def _development_requirements() -> List[RequiredResponseType]:
# Ensure we trigger environment modifications if we have an environment
if BootstrapEnvironment.spack_yaml().exists():
with BootstrapEnvironment() as env:
@@ -139,7 +146,7 @@ def _development_requirements():
]
def status_message(section):
def status_message(section) -> Tuple[str, bool]:
"""Return a status message to be printed to screen that refers to the
section passed as argument and a bool which is True if there are missing
dependencies.
@@ -161,7 +168,7 @@ def status_message(section):
with ensure_bootstrap_configuration():
missing_software = False
for found, err_msg in required_software():
if not found:
if not found and err_msg:
missing_software = True
msg += "\n " + err_msg
msg += "\n"

View File

@@ -69,13 +69,13 @@
from spack.installer import InstallError
from spack.util.cpus import cpus_available
from spack.util.environment import (
SYSTEM_DIRS,
EnvironmentModifications,
env_flag,
filter_system_paths,
get_path,
inspect_path,
is_system_path,
system_dirs,
validate,
)
from spack.util.executable import Executable
@@ -397,7 +397,7 @@ def set_compiler_environment_variables(pkg, env):
env.set("SPACK_COMPILER_SPEC", str(spec.compiler))
env.set("SPACK_SYSTEM_DIRS", ":".join(system_dirs))
env.set("SPACK_SYSTEM_DIRS", ":".join(SYSTEM_DIRS))
compiler.setup_custom_environment(pkg, env)
@@ -485,7 +485,13 @@ def update_compiler_args_for_dep(dep):
query = pkg.spec[dep.name]
dep_link_dirs = list()
try:
# In some circumstances (particularly for externals) finding
# libraries packages can be time consuming, so indicate that
# we are performing this operation (and also report when it
# finishes).
tty.debug("Collecting libraries for {0}".format(dep.name))
dep_link_dirs.extend(query.libs.directories)
tty.debug("Libraries for {0} have been collected.".format(dep.name))
except NoLibrariesError:
tty.debug("No libraries found for {0}".format(dep.name))
@@ -772,7 +778,9 @@ def setup_package(pkg, dirty, context="build"):
set_compiler_environment_variables(pkg, env_mods)
set_wrapper_variables(pkg, env_mods)
tty.debug("setup_package: grabbing modifications from dependencies")
env_mods.extend(modifications_from_dependencies(pkg.spec, context, custom_mods_only=False))
tty.debug("setup_package: collected all modifications from dependencies")
# architecture specific setup
platform = spack.platforms.by_name(pkg.spec.architecture.platform)
@@ -780,6 +788,7 @@ def setup_package(pkg, dirty, context="build"):
platform.setup_platform_environment(pkg, env_mods)
if context == "build":
tty.debug("setup_package: setup build environment for root")
builder = spack.builder.create(pkg)
builder.setup_build_environment(env_mods)
@@ -790,6 +799,7 @@ def setup_package(pkg, dirty, context="build"):
" includes and omit it when invoked with '--cflags'."
)
elif context == "test":
tty.debug("setup_package: setup test environment for root")
env_mods.extend(
inspect_path(
pkg.spec.prefix,
@@ -806,6 +816,7 @@ def setup_package(pkg, dirty, context="build"):
# Load modules on an already clean environment, just before applying Spack's
# own environment modifications. This ensures Spack controls CC/CXX/... variables.
if need_compiler:
tty.debug("setup_package: loading compiler modules")
for mod in pkg.compiler.modules:
load_module(mod)
@@ -943,6 +954,7 @@ def default_modifications_for_dep(dep):
_make_runnable(dep, env)
def add_modifications_for_dep(dep):
tty.debug("Adding env modifications for {0}".format(dep.name))
# Some callers of this function only want the custom modifications.
# For callers that want both custom and default modifications, we want
# to perform the default modifications here (this groups custom
@@ -968,6 +980,7 @@ def add_modifications_for_dep(dep):
builder.setup_dependent_build_environment(env, spec)
else:
dpkg.setup_dependent_run_environment(env, spec)
tty.debug("Added env modifications for {0}".format(dep.name))
# Note that we want to perform environment modifications in a fixed order.
# The Spec.traverse method provides this: i.e. in addition to

View File

@@ -8,7 +8,7 @@
import platform
import re
import sys
from typing import List, Tuple
from typing import List, Optional, Tuple
import llnl.util.filesystem as fs
@@ -16,7 +16,7 @@
import spack.builder
import spack.package_base
import spack.util.path
from spack.directives import build_system, depends_on, variant
from spack.directives import build_system, conflicts, depends_on, variant
from spack.multimethod import when
from ._checks import BaseBuilder, execute_build_time_tests
@@ -35,6 +35,43 @@ def _extract_primary_generator(generator):
return primary_generator
def generator(*names: str, default: Optional[str] = None):
"""The build system generator to use.
See ``cmake --help`` for a list of valid generators.
Currently, "Unix Makefiles" and "Ninja" are the only generators
that Spack supports. Defaults to "Unix Makefiles".
See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
for more information.
Args:
names: allowed generators for this package
default: default generator
"""
allowed_values = ("make", "ninja")
if any(x not in allowed_values for x in names):
msg = "only 'make' and 'ninja' are allowed for CMake's 'generator' directive"
raise ValueError(msg)
default = default or names[0]
not_used = [x for x in allowed_values if x not in names]
def _values(x):
return x in allowed_values
_values.__doc__ = f"{','.join(names)}"
variant(
"generator",
default=default,
values=_values,
description="the build system generator to use",
)
for x in not_used:
conflicts(f"generator={x}")
class CMakePackage(spack.package_base.PackageBase):
"""Specialized class for packages built using CMake
@@ -67,8 +104,15 @@ class CMakePackage(spack.package_base.PackageBase):
when="^cmake@3.9:",
description="CMake interprocedural optimization",
)
if sys.platform == "win32":
generator("ninja")
else:
generator("ninja", "make", default="make")
depends_on("cmake", type="build")
depends_on("ninja", type="build", when="platform=windows")
depends_on("gmake", type="build", when="generator=make")
depends_on("ninja", type="build", when="generator=ninja")
def flags_to_build_system_args(self, flags):
"""Return a list of all command line arguments to pass the specified
@@ -138,18 +182,6 @@ class CMakeBuilder(BaseBuilder):
| :py:meth:`~.CMakeBuilder.build_directory` | Directory where to |
| | build the package |
+-----------------------------------------------+--------------------+
The generator used by CMake can be specified by providing the ``generator``
attribute. Per
https://cmake.org/cmake/help/git-master/manual/cmake-generators.7.html,
the format is: [<secondary-generator> - ]<primary_generator>.
The full list of primary and secondary generators supported by CMake may be found
in the documentation for the version of CMake used; however, at this time Spack
supports only the primary generators "Unix Makefiles" and "Ninja." Spack's CMake
support is agnostic with respect to primary generators. Spack will generate a
runtime error if the generator string does not follow the prescribed format, or if
the primary generator is not supported.
"""
#: Phases of a CMake package
@@ -160,7 +192,6 @@ class CMakeBuilder(BaseBuilder):
#: Names associated with package attributes in the old build-system format
legacy_attributes: Tuple[str, ...] = (
"generator",
"build_targets",
"install_targets",
"build_time_test_callbacks",
@@ -171,16 +202,6 @@ class CMakeBuilder(BaseBuilder):
"build_directory",
)
#: The build system generator to use.
#:
#: See ``cmake --help`` for a list of valid generators.
#: Currently, "Unix Makefiles" and "Ninja" are the only generators
#: that Spack supports. Defaults to "Unix Makefiles".
#:
#: See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
#: for more information.
generator = "Ninja" if sys.platform == "win32" else "Unix Makefiles"
#: Targets to be used during the build phase
build_targets: List[str] = []
#: Targets to be used during the install phase
@@ -202,12 +223,20 @@ def root_cmakelists_dir(self):
"""
return self.pkg.stage.source_path
@property
def generator(self):
if self.spec.satisfies("generator=make"):
return "Unix Makefiles"
if self.spec.satisfies("generator=ninja"):
return "Ninja"
msg = f'{self.spec.format()} has an unsupported value for the "generator" variant'
raise ValueError(msg)
@property
def std_cmake_args(self):
"""Standard cmake arguments provided as a property for
convenience of package writers
"""
# standard CMake arguments
std_cmake_args = CMakeBuilder.std_args(self.pkg, generator=self.generator)
std_cmake_args += getattr(self.pkg, "cmake_flag_args", [])
return std_cmake_args

View File

@@ -5,6 +5,7 @@
"""Caches used by Spack to store data"""
import os
from typing import Union
import llnl.util.lang
from llnl.util.filesystem import mkdirp
@@ -34,7 +35,9 @@ def _misc_cache():
#: Spack's cache for small data
misc_cache = llnl.util.lang.Singleton(_misc_cache)
misc_cache: Union[
spack.util.file_cache.FileCache, llnl.util.lang.Singleton
] = llnl.util.lang.Singleton(_misc_cache)
def fetch_cache_location():
@@ -88,4 +91,6 @@ def symlink(self, mirror_ref):
#: Spack's local cache for downloaded source archives
fetch_cache = llnl.util.lang.Singleton(_fetch_cache)
fetch_cache: Union[
spack.fetch_strategy.FsCache, llnl.util.lang.Singleton
] = llnl.util.lang.Singleton(_fetch_cache)

View File

@@ -38,6 +38,7 @@
import spack.util.spack_yaml as syaml
import spack.util.url as url_util
import spack.util.web as web_util
from spack import traverse
from spack.error import SpackError
from spack.reporters import CDash, CDashConfiguration
from spack.reporters.cdash import build_stamp as cdash_build_stamp
@@ -361,60 +362,7 @@ def append_dep(s, d):
def _spec_matches(spec, match_string):
return spec.satisfies(match_string)
def _remove_attributes(src_dict, dest_dict):
if "tags" in src_dict and "tags" in dest_dict:
# For 'tags', we remove any tags that are listed for removal
for tag in src_dict["tags"]:
while tag in dest_dict["tags"]:
dest_dict["tags"].remove(tag)
def _copy_attributes(attrs_list, src_dict, dest_dict):
for runner_attr in attrs_list:
if runner_attr in src_dict:
if runner_attr in dest_dict and runner_attr == "tags":
# For 'tags', we combine the lists of tags, while
# avoiding duplicates
for tag in src_dict[runner_attr]:
if tag not in dest_dict[runner_attr]:
dest_dict[runner_attr].append(tag)
elif runner_attr in dest_dict and runner_attr == "variables":
# For 'variables', we merge the dictionaries. Any conflicts
# (i.e. 'runner-attributes' has same variable key as the
# higher level) we resolve by keeping the more specific
# 'runner-attributes' version.
for src_key, src_val in src_dict[runner_attr].items():
dest_dict[runner_attr][src_key] = copy.deepcopy(src_dict[runner_attr][src_key])
else:
dest_dict[runner_attr] = copy.deepcopy(src_dict[runner_attr])
def _find_matching_config(spec, gitlab_ci):
runner_attributes = {}
overridable_attrs = ["image", "tags", "variables", "before_script", "script", "after_script"]
_copy_attributes(overridable_attrs, gitlab_ci, runner_attributes)
matched = False
only_first = gitlab_ci.get("match_behavior", "first") == "first"
for ci_mapping in gitlab_ci["mappings"]:
for match_string in ci_mapping["match"]:
if _spec_matches(spec, match_string):
matched = True
if "remove-attributes" in ci_mapping:
_remove_attributes(ci_mapping["remove-attributes"], runner_attributes)
if "runner-attributes" in ci_mapping:
_copy_attributes(
overridable_attrs, ci_mapping["runner-attributes"], runner_attributes
)
break
if matched and only_first:
break
return runner_attributes if matched else None
return spec.intersects(match_string)
def _format_job_needs(
@@ -490,16 +438,28 @@ def compute_affected_packages(rev1="HEAD^", rev2="HEAD"):
return spack.repo.get_all_package_diffs("ARC", rev1=rev1, rev2=rev2)
def get_spec_filter_list(env, affected_pkgs):
def get_spec_filter_list(env, affected_pkgs, dependent_traverse_depth=None):
"""Given a list of package names and an active/concretized
environment, return the set of all concrete specs from the
environment that could have been affected by changing the
list of packages.
If a ``dependent_traverse_depth`` is given, it is used to limit
upward (in the parent direction) traversal of specs of touched
packages. E.g. if 1 is provided, then only direct dependents
of touched package specs are traversed to produce specs that
could have been affected by changing the package, while if 0 is
provided, only the changed specs themselves are traversed. If ``None``
is given, upward traversal of touched package specs is done all
the way to the environment roots. Providing a negative number
results in no traversals at all, yielding an empty set.
Arguments:
env (spack.environment.Environment): Active concrete environment
affected_pkgs (List[str]): Affected package names
dependent_traverse_depth: Optional integer to limit dependent
traversal, or None to disable the limit.
Returns:
@@ -512,17 +472,237 @@ def get_spec_filter_list(env, affected_pkgs):
tty.debug("All concrete environment specs:")
for s in all_concrete_specs:
tty.debug(" {0}/{1}".format(s.name, s.dag_hash()[:7]))
env_matches = [s for s in all_concrete_specs if s.name in frozenset(affected_pkgs)]
affected_pkgs = frozenset(affected_pkgs)
env_matches = [s for s in all_concrete_specs if s.name in affected_pkgs]
visited = set()
dag_hash = lambda s: s.dag_hash()
for match in env_matches:
for parent in match.traverse(direction="parents", key=dag_hash):
affected_specs.update(
parent.traverse(direction="children", visited=visited, key=dag_hash)
)
for depth, parent in traverse.traverse_nodes(
env_matches, direction="parents", key=dag_hash, depth=True, order="breadth"
):
if dependent_traverse_depth is not None and depth > dependent_traverse_depth:
break
affected_specs.update(parent.traverse(direction="children", visited=visited, key=dag_hash))
return affected_specs
def _build_jobs(phases, staged_phases):
for phase in phases:
phase_name = phase["name"]
spec_labels, dependencies, stages = staged_phases[phase_name]
for stage_jobs in stages:
for spec_label in stage_jobs:
spec_record = spec_labels[spec_label]
release_spec = spec_record["spec"]
release_spec_dag_hash = release_spec.dag_hash()
yield release_spec, release_spec_dag_hash
def _noop(x):
return x
def _unpack_script(script_section, op=_noop):
script = []
for cmd in script_section:
if isinstance(cmd, list):
for subcmd in cmd:
script.append(op(subcmd))
else:
script.append(op(cmd))
return script
class SpackCI:
"""Spack CI object used to generate intermediate representation
used by the CI generator(s).
"""
def __init__(self, ci_config, phases, staged_phases):
"""Given the information from the ci section of the config
and the job phases setup meta data needed for generating Spack
CI IR.
"""
self.ci_config = ci_config
self.named_jobs = ["any", "build", "cleanup", "noop", "reindex", "signing"]
self.ir = {
"jobs": {},
"temporary-storage-url-prefix": self.ci_config.get(
"temporary-storage-url-prefix", None
),
"enable-artifacts-buildcache": self.ci_config.get(
"enable-artifacts-buildcache", False
),
"bootstrap": self.ci_config.get(
"bootstrap", []
), # This is deprecated and should be removed
"rebuild-index": self.ci_config.get("rebuild-index", True),
"broken-specs-url": self.ci_config.get("broken-specs-url", None),
"broken-tests-packages": self.ci_config.get("broken-tests-packages", []),
"target": self.ci_config.get("target", "gitlab"),
}
jobs = self.ir["jobs"]
for spec, dag_hash in _build_jobs(phases, staged_phases):
jobs[dag_hash] = self.__init_job(spec)
for name in self.named_jobs:
# Skip the special named jobs
if name not in ["any", "build"]:
jobs[name] = self.__init_job("")
def __init_job(self, spec):
"""Initialize job object"""
return {"spec": spec, "attributes": {}}
def __is_named(self, section):
"""Check if a pipeline-gen configuration section is for a named job,
and if so return the name otherwise return none.
"""
for _name in self.named_jobs:
keys = ["{0}-job".format(_name), "{0}-job-remove".format(_name)]
if any([key for key in keys if key in section]):
return _name
return None
@staticmethod
def __job_name(name, suffix=""):
"""Compute the name of a named job with appropriate suffix.
Valid suffixes are either '-remove' or empty string or None
"""
assert type(name) == str
jname = name
if suffix:
jname = "{0}-job{1}".format(name, suffix)
else:
jname = "{0}-job".format(name)
return jname
def __apply_submapping(self, dest, spec, section):
"""Apply submapping setion to the IR dict"""
matched = False
only_first = section.get("match_behavior", "first") == "first"
for match_attrs in reversed(section["submapping"]):
attrs = cfg.InternalConfigScope._process_dict_keyname_overrides(match_attrs)
for match_string in match_attrs["match"]:
if _spec_matches(spec, match_string):
matched = True
if "build-job-remove" in match_attrs:
spack.config.remove_yaml(dest, attrs["build-job-remove"])
if "build-job" in match_attrs:
spack.config.merge_yaml(dest, attrs["build-job"])
break
if matched and only_first:
break
return dest
# Generate IR from the configs
def generate_ir(self):
"""Generate the IR from the Spack CI configurations."""
jobs = self.ir["jobs"]
# Implicit job defaults
defaults = [
{
"build-job": {
"script": [
"cd {env_dir}",
"spack env activate --without-view .",
"spack ci rebuild",
]
}
},
{"noop-job": {"script": ['echo "All specs already up to date, nothing to rebuild."']}},
]
# Job overrides
overrides = [
# Reindex script
{
"reindex-job": {
"script:": [
"spack buildcache update-index --keys --mirror-url {index_target_mirror}"
]
}
},
# Cleanup script
{
"cleanup-job": {
"script:": [
"spack -d mirror destroy --mirror-url {mirror_prefix}/$CI_PIPELINE_ID"
]
}
},
# Add signing job tags
{"signing-job": {"tags": ["aws", "protected", "notary"]}},
# Remove reserved tags
{"any-job-remove": {"tags": SPACK_RESERVED_TAGS}},
]
pipeline_gen = overrides + self.ci_config.get("pipeline-gen", []) + defaults
for section in reversed(pipeline_gen):
name = self.__is_named(section)
has_submapping = "submapping" in section
section = cfg.InternalConfigScope._process_dict_keyname_overrides(section)
if name:
remove_job_name = self.__job_name(name, suffix="-remove")
merge_job_name = self.__job_name(name)
do_remove = remove_job_name in section
do_merge = merge_job_name in section
def _apply_section(dest, src):
if do_remove:
dest = spack.config.remove_yaml(dest, src[remove_job_name])
if do_merge:
dest = copy.copy(spack.config.merge_yaml(dest, src[merge_job_name]))
if name == "build":
# Apply attributes to all build jobs
for _, job in jobs.items():
if job["spec"]:
_apply_section(job["attributes"], section)
elif name == "any":
# Apply section attributes too all jobs
for _, job in jobs.items():
_apply_section(job["attributes"], section)
else:
# Create a signing job if there is script and the job hasn't
# been initialized yet
if name == "signing" and name not in jobs:
if "signing-job" in section:
if "script" not in section["signing-job"]:
continue
else:
jobs[name] = self.__init_job("")
# Apply attributes to named job
_apply_section(jobs[name]["attributes"], section)
elif has_submapping:
# Apply section jobs with specs to match
for _, job in jobs.items():
if job["spec"]:
job["attributes"] = self.__apply_submapping(
job["attributes"], job["spec"], section
)
for _, job in jobs.items():
if job["spec"]:
job["spec"] = job["spec"].name
return self.ir
def generate_gitlab_ci_yaml(
env,
print_summary,
@@ -572,14 +752,42 @@ def generate_gitlab_ci_yaml(
yaml_root = ev.config_dict(env.yaml)
if "gitlab-ci" not in yaml_root:
tty.die('Environment yaml does not have "gitlab-ci" section')
# Get the joined "ci" config with all of the current scopes resolved
ci_config = cfg.get("ci")
gitlab_ci = yaml_root["gitlab-ci"]
if not ci_config:
tty.warn("Environment does not have `ci` a configuration")
gitlabci_config = yaml_root.get("gitlab-ci")
if not gitlabci_config:
tty.die("Environment yaml does not have `gitlab-ci` config section. Cannot recover.")
cdash_handler = CDashHandler(yaml_root.get("cdash")) if "cdash" in yaml_root else None
tty.warn(
"The `gitlab-ci` configuration is deprecated in favor of `ci`.\n",
"To update run \n\t$ spack env update /path/to/ci/spack.yaml",
)
translate_deprecated_config(gitlabci_config)
ci_config = gitlabci_config
# Default target is gitlab...and only target is gitlab
if not ci_config.get("target", "gitlab") == "gitlab":
tty.die('Spack CI module only generates target "gitlab"')
cdash_config = cfg.get("cdash")
cdash_handler = CDashHandler(cdash_config) if "build-group" in cdash_config else None
build_group = cdash_handler.build_group if cdash_handler else None
dependent_depth = os.environ.get("SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH", None)
if dependent_depth is not None:
try:
dependent_depth = int(dependent_depth)
except (TypeError, ValueError):
tty.warn(
f"Unrecognized value ({dependent_depth}) "
"provided for SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH, "
"ignoring it."
)
dependent_depth = None
prune_untouched_packages = False
spack_prune_untouched = os.environ.get("SPACK_PRUNE_UNTOUCHED", None)
if spack_prune_untouched is not None and spack_prune_untouched.lower() == "true":
@@ -595,7 +803,9 @@ def generate_gitlab_ci_yaml(
tty.debug("affected pkgs:")
for p in affected_pkgs:
tty.debug(" {0}".format(p))
affected_specs = get_spec_filter_list(env, affected_pkgs)
affected_specs = get_spec_filter_list(
env, affected_pkgs, dependent_traverse_depth=dependent_depth
)
tty.debug("all affected specs:")
for s in affected_specs:
tty.debug(" {0}/{1}".format(s.name, s.dag_hash()[:7]))
@@ -637,25 +847,25 @@ def generate_gitlab_ci_yaml(
# trying to build.
broken_specs_url = ""
known_broken_specs_encountered = []
if "broken-specs-url" in gitlab_ci:
broken_specs_url = gitlab_ci["broken-specs-url"]
if "broken-specs-url" in ci_config:
broken_specs_url = ci_config["broken-specs-url"]
enable_artifacts_buildcache = False
if "enable-artifacts-buildcache" in gitlab_ci:
enable_artifacts_buildcache = gitlab_ci["enable-artifacts-buildcache"]
if "enable-artifacts-buildcache" in ci_config:
enable_artifacts_buildcache = ci_config["enable-artifacts-buildcache"]
rebuild_index_enabled = True
if "rebuild-index" in gitlab_ci and gitlab_ci["rebuild-index"] is False:
if "rebuild-index" in ci_config and ci_config["rebuild-index"] is False:
rebuild_index_enabled = False
temp_storage_url_prefix = None
if "temporary-storage-url-prefix" in gitlab_ci:
temp_storage_url_prefix = gitlab_ci["temporary-storage-url-prefix"]
if "temporary-storage-url-prefix" in ci_config:
temp_storage_url_prefix = ci_config["temporary-storage-url-prefix"]
bootstrap_specs = []
phases = []
if "bootstrap" in gitlab_ci:
for phase in gitlab_ci["bootstrap"]:
if "bootstrap" in ci_config:
for phase in ci_config["bootstrap"]:
try:
phase_name = phase.get("name")
strip_compilers = phase.get("compiler-agnostic")
@@ -720,6 +930,31 @@ def generate_gitlab_ci_yaml(
shutil.copyfile(env.manifest_path, os.path.join(concrete_env_dir, "spack.yaml"))
shutil.copyfile(env.lock_path, os.path.join(concrete_env_dir, "spack.lock"))
with open(env.manifest_path, "r") as env_fd:
env_yaml_root = syaml.load(env_fd)
# Add config scopes to environment
env_includes = env_yaml_root["spack"].get("include", [])
cli_scopes = [
os.path.abspath(s.path)
for s in cfg.scopes().values()
if type(s) == cfg.ImmutableConfigScope
and s.path not in env_includes
and os.path.exists(s.path)
]
include_scopes = []
for scope in cli_scopes:
if scope not in include_scopes and scope not in env_includes:
include_scopes.insert(0, scope)
env_includes.extend(include_scopes)
env_yaml_root["spack"]["include"] = env_includes
if "gitlab-ci" in env_yaml_root["spack"] and "ci" not in env_yaml_root["spack"]:
env_yaml_root["spack"]["ci"] = env_yaml_root["spack"].pop("gitlab-ci")
translate_deprecated_config(env_yaml_root["spack"]["ci"])
with open(os.path.join(concrete_env_dir, "spack.yaml"), "w") as fd:
fd.write(syaml.dump_config(env_yaml_root, default_flow_style=False))
job_log_dir = os.path.join(pipeline_artifacts_dir, "logs")
job_repro_dir = os.path.join(pipeline_artifacts_dir, "reproduction")
job_test_dir = os.path.join(pipeline_artifacts_dir, "tests")
@@ -731,7 +966,7 @@ def generate_gitlab_ci_yaml(
# generation job and the rebuild jobs. This can happen when gitlab
# checks out the project into a runner-specific directory, for example,
# and different runners are picked for generate and rebuild jobs.
ci_project_dir = os.environ.get("CI_PROJECT_DIR")
ci_project_dir = os.environ.get("CI_PROJECT_DIR", os.getcwd())
rel_artifacts_root = os.path.relpath(pipeline_artifacts_dir, ci_project_dir)
rel_concrete_env_dir = os.path.relpath(concrete_env_dir, ci_project_dir)
rel_job_log_dir = os.path.relpath(job_log_dir, ci_project_dir)
@@ -745,7 +980,7 @@ def generate_gitlab_ci_yaml(
try:
bindist.binary_index.update()
except bindist.FetchCacheError as e:
tty.error(e)
tty.warn(e)
staged_phases = {}
try:
@@ -802,6 +1037,9 @@ def generate_gitlab_ci_yaml(
else:
broken_spec_urls = web_util.list_url(broken_specs_url)
spack_ci = SpackCI(ci_config, phases, staged_phases)
spack_ci_ir = spack_ci.generate_ir()
before_script, after_script = None, None
for phase in phases:
phase_name = phase["name"]
@@ -829,7 +1067,7 @@ def generate_gitlab_ci_yaml(
spec_record["needs_rebuild"] = False
continue
runner_attribs = _find_matching_config(release_spec, gitlab_ci)
runner_attribs = spack_ci_ir["jobs"][release_spec_dag_hash]["attributes"]
if not runner_attribs:
tty.warn("No match found for {0}, skipping it".format(release_spec))
@@ -860,23 +1098,21 @@ def generate_gitlab_ci_yaml(
except AttributeError:
image_name = build_image
job_script = ["spack env activate --without-view ."]
if "script" not in runner_attribs:
raise AttributeError
if artifacts_root:
job_script.insert(0, "cd {0}".format(concrete_env_dir))
def main_script_replacements(cmd):
return cmd.replace("{env_dir}", concrete_env_dir)
job_script.extend(["spack ci rebuild"])
if "script" in runner_attribs:
job_script = [s for s in runner_attribs["script"]]
job_script = _unpack_script(runner_attribs["script"], op=main_script_replacements)
before_script = None
if "before_script" in runner_attribs:
before_script = [s for s in runner_attribs["before_script"]]
before_script = _unpack_script(runner_attribs["before_script"])
after_script = None
if "after_script" in runner_attribs:
after_script = [s for s in runner_attribs["after_script"]]
after_script = _unpack_script(runner_attribs["after_script"])
osname = str(release_spec.architecture)
job_name = get_job_name(
@@ -938,7 +1174,7 @@ def generate_gitlab_ci_yaml(
bs_arch = c_spec.architecture
bs_arch_family = bs_arch.target.microarchitecture.family
if (
c_spec.satisfies(compiler_pkg_spec)
c_spec.intersects(compiler_pkg_spec)
and bs_arch_family == spec_arch_family
):
# We found the bootstrap compiler this release spec
@@ -1120,19 +1356,6 @@ def generate_gitlab_ci_yaml(
else:
tty.warn("Unable to populate buildgroup without CDash credentials")
service_job_config = None
if "service-job-attributes" in gitlab_ci:
service_job_config = gitlab_ci["service-job-attributes"]
default_attrs = [
"image",
"tags",
"variables",
"before_script",
# 'script',
"after_script",
]
service_job_retries = {
"max": 2,
"when": ["runner_system_failure", "stuck_or_timeout_failure", "script_failure"],
@@ -1144,55 +1367,29 @@ def generate_gitlab_ci_yaml(
# schedule a job to clean up the temporary storage location
# associated with this pipeline.
stage_names.append("cleanup-temp-storage")
cleanup_job = {}
if service_job_config:
_copy_attributes(default_attrs, service_job_config, cleanup_job)
if "tags" in cleanup_job:
service_tags = _remove_reserved_tags(cleanup_job["tags"])
cleanup_job["tags"] = service_tags
cleanup_job = copy.deepcopy(spack_ci_ir["jobs"]["cleanup"]["attributes"])
cleanup_job["stage"] = "cleanup-temp-storage"
cleanup_job["script"] = [
"spack -d mirror destroy --mirror-url {0}/$CI_PIPELINE_ID".format(
temp_storage_url_prefix
)
]
cleanup_job["when"] = "always"
cleanup_job["retry"] = service_job_retries
cleanup_job["interruptible"] = True
cleanup_job["script"] = _unpack_script(
cleanup_job["script"],
op=lambda cmd: cmd.replace("mirror_prefix", temp_storage_url_prefix),
)
output_object["cleanup"] = cleanup_job
if (
"signing-job-attributes" in gitlab_ci
"script" in spack_ci_ir["jobs"]["signing"]["attributes"]
and spack_pipeline_type == "spack_protected_branch"
):
# External signing: generate a job to check and sign binary pkgs
stage_names.append("stage-sign-pkgs")
signing_job_config = gitlab_ci["signing-job-attributes"]
signing_job = {}
signing_job = spack_ci_ir["jobs"]["signing"]["attributes"]
signing_job_attrs_to_copy = [
"image",
"tags",
"variables",
"before_script",
"script",
"after_script",
]
_copy_attributes(signing_job_attrs_to_copy, signing_job_config, signing_job)
signing_job_tags = []
if "tags" in signing_job:
signing_job_tags = _remove_reserved_tags(signing_job["tags"])
for tag in ["aws", "protected", "notary"]:
if tag not in signing_job_tags:
signing_job_tags.append(tag)
signing_job["tags"] = signing_job_tags
signing_job["script"] = _unpack_script(signing_job["script"])
signing_job["stage"] = "stage-sign-pkgs"
signing_job["when"] = "always"
@@ -1204,23 +1401,17 @@ def generate_gitlab_ci_yaml(
if rebuild_index_enabled:
# Add a final job to regenerate the index
stage_names.append("stage-rebuild-index")
final_job = {}
if service_job_config:
_copy_attributes(default_attrs, service_job_config, final_job)
if "tags" in final_job:
service_tags = _remove_reserved_tags(final_job["tags"])
final_job["tags"] = service_tags
final_job = spack_ci_ir["jobs"]["reindex"]["attributes"]
index_target_mirror = mirror_urls[0]
if remote_mirror_override:
index_target_mirror = remote_mirror_override
final_job["stage"] = "stage-rebuild-index"
final_job["script"] = [
"spack buildcache update-index --keys --mirror-url {0}".format(index_target_mirror)
]
final_job["script"] = _unpack_script(
final_job["script"],
op=lambda cmd: cmd.replace("{index_target_mirror}", index_target_mirror),
)
final_job["when"] = "always"
final_job["retry"] = service_job_retries
final_job["interruptible"] = True
@@ -1268,6 +1459,9 @@ def generate_gitlab_ci_yaml(
if spack_stack_name:
output_object["variables"]["SPACK_CI_STACK_NAME"] = spack_stack_name
# Ensure the child pipeline always runs
output_object["workflow"] = {"rules": [{"when": "always"}]}
if spack_buildcache_copy:
# Write out the file describing specs that should be copied
copy_specs_dir = os.path.join(pipeline_artifacts_dir, "specs_to_copy")
@@ -1301,13 +1495,7 @@ def generate_gitlab_ci_yaml(
else:
# No jobs were generated
tty.debug("No specs to rebuild, generating no-op job")
noop_job = {}
if service_job_config:
_copy_attributes(default_attrs, service_job_config, noop_job)
if "script" not in noop_job:
noop_job["script"] = ['echo "All specs already up to date, nothing to rebuild."']
noop_job = spack_ci_ir["jobs"]["noop"]["attributes"]
noop_job["retry"] = service_job_retries
@@ -1321,7 +1509,7 @@ def generate_gitlab_ci_yaml(
sys.exit(1)
with open(output_file, "w") as outf:
outf.write(syaml.dump_config(sorted_output, default_flow_style=True))
outf.write(syaml.dump(sorted_output, default_flow_style=True))
def _url_encode_string(input_string):
@@ -1501,7 +1689,10 @@ def copy_files_to_artifacts(src, artifacts_dir):
try:
fs.copy(src, artifacts_dir)
except Exception as err:
tty.warn(f"Unable to copy files ({src}) to artifacts {artifacts_dir} due to: {err}")
msg = ("Unable to copy files ({0}) to artifacts {1} due to " "exception: {2}").format(
src, artifacts_dir, str(err)
)
tty.warn(msg)
def copy_stage_logs_to_artifacts(job_spec, job_log_dir):
@@ -1721,6 +1912,7 @@ def reproduce_ci_job(url, work_dir):
function is a set of printed instructions for running docker and then
commands to run to reproduce the build once inside the container.
"""
work_dir = os.path.realpath(work_dir)
download_and_extract_artifacts(url, work_dir)
lock_file = fs.find(work_dir, "spack.lock")[0]
@@ -1885,7 +2077,9 @@ def reproduce_ci_job(url, work_dir):
if job_image:
inst_list.append("\nRun the following command:\n\n")
inst_list.append(
" $ docker run --rm -v {0}:{1} -ti {2}\n".format(work_dir, mount_as_dir, job_image)
" $ docker run --rm --name spack_reproducer -v {0}:{1}:Z -ti {2}\n".format(
work_dir, mount_as_dir, job_image
)
)
inst_list.append("\nOnce inside the container:\n\n")
else:
@@ -1936,13 +2130,16 @@ def process_command(name, commands, repro_dir):
# Create a string [command 1] && [command 2] && ... && [command n] with commands
# quoted using double quotes.
args_to_string = lambda args: " ".join('"{}"'.format(arg) for arg in args)
full_command = " && ".join(map(args_to_string, commands))
full_command = " \n ".join(map(args_to_string, commands))
# Write the command to a shell script
script = "{0}.sh".format(name)
with open(script, "w") as fd:
fd.write("#!/bin/sh\n\n")
fd.write("\n# spack {0} command\n".format(name))
fd.write("set -e\n")
if os.environ.get("SPACK_VERBOSE_SCRIPT"):
fd.write("set -x\n")
fd.write(full_command)
fd.write("\n")
@@ -2291,3 +2488,66 @@ def report_skipped(self, spec, directory_name, reason):
)
reporter = CDash(configuration=configuration)
reporter.test_skipped_report(directory_name, spec, reason)
def translate_deprecated_config(config):
# Remove all deprecated keys from config
mappings = config.pop("mappings", [])
match_behavior = config.pop("match_behavior", "first")
build_job = {}
if "image" in config:
build_job["image"] = config.pop("image")
if "tags" in config:
build_job["tags"] = config.pop("tags")
if "variables" in config:
build_job["variables"] = config.pop("variables")
if "before_script" in config:
build_job["before_script"] = config.pop("before_script")
if "script" in config:
build_job["script"] = config.pop("script")
if "after_script" in config:
build_job["after_script"] = config.pop("after_script")
signing_job = None
if "signing-job-attributes" in config:
signing_job = {"signing-job": config.pop("signing-job-attributes")}
service_job_attributes = None
if "service-job-attributes" in config:
service_job_attributes = config.pop("service-job-attributes")
# If this config already has pipeline-gen do not more
if "pipeline-gen" in config:
return True if mappings or build_job or signing_job or service_job_attributes else False
config["target"] = "gitlab"
config["pipeline-gen"] = []
pipeline_gen = config["pipeline-gen"]
# Build Job
submapping = []
for section in mappings:
submapping_section = {"match": section["match"]}
if "runner-attributes" in section:
submapping_section["build-job"] = section["runner-attributes"]
if "remove-attributes" in section:
submapping_section["build-job-remove"] = section["remove-attributes"]
submapping.append(submapping_section)
pipeline_gen.append({"submapping": submapping, "match_behavior": match_behavior})
if build_job:
pipeline_gen.append({"build-job": build_job})
# Signing Job
if signing_job:
pipeline_gen.append(signing_job)
# Service Jobs
if service_job_attributes:
pipeline_gen.append({"reindex-job": service_job_attributes})
pipeline_gen.append({"noop-job": service_job_attributes})
pipeline_gen.append({"cleanup-job": service_job_attributes})
return True

View File

@@ -498,11 +498,11 @@ def list_fn(args):
if not args.allarch:
arch = spack.spec.Spec.default_arch()
specs = [s for s in specs if s.satisfies(arch)]
specs = [s for s in specs if s.intersects(arch)]
if args.specs:
constraints = set(args.specs)
specs = [s for s in specs if any(s.satisfies(c) for c in constraints)]
specs = [s for s in specs if any(s.intersects(c) for c in constraints)]
if sys.stdout.isatty():
builds = len(specs)
tty.msg("%s." % plural(builds, "cached build"))

View File

@@ -33,12 +33,6 @@ def deindent(desc):
return desc.replace(" ", "")
def get_env_var(variable_name):
if variable_name in os.environ:
return os.environ.get(variable_name)
return None
def setup_parser(subparser):
setup_parser.parser = subparser
subparsers = subparser.add_subparsers(help="CI sub-commands")
@@ -255,10 +249,9 @@ def ci_rebuild(args):
# Make sure the environment is "gitlab-enabled", or else there's nothing
# to do.
yaml_root = ev.config_dict(env.yaml)
gitlab_ci = yaml_root["gitlab-ci"] if "gitlab-ci" in yaml_root else None
if not gitlab_ci:
tty.die("spack ci rebuild requires an env containing gitlab-ci cfg")
ci_config = cfg.get("ci")
if not ci_config:
tty.die("spack ci rebuild requires an env containing ci cfg")
tty.msg(
"SPACK_BUILDCACHE_DESTINATION={0}".format(
@@ -269,27 +262,27 @@ def ci_rebuild(args):
# Grab the environment variables we need. These either come from the
# pipeline generation step ("spack ci generate"), where they were written
# out as variables, or else provided by GitLab itself.
pipeline_artifacts_dir = get_env_var("SPACK_ARTIFACTS_ROOT")
job_log_dir = get_env_var("SPACK_JOB_LOG_DIR")
job_test_dir = get_env_var("SPACK_JOB_TEST_DIR")
repro_dir = get_env_var("SPACK_JOB_REPRO_DIR")
local_mirror_dir = get_env_var("SPACK_LOCAL_MIRROR_DIR")
concrete_env_dir = get_env_var("SPACK_CONCRETE_ENV_DIR")
ci_pipeline_id = get_env_var("CI_PIPELINE_ID")
ci_job_name = get_env_var("CI_JOB_NAME")
signing_key = get_env_var("SPACK_SIGNING_KEY")
job_spec_pkg_name = get_env_var("SPACK_JOB_SPEC_PKG_NAME")
job_spec_dag_hash = get_env_var("SPACK_JOB_SPEC_DAG_HASH")
compiler_action = get_env_var("SPACK_COMPILER_ACTION")
spack_pipeline_type = get_env_var("SPACK_PIPELINE_TYPE")
remote_mirror_override = get_env_var("SPACK_REMOTE_MIRROR_OVERRIDE")
remote_mirror_url = get_env_var("SPACK_REMOTE_MIRROR_URL")
spack_ci_stack_name = get_env_var("SPACK_CI_STACK_NAME")
shared_pr_mirror_url = get_env_var("SPACK_CI_SHARED_PR_MIRROR_URL")
rebuild_everything = get_env_var("SPACK_REBUILD_EVERYTHING")
pipeline_artifacts_dir = os.environ.get("SPACK_ARTIFACTS_ROOT")
job_log_dir = os.environ.get("SPACK_JOB_LOG_DIR")
job_test_dir = os.environ.get("SPACK_JOB_TEST_DIR")
repro_dir = os.environ.get("SPACK_JOB_REPRO_DIR")
local_mirror_dir = os.environ.get("SPACK_LOCAL_MIRROR_DIR")
concrete_env_dir = os.environ.get("SPACK_CONCRETE_ENV_DIR")
ci_pipeline_id = os.environ.get("CI_PIPELINE_ID")
ci_job_name = os.environ.get("CI_JOB_NAME")
signing_key = os.environ.get("SPACK_SIGNING_KEY")
job_spec_pkg_name = os.environ.get("SPACK_JOB_SPEC_PKG_NAME")
job_spec_dag_hash = os.environ.get("SPACK_JOB_SPEC_DAG_HASH")
compiler_action = os.environ.get("SPACK_COMPILER_ACTION")
spack_pipeline_type = os.environ.get("SPACK_PIPELINE_TYPE")
remote_mirror_override = os.environ.get("SPACK_REMOTE_MIRROR_OVERRIDE")
remote_mirror_url = os.environ.get("SPACK_REMOTE_MIRROR_URL")
spack_ci_stack_name = os.environ.get("SPACK_CI_STACK_NAME")
shared_pr_mirror_url = os.environ.get("SPACK_CI_SHARED_PR_MIRROR_URL")
rebuild_everything = os.environ.get("SPACK_REBUILD_EVERYTHING")
# Construct absolute paths relative to current $CI_PROJECT_DIR
ci_project_dir = get_env_var("CI_PROJECT_DIR")
ci_project_dir = os.environ.get("CI_PROJECT_DIR")
pipeline_artifacts_dir = os.path.join(ci_project_dir, pipeline_artifacts_dir)
job_log_dir = os.path.join(ci_project_dir, job_log_dir)
job_test_dir = os.path.join(ci_project_dir, job_test_dir)
@@ -306,8 +299,10 @@ def ci_rebuild(args):
# Query the environment manifest to find out whether we're reporting to a
# CDash instance, and if so, gather some information from the manifest to
# support that task.
cdash_handler = spack_ci.CDashHandler(yaml_root.get("cdash")) if "cdash" in yaml_root else None
if cdash_handler:
cdash_config = cfg.get("cdash")
cdash_handler = None
if "build-group" in cdash_config:
cdash_handler = spack_ci.CDashHandler(cdash_config)
tty.debug("cdash url = {0}".format(cdash_handler.url))
tty.debug("cdash project = {0}".format(cdash_handler.project))
tty.debug("cdash project_enc = {0}".format(cdash_handler.project_enc))
@@ -340,13 +335,13 @@ def ci_rebuild(args):
pipeline_mirror_url = None
temp_storage_url_prefix = None
if "temporary-storage-url-prefix" in gitlab_ci:
temp_storage_url_prefix = gitlab_ci["temporary-storage-url-prefix"]
if "temporary-storage-url-prefix" in ci_config:
temp_storage_url_prefix = ci_config["temporary-storage-url-prefix"]
pipeline_mirror_url = url_util.join(temp_storage_url_prefix, ci_pipeline_id)
enable_artifacts_mirror = False
if "enable-artifacts-buildcache" in gitlab_ci:
enable_artifacts_mirror = gitlab_ci["enable-artifacts-buildcache"]
if "enable-artifacts-buildcache" in ci_config:
enable_artifacts_mirror = ci_config["enable-artifacts-buildcache"]
if enable_artifacts_mirror or (
spack_is_pr_pipeline and not enable_artifacts_mirror and not temp_storage_url_prefix
):
@@ -593,8 +588,8 @@ def ci_rebuild(args):
# avoid wasting compute cycles attempting to build those hashes.
if install_exit_code == INSTALL_FAIL_CODE and spack_is_develop_pipeline:
tty.debug("Install failed on develop")
if "broken-specs-url" in gitlab_ci:
broken_specs_url = gitlab_ci["broken-specs-url"]
if "broken-specs-url" in ci_config:
broken_specs_url = ci_config["broken-specs-url"]
dev_fail_hash = job_spec.dag_hash()
broken_spec_path = url_util.join(broken_specs_url, dev_fail_hash)
tty.msg("Reporting broken develop build as: {0}".format(broken_spec_path))
@@ -602,8 +597,8 @@ def ci_rebuild(args):
broken_spec_path,
job_spec_pkg_name,
spack_ci_stack_name,
get_env_var("CI_JOB_URL"),
get_env_var("CI_PIPELINE_URL"),
os.environ.get("CI_JOB_URL"),
os.environ.get("CI_PIPELINE_URL"),
job_spec.to_dict(hash=ht.dag_hash),
)
@@ -615,17 +610,14 @@ def ci_rebuild(args):
# the package, run them and copy the output. Failures of any kind should
# *not* terminate the build process or preclude creating the build cache.
broken_tests = (
"broken-tests-packages" in gitlab_ci
and job_spec.name in gitlab_ci["broken-tests-packages"]
"broken-tests-packages" in ci_config
and job_spec.name in ci_config["broken-tests-packages"]
)
reports_dir = fs.join_path(os.getcwd(), "cdash_report")
if args.tests and broken_tests:
tty.warn(
"Unable to run stand-alone tests since listed in "
"gitlab-ci's 'broken-tests-packages'"
)
tty.warn("Unable to run stand-alone tests since listed in " "ci's 'broken-tests-packages'")
if cdash_handler:
msg = "Package is listed in gitlab-ci's broken-tests-packages"
msg = "Package is listed in ci's broken-tests-packages"
cdash_handler.report_skipped(job_spec, reports_dir, reason=msg)
cdash_handler.copy_test_results(reports_dir, job_test_dir)
elif args.tests:
@@ -688,8 +680,8 @@ def ci_rebuild(args):
# If this is a develop pipeline, check if the spec that we just built is
# on the broken-specs list. If so, remove it.
if spack_is_develop_pipeline and "broken-specs-url" in gitlab_ci:
broken_specs_url = gitlab_ci["broken-specs-url"]
if spack_is_develop_pipeline and "broken-specs-url" in ci_config:
broken_specs_url = ci_config["broken-specs-url"]
just_built_hash = job_spec.dag_hash()
broken_spec_path = url_util.join(broken_specs_url, just_built_hash)
if web_util.url_exists(broken_spec_path):
@@ -706,9 +698,9 @@ def ci_rebuild(args):
else:
tty.debug("spack install exited non-zero, will not create buildcache")
api_root_url = get_env_var("CI_API_V4_URL")
ci_project_id = get_env_var("CI_PROJECT_ID")
ci_job_id = get_env_var("CI_JOB_ID")
api_root_url = os.environ.get("CI_API_V4_URL")
ci_project_id = os.environ.get("CI_PROJECT_ID")
ci_job_id = os.environ.get("CI_JOB_ID")
repro_job_url = "{0}/projects/{1}/jobs/{2}/artifacts".format(
api_root_url, ci_project_id, ci_job_id

View File

@@ -514,7 +514,15 @@ def add_concretizer_args(subparser):
dest="concretizer:reuse",
const=True,
default=None,
help="reuse installed dependencies/buildcaches when possible",
help="reuse installed packages/buildcaches when possible",
)
subgroup.add_argument(
"--reuse-deps",
action=ConfigSetAction,
dest="concretizer:reuse",
const="dependencies",
default=None,
help="reuse installed dependencies only",
)

View File

@@ -7,6 +7,7 @@
import collections
import os
import shutil
from typing import List
import llnl.util.filesystem as fs
import llnl.util.tty as tty
@@ -244,30 +245,35 @@ def config_remove(args):
spack.config.set(path, existing, scope)
def _can_update_config_file(scope_dir, cfg_file):
dir_ok = fs.can_write_to_dir(scope_dir)
cfg_ok = fs.can_access(cfg_file)
return dir_ok and cfg_ok
def _can_update_config_file(scope: spack.config.ConfigScope, cfg_file):
if isinstance(scope, spack.config.SingleFileScope):
return fs.can_access(cfg_file)
return fs.can_write_to_dir(scope.path) and fs.can_access(cfg_file)
def config_update(args):
# Read the configuration files
spack.config.config.get_config(args.section, scope=args.scope)
updates = spack.config.config.format_updates[args.section]
updates: List[spack.config.ConfigScope] = list(
filter(
lambda s: not isinstance(
s, (spack.config.InternalConfigScope, spack.config.ImmutableConfigScope)
),
spack.config.config.format_updates[args.section],
)
)
cannot_overwrite, skip_system_scope = [], False
for scope in updates:
cfg_file = spack.config.config.get_config_filename(scope.name, args.section)
scope_dir = scope.path
can_be_updated = _can_update_config_file(scope_dir, cfg_file)
can_be_updated = _can_update_config_file(scope, cfg_file)
if not can_be_updated:
if scope.name == "system":
skip_system_scope = True
msg = (
tty.warn(
'Not enough permissions to write to "system" scope. '
"Skipping update at that location [cfg={0}]"
f"Skipping update at that location [cfg={cfg_file}]"
)
tty.warn(msg.format(cfg_file))
continue
cannot_overwrite.append((scope, cfg_file))
@@ -315,18 +321,14 @@ def config_update(args):
# Get a function to update the format
update_fn = spack.config.ensure_latest_format_fn(args.section)
for scope in updates:
cfg_file = spack.config.config.get_config_filename(scope.name, args.section)
with open(cfg_file) as f:
data = syaml.load_config(f) or {}
data = data.pop(args.section, {})
data = scope.get_section(args.section).pop(args.section)
update_fn(data)
# Make a backup copy and rewrite the file
bkp_file = cfg_file + ".bkp"
shutil.copy(cfg_file, bkp_file)
spack.config.config.update_config(args.section, data, scope=scope.name, force=True)
msg = 'File "{0}" updated [backup={1}]'
tty.msg(msg.format(cfg_file, bkp_file))
tty.msg(f'File "{cfg_file}" update [backup={bkp_file}]')
def _can_revert_update(scope_dir, cfg_file, bkp_file):

View File

@@ -39,19 +39,14 @@
compiler flags:
@g{cflags="flags"} cppflags, cflags, cxxflags,
fflags, ldflags, ldlibs
@g{cflags=="flags"} propagate flags to package dependencies
cppflags, cflags, cxxflags, fflags,
ldflags, ldlibs
@g{==} propagate flags to package dependencies
variants:
@B{+variant} enable <variant>
@B{++variant} propagate enable <variant>
@r{-variant} or @r{~variant} disable <variant>
@r{--variant} or @r{~~variant} propagate disable <variant>
@B{variant=value} set non-boolean <variant> to <value>
@B{variant==value} propagate non-boolean <variant> to <value>
@B{variant=value1,value2,value3} set multi-value <variant> values
@B{variant==value1,value2,value3} propagate multi-value <variant> values
@B{++}, @r{--}, @r{~~}, @B{==} propagate variants to package dependencies
architecture variants:
@m{platform=platform} linux, darwin, cray, etc.

View File

@@ -283,7 +283,7 @@ def print_tests(pkg):
c_names = ("gcc", "intel", "intel-parallel-studio", "pgi")
if pkg.name in c_names:
v_names.extend(["c", "cxx", "fortran"])
if pkg.spec.satisfies("llvm+clang"):
if pkg.spec.intersects("llvm+clang"):
v_names.extend(["c", "cxx"])
# TODO Refactor END

View File

@@ -263,146 +263,6 @@ def report_filename(args: argparse.Namespace, specs: List[spack.spec.Spec]) -> s
return result
def install_specs(specs, install_kwargs, cli_args):
try:
if ev.active_environment():
install_specs_inside_environment(specs, install_kwargs, cli_args)
else:
install_specs_outside_environment(specs, install_kwargs)
except spack.build_environment.InstallError as e:
if cli_args.show_log_on_error:
e.print_context()
assert e.pkg, "Expected InstallError to include the associated package"
if not os.path.exists(e.pkg.build_log_path):
tty.error("'spack install' created no log.")
else:
sys.stderr.write("Full build log:\n")
with open(e.pkg.build_log_path) as log:
shutil.copyfileobj(log, sys.stderr)
raise
def install_specs_inside_environment(specs, install_kwargs, cli_args):
specs_to_install, specs_to_add = [], []
env = ev.active_environment()
for abstract, concrete in specs:
# This won't find specs added to the env since last
# concretize, therefore should we consider enforcing
# concretization of the env before allowing to install
# specs?
m_spec = env.matching_spec(abstract)
# If there is any ambiguity in the above call to matching_spec
# (i.e. if more than one spec in the environment matches), then
# SpackEnvironmentError is raised, with a message listing the
# the matches. Getting to this point means there were either
# no matches or exactly one match.
if not m_spec and not cli_args.add:
msg = (
"Cannot install '{0}' because it is not in the current environment."
" You can add it to the environment with 'spack add {0}', or as part"
" of the install command with 'spack install --add {0}'"
).format(str(abstract))
tty.die(msg)
if not m_spec:
tty.debug("adding {0} as a root".format(abstract.name))
specs_to_add.append((abstract, concrete))
continue
tty.debug("exactly one match for {0} in env -> {1}".format(m_spec.name, m_spec.dag_hash()))
if m_spec in env.roots() or not cli_args.add:
# either the single match is a root spec (in which case
# the spec is not added to the env again), or the user did
# not specify --add (in which case it is assumed we are
# installing already-concretized specs in the env)
tty.debug("just install {0}".format(m_spec.name))
specs_to_install.append(m_spec)
else:
# the single match is not a root (i.e. it's a dependency),
# and --add was specified, so we'll add it as a
# root before installing
tty.debug("add {0} then install it".format(m_spec.name))
specs_to_add.append((abstract, concrete))
if specs_to_add:
tty.debug("Adding the following specs as roots:")
for abstract, concrete in specs_to_add:
tty.debug(" {0}".format(abstract.name))
with env.write_transaction():
specs_to_install.append(env.concretize_and_add(abstract, concrete))
env.write(regenerate=False)
# Install the validated list of cli specs
if specs_to_install:
tty.debug("Installing the following cli specs:")
for s in specs_to_install:
tty.debug(" {0}".format(s.name))
env.install_specs(specs_to_install, **install_kwargs)
def install_specs_outside_environment(specs, install_kwargs):
installs = [(concrete.package, install_kwargs) for _, concrete in specs]
builder = PackageInstaller(installs)
builder.install()
def install_all_specs_from_active_environment(
install_kwargs, only_concrete, cli_test_arg, reporter_factory
):
"""Install all specs from the active environment
Args:
install_kwargs (dict): dictionary of options to be passed to the installer
only_concrete (bool): if true don't concretize the environment, but install
only the specs that are already concrete
cli_test_arg (bool or str): command line argument to select which test to run
reporter: reporter object for the installations
"""
env = ev.active_environment()
if not env:
msg = "install requires a package argument or active environment"
if "spack.yaml" in os.listdir(os.getcwd()):
# There's a spack.yaml file in the working dir, the user may
# have intended to use that
msg += "\n\n"
msg += "Did you mean to install using the `spack.yaml`"
msg += " in this directory? Try: \n"
msg += " spack env activate .\n"
msg += " spack install\n"
msg += " OR\n"
msg += " spack --env . install"
tty.die(msg)
install_kwargs["tests"] = compute_tests_install_kwargs(env.user_specs, cli_test_arg)
if not only_concrete:
with env.write_transaction():
concretized_specs = env.concretize(tests=install_kwargs["tests"])
ev.display_specs(concretized_specs)
# save view regeneration for later, so that we only do it
# once, as it can be slow.
env.write(regenerate=False)
specs = env.all_specs()
if not specs:
msg = "{0} environment has no specs to install".format(env.name)
tty.msg(msg)
return
reporter = reporter_factory(specs) or lang.nullcontext()
tty.msg("Installing environment {0}".format(env.name))
with reporter:
env.install_all(**install_kwargs)
tty.debug("Regenerating environment views for {0}".format(env.name))
with env.write_transaction():
# write env to trigger view generation and modulefile
# generation
env.write()
def compute_tests_install_kwargs(specs, cli_test_arg):
"""Translate the test cli argument into the proper install argument"""
if cli_test_arg == "all":
@@ -412,43 +272,6 @@ def compute_tests_install_kwargs(specs, cli_test_arg):
return False
def specs_from_cli(args, install_kwargs):
"""Return abstract and concrete spec parsed from the command line."""
abstract_specs = spack.cmd.parse_specs(args.spec)
install_kwargs["tests"] = compute_tests_install_kwargs(abstract_specs, args.test)
try:
concrete_specs = spack.cmd.parse_specs(
args.spec, concretize=True, tests=install_kwargs["tests"]
)
except SpackError as e:
tty.debug(e)
if args.log_format is not None:
reporter = args.reporter()
reporter.concretization_report(report_filename(args, abstract_specs), e.message)
raise
return abstract_specs, concrete_specs
def concrete_specs_from_file(args):
"""Return the list of concrete specs read from files."""
result = []
for file in args.specfiles:
with open(file, "r") as f:
if file.endswith("yaml") or file.endswith("yml"):
s = spack.spec.Spec.from_yaml(f)
else:
s = spack.spec.Spec.from_json(f)
concretized = s.concretized()
if concretized.dag_hash() != s.dag_hash():
msg = 'skipped invalid file "{0}". '
msg += "The file does not contain a concrete spec."
tty.warn(msg.format(file))
continue
result.append(concretized)
return result
def require_user_confirmation_for_overwrite(concrete_specs, args):
if args.yes_to_all:
return
@@ -475,12 +298,40 @@ def require_user_confirmation_for_overwrite(concrete_specs, args):
tty.die("Reinstallation aborted.")
def _dump_log_on_error(e: spack.build_environment.InstallError):
e.print_context()
assert e.pkg, "Expected InstallError to include the associated package"
if not os.path.exists(e.pkg.build_log_path):
tty.error("'spack install' created no log.")
else:
sys.stderr.write("Full build log:\n")
with open(e.pkg.build_log_path, errors="replace") as log:
shutil.copyfileobj(log, sys.stderr)
def _die_require_env():
msg = "install requires a package argument or active environment"
if "spack.yaml" in os.listdir(os.getcwd()):
# There's a spack.yaml file in the working dir, the user may
# have intended to use that
msg += (
"\n\n"
"Did you mean to install using the `spack.yaml`"
" in this directory? Try: \n"
" spack env activate .\n"
" spack install\n"
" OR\n"
" spack --env . install"
)
tty.die(msg)
def install(parser, args):
# TODO: unify args.verbose?
tty.set_verbose(args.verbose or args.install_verbose)
if args.help_cdash:
spack.cmd.common.arguments.print_cdash_help()
arguments.print_cdash_help()
return
if args.no_checksum:
@@ -489,43 +340,154 @@ def install(parser, args):
if args.deprecated:
spack.config.set("config:deprecated", True, scope="command_line")
spack.cmd.common.arguments.sanitize_reporter_options(args)
if args.log_file and not args.log_format:
msg = "the '--log-format' must be specified when using '--log-file'"
tty.die(msg)
arguments.sanitize_reporter_options(args)
def reporter_factory(specs):
if args.log_format is None:
return None
return lang.nullcontext()
context_manager = spack.report.build_context_manager(
return spack.report.build_context_manager(
reporter=args.reporter(), filename=report_filename(args, specs=specs), specs=specs
)
return context_manager
install_kwargs = install_kwargs_from_args(args)
if not args.spec and not args.specfiles:
# If there are no args but an active environment then install the packages from it.
install_all_specs_from_active_environment(
install_kwargs=install_kwargs,
only_concrete=args.only_concrete,
cli_test_arg=args.test,
reporter_factory=reporter_factory,
)
env = ev.active_environment()
if not env and not args.spec and not args.specfiles:
_die_require_env()
try:
if env:
install_with_active_env(env, args, install_kwargs, reporter_factory)
else:
install_without_active_env(args, install_kwargs, reporter_factory)
except spack.build_environment.InstallError as e:
if args.show_log_on_error:
_dump_log_on_error(e)
raise
def _maybe_add_and_concretize(args, env, specs):
"""Handle the overloaded spack install behavior of adding
and automatically concretizing specs"""
# Users can opt out of accidental concretizations with --only-concrete
if args.only_concrete:
return
# Specs from CLI
abstract_specs, concrete_specs = specs_from_cli(args, install_kwargs)
# Otherwise, we will modify the environment.
with env.write_transaction():
# `spack add` adds these specs.
if args.add:
for spec in specs:
env.add(spec)
# Concrete specs from YAML or JSON files
specs_from_file = concrete_specs_from_file(args)
abstract_specs.extend(specs_from_file)
concrete_specs.extend(specs_from_file)
# `spack concretize`
tests = compute_tests_install_kwargs(env.user_specs, args.test)
concretized_specs = env.concretize(tests=tests)
ev.display_specs(concretized_specs)
# save view regeneration for later, so that we only do it
# once, as it can be slow.
env.write(regenerate=False)
def install_with_active_env(env: ev.Environment, args, install_kwargs, reporter_factory):
specs = spack.cmd.parse_specs(args.spec)
# The following two commands are equivalent:
# 1. `spack install --add x y z`
# 2. `spack add x y z && spack concretize && spack install --only-concrete`
# here we do the `add` and `concretize` part.
_maybe_add_and_concretize(args, env, specs)
# Now we're doing `spack install --only-concrete`.
if args.add or not specs:
specs_to_install = env.concrete_roots()
if not specs_to_install:
tty.msg(f"{env.name} environment has no specs to install")
return
# `spack install x y z` without --add is installing matching specs in the env.
else:
specs_to_install = env.all_matching_specs(*specs)
if not specs_to_install:
msg = (
"Cannot install '{0}' because no matching specs are in the current environment."
" You can add specs to the environment with 'spack add {0}', or as part"
" of the install command with 'spack install --add {0}'"
).format(" ".join(args.spec))
tty.die(msg)
install_kwargs["tests"] = compute_tests_install_kwargs(specs_to_install, args.test)
if args.overwrite:
require_user_confirmation_for_overwrite(specs_to_install, args)
install_kwargs["overwrite"] = [spec.dag_hash() for spec in specs_to_install]
try:
with reporter_factory(specs_to_install):
env.install_specs(specs_to_install, **install_kwargs)
finally:
# TODO: this is doing way too much to trigger
# views and modules to be generated.
with env.write_transaction():
env.write(regenerate=True)
def concrete_specs_from_cli(args, install_kwargs):
"""Return abstract and concrete spec parsed from the command line."""
abstract_specs = spack.cmd.parse_specs(args.spec)
install_kwargs["tests"] = compute_tests_install_kwargs(abstract_specs, args.test)
try:
concrete_specs = spack.cmd.parse_specs(
args.spec, concretize=True, tests=install_kwargs["tests"]
)
except SpackError as e:
tty.debug(e)
if args.log_format is not None:
reporter = args.reporter()
reporter.concretization_report(report_filename(args, abstract_specs), e.message)
raise
return concrete_specs
def concrete_specs_from_file(args):
"""Return the list of concrete specs read from files."""
result = []
for file in args.specfiles:
with open(file, "r") as f:
if file.endswith("yaml") or file.endswith("yml"):
s = spack.spec.Spec.from_yaml(f)
else:
s = spack.spec.Spec.from_json(f)
concretized = s.concretized()
if concretized.dag_hash() != s.dag_hash():
msg = 'skipped invalid file "{0}". '
msg += "The file does not contain a concrete spec."
tty.warn(msg.format(file))
continue
result.append(concretized)
return result
def install_without_active_env(args, install_kwargs, reporter_factory):
concrete_specs = concrete_specs_from_cli(args, install_kwargs) + concrete_specs_from_file(args)
if len(concrete_specs) == 0:
tty.die("The `spack install` command requires a spec to install.")
reporter = reporter_factory(concrete_specs) or lang.nullcontext()
with reporter:
with reporter_factory(concrete_specs):
if args.overwrite:
require_user_confirmation_for_overwrite(concrete_specs, args)
install_kwargs["overwrite"] = [spec.dag_hash() for spec in concrete_specs]
install_specs(zip(abstract_specs, concrete_specs), install_kwargs, args)
installs = [(s.package, install_kwargs) for s in concrete_specs]
builder = PackageInstaller(installs)
builder.install()

View File

@@ -335,7 +335,7 @@ def not_excluded_fn(args):
exclude_specs.extend(spack.cmd.parse_specs(str(args.exclude_specs).split()))
def not_excluded(x):
return not any(x.satisfies(y, strict=True) for y in exclude_specs)
return not any(x.satisfies(y) for y in exclude_specs)
return not_excluded

View File

@@ -26,7 +26,6 @@
description = "run spack's unit tests (wrapper around pytest)"
section = "developer"
level = "long"
is_windows = sys.platform == "win32"
def setup_parser(subparser):
@@ -212,7 +211,7 @@ def unit_test(parser, args, unknown_args):
# mock configuration used by unit tests
# Note: skip on windows here because for the moment,
# clingo is wholly unsupported from bootstrap
if not is_windows:
if sys.platform != "win32":
with spack.bootstrap.ensure_bootstrap_configuration():
spack.bootstrap.ensure_core_dependencies()
if pytest is None:

View File

@@ -28,8 +28,6 @@
__all__ = ["Compiler"]
is_windows = sys.platform == "win32"
@llnl.util.lang.memoized
def _get_compiler_version_output(compiler_path, version_arg, ignore_errors=()):
@@ -598,7 +596,7 @@ def search_regexps(cls, language):
suffixes = [""]
# Windows compilers generally have an extension of some sort
# as do most files on Windows, handle that case here
if is_windows:
if sys.platform == "win32":
ext = r"\.(?:exe|bat)"
cls_suf = [suf + ext for suf in cls.suffixes]
ext_suf = [ext]

View File

@@ -84,7 +84,7 @@ def _to_dict(compiler):
d = {}
d["spec"] = str(compiler.spec)
d["paths"] = dict((attr, getattr(compiler, attr, None)) for attr in _path_instance_vars)
d["flags"] = dict((fname, fvals) for fname, fvals in compiler.flags)
d["flags"] = dict((fname, " ".join(fvals)) for fname, fvals in compiler.flags.items())
d["flags"].update(
dict(
(attr, getattr(compiler, attr, None))

View File

@@ -61,7 +61,7 @@ def is_clang_based(self):
return version >= ver("9.0") and "classic" not in str(version)
version_argument = "--version"
version_regex = r"[Vv]ersion.*?(\d+(\.\d+)+)"
version_regex = r"[Cc]ray (?:clang|C :|C\+\+ :|Fortran :) [Vv]ersion.*?(\d+(\.\d+)+)"
@property
def verbose_flag(self):

View File

@@ -122,7 +122,19 @@ def platform_toolset_ver(self):
@property
def cl_version(self):
"""Cl toolset version"""
return spack.compiler.get_compiler_version_output(self.cc)
return Version(
re.search(
Msvc.version_regex,
spack.compiler.get_compiler_version_output(self.cc, version_arg=None),
).group(1)
)
@property
def vs_root(self):
# The MSVC install root is located at a fix level above the compiler
# and is referenceable idiomatically via the pattern below
# this should be consistent accross versions
return os.path.abspath(os.path.join(self.cc, "../../../../../../../.."))
def setup_custom_environment(self, pkg, env):
"""Set environment variables for MSVC using the

View File

@@ -21,6 +21,7 @@
import tempfile
from contextlib import contextmanager
from itertools import chain
from typing import Union
import archspec.cpu
@@ -43,7 +44,9 @@
from spack.version import Version, VersionList, VersionRange, ver
#: impements rudimentary logic for ABI compatibility
_abi = llnl.util.lang.Singleton(lambda: spack.abi.ABI())
_abi: Union[spack.abi.ABI, llnl.util.lang.Singleton] = llnl.util.lang.Singleton(
lambda: spack.abi.ABI()
)
@functools.total_ordering
@@ -134,7 +137,7 @@ def _valid_virtuals_and_externals(self, spec):
externals = spec_externals(cspec)
for ext in externals:
if ext.satisfies(spec):
if ext.intersects(spec):
usable.append(ext)
# If nothing is in the usable list now, it's because we aren't
@@ -200,7 +203,7 @@ def concretize_version(self, spec):
# List of versions we could consider, in sorted order
pkg_versions = spec.package_class.versions
usable = [v for v in pkg_versions if any(v.satisfies(sv) for sv in spec.versions)]
usable = [v for v in pkg_versions if any(v.intersects(sv) for sv in spec.versions)]
yaml_prefs = PackagePrefs(spec.name, "version")
@@ -344,7 +347,7 @@ def concretize_architecture(self, spec):
new_target_arch = spack.spec.ArchSpec((None, None, str(new_target)))
curr_target_arch = spack.spec.ArchSpec((None, None, str(curr_target)))
if not new_target_arch.satisfies(curr_target_arch):
if not new_target_arch.intersects(curr_target_arch):
# new_target is an incorrect guess based on preferences
# and/or default
valid_target_ranges = str(curr_target).split(",")

View File

@@ -36,9 +36,10 @@
import re
import sys
from contextlib import contextmanager
from typing import Dict, List, Optional
from typing import Dict, List, Optional, Union
import ruamel.yaml as yaml
from ruamel.yaml.comments import Comment
from ruamel.yaml.error import MarkedYAMLError
import llnl.util.lang
@@ -77,6 +78,8 @@
"config": spack.schema.config.schema,
"upstreams": spack.schema.upstreams.schema,
"bootstrap": spack.schema.bootstrap.schema,
"ci": spack.schema.ci.schema,
"cdash": spack.schema.cdash.schema,
}
# Same as above, but including keys for environments
@@ -360,6 +363,12 @@ def _process_dict_keyname_overrides(data):
if sk.endswith(":"):
key = syaml.syaml_str(sk[:-1])
key.override = True
elif sk.endswith("+"):
key = syaml.syaml_str(sk[:-1])
key.prepend = True
elif sk.endswith("-"):
key = syaml.syaml_str(sk[:-1])
key.append = True
else:
key = sk
@@ -535,16 +544,14 @@ def update_config(
scope = self._validate_scope(scope) # get ConfigScope object
# manually preserve comments
need_comment_copy = section in scope.sections and scope.sections[section] is not None
need_comment_copy = section in scope.sections and scope.sections[section]
if need_comment_copy:
comments = getattr(
scope.sections[section][section], yaml.comments.Comment.attrib, None
)
comments = getattr(scope.sections[section][section], Comment.attrib, None)
# read only the requested section's data.
scope.sections[section] = syaml.syaml_dict({section: update_data})
if need_comment_copy and comments:
setattr(scope.sections[section][section], yaml.comments.Comment.attrib, comments)
setattr(scope.sections[section][section], Comment.attrib, comments)
scope._write_section(section)
@@ -830,7 +837,7 @@ def _config():
#: This is the singleton configuration instance for Spack.
config = llnl.util.lang.Singleton(_config)
config: Union[Configuration, llnl.util.lang.Singleton] = llnl.util.lang.Singleton(_config)
def add_from_file(filename, scope=None):
@@ -1040,6 +1047,33 @@ def _override(string):
return hasattr(string, "override") and string.override
def _append(string):
"""Test if a spack YAML string is an override.
See ``spack_yaml`` for details. Keys in Spack YAML can end in `+:`,
and if they do, their values append lower-precedence
configs.
str, str : concatenate strings.
[obj], [obj] : append lists.
"""
return getattr(string, "append", False)
def _prepend(string):
"""Test if a spack YAML string is an override.
See ``spack_yaml`` for details. Keys in Spack YAML can end in `+:`,
and if they do, their values prepend lower-precedence
configs.
str, str : concatenate strings.
[obj], [obj] : prepend lists. (default behavior)
"""
return getattr(string, "prepend", False)
def _mark_internal(data, name):
"""Add a simple name mark to raw YAML/JSON data.
@@ -1102,7 +1136,57 @@ def get_valid_type(path):
raise ConfigError("Cannot determine valid type for path '%s'." % path)
def merge_yaml(dest, source):
def remove_yaml(dest, source):
"""UnMerges source from dest; entries in source take precedence over dest.
This routine may modify dest and should be assigned to dest, in
case dest was None to begin with, e.g.:
dest = remove_yaml(dest, source)
In the result, elements from lists from ``source`` will not appear
as elements of lists from ``dest``. Likewise, when iterating over keys
or items in merged ``OrderedDict`` objects, keys from ``source`` will not
appear as keys in ``dest``.
Config file authors can optionally end any attribute in a dict
with `::` instead of `:`, and the key will remove the entire section
from ``dest``
"""
def they_are(t):
return isinstance(dest, t) and isinstance(source, t)
# If source is None, overwrite with source.
if source is None:
return dest
# Source list is prepended (for precedence)
if they_are(list):
# Make sure to copy ruamel comments
dest[:] = [x for x in dest if x not in source]
return dest
# Source dict is merged into dest.
elif they_are(dict):
for sk, sv in source.items():
# always remove the dest items. Python dicts do not overwrite
# keys on insert, so this ensures that source keys are copied
# into dest along with mark provenance (i.e., file/line info).
unmerge = sk in dest
old_dest_value = dest.pop(sk, None)
if unmerge and not spack.config._override(sk):
dest[sk] = remove_yaml(old_dest_value, sv)
return dest
# If we reach here source and dest are either different types or are
# not both lists or dicts: replace with source.
return dest
def merge_yaml(dest, source, prepend=False, append=False):
"""Merges source into dest; entries in source take precedence over dest.
This routine may modify dest and should be assigned to dest, in
@@ -1118,6 +1202,9 @@ def merge_yaml(dest, source):
Config file authors can optionally end any attribute in a dict
with `::` instead of `:`, and the key will override that of the
parent instead of merging.
`+:` will extend the default prepend merge strategy to include string concatenation
`-:` will change the merge strategy to append, it also includes string concatentation
"""
def they_are(t):
@@ -1129,8 +1216,12 @@ def they_are(t):
# Source list is prepended (for precedence)
if they_are(list):
# Make sure to copy ruamel comments
dest[:] = source + [x for x in dest if x not in source]
if append:
# Make sure to copy ruamel comments
dest[:] = [x for x in dest if x not in source] + source
else:
# Make sure to copy ruamel comments
dest[:] = source + [x for x in dest if x not in source]
return dest
# Source dict is merged into dest.
@@ -1147,7 +1238,7 @@ def they_are(t):
old_dest_value = dest.pop(sk, None)
if merge and not _override(sk):
dest[sk] = merge_yaml(old_dest_value, sv)
dest[sk] = merge_yaml(old_dest_value, sv, _prepend(sk), _append(sk))
else:
# if sk ended with ::, or if it's new, completely override
dest[sk] = copy.deepcopy(sv)
@@ -1158,6 +1249,13 @@ def they_are(t):
return dest
elif they_are(str):
# Concatenate strings in prepend mode
if prepend:
return source + dest
elif append:
return dest + source
# If we reach here source and dest are either different types or are
# not both lists or dicts: replace with source.
return copy.copy(source)
@@ -1183,6 +1281,17 @@ def process_config_path(path):
front = syaml.syaml_str(front)
front.override = True
seen_override_in_path = True
elif front.endswith("+"):
front = front.rstrip("+")
front = syaml.syaml_str(front)
front.prepend = True
elif front.endswith("-"):
front = front.rstrip("-")
front = syaml.syaml_str(front)
front.append = True
result.append(front)
return result

View File

@@ -39,10 +39,10 @@ def validate(configuration_file):
# Ensure we have a "container" attribute with sensible defaults set
env_dict = ev.config_dict(config)
env_dict.setdefault(
"container", {"format": "docker", "images": {"os": "ubuntu:18.04", "spack": "develop"}}
"container", {"format": "docker", "images": {"os": "ubuntu:22.04", "spack": "develop"}}
)
env_dict["container"].setdefault("format", "docker")
env_dict["container"].setdefault("images", {"os": "ubuntu:18.04", "spack": "develop"})
env_dict["container"].setdefault("images", {"os": "ubuntu:22.04", "spack": "develop"})
# Remove attributes that are not needed / allowed in the
# container recipe

View File

@@ -7,6 +7,7 @@
"""
import collections
import copy
from typing import Optional
import spack.environment as ev
import spack.schema.env
@@ -131,6 +132,9 @@ class PathContext(tengine.Context):
directly via PATH.
"""
# Must be set by derived classes
template_name: Optional[str] = None
def __init__(self, config, last_phase):
self.config = ev.config_dict(config)
self.container_config = self.config["container"]
@@ -146,6 +150,10 @@ def __init__(self, config, last_phase):
# Record the last phase
self.last_phase = last_phase
@tengine.context_property
def depfile(self):
return self.container_config.get("depfile", False)
@tengine.context_property
def run(self):
"""Information related to the run image."""
@@ -280,7 +288,8 @@ def render_phase(self):
def __call__(self):
"""Returns the recipe as a string"""
env = tengine.make_environment()
t = env.get_template(self.template_name)
template_name = self.container_config.get("template", self.template_name)
t = env.get_template(template_name)
return t.render(**self.to_dict())

View File

@@ -1525,7 +1525,7 @@ def _query(
if not (start_date < inst_date < end_date):
continue
if query_spec is any or rec.spec.satisfies(query_spec, strict=True):
if query_spec is any or rec.spec.satisfies(query_spec):
results.append(rec.spec)
return results

View File

@@ -29,7 +29,6 @@
import spack.util.spack_yaml
import spack.util.windows_registry
is_windows = sys.platform == "win32"
#: Information on a package that has been detected
DetectedPackage = collections.namedtuple("DetectedPackage", ["spec", "prefix"])
@@ -184,7 +183,7 @@ def library_prefix(library_dir):
elif "lib" in lowered_components:
idx = lowered_components.index("lib")
return os.sep.join(components[:idx])
elif is_windows and "bin" in lowered_components:
elif sys.platform == "win32" and "bin" in lowered_components:
idx = lowered_components.index("bin")
return os.sep.join(components[:idx])
else:
@@ -260,13 +259,13 @@ def find_windows_compiler_bundled_packages():
class WindowsKitExternalPaths(object):
if is_windows:
if sys.platform == "win32":
plat_major_ver = str(winOs.windows_version()[0])
@staticmethod
def find_windows_kit_roots():
"""Return Windows kit root, typically %programfiles%\\Windows Kits\\10|11\\"""
if not is_windows:
if sys.platform != "win32":
return []
program_files = os.environ["PROGRAMFILES(x86)"]
kit_base = os.path.join(
@@ -359,7 +358,7 @@ def compute_windows_program_path_for_package(pkg):
pkg (spack.package_base.PackageBase): package for which
Program Files location is to be computed
"""
if not is_windows:
if sys.platform != "win32":
return []
# note windows paths are fine here as this method should only ever be invoked
# to interact with Windows
@@ -379,7 +378,7 @@ def compute_windows_user_path_for_package(pkg):
installs see:
https://learn.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=netframework-4.8
"""
if not is_windows:
if sys.platform != "win32":
return []
# Current user directory

View File

@@ -31,8 +31,6 @@
path_to_dict,
)
is_windows = sys.platform == "win32"
def common_windows_package_paths():
paths = WindowsCompilerExternalPaths.find_windows_compiler_bundled_packages()
@@ -57,7 +55,7 @@ def executables_in_path(path_hints):
path_hints (list): list of paths to be searched. If None the list will be
constructed based on the PATH environment variable.
"""
if is_windows:
if sys.platform == "win32":
path_hints.extend(common_windows_package_paths())
search_paths = llnl.util.filesystem.search_paths_for_executables(*path_hints)
return path_to_dict(search_paths)
@@ -149,7 +147,7 @@ def by_library(packages_to_check, path_hints=None):
path_to_lib_name = (
libraries_in_ld_and_system_library_path(path_hints=path_hints)
if not is_windows
if sys.platform != "win32"
else libraries_in_windows_paths(path_hints)
)

View File

@@ -21,7 +21,6 @@
import spack.util.spack_json as sjson
from spack.error import SpackError
is_windows = sys.platform == "win32"
# Note: Posixpath is used here as opposed to
# os.path.join due to spack.spec.Spec.format
# requiring forward slash path seperators at this stage
@@ -346,7 +345,7 @@ def remove_install_directory(self, spec, deprecated=False):
# Windows readonly files cannot be removed by Python
# directly, change permissions before attempting to remove
if is_windows:
if sys.platform == "win32":
kwargs = {
"ignore_errors": False,
"onerror": fs.readonly_file_handler(ignore_errors=False),

View File

@@ -13,6 +13,8 @@
import time
import urllib.parse
import urllib.request
import warnings
from typing import List, Optional
import ruamel.yaml as yaml
@@ -59,7 +61,7 @@
#: currently activated environment
_active_environment = None
_active_environment: Optional["Environment"] = None
#: default path where environments are stored in the spack tree
@@ -349,7 +351,8 @@ def _is_dev_spec_and_has_changed(spec):
def _spec_needs_overwrite(spec, changed_dev_specs):
"""Check whether the current spec needs to be overwritten because either it has
changed itself or one of its dependencies have changed"""
changed itself or one of its dependencies have changed
"""
# if it's not installed, we don't need to overwrite it
if not spec.installed:
return False
@@ -695,6 +698,8 @@ def __init__(self, path, init_file=None, with_view=None, keep_relative=False):
# This attribute will be set properly from configuration
# during concretization
self.unify = None
self.new_specs = []
self.new_installs = []
self.clear()
if init_file:
@@ -1551,12 +1556,11 @@ def update_default_view(self, viewpath):
def regenerate_views(self):
if not self.views:
tty.debug("Skip view update, this environment does not" " maintain a view")
tty.debug("Skip view update, this environment does not maintain a view")
return
concretized_root_specs = [s for _, s in self.concretized_specs()]
for view in self.views.values():
view.regenerate(concretized_root_specs)
view.regenerate(self.concrete_roots())
def check_views(self):
"""Checks if the environments default view can be activated."""
@@ -1564,7 +1568,7 @@ def check_views(self):
# This is effectively a no-op, but it touches all packages in the
# default view if they are installed.
for view_name, view in self.views.items():
for _, spec in self.concretized_specs():
for spec in self.concrete_roots():
if spec in view and spec.package and spec.installed:
msg = '{0} in view "{1}"'
tty.debug(msg.format(spec.name, view_name))
@@ -1582,7 +1586,7 @@ def _env_modifications_for_default_view(self, reverse=False):
visited = set()
errors = []
for _, root_spec in self.concretized_specs():
for root_spec in self.concrete_roots():
if root_spec in self.default_view and root_spec.installed and root_spec.package:
for spec in root_spec.traverse(deptype="run", root=True):
if spec.name in visited:
@@ -1747,31 +1751,8 @@ def install_all(self, **install_args):
self.install_specs(None, **install_args)
def install_specs(self, specs=None, **install_args):
tty.debug("Assessing installation status of environment packages")
# If "spack install" is invoked repeatedly for a large environment
# where all specs are already installed, the operation can take
# a large amount of time due to repeatedly acquiring and releasing
# locks. As a small optimization, drop already installed root specs.
installed_roots, uninstalled_roots = self._partition_roots_by_install_status()
if specs:
specs_to_install = [s for s in specs if s not in installed_roots]
specs_dropped = [s for s in specs if s in installed_roots]
else:
specs_to_install = uninstalled_roots
specs_dropped = installed_roots
# We need to repeat the work of the installer thanks to the above optimization:
# Already installed root specs should be marked explicitly installed in the
# database.
if specs_dropped:
with spack.store.db.write_transaction(): # do all in one transaction
for spec in specs_dropped:
spack.store.db.update_explicit(spec, True)
if not specs_to_install:
tty.msg("All of the packages are already installed")
else:
tty.debug("Processing {0} uninstalled specs".format(len(specs_to_install)))
specs_to_install = specs or [concrete for _, concrete in self.concretized_specs()]
tty.debug("Processing {0} specs".format(len(specs_to_install)))
specs_to_overwrite = self._get_overwrite_specs()
tty.debug("{0} specs need to be overwritten".format(len(specs_to_overwrite)))
@@ -1799,9 +1780,6 @@ def install_specs(self, specs=None, **install_args):
"Could not install log links for {0}: {1}".format(spec.name, str(e))
)
with self.write_transaction():
self.regenerate_views()
def all_specs(self):
"""Return all specs, even those a user spec would shadow."""
roots = [self.specs_by_hash[h] for h in self.concretized_order]
@@ -1846,6 +1824,11 @@ def concretized_specs(self):
for s, h in zip(self.concretized_user_specs, self.concretized_order):
yield (s, self.specs_by_hash[h])
def concrete_roots(self):
"""Same as concretized_specs, except it returns the list of concrete
roots *without* associated user spec"""
return [root for _, root in self.concretized_specs()]
def get_by_hash(self, dag_hash):
matches = {}
roots = [self.specs_by_hash[h] for h in self.concretized_order]
@@ -1862,6 +1845,16 @@ def get_one_by_hash(self, dag_hash):
assert len(hash_matches) == 1
return hash_matches[0]
def all_matching_specs(self, *specs: spack.spec.Spec) -> List[Spec]:
"""Returns all concretized specs in the environment satisfying any of the input specs"""
key = lambda s: s.dag_hash()
return [
s
for s in spack.traverse.traverse_nodes(self.concrete_roots(), key=key)
if any(s.satisfies(t) for t in specs)
]
@spack.repo.autospec
def matching_spec(self, spec):
"""
Given a spec (likely not concretized), find a matching concretized
@@ -1879,59 +1872,60 @@ def matching_spec(self, spec):
and multiple dependency specs match, then this raises an error
and reports all matching specs.
"""
# Root specs will be keyed by concrete spec, value abstract
# Dependency-only specs will have value None
matches = {}
env_root_to_user = {root.dag_hash(): user for user, root in self.concretized_specs()}
root_matches, dep_matches = [], []
if not isinstance(spec, spack.spec.Spec):
spec = spack.spec.Spec(spec)
for user_spec, concretized_user_spec in self.concretized_specs():
# Deal with concrete specs differently
if spec.concrete:
if spec in concretized_user_spec:
matches[spec] = spec
for env_spec in spack.traverse.traverse_nodes(
specs=[root for _, root in self.concretized_specs()],
key=lambda s: s.dag_hash(),
order="breadth",
):
if not env_spec.satisfies(spec):
continue
if concretized_user_spec.satisfies(spec):
matches[concretized_user_spec] = user_spec
for dep_spec in concretized_user_spec.traverse(root=False):
if dep_spec.satisfies(spec):
# Don't overwrite the abstract spec if present
# If not present already, set to None
matches[dep_spec] = matches.get(dep_spec, None)
# If the spec is concrete, then there is no possibility of multiple matches,
# and we immediately return the single match
if spec.concrete:
return env_spec
if not matches:
# Distinguish between environment roots and deps. Specs that are both
# are classified as environment roots.
user_spec = env_root_to_user.get(env_spec.dag_hash())
if user_spec:
root_matches.append((env_spec, user_spec))
else:
dep_matches.append(env_spec)
# No matching spec
if not root_matches and not dep_matches:
return None
elif len(matches) == 1:
return list(matches.keys())[0]
root_matches = dict(
(concrete, abstract) for concrete, abstract in matches.items() if abstract
)
# Single root spec, any number of dep specs => return root spec.
if len(root_matches) == 1:
return list(root_matches.items())[0][0]
return root_matches[0][0]
if not root_matches and len(dep_matches) == 1:
return dep_matches[0]
# More than one spec matched, and either multiple roots matched or
# none of the matches were roots
# If multiple root specs match, it is assumed that the abstract
# spec will most-succinctly summarize the difference between them
# (and the user can enter one of these to disambiguate)
match_strings = []
fmt_str = "{hash:7} " + spack.spec.default_format
for concrete, abstract in matches.items():
if abstract:
s = "Root spec %s\n %s" % (abstract, concrete.format(fmt_str))
else:
s = "Dependency spec\n %s" % concrete.format(fmt_str)
match_strings.append(s)
color = clr.get_color_when()
match_strings = [
f"Root spec {abstract.format(color=color)}\n {concrete.format(fmt_str, color=color)}"
for concrete, abstract in root_matches
]
match_strings.extend(
f"Dependency spec\n {s.format(fmt_str, color=color)}" for s in dep_matches
)
matches_str = "\n".join(match_strings)
msg = "{0} matches multiple specs in the environment {1}: \n" "{2}".format(
str(spec), self.name, matches_str
raise SpackEnvironmentError(
f"{spec} matches multiple specs in the environment {self.name}: \n{matches_str}"
)
raise SpackEnvironmentError(msg)
def removed_specs(self):
"""Tuples of (user spec, concrete spec) for all specs that will be
@@ -2063,18 +2057,73 @@ def _read_lockfile_dict(self, d):
for spec_dag_hash in self.concretized_order:
self.specs_by_hash[spec_dag_hash] = first_seen[spec_dag_hash]
def write(self, regenerate=True):
def write(self, regenerate: bool = True) -> None:
"""Writes an in-memory environment to its location on disk.
Write out package files for each newly concretized spec. Also
regenerate any views associated with the environment and run post-write
hooks, if regenerate is True.
Arguments:
regenerate (bool): regenerate views and run post-write hooks as
well as writing if True.
Args:
regenerate: regenerate views and run post-write hooks as well as writing if True.
"""
# Warn that environments are not in the latest format.
self.manifest_uptodate_or_warn()
if self.specs_by_hash:
self.ensure_env_directory_exists(dot_env=True)
self.update_environment_repository()
self.update_manifest()
# Write the lock file last. This is useful for Makefiles
# with `spack.lock: spack.yaml` rules, where the target
# should be newer than the prerequisite to avoid
# redundant re-concretization.
self.update_lockfile()
else:
self.ensure_env_directory_exists(dot_env=False)
with fs.safe_remove(self.lock_path):
self.update_manifest()
if regenerate:
self.regenerate_views()
spack.hooks.post_env_write(self)
self._reset_new_specs_and_installs()
def _reset_new_specs_and_installs(self) -> None:
self.new_specs = []
self.new_installs = []
def update_lockfile(self) -> None:
with fs.write_tmp_and_move(self.lock_path) as f:
sjson.dump(self._to_lockfile_dict(), stream=f)
def ensure_env_directory_exists(self, dot_env: bool = False) -> None:
"""Ensure that the root directory of the environment exists
Args:
dot_env: if True also ensures that the <root>/.env directory exists
"""
fs.mkdirp(self.path)
if dot_env:
fs.mkdirp(self.env_subdir_path)
def update_environment_repository(self) -> None:
"""Updates the repository associated with the environment."""
for spec in spack.traverse.traverse_nodes(self.new_specs):
if not spec.concrete:
raise ValueError("specs passed to environment.write() must be concrete!")
self._add_to_environment_repository(spec)
def _add_to_environment_repository(self, spec_node: Spec) -> None:
"""Add the root node of the spec to the environment repository"""
repository_dir = os.path.join(self.repos_path, spec_node.namespace)
repository = spack.repo.create_or_construct(repository_dir, spec_node.namespace)
pkg_dir = repository.dirname_for_package_name(spec_node.name)
fs.mkdirp(pkg_dir)
spack.repo.path.dump_provenance(spec_node, pkg_dir)
def manifest_uptodate_or_warn(self):
"""Emits a warning if the manifest file is not up-to-date."""
if not is_latest_format(self.manifest_path):
ver = ".".join(str(s) for s in spack.spack_version_info[:2])
msg = (
@@ -2084,61 +2133,14 @@ def write(self, regenerate=True):
"Note that versions of Spack older than {} may not be able to "
"use the updated configuration."
)
tty.warn(msg.format(self.name, self.name, ver))
warnings.warn(msg.format(self.name, self.name, ver))
# ensure path in var/spack/environments
fs.mkdirp(self.path)
yaml_dict = config_dict(self.yaml)
raw_yaml_dict = config_dict(self.raw_yaml)
if self.specs_by_hash:
# ensure the prefix/.env directory exists
fs.mkdirp(self.env_subdir_path)
for spec in spack.traverse.traverse_nodes(self.new_specs):
if not spec.concrete:
raise ValueError("specs passed to environment.write() " "must be concrete!")
root = os.path.join(self.repos_path, spec.namespace)
repo = spack.repo.create_or_construct(root, spec.namespace)
pkg_dir = repo.dirname_for_package_name(spec.name)
fs.mkdirp(pkg_dir)
spack.repo.path.dump_provenance(spec, pkg_dir)
self._update_and_write_manifest(raw_yaml_dict, yaml_dict)
# Write the lock file last. This is useful for Makefiles
# with `spack.lock: spack.yaml` rules, where the target
# should be newer than the prerequisite to avoid
# redundant re-concretization.
with fs.write_tmp_and_move(self.lock_path) as f:
sjson.dump(self._to_lockfile_dict(), stream=f)
else:
with fs.safe_remove(self.lock_path):
self._update_and_write_manifest(raw_yaml_dict, yaml_dict)
# TODO: rethink where this needs to happen along with
# writing. For some of the commands (like install, which write
# concrete specs AND regen) this might as well be a separate
# call. But, having it here makes the views consistent witht the
# concretized environment for most operations. Which is the
# special case?
if regenerate:
self.regenerate_views()
# Run post_env_hooks
spack.hooks.post_env_write(self)
# new specs and new installs reset at write time
self.new_specs = []
self.new_installs = []
def _update_and_write_manifest(self, raw_yaml_dict, yaml_dict):
def update_manifest(self):
"""Update YAML manifest for this environment based on changes to
spec lists and views and write it.
"""
yaml_dict = config_dict(self.yaml)
raw_yaml_dict = config_dict(self.raw_yaml)
# invalidate _repo cache
self._repo = None
# put any changes in the definitions in the YAML
@@ -2192,6 +2194,7 @@ def _update_and_write_manifest(self, raw_yaml_dict, yaml_dict):
view = dict((name, view.to_dict()) for name, view in self.views.items())
else:
view = False
yaml_dict["view"] = view
if self.dev_specs:
@@ -2237,12 +2240,19 @@ def __exit__(self, exc_type, exc_val, exc_tb):
activate(self._previous_active)
def yaml_equivalent(first, second):
def yaml_equivalent(first, second) -> bool:
"""Returns whether two spack yaml items are equivalent, including overrides"""
# YAML has timestamps and dates, but we don't use them yet in schemas
if isinstance(first, dict):
return isinstance(second, dict) and _equiv_dict(first, second)
elif isinstance(first, list):
return isinstance(second, list) and _equiv_list(first, second)
elif isinstance(first, bool):
return isinstance(second, bool) and first is second
elif isinstance(first, int):
return isinstance(second, int) and first == second
elif first is None:
return second is None
else: # it's a string
return isinstance(second, str) and first == second
@@ -2313,7 +2323,7 @@ def _concretize_from_constraints(spec_constraints, tests=False):
invalid_deps = [
c
for c in spec_constraints
if any(c.satisfies(invd, strict=True) for invd in invalid_deps_string)
if any(c.satisfies(invd) for invd in invalid_deps_string)
]
if len(invalid_deps) != len(invalid_deps_string):
raise e

View File

@@ -28,7 +28,6 @@
import os.path
import re
import shutil
import sys
import urllib.parse
from typing import List, Optional
@@ -53,7 +52,6 @@
#: List of all fetch strategies, created by FetchStrategy metaclass.
all_strategies = []
is_windows = sys.platform == "win32"
CONTENT_TYPE_MISMATCH_WARNING_TEMPLATE = (
"The contents of {subject} look like {content_type}. Either the URL"
@@ -862,9 +860,6 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False):
)
with working_dir(dest):
# By defaults, on all references are fetched by the clone
fetch_args = ["fetch", "origin", commit]
git(*fetch_args)
checkout_args = ["checkout", commit]
if not debug:
checkout_args.insert(1, "--quiet")
@@ -1506,7 +1501,7 @@ def _from_merged_attrs(fetcher, pkg, version):
return fetcher(**attrs)
def for_package_version(pkg, version):
def for_package_version(pkg, version=None):
"""Determine a fetch strategy based on the arguments supplied to
version() in the package description."""
@@ -1517,8 +1512,18 @@ def for_package_version(pkg, version):
check_pkg_attributes(pkg)
if not isinstance(version, spack.version.VersionBase):
version = spack.version.Version(version)
if version is not None:
assert not pkg.spec.concrete, "concrete specs should not pass the 'version=' argument"
# Specs are initialized with the universe range, if no version information is given,
# so here we make sure we always match the version passed as argument
if not isinstance(version, spack.version.VersionBase):
version = spack.version.Version(version)
version_list = spack.version.VersionList()
version_list.add(version)
pkg.spec.versions = version_list
else:
version = pkg.version
# if it's a commit, we must use a GitFetchStrategy
if isinstance(version, spack.version.GitVersion):

View File

@@ -12,7 +12,7 @@
Currently the following hooks are supported:
* pre_install(spec)
* post_install(spec)
* post_install(spec, explicit)
* pre_uninstall(spec)
* post_uninstall(spec)
* on_install_start(spec)

View File

@@ -131,7 +131,7 @@ def find_and_patch_sonames(prefix, exclude_list, patchelf):
return patch_sonames(patchelf, prefix, relative_paths)
def post_install(spec):
def post_install(spec, explicit=None):
# Skip if disabled
if not spack.config.get("config:shared_linking:bind", False):
return

View File

@@ -169,7 +169,7 @@ def write_license_file(pkg, license_path):
f.close()
def post_install(spec):
def post_install(spec, explicit=None):
"""This hook symlinks local licenses to the global license for
licensed software.
"""

View File

@@ -10,7 +10,7 @@
import spack.modules.common
def _for_each_enabled(spec, method_name):
def _for_each_enabled(spec, method_name, explicit=None):
"""Calls a method for each enabled module"""
set_names = set(spack.config.get("modules", {}).keys())
# If we have old-style modules enabled, we put those in the default set
@@ -27,7 +27,7 @@ def _for_each_enabled(spec, method_name):
continue
for type in enabled:
generator = spack.modules.module_types[type](spec, name)
generator = spack.modules.module_types[type](spec, name, explicit)
try:
getattr(generator, method_name)()
except RuntimeError as e:
@@ -36,7 +36,7 @@ def _for_each_enabled(spec, method_name):
tty.warn(msg.format(method_name, str(e)))
def post_install(spec):
def post_install(spec, explicit):
import spack.environment as ev # break import cycle
if ev.active_environment():
@@ -45,7 +45,7 @@ def post_install(spec):
# can manage interactions between env views and modules
return
_for_each_enabled(spec, "write")
_for_each_enabled(spec, "write", explicit)
def post_uninstall(spec):

View File

@@ -8,7 +8,7 @@
import spack.util.file_permissions as fp
def post_install(spec):
def post_install(spec, explicit=None):
if not spec.external:
fp.set_permissions_by_spec(spec.prefix, spec)

View File

@@ -30,8 +30,7 @@
#: Groupdb does not exist on Windows, prevent imports
#: on supported systems
is_windows = sys.platform == "win32"
if not is_windows:
if sys.platform != "win32":
import grp
#: Spack itself also limits the shebang line to at most 4KB, which should be plenty.
@@ -225,7 +224,7 @@ def install_sbang():
os.rename(sbang_tmp_path, sbang_path)
def post_install(spec):
def post_install(spec, explicit=None):
"""This hook edits scripts so that they call /bin/bash
$spack_prefix/bin/sbang instead of something longer than the
shebang limit.

View File

@@ -6,6 +6,6 @@
import spack.verify
def post_install(spec):
def post_install(spec, explicit=None):
if not spec.external:
spack.verify.write_manifest(spec)

View File

@@ -84,9 +84,6 @@
#: queue invariants).
STATUS_REMOVED = "removed"
is_windows = sys.platform == "win32"
is_osx = sys.platform == "darwin"
class InstallAction(object):
#: Don't perform an install
@@ -169,9 +166,9 @@ def _do_fake_install(pkg):
if not pkg.name.startswith("lib"):
library = "lib" + library
plat_shared = ".dll" if is_windows else ".so"
plat_static = ".lib" if is_windows else ".a"
dso_suffix = ".dylib" if is_osx else plat_shared
plat_shared = ".dll" if sys.platform == "win32" else ".so"
plat_static = ".lib" if sys.platform == "win32" else ".a"
dso_suffix = ".dylib" if sys.platform == "darwin" else plat_shared
# Install fake command
fs.mkdirp(pkg.prefix.bin)
@@ -318,7 +315,7 @@ def _install_from_cache(pkg, cache_only, explicit, unsigned=False):
tty.debug("Successfully extracted {0} from binary cache".format(pkg_id))
_print_timer(pre=_log_prefix(pkg.name), pkg_id=pkg_id, timer=t)
_print_installed_pkg(pkg.spec.prefix)
spack.hooks.post_install(pkg.spec)
spack.hooks.post_install(pkg.spec, explicit)
return True
@@ -356,7 +353,7 @@ def _process_external_package(pkg, explicit):
# For external packages we just need to run
# post-install hooks to generate module files.
tty.debug("{0} generating module file".format(pre))
spack.hooks.post_install(spec)
spack.hooks.post_install(spec, explicit)
# Add to the DB
tty.debug("{0} registering into DB".format(pre))
@@ -1263,6 +1260,10 @@ def _install_task(self, task):
if not pkg.unit_test_check():
return
# Injecting information to know if this installation request is the root one
# to determine in BuildProcessInstaller whether installation is explicit or not
install_args["is_root"] = task.is_root
try:
self._setup_install_dir(pkg)
@@ -1882,6 +1883,9 @@ def __init__(self, pkg, install_args):
# whether to enable echoing of build output initially or not
self.verbose = install_args.get("verbose", False)
# whether installation was explicitly requested by the user
self.explicit = install_args.get("is_root", False) and install_args.get("explicit", True)
# env before starting installation
self.unmodified_env = install_args.get("unmodified_env", {})
@@ -1942,7 +1946,7 @@ def run(self):
self.timer.write_json(timelog)
# Run post install hooks before build stage is removed.
spack.hooks.post_install(self.pkg.spec)
spack.hooks.post_install(self.pkg.spec, self.explicit)
_print_timer(pre=self.pre, pkg_id=self.pkg_id, timer=self.timer)
_print_installed_pkg(self.pkg.prefix)

View File

@@ -575,7 +575,7 @@ def setup_main_options(args):
if args.debug:
spack.util.debug.register_interrupt_handler()
spack.config.set("config:debug", True, scope="command_line")
spack.util.environment.tracing_enabled = True
spack.util.environment.TRACING_ENABLED = True
if args.timestamp:
tty.set_timestamp(True)

View File

@@ -492,7 +492,7 @@ def get_matching_versions(specs, num_versions=1):
break
# Generate only versions that satisfy the spec.
if spec.concrete or v.satisfies(spec.versions):
if spec.concrete or v.intersects(spec.versions):
s = spack.spec.Spec(pkg.name)
s.versions = VersionList([v])
s.variants = spec.variants.copy()

View File

@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""This package contains code for creating environment modules, which can
include TCL non-hierarchical modules, LUA hierarchical modules, and others.
include Tcl non-hierarchical modules, Lua hierarchical modules, and others.
"""
from __future__ import absolute_import

View File

@@ -207,7 +207,7 @@ def merge_config_rules(configuration, spec):
# evaluated in order of appearance in the module file
spec_configuration = module_specific_configuration.pop("all", {})
for constraint, action in module_specific_configuration.items():
if spec.satisfies(constraint, strict=True):
if spec.satisfies(constraint):
if hasattr(constraint, "override") and constraint.override:
spec_configuration = {}
update_dictionary_extending_lists(spec_configuration, action)
@@ -428,12 +428,17 @@ class BaseConfiguration(object):
default_projections = {"all": "{name}-{version}-{compiler.name}-{compiler.version}"}
def __init__(self, spec, module_set_name):
def __init__(self, spec, module_set_name, explicit=None):
# Module where type(self) is defined
self.module = inspect.getmodule(self)
# Spec for which we want to generate a module file
self.spec = spec
self.name = module_set_name
# Software installation has been explicitly asked (get this information from
# db when querying an existing module, like during a refresh or rm operations)
if explicit is None:
explicit = spec._installed_explicitly()
self.explicit = explicit
# Dictionary of configuration options that should be applied
# to the spec
self.conf = merge_config_rules(self.module.configuration(self.name), self.spec)
@@ -519,8 +524,7 @@ def excluded(self):
# Should I exclude the module because it's implicit?
# DEPRECATED: remove 'blacklist_implicits' in v0.20
exclude_implicits = get_deprecated(conf, "exclude_implicits", "blacklist_implicits", None)
installed_implicitly = not spec._installed_explicitly()
excluded_as_implicit = exclude_implicits and installed_implicitly
excluded_as_implicit = exclude_implicits and not self.explicit
def debug_info(line_header, match_list):
if match_list:
@@ -699,7 +703,7 @@ def configure_options(self):
if os.path.exists(pkg.install_configure_args_path):
with open(pkg.install_configure_args_path, "r") as args_file:
return args_file.read()
return spack.util.path.padding_filter(args_file.read())
# Returning a false-like value makes the default templates skip
# the configure option section
@@ -788,7 +792,8 @@ def autoload(self):
def _create_module_list_of(self, what):
m = self.conf.module
name = self.conf.name
return [m.make_layout(x, name).use_name for x in getattr(self.conf, what)]
explicit = self.conf.explicit
return [m.make_layout(x, name, explicit).use_name for x in getattr(self.conf, what)]
@tengine.context_property
def verbose(self):
@@ -797,7 +802,7 @@ def verbose(self):
class BaseModuleFileWriter(object):
def __init__(self, spec, module_set_name):
def __init__(self, spec, module_set_name, explicit=None):
self.spec = spec
# This class is meant to be derived. Get the module of the
@@ -806,9 +811,9 @@ def __init__(self, spec, module_set_name):
m = self.module
# Create the triplet of configuration/layout/context
self.conf = m.make_configuration(spec, module_set_name)
self.layout = m.make_layout(spec, module_set_name)
self.context = m.make_context(spec, module_set_name)
self.conf = m.make_configuration(spec, module_set_name, explicit)
self.layout = m.make_layout(spec, module_set_name, explicit)
self.context = m.make_context(spec, module_set_name, explicit)
# Check if a default template has been defined,
# throw if not found
@@ -930,6 +935,7 @@ def remove(self):
if os.path.exists(mod_file):
try:
os.remove(mod_file) # Remove the module file
self.remove_module_defaults() # Remove default targeting module file
os.removedirs(
os.path.dirname(mod_file)
) # Remove all the empty directories from the leaf up
@@ -937,6 +943,18 @@ def remove(self):
# removedirs throws OSError on first non-empty directory found
pass
def remove_module_defaults(self):
if not any(self.spec.satisfies(default) for default in self.conf.defaults):
return
# This spec matches a default, symlink needs to be removed as we remove the module
# file it targets.
default_symlink = os.path.join(os.path.dirname(self.layout.filename), "default")
try:
os.unlink(default_symlink)
except OSError:
pass
@contextlib.contextmanager
def disable_modules():

View File

@@ -33,24 +33,26 @@ def configuration(module_set_name):
configuration_registry: Dict[str, Any] = {}
def make_configuration(spec, module_set_name):
def make_configuration(spec, module_set_name, explicit):
"""Returns the lmod configuration for spec"""
key = (spec.dag_hash(), module_set_name)
key = (spec.dag_hash(), module_set_name, explicit)
try:
return configuration_registry[key]
except KeyError:
return configuration_registry.setdefault(key, LmodConfiguration(spec, module_set_name))
return configuration_registry.setdefault(
key, LmodConfiguration(spec, module_set_name, explicit)
)
def make_layout(spec, module_set_name):
def make_layout(spec, module_set_name, explicit):
"""Returns the layout information for spec"""
conf = make_configuration(spec, module_set_name)
conf = make_configuration(spec, module_set_name, explicit)
return LmodFileLayout(conf)
def make_context(spec, module_set_name):
def make_context(spec, module_set_name, explicit):
"""Returns the context information for spec"""
conf = make_configuration(spec, module_set_name)
conf = make_configuration(spec, module_set_name, explicit)
return LmodContext(conf)
@@ -71,7 +73,7 @@ def guess_core_compilers(name, store=False):
# A compiler is considered to be a core compiler if any of the
# C, C++ or Fortran compilers reside in a system directory
is_system_compiler = any(
os.path.dirname(x) in spack.util.environment.system_dirs
os.path.dirname(x) in spack.util.environment.SYSTEM_DIRS
for x in compiler["paths"].values()
if x is not None
)
@@ -409,7 +411,7 @@ def missing(self):
@tengine.context_property
def unlocked_paths(self):
"""Returns the list of paths that are unlocked unconditionally."""
layout = make_layout(self.spec, self.conf.name)
layout = make_layout(self.spec, self.conf.name, self.conf.explicit)
return [os.path.join(*parts) for parts in layout.unlocked_paths[None]]
@tengine.context_property
@@ -417,7 +419,7 @@ def conditionally_unlocked_paths(self):
"""Returns the list of paths that are unlocked conditionally.
Each item in the list is a tuple with the structure (condition, path).
"""
layout = make_layout(self.spec, self.conf.name)
layout = make_layout(self.spec, self.conf.name, self.conf.explicit)
value = []
conditional_paths = layout.unlocked_paths
conditional_paths.pop(None)

View File

@@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""This module implements the classes necessary to generate TCL
"""This module implements the classes necessary to generate Tcl
non-hierarchical modules.
"""
import posixpath
@@ -19,7 +19,7 @@
from .common import BaseConfiguration, BaseContext, BaseFileLayout, BaseModuleFileWriter
#: TCL specific part of the configuration
#: Tcl specific part of the configuration
def configuration(module_set_name):
config_path = "modules:%s:tcl" % module_set_name
config = spack.config.get(config_path, {})
@@ -30,24 +30,26 @@ def configuration(module_set_name):
configuration_registry: Dict[str, Any] = {}
def make_configuration(spec, module_set_name):
def make_configuration(spec, module_set_name, explicit):
"""Returns the tcl configuration for spec"""
key = (spec.dag_hash(), module_set_name)
key = (spec.dag_hash(), module_set_name, explicit)
try:
return configuration_registry[key]
except KeyError:
return configuration_registry.setdefault(key, TclConfiguration(spec, module_set_name))
return configuration_registry.setdefault(
key, TclConfiguration(spec, module_set_name, explicit)
)
def make_layout(spec, module_set_name):
def make_layout(spec, module_set_name, explicit):
"""Returns the layout information for spec"""
conf = make_configuration(spec, module_set_name)
conf = make_configuration(spec, module_set_name, explicit)
return TclFileLayout(conf)
def make_context(spec, module_set_name):
def make_context(spec, module_set_name, explicit):
"""Returns the context information for spec"""
conf = make_configuration(spec, module_set_name)
conf = make_configuration(spec, module_set_name, explicit)
return TclContext(conf)

View File

@@ -36,7 +36,7 @@
cmake_cache_path,
cmake_cache_string,
)
from spack.build_systems.cmake import CMakePackage
from spack.build_systems.cmake import CMakePackage, generator
from spack.build_systems.cuda import CudaPackage
from spack.build_systems.generic import Package
from spack.build_systems.gnu import GNUMirrorPackage

View File

@@ -57,7 +57,7 @@
from spack.filesystem_view import YamlFilesystemView
from spack.install_test import TestFailure, TestSuite
from spack.installer import InstallError, PackageInstaller
from spack.stage import ResourceStage, Stage, StageComposite, stage_prefix
from spack.stage import ResourceStage, Stage, StageComposite, compute_stage_name
from spack.util.executable import ProcessError, which
from spack.util.package_hash import package_hash
from spack.util.prefix import Prefix
@@ -92,9 +92,6 @@
_spack_configure_argsfile = "spack-configure-args.txt"
is_windows = sys.platform == "win32"
def deprecated_version(pkg, version):
"""Return True if the version is deprecated, False otherwise.
@@ -165,7 +162,7 @@ def windows_establish_runtime_linkage(self):
Performs symlinking to incorporate rpath dependencies to Windows runtime search paths
"""
if is_windows:
if sys.platform == "win32":
self.win_rpath.add_library_dependent(*self.win_add_library_dependent())
self.win_rpath.add_rpath(*self.win_add_rpath())
self.win_rpath.establish_link()
@@ -210,7 +207,7 @@ def to_windows_exe(exe):
plat_exe = []
if hasattr(cls, "executables"):
for exe in cls.executables:
if is_windows:
if sys.platform == "win32":
exe = to_windows_exe(exe)
plat_exe.append(exe)
return plat_exe
@@ -1025,8 +1022,7 @@ def _make_root_stage(self, fetcher):
)
# Construct a path where the stage should build..
s = self.spec
stage_name = "{0}{1}-{2}-{3}".format(stage_prefix, s.name, s.version, s.dag_hash())
stage_name = compute_stage_name(s)
stage = Stage(
fetcher,
mirror_paths=mirror_paths,
@@ -1200,7 +1196,7 @@ def _make_fetcher(self):
# one element (the root package). In case there are resources
# associated with the package, append their fetcher to the
# composite.
root_fetcher = fs.for_package_version(self, self.version)
root_fetcher = fs.for_package_version(self)
fetcher = fs.FetchStrategyComposite() # Composite fetcher
fetcher.append(root_fetcher) # Root fetcher is always present
resources = self._get_needed_resources()
@@ -1311,7 +1307,7 @@ def provides(self, vpkg_name):
True if this package provides a virtual package with the specified name
"""
return any(
any(self.spec.satisfies(c) for c in constraints)
any(self.spec.intersects(c) for c in constraints)
for s, constraints in self.provided.items()
if s.name == vpkg_name
)
@@ -1617,7 +1613,7 @@ def content_hash(self, content=None):
# TODO: resources
if self.spec.versions.concrete:
try:
source_id = fs.for_package_version(self, self.version).source_id()
source_id = fs.for_package_version(self).source_id()
except (fs.ExtrapolationError, fs.InvalidArgsError):
# ExtrapolationError happens if the package has no fetchers defined.
# InvalidArgsError happens when there are version directives with args,
@@ -1780,7 +1776,7 @@ def _get_needed_resources(self):
# conflict with the spec, so we need to invoke
# when_spec.satisfies(self.spec) vs.
# self.spec.satisfies(when_spec)
if when_spec.satisfies(self.spec, strict=False):
if when_spec.intersects(self.spec):
resources.extend(resource_list)
# Sorts the resources by the length of the string representing their
# destination. Since any nested resource must contain another
@@ -2401,7 +2397,7 @@ def rpath(self):
# on Windows, libraries of runtime interest are typically
# stored in the bin directory
if is_windows:
if sys.platform == "win32":
rpaths = [self.prefix.bin]
rpaths.extend(d.prefix.bin for d in deps if os.path.isdir(d.prefix.bin))
else:

View File

@@ -73,7 +73,7 @@ def __call__(self, spec):
# integer is the index of the first spec in order that satisfies
# spec, or it's a number larger than any position in the order.
match_index = next(
(i for i, s in enumerate(spec_order) if spec.satisfies(s)), len(spec_order)
(i for i, s in enumerate(spec_order) if spec.intersects(s)), len(spec_order)
)
if match_index < len(spec_order) and spec_order[match_index] == spec:
# If this is called with multiple specs that all satisfy the same
@@ -185,7 +185,7 @@ def _package(maybe_abstract_spec):
),
extra_attributes=entry.get("extra_attributes", {}),
)
if external_spec.satisfies(spec):
if external_spec.intersects(spec):
external_specs.append(external_spec)
# Defensively copy returned specs

View File

@@ -37,7 +37,7 @@
def slingshot_network():
return os.path.exists("/lib64/libcxi.so")
return os.path.exists("/opt/cray/pe") and os.path.exists("/lib64/libcxi.so")
def _target_name_from_craype_target_name(name):

View File

@@ -10,7 +10,7 @@ def get_projection(projections, spec):
"""
all_projection = None
for spec_like, projection in projections.items():
if spec.satisfies(spec_like, strict=True):
if spec.satisfies(spec_like):
return projection
elif spec_like == "all":
all_projection = projection

View File

@@ -72,7 +72,7 @@ def providers_for(self, virtual_spec):
# Add all the providers that satisfy the vpkg spec.
if virtual_spec.name in self.providers:
for p_spec, spec_set in self.providers[virtual_spec.name].items():
if p_spec.satisfies(virtual_spec, deps=False):
if p_spec.intersects(virtual_spec, deps=False):
result.update(spec_set)
# Return providers in order. Defensively copy.
@@ -186,7 +186,7 @@ def update(self, spec):
provider_spec = provider_spec_readonly.copy()
provider_spec.compiler_flags = spec.compiler_flags.copy()
if spec.satisfies(provider_spec, deps=False):
if spec.intersects(provider_spec, deps=False):
provided_name = provided_spec.name
provider_map = self.providers.setdefault(provided_name, {})

View File

@@ -675,7 +675,7 @@ def relocate_text_bin(binaries, prefixes):
Raises:
spack.relocate_text.BinaryTextReplaceError: when the new path is longer than the old path
"""
BinaryFilePrefixReplacer.from_strings_or_bytes(prefixes).apply(binaries)
return BinaryFilePrefixReplacer.from_strings_or_bytes(prefixes).apply(binaries)
def is_relocatable(spec):

View File

@@ -73,24 +73,28 @@ def is_noop(self) -> bool:
"""Returns true when the prefix to prefix map
is mapping everything to the same location (identity)
or there are no prefixes to replace."""
return not bool(self.prefix_to_prefix)
return not self.prefix_to_prefix
def apply(self, filenames: list):
"""Returns a list of files that were modified"""
changed_files = []
if self.is_noop:
return
return []
for filename in filenames:
self.apply_to_filename(filename)
if self.apply_to_filename(filename):
changed_files.append(filename)
return changed_files
def apply_to_filename(self, filename):
if self.is_noop:
return
return False
with open(filename, "rb+") as f:
self.apply_to_file(f)
return self.apply_to_file(f)
def apply_to_file(self, f):
if self.is_noop:
return
self._apply_to_file(f)
return False
return self._apply_to_file(f)
class TextFilePrefixReplacer(PrefixReplacer):
@@ -122,10 +126,11 @@ def _apply_to_file(self, f):
data = f.read()
new_data = re.sub(self.regex, replacement, data)
if id(data) == id(new_data):
return
return False
f.seek(0)
f.write(new_data)
f.truncate()
return True
class BinaryFilePrefixReplacer(PrefixReplacer):
@@ -194,6 +199,9 @@ def _apply_to_file(self, f):
Arguments:
f: file opened in rb+ mode
Returns:
bool: True if file was modified
"""
assert f.tell() == 0
@@ -201,6 +209,8 @@ def _apply_to_file(self, f):
# but it's nasty to deal with matches across boundaries, so let's stick to
# something simple.
modified = True
for match in self.regex.finditer(f.read()):
# The matching prefix (old) and its replacement (new)
old = match.group(1)
@@ -243,6 +253,9 @@ def _apply_to_file(self, f):
f.seek(match.start())
f.write(replacement)
modified = True
return modified
class BinaryStringReplacementError(spack.error.SpackError):

View File

@@ -1368,7 +1368,7 @@ def create(configuration):
#: Singleton repo path instance
path = llnl.util.lang.Singleton(_path)
path: Union[RepoPath, llnl.util.lang.Singleton] = llnl.util.lang.Singleton(_path)
# Add the finder to sys.meta_path
REPOS_FINDER = ReposFinder()

View File

@@ -119,7 +119,7 @@ def rewire_node(spec, explicit):
spack.store.db.add(spec, spack.store.layout, explicit=explicit)
# run post install hooks
spack.hooks.post_install(spec)
spack.hooks.post_install(spec, explicit)
class RewireError(spack.error.SpackError):

View File

@@ -15,7 +15,8 @@
"cdash": {
"type": "object",
"additionalProperties": False,
"required": ["build-group", "url", "project", "site"],
# "required": ["build-group", "url", "project", "site"],
"required": ["build-group"],
"patternProperties": {
r"build-group": {"type": "string"},
r"url": {"type": "string"},

View File

@@ -0,0 +1,212 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Schema for gitlab-ci.yaml configuration file.
.. literalinclude:: ../spack/schema/ci.py
:lines: 13-
"""
from llnl.util.lang import union_dicts
import spack.schema.gitlab_ci
# Schema for script fields
# List of lists and/or strings
# This is similar to what is allowed in
# the gitlab schema
script_schema = {
"type": "array",
"items": {"anyOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]},
}
# Schema for CI image
image_schema = {
"oneOf": [
{"type": "string"},
{
"type": "object",
"properties": {
"name": {"type": "string"},
"entrypoint": {"type": "array", "items": {"type": "string"}},
},
},
]
}
# Additional attributes are allow
# and will be forwarded directly to the
# CI target YAML for each job.
attributes_schema = {
"type": "object",
"properties": {
"image": image_schema,
"tags": {"type": "array", "items": {"type": "string"}},
"variables": {
"type": "object",
"patternProperties": {r"[\w\d\-_\.]+": {"type": "string"}},
},
"before_script": script_schema,
"script": script_schema,
"after_script": script_schema,
},
}
submapping_schema = {
"type": "object",
"additinoalProperties": False,
"required": ["submapping"],
"properties": {
"match_behavior": {"type": "string", "enum": ["first", "merge"], "default": "first"},
"submapping": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": False,
"required": ["match"],
"properties": {
"match": {"type": "array", "items": {"type": "string"}},
"build-job": attributes_schema,
"build-job-remove": attributes_schema,
},
},
},
},
}
named_attributes_schema = {
"oneOf": [
{
"type": "object",
"additionalProperties": False,
"properties": {"noop-job": attributes_schema, "noop-job-remove": attributes_schema},
},
{
"type": "object",
"additionalProperties": False,
"properties": {"build-job": attributes_schema, "build-job-remove": attributes_schema},
},
{
"type": "object",
"additionalProperties": False,
"properties": {
"reindex-job": attributes_schema,
"reindex-job-remove": attributes_schema,
},
},
{
"type": "object",
"additionalProperties": False,
"properties": {
"signing-job": attributes_schema,
"signing-job-remove": attributes_schema,
},
},
{
"type": "object",
"additionalProperties": False,
"properties": {
"cleanup-job": attributes_schema,
"cleanup-job-remove": attributes_schema,
},
},
{
"type": "object",
"additionalProperties": False,
"properties": {"any-job": attributes_schema, "any-job-remove": attributes_schema},
},
]
}
pipeline_gen_schema = {
"type": "array",
"items": {"oneOf": [submapping_schema, named_attributes_schema]},
}
core_shared_properties = union_dicts(
{
"pipeline-gen": pipeline_gen_schema,
"bootstrap": {
"type": "array",
"items": {
"anyOf": [
{"type": "string"},
{
"type": "object",
"additionalProperties": False,
"required": ["name"],
"properties": {
"name": {"type": "string"},
"compiler-agnostic": {"type": "boolean", "default": False},
},
},
]
},
},
"rebuild-index": {"type": "boolean"},
"broken-specs-url": {"type": "string"},
"broken-tests-packages": {"type": "array", "items": {"type": "string"}},
"target": {"type": "string", "enum": ["gitlab"], "default": "gitlab"},
}
)
ci_properties = {
"anyOf": [
{
"type": "object",
"additionalProperties": False,
# "required": ["mappings"],
"properties": union_dicts(
core_shared_properties, {"enable-artifacts-buildcache": {"type": "boolean"}}
),
},
{
"type": "object",
"additionalProperties": False,
# "required": ["mappings"],
"properties": union_dicts(
core_shared_properties, {"temporary-storage-url-prefix": {"type": "string"}}
),
},
]
}
#: Properties for inclusion in other schemas
properties = {
"ci": {
"oneOf": [
ci_properties,
# Allow legacy format under `ci` for `config update ci`
spack.schema.gitlab_ci.gitlab_ci_properties,
]
}
}
#: Full schema with metadata
schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Spack CI configuration file schema",
"type": "object",
"additionalProperties": False,
"properties": properties,
}
def update(data):
import llnl.util.tty as tty
import spack.ci
import spack.environment as ev
# Warn if deprecated section is still in the environment
ci_env = ev.active_environment()
if ci_env:
env_config = ev.config_dict(ci_env.yaml)
if "gitlab-ci" in env_config:
tty.die("Error: `gitlab-ci` section detected with `ci`, these are not compatible")
# Detect if the ci section is using the new pipeline-gen
# If it is, assume it has already been converted
return spack.ci.translate_deprecated_config(data)

View File

@@ -14,7 +14,9 @@
"type": "object",
"additionalProperties": False,
"properties": {
"reuse": {"type": "boolean"},
"reuse": {
"oneOf": [{"type": "boolean"}, {"type": "string", "enum": ["dependencies"]}]
},
"enable_node_namespace": {"type": "boolean"},
"targets": {
"type": "object",

View File

@@ -61,6 +61,7 @@
"build_stage": {
"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]
},
"stage_name": {"type": "string"},
"test_stage": {"type": "string"},
"extensions": {"type": "array", "items": {"type": "string"}},
"template_dirs": {"type": "array", "items": {"type": "string"}},

View File

@@ -63,6 +63,8 @@
},
# Add labels to the image
"labels": {"type": "object"},
# Use a custom template to render the recipe
"template": {"type": "string", "default": None},
# Add a custom extra section at the bottom of a stage
"extra_instructions": {
"type": "object",
@@ -82,6 +84,16 @@
},
},
"docker": {"type": "object", "additionalProperties": False, "default": {}},
"depfile": {"type": "boolean", "default": False},
},
"deprecatedProperties": {
"properties": ["extra_instructions"],
"message": (
"container:extra_instructions has been deprecated and will be removed "
"in Spack v0.21. Set container:template appropriately to use custom Jinja2 "
"templates instead."
),
"error": False,
},
}

View File

@@ -10,6 +10,7 @@
"""
from llnl.util.lang import union_dicts
import spack.schema.gitlab_ci # DEPRECATED
import spack.schema.merged
import spack.schema.packages
import spack.schema.projections
@@ -52,6 +53,8 @@
"default": {},
"additionalProperties": False,
"properties": union_dicts(
# Include deprecated "gitlab-ci" section
spack.schema.gitlab_ci.properties,
# merged configuration scope schemas
spack.schema.merged.properties,
# extra environment schema properties
@@ -130,6 +133,15 @@ def update(data):
Returns:
True if data was changed, False otherwise
"""
import spack.ci
if "gitlab-ci" in data:
data["ci"] = data.pop("gitlab-ci")
if "ci" in data:
return spack.ci.translate_deprecated_config(data["ci"])
# There are not currently any deprecated attributes in this section
# that have not been removed
return False

View File

@@ -12,11 +12,11 @@
import spack.schema.bootstrap
import spack.schema.cdash
import spack.schema.ci
import spack.schema.compilers
import spack.schema.concretizer
import spack.schema.config
import spack.schema.container
import spack.schema.gitlab_ci
import spack.schema.mirrors
import spack.schema.modules
import spack.schema.packages
@@ -31,7 +31,7 @@
spack.schema.concretizer.properties,
spack.schema.config.properties,
spack.schema.container.properties,
spack.schema.gitlab_ci.properties,
spack.schema.ci.properties,
spack.schema.mirrors.properties,
spack.schema.modules.properties,
spack.schema.packages.properties,

View File

@@ -32,11 +32,16 @@
{
"type": "array",
"items": {
"type": "object",
"properties": {
"one_of": {"type": "array"},
"any_of": {"type": "array"},
},
"oneOf": [
{
"type": "object",
"properties": {
"one_of": {"type": "array"},
"any_of": {"type": "array"},
},
},
{"type": "string"},
]
},
},
# Shorthand for a single requirement group with

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