Compare commits

...

1125 Commits

Author SHA1 Message Date
Wouter Deconinck
c034e1ba9f meshlab: allow downloads of vendored components 2024-06-28 11:01:09 -05:00
Wouter Deconinck
84b6266190 meshlab: put in builtin repo 2024-04-08 14:41:37 -05:00
Wouter Deconinck
94a42d786f meshlab: disable two failing plugins 2024-04-08 14:29:31 -05:00
Wouter Deconinck
0e71ea51ce meshlab: new package 2024-04-08 14:29:31 -05:00
Luc Berger
b3cef1072d Nalu: updating Trilinos recipe a bit (#43471)
* Nalu: updating Trilinos recipe a bit

Basic changes to build/install nalu properly using Spack.
Some more changes would be nice for instance adding an
option to build against Trilinos master or develop. Adding
a dependency on googletest to avoid the annoying build
failures in the unit-tests.

* Nalu: adding release 1.6.0

Nalu v1.6.0 can build cleanly against Trilinos 14.0.0 with the
proposed changes. The only other combo is master / master but
than one is "floating" as these branch evolve over time. When a
new Nalu comes out we might want to add another fixed version to
keep this recipes up to date!
2024-04-08 10:39:51 -06:00
Wouter Deconinck
e8ae9a403c acts: depends_on py-onnxruntime when +onnx for @23.3: (#43529) 2024-04-08 14:13:17 +02:00
Wouter Deconinck
1a8ef161c8 fastjet: new multi-valued variant plugins (#43523)
* fastjet: new multi-valued variant `plugins`

* rivet: depends_on fastjet plugins=cxx
2024-04-08 14:12:12 +02:00
Harmen Stoppels
d3913938bc py-tatsu: add upperbound on python (#43510) 2024-04-08 11:26:46 +02:00
Harmen Stoppels
4179880fe6 py-pymatgen: add forward compat bound for cython (#43511) 2024-04-08 11:26:09 +02:00
Harmen Stoppels
125dd0368e py-triton: add zlib (#43512) 2024-04-08 11:25:33 +02:00
Harmen Stoppels
fd68f8916c gperftools: add cmake build system (#43506)
the autotools build system does something funky which causes a link line
where gccs default link dirs are explicitly added and end up before the
-L from spack's libunwind, so that ultimately it links against system
libunwind.

the cmake build system does better.
2024-04-08 10:00:05 +02:00
Jonas Eschle
93e6f5fa4e Update jax & jaxlib versions (#42863)
* upgrade new versions

* style fix

* update jaxlib deps (not cuda and bazel yet)

* update jaxlib cuda versions

* update jaxlib cuda versions

* update jaxlib cuda versions

* chore: style fix

* Update package.py

* Update package.py

* fix:  typo

* docs: add source for cuda version

* py-jaxlib 0.4.14 also doesn't build on ppc64le

* Add 0.4.26

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-04-07 12:04:23 +02:00
Robert Cohn
54acda3f11 oneapi licenses (#43451) 2024-04-06 08:04:04 -04:00
kwryankrattiger
663e20fcc4 ParaView: add v5.12.0 (#42943)
* ParaView: Update version 5.12.0

Add 5.12.0 release
Update default to 5.12.0

* Add patch for building ParaView 5.12 with kits

* Drop VTKm from neoverse
2024-04-06 04:12:48 +00:00
eugeneswalker
6428132ebb e4s ci: enable lammps variants from presets/most.cmake (#43522) 2024-04-05 20:56:18 -07:00
eugeneswalker
171958cf09 py-deephyper: add v0.6.0 (#43492)
* py-deephyper: add latest version: v0.6.0

* e4s: add py-deephyper

* v0.6.0: depend on python@3.7:3.11

* add py-packaging constraint so arm64 builds work

* [@spackbot] updating style on behalf of eugeneswalker
2024-04-06 00:28:37 +00:00
Frédéric Simonis
0d0f7ab030 Add release 3.1.0 (#43508) 2024-04-05 16:58:57 -07:00
eugeneswalker
35f8b43a54 e4s ci: add nekbone (#43515)
* e4s ci: add nekbone, nek5000

* remove nek5000
2024-04-05 16:36:13 -07:00
one
6f7eb3750c Add new versions of tinyxml2 (#43467)
* Add new versions of tinyxml2
  Added 7.0.0 to 10.0.0
* Add the variant "shared"
2024-04-05 13:36:45 -07:00
renjithravindrankannath
2121eb31ba Patch to set PARAMETERS_MIN_ALIGNMENT to the native alignment for rocm-opencl (#43444)
* For avx build, the start address of values_ buffer in KernelParameters
   is not a correct as it is computed based on 16-byte alignment.
* Style check error fix
2024-04-05 12:02:32 -07:00
kwryankrattiger
c68d739825 CI: Add debug to the log aggregation script (#42562)
* CI: Add debug to the log aggregation script
2024-04-05 14:00:27 -05:00
John W. Parent
c468697b35 Use correct method "append" instead of extend (#43514) 2024-04-05 18:46:47 +00:00
G-Ragghianti
c4094cf051 slate: Adding comgr as dependency (#43448)
* Adding comgr as dependency

* adding more smoke test deps
2024-04-05 11:32:16 -07:00
LinaMuryanto
9ff9ca61e6 py-amq, py-celery, py-kombu: New versions, fix build (#43295)
* updating package.py for py-celery, py-kombu, py-amq
* added more py-kombu package versions
* fix copyrights and stype on py-kombu/package.py
* removed extra spaces
* added py-billiard 4.2.0 and added back the license('BSD-3-Clause')
* removed extra spaces in py-celery/package.py
* fixed py-amqp 2.4.0 sha; fixed py-celery's dependency of py-click (when version restrictions)
* more clean up on specifying version bounds
2024-04-05 11:14:18 -07:00
Massimiliano Culpo
826e0c0405 Improve hit-rate on buildcaches (#43272)
* Relax compiler and target mismatches

The mismatch occurs on an edge. Previously it was assigned
the parent priority, now it is assigned the child priority.

This should make reuse from buildcaches or store more likely,
since most mismatches will be counted with "reused" priority.

* Optimize version badness for runtimes at very low priority

We don't want to e.g. switch other attributes because we
cannot reuse an old installed runtime.

* Optimize runtime attributes at very low priority

This is such that the version of the runtime would
not influence whether we should reuse a spec.

Compiler mismatches are considered for runtimes,
to avoid situations where compiling foo%gcc@9
brings in gcc-runtime%gcc@13 if gcc@13 is among
the available compilers

* Exclude specs without runtimes from reuse

This should ensure that we do not reuse specs that
could be broken, as they expect the compiler to be
installed in a specific place.
2024-04-05 20:10:28 +02:00
Andrey Perestoronin
1b86a842ea add itac and inspector packages (#43507) 2024-04-05 09:30:36 -04:00
Harmen Stoppels
558a28bf52 bazel: conflict with gcc 13 (#43504) 2024-04-05 14:24:06 +02:00
Harmen Stoppels
411576e1fa Do not acquire a write lock on the env post install if no views (#43505) 2024-04-05 12:31:21 +02:00
eugeneswalker
cab4f92960 datatransferkit: needs trilinos@14.2: for @3.1.0: (#43496) 2024-04-05 03:03:15 -06:00
Adam J. Stewart
c6c13f6782 GDAL: add v3.8.5 (#43493) 2024-04-04 21:29:28 -06:00
Daniele Cesarini
cf11fab5ad Added Libfort library (#43490) 2024-04-04 21:14:27 -06:00
Harmen Stoppels
1d8b35c840 installer.py: compute package_id from spec (#43485)
The installer runs `get_dependent_ids`, which follows edges outside the
subdag that's being installed, so it returns a superset of the actual
dependents.

That's generally fine, except that it calls `s.package` on every
dependent, which triggers a package class to be instantiated, which is a
lot of work.

Instead, compute the package id from the spec, since that's all that's
used anyways and does not trigger *lots* of slow and redundant
instantiations of package objects.
2024-04-04 20:39:30 -06:00
Weiqun Zhang
5dc46a976d amrex: add v24.04 (#43443) 2024-04-04 19:00:44 -07:00
Alex Richert
05f5596cdd Update grib-util recipe (#43484) 2024-04-04 15:07:05 -07:00
psakievich
6942c7f35b Update exawind packages (#40793) 2024-04-04 12:54:20 -06:00
Alex Richert
18f0ac0f94 Add g2@3.4.9 (#43481) 2024-04-04 11:50:08 -07:00
Vicente Bolea
d9196ee3f8 adios2: bump version 2.10.0 (#43479) 2024-04-04 13:46:40 -05:00
John W. Parent
ef0bb6fe6b Msvc: Determine OneAPI_ROOT from fc compiler path (#43131)
If ONEAPI_ROOT is not set as an environment variable, the current approach will raise an error.
Instead we can compute the OneAPI_ROOT from the compiler paths like we do with vcvarsall.
2024-04-04 11:14:44 -07:00
Alex Richert
3fed320013 Add MPI and arch bugfixes to SCOTCH (#39264)
* Add MPI and arch bugfixes to SCOTCH

* Update scotch/package.py
2024-04-04 12:48:39 -05:00
Chris Marsh
1aa77e695d Trilinos: add threadsafe variant (#43480)
* Fixes #43454 by exposing a threadsafe variant

* [@spackbot] updating style on behalf of Chrismarsh

* fix style

---------

Co-authored-by: Chrismarsh <Chrismarsh@users.noreply.github.com>
2024-04-04 10:00:53 -07:00
Alex Richert
3a0efeecf1 add g2c@1.9.0 (#43482) 2024-04-04 09:56:19 -07:00
Alex Richert
5ffb5657c9 update g2tmpl recipe (#43483) 2024-04-04 09:56:09 -07:00
Alex Richert
2b3e7fd10a Add shared variant for fftw to allow static-only builds (#37897)
Co-authored-by: alexrichert <alexrichert@gmail.com>
2024-04-04 03:47:46 -06:00
James Smillie
cb315e18f0 py-pip package: enable install on Windows (#43203)
The installation mechanism used on Linux to install py-pip (using pip
from the downloaded wheel to install the wheel) does not work on Windows.

This updates the installation of py-pip on Windows to download and
use a zipapp of a specific pip version in order to install the wheel
pip version that is requested.
2024-04-03 23:03:56 -06:00
Jonas Eschle
10c637aca0 py-zfit: add v0.18.* (#43200)
Co-authored-by: Valentin Volkl <valentin.volkl@cern.ch>
2024-04-04 02:55:00 +02:00
Greg Becker
fb4e1cad45 remove dpcpp compiler and package (#43418)
`dpcpp` is deprecated by intel and has been superseded by `oneapi` compilers for a very long time.

---------

Co-authored-by: becker33 <becker33@users.noreply.github.com>
2024-04-03 15:34:23 -07:00
Adam J. Stewart
3054b71e2e py-rarfile: add v4.2 (#43477) 2024-04-03 15:08:36 -07:00
downloadico
47163f7435 py-cig-pythia: add missing py-setuptools dependency (#43473) 2024-04-03 15:02:32 -07:00
Dom Heinzeller
e322a8382f py-torch: Add variant 'internal-protobuf' to build with the internal protobuf (#43056) 2024-04-03 15:57:54 -06:00
Greg Sjaardema
53fb4795ca Seacas exodusii 04 2024 (#43468)
* SEACAS: Update package.py to handle new SEACAS project name
  The base project name for the SEACAS project has changed from
  "SEACASProj" to "SEACAS" as of @2022-10-14, so the package
  needed to be updated to use the new project name when needed.

  The refactor also changes several:
      "-DSome_CMAKE_Option:BOOL=ON"
  to
     define("Some_CMAKE_Option", True)
* SEACAS, EXODUSII: New version; deprecate older versions; better variant descriptions
* [@spackbot] updating style on behalf of gsjaardema
* Fix long lines reported by flake8

---------

Co-authored-by: gsjaardema <gsjaardema@users.noreply.github.com>
2024-04-03 15:46:57 -06:00
eugeneswalker
4517c7fa9b ginkgo@1.7 %oneapi@2024.1: icpx 2024.1 no longer accepts sycl::ext::intel::ctz (#43476) 2024-04-03 15:46:42 -06:00
Wouter Deconinck
efaed17f91 root: new version 6.30.06 (#43472) 2024-04-03 15:41:41 -06:00
Thomas Madlener
2c17cd365d Make it possible to build whizard from a git checkout (#43447) 2024-04-03 21:55:57 +02:00
psakievich
dfe537f688 Convert curl env mod method to a side effect (#43474) 2024-04-03 12:02:48 -07:00
G-Ragghianti
be0002b460 slate: Removing scalapack as test dependency, adding python (#43452)
* removing scalapack as test dependency, adding python
* fixing style
* style
2024-04-03 11:20:03 -07:00
Daryl W. Grunau
743ee5f3de eospac: expose versions 6.5.8 and 6.5.9 (#43450)
Co-authored-by: Daryl W. Grunau <dwg@lanl.gov>
2024-04-03 11:17:15 -07:00
Cameron Smith
b6caf0156f simmetrix-simmodsuite: support RHEL8, fix module paths (#43455) 2024-04-03 11:07:43 -07:00
Christoph Junghans
ec00ffc244 byfl: fix llvm dep (#43460) 2024-04-03 10:39:06 -07:00
G-Ragghianti
f020256b9f magma add version 2.8.0 (#43417)
* Add release 2.8.0
* Changing C compiler to hipcc
* Final release version
* Adding new cmake definition for rocm support
* Enabling rocm version support
* Update sha256
* Updating website URL
* Removing unnecessary C compiler spec
* Adding rocm-core dependency
* fixing rocm-core version
* fixing rocm-core version
* fixing style
* bugfix
2024-04-03 11:25:46 -06:00
Peter Brady
04377e39e0 New package: Parthenon (#43426) 2024-04-03 10:05:02 -07:00
Vanessasaurus
ba2703fea6 flux-core: add v0.61.0 (#43465)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-04-03 12:07:32 +02:00
Adrien Bernede
92b1c8f763 RADIUSS packages update (Starting over #39613) (#41375) 2024-04-02 15:03:07 -07:00
Adam J. Stewart
2b29ecd9b6 py-pillow: add v10+ (#43441) 2024-04-02 14:46:21 -07:00
Adam J. Stewart
5b43bf1b58 py-scikit-image: add v0.21 and v0.22 (#43440)
* py-scikit-image: add v0.21 and v0.22
* Add maintainer and license
* Style fix
2024-04-02 14:41:29 -07:00
Juan Miguel Carceller
37d9770e02 gdb: add a dependency on pkgconfig (#43439)
* gdb: add a dependency on pkgconfig
* Apply dependency for 13.1 and onwards

---------

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-04-02 14:39:03 -07:00
Brad Geltz
0e016ba6f5 geopm-runtime: New package (#42737)
* Add systemd

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* gobject-introspection: Correct glib versions

- The meson.build requirement that the glib version
  is >= the gobject-introspective version is not in place
  until v1.76.1.
- Prior to that, the requirement was glib >= 2.58.0.
- Bug introduced in acbf0d99c4, PR #42222.

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* util-linux: add v2.39.3

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* py-natsort: add new versions

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* geopm-service: default systemd support to true

- Make the dependency sticky to force a failure
  if systemd compilation fails, or force
  the user to disable the option.

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* geopm-service: Add initial multi-architecture support

- Restrict arch conflicts to 3.0.1
- Disable cpuid at configure time on non-x86_64 platforms.

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* geopm-service: update docstrings

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* Add py-geopmdpy

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* Add geopm-runtime recipe

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

---------

Signed-off-by: Brad Geltz <brad.geltz@intel.com>
2024-04-02 17:27:36 +02:00
psakievich
7afa949da1 Add handling of custom ssl certs in urllib ops (#42953)
This PR allows the user to specify a path to a custom cert file (or directory) in
Spack's config:

```yaml
  # This is where custom certs for proxy/firewall are stored.
  # It can be a path or environment variable. To match ssl env configuration
  # the default is the environment variable SSL_CERT_FILE
  ssl_certs: $SSL_CERT_FILE
```

`config:ssl_certs` can be a path to a file or a directory, or it can be and environment
variable that resolves to one of those. When it posts to something valid, Spack will
update the ssl context to include custom certs, and fetching via `urllib` and `curl`
will trust the provided certs.

This should resolve many issues with fetching behind corporate firewalls.


---------

Co-authored-by: psakievich <psakievich@users.noreply.github.com>
Co-authored-by: Alec Scott <alec@bcs.sh>
2024-04-01 11:11:13 -07:00
Jose E. Roman
b81d7d0aac slepc, py-slepc4py, petsc, py-petsc4py add v3.21.0 (#43435)
* New release SLEPc 3.21

* petsc, py-petsc4py  add v3.21.0

* [@spackbot] updating style on behalf of joseeroman

---------

Co-authored-by: Satish Balay <balay@mcs.anl.gov>
Co-authored-by: joseeroman <joseeroman@users.noreply.github.com>
2024-03-31 08:57:44 -07:00
Peter Scheibel
e78484f501 Concretize when_possible: add failure detection and explicit message (#43202)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-03-31 14:02:09 +02:00
Adam J. Stewart
6fd43b4e75 PyTorch: update ecosystem (#43423) 2024-03-30 06:47:22 -06:00
G-Ragghianti
14edb55288 SLATE package: fix smoke test (#43425) 2024-03-29 17:17:48 -07:00
Juan Miguel Carceller
f062f1c5b3 ROOT package: add patch for builds with libAfterImage for MacOS (#43428) 2024-03-29 16:48:59 -07:00
eugeneswalker
7756c8f4fc ci devtools manylinux2014: update ci image with compatible gpg (#43421) 2024-03-29 16:12:55 -06:00
eugeneswalker
69c8a9e4ba veloc@1.7: depend on er@0.4: (#43433) 2024-03-29 12:54:27 -07:00
Todd Gamblin
47c0736952 xz: add comment to avoid 5.6 pending CVE resolution (#43432)
XZ is compromised; add a note for maintainers to avoid updating until we
have a release without the CVE.
2024-03-29 12:03:13 -06:00
kwryankrattiger
8b89287084 CI Reproducer on Metal (#43411)
* MacOS image remove requires override syntax

* Metal reproducer auto start and cross-platform
2024-03-29 12:32:54 -05:00
Julien Cortial
8bd6283b52 med: add v4.1.1, and v5.0.0, update package recipe (#43409) 2024-03-29 18:27:33 +01:00
Peter Scheibel
179e4f3ad1 Don't delete "spack develop" build artifacts after install (#43424)
After #41373, where we stopped considering the source directory to be the stage for develop builds,
we resumed *deleting* the stage even after a successful build.

We don't want this for develop builds because developers need to iterate; we should keep the artifacts
unless they explicitly run `spack clean`.  

Now:
- [x] Build artifacts for develop packages are not removed after a successful install
- [x] They are also not removed before an install starts, i.e. develop packages always 
      reuse prior artifacts, if available.
- [x] They can be deleted in any other context, e.g. by running  `spack clean --stage`
2024-03-29 09:36:31 -07:00
kwryankrattiger
e97787691b force oneapi compiler unless specified otherwise (#43419) 2024-03-29 09:20:26 -07:00
kjrstory
5932ee901c openradioss: add DEXEC_NAME to cmake variable and change style of cmake_args (#43365) 2024-03-29 10:45:54 +01:00
afzpatel
3bdebeba3c UCX: Add patch to set HIP_PLATFORM_AMD (#43403) 2024-03-29 10:41:45 +01:00
Massimiliano Culpo
d390ee1902 spack load: remove --only argument (#42120)
The argument was deprecated in v0.21 and slated
for removal in v0.22.
2024-03-29 10:19:10 +01:00
AMD Toolchain Support
4f9fe6f9bf Adding 'logging' and 'tracing' variants to enable AOCL DTL trace and logging capabilities (#43414) 2024-03-29 00:58:31 -06:00
Richard Berger
df6d6d9b5c flecsi: depend on legion@24.03.0: moving forward (#43410)
Prior FleCSI releases relied on commits on the control-replication branch (cr)
of Legion. That branch has now been merged into master and is part of the
24.03.0 Legion release.
2024-03-29 00:53:36 -06:00
Luc Berger
e57d33b29f Trilinos: update SuperLU dependency (#43346) 2024-03-29 00:48:27 -06:00
Wouter Deconinck
85c6d6dbab (py-)onnx: new version 1.14.{0,1}, 1.15.0 (#41877)
* (py-)onnx: new version 1.14.{0,1}, 1.15.0

Notes on `onnx`:
- The C++ standard was changed to 14 in 1.15, so no more filter_file is needed. (The C++ standard has since changed to 17 in master.)

Notes on `py-onnx`:
- `py-pybind11` was an unlisted requirement in CMakeLists.txt since 1.3 or so (before earliest spack package).

* py-onnx: depends_on pybind11 with type link, not run

* py-onnx: depends_on py-setuptools@64:
2024-03-29 00:33:27 -06:00
Kyle Knoepfel
5f9228746e Add ability to rename environments (#43296) 2024-03-28 15:15:04 -06:00
Adam J. Stewart
9f2451ddff py-jaxlib: ppc64le support has been fixed (#43422) 2024-03-28 21:15:17 +01:00
Tristan Carel
a05eb11b7b steps: add version 5.0.1 (#43360) 2024-03-28 17:43:10 +01:00
kwryankrattiger
ae2d0ff1cd CI: fail the rebuild command if buildcache push failed (#40045) 2024-03-28 17:02:41 +01:00
Greg Becker
7e906ced75 spack find: add options for local/upstream only (#42999)
Users requested an option to filter between local/upstream results in `spack find` output.

```
# default behavior, same as without --install-tree argument
$ spack find --install-tree all

# show only local results
$ spack find --install-tree local  

# show results from all upstreams
$ spack find --install-tree upstream 

# show results from a particular upstream or the local install_tree
$ spack find --install-tree /path/to/install/tree/root
```

---------

Co-authored-by: becker33 <becker33@users.noreply.github.com>
2024-03-28 10:00:55 -05:00
Andrey Perestoronin
647e89f6bc intel-oneapi 2024.1.0: added new version to packages (#43375)
* added new package versions

* add itac and inspector

* Remove ITAC and Inspector

* Set older version for MKL as a workaround to pass CI issue
2024-03-28 08:09:37 -06:00
Anderson Chauphan
3239c29fb0 trilinos: add v15.1.1 (#42996) 2024-03-28 10:08:28 -04:00
Martin Aumüller
abced0e87d openscenegraph: patch for compatibility with ffmpeg@5: (#43051)
Co-authored-by: aumuell <aumuell@users.noreply.github.com>
2024-03-28 11:21:47 +01:00
liam-o-marsh
300fc2ee42 scipy: register conflict with too-recent openblas (#43301) 2024-03-28 11:03:45 +01:00
Christopher Christofi
13c4258e54 py-folium: add new package with version 0.16.0 (#43352) 2024-03-28 10:50:37 +01:00
Sergey Kosukhin
f29cb7f953 zlib-ng: %nvhpc: Fix build with %nvhpc (similar to zlib) (#43095)
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-03-28 10:41:10 +01:00
Ryan Honeyager
826b8f25c5 hdf5: fixes floating point exceptions generated when fpe trapping is enabled (#42880) 2024-03-28 10:34:10 +01:00
Cody Balos
ebaeea7820 sundials: add new version (#43008)
* sundials: add new version
* note previous default
* update when clause for removed options

---------

Co-authored-by: David J. Gardner <gardner48@llnl.gov>
2024-03-28 10:12:49 +01:00
Kensuke WATANABE
f76eb993aa pixman: avoid assembler macros error with Fujitsu compiler (#43362) 2024-03-28 10:10:59 +01:00
Tristan Carel
0b2c370a83 py-pytest-mpi: new package starting at 0.6 (#43368) 2024-03-28 10:01:01 +01:00
Tristan Carel
6a9ee480bf py-vascpy: new package starting at 0.1.1 (#43370) 2024-03-28 09:58:43 +01:00
potter-s
cc80d52b62 aws-cli-2: restrict supported Python versions to @:3.11 (#43390)
Co-authored-by: Simon Potter <sp39@sanger.ac.uk>
2024-03-28 08:39:51 +01:00
Paul R. C. Kent
b9c7d3b89b llvm: add 18.1.2 (#43401) 2024-03-28 08:24:05 +01:00
AMD Toolchain Support
c1be6a5483 QE: backport 7.3.1 elpa build fix to 7.3 (#43394)
Co-authored-by: Ning Li <ning.li@amd.com>
2024-03-28 08:12:23 +01:00
Juan Miguel Carceller
42550208c3 gaudi: add version 38 and a gaudialg variant (#42856)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-03-28 08:10:00 +01:00
Ken Raffenetti
be231face6 mpich: fixup removal of pmi=off option (#43377) 2024-03-28 08:08:37 +01:00
Chris White
89ac747a76 add lua 5.4.6 (#43407) 2024-03-27 22:37:29 -06:00
Richard Berger
5d8f36d667 Legion: add Rust-based profiler to install (#43408)
* legion: add missing license
* legion: add rust-based profiler to install
2024-03-27 22:25:54 -06:00
Sreenivasa Murthy Kolam
6c3fed351f Fix build failure when run-tests is enabled for rocfft (#42424)
* initial commit to fix the error when running run tests for rocfft

* apply patch from 5.7.0 onwards

* add description for the patch that is added
2024-03-27 21:09:29 -05:00
afzpatel
b9cbd15674 hipcc: new package for HIP (#43245)
* initial commit to add hipcc package
* restore setup_dependent_package
2024-03-27 21:05:50 -05:00
Alex Richert
b8f633246a Add aocc support to qt (#43400) 2024-03-27 17:23:45 -06:00
Massimiliano Culpo
a2f3e98ab9 pinentry: add v1.3.0 (#43395) 2024-03-27 22:28:34 +01:00
Paul R. C. Kent
acffe37313 libffi: add 3.4.6 and 3.4.5 (#43404) 2024-03-27 22:27:19 +01:00
Greg Sjaardema
249e5415e8 Update exodusii package (#43379)
* SEACAS: Update package.py to handle new SEACAS project name
  The base project name for the SEACAS project has changed from
  "SEACASProj" to "SEACAS" as of @2022-10-14, so the package
  needed to be updated to use the new project name when needed.
  The refactor also changes several:
      "-DSome_CMAKE_Option:BOOL=ON"
  to
     define("Some_CMAKE_Option", True)
* exodusii -- refactor and bring up-to-date
* Add missed patch file
* [@spackbot] updating style on behalf of gsjaardema
* Apply seacas windows patch here also.
* Update url so old checksums valid; redo new checksums

---------

Co-authored-by: gsjaardema <gsjaardema@users.noreply.github.com>
2024-03-27 14:14:49 -07:00
Elliott Slaughter
e2a942d07e legion: Add 24.03.0, update HIP dependency (#43398)
* legion: Add 24.03.0, update HIP dependency.
* legion: Remove CUDA upper bound, update HIP bounds, use f-strings.
* legion: Fix format.
* legion: Fix format again.
2024-03-27 14:38:28 -06:00
afzpatel
32deca2a4c initial commit to add check function to rocthrust (#43405) 2024-03-27 13:06:55 -07:00
Yanfei Guo
e4c64865f1 argobots: update to v1.2 (#43381)
* argobots: update to v1.2
* Replace prior maintainer with current one.

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-03-27 13:58:37 -06:00
Adam J. Stewart
1175f37577 py-kornia: add v0.7.2 (#43184)
* py-kornia: add v0.7.2
* Add maintainers to recipe
* https not supported
* Debug build failure
* More detailed debug info
* Try rust+dev
* Fix pyo3 build
* Fix turbojpeg-sys build
* Fix dlpack-rs build
* Get rid of debug env vars
2024-03-27 10:58:06 -07:00
James Edgeley
faa183331f Update Nektar++ package (#43397)
* Update Nektar++ package
* shorten line
* correct to 5.5.0
* use cmake helpers
* style

---------

Co-authored-by: JamesEdgeley <JamesEdgeley@users.noreply.github.com>
2024-03-27 11:55:14 -06:00
afzpatel
bbac33871c bump rocprofiler-dev to 6.0 and add aqlprofile (#42459)
* Initial commit to bump rocprofiler-dev to 6.0 and add aqlprofile recipe
* bump to 6.0.2 and extracting binaries from deb pkg
* fixes for hpctoolkit build errors
* add yum and zyp aqlprofile packages
* fix style issues
2024-03-27 10:36:10 -07:00
afzpatel
6d4dd33c46 Enable ASAN in ROCm packages (#42704)
* Initial commit to enable ASAN
* fix styling
* fix styling
* add asan option for hip-tensor and roctracer-dev
2024-03-27 09:40:21 -07:00
Adrien Cotte
579bad05a8 Add py-modules-gui (mogui) (#43396) 2024-03-27 09:35:17 -07:00
psakievich
27a8eb0f68 Add config option and compiler support to reuse across OS's (#42693)
* Allow compilers to function across compatible OS's
* Add documentation in the default yaml

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: Gregory Becker <becker33@llnl.gov>
2024-03-27 15:39:07 +00:00
Tristan Carel
4cd993070f py-libsonata: new package starting at 0.1.25 (#43372)
* py-libsonata: new package starting at 0.1.25
* align spack version with the git branch
* Fix min required versions / use spack packages instead of submodules
2024-03-27 08:20:13 -07:00
renjithravindrankannath
4c55c6a268 rvs binary path updated for 6.0 (#43359) 2024-03-27 07:30:30 -07:00
Wouter Deconinck
a4a27fb1e4 root: new version 6.30.04 (#43378)
New version of ROOT, no changes to build system that aren't already accounted for (e.g. require http for webgui), https://github.com/root-project/root/compare/v6-30-02...v6-30-04
2024-03-27 07:28:34 -07:00
Massimiliano Culpo
66345e7185 Improve fixup macos rpath unit test (#43392)
Starting from XCode version 15 the linker ignores
duplicate rpaths, so the libraries don't need fixing
in those cases
2024-03-27 12:01:12 +01:00
dependabot[bot]
8f76f1b0d8 build(deps): bump actions/setup-python from 5.0.0 to 5.1.0 (#43384) 2024-03-27 10:49:45 +01:00
dependabot[bot]
4cab6f3af5 build(deps): bump codecov/codecov-action from 4.1.0 to 4.1.1 (#43385) 2024-03-27 10:49:33 +01:00
Harmen Stoppels
0d4665583b ci: inherit secrets in local workflows (#43391) 2024-03-27 09:48:14 +01:00
Harmen Stoppels
5d0ef9e4f4 ci: remove outdated version comments (#43389) 2024-03-27 09:26:12 +01:00
Harmen Stoppels
e145baf619 codecov: verbose: true (#43388) 2024-03-27 09:15:34 +01:00
Wouter Deconinck
6c912b30a2 Codespaces support for rapid PR evaluation (#41901)
* Create devcontainer.json

* Ensure codespace can be setup for current branch

* fix: find compilers in site scope

* fix: use cloud_pipelines ubuntu20.04 image

* fix: spack config --scope site add

* fix: use develop, not develop-root mirror
2024-03-26 21:13:32 -05:00
Jordan Ogas
f4da453f6b Charliecloud package: add 0.36 and 0.37; update dependencies. (#42590)
This adds a dependency on pkg-config which in turn builds pkg-config
on pipelines using %onapi/%cce: update the pkg-config build to disable
specific warnings-as-errors from these compilers.

Co-authored-by: Reid Priedhorsky <1682574+reidpr@users.noreply.github.com>
2024-03-26 16:13:29 -07:00
Harmen Stoppels
7e9caed8c2 ci: fix codecov upload (#43382) 2024-03-26 22:49:26 +01:00
Matthew Thompson
69509a6d9a pflogger: add version 1.14.0 (#43373) 2024-03-26 14:08:24 -06:00
Massimiliano Culpo
0841050d20 Add macos-14 as a runner (Apple M1) (#42728)
* Add macos-14 as a runner (Apple M1)

* Mark a test xfail

We need to check later if this test needs modifications
on Apple Silicon chips.

---------

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
Co-authored-by: alalazo <alalazo@users.noreply.github.com>
2024-03-26 12:36:21 -07:00
Cody Balos
321ffd732b axom package: add tests (#43312) 2024-03-26 11:21:28 -07:00
Simon Frasch
22922323e3 spfft package: add version 1.1.0 (#43318) 2024-03-26 10:19:06 -07:00
eugeneswalker
0b5b192c18 glvis: fix spack issue #42839 (#43369)
* glvis: fix spack issue #42839

* add issue link
2024-03-26 11:13:54 -06:00
Andrey Alekseenko
1275c57d88 gromacs: add new versions 2024, 2024.1; fix license (#43366) 2024-03-26 10:19:58 -06:00
Juan Miguel Carceller
29a39ac6a0 xrootd: add a dependency on pkgconfig when building with +davix (#43339)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-03-26 09:01:47 -07:00
kwryankrattiger
ae9c86a930 buildcache sync: manifest-glob with arbitrary destination (#41284)
* buildcache sync: manifest-glob with arbitrary destination

The current implementation of the --manifest-glob is a bit restrictive
requiring the destination to be known by the generation stage of CI.
This allows specifying an arbitrary destination mirror URL.

* Add unit test for buildcache sync with manifest

* Fix test and arguments for manifest-glob with override destination

* Add testing path for unused mirror argument
2024-03-26 08:47:45 -07:00
Massimiliano Culpo
83199a981d Allow unit test to work on Apple M1/M2 (#43363)
* Remove a few compilers from static test data

These compilers were used only in a bunch of tests, so
they are added only there.

* Remove clang@3.3 from unit test configuration

* Parametrize compilers.yaml

* Remove specially named gcc from static data

The compilers are used in two tests

* Remove apple-clang and macOS compilers from static data

The compiler was used only in multimethod tests

* Remove clang@3.5 (compiler seems to be unused)

* Remove gcc@4.4.0 (compiler seems to be unused)

* Exclude x86_64 tests on other architectures

* Mark two tests as for clingo only

* Update version syntax in compilers.yaml

* Parametrize tcl tests on architectures

* Parametrize lmod tests on architectures

* Substitute gcc@4.5.0 with gcc@4.8.0 so it can be used on aarch64

* Fix a few issues with aarch64 and unit-tests
2024-03-26 16:20:42 +01:00
eugeneswalker
ed40c3210e ci: add developer-tools-manylinux2014 stack (#43128)
* ci: add developer-tools-manylinux2014 stack

* add libtree, patchelf
2024-03-26 08:02:16 -07:00
Christopher Christofi
be96460ab2 py-nibabel: add new version 5.2.1 (#43335) 2024-03-26 12:46:48 +01:00
pauleonix
95caf55fe7 cuda: add 12.4.0, 12.3.2, 12.3.1 and 12.2.2 (#42748)
Add conflicts to ginkgo and petsc to avoid build failures with cuda@12.4

Co-authored-by: pauleonix <pauleonix@users.noreply.github.com>
2024-03-26 07:10:48 +01:00
Mark W. Krentel
960af24270 hpctoolkit: add version 2024.01.1 (#43353)
Add version 2024.01.1.  Adjust the dependencies for develop that no
longer uses libmonitor.
2024-03-25 17:57:45 -06:00
Christopher Christofi
899bef2aa8 py-nilearn: add new version (#43332)
* py-nilearn: add new version
* add maintainers and license
2024-03-25 16:45:13 -07:00
Adam J. Stewart
f0f092d9f1 py-keras: add v3.1.1 (#43283) 2024-03-26 00:38:01 +01:00
Christopher Christofi
6eaac2270d py-trx-python: add new package with version 0.2.9 (#43333) 2024-03-25 16:11:28 -07:00
John W. Parent
a9f3f6c007 seacas: fix linking on Windows (#43356) 2024-03-25 16:28:03 -06:00
Rocco Meli
08a04ebd46 spglib: add version 2.3.1 (#43345) 2024-03-25 14:27:32 -06:00
Matthew Thompson
d8e642ecb7 Update gftl, pflogger to match GFE 1.14 (#43291) 2024-03-25 13:22:50 -07:00
Christopher Christofi
669ed69d8e py-mne: add new version (#43334) 2024-03-25 13:21:07 -07:00
potter-s
7ebb21a0da Updated version (#43343)
Co-authored-by: Simon Potter <sp39@sanger.ac.uk>
2024-03-25 13:12:58 -07:00
Alec Scott
93ffa9ba5d go: add v1.22.1 (#43337) 2024-03-25 09:32:58 -07:00
liam-o-marsh
e5fdb90496 pyscf: new dependency bounds for pyscf, new version (#43300) 2024-03-25 10:24:01 -05:00
Danny McClanahan
303a0b3653 add command_line scope to help metavar (#42890)
It's now possible to add config on the command line with `spack -c <CONFIG_VARS> ...`, but the new `command_line` scope isn't reflected in the help output for `--scope`:

```bash
> spack help config
...
  --scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
                        configuration scope to read/modify
...
```
2024-03-25 07:13:43 -07:00
Juan Miguel Carceller
9f07544bde r-rcpp: add version 1.0.11 and 1.0.12 (#43330) 2024-03-25 13:53:12 +01:00
Harmen Stoppels
9b046a39a8 strip url: fix whl suffix, remove exe (#43344) 2024-03-25 13:46:09 +01:00
Massimiliano Culpo
0c9a53ba3a Add intel-oneapi-runtime, allow injecting virtual dependencies (#42062)
This PR adds:
- A new runtime for `%oneapi` compilers, called `intel-oneapi-runtime`
- Information to both `gcc-runtime`  and `intel-oneapi-runtime`, to ensure
  that we don't mix compilers using different soname for either `libgfortran`
  or `libifcore`

To do so, the following internal mechanisms have been implemented:
- Possibility to inject virtual dependencies from the `runtime_constraints`
  callback on packages

Information has been added to `gcc-runtime` to provide the correct soname
under different conditions on its `%gcc`.

Rules injected into the solver looks like:

```prolog
% Add a dependency on 'gfortran@5' for nodes compiled with gcc@=13.2.0 and using the 'fortran' language
attr("dependency_holds", node(ID, Package), "gfortran", "link") :-
  attr("node", node(ID, Package)),
  attr("node_compiler", node(ID, Package), "gcc"),
  attr("node_compiler_version", node(ID, Package), "gcc", "13.2.0"),
  not external(node(ID, Package)),
  not runtime(Package),
  attr("language", node(ID, Package), "fortran").

attr("virtual_node", node(RuntimeID, "gfortran")) :-
  attr("depends_on", node(ID, Package), ProviderNode, "link"),
  provider(ProviderNode, node(RuntimeID, "gfortran")),
  attr("node", node(ID, Package)),
  attr("node_compiler", node(ID, Package), "gcc"),
  attr("node_compiler_version", node(ID, Package), "gcc", "13.2.0"),
  not external(node(ID, Package)),
  not runtime(Package),
  attr("language", node(ID, Package), "fortran").

attr("node_version_satisfies", node(RuntimeID, "gfortran"), "5") :-
  attr("depends_on", node(ID, Package), ProviderNode, "link"),
  provider(ProviderNode, node(RuntimeID, "gfortran")),
  attr("node", node(ID, Package)),
  attr("node_compiler", node(ID, Package), "gcc"),
  attr("node_compiler_version", node(ID, Package), "gcc", "13.2.0"),
  not external(node(ID, Package)),
  not runtime(Package),
  attr("language", node(ID, Package), "fortran").
```
2024-03-24 22:59:21 -07:00
Loic Hausammann
1fd4353289 openmpi: Add new variant: romio-filesystem=string (#43265)
Co-authored-by: loikki <loic.hausammann@id.ethz.ch>
2024-03-24 01:00:38 +01:00
potter-s
fcb8ed6409 py-plotly: Add versions up to 5.20 (#43284) 2024-03-24 00:55:42 +01:00
Marie Houillon
2f11862832 openCARP: Add v15.0 packages (#43299)
Co-authored-by: openCARP consortium <info@opencarp.org>
2024-03-24 00:35:32 +01:00
Gavin John
bff11ce8e7 py-kaleido: Add MacOS build, fix checksums (#43309)
* py-kaledio: Fix completely borked package.py

* Readd stuff I forgot to add

* And one last missing thing

* Remove python restriction

* [@spackbot] updating style on behalf of Pandapip1

* Add MacOS build

* Fix checksum

* Handle all supported OSes

* Split imports

* Remove extra version stuff
2024-03-24 00:31:38 +01:00
fgava90
218693431c paraview: fix range of exodusII-netcdf4.9.0.patch (#42926)
Co-authored-by: Gava, Francesco <francesco.gava@mclaren.com>
2024-03-23 20:33:20 +01:00
Alex Richert
e036cd9ef6 zlib-ng: New variants: +shared and +pic (#42796) 2024-03-23 19:32:42 +01:00
Sinan
cd5bef6780 py-line-profiler: Add 4.1.2 and 3.5.1 with their deps (#43156)
Co-authored-by: sbulut <sbulut@3vgeomatics.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-03-23 11:16:48 -06:00
Davide
159e9a20d1 suite-sparse: Add version 7.3.1 (#43328) 2024-03-23 10:00:28 -06:00
Auriane R
99bb288db7 py-torch-nvidia-apex: @3.11: Add config_settings(PEP517), add missing py-packaging (#43306) 2024-03-23 16:04:10 +01:00
Chris White
99744a766b BLT: add new version 0.6.2 (#43257) 2024-03-23 15:25:29 +01:00
Juan Miguel Carceller
ddd8be51a0 re2: use the same C++ std used by abseil-cpp (#43288)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-03-23 14:48:38 +01:00
吴坎
bba66b1063 py-vl-convert-python: Add 1.3.0 (#43297) 2024-03-23 14:44:23 +01:00
Howard Pritchard
1c3c21d9c7 mpich: add variant +xpmem to specify use of xpmem (#43293)
Signed-off-by: Howard Pritchard <hppritcha@gmail.com>
2024-03-23 14:36:06 +01:00
Christopher Christofi
cbe9b3d01c bgen: add new package with version 1.1.7 (#43327) 2024-03-23 13:49:41 +01:00
Richard Berger
0abf5ba43c hip: don't set HIP_PATH in ROCm 5.5+ (#42882) 2024-03-23 13:22:06 +01:00
Jonas Eschle
9ab3c1332b py-tensorflow-probability: Re-activate +py-jax variant for @0.20:, Add 0.23.0 (#43249) 2024-03-23 13:15:26 +01:00
Christopher Christofi
b6425da50f New package: qctool (#43326) 2024-03-23 05:46:03 -06:00
YI Zeping
937a4dbf69 NWChem pacakge: expand fftw patch appliance range to 7.2.2 (#43321)
* expand fftw patch appliance range to include 7.2.2
* fix formatting bug
2024-03-23 05:41:34 -06:00
Gavin John
cd779ee54d octave package: correction to jdk variant description (#43325) 2024-03-23 05:41:11 -06:00
Gavin John
7ddcb13325 openjdk package: use correct homepage (#43324) 2024-03-23 05:40:58 -06:00
Gavin John
7666046ce3 icedtea: change jdk dependency to java (#43323) 2024-03-23 05:40:43 -06:00
Miguel Dias Costa
8e89e61402 BerkeleyGW package: add version 4.0 (#43316) 2024-03-23 04:02:44 -06:00
Auriane R
d0dbfaa5d6 aws-ofi-nccl package: add versions including 1.8.1 (#43305)
The default url couldn't be the one with v0.0.0-aws since spack was
replacing v0.0.0-aws with v<version_number> for example, deleting the
-aws suffix. I used the url_for_version method to specify this suffix.
2024-03-22 17:49:00 -07:00
Gavin John
26f562b5a7 New package: py-kneaddata (#43310) 2024-03-22 17:20:52 -07:00
Chris Marsh
2967804da1 netcdf-cxx4: fix reference error (#43322) 2024-03-22 16:05:17 -07:00
Harmen Stoppels
c3eaf4d6cf Support for prereleases (#43140)
This adds support for prereleases. Alpha, beta and release candidate
suffixes are ordered in the intuitive way:

```
1.2.0-alpha < 1.2.0-alpha.1 < 1.2.0-beta.2 < 1.2.0-rc.3 < 1.2.0 < 1.2.0-xyz
```

Alpha, beta and rc prereleases are defined as follows: split the version
string into components like before (on delimiters and string boundaries).
If there's a string component `alpha`, `beta` or `rc` followed by an optional
numeric component at the end, then the version is prerelease.

So `1.2.0-alpha.1 == 1.2.0alpha1 == 1.2.0.alpha1` are all the same, as usual.

The strings `alpha`, `beta` and `rc` are chosen because they match semver,
they are sufficiently long to be unambiguous, and and all contain at least
one non-hex character so distinguish them from shasum/digest type suffixes.

The comparison key is now stored as `(release_tuple, prerelease_tuple)`, so in
the above example:

```
((1,2,0),(ALPHA,)) < ((1,2,0),(ALPHA,1)) < ((1,2,0),(BETA,2)) < ((1,2,0),(RC,3)) < ((1,2,0),(FINAL,)) < ((1,2,0,"xyz"), (FINAL,))
```

The version ranges `@1.2.0:` and `@:1.1` do *not* include prereleases of
`1.2.0`.

So for packaging, if the `1.2.0alpha` and `1.2.0` versions have the same constraints on
dependencies, it's best to write

```python
depends_on("x@1:", when="@1.2.0alpha:")
```

However, `@1.2:` does include `1.2.0alpha`. This is because Spack considers
`1.2 < 1.2.0` as distinct versions, with `1.2 < 1.2.0alpha < 1.2.0` as a consequence.

Alternatively, the above `depends_on` statement can thus be written

```python
depends_on("x@1:", when="@1.2:")
```

which can be useful too. A short-hand to include prereleases, but you
can still be explicit to exclude the prerelease by specifying the patch version
number.

### Concretization

Concretization uses a different version order than `<`. Prereleases are ordered
between final releases and develop versions. That way, users should not
have to set `preferred=True` on every final release if they add just one
prerelease to a package. The concretizer is unlikely to pick a prerelease when
final releases are possible.

### Limitations

1. You can't express a range that includes all alpha release but excludes all beta
   releases. Only alternative is good old repeated nines: `@:1.2.0alpha99`.

2. The Python ecosystem defaults to `a`, `b`, `rc` strings, so translation of Python versions to
   Spack versions requires expansion to `alpha`, `beta`, `rc`. It's mildly annoying, because
   this means we may need to compute URLs differently (not done in this commit).

### Hash

Care is taken not to break hashes of versions that do not have a prerelease
suffix.
2024-03-22 23:30:32 +01:00
John W. Parent
397334a4be Spack CI: Refactor process_command for Cross Platform support (#39739)
Generate CI scripts as powershell on Windows. This is intended to
output exactly the same bash scripts as before on Linux.

Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
2024-03-22 14:06:29 -07:00
Harmen Stoppels
434836be81 python wheels: do not "expand" (#43317) 2024-03-22 16:57:46 +01:00
Thomas-Ulrich
7b9b976f40 openssh: add 9.7p1 and 9.6p1; update workaround for clang (#40857)
Signed-off-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-03-22 08:24:32 -06:00
Mikael Simberg
4746e8a048 apex: Set APEX_WITH_KOKKOS CMake option in apex package (#43243)
* Make sure APEX_WITH_KOKKOS CMake option is set in apex

* Add conflict for apex with ~kokkos
2024-03-22 08:50:29 +01:00
Rocco Meli
69c684fef9 ELPA: enable GPU streams and update deprecated variables (#43145)
* elpa streams

* [@spackbot] updating style on behalf of RMeli

* Apply suggestions from @albestro

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

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

---------

Co-authored-by: RMeli <RMeli@users.noreply.github.com>
Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
2024-03-22 08:42:24 +01:00
Valentin Volkl
2314aeb884 py-cmake: only run test suite when run_tests (#43246)
As the cmake build is triggered by scikit build, the usual spack option
for enabling tests had no effect and the heavy test suite ran all the time.

Used https://github.com/scikit-build/cmake-python-distributions/issues/172#issuecomment-890322263
to implement how to pass options to the actual `cmake` build.

I also excluded some tests that failed for me on alma9 (gcc 11.4.1),
so the rest of the test suite can be run.
2024-03-22 04:34:43 +01:00
Martin Aumüller
d33e10a695 ffmpeg: add v6.1.1 and older patch release updates (#43050) 2024-03-22 03:39:53 +01:00
Henning Glawe
7668a0889a ncurses: Add terminfo for rxvt-unicode{,-256color} (#42721)
taken from the debian ncurses source package.
2024-03-22 02:50:24 +01:00
Thomas-Ulrich
d7a74bde9f easi: add v1.3.0, python bindings and master (#42784) 2024-03-22 02:44:20 +01:00
AMD Toolchain Support
fedf8128ae openblas: Add variant dynamic_dispatch: select best kernel at runtime (#42746)
Enable OpenBLAS's built-in CPU capability detection and kernel selection. 

This allows run-time selection of the "best" kernels for the running CPU, rather
than what is specified at build time.  For example, it allows OpenBLAS  to use
AVX512 kernels when running on ZEN4, and built targeting the "ZEN" architecture.

Co-authored-by: Branden Moore <branden.moore@amd.com>
2024-03-22 02:27:21 +01:00
Richard Berger
f70af2cc57 libristra: depends_on() for lua: allow newer lua versions (#42810) 2024-03-22 01:53:33 +01:00
Alex Leute
50562e6a0e py-neptune-client and missing deps: new package (#43059)
Co-authored-by: Cecilia Lau <chlits@rit.edu>
Co-authored-by: Jen Herting <jen@herting.cc>
2024-03-22 01:51:13 +01:00
Sergey Kosukhin
4ac51b2127 libiconv: fix building with nvhpc (#43033) 2024-03-22 01:43:30 +01:00
HELICS-bot
81c9e346dc helics: Add version 3.5.1 (#43314)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-21 18:08:36 -06:00
Christopher Christofi
73e16a7881 py-mrcfile: add new version (#43125) 2024-03-22 00:00:15 +01:00
Alex Richert
af8868fa47 xv (image viewer): Add missing depends_on(libxt) (#43277) 2024-03-21 23:24:29 +01:00
Rémi Lacroix
cfd4e356f8 x264: Tag a recent commit: 20240314 (#43304)
x264 does not publish releases so tag a newer commit in Spack in order to be able to use an up-to-date version.
2024-03-21 23:20:00 +01:00
Adam J. Stewart
fc87dcad4c py-torchmetrics: add v1.3.2 (#43244) 2024-03-21 23:00:32 +01:00
snehring
65472159c7 dorado: adding version 0.5.3 (#43313) 2024-03-21 22:59:20 +01:00
Stephen Hudson
d1f9d8f06d libEnsemble: add v1.2.2 (#43308) 2024-03-21 22:57:19 +01:00
Rocco Meli
67ac9c46a8 namd: disable parallel build for 3.0b3 (#43215) 2024-03-21 22:26:36 +01:00
Stephen Sachs
aa39465188 Re enable aws pcluster buildcache stack (#38931)
* Changes to re-enable aws-pcluster pipelines

- Use compilers from pre-installed spack store such that compiler path relocation works when downloading from buildcache.
- Install gcc from hash so there is no risk of building gcc from source in pipleine.
- `packages.yam` files are now part of the pipelines.
- No more eternal `postinstall.sh`. The necessary steps are in `setup=pcluster.sh` and will be version controlled within this repo.
- Re-enable pipelines.

* Add  and

* Debugging output & mv skylake -> skylake_avx512

* Explicilty check for packages

* Handle case with no intel compiler

* compatibility when using setup-pcluster.sh on a pre-installed cluster.

* Disable palace as parser cannot read require clause at the moment

* ifort cannot build superlu in buildcache

`ifort` is unable to handle such long file names as used when cmake compiles
test programs inside build cache.

* Fix spack commit for intel compiler installation

* Need to fetch other commits before using them

* fix style

* Add TODO

* Update packages.yaml to not use 'compiler:', 'target:' or 'provider:'

Synchronize with changes in https://github.com/spack/spack-configs/blob/main/AWS/parallelcluster/

* Use Intel compiler from later version (orig commit no longer found)

* Use envsubst to deal with quoted newlines

This is cleaner than the `eval` command used.

* Need to fetch tags for checkout on version number

* Intel compiler needs to be from version that has compatible DB

* Install intel compiler with commit that has DB ver 7

* Decouple the intel compiler installation from current commit

- Use a completely different spack installation such that this current pipeline
commit remains untouched.
- Make the script suceed even if the compiler installation fails (e.g. because
the Database version has been updated)
- Make the install targets fall back to gcc in case the compiler did not install
correctly.

* Use generic target for x86_64_vX

There is no way to provision a skylake/icelake/zen runner. They are all in the
same pools under x86_64_v3 and x86_64_v4.

* Find the intel compiler in the current spack installation

* Remove SPACK_TARGET_ARCH

* Fix virtual package index & use package.yaml for intel compiler

* Use only one stack & pipeline per generic architecture

* Fix yaml format

* Cleanup typos

* Include fix for ifx.cfg to get the right gcc toolchain when linking

* [removeme] Adding timeout to debug hang in make (palace)

* Revert "[removeme] Adding timeout to debug hang in make (palace)"

This reverts commit fee8a01580489a4ea364368459e9353b46d0d7e2.

* palace x86_64_v4 gets stuck when compiling try newer oneapi

* Update comment

* Use the latest container image

* Update gcc_hashes to match new container

* Use only one tag providing tags per extends call

Also removed an unnecessary tag.

* Move generic setup script out of individual stack

* Cleanup from last commit

* Enable checking signature for packages available on the container

* Remove commented packages / Add comment for palace

* Enable openmpi@5 which needs pmix>3

* don't look for intel compiler on aarch64
2024-03-21 14:45:05 -05:00
downloadico
09810a5e7c py-cig-pythia: add py-cig-pythia package to spack (#43294) 2024-03-21 11:11:14 -07:00
Alec Scott
446c0f2325 Disable interactive editor when --batch if passed to checksum (#43102) 2024-03-21 18:15:09 +01:00
Auriane R
c4ce51c9be Add flash-attn package (#42939) 2024-03-21 07:23:07 -06:00
Harmen Stoppels
1f63a764ac jdk: new versions (#43264) 2024-03-21 12:49:29 +01:00
Alec Scott
384e198304 py-python-lsp-server: add v1.10.0 (#42799)
* py-python-lsp-server: add v1.10.0

* Apply suggestions from code review

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

* Remove py-wheel from package

* Apply suggestions from code review

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-21 10:36:15 +01:00
Auriane R
2303332415 Update aws-ofi-nccl to use the hwloc option (#43287) 2024-03-21 09:38:40 +01:00
Tom Scogland
0eb1957999 cmd/python: use runpy to allow multiprocessing in scripts (#41789)
Running a `spack-python` script like this:

```python

import spack
import multiprocessing

def echo(args):
    print(args)

if __name__ == "__main__":
    pool = multiprocessing.Pool(2)
    pool.map(echo, range(10))
```

will fail in `develop` with an error like this:

```console
_pickle.PicklingError: Can't pickle <function echo at 0x104865820>: attribute lookup echo on __main__ failed
```

Python expects to be able to look up the method `echo` in `sys.path["__main__"]` in
subprocesses spawned by `multiprocessing`, but because we use `InteractiveConsole` to
run `spack python`, the executed file isn't considered to be the `__main__` module, and
lookups in subprocesses fail. We tried to fake this by setting `__name__` to `__main__`
in the `spack python` command, but that doesn't fix the fact that no `__main__` module
exists.

Another annoyance with `InteractiveConsole` is that `__file__` is not defined in the
main script scope, so you can't use it in your scripts.

We can use the [runpy.run_path()](https://docs.python.org/3/library/runpy.html#runpy.run_path) function,
which has been around since Python 3.2, to fix this.

- [x] Use `runpy` module to launch non-interactive `spack python` invocations
- [x] Only use `InteractiveConsole` for interactive `spack python`
2024-03-21 01:32:28 -07:00
Greg Becker
de1f9593c6 cray: return false more readily in detection logic (#43150)
Often in containers, the files we use to detect whether a cray system supports new features are not available.

Given that the cray containers only support the newer versions, and that these versions have been
around for a while at this point and few sites don't support them, this PR changes the logic for
detecting cray systems so that:

1. Don't even consider whether something is the `cray` platform if `opt/cray` is not in `MODULEPATH`
2. Only use the `cray` platform if we can read files in /opt/cray/pe and positively detect an older version
3. Otherwise, assume we're *not* on a cray (includes newer Cray PE's, which we treat as Linux)
2024-03-20 15:43:45 -07:00
Christopher Christofi
65fa71c1b4 py-pycm: new package (#43251)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Signed-off-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-03-20 19:02:36 +01:00
Martin Lang
9802649716 berkeleygw: update FCPP flags for gcc (#42848)
Compilation with the old flags fails on PowerPC (power8le) due to syntax
errors in the output from the preprocessor. Compilation with the
extended set of flags works both on PowerPC and x86_64.

The correct set of flags was suggested from the berkeleygw developers:
https://groups.google.com/a/berkeleygw.org/g/help/c/ewi3RZgOyeE/m/jSIoe45PAgAJ

Uses spack-provided compiler prefix to call cpp when compiling berkeleygw with gcc.
2024-03-20 18:55:54 +01:00
Alex Leute
8d9d721f07 py-postcactus: new package (#42907)
Co-authored-by: Sid Pendelberry <sid@rit.edu>
2024-03-20 18:50:52 +01:00
Greg Becker
ecef72c471 Target.optimization_flags converts non-numeric versions to numeric (#43179) 2024-03-20 09:39:26 -07:00
Robert Cohn
485b6e2170 Update Intel download URLs (#43286) 2024-03-20 12:34:03 -04:00
mvlopri
ba02c6b70f seacas: update the variants and tpls (#43195)
Adds variants to turn off tests
Add variants for some missing TPL options
Add the variables required to build in ~shared

* Add pamgen to Trilinos as a variant to support SEACAS

This adds the ability to turn off and on pamgen as needed
through the variant interface for the Trilinos package.py.
Add changes for seacas package.py to build the appropriate
Trilinos variants.
Add zlib-api as depends_on instead of zlib directly for SEACAS
package.py

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-03-20 10:14:24 -06:00
Juan Miguel Carceller
7028669d50 fastjet: add version 3.4.2 (#43285)
* fastjet: add version 3.4.2

* Change the range of the ATLAS patch

---------

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-03-20 16:46:09 +01:00
Dom Heinzeller
2f0a73f7ef Define variant typescript for py-jupyter-server with explicit dependency on npm (#43279)
* Add variant typescript for py-jupyter-server@:1, which then requires npm/node. Patch the build system for ~typescript so that it doesn't find any npm/node installations and attempts to build the typescript extension even though it shouldn't

* Fix formatting in var/spack/repos/builtin/packages/py-jupyter-server/package.py

* Constrain typescript variant to py-jupyter-server versions 1.10.2:1

* with when not needed if variant doesn't exist for other versions
2024-03-20 08:03:18 -06:00
Massimiliano Culpo
7cb0dbf77a Remove optimization criterion on OS mismatches (#43282) 2024-03-20 04:57:56 -06:00
G-Ragghianti
ac8800ffc7 heffte: Update MKL dependency to intel-oneapi-mkl (#43273) 2024-03-20 03:28:21 -06:00
Richard Berger
eb11fa7d18 lua-sol2: merge duplicate sol2 package into it (#43155) 2024-03-20 03:22:58 -06:00
Mikael Simberg
4d8381a775 fmt: Add master branch as version (#43239) 2024-03-20 03:18:06 -06:00
jmlapre
de5e20fc21 py-snoop: new package (#42945) 2024-03-20 01:18:24 +01:00
Adam J. Stewart
c33af49ed5 py-keras: add v3.1.0 (#43268) 2024-03-20 01:10:14 +01:00
Martin Aumüller
3addda6c4d mgard: disable C++11 warning also for apple-clang@15 (#43170) 2024-03-19 17:27:42 -06:00
AMD Toolchain Support
33f6f55d6b aocl-sparse: fix inconsistency in dependency logic (#43259) 2024-03-19 16:45:39 -06:00
AMD Toolchain Support
41d20d3731 amdblibm: add support for parallel build (#43258) 2024-03-19 16:45:09 -06:00
Bill Williams
dde8fa5561 scorep: add conflict for ROCm6 (#43240)
Co-authored-by: William Williams <william.williams@tu-dresden.de>
Co-authored-by: wrwilliams <wrwilliams@users.noreply.github.com>
2024-03-19 16:40:08 -06:00
Mikael Simberg
588a94bc8c apex: add v2.6.5 (#43242) 2024-03-19 16:02:58 -06:00
Alec Scott
06392f2c01 gnutls: add v3.8.3 (#43229)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-03-19 22:23:19 +01:00
Tom Payerle
f16e29559e n2p2: add --no-print-directory flag to calls to "make" (#43196)
This should fix issue #43192

Basically, had issue where a make variable was set to the output
of a shell function which included cd commands, and then the value
of that variable used as a makefile target.

The cd commands in the shell function caused assorted informational
messages (e.g. "Entering directory ...") which got included in the
return of the shell function, corrupting the value of the variable.
The presence of colons in the corrupted value caused make to issue
"multiple target" erros.

This fix adds --no-print-directory flags to the calls to the
make function in the package's build method, which resolves the
issue above.

It is admittedly a crude fix, and will remove *all* informational
messages re directory changes, thereby potentially making it more
difficult to diagnose/debug future issues building this package.
However, I do not see a way for to turn off these messages in a
more surgical manner.
2024-03-19 20:04:15 +01:00
Rémi Lacroix
ea96403157 ffmpeg: Fix patch hash (#43269) 2024-03-19 19:46:02 +01:00
G-Ragghianti
b659eac453 slate: add v2023.11.05 (#42913)
* Updated version of slate

* Added rocm version conflict

* Added patch to fix openMP problem
2024-03-19 08:58:34 -07:00
John W. Parent
ab590cc03a WGL: Update libs for new archspec on Win (#43253) 2024-03-19 09:43:29 -06:00
Harmen Stoppels
1a007a842b cmake: deprecate old patch releases and add missing gmake dep (#43261) 2024-03-19 15:41:50 +01:00
Martin Aumüller
9756354998 mgard: don't restrict protobuf version more than necessary (#43172)
* mgard: don't restrict protobuf version more than necessary

successfully built:
mgard@2022-11-18 ^protobuf@3.{4,21,25}
mgard@2023-01-10 ^protobuf@3.{4,25}
mgard@2023-03-31 ^protobuf@3.{4,25}

compile failures:
mgard@2022-11-18 ^protobuf@3.3
mgard@2023-01-10 ^protobuf@3.3
mgard@2023-03-31 ^protobuf@3.3

* mgard: add conflicts to address CI errors

* mgard: conflict between cuda and abseil@20240116.1

compiling mgard+cuda with gcc@12.3.0 and nvcc from cuda@12.3.0 against
protobuf pulling in abseil-cpp@20240116.1 results in the errors reported
here: https://github.com/abseil/abseil-cpp/issues/1629
2024-03-19 09:29:44 +01:00
Sinan
3984dd750c package/py-setuptools_add_new_versions (#43180)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-03-18 12:33:39 -06:00
Gregor Daiß
d5c1e16e43 sgpp: update dependency versions (#43178)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-03-18 15:52:16 +01:00
Sinan
56ace9a087 py-wand: add v0.6.13 (#42972) 2024-03-18 15:13:50 +01:00
jdomke
6e0bab1706 fujitsu-mpi: add gcc and clang support (#43053)
Co-authored-by: domke <673751-domke@users.noreply.gitlab.com>
2024-03-18 15:12:44 +01:00
John W. Parent
193386f6ac netcdfc: consider static build in pkgconf filtering (#43084) 2024-03-18 14:40:32 +01:00
Christopher Christofi
755131fcdf py-optax: add new version (#43169) 2024-03-18 14:19:53 +01:00
dependabot[bot]
9a71733adb build(deps): bump docker/setup-buildx-action from 3.1.0 to 3.2.0 (#43204)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](0d103c3126...2b51285047)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 14:10:11 +01:00
dependabot[bot]
cd919d51ea build(deps): bump docker/build-push-action from 5.2.0 to 5.3.0 (#43205)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](af5a7ed5ba...2cdde995de)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 14:09:29 +01:00
George Young
12adf66d07 telocal: add new package (#43241)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-03-18 07:08:32 -06:00
afzpatel
c02f58da8f llvm-amdgpu: add rpath to HIP rt (#42876) 2024-03-18 13:37:27 +01:00
Harmen Stoppels
9662d181a0 use directives in some packages (#43238) 2024-03-18 12:53:53 +01:00
Alec Scott
282df7aecc fzf: add v0.48.0 (#43230) 2024-03-18 12:53:37 +01:00
wspear
b4c0e6f03b scorep: add v8.4 (#43225) 2024-03-18 11:23:28 +01:00
Wileam Y. Phan
4cd8488139 intel-gtpin: add version 4.0 (#43216) 2024-03-18 11:09:29 +01:00
George Young
69a052841c py-cutadapt: updating to @4.7 (#43214)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-03-18 11:08:14 +01:00
Matthias Wolf
a3f39890c2 py-shacl: new version, update dependencies (#42905)
* py-shacl: new version, update dependencies

Also updates the dependencies py-prettytable and py-rdflib.

* review comments

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

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

* py-poetry-core: add required 1.8.1

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-18 10:56:40 +01:00
Christopher Christofi
02d126ce2b py-geopandas: add new version 0.14.3 (#43235)
* py-geopandas: add new version

* add when specification on setuptools requirement
2024-03-18 10:52:19 +01:00
Christopher Christofi
339a63370f py-pyshp: add new version (#43234) 2024-03-18 10:23:11 +01:00
Christopher Christofi
fef6aed627 py-branca: add new package (#43236) 2024-03-18 10:16:58 +01:00
afzpatel
3445da807e rocm-smi-lib: remove standalone test and add build time test (#43129) 2024-03-18 10:13:08 +01:00
Pieter P
429c3598af Fix CMake generator documentation (#43232) 2024-03-18 10:02:33 +01:00
Todd Gamblin
3d8136493a performance: avoid jinja2 import at startup unless needed (#43237)
`jinja2` can be a costly import, and right now it happens at startup every time we run
Spack. This slows down `spack --print-shell-vars` a bit, which is needed by `setup-env.*sh`.
2024-03-18 10:00:37 +01:00
Sergey Kosukhin
8cd160db85 zlib-ng: add variant new_strategies (#43219) 2024-03-18 09:42:43 +01:00
Simon Pintarelli
a7dd756b34 gcc 12.3 ICE patch for aarch64 (#43093)
* gcc12.3 patch for ICE on aarch64

* aarch64 ICE patch for gcc@13.2
2024-03-18 09:12:49 +01:00
Thomas Padioleau
53be280681 Remove bundled fmt (#43210) 2024-03-17 21:43:40 -07:00
Seth R. Johnson
5ab10d57be geant4: add matinainer, clean args (#43218) 2024-03-16 17:29:03 +00:00
dependabot[bot]
96061d2c00 build(deps): bump black from 24.2.0 to 24.3.0 in /lib/spack/docs (#43228)
Bumps [black](https://github.com/psf/black) from 24.2.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.2.0...24.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-15 17:24:44 -06:00
dependabot[bot]
e78d20dc84 build(deps): bump black in /.github/workflows/style (#43227)
Bumps [black](https://github.com/psf/black) from 24.2.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.2.0...24.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-15 16:09:59 -07:00
Adam J. Stewart
6d2341c109 py-black: add v24.3.0 (#43226) 2024-03-15 16:09:17 -07:00
Seth R. Johnson
968ad02473 geant4: patch old versions to work on new compiler/ubuntu (#43212)
* geant4: patch old version for %clang@15

* Backport ascii-V10-07-03

* Apply to all compilers, but only for 10.5-10.6
2024-03-15 12:22:08 -06:00
Jose E. Roman
b93882804f New patch release SLEPc 3.20.2 (#43211) 2024-03-15 09:51:08 -07:00
Wouter Deconinck
f58ebd4fbb pandora{pfa,sdk,monitoring}: new HEP package for particle flow analysis (#37714)
* pandorapfa: new package

* pandorasdk: new package

* [@spackbot] updating style on behalf of wdconinc

* pandorasdk: use self.define

* pandoramonitoring: new package

* pandorasdk: new version 3.4.2

* pandora{pfa,sdk,monitoring}: add maintainer jmcarcell

Co-authored-by: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>

* pandora{pfa,sdk,monitoring}: add maintainer jmcarcell

Co-authored-by: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>

* pandora{pfa,sdk,monitoring}: add maintainer jmcarcell

Co-authored-by: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
Co-authored-by: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>
2024-03-15 14:58:36 +01:00
Massimiliano Culpo
6f7f9528e5 cray-rhel: add a lower bound to mgard (#43187) 2024-03-15 11:25:56 +01:00
Greg Becker
59c7ff8683 Allow compilers to be configured in packages.yaml (#42016)
Co-authored-by: becker33 <becker33@users.noreply.github.com>
2024-03-15 11:01:49 +01:00
John W. Parent
4495e0341d Clingo bootstrapping: Remove msvc constraint (#43199)
Patch allowing Clingo to build with VS22 has landed both in Spack
and Clingo upstream, update Spack's bootstrap constraints to handle
this.

Additionally, properly scope the patch application in the clingo
package to handle upstream patch.
2024-03-14 19:08:38 -06:00
eugeneswalker
ba39924046 e4s cray ci: mgard is broken, disable spec (#43194) 2024-03-14 14:06:36 -07:00
Sergey Kosukhin
751c3fef86 nag: add version 7.2.7200 (#43188) 2024-03-14 15:04:05 -06:00
Adrien Bernede
102811adb9 Fix Axom: index out of range when configuring axom~mpi on toss_4 (#43186) 2024-03-14 14:49:09 -06:00
Massimiliano Culpo
8f56eb620f Improve error message when an unknown compiler is requested (#43143)
Fixes #43141
2024-03-14 13:47:56 -07:00
Peter Scheibel
ec517b40e9 spack develop: stage build artifacts in same root as non-dev builds (#41373)
Currently (outside of this PR) when you `spack develop` a path, this path is treated as the staging
directory (this means that for example all build artifacts are placed in the develop path).

This PR creates a separate staging directory for all `spack develop`ed builds. It looks like

```
# the stage root
/the-stage-root-for-all-spack-builds/
    spack-stage-<hash>
        # Spack packages inheriting CMakePackage put their build artifacts here
        spack-build-<hash>/
```

Unlike non-develop builds, there is no `spack-src` directory, `source_path` is the provided `dev_path`.
Instead, separately, in the `dev_path`, we have:

```
/dev/path/for/foo/
    build-{arch}-<hash> -> /the-stage-root-for-all-spack-builds/spack-stage-<hash>/
```

The main benefit of this is that build artifacts for out-of-source builds that are relative to
`Stage.path` are easily identified (and you can delete them with `spack clean`).

Other behavior added here:

- [x] A symlink is made from the `dev_path` to the stage directory. This symlink name incorporates
    spec details, so that multiple Spack environments that develop the same path will not conflict
    with one another

- [x] `spack cd` and `spack location` have added a `-c` shorthand for `--source-dir`

Spack builds can still change the develop path (in particular to keep track of applied patches), 
and for in-source builds, this doesn't change much (although logs would not be written into 
the develop path). Packages inheriting from `CMakePackage` should get this benefit
automatically though.
2024-03-14 13:32:01 -07:00
Martin Aumüller
22cb3815fe ispc: add v1.22.0 & v1.23.0 (#43159)
* ispc: add v1.22.0 & v1.23.0
* ispc: fix build on macos
  apply upstream patch
* ispc: demote llvm to just a build dependency
  still builds fine
2024-03-14 10:59:45 -07:00
Greg Becker
f549354f78 move --deprecated arg to concretizer args (#43177) 2024-03-14 18:43:52 +01:00
Scott Wittenburg
dc212d0e59 mgard: add version 2023-12-09 (1.5.2) (#41493) 2024-03-14 11:15:47 -06:00
victor-decaria-nnl
8f14acb139 mfem: add MUMPs option (#42929)
* Added MUMPs option to mfem
* implement suggestions
* loosened mumps+metis dependency to just mumps
2024-03-14 09:09:24 -07:00
Harmen Stoppels
c38ef72b06 compiler.py: simplify implicit link dir bits (#43078) 2024-03-14 08:54:47 +01:00
jmuddnv
7d67d9ece4 nvhpc: add v24.3 (#43175) 2024-03-14 08:35:09 +01:00
Carlos Bederián
2c30962c74 amduprof: new package (#30575)
Co-authored-by: zzzoom <zzzoom@users.noreply.github.com>
2024-03-14 07:44:43 +01:00
dependabot[bot]
cc28334049 build(deps): bump pytest from 8.0.2 to 8.1.1 in /lib/spack/docs (#43134)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.2 to 8.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.2...8.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 07:40:15 +01:00
dependabot[bot]
dbdf5bacc4 build(deps): bump actions/checkout from 4.1.1 to 4.1.2 (#43152)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](b4ffde65f4...9bb56186c3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 05:55:08 +01:00
Rocco Meli
531f01f0b9 highway: add v1.1.0 (#43174) 2024-03-14 05:43:37 +01:00
Sebastian Pipping
794593b478 expat: Add release 2.6.2 with security fixes (#43171) 2024-03-13 22:43:00 -06:00
Tom Scogland
afcf0d2e39 llvm-openmp: make llvm-openmp consistent with other llvm builds (#43165)
Add current versions of the 17 and 18 releases

Stop making it nearly impossible to compose this correctly with code built with gcc

Build for compatibility by default like we do in every other llvm package
2024-03-14 05:34:09 +01:00
dependabot[bot]
29ee861366 build(deps): bump docker/login-action from 3.0.0 to 3.1.0 (#43176)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](343f7c4344...e92390c5fb)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 05:27:16 +01:00
John W. Parent
b1a984ef02 msvc: patch property ref bug (#43173) 2024-03-13 22:28:36 +00:00
Christopher Christofi
cc545d8c9a jags: add version 4.3.2 (#43166) 2024-03-13 23:06:03 +01:00
Ashwin Kumar Karnad
49ff816fb0 octopus: disable gdlib by default (#43161) 2024-03-13 13:04:39 -06:00
Ashwin Kumar Karnad
8c33841567 Add iamashwin99 as a maintainer in Octopus package (#43163) 2024-03-13 12:59:41 -06:00
Ashwin Kumar Karnad
21b50fbbe3 octopus: Support new version octopus@14 (#43160)
* add checksum for octopus 14

* Update dependencies for BerkeleyGW package
2024-03-13 12:59:16 -06:00
Martin Aumüller
2a8e503a04 protobuf: apply centos 8 patch only to @3.4: (#43162)
does not apply cleanly to older versions
2024-03-13 12:54:02 -06:00
Wileam Y. Phan
4b695d4722 rocm-openmp-extras: Fix resource download URLs (#43147)
* rocm-openmp-extras: Fix resource download URLs

* Apply review suggestions
2024-03-13 12:53:46 -06:00
Juan Miguel Carceller
2fa816184e py-ruff: add version 0.3.0 and deprecate the oldest version (#43069)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-03-13 11:03:28 -07:00
Brian Spilner
25f622e809 update to cdo-2.4.0 (#43071) 2024-03-13 11:01:41 -07:00
吴坎
7506acabe7 antlr4-cpp-runtime: update dependencies (#43115)
* update dependencies

* Update package.py
2024-03-13 11:00:54 -07:00
Dom Heinzeller
3a828358cb Update var/spack/repos/builtin/packages/ecmwf-atlas/package.py: set correct ectrans/trans variant, configure tesselation variant (#43151) 2024-03-13 10:19:24 -07:00
Adam J. Stewart
94a1d1414a spack.patch: support reversing patches (#43040)
The `patch()` directive can now be invoked with `reverse=True` to apply a patch in reverse.
This is useful for reverting commits that caused errors in projects, even if only the forward
patch is available, e.g. via a GitHub commit patch URL.

`patch(..., reverse=True)` runs `patch -R` behind the scenes. This is a POSIX option so we
can expect it to be available on the `patch` command.

---------

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-03-12 23:22:10 -07:00
downloadico
0f080b38f4 abinit: add version 9.10.5 (#43148)
set the FC variable to the MPI Fortran compiler and also set the F90 variable
to the same compiler for versions 9.8 and up.  FC needs to be set because the
configure script still uses FC.
2024-03-12 14:04:35 -07:00
Alec Scott
f1ec4859c8 unmaintained packages: add new versions (#43112)
* unmaintained packages: add new versions
* Fix parallel and numactl
* Revert numactl changes
* rollback lua-sol2 version
* Update alluxio version format
2024-03-12 13:34:17 -07:00
Greg Sjaardema
63baba0308 SEACAS: Make latest release available in spack (#43123) 2024-03-12 11:32:32 -07:00
Christopher Christofi
aeec861544 py-art: add new package (#43127) 2024-03-12 11:29:13 -07:00
Christopher Christofi
e54d4678f9 py-lazy-loader: add new version (#43130) 2024-03-12 11:14:17 -07:00
Dom Heinzeller
187b8adb4f ecmwf-atlas@0.36: depend on ecbuild@3.4: (#43133) 2024-03-12 11:00:15 -07:00
Samuel K. Gutiérrez
d6fd96f024 libquo: Update default version from 1.3.1 to 1.4. (#43057)
Signed-off-by: Samuel K. Gutierrez <samuel@lanl.gov>
2024-03-12 10:28:30 -07:00
Andrey Perestoronin
e3b6d2c3c7 Intel oneapi compilers 2023.2.4 (#43144)
* added intel-oneapi-compilers

* added classics version
2024-03-12 12:54:19 -04:00
Tamara Dahlgren
1e9c46296c perl testing: refactor stand-alone testing into base class (#43044) 2024-03-12 15:39:18 +01:00
Valentin Volkl
48183b37be gaudi: add py-yaml dependency (#43116)
Needed to parse job options in yaml format (https://gitlab.cern.ch/gaudi/Gaudi/-/blob/master/GaudiKernel/python/GaudiKernel/ProcessJobOptions.py#L528).
In principle this is optional, but it's needed for the test  35 - GaudiKernel.pytest.nose.test_Configurables (Failed). Seems like there's no harm done in adding this as a full dependency.
2024-03-12 08:58:32 -05:00
Oakley Brunt
9a3d248348 py-psyclone and py-fparser: Add new releases (#42744)
* py-psyclone and py-fparser new releases added

* py-fparser: add missing releases for py-psyclone

* py-psyclone: actioned @adamjstewart comments

* py-psyclone: removed py-pytest-pylint

* py-pytest-pylint: added package @ latest version

* py-pytest-pylint: reformatted

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

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

* py-pytest-pylint: added build deps and runtime dep versions

* py-pytest-pylint: removed version from setuptools

* py-psyclone: add py-pytest-pylint test dep and alphabetize deps

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

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

* py-psyclone: deps ordered

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-12 14:46:48 +01:00
Pierre Blanchard
03e22adb5b sleef: add v3.6 (#42978) 2024-03-12 11:04:17 +01:00
Massimiliano Culpo
5f5fc78236 Update archspec to v0.2.3 (#42854) 2024-03-12 09:31:15 +01:00
Adam J. Stewart
e12a8a69c7 py-neuralgcm: add new package (#43117)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-03-11 21:02:03 -06:00
Christopher Christofi
001af62585 perl-math-symbolic: add required perl-parse-recdescent dependency (#42157)
* perl-math-symbolic: add required perl-parse-recdescent dependency

* perl-math-symbolic: add new runtime dependency
2024-03-11 17:09:51 -06:00
Christopher Christofi
f5e89df6f2 perl-parsetemplate: add new package (#41845)
* perl-parsetemplate: add new package

* perl-parsetemplate: update to latest copyright date and add license
2024-03-11 17:04:35 -06:00
Massimiliano Culpo
ce75adada6 Fix callbacks accumulation when using mixins with builders (#43100)
fixes #43097

Before this PR the behavior of mixins used together with
builders was to mask completely the callbacks defined from
the class coming later in the MRO.

Here we fix the behavior by accumulating all callbacks,
and de-duplicating them later.
2024-03-11 20:48:21 +01:00
Adam J. Stewart
24d37df1a2 py-climax: add new package (#43121) 2024-03-11 12:47:20 -07:00
Stephen Sachs
a9d294c532 aocl-utils: source sha has changed (#43120)
* aocl-utils: source sha has changed

* aocl-utils: version 4.1 hash updated
2024-03-11 12:45:30 -07:00
Adam J. Stewart
9dcaa56db4 py-onnx-opcounter: add new package (#43119) 2024-03-11 12:42:16 -07:00
Adam J. Stewart
98162aa2e1 py-earth2mip: add new package (#43062)
* py-earth2mip: add new package

* Fix audit tests

* Make things easier to concretize

* Make things easier to concretize

* Fix magics build

* Fix onnx build

* blacken

* cmake > py-cmake

* Fix onnxruntime build

* onnxruntime: remove unknown cmake vars

* Trick bazelisk into using Spack bazel

* Different deps for main

* protobuf: add v3.25.3

* Enforce upper bound on jaxlib version

* py-chex: add v0.1.85

* py-dm-haiku: add v0.0.12

* py-jax: add v0.4.25

* Older jaxlib doesn't build on ppc64le either
2024-03-11 12:28:03 -07:00
Alec Scott
3934df622c fzf: add v0.47.0 (#43113) 2024-03-11 11:58:15 -07:00
tpeterka
dbf5d79557 updated diy/package.py to version 3.6.0 (#43101) 2024-03-11 11:56:26 -07:00
eugeneswalker
97e29e501d e4s ci stacks: add cp2k cpu and gpu specs (#42454)
* e4s ci stacks: add cp2k cpu and gpu specs

* remove non-building cp2k specs
2024-03-11 09:29:51 -07:00
Wouter Deconinck
258c651a8f geant4: new variant timemory (#43111)
* geant4: new variant timemory

* geant4: depends_on timemory@3.2:

* geant4: fix style
2024-03-11 15:50:02 +00:00
downloadico
43ca6da346 ruby: add version 3.3.0 (#43058)
* ruby: add version 3.3.0

* added dependency on libyaml
2024-03-11 08:49:24 -07:00
Adam J. Stewart
9786bd932b Update TensorFlow ecosystem (#41069) 2024-03-11 14:33:16 +01:00
Sinan
c72619d4db package/qgis: add new version (#42888)
* package/qgis: add new version

* improve Qsci.pro

* improve

* fix undefined symbol qsciprinter error

* add import test

* fix bug

* add version 3.36

* [@spackbot] updating style on behalf of Sinan81

* fix long line

* only run import test when +python

* first attempt at stand-alone test

* add TODO

---------

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
Co-authored-by: Sinan81 <Sinan81@users.noreply.github.com>
Co-authored-by: Sinan81 <Sinan@world>
2024-03-11 05:09:29 -05:00
Mikael Simberg
8ecae17c46 dla-future: Add patch for compilation with newer ROCm versions (#42348) 2024-03-11 10:44:00 +01:00
Massimiliano Culpo
1e47ccb83a Remove dead code (#43114)
* Remove dead code in spack
* Remove dead code in llnl
2024-03-11 00:47:55 -07:00
Jonas Eschle
d6421a69eb fix typo in dependency (#43105) 2024-03-10 18:56:27 -07:00
dependabot[bot]
000dff2fd4 build(deps): bump docker/build-push-action from 5.1.0 to 5.2.0 (#43107)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](4a13e500e5...af5a7ed5ba)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-10 18:55:44 -07:00
dependabot[bot]
1e413477dd build(deps): bump mypy from 1.8.0 to 1.9.0 in /lib/spack/docs (#43103)
Bumps [mypy](https://github.com/python/mypy) from 1.8.0 to 1.9.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.8.0...1.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-10 18:54:58 -07:00
Pranav Sivaraman
8955e63a68 feat: add LLVM v18.1.1 (#43109) 2024-03-10 08:55:39 +01:00
John W. Parent
bf14b424bb proj: correct CMake arg for shared build with proj older than 7.0.0 (#43089)
* proj: correct CMake arg for shared build with proj older than 7.0.0

* Actually use new CMake arg

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-09 00:40:27 -07:00
Arne Becker
14209a86a6 perl-bio-eutilities and deps: new packages (#42869)
This adds Spack packages for these Perl distributons:
- Bio::DB::EUtilities and its dependencies:
- Bio::ASN1::EntrezGene
- Bio::Cluster
- Bio::Variation
2024-03-08 10:42:26 -08:00
Arne Becker
b7d9900764 perl-test-warn: update version, dependencies (#42901)
* perl-test-warn: new package
  Adds Test::Warn
* Revive older version
* perl-test-warn: fix URL and deprecate old version
2024-03-08 10:40:20 -08:00
Arne Becker
bc155e7b90 perl-starman and deps: new packages (#42958)
Adds Starman and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Starman
- Starman
2024-03-08 10:36:20 -08:00
Massimiliano Culpo
65f9ba345f gnupg: add v2.4.5, remove deprecated versions (#43090)
Also updates dependencies:
  libassuan: add v2.5.7
  libgcrypt: deprecate end of life versions
2024-03-08 10:20:55 -08:00
Dave Keeshan
ca49bc5652 verible: Add revision v0.0-3607-g46de0f64 (#43086) 2024-03-08 10:18:39 -08:00
snehring
b84b85a7e0 visit: link against hip when built with vtk-m+rocm (#42452) 2024-03-08 19:09:35 +01:00
John W. Parent
016cdba16f Curl package: update Windows support (#42752)
* Properly specify Curl builder interface for static vs shared curl
  with NMake system to ensure all built curls export expected
  symbols.
* Symlinks curl library build artifact to more idiomatic name for
  FindCurl.cmake implementations and other NMake consumers.
2024-03-08 10:08:12 -08:00
Jonas Eschle
4806e6549f Add package zfit (#42667)
* Add package zfit (WIP)

* Add package zfit

* Add package zfit

* add maintainer

* [@spackbot] updating style on behalf of jonas-eschle

* Update package.py

* enh: add extras, 0.18.1

* fix: add default

* fix:  typo

* fix:  typo

* chore: cleanup arguments

* chore: cleanup arguments

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

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

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

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

* chore: cleanup arguments

* fix:  typo

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

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

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

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

---------

Co-authored-by: jonas-eschle <jonas-eschle@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-08 11:04:35 -07:00
Adam J. Stewart
c14b277150 py-fiona: add v1.9.6 (#43099) 2024-03-08 10:32:15 -07:00
John W. Parent
919025d9f3 VTK package: use CMake config provide by PROJ (#43088)
PROJ can install its own config file: VTK should prefer that over manual detection.
2024-03-08 10:32:00 -07:00
Adam J. Stewart
52f57c90eb Retiring as PythonPackage maintainer (#43091) 2024-03-08 18:29:24 +01:00
fgava90
ee1fa3e50c Deprecating py-pylint@2.3 as it cannot build with python@3.8: (#43096)
* Deprecating py-pylint@2.3 as it cannot build with python@3.8:

* Style fix

* Removed versions because can't build with python@3.7

---------

Co-authored-by: Gava, Francesco <francesco.gava@mclaren.com>
2024-03-08 07:43:46 -07:00
jmlapre
772928241b py-cheap-repr: new package (#42944)
* py_cheap_repr: add initial package.py

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

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

* py-cheap-repr: use pypi link instead

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-08 06:45:25 -06:00
Martin Lang
7440bb4c36 bigdft-psolver: new versions 1.9.3, 1.9.4 (#42644) 2024-03-08 07:22:15 +01:00
Tom Payerle
c464866deb sfcgal: add v1.5.1, and restrict versions of cgal dependency (#42278)
Added new versions @1.5.1 and @1.4.1 (sfcgal moved from github to gitlab)

Placed restrictions on what versions of cgal are supported for different
cfcgal versions.  These restrictions are based on what was found in the
version history at https://gitlab.com/sfcgal/SFCGAL/-/blob/v1.5.1/NEWS?ref_type=tags
as well as the CMakeLists.txt for different versions.

@1.4 and @1.5 seem to require a specific version of cgal based on CMakeLists.txt

Earlier versions (@1.3.8:1.3.10) claim to support cgal@4.3: (but Spack recipe
claims did not work until @4.7, so sticking with that as minimum).  CMakeList.txt
suggests they support cgal@5 as well, but version history suggests otherwise.
2024-03-08 07:08:34 +01:00
Tom Payerle
799a8a5090 sfcgal: add custom libs property (#42276) 2024-03-08 07:06:38 +01:00
m-shunji
c218ee50e9 libint: add link option for fujitsu compiler (#42233)
Co-authored-by: inada-yoshie <inada.yoshie@fujitsu.com>
2024-03-08 07:03:18 +01:00
Teague Sterling
8ff7a20320 duckdb: add v0.10.0, overhaul of package recipe (#38922)
* Expanding the duckdb package to fix the version number (required for external extensions to work) being pulled from git and have variants for the built-in extensions at build-time. This also changes the build system from CMakePackage to Makefile package (as advised from upstream).

* - Reorganized and cleaned up variants
 - Updated the patch to work for 0.10.0+
 - Removed (or made non-default) some unecessary variants
 - Added ninja as the default generator
 - Set up some shared library dependencies;
2024-03-08 06:32:29 +01:00
Dave Keeshan
e3fe6bc0f7 Add 5.022 and cleanup how autoconf is done (#43085) 2024-03-07 18:29:27 -07:00
Sreenivasa Murthy Kolam
c6fcb1068f Enable tensorflow-2.11 support for ROCm (#38520)
* enable tensorflow-2.11 support for ROCm

* add latest sha for mesa and limit the patches to older version.similar
changes in #37910 to enable gitlab-ci pass

* address review commemts
2024-03-07 15:23:40 -07:00
Weiqun Zhang
54ac3e72ed amrex: add v24.03 (#43083) 2024-03-07 13:59:29 -08:00
Matthew Thompson
274fbebc4c Update GFE packages (#43082)
* Update GFE packages
* Add pflogger 1.13.1
2024-03-07 13:47:33 -08:00
Tim Haines
d40eb19918 Dyninst: add v13.0.0 (#43068) 2024-03-07 13:43:18 -08:00
dependabot[bot]
31de670bd2 build(deps): bump dorny/paths-filter from 3.0.1 to 3.0.2 (#43000)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](ebc4d7e9eb...de90cc6fb3)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 11:54:24 -08:00
Harmen Stoppels
6c0961549b zlib-ng: 2.1.6 (#43060) 2024-03-07 12:35:36 -07:00
Tim Fuller
c090bc5ebe Drop optional dependencies of Spack (#43081)
Remove dependency on `importlib_metadata` and `pkg_resources`, which can be problematic if the version in PYTHONPATH is incompatible with the interpreter Spack is running under.
2024-03-07 17:52:49 +00:00
renjithravindrankannath
bca4d37d76 hip: update patch PARAMETERS_MIN_ALIGNMENT for 6.0 (#42834) 2024-03-07 18:31:23 +01:00
Sreenivasa Murthy Kolam
9b484d2eea fix build issue with rocm-openmp-extras for 5.4.3 release (#43046)
* fix build issue with rocm-openmp-extras for 5.4.3 release
https://github.com/spack/spack/issues/36930
* fix style errors
2024-03-07 10:23:07 -07:00
Adam J. Stewart
a57b0e1e2d py-lightning: add v2.2.1 (#43042) 2024-03-07 09:22:52 -08:00
Luc Berger
e3cb3b29d9 Kokkos Kernels: adding missing TPLs and pre-conditions (#43043)
* Kokkos Kernels: adding missing TPLs and pre-conditions
  Adding variants and dependencies for rocBLAS and rocSPARSE.
  Also adding a "when=" close to the TPL variants that prevents
  enabling the TPLs in versions of the library when it was not
  yet available.
* Kokkos Kernels: remove comment for better format
* Kokkos Kernels: fix issue with unpacking wrong number of args
  After changing the tpls dictionary we need to update the unpacking
  logic to catch the right number of outputs out of it!
* Kokkos Kernels: updating doc string for tpls var and using f-string
  Improving comment a bit and switching to f-string for more readability.
  When setup to do more testing will try to use f-string in the CMake
  options generation part of the package.
* Style change
2024-03-07 09:00:10 -08:00
Mark W. Krentel
ac48ecd375 meson: add version 1.3.2 (#43036) 2024-03-07 09:56:20 -07:00
Juan Miguel Carceller
0bb20d34db autotools: fix a typo in comment (#43080)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-03-07 16:53:14 +00:00
Eric Berquist
971fda5c33 sst-core: use ncurses for interactive sst-info (#43063)
* sst-core now effectively depends on ncurses

* use --with-curses

* sst-core: update comment about ncurses

* should have curses for build, link, and run
2024-03-07 10:45:47 -06:00
Mikael Simberg
dcc4423a9d pika: Add 0.23.0 (#43077) 2024-03-07 16:06:54 +01:00
runiq
82c380b563 Fix spack find bootstrapping docs (#43074)
Closes #43052.

Maybe moving the argument to the `find` subcommand is a good idea, but I
just wanted to get the docs fix out.

Co-authored-by: Patrice Peterson <patrice.peterson@itz.uni-halle.de>
2024-03-07 14:13:32 +01:00
Adam J. Stewart
8bcf6a31ae ML CI: variants are now required (#42851) 2024-03-07 11:42:13 +01:00
Vanessasaurus
ddd88e266a Automated deployment to update package flux-core 2024-03-07 (#43067) 2024-03-07 11:13:31 +01:00
Martin Aumüller
08c597d83e botan: add v3.3.0, v2.9.14 (#43047) 2024-03-06 09:29:04 -08:00
Martin Aumüller
bf5340755d embree: add v4.3.1 (#43048) 2024-03-06 09:25:22 -08:00
Satish Balay
f8e70a0c96 llvm: add 18.1.0 (#43049) 2024-03-06 17:36:03 +01:00
Tim Fuller
7e468aefd5 Allow loading extensions through python entry-points (#42370)
This PR adds the ability to load spack extensions through `importlib.metadata` entry 
points, in addition to the regular configuration variable.

It requires Python 3.8 or greater to be properly supported.
2024-03-06 11:18:49 +01:00
John W. Parent
e685d04f84 netcdf-c package: Skip problematic post install on Windows (#43039)
#42878 adds a post install filter of the netCDFConfig.cmake file
that replaces a valid CMake target on Windows with an invalid one.
Don't do this replacement on Windows.
2024-03-05 21:44:36 -07:00
Adam J. Stewart
9d962f55b0 spack.patch: fix type hint circular import (#43041) 2024-03-05 17:26:44 -08:00
renjithravindrankannath
00d3066b97 migraphx: add v6.0.0 & v6.0.2 (#42918)
* Updates for migraphx 6.0.0 & 6.0.2
* Style check error and audit check error fix
* Adding patch for half-include-directory
* The parameter GPU_TARGETS is used from 5.7 in migraphx
* Adding rocmlir dependency in migraphx and 6.0 updates in rocmlir
* Applying upcoming changes to make CK JIT optional and enable
  compilation on Windows in order to build without ck dependency
2024-03-05 15:16:31 -08:00
Martin Lang
5ca0dcecb2 mpfr: missing dependency for version 4.0.1 (#43012)
* mpfr: missing dependency for version 4.0.1
  mpfr 4.0.1 (like 4.0.2) needs autoconf-archive where it takes the
  AX_PHREAD macro from
* autoconf-archive is also required for mpfr@4.0.0
2024-03-05 15:11:31 -08:00
Pranav Sivaraman
fa8fb7903b nvptx-tools: add v2023-09-13 (#40897)
New changes have been made to nvptx-tools that address dropping support
for sm_30 in later CUDA versions (12.0+).

Also refactor gcc to make nvptx-tools a dependency instead of a resource.

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-03-05 22:51:40 +01:00
Adam J. Stewart
f35ff441f2 spack.patch: add type hints (#42811)
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2024-03-05 13:19:43 -08:00
Arne Becker
9ea9ee05c8 perl-catalyst-view-json: new package (#42981)
Adds Catalyst::View::JSON
2024-03-05 12:04:38 -08:00
Arne Becker
24ddc49c1b perl-bsd-resource: new package (#42982)
Adds BSD::Resource
2024-03-05 12:03:52 -08:00
Arne Becker
2f4266161c perl-chart-gnuplot: new package (#42983)
Adds Chart::Gnuplot
2024-03-05 12:03:00 -08:00
Arne Becker
7bcb0fff7d perl-config-inifiles: new package (#42984)
Adds Config::IniFiles
2024-03-05 12:02:06 -08:00
Arne Becker
cd332c6370 perl-plack-middleware-assets and deps: new packages (#42990)
This adds Plack::Middleware::Assets and its missing deps:
- CSS::Minifier::XS
- JavaScript::Minifier::XS
- Test::DiagINC
2024-03-05 11:59:52 -08:00
Arne Becker
6daf9677f3 perl-plack-middleware-crossorigin: new package (#42991)
Adds Plack::Middleware::CrossOrigin
2024-03-05 11:59:25 -08:00
G-Ragghianti
cb6450977d Removing application of the ldconfig patch because it conflicts with (#43001)
gdrcopy version 2.4.1
2024-03-05 11:57:24 -08:00
Vanessasaurus
bf62ac0769 Automated deployment to update package flux-sched 2024-03-05 (#43005)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-03-05 11:53:29 -08:00
Sergey Kosukhin
0223fe746b serialbox: fix PYTHONPATH (#43034) 2024-03-05 11:48:18 -08:00
Arne Becker
12fba13441 perl-chi-driver-memcached: new package (#43011)
Adds CHI::Driver::Memcached.

Modified perl-chi to make the tests work. Testing modules in perl-chi
were not loaded when testing CHI::Driver::Memcached, so added the "run"
type to these.
2024-03-05 11:46:57 -08:00
Arne Becker
0c44f5a140 perl-html-template: new package (#43017)
Adds HTML::Template
2024-03-05 11:45:14 -08:00
Arne Becker
f4853790c5 perl-catalyst-devel and deps: new packages (#43013)
This add Catalyst::Devel and its missing dependencies:
- Catalyst::Plugin::ConfigLoader
- Catalyst::Plugin::Static::Simple
- File::ChangeNotify
2024-03-05 11:44:53 -08:00
Arne Becker
9ed2e396f4 perl-plack-middleware-deflater: new package (#43014)
Adds Plack::Middleware::Deflater
2024-03-05 11:43:39 -08:00
Arne Becker
3ee6fc937e perl-data-predicate: new package (#43015)
* perl-data-predicate: new package
Adds Data::Predicate
* Added description
2024-03-05 11:42:48 -08:00
Arne Becker
c9b6cc9a58 perl-exporter-auto: new package (#43016)
Adds Exporter::Auto
2024-03-05 11:41:46 -08:00
Arne Becker
58b394bcec perl-list-compare: new package (#43018)
Adds List::Compare
2024-03-05 11:39:05 -08:00
Arne Becker
4d89eeca9b perl-sereal and deps: new packages (#43022)
* perl-sereal and deps: new packages
This adds Sereal and its missing dependencies:
- Sereal::Encoder
- Sereal::Decoder
* Add missing files.
2024-03-05 11:38:24 -08:00
Arne Becker
bfc71e9dae perl-string-approx: new package (#43023)
Adds String::Approx
2024-03-05 11:35:04 -08:00
Arne Becker
f061dcda74 perl-string-numeric: new package (#43024)
Adds String::Numeric
2024-03-05 11:34:03 -08:00
Arne Becker
cc460894fd perl-test-file-contents: new package (#43025)
Adds Test::File::Contents
2024-03-05 11:32:50 -08:00
Arne Becker
5e09660e87 perl-test-mockobject and deps: new packages (#43026)
Adds Test::MockObject and its dependencies.
Installed OK with build-time tests. Added dependencies:
- UNIVERSAL::can
- UNIVERSAL::isa
2024-03-05 11:31:59 -08:00
Arne Becker
5a8efb3b14 perl-test-perl-critic: new package (#43027)
Adds Test::Perl::Critic
2024-03-05 11:30:12 -08:00
Arne Becker
99002027c4 perl-test-pod-coverage and deps: new packages (#43028)
Adds Test::Pod::Coverage and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Pod::Coverage
2024-03-05 11:28:28 -08:00
Arne Becker
a247879be3 perl-tie-ixhash: new package (#43029)
Adds Tie::IxHash
2024-03-05 11:25:59 -08:00
Sergey Kosukhin
7b46993fed eccodes: drop redundant build dependency (#43035) 2024-03-05 11:25:00 -08:00
Arne Becker
dd59f4ba34 perl-text-csv-xs: new package (#43030)
Adds Text::CSV_XS
2024-03-05 11:22:38 -08:00
Arne Becker
18ab14e659 perl-xml-hash-xs: new package (#43031)
Adds XML::Hash::XS
2024-03-05 11:20:00 -08:00
Massimiliano Culpo
28eb5e1bf6 archspec: add v0.2.3 (#43009) 2024-03-05 20:09:46 +01:00
Sergey Kosukhin
c658ddbfa3 icon: add new package (#43037) 2024-03-05 12:03:38 -07:00
Massimiliano Culpo
12963c894f libksba: add v1.6.6, remove deprecated versions (#43006) 2024-03-05 19:30:39 +01:00
Mark W. Krentel
61fa12508f hpcviewer: add version 2024.02 (#42997) 2024-03-05 10:15:32 -08:00
Martin Lang
daf6acef6e py-numpy: patch for AVX512 build flags on Intel Classic Compiler (#43020) 2024-03-05 17:27:05 +01:00
Alex Richert
d30621e787 dakota: make python dependency optional, add v6.19 (#42914)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-03-05 12:57:13 +01:00
Wouter Deconinck
dd4b365608 container: don't map develop to latest (#42952)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-03-05 10:47:04 +01:00
Massimiliano Culpo
157d47fc5a ASP-based solver: improve reusing nodes with gcc-runtime (#42408)
* ASP-based solver: improve reusing nodes with gcc-runtime

This PR skips emitting dependency constraints on "gcc-runtime",
for concrete specs that are considered for reuse.

Instead, an appropriate version of gcc-runtime is recomputed
considering also the concrete nodes from reused specs.

This ensures that root nodes in a DAG have always a runtime
that is at a version greater or equal than their dependencies.

* Add unit-test for view with multiple runtimes
* Select latest version of runtimes in views
* Construct result keeping track of latest
* Keep ordering stable, just in case
2024-03-04 22:46:28 -08:00
Massimiliano Culpo
13daa1b692 libgpg-error: add v1.48 (#42872) 2024-03-05 05:56:50 +01:00
Mosè Giordano
f923e650f9 py-pythran: @:0.12.1 is incompatible with python@3.11: (#42994)
Ref: https://github.com/serge-sans-paille/pythran/issues/2101 and https://github.com/scipy/scipy/issues/18390.
2024-03-04 18:28:17 -07:00
Victoria Cherkas
1a1bbb8af2 metkit: add git url (#42867) 2024-03-04 21:15:03 +01:00
Victoria Cherkas
594fcc3c80 metkit: add additional eckit dependency constraint (#42871) 2024-03-04 21:14:09 +01:00
Tom Payerle
76ec19b26e hdf-eos2: support version @3.0, plus assorted fixes (#41782)
1) support for version @3.0
Unfortunately, download seems to require registration now
so using manual_download mechanism for @3:

2) copying from hdf-eos5 patch from @vanderwb to enable
use of Spack compiler wrappers instead of h4cc

3) Patching an issue in hdf-eos2 configure script.  The
script will test for jpeg, libz libraries, succeed and
append HAVE_LIBJPEG=1, etc to confdefs.h, and then abort
because HAVE_LIBJPEG not set in running environment.

4) Add some LDFLAGS to build environment.  Otherwise
seems to fail to build test script due to rpc dependence
in HDF4.
2024-03-04 21:08:19 +01:00
Arne Becker
00baaf868e perl-perl-critic-moose and deps: new packages (#42992)
Adds Perl::Critic::Moose and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Perl::Critic
- Pod::Parser
- Perl::Tidy
- PPI
- PPIx::QuoteLike
- List::SomeUtils
- PPIx::Regexp
- B::Keywords
- PPIx::Utils
- String::Format
- Pod::Spell
- Test::SubCalls
- Test::Object
- Lingua::EN::Inflect
- Hook::LexWrap
2024-03-04 12:54:14 -07:00
Harmen Stoppels
3b06347f65 repo.py: cleanup packages_with_tags (#42980) 2024-03-04 20:50:04 +01:00
Eric Berquist
5b9e207db2 bear: add up to version 3.1.3 (#42993) 2024-03-04 12:17:24 -07:00
psakievich
d6fd9017c4 Document new environment variable expansion in projections (#42963)
Adding docs and test for #42917

Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-03-04 12:17:08 -07:00
Sreenivasa Murthy Kolam
913d79238e llvm-amdgpu: remove the openmp variant. (#42807)
Add rocm-openmp-extras package as a dependency for +openmp for rocm
2024-03-04 12:16:53 -07:00
Arne Becker
250038fa9b perl-dbix-class and deps: new packages (#42986)
Adds DBIx::Class and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Class::C3::Componentised
- Data::Dumper::Concise
- Config::Any
- Context::Preserve
- Class::Accessor::Grouped
- Module::Find
- SQL::Abstract::Classic
- Class::C3
- SQL::Abstract
- Algorithm::C3
2024-03-04 12:11:38 -07:00
Arne Becker
26c553fce7 perl-net-server-ss-prefork and deps: new packages (#42989)
Adds Net::Server::SS::PreFork and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Server::Starter
- Net::Server
- HTTP::Server::Simple
2024-03-04 12:11:14 -07:00
Arne Becker
e24c242fb7 perl-gzip-faster: new package (#42988)
Adds Gzip::Faster
2024-03-04 12:10:57 -07:00
Arne Becker
ca14ce2629 perl-catalyst-action-rest: new package (#42960)
Adds Catalyst::Action::REST
2024-03-04 10:59:57 -08:00
Arne Becker
44f443946c perl-graphviz and deps: new packages (#42987)
Adds GraphViz and its dependencies.
Installed OK with build-time tests. Added dependencies:
- XML::XPath
2024-03-04 11:58:12 -07:00
Arne Becker
6e6bc89bda perl-catalyst-action-renderview and deps: new packages (#42961)
Adds Catalyst::Action::RenderView and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Catalyst::Action::RenderView
- Catalyst::Action::RenderView
- Catalyst::Action::RenderView
2024-03-04 10:57:50 -08:00
Arne Becker
8714ea6652 perl-catalyst-component-instancepercontext: new package (#42962)
Adds Catalyst::Component::InstancePerContext
2024-03-04 10:56:08 -08:00
Sinan
df92f0a7d4 imagemagick: add v7.0.9:7.1.1-29 (#42968)
* package/imagemagick add new version, improve
* confimed that build fails when libsm is missing on linux

---------

Co-authored-by: Sinan81 <Sinan@world>
2024-03-04 10:52:56 -08:00
Alec Scott
d24b91157c restic: add v0.16.4 (#42956) 2024-03-04 19:52:20 +01:00
Alec Scott
1a0f77388c direnv: add v2.34.0 (#42955) 2024-03-04 19:51:47 +01:00
Harmen Stoppels
34571d4ad6 linux-pam: add missing libtirpc dep (#42976) 2024-03-04 19:29:25 +01:00
Rocco Meli
a574f40732 add namd 3.0b6 (#42979) 2024-03-04 19:06:03 +01:00
Arne Becker
d4ffe244af perl-chi and deps: new packages (#42959)
* perl-chi and deps: new packages

Adds CHI and its dependencies.
Installed OK with build-time tests. Added dependencies:
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI
- CHI

* Add license
2024-03-04 08:59:33 -08:00
AMD Toolchain Support
e08e66ad89 AOCL: add v4.2.0 (#42920)
* AOCL: add v4.2.0
   Co-authored-by: Phil Tooley <phil.tooley@amd.com> and
                vijay kallesh <Vijay-teekinavar.Kallesh@amd.com>
* Review comments for spack community PR #42920

---------

Co-authored-by: Phil Tooley <phil.tooley@amd.com> and vijay kallesh <Vijay-teekinavar.Kallesh@amd.com>
2024-03-04 08:43:27 -08:00
Vanessasaurus
0543710258 flux-core: flux-security dependency with build/link (#42985) 2024-03-04 16:48:12 +01:00
Harmen Stoppels
5d994e48d5 modules: allow autoload: run, like in environment views (#42743) 2024-03-04 08:49:45 +01:00
Harmen Stoppels
d1fa23e9c6 versions: fix typing problems (#42903)
Fix the type declaration of VersionList.versions.

Fix further problems exposed by that fix.
2024-03-04 08:38:54 +01:00
Isaac Corley
f1db8b7871 torchgeo v0.5.2 (#42967) 2024-03-03 13:57:39 -07:00
Axel Huebl
c5cca54c27 Fix mgard: OpenMP on AppleClang (#42933)
macOS AppleClang does not provide OpenMP by default with XCode.
Use LLVM's OpenMP to fix compile errors of mgard with OpenMP (default).
2024-03-03 08:57:24 +01:00
Arne Becker
a9c1648db8 perl-log-dispatch-filerotate and dep: new package (#42965)
Adds Log::Dispatch::FileRotate and its dependency:
- Log::Dispatch

Installed OK, build-time tests ran successfully.
2024-03-03 00:40:27 -07:00
Arne Becker
3bd911377e perl-catalyst-plugin-cache: new package (#42964)
Adds Catalyst::Plugin::Cache
2024-03-02 23:34:26 -07:00
otsukay
fcb2f7d3aa Remove unnecessary if statements, which are harmful since +blas+lapack variants have been removed. (#42936)
Co-authored-by: Yuichi Otsuka <otsukay@riken.jp>
2024-03-02 22:13:47 -07:00
Arne Becker
a8a9e0160a perl-test-time-hires: new package (#42957)
Adds Test::Time::HiRes
2024-03-02 18:10:08 -08:00
jfavre
9ca6aaeafd libcatalyst: add fortran & python variants (#42941)
* Update package.py

Adding two variants 'fortran' and 'python' to enable language wrappings

* Update package.py

remove extra space
2024-03-02 17:55:46 -08:00
Adam J. Stewart
aed5c39312 py-numpy: add v1.26.4 (#42515) 2024-03-02 21:56:43 +01:00
Chris Marsh
eb36bb2a8f netcdf-c package: correct library names (#42878)
An incorrect hdf5 library name is added to pkconfig and CMake config
files when netcdf-c is built with CMake.
2024-03-02 11:05:59 -08:00
dependabot[bot]
8dcf860888 build(deps): bump codecov/codecov-action from 4.0.2 to 4.1.0 (#42860)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](0cfda1dd0a...54bcd8715e)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 10:39:09 -08:00
Arne Becker
a5b7cb6e6f perl-test-xml-simple and deps: new packages (#42873)
* perl-test-longstring: New package

Adds Test::LongString

* perl-test-xml-simple: new package

- Adds perl-test-xml-simple
2024-03-02 10:37:35 -08:00
Arne Becker
34c0bfefa6 perl-test-xml and deps: new packages (#42870)
- Adds perl-test-xml and dependency:
- Adds perl-xml-semanticdiff
2024-03-02 10:35:56 -08:00
Elliott Slaughter
ea5db048f3 legion: Add 23.09.0 and 23.12.0, remove control_replication. (#42915)
* legion: Add 23.09.0 and 23.12.0, remove control_replication.

The branch control_replication has been merged to master and should no
longer be used.

* flecsi: Switch to Legion master branch.

Legion control_replication has been merged to master.

* Fix Legion 23.09.0 and 23.12.0 build for ROCm 6.
2024-03-02 10:32:44 -08:00
Adam J. Stewart
e68a17f2c6 Bazel: fix patching of 4.2.4 (#42938) 2024-03-02 10:29:18 -08:00
Brian Vanderwende
4af9ec3d8a Add ncvis package and add option to wxwidgets (#38204)
* Add ncvis and opengl option for wxwidgets

* Style fixes for ncvis

* Replace in with satisfies for opengl constraint

Co-authored-by: Alec Scott <alec@bcs.sh>

---------

Co-authored-by: Alec Scott <alec@bcs.sh>
2024-03-02 10:26:36 -08:00
Zachary Newell
eb90e2c894 Added NCCL version 2.20.3-1 (#42951)
Added NCCL version 2.20.3-1 to the package.py. I tested compiling it and running nccl-tests on Ubuntu 22.04.
2024-03-02 06:59:17 -06:00
Mosè Giordano
763f444d63 py-numba: add tbb variant (#42930)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-03-01 02:03:39 -07:00
Chris Marsh
6614c4322d Seacas: fix patch hash (#42934) 2024-03-01 01:48:36 -07:00
Chris Marsh
983422facf libogg does not build a shared libary with cmake (#42877)
* when built with cmake, libogg does not build with a shared libary by default. This resolves that

* spack style fixes

* Clean up imports

* enforce +pic when +shared
2024-02-29 21:12:27 -06:00
Ye Luo
d0bdd66238 Add Quantum ESPRESSO 7.3.1 (#42927) 2024-02-29 20:08:25 -07:00
Tim Fuller
3a50d32299 Show extension commands with spack -h (#41726)
* Execute `args.help` after setting main options so that extension commands will show with `spack -h`

---------

Co-authored-by: psakievich <psakiev@sandia.gov>
2024-02-29 16:51:42 -08:00
psakievich
50ee3624c0 Support environment variable expansion inside module projections (#42917) 2024-02-29 16:49:37 -08:00
afzpatel
2840cb54b5 initial commit to fix ck gpu targets cmake arg (#42924) 2024-02-29 15:48:07 -06:00
eugeneswalker
5c482d0d7e reduce size of e4s to deal with large rebuild artifact (#42884) 2024-02-29 13:44:01 -07:00
joscot-linaro
f3ad990b55 linaro-forge: added 23.1.2 version (#42922) 2024-02-29 12:28:03 -08:00
Victoria Cherkas
977603cd96 Update fdb package.py with libs (#42874)
* Update fdb package.py with libs
* Formatting
2024-02-29 12:23:37 -08:00
Wanlin Wang
1f919255fd Update riscv-gnu-toolchain package.py (#42893)
* Update package.py
  1. add one compiler type named 'musl'
  2. add a variant name 'multilib'
  3. add a variant name 'cmodel'
* Added one compiler type named 'musl'.
  Added a variant named 'multilib'.
  Added a variant named 'cmodel'.
  Added several versions.
* aarch64 is not supported.
2024-02-29 12:11:40 -08:00
Adam J. Stewart
5140a9b6a3 py-keras: add v3.0.5 (#42697) 2024-02-29 17:56:03 +01:00
Chris Marsh
1732ad0af4 vtk: Update proj dependency (#42797)
* Update proj dependency to enable newer proj usage

* Allow for any proj version
2024-02-29 06:07:21 -08:00
dependabot[bot]
e7510ae292 build(deps): bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#42883)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f95db51fdd...0d103c3126)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-29 14:48:24 +01:00
Harmen Stoppels
0c224ba4a7 libevent: remove autotools build deps again (#42908)
The deps were added in #40945 to make it work on macOS 11, because the
old configure scripts only detect macOS 10. Apparently people reported the
autoreconf script caused issues, later fixed in #41057. However, also
with that fix, things are incorrect, cause people now report:

```
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.7
libtool: and run autoconf again.
```

HOWEVER, all this is unnecessary, because the underlying issue was
already fixed long ago, it's just that it regressed at some point, but
it's back in place since #41205.
2024-02-29 09:57:21 +01:00
Terry Cojean
86b4a867ef ginkgo: add PAPI SDE support (#39425)
Signed-off-by: Terry Cojean <terry.cojean@kit.edu>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-29 06:04:34 +01:00
Arne Becker
6049e5f6eb perl-readonly-xs: new package (#42897)
This adds Readonly::XS. Since this module can not be used by itself, the
Spack package comes with a test override. This anticipates that the perl
builder will one day have a generic standalone module usage test.
2024-02-28 14:27:22 -08:00
Arne Becker
0339690a59 perl-test-json, perl-json-any: New packages (#42896)
* perl-test-json: New package
  Adds Test::JSON
* Adds perl-json-any
2024-02-28 14:25:34 -08:00
Arne Becker
2bae1b7e00 perl-test-xpath: New package (#42895)
Adds Test::XPath
2024-02-28 14:23:41 -08:00
Arne Becker
ae5b605f99 perl-uri-find: New package (#42894)
Adds URI::Find
2024-02-28 14:22:19 -08:00
Arne Becker
35898d94d2 perl-net-cidr-lite: new package (#42898)
* perl-net-cidr-lite: new package
   Adds Net::CIDR::Lite
* Add license
2024-02-28 14:20:52 -08:00
Arne Becker
7e00bd5014 perl-mojolicious: new package (#42899)
Adds Mojolicious
2024-02-28 14:16:36 -08:00
Arne Becker
1f3aefb0a3 perl-cache-memcached and deps: new packages (#42911)
Adds Cache::Memcached and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Cache::Memcached
2024-02-28 14:02:38 -08:00
Harmen Stoppels
d4601d0e53 Unit tests: skip tests that intermittently fail on Windows (#42909) 2024-02-28 14:00:09 -08:00
Tom Payerle
935660e3d5 mysql: explicity cast python command to str in _fix_dtrace_shebang() (#40781)
This should fix issue #40780

We explicitly cast self.spec["python"].command to str in the filter_file
call in _fix_dtrace_shebang to avoid the error
==> Error: TypeError: expected str, bytes or os.PathLike object, not Executable

Not sure why the error is appearing (is it only for specific python versions, etc?),
but the fix should be quite safe.
2024-02-28 13:00:51 -08:00
Alec Scott
17bfc41841 bison: remove unnessisary deps, add variant for colored output (#42209) 2024-02-28 12:32:40 -08:00
Arne Becker
49b38e3a78 perl-yaml-syck: New package (#42892)
Adds YAML::Syck
2024-02-28 12:26:09 -08:00
Arne Becker
66f078ff84 perl-catalyst-runtime and deps: new packages (#42886)
* perl-catalyst-runtime and deps: new packages
  This add Perl Catalyst::Runtime and its missing dependencies.
  Adds:
  - perl-catalyst-runtime
  - perl-apache-logformat-compiler
  - perl-cgi-simple
  - perl-cgi-struct
  - perl-class-c3-adopt-next
  - perl-cookie-baker
  - perl-data-dump
  - perl-devel-stacktrace-ashtml
  - perl-filesys-notify-simple
  - perl-getopt-long-descriptive
  - perl-hash-multivalue
  - perl-http-body
  - perl-http-entity-parser
  - perl-http-headers-fast
  - perl-http-multipartparser
  - perl-moosex-emulate-class-accessor-fast
  - perl-moosex-getopt
  - perl-moosex-methodattributes
  - perl-moosex-role-parameterized
  - perl-path-class
  - perl-plack
  - perl-plack-middleware-fixmissingbodyinredirect
  - perl-plack-middleware-methodoverride
  - perl-plack-middleware-removeredundantbody
  - perl-plack-middleware-reverseproxy
  - perl-plack-test-externalserver
  - perl-posix-strftime-compiler
  - perl-stream-buffered
  - perl-string-rewriteprefix
  - perl-test-mocktime
  - perl-test-tcp
  - perl-test-time
  - perl-test-trap
  - perl-tree-simple
  - perl-tree-simple-visitorfactory
  - perl-uri-ws
  - perl-www-form-urlencoded
2024-02-28 12:17:45 -08:00
AMD Toolchain Support
304a63507a AOCC: add v4.2.0 (#42891)
Co-authored-by: vijay kallesh <Vijay-teekinavar.Kallesh@amd.com>
2024-02-28 20:24:57 +01:00
Jonas Eschle
c7afc0eb5f Upgrade TensorFlow Probability with newer versions (#42673)
* enh: add newer versions

* enh: add newer versions

* format

* fix typo

* Update package.py

* make jax and TF optional dependencies

* style fix

* remove dependency

* remove old TFP version

* fix:  style
2024-02-28 12:29:23 -06:00
kwryankrattiger
57cde78c56 ParaView Release Candidate 5.12.0-RC3 (#42654) 2024-02-28 09:41:10 -08:00
Arne Becker
b01f6308d5 perl-json-xsand deps: new packages (#42904)
Adds JSON::XS and its deps:
- Canary::Stability
- Types::Serialiser
2024-02-28 09:30:46 -08:00
eugeneswalker
13709bb7b7 e4s: new packages: glvis, laghos (#42847)
* e4s: new packages: glvis, laghos

* gl: require: osmesa

* be explicit: glvis ^llvm so that llvm-amdgpu not chosen

* glvis fails on oneapi stack due to issue 42839
2024-02-28 09:26:53 -08:00
Harmen Stoppels
661ae1f230 versions: simplify list if union not disjoint (#42902)
Spack merges ranges and concrete versions if they have non-empty
intersection. That is not enough for adjacent version ranges.

This commit ensures that disjoint ranges in version lists are simplified
if their union is not disjoint:

```python
"@1.0:2.0,2.1,2.2:3,4:6" # simplifies to "@1.0:6"
```
2024-02-28 16:33:25 +01:00
Sinan
287e1039f5 package_py_systemd_python_improve (#42865)
Co-authored-by: sbulut <sbulut@3vgeomatics.com>
2024-02-28 07:56:17 -06:00
Jonas Eschle
015dc4ee2e Add package zfit interface (#42666)
* Add package zfit interface

* add maintainer

* [@spackbot] updating style on behalf of jonas-eschle

* Update package.py

* Update package.py

* Update package.py

* [@spackbot] updating style on behalf of jonas-eschle

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

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

* Update package.py

---------

Co-authored-by: jonas-eschle <jonas-eschle@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-28 07:52:40 -06:00
Axel Huebl
46165982b1 C-Blosc2: Fuzzer Tests (#42881)
The fuzzer tests are a bit flaky and have linker issues on
clang. We generally only should build them in testing.
2024-02-27 21:08:33 -07:00
eugeneswalker
c9a111946e e4s oneapi: remove outdated package preferences (#42875) 2024-02-27 14:35:06 -08:00
renjithravindrankannath
62160021c1 Adding dependency of roctracer-dev and patch in miopen-hip (#42637) 2024-02-27 14:52:47 -07:00
Tom Payerle
3290e2c189 openexr: Add custom libs property (#42274)
Libraries for openexr are named libOpenEXR*.so, etc., so the default libs
handler in spec does not find them.

Add a custom libs property to address this.

Partial fix for #42273

Co-authored-by: payerle <payerle@users.noreply.github.com>
2024-02-27 10:45:29 +01:00
George Young
2a9fc3452a regtools: add new package (#42852)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-27 10:44:34 +01:00
YI Zeping
2ea8a2e6ae btop: add cmake version restriction (#42835)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-27 10:08:22 +01:00
Lydéric Debusschère
fe4a4ddcf9 bazel: allow offline build of major versions 5 and 6 (#41575)
* bazel: allow offline build of major versions 5 and 6; add variant download_data

* bazel: add maintainer LydDeb

* bazel: install offline only; remove variant download_data

* bazel: fix variable name: resource_dico --> resource_dictionary

* bazel: fix style

* bazel: fix the build of version 4

* bazel: add comment about resources

* bazel: access to resource stages with self.stage

* bazel: add except to solve AttributeError: 'Stage' object has no attribute 'resource'

---------

Co-authored-by: LydDeb <lyderic.debusschere@eolen.com>
2024-02-27 03:03:25 -06:00
Juan Miguel Carceller
c45714fd3c delphes: use the same C++ standard as in ROOT (#42816)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-02-27 09:54:26 +01:00
Juan Miguel Carceller
523d12d9a8 garfieldpp: Add version 5.0 (#42817)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-02-27 09:54:03 +01:00
Howard Pritchard
5340e0184d Open MPI: adjust pmix dependency for 5.0.x (#42827)
for various reasons had to advance dependency of 5.0.2 to at least
pmix 4.2.4.  5.0.1 and 5.0.0 can also build with 4.2.4 pmix or newer.

related to #42651

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2024-02-27 09:49:29 +01:00
AMD Toolchain Support
bca7698138 openfoam: add mpfr search paths (#42779)
Co-authored-by: Branden Moore <branden.moore@amd.com>
2024-02-27 09:37:48 +01:00
Peter Scheibel
5c26ce5385 skip test which is causing spurious failures on Windows (#42832) 2024-02-27 09:36:10 +01:00
Eisuke Kawashima
02137dda17 eigenexa: add 2.7–2.12 (#38170) 2024-02-27 09:23:08 +01:00
eugeneswalker
4abac88895 e4s ci: use ubuntu 22.04 images (#42843) 2024-02-27 01:12:53 -07:00
stepanvanecek
79c2a55e00 gpuscout: new package (#42761)
Co-authored-by: Stepan Vanecek <stepan@Stepans-MBP.fritz.box>
2024-02-27 09:05:09 +01:00
Carsten Uphoff
71c169293c double-batched: add v0.5.0 (#42850)
Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>
2024-02-27 08:59:42 +01:00
Wouter Deconinck
bcc5ded205 dd4hep: new version 1.28 (#42846) 2024-02-27 08:50:01 +01:00
Kensuke WATANABE
379a5d8fa0 root: add dependent package required for build time tests (#42849) 2024-02-27 08:43:08 +01:00
Juan Miguel Carceller
d8c2782949 bdsim: use the same C++ standard as in ROOT, add a patch (#42031)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-02-27 08:34:42 +01:00
dependabot[bot]
6dde6ca887 build(deps): bump pytest from 8.0.1 to 8.0.2 in /lib/spack/docs (#42861)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.1...8.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 08:30:03 +01:00
downloadico
8f8c262fb3 picard: add version 3.1.1 (#42862) 2024-02-27 08:29:06 +01:00
afzpatel
93b8e771b6 rocm-gdb: add v6.0.2 (#42855) 2024-02-27 08:22:56 +01:00
Todd Gamblin
48088ee24a refactor: add type annotations and refactor solver conditions (#42081)
Refactoring `SpackSolverSetup` is a bit easier with type annotations, so I started
adding some. This adds annotations for the (many) instance variables on
`SpackSolverSetup` as well as a few other places.

This also refactors `condition()` to reduce redundancy and to allow
`_get_condition_id()` to be called independently of the larger condition
function.


Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-26 22:26:01 +00:00
Mikael Simberg
c7df258ca6 Update camp missing headers patch to be applied with all compilers (#42857) 2024-02-26 12:30:01 -05:00
Erik Heeren
b8e8fa2dcd py-find-libpython: 0.3.1 (#42853)
* py-find-libpython: 0.3.1

* py-find-libpython: sort versions
2024-02-26 10:07:51 -07:00
Adam J. Stewart
8e885f4eb2 ImageMagick: fewer dependencies on macOS (#42739) 2024-02-26 17:45:29 +01:00
Miranda Mundt
116308fa17 py-pyomo: add v6.7.1 (#42795)
* Update Pyomo spack package for 6.7.1 release

* Apply changes from @adamjstewart

* Update sphinx+Pyomo versions

* Whoops - typo
2024-02-26 10:14:36 -06:00
Adam J. Stewart
5eb4d858cb Update PyTorch ecosystem (#42819) 2024-02-25 19:20:25 -08:00
eugeneswalker
8dd5f36b68 e4s external rocm ci: use ubuntu 22 image with rocm 5.7.1 (#42842)
* e4s external rocm ci: use ubuntu 22 image with rocm 5.7.1

* comment out slate+rocm due to build error
2024-02-25 17:50:56 -08:00
eugeneswalker
e3ce3ab266 e4s ci: add py-mpi4py, py-numba (#42845) 2024-02-25 17:23:39 -08:00
Jeremy Fix
0618cb98d1 py-ipyvuetify: new package (#42836)
* py-ipyvuetify: new package

* Limit py-jupyter-packing version to 0.7.x

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

* Fix py-jupyterlab version and type

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

* Fix py-ipyvue version range to exclude 2

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

* rm py-wheel, already considered for PythonPackage

* fix: pynpm only required for build, reorder dependencies as in the pyproject.toml

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-25 07:34:23 -06:00
Maciej Wójcik
3b4a27ce7b snakemake: new version with plugins (#42713)
* snakemake: add Snakemake 8 with dependencies

* snakemake: add missing description

* Whitespace

* Whitespace

* Whitespace

* Whitespace

* py-conda-inject: add constraint for Python

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

* py-snakemake-executor-plugin-azure-batch: add constraint for Python

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

* py-snakemake-executor-plugin-cluster-generic: add constraint for Python

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

* py-snakemake: add upper bound for Python

* py-snakemake-executor-plugin-drmaa: specify dependency type

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

* py-snakemake-executor-plugin-googlebatch: correct dependency version

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

* py-snakemake-executor-plugin-tes: correct dependency version

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

* py-snakemake-storage-plugin-s3: reorder

* snakemake: remove newly added variants

* snakemake: remove newly added variants

* snakemake: remove newly added variant

* snakemake: update version

* snakemake: update version

* snakemake: whitespace

* py-snakemake-storage-plugin-s3: update version

* snakemake: use newer version

* snakemake: whitespace

* snakemake: update interfaces

* py-snakemake-storage-plugin-gcs: link issue

* snakemake: update versions

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-25 03:47:38 -07:00
Veselin Dobrev
07afbd5619 [laghos] Add a patch for MPI_Session (#42841) 2024-02-24 16:07:59 -07:00
Pranav Sivaraman
5d8cd207ec zoxide: new package (#42840)
* feat: zoxide package

* Apply suggestions from code review

Co-authored-by: Alec Scott <alec@bcs.sh>

---------

Co-authored-by: Alec Scott <alec@bcs.sh>
2024-02-24 14:53:08 -07:00
Adam J. Stewart
3990589b08 py-lightly: add v1.5.0 (#42820) 2024-02-24 12:27:53 -08:00
dependabot[bot]
38d821461c build(deps): bump codecov/codecov-action from 4.0.1 to 4.0.2 (#42831)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](e0b68c6749...0cfda1dd0a)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-24 12:26:30 -08:00
Adam J. Stewart
80b13a0059 py-pandas: add v2.2.1 (#42838) 2024-02-24 12:20:55 -08:00
Maciej Wójcik
ab101d33be py-azure-...: add new versions (#42742)
* py-azure-core: add new versions

* py-azure-identity: add new versions, flatten dependencies

* py-azure-storage-blob: add new versions

* py-msal: add new versions

* py-azure-...: black is terrible

* py-azure-storage-blob: correct dependency

* Reorder

* Reorder
2024-02-24 12:29:05 -06:00
Sinan
cc742126ef package/libspatialite: add conflict, new version (#42573)
* package/libspatialite: add conflict, new version

* depends on new version of freexl

* fix bug

* remove manual download stuff

* improve style

* first depracate

* [@spackbot] updating style on behalf of Sinan81

* get rid of conflict, reorder deps

* remove manual download

---------

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
Co-authored-by: Sinan81 <Sinan81@users.noreply.github.com>
2024-02-24 09:29:46 -06:00
Stephen Hudson
a1f21436a4 libEnsemble: add v1.2.1 (#42828) 2024-02-24 09:27:44 -06:00
Alex Richert
95fdc92c1f Allow awscli-v2 to be installed without examples/ dir (#42773)
* Allow awscli-v2 to be installed without examples/ dir

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

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-24 09:25:59 -06:00
Alex Richert
6680c6b72e libjpeg-turbo: add v2.1.5, update recipe (#37963)
Co-authored-by: Alec Scott <hi@alecbcs.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-23 19:23:52 -07:00
Chris Marsh
74b6bf14b8 netcdf-cxx4: convert to CMake-based build (#42766)
The CMake-based build is anticipated to work in all cases where the
Autotools-based build did, and to address all prior issues with less
maintenance of the package. In detail:

* Fixes #42735 (CMake's find_package helps with linking to proper
  netcdf-c)
* Replaces older Autotools-based build
* All preexisting variants are handled
* Record hdf5 as an explicit dependency (was missing before)
* Add +tests option

Co-authored-by: Chrismarsh <Chrismarsh@users.noreply.github.com>
2024-02-23 15:37:33 -08:00
Vicente Bolea
7c315fc14b proj: apply stdint.h patch in version 8 (#42791)
* proj: apply stdint.h patch in version 8

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 14:48:20 -07:00
John W. Parent
f51c9fc6c3 Windows path handling: change representation for paths with spaces (#42754)
Some builds on Windows break when encountering paths with spaces. This
reencodes some paths in Windows 8.3 filename format (when on Windows):
this serves as an equivalent identifier for the file, but in a form that
does not have spaces.

8.3 filenames are also truncated in length, which could be helpful, but
that is not the primary intended purpose of using this format.

Overall

* nmake/msbuild packages do this generally for the install prefix
* curl/perl require additional modifications (as written now, each package
  may require calls to `windows_sfn` to work when the Spack
  root/install/staging prefixes contain spaces)

Some items for follow-up:

* Spack itself does not create paths with spaces "on top" of whatever
  the user configures or where it is placed (e.g. the Spack root, the
  staging directory, etc.), so it might be possible to edit some of these
  paths once and avoid a proliferation of individual `windows_sfn`
  calls in individual packages.
* This approach may result in the insertion of 8.3-style paths into
  build artifacts (on Windows), handling this may require additional
  bookkeeping (e.g. when relocating).
2024-02-23 13:30:11 -08:00
John W. Parent
3e713bb0fa vtk package: support vtk@9 on Windows (#42751) 2024-02-23 11:58:58 -08:00
Peter Scheibel
55bbb10984 Alert user to failed concretizations (#42655)
With this change an error message is emitted when the result of concretization 
is in an inconsistent state.
2024-02-23 20:15:25 +01:00
Simon Pintarelli
6e37f873f5 tiled-mm: add v2.3 (#42829) 2024-02-23 19:53:51 +01:00
Massimiliano Culpo
d49cbecf8c Cleanup spack.schema (#42815)
* Move spec_list into its own file, instead of __init__.py

* Remove spack.schema.spack

This module was introduced in #33960 It's almost an exact duplicate of
spack.schema.env, and is not used anywhere.

* Fix typo
2024-02-23 10:23:54 -08:00
Dr Marco Claudio De La Pierre
fe07645e3b Update/add packages in the Nextflow ecosystem (#42776)
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
2024-02-23 17:53:46 +01:00
Ben Morgan
c5b8d5c92a geant4: new version v11.2.1 (#42822) 2024-02-23 08:07:35 -05:00
Jeremy Fix
2278816cb3 py-jwcrypto: new package (#42783)
* adds the spack recipe for py-jwcrypto

* split long line to fix E501

* Specify versions for py-cryptography and py-typing-extensions

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 05:58:11 -07:00
Jeremy Fix
4bd305b6d3 py-reacton: new package (#42794)
* adds the spack recipe for reacton python package

* Fix versions for ipywidgets and typing-extensions

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 05:48:06 -07:00
Erik Heeren
a26e0ff999 py-find-libpython: new package (#42804)
* py-find-libpython: new package

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 05:42:58 -07:00
Jeremy Fix
4550fb83c0 py-ipyvue: new package (#42789)
* add spack recipe for ipyvue

* Specify version for ipywidgets

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 05:37:48 -07:00
Todd Gamblin
5b96c2e89f py-sympy: add version 1.12 (#42770) 2024-02-23 05:42:49 -06:00
Sinan
18c8406091 pdal: fix version range for patch (#42769)
* Update package.py

fix bug.

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 05:28:41 -06:00
Caetano Melone
bccefa14cb py-codespell: add package (#42694)
* py-codespell: add package

* setuptools-scm conflict

confirmed via https://github.com/codespell-project/codespell/issues/3365

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

* reorder dependencies and versions

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 05:07:24 -06:00
Maciej Wójcik
20fc5a174a py-s3transfer, py-boto3, py-botocore: add new versions (#42741)
* py-s3transfer: add new versions

* py-boto3: add new versions

* py-botocore: add new versions

* py-boto3: correct version ranges
2024-02-23 04:18:45 -06:00
Alec Scott
3abcb408d1 py-ansible: add v2.16.3 (#42734)
* py-ansible: add v2.16.3

* Apply suggestions from code review

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

* Add specific python version requirements from setup.cfg

* Add additional ranges for py-setuptools

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-23 04:13:33 -06:00
Maciej Wójcik
a0d97d9294 py-argparse-dataclass: add new package (#42494)
* py-argparse-dataclass: add new package

* Remove obvious dependency
2024-02-23 04:11:21 -06:00
Massimiliano Culpo
0979a6a875 Remove dead code from Environment (#42818)
Environment.concretize_and_add is not used anywhere.
2024-02-23 10:48:07 +01:00
Massimiliano Culpo
98de8e3257 Fix wrong call to a function (#42814) 2024-02-23 06:37:22 +01:00
akimler
23b299c086 matio: add v1.5.26 (#42808) 2024-02-23 06:03:06 +01:00
Massimiliano Culpo
adcd3364c9 elpa: remove deprecated versions (#42802) 2024-02-23 06:02:06 +01:00
Tom Payerle
a2908fb9f7 qb3: add custom libs property (#42275) 2024-02-22 15:13:05 -07:00
John W. Parent
f514e72011 netcdf-c package: fix hdf5 linking on Windows (#42749) 2024-02-22 14:18:34 -07:00
Adam J. Stewart
b61d964eb8 PythonPackage: check purelib for libs/headers (#42602)
* PythonPackage: check purelib for libs/headers

* Update error messages too

* Fix functools.reduce argument order
2024-02-22 13:17:21 -08:00
John W. Parent
2066eda3cd Seacas package: add Windows support (#42692) 2024-02-22 13:28:33 -07:00
Alex Richert
d8b186a381 dakota: add boost components (#42659)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-22 13:03:13 -07:00
Adam J. Stewart
d258aec099 GDAL: add v3.8.4 (#42805) 2024-02-22 11:42:14 -08:00
Harmen Stoppels
3d1d5f755f oci: when base image uses Image Manifest Version 2, follow suit (#42777) 2024-02-22 16:33:56 +01:00
Thomas-Ulrich
90778873d1 tandem: update package (#42785) 2024-02-22 15:45:20 +01:00
AMD Toolchain Support
1af57e13fb elpa: fix support for patched version (#42803)
Co-authored-by: Ning Li <ning.li@amd.com>
2024-02-22 15:43:12 +01:00
AMD Toolchain Support
28d25affcc ELPA: Linking fixes for BLAS and OpenMP (#42747)
Co-authored-by: Phil Tooley <phil.tooley@amd.com>
2024-02-22 15:21:00 +01:00
Martin Lang
3ebaf33915 libgd: fix INT_MAX not defined (#42104)
Compiling version 2.2.4 fails (on a Debian system with only a minimum set of packages installed) with an error because `INT_MAX` is undeclared:
```
   263    gd_gd2.c: In function '_gd2GetHeader':
>> 264    gd_gd2.c:212:54: error: 'INT_MAX' undeclared (first use in this function)
   265      212 |                 if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) {
   266          |                                                      ^~~~~~~
   267    gd_gd2.c:87:1: note: 'INT_MAX' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'?
```
2024-02-22 03:23:59 -07:00
Alec Scott
e8d981b405 rust: add v1.76.0 (#42798) 2024-02-22 03:09:31 -07:00
Steven Hahn
02f222f6a3 google benchmark: Add variant with libpfm4 (#42620)
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
2024-02-22 07:29:49 +01:00
James Beal
8345c6fb85 delly2: add v1.2.6 (#42745)
Co-authored-by: James Beal <jb23@sanger.ac.uk>
2024-02-22 07:28:40 +01:00
Xavier Delaruelle
3f23634c46 environment-modules: add version 5.4.0 (#42763) 2024-02-22 07:10:55 +01:00
MatthewLieber
d5766431a0 mvapich: add v3.0 (#42756)
Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2024-02-22 07:09:14 +01:00
Martin Lang
1388bfe47d bigdft-atlab: add v1.9.3, v1.9.4 (#42643) 2024-02-22 07:05:00 +01:00
dependabot[bot]
579dec3b35 build(deps): bump urllib3 from 2.2.0 to 2.2.1 in /lib/spack/docs (#42757)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.2.0...2.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 07:01:45 +01:00
Martin Lang
9608ed9dbd cgal: add v5.5.3 (#42650) 2024-02-22 06:58:03 +01:00
Wouter Deconinck
42b739d6d5 podio: depends_on py-graphviz type run (for podio-vis) (#42787)
The podio-vis tool depends at run-time on py-graphviz, https://github.com/AIDASoft/podio/blob/master/tools/podio-vis#L10.
2024-02-22 06:14:38 +01:00
Matthieu Dorier
91a0c71ed1 nlohmann-json-schema-validator: added version 2.2.0 and 2.3.0 (#42792) 2024-02-22 06:11:29 +01:00
Dom Heinzeller
6ee6fbe56b ecflow: apply ctsapi_cassert.patch for all compilers (#42793) 2024-02-22 06:09:54 +01:00
Mikael Simberg
be4eae3fa8 pika: add sanitizers variant (#42778) 2024-02-22 05:54:33 +01:00
Harmen Stoppels
ad70b88d5f spack gc: do not show uninstalled but needed specs (#42696) 2024-02-22 05:21:39 +01:00
eugeneswalker
c1d230f25f e4s ci stacks: add python packages (#42774)
* e4s ci stacks: add python packages

* comment out failing specs
2024-02-21 20:59:05 -07:00
John W. Parent
4bc52fc1a3 env activate: use Win-compatible print on Windows (#42755)
Use "echo" instead of "printf" on Windows.
2024-02-21 11:02:04 -08:00
John W. Parent
7d728822f0 Windows: fix error with can_symlink check (#42753) 2024-02-21 10:18:25 -08:00
John W. Parent
e96640d2b9 cgns package: don't use MPI wrappers on Windows (#42750) 2024-02-21 10:10:48 -08:00
Alex Richert
e196978c7c Add 'docs' variant to rust-bootstrap (#42768)
* Add 'docs' variant to rust-bootstrap

* remove docs for rust-bootstrap
2024-02-21 11:04:13 -07:00
Harmen Stoppels
de3d1e6c66 rocm: removal of deprecated <5.1 versions (#42676)
The package `aomp` is removed entirely, as it was too outdated to have non-deprecated dependencies.
2024-02-21 14:07:40 +01:00
Massimiliano Culpo
2d8e0825fe binutils: add v2.42 (#42760) 2024-02-20 23:03:51 -08:00
pauleonix
d5c06c4e2c asio: add patches 1.28.2 and 1.28.1 (#42762) 2024-02-20 23:02:43 -08:00
Wouter Deconinck
0d92b07dbd pythia6: deal with dead pythiasix.hepforge.org (#42162)
* pythia6: deal with dead pythiasix.hepforge.org

* pythia6: rm main81.f from CMakeLists.txt

* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-02-20 15:30:54 -06:00
Auriane R
6cfcbc0167 Update conflict between stdexec and clang (#42765) 2024-02-20 13:32:54 -07:00
Massimiliano Culpo
f9e9fab2da clingo: add v5.7.1 (#42758) 2024-02-20 07:49:49 -08:00
Massimiliano Culpo
b3f790c259 btop: add v1.3.2 (#42759) 2024-02-20 07:46:35 -08:00
George Young
b5b5130bed pblat: add new package (#42517)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-19 22:28:27 +01:00
Vicente Bolea
d670a2a5ce adios2: update kokkos dependency (#42621)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-19 11:54:08 -07:00
Harmen Stoppels
0ee3a3c401 Use relative target in symlinks to modified files in view (#42699) 2024-02-19 16:33:38 +01:00
Dave Keeshan
ad6dc0d103 verible: add v0.0-3539-g9442853c (#42628) 2024-02-19 14:40:23 +01:00
Alex Richert
6e373b46f8 scorep: specify binutils headers and libs (#42656) 2024-02-19 14:35:22 +01:00
Thomas-Ulrich
abe617c4ea hipsycl: update package (#42518) 2024-02-19 14:34:05 +01:00
Satish Balay
a0e80b23b9 DTK: specify MPI compilers (#42592)
Co-authored-by: balay <balay@users.noreply.github.com>
2024-02-19 14:24:28 +01:00
Dom Heinzeller
4d051eb6ff ecflow: fix compilation with Intel classic compilers (#42622) 2024-02-19 14:23:09 +01:00
kinagaki-fj
0d89083cb5 omm-bundle: add new package (#42304) 2024-02-19 14:16:39 +01:00
Alex Richert
23e586fd85 ferret: add support for gcc@10: (#42660) 2024-02-19 14:14:11 +01:00
Richard Berger
c2b116175b kokkos: disable CUDA_MALLOC_ASYNC on cray-mpich (#42661)
Co-authored-by: Daniel Arndt <arndtd@ornl.gov>
2024-02-19 13:52:48 +01:00
Mikael Simberg
a1f90620c3 umpire: depend on camp~rocm when umpire itself has ~rocm (#42701) 2024-02-19 11:58:31 +01:00
Harmen Stoppels
668879141f remove a few redundant calls to setup_run_environment (#42718)
Any package `X` used as `depends_on("x", type="build")` will have
`X.setup_run_environment(env)` called, because it has to be able to
"run" in the build environment.

So there is no point in calling `setup_run_environment` from
`setup_dependent_build_environment`.

Also it's redundant to call `setup_run_environment` in
`setup_dependent_run_environment`, cause (a) the latter is called _for
every parent edge_ instead of once per node, and (b) it's only called
after `setup_run_environment` is called anyways. Better to call
`setup_run_environment` once and only once.
2024-02-19 11:43:45 +01:00
Adam J. Stewart
267defd9d3 py-matplotlib: add v3.8.3 (#42698) 2024-02-19 11:40:18 +01:00
Ken Raffenetti
603d3f2283 mpich: Remove invalid pmi option (#42686)
pmi=off is not a valid configuration option. MPICH cannot function
without a PMI library. Fixes #42685.
2024-02-19 11:38:49 +01:00
James Beal
02bfbbe269 Bump for new version of bedtools2 (#42034)
Co-authored-by: James Beal <jb23@sanger.ac.uk>
2024-02-19 11:35:26 +01:00
Alec Scott
44d08d2c24 gnupg: make discoverable as external (#42736) 2024-02-19 11:27:39 +01:00
AMD Toolchain Support
c6faab10aa CP2K: fix multiple use of spec["fftw"] (#42724)
fftw object was originally created with spec["fftw:openmp"], but
referencing spec["fftw"] overwrites the 'last_query' in the spec object,
so later use of fftw.libs was not returing FFTW OpenMP libs.

Also allow the post-install fixup to support amdfftw as well as fftw.

Co-authored-by: Branden Moore <branden.moore@amd.com>
Co-authored-by: Phil Tooley <phil.tooley@amd.com>
Co-authored-by: Greg Becker <becker33@llnl.gov>
2024-02-19 11:21:11 +01:00
Geoffrey Lentner
baa203f115 duckdb: add v0.9.2 (#42374) 2024-02-19 03:02:43 -07:00
Alec Scott
575a33846f bfs: add v3.1.1 (#42740) 2024-02-19 10:54:00 +01:00
Adam J. Stewart
79df065730 py-shapely: add v2.0.3 (#42738) 2024-02-18 21:29:18 +01:00
William Moses
953ee2d0ca Bump enzyme to 0.0.100 (#42626) 2024-02-18 08:48:21 -08:00
Nai-Yuan Chiang
6796b581ed hiop new release, v1.0.3 (#42730) 2024-02-18 08:45:44 -08:00
Christoph Junghans
f49a5519b7 byfl: initial commit (#42731) 2024-02-18 08:43:56 -08:00
Tom Drever
e07a6f51dc Add py-click-option-group (#42678)
* Add py-click-option-group

* Specify dependency versions
2024-02-18 08:22:25 -06:00
Dani
cb73d71cf1 new builtin package: py-biobb-model (#42681)
* new builtin package: py-biobb-model

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-18 03:18:03 -06:00
Jonas Eschle
5949fc2c88 add package py-jacobi (#42672)
* add package py-jacobi

* fix:  add description

* fix:  add description

* fix:  add description

* [@spackbot] updating style on behalf of jonas-eschle

* Update package.py

* Update package.py

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

I don't think that numpy is used in "build"? But not important

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

---------

Co-authored-by: jonas-eschle <jonas-eschle@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-18 03:17:35 -06:00
Jonas Eschle
fd10cfdebf add package py dotmap (#42665)
* add package py dotmap

* add maintainer

* [@spackbot] updating style on behalf of jonas-eschle

* fix:  add description

* [@spackbot] updating style on behalf of jonas-eschle

* Update package.py

---------

Co-authored-by: jonas-eschle <jonas-eschle@users.noreply.github.com>
2024-02-18 03:16:32 -06:00
Maciej Wójcik
32506e222d py-sysrsync: add new package (#42492)
* py-sysrsync: add new package

* py-sysrsync: specify dependency type

* py-sysrsync: add constraint for Python
2024-02-18 03:15:42 -06:00
Maciej Wójcik
a7d5cc6d68 py-google-...: add new versions and few new packages (#42671)
* py-google-cloud-storage: add new versions

* py-google-api-core: add new versions

* py-proto-plus: add new package

* py-google-api-core: add grpc variant

* py-google-api-core: add grpc variant

* py-google-api-core: add missing prefix

* py-google-cloud-batch: add new package

* py-google-cloud-logging: add new package

* py-google-cloud-appengine-logging: add new package

* py-google-cloud-audit-log: add new package

* py-grpc-google-iam-v1: add new package

* py-proto-plus: remove obvious dependency

* Whitespace

* Whitespace

* py-google-cloud-audit-log: correct conflict

* py-proto-plus: correct dependency type

* Whitespace

* py-google-auth: add new version

* py-google-resumable-media: add new version

* py-google-cloud-storage: constrain version of dependency

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

* py-grpcio-status: use newer version

* py-google-resumable-media: add upper bound of dependency

* Add types of dependencies.

* py-grpcio: add new version

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-18 03:15:02 -06:00
Vanessasaurus
222241f232 flux-core: add uuid (#42635)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-02-18 08:54:11 +01:00
Sinan
aa1820eb5c pdal: new package (#42714)
* new package pdal

* [@spackbot] updating style on behalf of Sinan81

* fix style

* add license

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

Co-authored-by: Alec Scott <alec@bcs.sh>

* [@spackbot] updating style on behalf of Sinan81

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

Co-authored-by: Alec Scott <alec@bcs.sh>

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

Co-authored-by: Alec Scott <alec@bcs.sh>

* improve dependency spec

* add maintainer

* add conflict

* fix bug

* improve

* improve

* [@spackbot] updating style on behalf of Sinan81

* fix style

* specify cmake dependency version

---------

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
Co-authored-by: Sinan81 <Sinan81@users.noreply.github.com>
Co-authored-by: Alec Scott <alec@bcs.sh>
2024-02-17 13:40:40 -08:00
George Young
16ea5f68ba cryodrgn: new package @2.3.0 (#42443)
* cryodrgn: new package @2.3.0

* correcting dependency ranges

* correcting dependency ranges

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-17 15:07:56 -06:00
Dani
aeec515b4f new builtin package: py-biobb-structure-utils (#42683) 2024-02-17 14:42:10 -06:00
Maciej Wójcik
6e2ec2950b py-kubernetes: add new versions (#42670)
* py-kubernetes: add new versions

* py-oauthlib: add new version
2024-02-17 14:32:20 -06:00
Maciej Wójcik
fe5772898d py-azure-... and py-msrest: add new versions (#42624)
* py-azure-batch: add new versions

* py-azure-core: add new versions

* py-azure-identity: add new versions

* py-azure-mgmt-batch: add new versions

* py-azure-mgmt-core: add new versions

* py-azure-storage-blob: add new versions

* py-msrest: add new versions

* Whitespace

* Whitespace

* py-msrest: add a note

* py-msrest: version-dependent URL

* py-azure-mgmt-batch: correct version of dependency
2024-02-17 14:24:11 -06:00
Alex Leute
384ddf8e93 py-smote-variants: Added package py-smote-variants (#42502)
* py-smote-variants: Added package py-smote-variants

Also added py-minisom and py-metric-learn as dependencies

* py-metric-learn: Added build dependency on setuptools

* py-smote-variants: Added a dependency on py-pytest-runner

As well as a comment about why statistics isn't included

* [@spackbot] updating style on behalf of alex391

---------

Co-authored-by: Alex C Leute <aclrc@rit.edu>
2024-02-17 14:20:03 -06:00
Tom Vander Aa
32c2e240f8 py-charm4py: needs Cython<3.0 (#42491)
* py-charm4py: needs Cython<3.0

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-17 14:16:31 -06:00
dependabot[bot]
b88c4792a7 build(deps): bump clingo from 5.6.2 to 5.7.1 in /.github/workflows/style (#42732)
Bumps [clingo](https://github.com/potassco/clingo) from 5.6.2 to 5.7.1.
- [Release notes](https://github.com/potassco/clingo/releases)
- [Changelog](https://github.com/potassco/clingo/blob/master/CHANGES.md)
- [Commits](https://github.com/potassco/clingo/compare/v5.6.2...v5.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:24:10 -08:00
dependabot[bot]
ac92e94b00 build(deps): bump pytest from 8.0.0 to 8.0.1 in /lib/spack/docs (#42733)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.0...8.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:23:13 -08:00
Luc Berger
4a01865f7b Kokkos Ecosystem: update for release 4.2.01 (#42711)
* Kokkos Ecosystem: update for release 4.2.01

Will rebase this on top of develop once Kokkos Core PR merges.

* Kokkos Ecosystem: update license statement to reflect current license
2024-02-16 17:28:29 -07:00
Sebastian Pipping
025165e22e expat: Add latest release 2.6.0 with security fixes (#42680)
* expat: Add latest release 2.6.0 with security fixes

* expat: Deprecate vulnerable 2.5.0

* expat: Add past CVEs and where they were fixed
2024-02-16 17:23:46 -07:00
SXS Bot
cda9bc3e1d spectre: add v2024.02.05 (#42496)
* spectre: add v2024.02.05

* [@spackbot] updating style on behalf of sxs-bot

---------

Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2024-02-16 15:49:06 -07:00
Lydéric Debusschère
caf21dda42 rust: enable vendor (#42365)
* rust: enable vendor

* rust: modify vendor description; move the call of variant

* rust: fix style

* rust: typo

* rust: remove variant 'vendor' to let vendoring as default fonctionality

---------

Co-authored-by: LydDeb <lyderic.debusschere@eolen.com>
2024-02-16 14:13:44 -08:00
HELICS-bot
e1779a2884 helics: Add version 3.5.0 (#42572)
* helics: Add version 3.5.0

* helics: define CMAKE_CXX_STANDARD=20 when GCC>=13 is used to compile

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ryan Mast <mast9@llnl.gov>
2024-02-16 14:12:50 -08:00
Adam J. Stewart
f55a018fd9 py-torchmetrics: add v1.3.1 (#42638) 2024-02-16 14:00:43 -08:00
dependabot[bot]
f5964e1dde build(deps): bump black in /.github/workflows/style (#42631)
Bumps [black](https://github.com/psf/black) from 24.1.1 to 24.2.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.1.1...24.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 13:52:38 -08:00
dependabot[bot]
23e0fe2e21 build(deps): bump black from 24.1.1 to 24.2.0 in /lib/spack/docs (#42629)
Bumps [black](https://github.com/psf/black) from 24.1.1 to 24.2.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.1.1...24.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 13:51:50 -08:00
dependabot[bot]
44438e6171 build(deps): bump python-levenshtein in /lib/spack/docs (#42630)
Bumps [python-levenshtein](https://github.com/rapidfuzz/python-Levenshtein) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/rapidfuzz/python-Levenshtein/releases)
- [Changelog](https://github.com/rapidfuzz/python-Levenshtein/blob/main/HISTORY.md)
- [Commits](https://github.com/rapidfuzz/python-Levenshtein/compare/v0.24.0...v0.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 13:51:12 -08:00
Martin Lang
af8e000a93 bigdft-futile: new versions 1.9.3, 1.9.4 (#42646) 2024-02-16 13:41:18 -08:00
Adam J. Stewart
375b82a593 py-black: add v24.2.0 (#42639) 2024-02-16 13:39:16 -08:00
Adam J. Stewart
2030e2b089 py-jsonargparse: add v4.27.5 (#42640) 2024-02-16 13:38:17 -08:00
Carlos Bederián
34aba94148 openmpi: add ucc to fabrics (#41889) 2024-02-16 22:37:00 +01:00
Nicolas Morales
43c909e19c Update maintainers for Kokkos and add Kokkos 4.2.1 (#42690)
* update kokkos spack package maintainers

* add Kokkos 4.2.01

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

Co-authored-by: Luc Berger <lberge@sandia.gov>

---------

Co-authored-by: Alec Scott <alec@bcs.sh>
Co-authored-by: Luc Berger <lberge@sandia.gov>
2024-02-16 11:12:36 -07:00
Martin Lang
7c011d304f nfft: new versions 3.5.1, 3.5.2, 3.5.3 (#42645) 2024-02-16 09:58:03 -08:00
Martin Lang
1546fc7e5f dftbplus: new versions 22.2, 23.1 (#42647) 2024-02-16 09:55:53 -08:00
Rob Falgout
75a134f085 Update package.py for hypre release 2.31.0 (#42689) 2024-02-16 11:46:29 -06:00
Alex Richert
d0c4675a9b Add aocc support to ESMF (#42708)
* Add aocc support to ESMF

* Update package.py
2024-02-16 09:33:47 -08:00
WuK
0507c3c63d add new CUTLASS versions (#42715) 2024-02-16 09:23:50 -08:00
dependabot[bot]
59caa93571 build(deps): bump dorny/paths-filter from 3.0.0 to 3.0.1 (#42710)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](0bc4621a31...ebc4d7e9eb)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 09:16:35 -08:00
Arne Becker
b4b53a9a9f perl-datetime-format-iso8601: New package (#42719)
Adds DateTime::Format::ISO8601
2024-02-16 09:15:54 -08:00
Todd Gamblin
be1cfffa45 clingo: add version 5.7.0 (#42707)
5.7.0 was just released. It includes a number of changes requested and/or
upstreamed by Spack developers, e.g.:

* API for accessing optimization priorities: https://github.com/potassco/clingo/pull/406
* Hash optimization: https://github.com/potassco/clingo/pull/441
* Contributing Guide: https://github.com/potassco/clingo/pull/465
* Hiding more ELF symbols:
  * https://github.com/potassco/clingo/pull/447
  * https://github.com/potassco/clingo/pull/449
2024-02-16 18:14:19 +01:00
Victor Lopez Herrero
75b7109222 dlb: add v3.4 (#42722) 2024-02-16 09:13:23 -08:00
Mikael Simberg
c56cf8c0d2 Add support for clang with OpenMP and other minor changes to oneapi build system (#42717)
* Add support for clang in oneapi packages with OpenMP

* Add fallback search for libomp in OneApi package with OpenMP threading

* Add requires for the compiler when using threads=openmp in intel-oneapi-mkl

* Cosmetic changes to messages in oneapi.py

* Update error message in oneapi.py

Co-authored-by: Robert Cohn <rscohn2@gmail.com>

* Update another error message in oneapi.py

Co-authored-by: Robert Cohn <rscohn2@gmail.com>

* Inline helper error function in oneapi.py

* Update one more error message in oneapi.py

* Wrap long line in oneapi.py

---------

Co-authored-by: Robert Cohn <rscohn2@gmail.com>
2024-02-16 11:39:31 -05:00
Robert Cohn
5c3df6e8ca [intel-oneapi-mkl] provide omp lib for threads=openmp (#42653) 2024-02-16 08:48:42 +01:00
Tim Fuller
79087d08d9 allow packages to request no submodules be updated (#40409)
* allow packages to request no submodules be updated when self.submodules is a
  callable function

* Extend the test added in Allow more fine-grained control over what submodules are
  updated: part 2 #27293 to include this case

* Update the type signature for the submodules arg of version() in directives.py

---------

Co-authored-by: tjfulle <tjfulle@users.noreply.github.com>
2024-02-15 22:36:37 -08:00
Victor Brunini
d31e503e5b develop: Add -b/--build-directory option to set build_directory package attribute (#39606)
* develop: Add -b/--build-directory option to set build_directory package attribute.

* Update docs

---------

Co-authored-by: psakievich <psakiev@sandia.gov>
Co-authored-by: vbrunini <vbrunini@users.noreply.github.com>
2024-02-16 06:30:58 +00:00
Eric Berquist
55b62c2168 SST: only run autoreconf for versions from Git branches (#42712) 2024-02-15 22:27:07 -06:00
Scott Wittenburg
6c3511ee1d Fix spack --profile|--pdb <cmd> (#42662) 2024-02-15 15:15:40 -07:00
Seth R. Johnson
d19fa74909 celeritas: new version 0.4.2 (#42702) 2024-02-15 16:41:10 +00:00
Jemma Stachelek
a2ad2d1c9f docs: fix typo (#42688) 2024-02-15 11:21:51 +01:00
Harmen Stoppels
55863bd680 compilers: fixup order of arguments to satisfies (#42682) 2024-02-15 10:21:06 +00:00
Harmen Stoppels
7d4dcd52d9 elpa: fix checksum (#42674) 2024-02-14 11:56:27 +01:00
Henrik Stooss
5e4e72ddd2 veclibfort: explicitly add platform=darwin as requirement (#42664) 2024-02-14 11:18:04 +01:00
John W. Parent
447c48e2fd VTK: limit patches to v8 (#42505)
* VTK: limit patches to v8

* Finer scrope on patch version applicability
2024-02-14 03:36:57 -06:00
Sreenivasa Murthy Kolam
3be4f4db86 Deprecate ROCm 5.1.0 till 5.2.3 (#41794) 2024-02-14 09:03:00 +01:00
John Pennycook
ca97a0fefb cmake: Enable compilation database generation (#42353)
* cmake: Enable CMAKE_EXPORT_COMPILE_COMMANDS

Enabling this option causes CMake to generate a compile_commands.json file
containing a compilation database that can be used to drive third-party tools.

CMAKE_EXPORT_COMPILE_COMMANDS only exists for CMake >= 3.5

Exporting compilation databases is only supported for Makefile and Ninja
generators, so check these conditions as well.

CMAKE_EXPORT_COMPILE_COMMANDS is only enabled in supported configurations
2024-02-13 16:47:40 -07:00
Jon Rood
59f56327fe Remove boost as dependency for trilinos+stk (#39556)
* Remove boost as dependency for trilinos+stk.

* Formatting.

* Put bounds on STK requirement of Boost.
2024-02-13 13:28:25 -07:00
Victor Brunini
e4c871489a boost: Add patch to workaround mpl compiler error with gcc 8.3 and c++17. (#39144)
Works around this issue: https://github.com/boostorg/mpl/issues/44

Co-authored-by: psakievich <psakiev@sandia.gov>
2024-02-13 12:23:13 -07:00
Nichols A. Romero
c048101d90 ELPA package: add patched version from Nov 2023 (#42539) 2024-02-13 10:47:28 -08:00
Alex Richert
e0304bf509 pdt: add aocc support (#42634) 2024-02-13 11:03:46 -07:00
Maciej Wójcik
0e2a9fe26a py-py-tes: add new package (#42531)
* py-py-tes: add new package

* py-py-tes: add constraint on Python
2024-02-13 10:31:11 -07:00
George Young
d1e01d5646 khmer: new package @2.1.1 (#42450)
* khmer: new package @2.1.1

* rationalising patch

* adding dep, modifying patch

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

Indeed!

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

* Update package.py

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 10:02:44 -07:00
George Young
7b04910f84 possvm: new package @1.2 (#42516)
* possvm: new package @1.2

* black!

* appeasing flake8

* Updating commit ID

* Adding graphing dep

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

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

* Update package.py

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 09:49:36 -07:00
Maciej Wójcik
0664a2cdb2 py-pysftp: add new package (#42525)
* py-pysftp: add new package

* py-pysftp: correct version

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 09:49:14 -07:00
Jeremy Fix
fc38fe1c69 Adds the spack recipe for building the pynpm python package (#42582)
* Adds the spack recipe for building the pynpm python package

* fix license header

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 09:42:11 -07:00
George Young
29cb1d0ce0 cellpose: new package @2.2.3 (#42403)
* py-fastremap: new package @1.14.1

* py-pyqtgraph: new package @0.13.3

* py-roifile: new package @2024.1.10

* py-superqt: new package @0.6.1

* cellpose: new package @2.2.3

* Appeasing black ...

* Dropping the cuda variant

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

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

* Adding python version dependency

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

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

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

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

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

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

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

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

* Adding missing dep & conflict

* Appeasing black

* Adding missing py- prefix for dep

* Switching over to py-pyqt6

* Switching over to py-pyqt6

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 10:08:41 -06:00
Dani
ce777e3c89 py-biobb-structure-checking: new package (#42580)
* new builtin package: py-biobb-structure-checking

* Update var/spack/repos/builtin/packages/py-biobb-structure-checking/package.py

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

* dependencies are also build dependencies

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 10:05:37 -06:00
Dani
bd44cedd0d new builtin package: py-biobb-io (#42451)
* new builtin package: py-biobb-io

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 10:03:42 -06:00
Dani
316a9a5d11 py-biobb-gromacs: add new package (#42579)
* new builtin package: py-biobb-gromacs

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

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

* added setuptools dependency

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-13 10:03:06 -06:00
Harmen Stoppels
4a04989bbb PythonExtension.add_files_to_view: link non-executable/non-shebang regular files (#42641) 2024-02-13 12:55:37 +01:00
Jordan Ogas
2c4b529896 squashfuse: add versions (#42589) 2024-02-13 09:03:49 +01:00
Henri Menke
e37c099ddb clfft: workaround compiler error (#42519) 2024-02-13 00:10:51 -07:00
George Young
4d7898a669 psipred: new package @4.02 (#42529)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-12 18:20:33 -08:00
Sreenivasa Murthy Kolam
91b0528abf ROCm packages and dependents: add 6.0.2 release (#42544)
* Bump up the version for rocm-6.0.2 release
* extend the patches that were created for apps for rocm-6.0.0 and rocm-6.0.2 releases
  (but apply hipfft patch for only 6.0.0)
2024-02-12 17:54:33 -08:00
Zack Galbreath
8ee3073350 More updates for GitLab CI memory requests (#42425)
* gitlab: remove requests for unreferenced packages

The packages removed in this commit are not built by any of
our current GitLab CI stacks.

* gitlab: update memory requests for "huge" packages

* gitlab: reduce memory requests for overprovisioned packages

* gitlab: more memory for py-torch (again)

* gitlab: update memory but keep CPU the same
2024-02-12 16:41:56 -06:00
Massimiliano Culpo
cb3c014a43 audit: detect self-referential depends_on (#42456) 2024-02-12 21:56:06 +01:00
Victoria Cherkas
2a01e9679a Adds latest releases of eccodes/eckit/metkit (#42618) 2024-02-12 13:41:15 -07:00
Harmen Stoppels
519deac544 Fix multiple issues with Python in views (#42601)
This fixes bugs, performance issues, and removes no longer necessary code.

Short version:

1. Creating views from Python extensions would error if the Spack `opt` dir itself was in some symlinked directory. Use of `realpath` would expand those, and keying into `merge_map` would fail.
2. Creating views from Python extensions (and Python itself, potentially) could fail if the `bin/` dir contains symlinks pointing outside the package prefix -- Spack keyed into `merge_map[target_of_symlink]` incorrectly.
3. In the `python` package the `remove_files_from_view` function was broken after a breaking API change two years ago (#24355). However, the entire function body was redundant anyways, so solved it by removing it.
4. Notions of "global view" (i.e. python extensions being linked into Python's own prefix instead of into a view) are completely outdated, and removed. It used to be supported but was removed years ago.
5. Views for Python extension would _always_ copy non-symlinks in `./bin/*`, which is a big mistake, since all we care about is rewriting shebangs of scripts; we don't want to copy binaries. Now we first check if the file is executable, and then read two bytes to check if it has a shebang, and only if so, copy the entire file and patch up shebangs.

The bug fixes for (1) and (2) basically consist of getting rid of `realpath` entirely, and instead simply keep track of file identifiers of files that are copied/modified in the view. Only after patching up regular files do we iterate over symlinks and check if they target one of those. If so, retarget it to the modified file in the view.
2024-02-12 19:52:52 +01:00
John Biddiscombe
c33a8dc223 h5hut: fix to work with latest hdf5 (H5_USE_110_API) (#42607) 2024-02-12 04:33:39 -07:00
Richard Berger
742e2fc7e4 caliper: allow newer papi to be used (#42501) 2024-02-12 11:53:57 +01:00
Jean Luca Bez
e90b616428 pdc: add v0.4 (#42508) 2024-02-12 11:52:54 +01:00
Brian Vanderwende
3d037c5150 nco: add v5.1.9 (#42512) 2024-02-12 11:46:07 +01:00
Ivan Maidanski
fd60e97784 bdw-gc: add v8.2.6 (#42524) 2024-02-12 11:38:12 +01:00
Thomas Madlener
c2cda6bc48 lcio: add v2.21 (#42514) 2024-02-12 11:37:10 +01:00
Thomas Madlener
1cd95a4bb7 podio: add 0.99 pre-release version and deprecate all older versions (#42526) 2024-02-12 11:36:30 +01:00
James Beal
727eaf3c82 samtools: add v1.19.2 (#42550)
Co-authored-by: James Beal <jb23@sanger.ac.uk>
2024-02-12 11:09:05 +01:00
Thomas Madlener
d014671bcb edm4hep: add v0.10.5, deprecate broken v0.10.4 (#42561) 2024-02-12 11:01:44 +01:00
Caetano Melone
4edb073a20 litestream: add new package (#42565) 2024-02-12 10:58:12 +01:00
G-Ragghianti
5d2b9514db Fixed papi release tar hash due to rebuild of tar file (#42567) 2024-02-12 10:57:12 +01:00
Ken Raffenetti
2491855678 mpich: Fix +vci variant for newer releases (#42570)
--with-ch4-max-vcis=default is no longer accepted by MPICH configure
since the 4.1 release. Just omit the option from the +vci variant, since
configure will select the default value in its absence.
2024-02-12 10:55:57 +01:00
Mark Grondona
b23038db53 flux-core: drop czmq,jsonschema requirements for recent versions (#42560)
Problem: Older versions of the flux-core package require czmq and
jsonschema, but these dependencies have been dropped in recent
versions.

Add `when=` arguments to drop these requirements for the appropriate
versions of flux-core.
2024-02-12 10:55:00 +01:00
Julien Cortial
6d68dcf13c libuv: update compiler requirements (#42576) 2024-02-12 10:54:10 +01:00
Adam J. Stewart
fbf6db035b py-lightning: add v2.2.0 (#42577) 2024-02-12 10:49:17 +01:00
Richard Berger
1a43fc1e62 lammps: add v20240207 (#42587)
* lammps: correct license

LAMMPS has always been GPL-2.0 only. The clarification was made here:
9a8ac23663
2024-02-12 10:46:05 +01:00
Mikael Simberg
8210853276 pika: add v0.22.2 (#42617) 2024-02-12 02:38:50 -07:00
Sebastian Ehlert
e8bf6ab352 orca: added new versions (#38822) 2024-02-12 10:20:36 +01:00
Sinan
0aa91b99ed freexl: add v2.0.0 (#42574)
Co-authored-by: sbulut <sbulut@3vgeomatics.com>
2024-02-12 10:16:31 +01:00
kinagaki-fj
d93b035f14 xmlf90: add version and fix for fujitsu compiler (#42305) 2024-02-12 10:14:11 +01:00
kinagaki-fj
adb0757f72 blitz: fix for fujitsu compiler (#42307)
Co-authored-by: m-shunji <m.shunji@fujitsu.com>
2024-02-12 10:11:26 +01:00
George Malerbo
2369a8f4e5 raylib: add new package (#42594) 2024-02-12 10:07:33 +01:00
Alec Scott
a6844d26e0 coretuils: add v9.4 (#42596) 2024-02-12 10:03:00 +01:00
Alec Scott
95c663224d curl: add v8.6.0 (#42597) 2024-02-12 10:02:26 +01:00
Brian Vanderwende
6dc01f0d94 Fix for tirpc variable in libdap4 (#42511) 2024-02-12 10:01:53 +01:00
Adam J. Stewart
2d3eeecef8 Sleef: fix build on macOS arm64, add test support (#42583) 2024-02-12 09:59:12 +01:00
Alec Scott
167a168a63 bfs: add v3.1 (#42595) 2024-02-12 09:54:45 +01:00
Elsa Gonsiorowski, PhD
10af235895 lwgrp: add autotools deps when building @main (#42564) 2024-02-12 09:40:52 +01:00
Cyrus Harrison
5d6dec5a5c conduit: add v0.9.1 (#42510) 2024-02-12 09:30:04 +01:00
Massimiliano Culpo
6ae0696e2f sirius: fix self-referential dependencies (#42552) 2024-02-12 09:21:14 +01:00
Massimiliano Culpo
9688e91a6b spla: fix self-referential dependencies (#42553) 2024-02-12 09:15:27 +01:00
Alec Scott
c026943c8e glab: add v1.36.0 (#42610) 2024-02-12 09:14:20 +01:00
Alec Scott
662ab2d4c5 xz: add v5.4.6 & v5.4.5 (#42612) 2024-02-12 09:13:49 +01:00
Alec Scott
722b00bbfb go: add v1.22.0 (#42611) 2024-02-12 09:12:31 +01:00
Alberto Invernizzi
6dbb56ba36 nvpl-lapack: fix versioning and add missing dependency (#42599)
* fix wrong versioning
use doc version and not the one extrapolated from the path (i.e. 0.2.0.1)

* nvpl-lapack requires nvpl-blas
propagate matching variants to nvpl-blas dependency

Co-authored-by: albestro <albestro@users.noreply.github.com>
2024-02-12 09:11:47 +01:00
Dave Keeshan
2e5bdd2679 yosys: add v0.38 (#42616) 2024-02-12 09:08:03 +01:00
Maciej Wójcik
97ec167452 py-immutables: fix building, add new versions (#42530)
* py-immutables: fix building, add new versions

* Explain constraint

* py-immutables: Wrap line
2024-02-11 16:07:54 -07:00
Garth N. Wells
2b8dcc0f57 fenicsx: deprecate older versions (#42613)
* Deprecate FEniCSx packages

* Format files

* Simplification
2024-02-11 15:57:39 -07:00
Maciej Wójcik
6312658888 py-configargparse: add new versions (#42533)
* py-configargparse: add new versions

* py-configargparse: Remove unnecessary constraint
2024-02-11 15:52:37 -07:00
Mikhail Titov
213818ffb5 Update package versions: RADICAL-Cybertools (RE, RG, RP, RS, RU) (#41997)
* rct: update packages (RE, RG, RP, RS, RU) with new versions

* rct: updated style

* rct: 1.46 release

* rct: RP 1.46.1 (hotfix applied)

* rct: deprecated old versions

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

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

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

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

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

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

* rct: brought back dependencies for deprecated versions

* rct: RP hotfix release 1.46.2

* rct: new stack release 1.47.0

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-11 15:09:20 -06:00
Alex Leute
aed5d1a88d py-gpy: added +plotting variant (#42588)
Co-authored-by: Alex C Leute <aclrc@rit.edu>
2024-02-11 14:58:23 -06:00
Stephen Hudson
8b94128625 libEnsemble: add v1.2.0 (#42591) 2024-02-11 14:57:04 -06:00
Maciej Wójcik
4d91fbdf0f py-versioneer-518: add a workaround (#42534) 2024-02-11 14:48:29 -06:00
George Young
d7aa9d38fa py-deeptools: add 3.5.3 (#39951)
* py-deeptools: add 3.5.3

* switching tp pypi

* removing patch for tests

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-11 14:31:46 -06:00
Eric Berquist
b3369ac669 Add pre-commit 3.6.0 (#42404)
* Add pre-commit 3.6.0

* pre-commit 3.6.0 drops support for Python <3.9
2024-02-11 14:29:26 -06:00
George Young
e68fde6f4e py-ucsf-pyem: updating to commit e92cd4d (#42428)
* py-ucsf-pyem: updating to commit e92cd4d

* py-pyfftw: updating to @0.13:1

* py-ucsf-pyem: correcting install of scripts

* Upper limits

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

* Upper limits

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

* updates from github review

---------

Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-11 13:01:58 -06:00
Dani
f0e49a54c0 new builtin package: py-simpletraj (#42460)
* new builtin package: py-simpletraj

* long line splitted in two for the style test

* removed trailing whitespace for the style test
2024-02-11 12:56:31 -06:00
Robert Cohn
2c67571726 [oneapi]: make headers match oneapi vars.sh (#42614)
* [oneapi]: make headers match oneapi vars.sh

* update

* update
2024-02-11 08:23:53 -08:00
Maciej Wójcik
fae6d3780f gromacs: add new version (#42609) 2024-02-10 08:19:12 -07:00
Howard Pritchard
34ba8e9527 openmpi: add 5.0.2 (#42568)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2024-02-10 14:36:18 +01:00
Massimiliano Culpo
686d1bc1ea mfem: fix self-referential dependencies (#42487) 2024-02-10 13:08:13 +01:00
snehring
9b42f9ab18 viennarna package: add v2.6.4 (#42606) 2024-02-10 02:38:03 -07:00
Alec Scott
1d508e1be3 fzf package: add v0.46.1 (#42603)
* fzf: add v0.46.1
* Standardize vim plugin install
2024-02-09 16:29:20 -08:00
Alec Scott
41f735a4ee gh package: add v2.43.1 (#42604)
* gh: add v2.43.1
* gh: fix go dependency versions
2024-02-09 16:28:06 -08:00
James Taliaferro
e9e6eb613b libsixel: add new package (#40031)
* add new package libsixel

* reorder to group variants and dependencies together

* Switch to using source from fork

The original developer of libsixel, Hayaki Saito (@saitoha), disappeared
in early 2020 and has not updated the repository or been seen since.
However, a fork of the project has been created at libsixel/libsixel,
and that fork has been getting much more regular updates. In this commit
I switch the package to using the better-maintained, now apparently
canonical fork of the project.

That project switched the build system from autotools to Meson, so much
of the build arguments code needed to be rewritten. The newest official
release also contained an error in meson.build which would break on
newer versions of Meson. That error only applied to the libjpeg and
libpng variants, though, so I switched the default to use libgd which
has broader format support anyway.

* blacken

* broke description into multiple lines

* allow libjpeg, etc to be loaded automatically
2024-02-09 12:09:10 -08:00
Chris Marsh
6dd19594ab Resolve unzip build failure with %oneapi (#42593)
* apply patch to all compilers as per spack/issues/42007

* [@spackbot] updating style on behalf of Chrismarsh

* Resolve flake8 style issue from spackbot

* fix flake8 trailing whitespace

---------

Co-authored-by: Chrismarsh <Chrismarsh@users.noreply.github.com>
2024-02-09 12:04:05 -08:00
Harmen Stoppels
4f0a8fce52 hooks: remove 7 unused hooks (#42575)
These 7 hooks were not used.

- Six of them related to install phases were unused after `spack`
  `monitor` was removed, and the code seems to have bit rotten as there
  were reports they were not (always?) triggered when they should.
- The post environment one was made redundant after spack install for
  environment started following the common code path for generating
  module files in #42147.

It should not be a breaking change to remove, since users cannot define
hooks in extensions, they would have to fork Spack.

If we ever _were_ to make those hooks extendable outside of core Spack,
it would also be better to start with fewer rather than more, cause
everything you expose gets relied upon...

Removing those also allows us to rethink what hooks we really need, and
in particular it seems like we need a hook that runs post install also when
the spec is inserted into the database.
2024-02-09 20:52:09 +01:00
Massimiliano Culpo
7ff3b17f14 ASP-based solver: fix issue with conditional requirements and trigger conditions (#42566)
The lack of a rule to avoid enforcing requirements on multi-valued variants, when the condition activating the environment was not met, resulted in multiple optimal solutions. The fix is to prevent imposing a requirement if the when= rule activating it is not met.
2024-02-09 20:50:04 +01:00
Samuel Li
f71669175f sperr: add v0.8.1 (#42506) 2024-02-09 18:27:27 +01:00
simonLeary42
27b72b7691 Allow + in module file names (#41999) 2024-02-09 15:50:05 +01:00
Massimiliano Culpo
c5e0270ef0 dd4hep: remove self-referential dependencies (#42483)
This shouldn't be an issue, but express the self-reference
with a conflict.
2024-02-09 15:13:00 +01:00
Harmen Stoppels
c59d2d5b1c docs: overhaul module_file_support.rst (#42585)
The section was highly outdated as it referred to old defaults, and
failed to mention `hide_implicits: true`.

This commit restructures it, moves some deeply nested sections a level
up, and promotes `hide_implicits: true` + `autoload: direct` before
talking about `exclude`.
2024-02-09 13:32:43 +01:00
Paul R. C. Kent
a832d31ccd llvm: add 17.0.5, 17.0.6 (#42571) 2024-02-09 11:29:12 +01:00
Veselin Dobrev
47a8bde4da Add the latest OpenSSL versions: 3.2.1, 3.1.5, 3.0.13 (#42581) 2024-02-09 10:30:01 +01:00
kwryankrattiger
13050a9fb3 CI: Add ability to enable and disable stacks (#42255)
It is useful to enable/disable stacks in order to handle turning
specific stacks on/off based on runner availability, stack stability,
testing requirements, etc.

The disabled stack list takes precedence over the enable stack list. The
assumption is that stacks that are disabled are so due to some
functionality missing or broken for that stack.

The enable stack list implicitly disables all stacks not listed in the
enable list.
2024-02-08 15:26:32 -06:00
Massimiliano Culpo
753e8b53d3 xyce: fix self-referential dependencies (#42557) 2024-02-08 21:04:58 +01:00
Robert Underwood
af49f81ec5 libice fix for older glibc (#42586) 2024-02-08 19:52:37 +01:00
Massimiliano Culpo
db1a7406ca pastix: fix self-referential dependencies (#42546) 2024-02-08 16:27:01 +01:00
Adam J. Stewart
ecc9145d2c spack help --spec: add @= notation (#42584) 2024-02-08 15:57:44 +01:00
Rocco Meli
7090983c67 cp2k: patch for compilation with RelWithDebInfo (#42563) 2024-02-08 15:42:43 +01:00
Sergey Kosukhin
09fdea959f openmpi: add patch fixing MPI_MIN for unsigned long (#32392) 2024-02-08 15:41:46 +01:00
Massimiliano Culpo
e419e4ca93 q-e-sirius: fix self-referential dependencies (#42549) 2024-02-08 12:44:00 +01:00
Massimiliano Culpo
9e8f6e8d54 mpich: fix self-referential dependencies (#42527) 2024-02-08 09:34:54 +01:00
Massimiliano Culpo
753d69856a suite-sparse: fix self-referential dependencies (#42556) 2024-02-08 09:34:26 +01:00
Massimiliano Culpo
6d28caefc7 grib-util: fix self-referential dependencies (#42558) 2024-02-08 09:33:38 +01:00
John W. Parent
7b9eac02ff Windows registry: improve search efficiency & error reporting (#41720)
* Registry queries can fail due to simultaneous access from other
  processes. Wrap some of these accesses and retry when this may
  be the cause (the generated exceptions don't allow pinpointing
  this as the reason, but we add logic to identify cases which
  are definitely unrecoverable, and retry if it is not one of
  these).
* Add make recursion optioal for most registry search functions;
  disable recursive search in case where it was originally always
  recursive.
2024-02-07 13:26:07 -08:00
Massimiliano Culpo
138f8ba6e2 strumpack: fix self-referential dependencies (#42554) 2024-02-07 19:00:26 +01:00
Jonathon Anderson
046f9e89a1 hpctoolkit: Add dependency on xxhash for @develop (#42513) 2024-02-07 18:05:08 +01:00
Kevin Huck
2cca64d01d apex: add new release, deprecate old options, remove boost (#42538) 2024-02-07 17:17:04 +01:00
Alberto Invernizzi
9aed13adb9 nvpl-blas and nvpl-lapack: new packages for NVidia performance libraries (#41775)
Co-authored-by: Raffaele Solcà <rasolca@cscs.ch>
2024-02-07 17:01:11 +01:00
Massimiliano Culpo
85b6c344bd r: fix self-referential dependencies (#42551) 2024-02-07 16:55:28 +01:00
Massimiliano Culpo
9359c9b9db plink2: fix self-referential dependencies (#42547) 2024-02-07 16:55:09 +01:00
Massimiliano Culpo
d43f62cc5f orc: fix self-referential dependencies (#42542) 2024-02-07 16:54:37 +01:00
Massimiliano Culpo
a30d4612f5 oce: fix self-referential dependencies (#42540) 2024-02-07 16:54:14 +01:00
Massimiliano Culpo
e32009a7e3 openscenegraph: fix self-referential dependencies (#42541) 2024-02-07 16:53:44 +01:00
Massimiliano Culpo
b0f3489d68 py-*: fix self-referential dependencies (#42548) 2024-02-07 16:52:26 +01:00
simonLeary42
9099e4c233 libcatalyst cmake_minimum_required (#42532)
d469357740
2024-02-07 16:10:46 +01:00
Vanessasaurus
a1b895e547 flux-core: add v0.59.0 (#42536)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-02-07 16:10:05 +01:00
Vanessasaurus
df1ff0affa flux-pmix: add v0.5.0 (#42537)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2024-02-07 16:09:34 +01:00
George Young
95e828f3d8 s4pred: add new package (#42520) 2024-02-07 16:05:14 +01:00
Rocco Meli
a28c6caac0 dbcsr: examples variant (#42543) 2024-02-07 15:54:19 +01:00
Rocco Meli
514260d8cb cp2k+mpi requires dbcsr+mpi (#42545) 2024-02-07 15:35:20 +01:00
Massimiliano Culpo
642ec1918f julia: fix self-referential dependencies (#42486) 2024-02-07 08:46:03 +01:00
Massimiliano Culpo
bdae9f776b netcdf-c: fix self-referential dependencies (#42528) 2024-02-07 08:22:56 +01:00
Massimiliano Culpo
5c86a3cca2 lammps: fix self-referential dependencies (#42521) 2024-02-07 08:22:11 +01:00
Massimiliano Culpo
ea53008604 molgw: fix self-referential dependencies (#42523) 2024-02-06 19:01:44 +01:00
Massimiliano Culpo
01ea8f46e7 ldak: fix self-referential dependencies (#42522) 2024-02-06 17:45:40 +01:00
jalcaraz
ff1e700b56 TAU: Added new test for other variants. (#42503)
Now it tests all GPUs, syscall and python.
2024-02-06 08:37:22 -08:00
renjithravindrankannath
5efa723289 mesa: updating llvm dependency for version 23 (#42481) 2024-02-06 14:53:31 +01:00
Massimiliano Culpo
4985f87a52 dbcsr: fix self-referential dependencies (#42482) 2024-02-06 14:41:27 +01:00
Massimiliano Culpo
ae000f963c hpx: remove self-referential dependencies (#42485)
This shouldn't be an issue, but avoid self references
on "^asio".
2024-02-06 13:37:40 +01:00
Olivier Cessenat
0960f691a1 keepassxc: new version 2.7.6 (#42478)
AUTOTYPE is set by default in the 2.7.6 release, it was not previously.
2024-02-05 18:24:42 +01:00
Mosè Giordano
713b19cac7 py-pythran: apply patch to fix compilation with GCC 13 (#42490)
* py-pythran: apply patch to fix compilation with GCC 13

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

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-05 09:08:41 -07:00
Thomas Madlener
05f1f07e51 edm4hep: add v0.10.4 (#42488) 2024-02-05 07:43:51 -07:00
Mosè Giordano
955a01dfa4 hh-suite: apply patch to fix compilation with GCC 13 (#42489)
This fixes errors like
```
     294    In file included from /build_stage/spack-stage-hh-suite-3.3.0-4kkv3zqhcadpubeo63l73xq3shr7gjmh/spack-src/src/a3m_compress.cpp:8:
  >> 295    /build_stage/spack-stage-hh-suite-3.3.0-4kkv3zqhcadpubeo63l73xq3shr7gjmh/spack-src/src/a3m_compress.h:37:37: error: 'uint16_t' has not been declared
     296       37 |   void writeU16(std::ostream& file, uint16_t);
     297          |                                     ^~~~~~~~
  >> 298    /build_stage/spack-stage-hh-suite-3.3.0-4kkv3zqhcadpubeo63l73xq3shr7gjmh/spack-src/src/a3m_compress.h:38:28: error: 'uint16_t' has not been declared
     299       38 |   void readU16(char** ptr, uint16_t &result);
     300          |                            ^~~~~~~~
  >> 301    /build_stage/spack-stage-hh-suite-3.3.0-4kkv3zqhcadpubeo63l73xq3shr7gjmh/spack-src/src/a3m_compress.h:40:37: error: 'uint32_t' has not been declared
     302       40 |   void writeU32(std::ostream& file, uint32_t);
     303          |                                     ^~~~~~~~
  >> 304    /build_stage/spack-stage-hh-suite-3.3.0-4kkv3zqhcadpubeo63l73xq3shr7gjmh/spack-src/src/a3m_compress.h:41:27: error: 'uint32_t' has not been declared
     305       41 |   void readU32(char**ptr, uint32_t &result);
     306          |                           ^~~~~~~~
```
2024-02-05 07:38:49 -07:00
Massimiliano Culpo
928ee7569c ecp-data-vis-sdk: remove self-referential dependencies (#42484)
This shouldn't be an issue, but express this limitation
with a conflict.
2024-02-05 15:17:46 +01:00
George Young
8190903821 motioncor2: add v1.6.4 (#42380)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-05 14:32:38 +01:00
George Young
473347df41 kentutils: update to @459, update download location & deps (#42448)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-05 04:23:33 -07:00
Adam J. Stewart
1ef52d7c8e py-pytest: add v8.0.0 (#42344) 2024-02-05 12:16:58 +01:00
Tom Payerle
561fe13bad cgal: add v5.3.2 (#42378) 2024-02-05 12:08:27 +01:00
George Young
c15ed38cef star: updating to 2.7.11a (#42011)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-05 12:06:01 +01:00
David Boehme
fa4568d9c9 kripke: add adiak dependency with Caliper enabled (#42414) 2024-02-05 11:17:24 +01:00
Nathalie Furmento
ef4f78a6cd starpu: add release 1.4.4 (#42446) 2024-02-05 11:12:50 +01:00
Adam J. Stewart
da36d069db py-lightly: fix conflict definition (#42449) 2024-02-05 11:11:23 +01:00
Cameron Rutherford
6ff3e17a7d hiop: require RAJA when cuda is enabled (#42407) 2024-02-05 11:04:08 +01:00
snehring
bb200be57d sentieon-genomics: add new version 202308.02 (#42465) 2024-02-05 11:01:00 +01:00
Olivier Cessenat
a238563fdb mpfr: add v4.2.1 (#42479) 2024-02-05 02:59:22 -07:00
Adam J. Stewart
bfc6f1d2a9 py-lightning: add v2.1.4 (#42468) 2024-02-05 10:59:00 +01:00
Olivier Cessenat
99b8a08366 stripack: sets the licence SPDX (#42473) 2024-02-05 10:45:23 +01:00
Olivier Cessenat
dba5ae939d visit-ffp and visit-unv: sets the licence SPDX (#42474) 2024-02-05 10:42:07 +01:00
Olivier Cessenat
7a4aa823d1 ngspice: new version 42 (#42475) 2024-02-05 10:41:06 +01:00
Olivier Cessenat
89e387cb67 latex2html: new version 2024 (#42476) 2024-02-05 10:38:24 +01:00
Olivier Cessenat
19c46de69f nlopt: new version 2.7.1 (#42477) 2024-02-05 10:27:01 +01:00
Michael Kuhn
e35fbfab77 gtkplus: add v3.24.41 and fix CUPS problems (#42480)
Fixes #42297
2024-02-05 10:23:57 +01:00
Massimiliano Culpo
478203dc68 asio: remove self-referential dependencies (#42469)
These shouldn't be an issue, but they can be expressed
in terms of variants on the package.
2024-02-05 10:10:58 +01:00
Massimiliano Culpo
5713ffd143 converge: fix self-referential dependencies (#42471) 2024-02-05 10:03:20 +01:00
Elsa Gonsiorowski, PhD
1711b6dee1 scr: fix @develop dependency versions (#42379) 2024-02-05 09:15:19 +01:00
Massimiliano Culpo
7fbd4afaaa cp2k: fix self-referential dependencies (#42472) 2024-02-05 09:12:47 +01:00
Massimiliano Culpo
f396dbcb4f berkeleygw: fix self-referential dependencies (#42470)
Also, remove a couple of duplicate directives
2024-02-05 09:04:32 +01:00
David Guibert
57fe3430fd py-pymummer: init (#42412)
* py-pymummer: init

* Update py-pymummer copyright date

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

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-02-04 06:27:46 -07:00
snehring
8428bef040 py-ete3: adding version 3.1.3 (#42462) 2024-02-04 06:12:19 -06:00
George Young
47c91c9163 ldsc: new package @2.0.1 (#42430)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-04 06:06:45 -06:00
David Guibert
6c57360eac py-pyfastaq: init (#42413) 2024-02-04 05:50:44 -06:00
George Young
624292d685 sicer2: new Python package @1.0.3 (#42383)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-04 05:17:27 -06:00
Mike Renfro
55ecc47dce fix ipyrad numpy dependencies (#42098)
* fix ipyrad numpy depedencies

ipyrad versions through 0.9.90 use np.int, which is deprecated in numpy 1.20.

* fix whitespace

* Correct numpy dependency restrictions
2024-02-04 05:16:22 -06:00
Massimiliano Culpo
f2125882c5 flecsi: fix constraints on mpi providers (#42447) 2024-02-03 12:11:03 +01:00
Massimiliano Culpo
d23cb39a3f quantum-espresso: fix self-referential dependencies (#42458) 2024-02-03 12:09:42 +01:00
Mosè Giordano
7f7d5b899a py-alphafold: use permanent link for openmm patch (#42461) 2024-02-03 11:07:16 +01:00
Harmen Stoppels
c44e854d05 Environment views: dependents before dependencies, resolve identical file conflicts (#42350)
Fix two separate problems:

1. We want to always visit parents before children while creating views
   (when it comes to ignoring conflicts, the first instance generated in
   the view is chosen, and we want the parent instance to have precedence).
   Our preorder traversal does not guarantee that, but our topological-
   order traversal does.
2. For copy style views with packages x depending on y, where
   <x-prefix>/foo is a symlink to <y-prefix>/foo, we want to guarantee
   that:
   * A conflict is not registered
   * <y-prefix>/foo is chosen (otherwise, the "foo" symlink would become
     self-referential if relocated relative to the view root)

   Note that
   * This is an exception to [1] (in this case the dependency instance
     overrides the dependent)
   * Prior to this change, if "foo" was ignored as a conflict, it was
     possible to create this self-referential symlink

Add tests for each of these cases
2024-02-03 11:05:45 +01:00
John W. Parent
8fa8dbc269 Sqlite package: export api symbols on Windows (#42299)
* Sqlite requires the user to provide a command line arg (DYNAMIC_SHELL)
  to export shared symbols to import lib from .def
* Add other options recommended by Sqlite docs: 
  https://github.com/sqlite/sqlite/blob/master/doc/compile-for-windows.md
  * Some of these options mean we can restore variants that were
    disabled for Windows (fts, functions, rtree).
2024-02-02 13:27:53 -08:00
jalcaraz
e59303d4ff tau: update test functions (#42432)
* Updated with generic test functions

* Added level_zero test

As the compiler is not installed by TAU, it should be loaded first and run with --dirty. Will check if there is a way to make it work without --dirty.

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

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

---------

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-02 11:12:24 -08:00
Massimiliano Culpo
494d943a24 ascent: fix self-referential dependencies (#42457) 2024-02-02 19:25:56 +01:00
kwryankrattiger
d227da5554 CI: Call timing script in after_script (#42166)
The main script body is over-written for power. Putting thet timing
aggregation in the after script allows it to be called on all of the
current pipelines.
2024-02-02 12:02:46 -06:00
Olivier Cessenat
714590426f astyle: new version 4.1.11 and build using cmake (#42390)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-02-02 18:58:27 +01:00
Massimiliano Culpo
9ffe179934 acts: fix self-referential dependencies (#42455) 2024-02-02 18:34:34 +01:00
dependabot[bot]
9c4e44a0ad build(deps): bump codecov/codecov-action from 4.0.0 to 4.0.1 (#42439)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](f30e4959ba...e0b68c6749)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 12:20:29 +01:00
dependabot[bot]
1ef69a8bfb build(deps): bump python-levenshtein in /lib/spack/docs (#42440)
Bumps [python-levenshtein](https://github.com/rapidfuzz/python-Levenshtein) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/rapidfuzz/python-Levenshtein/releases)
- [Changelog](https://github.com/rapidfuzz/python-Levenshtein/blob/main/HISTORY.md)
- [Commits](https://github.com/rapidfuzz/python-Levenshtein/compare/v0.23.0...v0.24.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 12:20:02 +01:00
Massimiliano Culpo
55db090206 Extract low-level clingo wrappers from spack.solver.asp (#42429) 2024-02-02 12:19:38 +01:00
Matthew Whitlock
f8ce84860c Update packages_yaml.rst (#42438)
Fix an incorrect example.
2024-02-02 11:05:26 +01:00
Mosè Giordano
795360fe48 openmm: Apply patch use FindCUDAToolkit (#42437) 2024-02-02 11:04:03 +01:00
Axel Huebl
3d3d075496 WarpX: Disable CCache (#42434)
https://github.com/ECP-WarpX/WarpX/pull/4637
2024-02-02 11:02:00 +01:00
Frédéric Simonis
35630c219d preCICE: add v3.0.0 (#42426)
* preCICE: add version 3.0.0
* preCICE: add version conflict for libxml2 2.12.x
2024-02-01 22:56:18 -07:00
stefanfechter
5ef9bb7752 Bugfix: fix build of xforms (#35391)
This additional patch fixes the build of the now unmaintained library
xforms.
2024-02-01 13:07:57 -08:00
kjrstory
5bd5a219a6 Add algorithmic differentiation packages for SU2 (#39975)
* Add algorithmic differentiation packages for SU2
* Simplify checking boolean variants
* spack prefix and spec satisfies methos fix
* spelling fix
* style fix
2024-02-01 13:01:35 -08:00
fpruvost
c1450d26ff Add new package Qrmumps (#42393) 2024-02-01 13:00:14 -08:00
Weiqun Zhang
10d826597a amrex: add v24.02 (#42431) 2024-02-01 12:23:51 -07:00
Adam J. Stewart
00cbcd5dbc py-lightly: add v1.4.25 (#42421) 2024-02-01 11:54:01 -07:00
George Young
6bd8fda597 foldseek: new package @8 (#42422)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2024-02-01 11:33:28 -07:00
Rémi Lacroix
8b88255b43 pv: Add version 1.8.5. (#42419)
Switch to "tar.gz" source packages as the "tar.bz2" archives are not available for newer versions.
2024-02-01 09:54:53 -08:00
Rémi Lacroix
bcbd78cea9 ncdu: Add version 1.19 (#42420) 2024-02-01 09:49:57 -08:00
Adam J. Stewart
22ad28bb17 Python: add v3.12.1 (#42397) 2024-02-01 07:43:14 -07:00
Alberto Invernizzi
74bd8a9cf7 neovim: be more specific with lua dependencies (#42401) 2024-02-01 14:11:49 +01:00
Adam J. Stewart
023a6be67d Update PyTorch ecosystem (#42394) 2024-02-01 06:42:13 -06:00
Harmen Stoppels
922a1983f3 docs: git version section title + highlight issues (#42398)
* basic_usage: section title for git versions

* improve highlighting by using a comment instead of invalid syntax
2024-02-01 09:46:17 +01:00
Massimiliano Culpo
2758fc7e14 Remove caching in generated Dockerfiles (#42405) 2024-02-01 09:22:52 +01:00
dependabot[bot]
3541fcae01 build(deps): bump docker/metadata-action from 5.5.0 to 5.5.1 (#42416)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.5.0 to 5.5.1.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](dbef88086f...8e5442c4ef)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 09:14:31 +01:00
dependabot[bot]
eea06de6df build(deps): bump codecov/codecov-action from 3.1.6 to 4.0.0 (#42415)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.6 to 4.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](ab904c41d6...f30e4959ba)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 09:13:52 +01:00
Alberto Invernizzi
29658eddcc Lua: better specify providers in LuaPackage base class (#42392) 2024-02-01 08:57:12 +01:00
Tamara Dahlgren
2fc0d05a55 Environments: Add support for including views (#42250)
* Environments: Add support for including views (take 2)

* schema type hint fixes
2024-02-01 10:07:16 +09:00
Edward Hartnett
faf64f1a26 g2c: add v1.8.0 (#40761)
includes variant to build with future API for v2
2024-02-01 09:28:55 +09:00
Harmen Stoppels
d340523d68 jq: 1.7.1 (#42409) 2024-01-31 15:49:44 -08:00
Dave Sweeris
089fa12ff8 Update OpenSubdiv spec (#42381)
* Update package.py
   Add support for OpenSubdiv 3.5.x
* Fixed Dependencies
   I was getting errors about cmake not being able to find `xf86vm`, and adding a dependency on `libxxf86vm` fixes it.
2024-01-31 15:34:47 -08:00
Julius Plehn
d9528819a3 Adds nvhpc 24.1 (#42388) 2024-01-31 13:40:33 -08:00
Ben Wibking
e3d5ca2997 visit: set minimum silo version to 4.11 (#42072) 2024-01-31 22:05:17 +01:00
Sebastian Grimberg
8fc76ab325 Update recipe for Palace v0.12.0 (#42400) 2024-01-31 12:57:03 -08:00
Hector Martinez-Seara
e77678bd82 kim-api: added paths for bash/zsh completion (#31691)
Co-authored-by: Hector Mtz-Seara <hector@gmail.com>
Co-authored-by: Ryan S. Elliott <relliott@umn.edu>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: hseara <hseara@users.noreply.github.com>
2024-01-31 12:42:59 -07:00
Richard Berger
dafd8dbe87 Add sol2 package (#42402) 2024-01-31 12:09:07 -07:00
Chris White
5034919d23 add new release versions (#42362) 2024-01-31 10:58:07 -08:00
Harmen Stoppels
2bcfb72d38 environment/view: small cleanup (#42395) 2024-01-31 17:22:20 +01:00
Harmen Stoppels
f27bff81ba spack reproduce-build: accept URLs from web interface (#42261)
Sometimes the logs are too long and the copy & paste command is not
shown. In that case I'd like to just copy the failing GitLab job URL in
my browser to `spack reproduce-build <url>`.
2024-01-31 15:58:51 +01:00
Massimiliano Culpo
5c49bb45c7 ASP-based solver: decouple setup phase from clingo.backend (#41952)
Currently, the `SpackSolverSetup` and the `PyclingoDriver` are more coupled than necessary:
1. The driver object needs a setup object to be injected during a solve, 
2. And the setup object will get a reference back to the driver

This design is necessary because we use the low-level `clingo.backend` interface to setup our problem. This interface though is meant to bypass the grounder and add symbols directly in the grounded table, which is a feature we don't currently use.

The PR simplifies the encoding by having the setup object returning the problem-specific facts / rules as a list of strings, and the driver ingesting them using the [clingo.Control.add](https://potassco.org/clingo/python-api/5.6/clingo/control.html#clingo.control.Control.add) method. This removes any use of the low level interface.

Using this encoding makes it easy to hash the output of the setup phase, since it is returned as a string.
2024-01-31 15:37:59 +01:00
Alex Richert
97fb9565ee py-nbconvert: avoid install-time downloads (#42024)
* py-nbconvert: avoid install-time downloads

* install css files as resources for py-nbconvert

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

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

* Update package.py

* py-nbconvert: update dependencies for 7.14.1

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

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

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

* Update resources & remove style.min.css file

* Update package.py

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-31 08:28:41 -06:00
Alberto Invernizzi
72eaca23fe environments: develop paths were not getting expanded (#34986) 2024-01-31 15:18:25 +01:00
kwryankrattiger
1f11b3844a CI: Add OIDC capability for deprecated CI (#42371)
This "breaks" the deprecated schema by allowing unknown attributes
to the attributes section of the job types. The breaking change here is
that deprecated stacks will no longer ignore attributes that are unknown
but rather assume the new CI schema behavior of injecting them into the
generated CI configuration. This change is required to secure
authentication in Spack CI.
2024-01-31 15:05:57 +01:00
Rocco Meli
e129a6f47a Add +dlaf variant to cp2k in CI (#42346) 2024-01-31 11:54:45 +01:00
Harmen Stoppels
d983ac35fe ci: bump ghcr.io/spack/linux-ubuntu22.04-x86_64_v2 tag (#42357) 2024-01-31 09:59:03 +01:00
dependabot[bot]
2dcf4f709b build(deps): bump urllib3 from 2.1.0 to 2.2.0 in /lib/spack/docs (#42384)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.1.0...2.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 09:55:26 +01:00
dependabot[bot]
a171fe3565 build(deps): bump codecov/codecov-action from 3.1.5 to 3.1.6 (#42385)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](4fe8c5f003...ab904c41d6)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 09:54:11 +01:00
Jonathon Anderson
c9aeab58e6 hpctoolkit: refine dependencies (#42354)
* Force Dyninst <=12 before @2024.01

* Remove some +pic requirements

* Use virtual tbb dep
2024-01-31 08:27:05 +01:00
Harmen Stoppels
517dac6ff8 compression.py: refactor + bug fix (#42367)
Improve naming, so it's clear file "extensions" are not taken in the
`PurePath(path).suffix` sense as the original function name suggests,
but rather that the files are opened and their magic bytes are
classified.

Add type hints.

Fix a bug where `stream.read(num_bytes)` was run on the compressed
stream instead of the uncompressed stream, which can potentially break
detection of tar.bz2 files.

Ensure that when peeking into streams for magic bytes, they are reset to
their original position upon return.

Use new API in `spack logs`.
2024-01-31 07:59:07 +01:00
jalcaraz
376653ec3d Updated last commit of TAU package with Dyninst test (#42387)
* Updated last commit of TAU package with Dyninst test

* The path to dyninst was missing when loading TAU
2024-01-30 19:07:33 -08:00
Harmen Stoppels
28eea2994f elf: relocate PT_INTERP (#42318)
Relocation of `PT_INTERP` in ELF files already happens to work from long to short path, thanks to generic binary relocation (i.e. find and replace). This PR improves it:

1. Adds logic to grow `PT_INTERP` strings through patchelf (which is only useful if the interpreter and rpath paths are the _only_ paths in the binary that need to be relocated)
2. Makes shrinking `PT_INTERP` cleaner. Before this PR when you would use Spack-built glibc as link dep, and relocate
executables using its dynamic linker, you'd end up with

   ```
   $ file exe
   exe: ELF 64-bit LSD pie executable, ..., interpreter /////////////////////////////////////////////////path/to/glibc/lib/ld-linux.so
   ```

   With this PR you get something sensible:

   ```
   $ file exe
   exe: ELF 64-bit LSD pie executable, ..., interpreter /path/to/glibc/lib/ld-linux.so
   ```

When Spack cannot modify the interpreter or rpath strings in-place, it errors out without modifying the file, and leaves both tasks to patchelf instead.

Also add type hints to `elf.py`.
2024-01-30 22:36:49 +01:00
Frédéric Simonis
6d55caabe8 precice: add release v2.5.1 (#42376) 2024-01-30 12:47:59 -08:00
Benjamin Fovet
d8260907df add gmsh v4.12.2 (#42375) 2024-01-30 12:13:07 -08:00
Wileam Y. Phan
9474f4bb33 gtpin: add versions 3.4 and 3.7 (#42373) 2024-01-30 12:05:43 -08:00
Rémi Lacroix
698b71e2fd autoconf: Fix patches' URLs (#42372) 2024-01-30 11:33:48 -08:00
John W. Parent
749301d133 MSVC: Broken ifx needs new $TMP (#42155)
Certain versions of ifx (the majority of those available) have an issue
where they are not compatible with TMP directories with dot chars
This precludes their use with CMake.
Remap TMP to point to the stage directory rather than whatever the TMP
default is
2024-01-30 10:18:54 -08:00
Massimiliano Culpo
a20c0de6d8 ns-3-dev: rewrite the package to use CMake (#34207) 2024-01-30 17:57:27 +01:00
dependabot[bot]
ad2ae63745 build(deps): bump pytest from 7.4.4 to 8.0.0 in /lib/spack/docs (#42361)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.4 to 8.0.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.4...8.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 08:23:50 -07:00
dependabot[bot]
d56ca4f107 build(deps): bump black from 24.1.0 to 24.1.1 in /lib/spack/docs (#42360)
Bumps [black](https://github.com/psf/black) from 24.1.0 to 24.1.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.1.0...24.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 15:23:42 +00:00
dependabot[bot]
e09c3ddec2 build(deps): bump black in /.github/workflows/style (#42359)
Bumps [black](https://github.com/psf/black) from 24.1.0 to 24.1.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.1.0...24.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 15:23:30 +00:00
Massimiliano Culpo
1882920c97 elsi: cleanup recipe (#42355) 2024-01-30 14:08:10 +01:00
Matthias Wolf
b70cb60b65 py-bluepyefe, py-igor2: new version, new package igor2 (#42191) 2024-01-30 03:29:07 -07:00
Adam J. Stewart
6a1e64f531 py-black: add v24.1.1 (#42343) 2024-01-30 03:14:02 -07:00
Nathalie Furmento
5217b20901 starpu: add release 1.4.3 (#42339) 2024-01-30 03:09:21 -07:00
James Beal
ed37969925 singularityce: add v4.x (#42347)
Co-authored-by: James Beal <jb23@sanger.ac.uk>
2024-01-30 03:08:57 -07:00
Henrik Finsberg
32230e6520 Add fenics development version and ufl-legacy (#42182)
* Add fenics development version and ufl-legacy

* Make sure python and setuptools are added to ufl-legacy and add version 2022.3.0 as well

* Run black and add maintainer to fenics package

* Fix typo

* Use Fiat version 2019.1.0

* Run black

* Add back master branch of fiat

* Remove master from the list of dolfin versions and add one extra line of each deps instead

* Run black

* Do not specify python version in ufl-legacy

* Remove python dependency from ufl-legacy

* Remove python dependency from ffc

* Add special case for master in ffc

* Run black

* Remove master from loop in ffc

* Run black again
2024-01-30 02:49:51 -07:00
Brad Geltz
7a712a11b9 geopm-service: New package and deprecate geopm (#41788)
* geopm: Mark all as deprecated

- This recipe will be removed in a future release.

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* Add py-sphinx-emoji

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* Add py-dasbus

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* py-pygobject: Add v3.46.0

- Previous versions error during build phase.

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* py-sphinx-tabs: Add new versions

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

* Add geopm-service

- Previous geopm package is now 2 packages:
  geopm-service and geopm-runtime.
- The GEOPM service is designed as a systemd/dbus
  service providing a userspace interface to
  privileged hardware telemetry and configurations.
- Installing via spack will enable some userspace
  testing, but generally most users will want to
  install the GEOPM service via the system package
  manager as root to get full functionality.
- This recipe will enable the creation of the fully
  userspace geopm-runtime recipe which will replace
  the old geopm recipe.

Signed-off-by: Brad Geltz <brad.geltz@intel.com>

---------

Signed-off-by: Brad Geltz <brad.geltz@intel.com>
2024-01-30 02:49:33 -07:00
Peter Scheibel
e63d8e6163 "spack logs": print log files for packages (either partially built or installed) (#42202) 2024-01-30 10:42:00 +01:00
Alex Leute
461a9093cd py-textual: Added package py-textual (#42291)
* py-textual: New package py-textual

* py-textual: Depend on py-mdit-py-plugins

* py-textual: Added dependency on python@3.8:3

* py-textual: Added a comment about why there is a dependency on
py-mdit-py-plugins

* py-textual: Ran black

---------

Co-authored-by: Alex C Leute <aclrc@rit.edu>
2024-01-30 03:19:39 -06:00
Caetano Melone
8edb6ff22a py-pytest-aiohttp: add package (#42313)
* add pytest-aiohttp

* black

* py-setuptools -> py-setuptools-scm

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

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-30 03:18:32 -06:00
Massimiliano Culpo
1f44be83af Add a PR template with a reference to spackbot commands (#42349) 2024-01-30 09:43:04 +01:00
Benjamin Fovet
1be078d01d gmsh: add v4.12.0 (#41854)
* disable building gmsh with oce for recent versions

Co-authored-by: Benjamin Fovet <benjamin.fovet@cea.fr>
2024-01-30 08:37:37 +01:00
Cristian Le
c07cde3308 Bump spglib version (#42340) 2024-01-29 16:06:29 -07:00
John W. Parent
dda8b1a5b8 VTK package: improve dependency-detection on Windows (#42300)
VTK struggles to consume some Spack-derived packages on Windows:
Patch VTK to allow a smoother integration

Also add install for examples as they are not part of the install
interface.
2024-01-29 14:42:36 -08:00
John W. Parent
ba45277640 gl2ps package: build only one of shared/static on Windows (#36576)
gl2ps tries to build static and shared libs simultaneously with
the same target name on the generator side. This causes a name
clash issue for Ninja on Windows (where the extension is .lib
in both cases).

Add a variant on Windows to force building only one of shared
or static, and patch the CMake build to enable use of this
variant.
2024-01-29 11:49:55 -08:00
Zack Galbreath
f03ae39fd1 Update GitLab memory requests (#42351)
* gitlab: remove commented-out duplicate entries

* gitlab: reclassify some packages from "huge" to "large"

Our observed max memory usage for these packages is as follows:

hipblas: 7.7G
qt: 6.6G
visit: 9.7G

All of these should fit within a "large" request (currently 12G).

* gitlab: remove pango from list of huge packages

This package is not currently built by any of our CI stacks.

* gitlab: update requests for high memory packages

Refine resource requests for memory-intensive packages based on
max memory usage data.
2024-01-29 19:28:58 +00:00
Arne Becker
62145122be perl-sql-translator: New package (#42319)
- Adds perl-sql-translator and its missing deps:
- Adds perl-import-into
- Adds perl-package-variant
- Adds perl-strictures

Built with build-time tests and comes with a simple run-time test.
2024-01-29 10:36:25 -08:00
Gilles Grospellier
44e33c3eb9 dotnet-core-sdk: Update to version 6.0.25 and add binaries for 'aarch64'. (#41739) 2024-01-29 10:10:58 -08:00
fpruvost
ed5ed3e31e Add fabulous, maphyspp, paddle packages. (#42287) 2024-01-29 10:06:35 -08:00
dependabot[bot]
cc866efba1 build(deps): bump dorny/paths-filter from 2.11.1 to 3.0.0 (#42294)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 2.11.1 to 3.0.0.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](4512585405...0bc4621a31)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 16:38:23 +01:00
Martin Diehl
f550262efb update damask to 3.0.0-beta (#42259) 2024-01-29 09:33:22 -06:00
Harmen Stoppels
890ec8d71c traverse: w/o deptype (#42345)
Add the empty deptype `spack.deptypes.NONE`.

Test the case `traverse_nodes(deptype=spack.deptypes.NONE)` to not
traverse dependencies, only de-duplicate.

Use the construct in environment views that otherwise would branch on
whether deps are enabled or not.
2024-01-29 16:31:50 +01:00
dependabot[bot]
62ed5ee318 build(deps): bump codecov/codecov-action from 3.1.4 to 3.1.5 (#42295)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](eaaf4bedf3...4fe8c5f003)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 16:27:44 +01:00
Mosè Giordano
0a10ff70bc openblas: use ARMV8SVE when target supports SVE feature (#42107) 2024-01-29 08:20:32 -07:00
Harmen Stoppels
0718e3459a filesystem: cleanup (#42342)
Type hints and removal of unused code
2024-01-29 14:43:17 +00:00
Rocco Meli
7ec93a496d MDAnalysis: add v2.7.0 (#41907)
* ensure umpire~cuda~rocm when ~cuda~rocm

* MDAnalysis: add v2.7.0

* Apply suggestions from code review

* license

* review changes

* add gsd and py-cmake versions

* Update package.py

* py-cmake

* Update package.py

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

* fix and reorder

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-29 08:31:34 -06:00
Brian Vanderwende
2170386ad9 Improve NCL variant support and fix hdf-eos5 issues (#41259) 2024-01-29 15:28:32 +01:00
WuK
6c48effbf5 add py-vl-convert-python (#42073)
* add py-vl-convert-python

* code format

* Update package.py

add homepage

* Update var/spack/repos/builtin/packages/py-vl-convert-python/package.py

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

* remove old versions, add todo

* Update var/spack/repos/builtin/packages/py-vl-convert-python/package.py

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

* remove blank line

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-29 08:18:42 -06:00
Wouter Deconinck
97e3da0e3e ncurses: fix 5.9 and 6.0 on modern compilers (#41982) 2024-01-29 15:18:25 +01:00
Alex Leute
d6ff81ab4d py-metrics: Adding package py-metrics (#42220)
* New package: py-metrics

* [py-metrics] cleaned up extra comment

* Updated copyright and ran black

* py-pathspec: Added version 0.5.5

---------

Co-authored-by: vehrc <vehrc@rit.edu>
Co-authored-by: Jen Herting <jen@herting.cc>
Co-authored-by: Alex C Leute <aclrc@rit.edu>
2024-01-29 08:14:03 -06:00
Sam Grayson
6dfc2e7075 openldap: add findutils build dep (#42159) 2024-01-29 15:06:57 +01:00
Matthias Wolf
80e36d47c2 py-frozendict: patch up for Python 3.11 (#42192)
* py-frozendict: patch up for Python 3.11

See also Marco-Sulla/python-frozendict#68, rely on a pure Python
implementation when 3.11+ is used.

* mention related Github issue
2024-01-29 08:03:46 -06:00
snehring
e1826f89d4 tbl2asn: adding runtime dep libidn (#42171) 2024-01-29 14:59:10 +01:00
kjrstory
23df20fe6d of-precice: add new versions, update run environment (#40479) 2024-01-29 14:57:16 +01:00
Wouter Deconinck
10ef7a0466 containers: switch to quay.io/almalinuxorg images (#42193) 2024-01-29 14:55:56 +01:00
Alec Scott
7eba7d4028 go: simplify dependency on git to only run (#42208) 2024-01-29 14:49:45 +01:00
Dani
b09d741aed new builtin package: py-biobb-common (#41993)
* new builtin package: biobb-common

* removed whitespace for the style test

* replaced ' by " for the style test

* changed import line for the style test

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

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

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

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

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

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

* removed test

* using pypi instead of git

I hope this is declared the right way.
I tried to test it locally but I am having problems with a dependency (openblas) thus I can not even try if this works.

* upgraded version

* Added py prefix

* removed biopython version restriction

* directory with new py-prefixed name

* Delete old non-prefixed package

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

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

---------

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-29 13:52:57 +01:00
Sergey Kosukhin
594069961a netcdf-fortran: fix static linking in some cases (#35466)
* netcdf-fortran: enable building against static netcdf-c

* netcdf-fortran: strip the output of nc-config
2024-01-29 12:53:13 +01:00
Sean Koyama
9eb445f0a2 singularityce: add v3.11.4, v3.11.5 (#42251)
Co-authored-by: Servesh Muralidharan <smuralidharan@anl.gov>
2024-01-29 12:31:39 +01:00
Sean Koyama
e791f61c52 gnuplot: add v5.4.10, v6.0.0 (#42252)
Co-authored-by: Servesh Muralidharan <smuralidharan@anl.gov>
2024-01-29 12:30:47 +01:00
Thomas Madlener
b074e18402 py-jupytext: Add version 1.16 and update dependencies (#41552)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-29 12:26:58 +01:00
Alex Seaton
5b6a289d30 Added heyoka and mppp packages (#41839) 2024-01-29 11:03:48 +01:00
Jonathon Anderson
8e9bce44cc opencl-c-headers: install with CMake (#42173) 2024-01-29 10:47:52 +01:00
Ye Luo
7242238a25 quantum_espresso: relax constrait to allow +openmp ^elpa~openmp (#42322) 2024-01-29 10:41:52 +01:00
Mikael Simberg
ef26ee3f1f pika: Add 0.22.1 (#42338) 2024-01-29 02:37:56 -07:00
Adam J. Stewart
584ff9933a py-pandas: add v2.2.0 (#42205) 2024-01-29 03:34:07 -06:00
dependabot[bot]
bb07776606 build(deps): bump black from 23.12.1 to 24.1.0 in /lib/spack/docs (#42328)
Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.12.1...24.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 10:28:28 +01:00
Pramod Kumbhar
07df50fbdc neuron: add new versions and clean-up the recipe (#41931)
* update tarball urls, add new versions and update maintainers
* remove unnecessary variant like cross-compile
* use self.define and self.define_from_variant
* improve regex / bug that matches with -DMPICH_SKIP_MPICXX=1

Co-authored-by: Matthias Wolf <matthias.wolf@epfl.ch>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-01-29 09:46:48 +01:00
Luc Grosheintz
fc731f28cb highfive: add v2.9.0 (#42337) 2024-01-29 01:43:04 -07:00
Tom Payerle
6474d7ef00 hdf5: Make +subfiling variant depend on +mpi (#42324)
Based on CMakeLists.txt, the subfiling VFD requires a parallel HDF5 build.
So make +subfiling variant depend on +mpi

Should resolve #42323
2024-01-29 09:41:51 +01:00
Jonathon Anderson
0b23bbbbb0 hpctoolkit: update develop and add 2024.01.stable (#42309) 2024-01-29 09:05:02 +01:00
wspear
21406b119c Update tau 2.33.1 hash (#42336) 2024-01-28 09:44:55 -08:00
Adam J. Stewart
2b51980904 Apply black 2024 style to Spack (#42317) 2024-01-27 16:15:35 +01:00
Robert Cohn
1865e228c4 [intel-oneapi-mkl] workaround linking issue for threads=openmp (#42327) 2024-01-26 22:22:51 -07:00
wspear
179a1e423e pdt 3.25.2 (#42330)
Add support for -icpx for oneapi
2024-01-26 21:08:19 -07:00
wspear
bd8de5bf2d Add tau 2.33.1 (#42331) 2024-01-26 20:52:44 -07:00
eugeneswalker
7c8c7eedca xyce: break blis circularity in depends_on (#42321) 2024-01-26 20:22:55 -07:00
Massimiliano Culpo
8c1957c03e gnupg: add v2.4.4 (#42320) 2024-01-26 14:33:48 -08:00
eugeneswalker
803ad69eb1 hydrogen@1.5.3: cmake patch with ESCAPE_QUOTES (#42325) 2024-01-26 13:56:16 -08:00
Chris White
29d784e5fa Axom: Update/merge changes from Axom's repo (#42269)
* update axom package from axom's repo

Co-authored-by: white238 <white238@users.noreply.github.com>
Co-authored-by: Greg Becker <becker33@llnl.gov>
2024-01-26 11:08:21 -08:00
Dan LaManna
58b2201710 Stop passing manual AWS credentials to jobs (#42096) 2024-01-26 10:25:37 -07:00
Matthew Thompson
02605d577b hdf5: fix build error on Apple Clang 15 (#42264) 2024-01-26 18:18:57 +01:00
Adam J. Stewart
42de252c12 py-black: add v24.1.0 (#42316) 2024-01-26 07:48:21 -07:00
m-shunji
6c3c06a571 pexsi: fix to build with fujitsu-ssl2 (#42234)
Co-authored-by: inada-yoshie <inada.yoshie@fujitsu.com>
2024-01-26 11:00:22 +01:00
Harmen Stoppels
6a4573ce5a julia: patch for system lld and dsymutil (#42282) 2024-01-26 10:30:27 +01:00
Massimiliano Culpo
e77128dfa2 Run config audits in CI, add a new audit to detect wrongly named external specs (#42289) 2024-01-26 10:21:43 +01:00
Massimiliano Culpo
19df8e45ec Merge virtuals= from duplicate dependencies (#42281)
Previously, for abstract specs like:
```
foo ^[virtuals=a] bar ^[virtuals=b] bar
```
the second requirement was silently discarded on concretization. Now they're merged, and the abstract spec is equivalent to:
```
foo ^[virtuals=a,b] bar
```
2024-01-26 09:48:53 +01:00
eugeneswalker
4c7a1f541c e4s oneapi: use ghcr spack registry for runner image (#42267) 2024-01-26 02:02:58 +00:00
Daniele Cesarini
295e36efa3 COUNTDOWN package (#42123)
* Added countdown repo
* Added fixed version of COUNTDOWN
* Style fixes
* Changed mantainer syntax
* Variants listed in alphabetical order by name
* Added conflicts and some reordering
* Fixed conflicts syntax
* Style fixes
* [@spackbot] updating style on behalf of danielecesarini

---------

Co-authored-by: danielecesarini <danielecesarini@users.noreply.github.com>
2024-01-25 13:56:29 -08:00
eugeneswalker
3f47cc8d00 e4s neoverse-v2: use ghcr.io/spack image registry (#42268) 2024-01-25 13:45:29 -08:00
Matthew Thompson
4006020d78 pflogger: Add v1.12 (#42288)
* pflogger: add version 1.12
* Add version
* return MPI variant to false default
* [@spackbot] updating style on behalf of mathomp4

---------

Co-authored-by: mathomp4 <mathomp4@users.noreply.github.com>
2024-01-25 14:08:48 -07:00
kenche-linaro
6d4fa96aad linaro-forge: added 23.1.1 version (#42283) 2024-01-25 13:45:01 -07:00
Dom Heinzeller
85def2bfc7 Add eccodes@2.32.1 and eccodes@2.33.0 (#42257) 2024-01-25 13:34:10 -07:00
eugeneswalker
266bbad8cd e4s: add gromacs (#42266) 2024-01-25 11:48:25 -08:00
Derek Ryan Strong
1e3b7a6df1 Add fpart 1.6.0 (#42258) 2024-01-25 11:39:14 -08:00
Tom Payerle
00fe864321 cgal: Add version 5.6 (#42277)
Needed for latest version of sfcgal
2024-01-25 11:36:34 -08:00
Adam J. Stewart
3df720e909 py-lightly: add v1.4.26 (#42279) 2024-01-25 11:35:15 -08:00
Alberto Invernizzi
02a6ec7b3c CMake: disable Package Registry (#42149)
CMake may write and read from `~/.cmake` through `export(...)` and read `find_package(...)` respectively. We don't want this as it may influence the build in a non-deterministic way, so disable it for all versions of `cmake`.
2024-01-25 19:04:03 +01:00
Greg Becker
d3c1f7a872 Fix using sticky variants in externals (#42253) 2024-01-25 17:22:22 +01:00
Robert Cohn
84568b3454 spack find mpiexec for impi (#42284) 2024-01-25 08:21:50 -08:00
Harmen Stoppels
2721b4c10d llvm: disable libomptarget AMDGPU plugin (#42265)
Fixes CI on develop
2024-01-25 08:43:29 +01:00
Jason Verley
31ed39303c Update Xyce and Trilinos recipes (#42194)
* Trilinos: Add AMD to SuiteSparse TPL list

When Trilinos is built with SuiteSparse support, it should enable AMD as
one of the TPLs. It was previously enabling only UMFPACK. The Xyce
package uses AMD (but not UMFPACK).

* Xyce: Add 7.8 release and various improvements

In addition to adding the latest Xyce release (7.8), all the earlier
releases were deprecated, with the exception of 7.7.

The Trilinos specification was updated to remove unneeded packages,
explicitly enable all needed packages, and specify additional
do-not-build packages.

The serial build is now the default, with MPI still being an option.

I also epanded the explanation for one of the patches; and, finally, I
took the opportunity to update the Xyce description to better match the
current Xyce README description.
2024-01-24 10:46:14 -08:00
Richard Berger
6bddecbf28 SLURM/MPICH fixes (#42225)
* slurm: add new versions

* mpich: apply hostlist_t patch for newer Slurm versions

* [@spackbot] updating style on behalf of rbberger

---------

Co-authored-by: rbberger <rbberger@users.noreply.github.com>
2024-01-24 10:45:23 -08:00
Harmen Stoppels
54aebbb587 generate modules of non-roots during spack install of env (#42147)
Fixes a bug where Spack did not generate module files of non-roots during
spack install with an active environment.

The reason being that Environment.new_installs only contained roots.

This PR:

Drops special casing of automatic module generation in post-install hooks
When `use_view`, compute environment variable modifications like always, and
applies a view projection to them afterwards, like we do for spack env activate.
This ensures we don't have to delay module generation until after the view is
created.

Fixes another bug in use_view where prefixes of dependencies would not be
projected -- previously Spack would only temporarily set the current spec's prefix.
Removes the one and only use of the post_env_write hook (but doesn't drop it to
make this backportable w/o changes)
2024-01-24 09:45:58 -08:00
Mikael Simberg
e46f3803ad pika: Add 0.22.0 (#42263) 2024-01-24 10:32:58 -07:00
Harmen Stoppels
28b7f72b96 set_packge_py_globals: only set pure build related globals on the root in build context (#42215)
Previously `std_args` was called on non-roots in a build context, which is redundant, and also leads to issues when `std_args` expects build deps of the `pkg` to be installed.
2024-01-24 10:14:13 +01:00
Jonathon Anderson
61421b3a67 hpctoolkit: Add build_system=meson (#42059)
HPCToolkit `develop` now can optionally be built via Meson. This PR adds the `build_system=(autotools|meson)` variant and splits the build-system-dependent pieces into `AutotoolsBuilder` and `MesonBuilder`. The default is to build with `autotools`.

As of writing, the Meson is simply a wrapper around the original Autotools build, hence the build requires a native file listing install prefixes of all dependencies (which are internally mapped to `--with-{pkg}={prefix}` arguments for `./configure`). This is an unconventional but temporary state of affairs until the build system is fully ported to Meson and conventional dependency acquisition techniques like `pkg-config` and `cmake` are practically available.
2024-01-23 13:20:10 -08:00
Sean Koyama
acbf0d99c4 gobject-introspection: fine-grained glib dependencies, add 1.78.1 (#42222) 2024-01-23 22:05:11 +01:00
Tamara Dahlgren
e7be8160dd Environments: Fix environment configuration (#42058)
* Environments: fix environment config
* Don't change the lockfile manifest path
* Update activate's comments to tie the manifest to the configuration
* Add spec_list override method
* Remove type checking from 'activate' since already have built-in check
* Refactor global methods tied to the manifest to be in its class
* Restore Environment's 'env_subdir_path' and pass its config_stage_dir to EnvironmentManifestFile
* Restore global env_subdir_path for use by Environment and EnvironmentManifestFile
2024-01-23 13:01:40 -08:00
jmlapre
2af6597248 pigz: add v2.8 (#42227) 2024-01-23 12:55:32 -08:00
eugeneswalker
a4444e4107 tau ^intel-oneapi-mpi: fix prefix specification (#42248) 2024-01-23 12:54:08 -08:00
Loris Ercole
4c86ecc531 autodock-gpu: build with the specified cuda_arch (#42244)
The CUDA target should be specified at build time, otherwise
by default `autodock-gpu` will be built for compute capabilities
52, 60, 61, 70, which may cause errors on unsopported cards.
2024-01-23 12:52:38 -08:00
m-shunji
890a46c071 cosma: fix to build with fujitsu-ssl2 (#42230) 2024-01-23 12:51:29 -08:00
m-shunji
8999b0c178 elpa: fix to build with fujitsu compiler (#42231) 2024-01-23 12:41:59 -08:00
Massimiliano Culpo
a68fcb2fb8 cp2k: add a separate MakefileBuilder (#42130) 2024-01-23 21:39:40 +01:00
Alex Richert
84868b57c7 Add v5.0.0 to ip (#42228)
* Add v5.0.0 to ip
* don't require test target for ip@3
2024-01-23 12:09:32 -08:00
Juan Miguel Carceller
087bf70979 edm4hep: change master to main (#42246)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-01-23 12:04:48 -08:00
James Beal
039c343d0a Add missing dependency for vcftools (#42047)
* Add missing dependency
* Change dependency to virtual package
   As suggested :)

---------

Co-authored-by: James Beal <jb23@sanger.ac.uk>
2024-01-23 11:01:24 -08:00
eugeneswalker
11abd94c04 turbine ^intel-oneapi-mpi: fix prefix specification (#42247) 2024-01-23 11:39:05 -07:00
Loris Ercole
b3d0f19fe7 spglib: add tests variant and cmake requirement (#42242)
Fixes #42241
2024-01-23 11:38:42 -07:00
Rémi Lacroix
9be7f2328f Spglib: update the homepage (#42243)
The previous link gives a 404 error.
2024-01-23 07:54:01 -07:00
Harmen Stoppels
40b8dfceed lapackpp: new version (#42245) 2024-01-23 14:36:37 +01:00
Jack Morrison
41b20aec2b libfabric: Add version 1.20.1 (#42219) 2024-01-23 05:19:00 -07:00
Simon Pintarelli
98109ce3ea Change cosma and costa default to +shared (#42238) 2024-01-23 04:33:32 -07:00
Christoph Junghans
61cd877145 votca: add v2024 (#42224) 2024-01-23 04:33:15 -07:00
Massimiliano Culpo
66813460c0 Add syntactic sugar for "strong preferences" and "conflicts" (#41832)
Currently requirements allow to express "strong preferences" and "conflicts" from
configuration using a convoluted syntax:
```yaml
packages:
  zlib-ng:
    require:
    # conflict on %clang
    - one_of: ["%clang", "@:"]
    # Strong preference for +shared
    - any_of: ["+shared", "@:"]
```
This PR adds syntactic sugar so that the same can be written as:
```yaml
packages:
  zlib-ng:
    conflict:
    - "%clang"
    prefer:
    - "+shared"
```
Preferences written in this way are "stronger" that the ones documented at:
- https://spack.readthedocs.io/en/latest/packages_yaml.html#package-preferences
2024-01-22 13:18:00 -08:00
Harmen Stoppels
ed9d495915 environment.py: drop early exit in install (#42145)
`spack install` early exit behavior was sometimes convenient, except
that it had and has bugs:

1. prior bug: we didn't mark env roots of already installed specs as
   explicit in the db
2. current bug: `spack install --overwrite` is ignored

So this PR simplifies by letting the installer do its thing even if
everything is supposedly installed.
2024-01-22 20:39:12 +01:00
Annop Wongwathanarat
7580ba4861 Revert "acfl: truncate version version number" (#42214) 2024-01-22 10:28:22 -08:00
renjithravindrankannath
c673979fee Bump up the version for ROCm-6.0.0 (#42026)
* Bump up the version for ROCm-6.0.0
* Adding patch files
* Style check failure fix
* Style check fixes
* Style check error fixes
* Patch to remove hipblas client file installation in 6.0
* Patch need to be applied on all 5.7 relases
* 6.0 update for math libs and other packages, new github url etc
* Correct package-audit failures
* Correcting shasum for rocfft patch and limiting patch in rocblas
* Reverting updates in rocprofiler-dev due to ci-gitlab failure
* Fixes for ci-gitlab failure due to disabling hip backward compatibilit
* Adding patch file to Change HIP_PLATFORM from HCC to AMD and NVCC to NVIDIA
* Use the gcnArchName inplace of gcnArch as gcnArch is deprecated from rocm-6.0.0
* Patches to fix magma and blaspp build error with rocm 6.0.0
* Patch for mfem and arborx for rocm 6.0
* Style check error fix
* Correcting style check errors
* Uodating dependent version
* Update for petsc to build with rocm 6.0
  Need reverting-operator-mixup-fix-for-slate.patch for rocm 6.0
* Reverting the change in url for 2.7.4-rocm-enhanced
* hip-tensor 6.0.0 update
2024-01-22 10:19:28 -08:00
Wouter Deconinck
7acd5bdc7f gaudi: new version 37.2 (#42210)
No major changes, https://gitlab.cern.ch/gaudi/Gaudi/-/compare/v37r1...v37r2?from_project_id=38&straight=false
2024-01-22 09:45:43 -08:00
Adam J. Stewart
3a4800754e py-keras: add v3.0.4, v3.0.3 (#42206)
* py-keras: add v3.0.3
* py-keras: add v3.0.4
2024-01-22 09:31:45 -08:00
Wouter Deconinck
72f8611d3e acts: new version 32.0.0 (#42207)
* acts: new version 32.0.0
  No major build system changes, see [diff](https://github.com/acts-project/acts/compare/v31.2.0...v32.0.0). Summary of changes:
  - updated actsvg version requirement
  - MLpack dependency removed as of 32.0.0 (https://github.com/acts-project/acts/pull/2863)
* actsvg: new version 0.4.39 (new variant web)
* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-01-22 09:29:19 -08:00
Wouter Deconinck
a0cd63c210 dd4hep: new version 1.27.2 (#42211)
New bugfix version, without any major changes, https://github.com/AIDASoft/DD4hep/compare/v01-27-01...v01-27-02.
2024-01-22 09:10:02 -08:00
kwryankrattiger
2d9c6c3222 CMakePackage pass python hints automatically (#42201)
This commit ensures that CMake packages that also have Python as a build/link dep get a couple defines for the Python path so that CMake's builtin `FindPython3`, `FindPython`, `FindPythonInterp` modules can locate Python correctly.

The main problem with those CMake modules is that they first search for Python versions known at the time of release, meaning that old CMake maybe find older system Python 3.8 even though Python 3.11 comes first in `CMAKE_PREFIX_PATH` and `PATH`.

Package maintainers can opt out of this by overriding the `find_python_hints = False` attribute in the package class.
2024-01-22 16:31:16 +01:00
Harmen Stoppels
b28692dc72 repo.py: pass package name not fully qualified package name (#42217) 2024-01-22 14:44:13 +00:00
Maciej Wójcik
dee0f138b8 py-nglview: add new package and dependency (py-versioneer-518) (#42079)
* Add nglview package

* Use slightly older version

* py-nglview: Correct py-versioneer version

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

* py-nglview: Correct version of py-jupyter-packaging dependency

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

* Add py-versioneer-518 package

* py-versioneer-518: Correct version

* py-nglview: Numpy is needed during build for the tests

* py-nglview: dependency needed for tests

* py-nglview: Correct dependency types

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-22 05:39:36 -06:00
Matthias Wolf
91ff20cf7a py-bluepyemodel: add newer versions (#42188)
* py-bluepyemodel: add newer versions

* re-add license marker
2024-01-21 11:54:35 -06:00
Matthias Wolf
1084d3c261 py-nexusforge: add new version, fix dependencies (#42189) 2024-01-21 11:52:43 -06:00
Maciej Wójcik
124b41c1a0 snakemake: add new versions (#42074)
* py-toposort: Add newer versions

* snakemake: Add more recent versions with dependencies

* Typo in copyright

* Reorder dependencies, remove comments

* Whitespace
2024-01-21 11:18:19 -06:00
snehring
d282ec8179 py-tesorter: requires setuptools (#42124) 2024-01-21 11:17:52 -06:00
eugeneswalker
58997f7f9a e4s ci: use latest intel/hpckit 2024 based image (#41437)
* e4s ci: use latest intel/hpckit 2024 based image

* use latest container image: ecpe4s/ubuntu22.04-runner-amd64-oneapi-2024.0.0:2023.12.01

* comment out failing specs

* update to use patched container

* remove generalized package preference for intel-oneapi-mkl@2023

* change packages commented out
2024-01-20 20:17:44 -08:00
eugeneswalker
104a2b5e11 e4s ci: switch to neoverse_v2 target (#42115) 2024-01-20 16:28:29 -08:00
Robert Cohn
e198c13161 [kokkos] make dpl dependence explicit (#42128) 2024-01-20 16:26:21 -08:00
Wouter Deconinck
10b4481ba5 motif: patch to ensure main function (fixes #29594) (#42174) 2024-01-21 00:36:20 +01:00
Sam Grayson
4c1fbc9fdb libtool: add build dep on findutils (#42199) 2024-01-20 14:58:06 -07:00
Adam J. Stewart
02dc10c053 py-scikit-learn: add v1.4.0 (#42186) 2024-01-20 06:47:45 -06:00
Pranav Sivaraman
0c880369d8 libvterm: add v0.3.3 (#42203) 2024-01-20 11:07:10 +01:00
Adam J. Stewart
5b101ef105 py-pyamg: fix deptypes (#42185) 2024-01-20 09:28:25 +01:00
Alec Scott
c6acaaf145 fzf: add v0.45.0 (#42175) 2024-01-19 12:34:18 -08:00
Alec Scott
6883d6bf86 go: add v1.21.6 and v1.21.5 (#42177) 2024-01-19 12:33:19 -08:00
Alec Scott
a77bde66de emacs: add v29.2 (#42178) 2024-01-19 12:31:56 -08:00
Alec Scott
a5e40ae36d restic: add v0.16.3 (#42180) 2024-01-19 12:31:03 -08:00
Alec Scott
e556e92ec9 ripgrep: add v14.1.0 (#42181) 2024-01-19 12:30:08 -08:00
Adam J. Stewart
b233c255bd py-rtree: add v1.2.0 (#42200) 2024-01-19 12:17:38 -08:00
Seth R. Johnson
ee16d59221 ROOT: fix macos build for 6.30 (#42198) 2024-01-19 15:09:46 -05:00
Harmen Stoppels
39a7780754 test/cmd/checksum.py: avoid networking (#42190) 2024-01-19 20:00:38 +01:00
Harmen Stoppels
ce81175cf3 Revert "cc: work around -v split between ld and ccld" (#42196) 2024-01-19 17:59:41 +01:00
Seth R. Johnson
c31a998abb VecGeom: new version 1.2.7 and fix URLs (#42144)
* VecGeom: new version 1.2.7 and fix URLs

* vecgeom: remove deprecated ancient RC version with incorrect hash

* geant4: remove support for @10.3+vecgeom
2024-01-19 11:30:31 -05:00
Harmen Stoppels
00c4efb96e environment.py: remove symlinking of logs (#42148)
The piece of code that is removed in this PR predates environment views.

Spack would symlink build logs in `<env>/.spack-env/logs/*`, but this is
redundant because:

1. Views already add `<prefix>/.spack` (and there's logic there to avoid
   clashes)
2. The code was broken anyways: it would only symlink the logs of
   environment roots, not their deps, even if they were just built.

If users disable views, I'm pretty sure they're not waiting for
`.spack-env/logs` either. So, imo we can delete this code, and it was
probably overlooked in the past.
2024-01-19 17:10:03 +01:00
Harmen Stoppels
edc8a5f249 Typing for spack checksum code paths (#42183) 2024-01-19 13:56:20 +00:00
Massimiliano Culpo
75e96b856e btop: add v1.3.0, added GPU variant (#42139) 2024-01-19 10:11:56 +01:00
Harmen Stoppels
549ab690a8 oci: use pickleable errors (#42160) 2024-01-19 09:37:33 +01:00
Peter Scheibel
621e203a8e Bugfix: spack config change handle string requirements (#42176)
For a requirement like

```
packages:
  foo:
    require:
    - "+debug"
```

(not `one_of:`, `any_of:`, or `spec:`)

`spack config change` would ignore the string. This was particularly evident if toggling a variant for a previously unmentioned package:

```
$ spack config change packages:foo:require:+debug
$ spack config change packages:foo:require:~debug
```

This fixes that and adds a test for it.
2024-01-19 08:10:39 +00:00
John W. Parent
d7bcaa29c0 sqlite package: support Windows build (#41924)
Resubmission of #41761 with proper relocation of get_arch
(taken from #41824).

Co-authored-by: vsoch <vsochat@stanford.edu>
2024-01-18 23:02:06 -08:00
Brian Han
e9a0273538 umpire - Use ENABLE_OPENMP to build with OpenMP support (#42164) 2024-01-18 17:38:39 -07:00
Wouter Deconinck
0d7aa6d811 qt: new version 5.15.12 (#42135)
Qt5.15.12 (open source) was released on December 27, [release notes](https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/5.15.12/release-note.md). No major build system changes expected.
2024-01-18 17:32:55 -07:00
Wouter Deconinck
40c61b0600 thepeg: v2.3.0 hash change (#42167)
```
$ curl 'https://thepeg.hepforge.org/downloads/?f=ThePEG-2.3.0.tar.bz2' | sha256sum 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1904k    0 1904k    0     0  1075k      0 --:--:--  0:00:01 --:--:-- 1074k
ac35979ae89c29608ca92c156a49ff68aace7a5a12a0c92f0a01a833d2d34572  -
```
2024-01-18 17:08:13 -07:00
Christopher Christofi
b54a69e8d1 centrifuge: add new package (#42168)
* centrifuge: add new package
* fix styling
2024-01-18 17:03:52 -07:00
Harmen Stoppels
4d54688782 Reduce the size on disk for logs (#42122)
* Reduce the size on disk for logs

This PR does two things:

1. Store a compressed `spack-build-out.txt.gz`
2. Get rid of phase logs, as they are duplicates of
   `spack-build-out.txt`

The logs are not compressed in the stage dir, so on build failure the
workflow for users is no different.

It's just that on install the logs are rarely used, and if needed, users
can easily `gzip -d` or `zgrep` them.

In the case of GCC installs, the compressed logs are <5% of the original
size, which is typically dozens of MBs.

* get rid of "backwards compat" of file names in stage dirs
2024-01-18 16:02:11 -08:00
Brian Han
2d37d5474d chai - make CUDA_SEPARABLE_COMPILATION flag optional (#42165) 2024-01-18 16:53:28 -07:00
Robert Cohn
8ac27241b6 [embree] rely on spack to provide location of tbb (#42163) 2024-01-18 16:48:27 -07:00
Christopher Christofi
fd70ac2d99 perl-graph: fix default version ordering to latest releases (#42161)
* perl-graph: fix default version ordering to latest releases
* fix styling
2024-01-18 16:44:09 -07:00
snehring
a38acfb195 libidn: adding new package libidn (#42170) 2024-01-18 16:34:17 -07:00
John W. Parent
6fa7d8b6a6 Skip sbang hook on Windows (#42156)
Sbangs don't exist on Native Windows, and the hook is causing errors
due to the file comparison + behavior of os.rename on Windows. Skip
the hook on Windows.
2024-01-18 15:33:14 -08:00
eugeneswalker
eb5494e9cc ginkgo@1.7.0 %oneapi: patch sycl w changes from ginkgo pr #1524 (#42151)
* ginkgo@1.7.0 %oneapi: patch sycl w changes from ginkgo pr #1524

* constrain patch to %oneapi@2024:
2024-01-18 13:57:24 -08:00
Richard Berger
671dab97d5 ucx: add explicit dependency to hsa-rocr-dev (#42152)
Fixes an issue that occurs when hip is provided as an external.
hsa-rocr-dev would not be part of the dependency tree in that case.
2024-01-18 13:30:48 -08:00
Satish Balay
27a3ba1a59 kokkos-kernels: add v4.1.00, v4.2.00 (#40565)
* kokkos-kernels: add version 4.1.00

* add kokkos-kernels@4.2.00

* [kokkos] make dpl dependence explicit

---------

Co-authored-by: eugeneswalker <eugenesunsetwalker@gmail.com>
Co-authored-by: Cohn, Robert S <robert.s.cohn@intel.com>
2024-01-18 14:25:09 -07:00
Andrey Perestoronin
87e836f353 add new advisor and vtune packages (#42150) 2024-01-18 15:00:37 -05:00
John W. Parent
883014e56a Tcl package: support build on Windows (#41939) 2024-01-18 12:47:52 -07:00
Robert Cohn
eb625321ae [intel-oneapi-mkl] patch mkl install to workaround cmake issue (#42146) 2024-01-18 12:33:00 -07:00
Dave Keeshan
ddfec30941 Add verible v0.0-3483-ga4d61b11 (#42142) 2024-01-18 10:51:56 -08:00
Wouter Deconinck
922ad2fbc6 opencascade: new versions 7.5.3p5, 7.7.2, 7.8.0 (#42136)
New patch 7.5.3p5, new bugfix 7.7.2, new minor 7.8.0.

Only possible impact on spack is the potential addition of a variant to select the memory manager in 7.8.0, see [diff](https://github.com/Open-Cascade-SAS/OCCT/compare/V7_7_2...V7_8_0). Not adding a variant at this time.
2024-01-18 10:50:15 -08:00
Dave Keeshan
e8e6b90044 Add yosys 0.37 (#42141) 2024-01-18 10:48:46 -08:00
Dom Heinzeller
560bb9f507 Bug fix for building ESMF shared on macOS: set ESMF_TRACE_LIB_BUILD=OFF (#42134) 2024-01-18 10:36:12 -08:00
Juan Miguel Carceller
78e5e31558 evtgen: add version 02.02.01 (#42055)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-01-18 08:42:03 -08:00
Harmen Stoppels
cb685b049d oci: only push in parallel when forking (#42143) 2024-01-18 17:28:50 +01:00
Alberto Invernizzi
51c02be909 intel-oneapi-mkl: add missing compiler libraries for thread=openmp (#42087) 2024-01-18 08:14:16 -05:00
Massimiliano Culpo
f7db6bf3f9 spack: add v0.21.0 and v0.21.1 (#42140) 2024-01-18 05:28:02 -07:00
Massimiliano Culpo
203d682d87 spack graph: env aware (#42093) 2024-01-18 10:11:41 +01:00
Peter Scheibel
7b27591321 New command: spack config change (#41147)
Like `spack change` for specs in environments, this can e.g. replace `examplespec+debug` with `examplespec~debug` in a `require:` section.

Example behavior for a config like:

```
packages:
  foo:
    require:
    - spec: +debug
```

* `spack config change packages:foo:require:~debug` replaces `+debug` with `~debug`
* `spack config change packages:foo:require:@1.1` adds a requirement to the list
* `spack config change packages:bar:require:~debug` adds a requirement
2024-01-18 00:21:17 -08:00
Harmen Stoppels
9539037096 papi: Fix Gitlab CI by conflict with 7.1:%cce until -ffree-form is resolved (#41847)
Co-authored-by: Alec Scott <alec@bcs.sh>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-01-17 18:13:12 -07:00
Peter Scheibel
453ecdb77e Config path quote handling: keys with quotes (#40976)
As observed in #40944, when using `spack config add <path>`, the `path` might
contain keys that are enclosed in quotes.

This was broken in https://github.com/spack/spack/pull/39831, which assumed that
only the value (if present, the final element of the path) would use quotes.

This preserves the primary intended behavior of #39931 (allowing ":" in values when
using `spack config add`) while also allowing quotes on keys.

This has complicated the function `process_config_path`, but:
* It is not used outside of `config.py`
* The docstring has been updated to account for this
* Created an object to formalize the DSL, added a test for that, and
  refactored parsing to make use of regular expressions as well.
* Updated the parsing and also updated the `config_path_dsl` test with an explicit check.
  At a higher level, split the parsing to check if something is either a key or not:
  * in the first case, it is covered by a regex
  * in the second, it may be a YAML value, but in that case it would have to be the last
    entry of x:y:z, so in that case I attempt to use the YAML handling logic to parse it as such
2024-01-17 17:11:27 -08:00
Arne Becker
796d251061 perl-kyotocabinet: new package and lzo and lzma compression to kyotocabinet (#41772)
- Add Perl module KyotoCabinet
- Add lzo and lzma compression to kyotocabinet
2024-01-18 02:03:47 +01:00
Arne Becker
308761d5f9 unison: update to 2.53.3, deprecate old versions we can't build in spack (#41777)
- Use MakefilePackage and simplified package.py

- Deprecate old versions - they did not build for me with OCaml 4.13.1
  that is currently in Spack. Also, the changes from the previous
  versions seem to be quite significant.
2024-01-18 01:58:31 +01:00
snehring
ded778004e lammps: add latest stable and recommeded version 20230802.2 (#42126) 2024-01-18 01:02:50 +01:00
Sam Grayson
ad5d4ed235 krb5: add perl as a build dependency (#42114) 2024-01-17 15:32:25 -08:00
Tal Ben-Nun
349867c879 Limit patching Catch2 to the newer @3: version range (#42019) 2024-01-18 00:12:19 +01:00
afzpatel
277e1ff396 rpp: add a variant to install tests, update mivisionx dependency (#41774) 2024-01-17 15:42:55 -07:00
Richard Berger
eda4d3fa06 FleCSI updates (#42127)
* flecsi: simplify hdf5 variant logic
* flecsi: deprecate 1.4 version
2024-01-17 13:49:33 -08:00
Tamara Dahlgren
68e00e7073 Packages requiring manual downloads: improve error message (#42017)
Spack packages may not have a public download option, and can implement
`download_instr` to inform users how to obtain the artifacts needed to
build. `spack checksum` however did not account for this and would print
out a confusing error message when invoked on such packages ("Could not
find any remote versions").

This PR updates the error message to output the manual download instructions
if `spack checksum` is invoked on a package with `manual_download = True`.
2024-01-17 21:45:57 +00:00
Auriane R
69d762ce6a Broaden conflict between rocblas 5.2 and gcc 12 (#42064) 2024-01-17 11:49:26 -08:00
Matthieu Dorier
e92716ff2d build_environment.py: clean LUA_PATH and LUA_CPATH (#42101)
For better build isolation
2024-01-17 20:00:07 +01:00
Tom Scogland
0eaab09e88 fix pyright for package files (#42112) 2024-01-17 09:23:25 -08:00
Tom Scogland
c508ff1e5f cc: work around -v split between ld and ccld (#42111) 2024-01-17 09:04:04 -08:00
Arne Becker
0f920a85e4 perl-search-elasticsearch: New package (#42028)
Adds Search::Elasticsearch
2024-01-17 17:39:49 +01:00
Arne Becker
a12ecb112a perl-email-stuffer: New package (#42119)
Adds Email::Stuffer
2024-01-17 17:37:35 +01:00
Arne Becker
9640d30ea9 perl-rose-db-object and deps: New packages (#42029)
- Deprecates 1.63 in DateTime
- Adds Rose::DateTime
- Adds Rose::DB
- Adds Rose::DB::Object
2024-01-17 17:35:46 +01:00
David Guibert
85b2becd06 gnuplot: fix undefined ref to symbol libiconv_open (#42116)
This fixes #39720.
2024-01-17 17:22:06 +01:00
Auriane R
0331b0d044 Relax conflict in pika with cxxstd >= 20 and cuda <= 11 (#42118)
* Relax conflict with cxxstd >= 20 and cuda <= 11

* Update comment to be more specific to nvcc
2024-01-17 15:31:37 +01:00
WuK
1ce81fc299 add py-cairosvg py-cssselect2 (#42067)
* add py-cairosvg py-cssselect2

* Update package.py

add homepage

* Update package.py

add homepage
2024-01-17 07:32:31 -06:00
Maciej Wójcik
5b1b97aa49 py-reretry: add new versions (#42108)
* Update py-reretry package

* py-reretry: Remove yanked version
2024-01-17 07:30:42 -06:00
Thomas Bouvier
799ab6974c pyarrow: add versions up to v14.0.2 (#42109)
* pyarrow: add versions up to v14.0.2

* arrow: add v14.0.2
2024-01-17 07:26:49 -06:00
Taillefumier Mathieu
d94b7b9033 Version updates of SIRIUS (#42121)
Signed-off-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2024-01-17 14:13:55 +01:00
Alex Leute
a01adb7bdc py-multi-imbalance: Added package py-multi-imbalance (#42094)
Co-authored-by: Alex C Leute <aclrc@rit.edu>
2024-01-17 07:12:29 -06:00
Loris Ercole
4ad62d8b09 cp2k: fix 'gpu_map' bug (#42009) 2024-01-17 13:55:01 +01:00
Harmen Stoppels
28675478ce Create reproducible tarballs in VCSFetchStrategy.archive (#42042)
Currently when you repeatedly create a bootstrap mirror that includes
`clingo-bootstrap@spack` you get different tarballs every time.

This is a general problem with mirroring checkouts from version control
as tarballs. I think it's best to create tarballs ourselves, since that way we
have more control over its contents.

This PR ensures normalized tarballs like we do for build caches:

- normalize file permissions (in fact that was already inspired by git, so
  should be good)
- normalized file creation/modification time (timestamp 0)
- uid / guid = 0, no usernames
- normalized gzip header
- dir entries are ordered by `(is_dir, name)` where strings are not locale aware ;)

- POSIX says st_mode of symlinks is unspecified, so work around it and
  force mode to `0o755`
2024-01-16 21:11:43 -08:00
Tom Scogland
c05ed2c31a mark more things as build-tools (#42110) 2024-01-16 18:33:23 -07:00
Christopher Christofi
c4d2f11368 Revert "perl-constant: add new package" (#42099) 2024-01-16 17:19:12 -08:00
James Beal
c1ba631943 Add versions (#42105)
Co-authored-by: James Beal <jb23@sanger.ac.uk>
2024-01-16 17:18:14 -08:00
Adam J. Stewart
0b3bd21bd5 py-torchdata: update checksum (#42113) 2024-01-16 14:24:10 -08:00
Lydéric Debusschère
8317477daf py-sphinx-toolbox: new package (#41313)
* py-sphinx-toolbox: new package
* py-sphinx-toolbox: fix dependence py-typing-inspect

---------

Co-authored-by: LydDeb <lyderic.debusschere@eolen.com>
2024-01-16 11:53:22 -08:00
Raffaele Solcà
07c1f7ced8 Add dla-future 0.4.0 (#42106) 2024-01-16 12:48:17 -07:00
Arne Becker
264c0d6428 perl-email-mime: New package (#42089)
Adds Email::MIME
2024-01-16 11:38:07 -08:00
Arne Becker
2836dcaf4e perl-email-sender: New package (#42090)
Adds Email::Sender
2024-01-16 11:35:23 -08:00
Christopher Christofi
dba556c1f8 Revert "perl-memoize: add new package with version 1.16" (#42097) 2024-01-16 11:11:34 -08:00
WuK
6792e2c3a7 add cutlass@3.3.0 (#42071) 2024-01-16 10:54:09 -08:00
Harmen Stoppels
bc9b39cb73 r: improve relocatability (#42030)
R embeds an absolute path to the `which` executable in the sources for
`Sys.which`. This gets ultimately stored as serialized byte code in some
custom database format, which uses compression for entries.

As a result, Spack cannot relocate `<prefix which>/bin/which` when
installing from a build cache.

The patch works around this by making R create a symlink to `which` in
its own prefix, have the R sources call that, so that relocation works
again.

See https://github.com/r-devel/r-svn/pull/151
2024-01-16 13:37:25 +01:00
Massimiliano Culpo
f0c69ff3bf Fix a bug when a required provider is requested for multiple virtuals (#42088) 2024-01-16 11:50:33 +01:00
Massimiliano Culpo
ddae696cf8 Fix using fully-qualified namespaces from root specs (#41957)
Explicitly requested namespaces are annotated during
the setup phase, and used to retrieve the correct package
class.

An attribute for the namespace has been added for each node.

Currently, a single namespace per package is allowed
during concretization.
2024-01-16 11:47:32 +01:00
Mosè Giordano
f449832d6f openblas: add v0.3.26 (#42086) 2024-01-16 11:09:59 +01:00
Ronald Rahaman
a2189cb9b4 mvapich2: add pmi_version variant for pmix, pmi1 support (#40665) 2024-01-16 10:27:13 +01:00
Michael Kuhn
70ec14d930 qt-base: fix xcb plugin not being built (#42070)
Qt requires quite a few X11/xcb dependencies to be able to compile the
xcb platform plugin. See https://doc.qt.io/qt-6/linux-requirements.html
2024-01-16 09:48:01 +01:00
Dave Keeshan
1225bd7a44 verilator: add v5.020 (#42077) 2024-01-16 09:45:05 +01:00
James Beal
7a8a168b81 The signature of filter_file is (#42092) 2024-01-15 12:08:04 -07:00
Arne Becker
cf3f275716 perl-test-yaml: New package (#42044)
Adds Test::YAML
2024-01-15 09:38:03 -07:00
WuK
d95bcd8d85 add new versions of py-altair (#42068)
* add new versions of py-altair

* fix year

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

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

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

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

* reorder dependencies

* remove rc

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-01-15 05:17:56 -07:00
eugeneswalker
5f58a4c079 add e4s aarch64 (#42066) 2024-01-14 14:26:51 -08:00
Maciej Wójcik
adc56ac792 Fix packages inheriting GROMACS, add new versions (#42076)
* Fix inheritance of GROMACS derived packages, add new versions

* Reformatting
2024-01-14 07:15:05 -07:00
1768 changed files with 52899 additions and 20802 deletions

View File

@@ -0,0 +1,4 @@
{
"image": "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01",
"postCreateCommand": "./.devcontainer/postCreateCommand.sh"
}

View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Load spack environment at terminal startup
cat <<EOF >> /root/.bashrc
. /workspaces/spack/share/spack/setup-env.sh
EOF
# Load spack environment in this script
. /workspaces/spack/share/spack/setup-env.sh
# Ensure generic targets for maximum matching with buildcaches
spack config --scope site add "packages:all:require:[target=x86_64_v3]"
spack config --scope site add "concretizer:targets:granularity:generic"
# Find compiler and install gcc-runtime
spack compiler find --scope site
# Setup buildcaches
spack mirror add --scope site develop https://binaries.spack.io/develop
spack buildcache keys --install --trust

6
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,6 @@
<!--
Remember that `spackbot` can help with your PR in multiple ways:
- `@spackbot help` shows all the commands that are currently available
- `@spackbot fix style` tries to push a commit to fix style issues in this PR
- `@spackbot re-run pipeline` runs the pipelines again, if you have write access to the repository
-->

View File

@@ -22,8 +22,8 @@ jobs:
matrix:
operating_system: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: ${{inputs.python_version}}
- name: Install Python packages
@@ -43,7 +43,9 @@ jobs:
. share/spack/setup-env.sh
$(which spack) audit packages
$(which spack) audit externals
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8
if: ${{ inputs.with_coverage == 'true' }}
with:
flags: unittests,audits
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

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@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
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@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
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@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
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@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: Setup repo
@@ -158,8 +158,8 @@ jobs:
run: |
brew install cmake bison@2.7 tree
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: "3.12"
- name: Bootstrap clingo
@@ -182,7 +182,7 @@ jobs:
run: |
brew install tree
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Bootstrap clingo
run: |
set -ex
@@ -207,7 +207,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: Setup repo
@@ -250,7 +250,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@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: Setup non-root user
@@ -287,7 +287,7 @@ jobs:
make patch unzip xz-utils python3 python3-dev tree \
gawk
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: Setup non-root user
@@ -320,7 +320,7 @@ jobs:
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
@@ -338,7 +338,7 @@ jobs:
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh

View File

@@ -55,9 +55,9 @@ jobs:
if: github.repository == 'spack/spack'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
id: docker_meta
with:
images: |
@@ -96,10 +96,10 @@ jobs:
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20
- name: Log in to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -107,18 +107,16 @@ jobs:
- name: Log in to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: dockerfiles/${{ matrix.dockerfile[0] }}
platforms: ${{ matrix.dockerfile[1] }}
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

View File

@@ -18,6 +18,7 @@ jobs:
prechecks:
needs: [ changes ]
uses: ./.github/workflows/valid-style.yml
secrets: inherit
with:
with_coverage: ${{ needs.changes.outputs.core }}
all-prechecks:
@@ -35,12 +36,12 @@ jobs:
core: ${{ steps.filter.outputs.core }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
# See https://github.com/dorny/paths-filter/issues/56 for the syntax used below
@@ -70,14 +71,17 @@ jobs:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.bootstrap == 'true' }}
needs: [ prechecks, changes ]
uses: ./.github/workflows/bootstrap.yml
secrets: inherit
unit-tests:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
needs: [ prechecks, changes ]
uses: ./.github/workflows/unit_tests.yaml
secrets: inherit
windows:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
needs: [ prechecks ]
uses: ./.github/workflows/windows_python.yml
secrets: inherit
all:
needs: [ windows, unit-tests, bootstrap ]
runs-on: ubuntu-latest

View File

@@ -14,10 +14,10 @@ jobs:
build-paraview-deps:
runs-on: windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: 3.9
- name: Install Python packages

View File

@@ -1,5 +1,5 @@
black==23.12.1
clingo==5.6.2
black==24.3.0
clingo==5.7.1
flake8==7.0.0
isort==5.13.2
mypy==1.8.0

View File

@@ -51,10 +51,10 @@ jobs:
on_develop: false
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -91,17 +91,19 @@ jobs:
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8
with:
flags: unittests,linux,${{ matrix.concretizer }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
# Test shell integration
shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: '3.11'
- name: Install System packages
@@ -122,9 +124,11 @@ jobs:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8
with:
flags: shelltests,linux
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
# Test RHEL8 UBI with platform Python. This job is run
# only on PRs modifying core Spack
@@ -137,7 +141,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@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Setup repo and non-root user
run: |
git --version
@@ -156,10 +160,10 @@ jobs:
clingo-cffi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: '3.11'
- name: Install System packages
@@ -181,20 +185,23 @@ jobs:
SPACK_TEST_SOLVER: clingo
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8
with:
flags: unittests,linux,clingo
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
# Run unit tests on MacOS
macos:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, macos-14]
python-version: ["3.11"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -216,6 +223,8 @@ jobs:
$(which spack) solve zlib
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
$(which spack) unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8
with:
flags: unittests,macos
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

View File

@@ -18,8 +18,8 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: '3.11'
cache: 'pip'
@@ -35,10 +35,10 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: '3.11'
cache: 'pip'
@@ -56,6 +56,7 @@ jobs:
share/spack/qa/run-style-tests
audit:
uses: ./.github/workflows/audit.yaml
secrets: inherit
with:
with_coverage: ${{ inputs.with_coverage }}
python_version: '3.11'
@@ -69,7 +70,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@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Setup repo and non-root user
run: |
git --version

View File

@@ -15,10 +15,10 @@ jobs:
unit-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: 3.9
- name: Install Python packages
@@ -33,16 +33,18 @@ jobs:
./share/spack/qa/validate_last_exit.ps1
coverage combine -a
coverage xml
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8
with:
flags: unittests,windows
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
unit-tests-cmd:
runs-on: windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: 3.9
- name: Install Python packages
@@ -57,16 +59,18 @@ jobs:
./share/spack/qa/validate_last_exit.ps1
coverage combine -a
coverage xml
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8
with:
flags: unittests,windows
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
build-abseil:
runs-on: windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: 3.9
- name: Install Python packages

View File

@@ -42,3 +42,8 @@ concretizer:
# "minimal": allows the duplication of 'build-tools' nodes only (e.g. py-setuptools, cmake etc.)
# "full" (experimental): allows separation of the entire build-tool stack (e.g. the entire "cmake" subDAG)
strategy: minimal
# Option to specify compatiblity between operating systems for reuse of compilers and packages
# Specified as a key: [list] where the key is the os that is being targeted, and the list contains the OS's
# it can reuse. Note this is a directional compatibility so mutual compatibility between two OS's
# requires two entries i.e. os_compatible: {sonoma: [monterey], monterey: [sonoma]}
os_compatible: {}

View File

@@ -101,6 +101,12 @@ config:
verify_ssl: true
# This is where custom certs for proxy/firewall are stored.
# It can be a path or environment variable. To match ssl env configuration
# the default is the environment variable SSL_CERT_FILE
ssl_certs: $SSL_CERT_FILE
# Suppress gpg warnings from binary package verification
# Only suppresses warnings, gpg failure will still fail the install
# Potential rationale to set True: users have already explicitly trusted the

View File

@@ -24,6 +24,7 @@ packages:
elf: [elfutils]
fftw-api: [fftw, amdfftw]
flame: [libflame, amdlibflame]
fortran-rt: [gcc-runtime, intel-oneapi-runtime]
fuse: [libfuse]
gl: [glx, osmesa]
glu: [mesa-glu, openglu]
@@ -34,7 +35,9 @@ packages:
java: [openjdk, jdk, ibm-java]
jpeg: [libjpeg-turbo, libjpeg]
lapack: [openblas, amdlibflame]
libgfortran: [ gcc-runtime ]
libglx: [mesa+glx, mesa18+glx]
libifcore: [ intel-oneapi-runtime ]
libllvm: [llvm]
libosmesa: [mesa+osmesa, mesa18+osmesa]
lua-lang: [lua, lua-luajit-openresty, lua-luajit]

View File

@@ -1119,6 +1119,9 @@ and ``3.4.2``. Similarly, ``@4.2:`` means any version above and including
``4.2``. As a short-hand, ``@3`` is equivalent to the range ``@3:3`` and
includes any version with major version ``3``.
Versions are ordered lexicograpically by its components. For more details
on the order, see :ref:`the packaging guide <version-comparison>`.
Notice that you can distinguish between the specific version ``@=3.2`` and
the range ``@3.2``. This is useful for packages that follow a versioning
scheme that omits the zero patch version number: ``3.2``, ``3.2.1``,
@@ -1130,6 +1133,10 @@ A version specifier can also be a list of ranges and specific versions,
separated by commas. For example, ``@1.0:1.5,=1.7.1`` matches any version
in the range ``1.0:1.5`` and the specific version ``1.7.1``.
^^^^^^^^^^^^
Git versions
^^^^^^^^^^^^
For packages with a ``git`` attribute, ``git`` references
may be specified instead of a numerical version i.e. branches, tags
and commits. Spack will stage and build based off the ``git``

View File

@@ -87,7 +87,7 @@ You can check what is installed in the bootstrapping store at any time using:
.. code-block:: console
% spack find -b
% spack -b find
==> Showing internal bootstrap store at "/Users/spack/.spack/bootstrap/store"
==> 11 installed packages
-- darwin-catalina-x86_64 / apple-clang@12.0.0 ------------------
@@ -101,7 +101,7 @@ In case it is needed you can remove all the software in the current bootstrappin
% spack clean -b
==> Removing bootstrapped software and configuration in "/Users/spack/.spack/bootstrap"
% spack find -b
% spack -b find
==> Showing internal bootstrap store at "/Users/spack/.spack/bootstrap/store"
==> 0 installed packages
@@ -175,4 +175,4 @@ bootstrapping.
This command needs to be run on a machine with internet access and the resulting folder
has to be moved over to the air-gapped system. Once the local sources are added using the
commands suggested at the prompt, they can be used to bootstrap Spack.
commands suggested at the prompt, they can be used to bootstrap Spack.

View File

@@ -250,7 +250,7 @@ generator is Ninja. To switch to the Ninja generator, simply add:
.. code-block:: python
generator = "Ninja"
generator("ninja")
``CMakePackage`` defaults to "Unix Makefiles". If you switch to the

View File

@@ -173,6 +173,72 @@ arguments to ``Makefile.PL`` or ``Build.PL`` by overriding
]
^^^^^^^
Testing
^^^^^^^
``PerlPackage`` provides a simple stand-alone test of the successfully
installed package to confirm that installed perl module(s) can be used.
These tests can be performed any time after the installation using
``spack -v test run``. (For more information on the command, see
:ref:`cmd-spack-test-run`.)
The base class automatically detects perl modules based on the presence
of ``*.pm`` files under the package's library directory. For example,
the files under ``perl-bignum``'s perl library are:
.. code-block:: console
$ find . -name "*.pm"
./bigfloat.pm
./bigrat.pm
./Math/BigFloat/Trace.pm
./Math/BigInt/Trace.pm
./Math/BigRat/Trace.pm
./bigint.pm
./bignum.pm
which results in the package having the ``use_modules`` property containing:
.. code-block:: python
use_modules = [
"bigfloat",
"bigrat",
"Math::BigFloat::Trace",
"Math::BigInt::Trace",
"Math::BigRat::Trace",
"bigint",
"bignum",
]
.. note::
This list can often be used to catch missing dependencies.
If the list is somehow wrong, you can provide the names of the modules
yourself by overriding ``use_modules`` like so:
.. code-block:: python
use_modules = ["bigfloat", "bigrat", "bigint", "bignum"]
If you only want a subset of the automatically detected modules to be
tested, you could instead define the ``skip_modules`` property on the
package. So, instead of overriding ``use_modules`` as shown above, you
could define the following:
.. code-block:: python
skip_modules = [
"Math::BigFloat::Trace",
"Math::BigInt::Trace",
"Math::BigRat::Trace",
]
for the same use tests.
^^^^^^^^^^^^^^^^^^^^^
Alternatives to Spack
^^^^^^^^^^^^^^^^^^^^^

View File

@@ -199,6 +199,7 @@ def setup(sphinx):
("py:class", "contextlib.contextmanager"),
("py:class", "module"),
("py:class", "_io.BufferedReader"),
("py:class", "_io.BytesIO"),
("py:class", "unittest.case.TestCase"),
("py:class", "_frozen_importlib_external.SourceFileLoader"),
("py:class", "clingo.Control"),
@@ -215,6 +216,7 @@ def setup(sphinx):
("py:class", "spack.spec.InstallStatus"),
("py:class", "spack.spec.SpecfileReaderBase"),
("py:class", "spack.install_test.Pb"),
("py:class", "spack.filesystem_view.SimpleFilesystemView"),
]
# The reST default role (used for this markup: `text`) to use for all documents.

View File

@@ -145,6 +145,22 @@ hosts when making ``ssl`` connections. Set to ``false`` to disable, and
tools like ``curl`` will use their ``--insecure`` options. Disabling
this can expose you to attacks. Use at your own risk.
--------------------
``ssl_certs``
--------------------
Path to custom certificats for SSL verification. The value can be a
filesytem path, or an environment variable that expands to a file path.
The default value is set to the environment variable ``SSL_CERT_FILE``
to use the same syntax used by many other applications that automatically
detect custom certificates.
When ``url_fetch_method:curl`` the ``config:ssl_certs`` should resolve to
a single file. Spack will then set the environment variable ``CURL_CA_BUNDLE``
in the subprocess calling ``curl``.
If ``url_fetch_method:urllib`` then files and directories are supported i.e.
``config:ssl_certs:$SSL_CERT_FILE`` or ``config:ssl_certs:$SSL_CERT_DIR``
will work.
--------------------
``checksum``
--------------------

View File

@@ -73,9 +73,12 @@ are six configuration scopes. From lowest to highest:
Spack instance per project) or for site-wide settings on a multi-user
machine (e.g., for a common Spack instance).
#. **plugin**: Read from a Python project's entry points. Settings here affect
all instances of Spack running with the same Python installation. This scope takes higher precedence than site, system, and default scopes.
#. **user**: Stored in the home directory: ``~/.spack/``. These settings
affect all instances of Spack and take higher precedence than site,
system, or defaults scopes.
system, plugin, or defaults scopes.
#. **custom**: Stored in a custom directory specified by ``--config-scope``.
If multiple scopes are listed on the command line, they are ordered
@@ -196,6 +199,45 @@ with MPICH. You can create different configuration scopes for use with
mpi: [mpich]
.. _plugin-scopes:
^^^^^^^^^^^^^
Plugin scopes
^^^^^^^^^^^^^
.. note::
Python version >= 3.8 is required to enable plugin configuration.
Spack can be made aware of configuration scopes that are installed as part of a python package. To do so, register a function that returns the scope's path to the ``"spack.config"`` entry point. Consider the Python package ``my_package`` that includes Spack configurations:
.. code-block:: console
my-package/
├── src
│   ├── my_package
│   │   ├── __init__.py
│   │   └── spack/
│   │   │   └── config.yaml
└── pyproject.toml
adding the following to ``my_package``'s ``pyproject.toml`` will make ``my_package``'s ``spack/`` configurations visible to Spack when ``my_package`` is installed:
.. code-block:: toml
[project.entry_points."spack.config"]
my_package = "my_package:get_config_path"
The function ``my_package.get_extension_path`` in ``my_package/__init__.py`` might look like
.. code-block:: python
import importlib.resources
def get_config_path():
dirname = importlib.resources.files("my_package").joinpath("spack")
if dirname.exists():
return str(dirname)
.. _platform-scopes:
------------------------

View File

@@ -357,91 +357,23 @@ If there is a hook that you would like and is missing, you can propose to add a
``pre_install(spec)``
"""""""""""""""""""""
A ``pre_install`` hook is run within an install subprocess, directly before
the install starts. It expects a single argument of a spec, and is run in
a multiprocessing subprocess. Note that if you see ``pre_install`` functions associated with packages these are not hooks
as we have defined them here, but rather callback functions associated with
a package install.
A ``pre_install`` hook is run within the install subprocess, directly before the install starts.
It expects a single argument of a spec.
""""""""""""""""""""""
``post_install(spec)``
""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""
``post_install(spec, explicit=None)``
"""""""""""""""""""""""""""""""""""""
A ``post_install`` hook is run within an install subprocess, directly after
the install finishes, but before the build stage is removed. If you
write one of these hooks, you should expect it to accept a spec as the only
argument. This is run in a multiprocessing subprocess. This ``post_install`` is
also seen in packages, but in this context not related to the hooks described
here.
A ``post_install`` hook is run within the install subprocess, directly after the install finishes,
but before the build stage is removed and the spec is registered in the database. It expects two
arguments: spec and an optional boolean indicating whether this spec is being installed explicitly.
""""""""""""""""""""""""""""""""""""""""""""""""""""
``pre_uninstall(spec)`` and ``post_uninstall(spec)``
""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""
``on_install_start(spec)``
""""""""""""""""""""""""""
This hook is run at the beginning of ``lib/spack/spack/installer.py``,
in the install function of a ``PackageInstaller``,
and importantly is not part of a build process, but before it. This is when
we have just newly grabbed the task, and are preparing to install. If you
write a hook of this type, you should provide the spec to it.
.. code-block:: python
def on_install_start(spec):
"""On start of an install, we want to...
"""
print('on_install_start')
""""""""""""""""""""""""""""
``on_install_success(spec)``
""""""""""""""""""""""""""""
This hook is run on a successful install, and is also run inside the build
process, akin to ``post_install``. The main difference is that this hook
is run outside of the context of the stage directory, meaning after the
build stage has been removed and the user is alerted that the install was
successful. If you need to write a hook that is run on success of a particular
phase, you should use ``on_phase_success``.
""""""""""""""""""""""""""""
``on_install_failure(spec)``
""""""""""""""""""""""""""""
This hook is run given an install failure that happens outside of the build
subprocess, but somewhere in ``installer.py`` when something else goes wrong.
If you need to write a hook that is relevant to a failure within a build
process, you would want to instead use ``on_phase_failure``.
"""""""""""""""""""""""""""
``on_install_cancel(spec)``
"""""""""""""""""""""""""""
The same, but triggered if a spec install is cancelled for any reason.
"""""""""""""""""""""""""""""""""""""""""""""""
``on_phase_success(pkg, phase_name, log_file)``
"""""""""""""""""""""""""""""""""""""""""""""""
This hook is run within the install subprocess, and specifically when a phase
successfully finishes. Since we are interested in the package, the name of
the phase, and any output from it, we require:
- **pkg**: the package variable, which also has the attached spec at ``pkg.spec``
- **phase_name**: the name of the phase that was successful (e.g., configure)
- **log_file**: the path to the file with output, in case you need to inspect or otherwise interact with it.
"""""""""""""""""""""""""""""""""""""""""""""
``on_phase_error(pkg, phase_name, log_file)``
"""""""""""""""""""""""""""""""""""""""""""""
In the case of an error during a phase, we might want to trigger some event
with a hook, and this is the purpose of this particular hook. Akin to
``on_phase_success`` we require the same variables - the package that failed,
the name of the phase, and the log file where we might find errors.
These hooks are currently used for cleaning up module files after uninstall.
^^^^^^^^^^^^^^^^^^^^^^

View File

@@ -416,6 +416,23 @@ that git clone if ``foo`` is in the environment.
Further development on ``foo`` can be tested by reinstalling the environment,
and eventually committed and pushed to the upstream git repo.
If the package being developed supports out-of-source builds then users can use the
``--build_directory`` flag to control the location and name of the build directory.
This is a shortcut to set the ``package_attributes:build_directory`` in the
``packages`` configuration (see :ref:`assigning-package-attributes`).
The supplied location will become the build-directory for that package in all future builds.
.. warning::
Potential pitfalls of setting the build directory
Spack does not check for out-of-source build compatibility with the packages and
so the onerous of making sure the package supports out-of-source builds is on
the user.
For example, most ``autotool`` and ``makefile`` packages do not support out-of-source builds
while all ``CMake`` packages do.
Understanding these nuances are on the software developers and we strongly encourage
developers to only redirect the build directory if they understand their package's
build-system.
^^^^^^^
Loading
^^^^^^^
@@ -472,11 +489,11 @@ a ``packages.yaml`` file) could contain:
.. code-block:: yaml
spack:
...
# ...
packages:
all:
compiler: [intel]
...
# ...
This configuration sets the default compiler for all packages to
``intel``.
@@ -822,7 +839,7 @@ directories.
.. code-block:: yaml
spack:
...
# ...
view:
mpis:
root: /path/to/view
@@ -866,7 +883,7 @@ automatically named ``default``, so that
.. code-block:: yaml
spack:
...
# ...
view: True
is equivalent to
@@ -874,7 +891,7 @@ is equivalent to
.. code-block:: yaml
spack:
...
# ...
view:
default:
root: .spack-env/view
@@ -884,7 +901,7 @@ and
.. code-block:: yaml
spack:
...
# ...
view: /path/to/view
is equivalent to
@@ -892,7 +909,7 @@ is equivalent to
.. code-block:: yaml
spack:
...
# ...
view:
default:
root: /path/to/view
@@ -935,6 +952,17 @@ function, as shown in the example below:
^mpi: "{name}-{version}/{^mpi.name}-{^mpi.version}-{compiler.name}-{compiler.version}"
all: "{name}-{version}/{compiler.name}-{compiler.version}"
Projections also permit environment and spack configuration variable
expansions as shown below:
.. code-block:: yaml
projections:
all: "{name}-{version}/{compiler.name}-{compiler.version}/$date/$SYSTEM_ENV_VARIBLE"
where ``$date`` is the spack configuration variable that will expand with the ``YYYY-MM-DD``
format and ``$SYSTEM_ENV_VARIABLE`` is an environment variable defined in the shell.
The entries in the projections configuration file must all be either
specs or the keyword ``all``. For each spec, the projection used will
be the first non-``all`` entry that the spec satisfies, or ``all`` if

View File

@@ -111,3 +111,39 @@ The corresponding unit tests can be run giving the appropriate options to ``spac
(5 durations < 0.005s hidden. Use -vv to show these durations.)
=========================================== 5 passed in 5.06s ============================================
---------------------------------------
Registering Extensions via Entry Points
---------------------------------------
.. note::
Python version >= 3.8 is required to register extensions via entry points.
Spack can be made aware of extensions that are installed as part of a python package. To do so, register a function that returns the extension path, or paths, to the ``"spack.extensions"`` entry point. Consider the Python package ``my_package`` that includes a Spack extension:
.. code-block:: console
my-package/
├── src
│   ├── my_package
│   │   └── __init__.py
│   └── spack-scripting/ # the spack extensions
└── pyproject.toml
adding the following to ``my_package``'s ``pyproject.toml`` will make the ``spack-scripting`` extension visible to Spack when ``my_package`` is installed:
.. code-block:: toml
[project.entry_points."spack.extenions"]
my_package = "my_package:get_extension_path"
The function ``my_package.get_extension_path`` in ``my_package/__init__.py`` might look like
.. code-block:: python
import importlib.resources
def get_extension_path():
dirname = importlib.resources.files("my_package").joinpath("spack-scripting")
if dirname.exists():
return str(dirname)

View File

@@ -250,9 +250,10 @@ Compiler configuration
Spack has the ability to build packages with multiple compilers and
compiler versions. Compilers can be made available to Spack by
specifying them manually in ``compilers.yaml``, or automatically by
running ``spack compiler find``, but for convenience Spack will
automatically detect compilers the first time it needs them.
specifying them manually in ``compilers.yaml`` or ``packages.yaml``,
or automatically by running ``spack compiler find``, but for
convenience Spack will automatically detect compilers the first time
it needs them.
.. _cmd-spack-compilers:
@@ -457,6 +458,48 @@ specification. The operations available to modify the environment are ``set``, `
prepend_path: # Similar for append|remove_path
LD_LIBRARY_PATH: /ld/paths/added/by/setvars/sh
.. note::
Spack is in the process of moving compilers from a separate
attribute to be handled like all other packages. As part of this
process, the ``compilers.yaml`` section will eventually be replaced
by configuration in the ``packages.yaml`` section. This new
configuration is now available, although it is not yet the default
behavior.
Compilers can also be configured as external packages in the
``packages.yaml`` config file. Any external package for a compiler
(e.g. ``gcc`` or ``llvm``) will be treated as a configured compiler
assuming the paths to the compiler executables are determinable from
the prefix.
If the paths to the compiler executable are not determinable from the
prefix, you can add them to the ``extra_attributes`` field. Similarly,
all other fields from the compilers config can be added to the
``extra_attributes`` field for an external representing a compiler.
.. code-block:: yaml
packages:
gcc:
external:
- spec: gcc@12.2.0 arch=linux-rhel8-skylake
prefix: /usr
extra_attributes:
environment:
set:
GCC_ROOT: /usr
external:
- spec: llvm+clang@15.0.0 arch=linux-rhel8-skylake
prefix: /usr
extra_attributes:
paths:
cc: /usr/bin/clang-with-suffix
cxx: /usr/bin/clang++-with-extra-info
fc: /usr/bin/gfortran
f77: /usr/bin/gfortran
extra_rpaths:
- /usr/lib/llvm/
^^^^^^^^^^^^^^^^^^^^^^^
Build Your Own Compiler
@@ -623,7 +666,7 @@ Fortran.
compilers:
- compiler:
...
# ...
paths:
cc: /usr/bin/clang
cxx: /usr/bin/clang++

View File

@@ -10,7 +10,7 @@ Modules (modules.yaml)
======================
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
is a common practice at HPC centers that is sometimes 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
@@ -21,14 +21,38 @@ Modules are one of several ways you can use Spack packages. For other
options that may fit your use case better, you should also look at
:ref:`spack load <spack-load>` and :ref:`environments <environments>`.
----------------------------
Using module files via Spack
----------------------------
-----------
Quick start
-----------
If you have installed a supported module system you should be able to
run ``module avail`` to see what module
files have been installed. Here is sample output of those programs,
showing lots of installed packages:
In the current version of Spack, module files are not generated by default. To get started, you
can generate module files for all currently installed packages by running either
.. code-block:: console
$ spack module tcl refresh
or
.. code-block:: console
$ spack module lmod refresh
Spack can also generate module files for all future installations automatically through the
following configuration:
.. code-block:: console
$ spack config add modules:default:enable:[tcl]
or
.. code-block:: console
$ spack config add modules:default:enable:[lmod]
Assuming you have a module system installed, you should now be able to use the ``module`` command
to interact with them:
.. code-block:: console
@@ -65,33 +89,17 @@ scheme used at your site.
Module file customization
-------------------------
Module files are generated by post-install hooks after the successful
installation of a package.
.. note::
Spack only generates modulefiles when a package is installed. If
you attempt to install a package and it is already installed, Spack
will not regenerate modulefiles for the package. This may lead to
inconsistent modulefiles if the Spack module configuration has
changed since the package was installed, either by editing a file
or changing scopes or environments.
Later in this section there is a subsection on :ref:`regenerating
modules <cmd-spack-module-refresh>` that will allow you to bring
your modules to a consistent state.
The table below summarizes the essential information associated with
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 |
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
| **Lua - Hierarchical** | ``lmod`` | share/spack/lmod | share/spack/templates/modules/modulefile.lua | Lmod |
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
+-----------+--------------+------------------------------+----------------------------------------------+----------------------+
| | Hierarchical | **Default root directory** | **Default template file** | **Compatible tools** |
+===========+==============+==============================+==============================================+======================+
| ``tcl`` | No | share/spack/modules | share/spack/templates/modules/modulefile.tcl | Env. Modules/Lmod |
+-----------+--------------+------------------------------+----------------------------------------------+----------------------+
| ``lmod`` | Yes | share/spack/lmod | share/spack/templates/modules/modulefile.lua | Lmod |
+-----------+--------------+------------------------------+----------------------------------------------+----------------------+
Spack ships with sensible defaults for the generation of module files, but
@@ -102,7 +110,7 @@ In general you can override or extend the default behavior by:
2. writing specific rules in the ``modules.yaml`` configuration file
3. writing your own templates to override or extend the defaults
The former method let you express changes in the run-time environment
The former method lets you express changes in the run-time environment
that are needed to use the installed software properly, e.g. injecting variables
from language interpreters into their extensions. The latter two instead permit to
fine tune the filesystem layout, content and creation of module files to meet
@@ -110,79 +118,62 @@ site specific conventions.
.. _overide-api-calls-in-package-py:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Override API calls in ``package.py``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Setting environment variables dynamically in ``package.py``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are two methods that you can override in any ``package.py`` to affect the
content of the module files generated by Spack. The first one:
There are two methods that you can implement in any ``package.py`` to dynamically affect the
content of the module files generated by Spack. The most important one is
``setup_run_environment``, which can be used to set environment variables in the module file that
depend on the spec:
.. code-block:: python
def setup_run_environment(self, env):
pass
if self.spec.satisfies("+foo"):
env.set("FOO", "bar")
can alter the content of the module file associated with the same package where it is overridden.
The second method:
The second, less commonly used, is ``setup_dependent_run_environment(self, env, dependent_spec)``,
which allows a dependency to set variables in the module file of its dependents. This is typically
used in packages like ``python``, ``r``, or ``perl`` to prepend the dependent's prefix to the
search path of the interpreter (``PYTHONPATH``, ``R_LIBS``, ``PERL5LIB`` resp.), so it can locate
the packages at runtime.
For example, a simplified version of the ``python`` package could look like this:
.. code-block:: python
def setup_dependent_run_environment(self, env, dependent_spec):
pass
if dependent_spec.package.extends(self.spec):
env.prepend_path("PYTHONPATH", dependent_spec.prefix.lib.python)
can instead inject run-time environment modifications in the module files of packages
that depend on it. In both cases you need to fill ``env`` with the desired
list of environment modifications.
.. admonition:: The ``r`` package and callback APIs
An example in which it is crucial to override both methods
is given by the ``r`` package. This package installs libraries and headers
in non-standard locations and it is possible to prepend the appropriate directory
to the corresponding environment variables:
================== =================================
LD_LIBRARY_PATH ``self.prefix/rlib/R/lib``
PKG_CONFIG_PATH ``self.prefix/rlib/pkgconfig``
================== =================================
with the following snippet:
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/r/package.py
:pyobject: R.setup_run_environment
The ``r`` package also knows which environment variable should be modified
to make language extensions provided by other packages available, and modifies
it appropriately in the override of the second method:
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/r/package.py
:pyobject: R.setup_dependent_run_environment
and would make any package that ``extends("python")`` have its library directory added to the
``PYTHONPATH`` environment variable in the module file. It's much more convenient to set this
variable here, than to repeat it in every Python extension's ``setup_run_environment`` method.
.. _modules-yaml:
^^^^^^^^^^^^^^^^^^^^^^^^^^
Write a configuration file
^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``modules.yaml`` config file and module sets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The configuration files that control module generation behavior
are named ``modules.yaml``. The default configuration:
The configuration files that control module generation behavior are named ``modules.yaml``. The
default configuration looks like this:
.. literalinclude:: _spack_root/etc/spack/defaults/modules.yaml
:language: yaml
activates the hooks to generate ``tcl`` module files and inspects
the installation folder of each package for the presence of a set of subdirectories
(``bin``, ``man``, ``share/man``, etc.). If any is found its full path is prepended
to the environment variables listed below the folder name.
You can define one or more **module sets**, each of which can be configured separately with regard
to install location, naming scheme, inclusion and exclusion, autoloading, et cetera.
Spack modules can be configured for multiple module sets. The default
module set is named ``default``. All Spack commands which operate on
modules default to apply the ``default`` module set, but can be
applied to any module set in the configuration.
The default module set is aptly named ``default``. All
:ref:`Spack commands that operate on modules <maintaining-module-files>` apply to the ``default``
module set, unless another module set is specified explicitly (with the ``--name`` flag).
"""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^
Changing the modules root
"""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^
As shown in the table above, the default module root for ``lmod`` is
``$spack/share/spack/lmod`` and the default root for ``tcl`` is
@@ -198,7 +189,7 @@ set by changing the ``roots`` key of the configuration.
my_custom_lmod_modules:
roots:
lmod: /path/to/install/custom/lmod/modules
...
# ...
This configuration will create two module sets. The default module set
will install its ``tcl`` modules to ``/path/to/install/tcl/modules``
@@ -224,25 +215,32 @@ location could be confusing to users of your modules. In the next
section, we will discuss enabling and disabling module types (module
file generators) for each module set.
""""""""""""""""""""
Activate other hooks
""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Automatically generating module files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Any other module file generator shipped with Spack can be activated adding it to the
list under the ``enable`` key in the module file. Currently the only generator that
is not active by default is ``lmod``, which produces hierarchical lua module files.
Each module system can then be configured separately. In fact, you should list configuration
options that affect a particular type of module files under a top level key corresponding
to the generator being customized:
Spack can be configured to automatically generate module files as part of package installation.
This is done by adding the desired module systems to the ``enable`` list.
.. code-block:: yaml
modules:
default:
enable:
- tcl
- lmod
- tcl
- lmod
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Configuring ``tcl`` and ``lmod`` modules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can configure the behavior of either module system separately, under a key corresponding to
the generator being customized:
.. code-block:: yaml
modules:
default:
tcl:
# contains environment modules specific customizations
lmod:
@@ -253,16 +251,82 @@ either change the layout of the module files on the filesystem, or they will aff
their content. For the latter point it is possible to use anonymous specs
to fine tune the set of packages on which the modifications should be applied.
.. _autoloading-dependencies:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Autoloading and hiding dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A module file should set the variables that are needed for an application to work. But since an
application often has many dependencies, where should all the environment variables for those be
set? In Spack the rule is that each package sets the runtime variables that are needed by the
package itself, and no more. This way, dependencies can be loaded standalone too, and duplication
of environment variables is avoided.
That means however that if you want to use an application, you need to load the modules for all its
dependencies. Of course this is not something you would want users to do manually.
Since Spack knows the dependency graph of every package, it can easily generate module files that
automatically load the modules for its dependencies recursively. It is enabled by default for both
Lmod and Environment Modules under the ``autoload: direct`` config option. The former system has
builtin support through the ``depends_on`` function, the latter simply uses a ``module load``
statement. Both module systems (at least in newer versions) do reference counting, so that if a
module is loaded by two different modules, it will only be unloaded after the others are.
The ``autoload`` key accepts the values:
* ``none``: no autoloading
* ``run``: autoload direct *run* type dependencies
* ``direct``: autoload direct *link and run* type dependencies
* ``all``: autoload all dependencies
In case of ``run`` and ``direct``, a ``module load`` triggers a recursive load.
The ``direct`` option is most correct: there are cases where pure link dependencies need to set
variables for themselves, or need to have variables of their own dependencies set.
In practice however, ``run`` is often sufficient, and may make ``module load`` snappier.
The ``all`` option is discouraged and seldomly used.
A common complaint about autoloading is the large number of modules that are visible to the user.
Spack has a solution for this as well: ``hide_implicits: true``. This ensures that only those
packages you've explicitly installed are exposed by ``module avail``, but still allows for
autoloading of hidden dependencies. Lmod should support hiding implicits in general, while
Environment Modules requires version 4.7 or higher.
.. note::
If supported by your module system, we highly encourage the following configuration that enables
autoloading and hiding of implicits. It ensures all runtime variables are set correctly,
including those for dependencies, without overwhelming the user with a large number of available
modules. Further, it makes it easier to get readable module names without collisions, see the
section below on :ref:`modules-projections`.
.. code-block:: yaml
modules:
default:
tcl:
hide_implicits: true
all:
autoload: direct # or `run`
lmod:
hide_implicits: true
all:
autoload: direct # or `run`
.. _anonymous_specs:
""""""""""""""""""""""""""""
Selection by anonymous specs
""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Setting environment variables for selected packages in config
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In the configuration file you can use *anonymous specs* (i.e. specs
that **are not required to have a root package** and are thus used just
to express constraints) to apply certain modifications on a selected set
of the installed software. For instance, in the snippet below:
In the configuration file you can filter particular specs, and make further changes to the
environment variables that go into their module files. This is very powerful when you want to avoid
:ref:`modifying the package itself <overide-api-calls-in-package-py>`, or when you want to set
certain variables on multiple selected packages at once.
For instance, in the snippet below:
.. code-block:: yaml
@@ -305,12 +369,28 @@ the variable ``FOOBAR`` will be unset.
.. note::
Order does matter
The modifications associated with the ``all`` keyword are always evaluated
first, no matter where they appear in the configuration file. All the other
spec constraints are instead evaluated top to bottom.
first, no matter where they appear in the configuration file. All the other changes to
environment variables for matching specs are evaluated from top to bottom.
""""""""""""""""""""""""""""""""""""""""""""
.. warning::
As general advice, it's often better to set as few unnecessary variables as possible. For
example, the following seemingly innocent and potentially useful configuration
.. code-block:: yaml
all:
environment:
set:
"{name}_ROOT": "{prefix}"
sets ``BINUTILS_ROOT`` to its prefix in modules for ``binutils``, which happens to break
the ``gcc`` compiler: it uses this variable as its default search path for certain object
files and libraries, and by merely setting it, everything fails to link.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exclude or include specific module files
""""""""""""""""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can use anonymous specs also to prevent module files from being written or
to force them to be written. Consider the case where you want to hide from users
@@ -330,14 +410,19 @@ you will prevent the generation of module files for any package that
is compiled with ``gcc@4.4.7``, with the only exception of any ``gcc``
or any ``llvm`` installation.
It is safe to combine ``exclude`` and ``autoload``
:ref:`mentioned above <autoloading-dependencies>`. When ``exclude`` prevents a module file to be
generated for a dependency, the ``autoload`` feature will simply not generate a statement to load
it.
.. _modules-projections:
"""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Customize the naming of modules
"""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The names of environment modules generated by spack are not always easy to
The names of environment modules generated by Spack are not always easy to
fully comprehend due to the long hash in the name. There are three module
configuration options to help with that. The first is a global setting to
adjust the hash length. It can be set anywhere from 0 to 32 and has a default
@@ -353,6 +438,13 @@ shows how to set hash length in the module file names:
tcl:
hash_length: 7
.. tip::
Using ``hide_implicits: true`` (see :ref:`autoloading-dependencies`) vastly reduces the number
modules exposed to the user. The hidden modules always contain the hash in their name, and are
not influenced by the ``hash_length`` setting. Hidden implicits thus make it easier to use a
short hash length or no hash at all, without risking name conflicts.
To help make module names more readable, and to help alleviate name conflicts
with a short hash, one can use the ``suffixes`` option in the modules
configuration file. This option will add strings to modules that match a spec.
@@ -365,12 +457,12 @@ For instance, the following config options,
tcl:
all:
suffixes:
^python@2.7.12: 'python-2.7.12'
^python@3.12: 'python-3.12'
^openblas: 'openblas'
will add a ``python-2.7.12`` version string to any packages compiled with
python matching the spec, ``python@2.7.12``. This is useful to know which
version of python a set of python extensions is associated with. Likewise, the
will add a ``python-3.12`` version string to any packages compiled with
Python matching the spec, ``python@3.12``. This is useful to know which
version of Python a set of Python extensions is associated with. Likewise, the
``openblas`` string is attached to any program that has openblas in the spec,
most likely via the ``+blas`` variant specification.
@@ -468,41 +560,11 @@ that are already in the Lmod hierarchy.
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>`_.
""""""""""""""""""""""
Select default modules
""""""""""""""""""""""
By default, when multiple modules of the same name share a directory,
the highest version number will be the default module. This behavior
of the ``module`` command can be overridden with a symlink named
``default`` to the desired default module. If you wish to configure
default modules with Spack, add a ``defaults`` key to your modules
configuration:
.. code-block:: yaml
modules:
my-module-set:
tcl:
defaults:
- gcc@10.2.1
- hdf5@1.2.10+mpi+hl%gcc
These defaults may be arbitrarily specific. For any package that
satisfies a default, Spack will generate the module file in the
appropriate path, and will generate a default symlink to the module
file as well.
.. warning::
If Spack is configured to generate multiple default packages in the
same directory, the last modulefile to be generated will be the
default module.
.. _customize-env-modifications:
"""""""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Customize environment modifications
"""""""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can control which prefixes in a Spack package are added to
environment variables with the ``prefix_inspections`` section; this
@@ -600,9 +662,9 @@ stack to users who are likely to inspect the modules to find full
paths to software, when it is desirable to present the users with a
simpler set of paths than those generated by the Spack install tree.
""""""""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Filter out environment modifications
""""""""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Modifications to certain environment variables in module files are there by
default, for instance because they are generated by prefix inspections.
@@ -622,49 +684,37 @@ do so by using the ``exclude_env_vars``:
The configuration above will generate module files that will not contain
modifications to either ``CPATH`` or ``LIBRARY_PATH``.
^^^^^^^^^^^^^^^^^^^^^^
Select default modules
^^^^^^^^^^^^^^^^^^^^^^
.. _autoloading-dependencies:
"""""""""""""""""""""
Autoload dependencies
"""""""""""""""""""""
Often it is required for a module to have its (transient) dependencies loaded as well.
One example where this is useful is when one package needs to use executables provided
by its dependency; when the dependency is autoloaded, the executable will be in the
PATH. Similarly for scripting languages such as Python, packages and their dependencies
have to be loaded together.
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:
By default, when multiple modules of the same name share a directory,
the highest version number will be the default module. This behavior
of the ``module`` command can be overridden with a symlink named
``default`` to the desired default module. If you wish to configure
default modules with Spack, add a ``defaults`` key to your modules
configuration:
.. code-block:: yaml
modules:
default:
tcl:
all:
autoload: none
^python:
autoload: direct
modules:
my-module-set:
tcl:
defaults:
- gcc@10.2.1
- hdf5@1.2.10+mpi+hl%gcc
The configuration file above will produce module files that will
load their direct dependencies if the package installed depends on ``python``.
The allowed values for the ``autoload`` statement are either ``none``,
``direct`` or ``all``.
These defaults may be arbitrarily specific. For any package that
satisfies a default, Spack will generate the module file in the
appropriate path, and will generate a default symlink to the module
file as well.
.. note::
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 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.
.. warning::
If Spack is configured to generate multiple default packages in the
same directory, the last modulefile to be generated will be the
default module.
.. _maintaining-module-files:
------------------------
Maintaining Module Files

View File

@@ -487,6 +487,56 @@ present. For instance with a configuration like:
you will use ``mvapich2~cuda %gcc`` as an ``mpi`` provider.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Conflicts and strong preferences
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If the semantic of requirements is too strong, you can also express "strong preferences" and "conflicts"
from configuration files:
.. code-block:: yaml
packages:
all:
prefer:
- '%clang'
conflict:
- '+shared'
The ``prefer`` and ``conflict`` sections can be used whenever a ``require`` section is allowed.
The argument is always a list of constraints, and each constraint can be either a simple string,
or a more complex object:
.. code-block:: yaml
packages:
all:
conflict:
- spec: '%clang'
when: 'target=x86_64_v3'
message: 'reason why clang cannot be used'
The ``spec`` attribute is mandatory, while both ``when`` and ``message`` are optional.
.. note::
Requirements allow for expressing both "strong preferences" and "conflicts".
The syntax for doing so, though, may not be immediately clear. For
instance, if we want to prevent any package from using ``%clang``, we can set:
.. code-block:: yaml
packages:
all:
require:
- one_of: ['%clang', '@:']
Since only one of the requirements must hold, and ``@:`` is always true, the rule above is
equivalent to a conflict. For "strong preferences" we need to substitute the ``one_of`` policy
with ``any_of``.
.. _package-preferences:
-------------------
@@ -597,6 +647,8 @@ manually placed files within the install prefix are owned by the
assigned group. If no group is assigned, Spack will allow the OS
default behavior to go as expected.
.. _assigning-package-attributes:
----------------------------
Assigning Package Attributes
----------------------------
@@ -607,10 +659,11 @@ You can assign class-level attributes in the configuration:
packages:
mpileaks:
# Override existing attributes
url: http://www.somewhereelse.com/mpileaks-1.0.tar.gz
# ... or add new ones
x: 1
package_attributes:
# Override existing attributes
url: http://www.somewhereelse.com/mpileaks-1.0.tar.gz
# ... or add new ones
x: 1
Attributes set this way will be accessible to any method executed
in the package.py file (e.g. the ``install()`` method). Values for these

View File

@@ -893,26 +893,50 @@ as an option to the ``version()`` directive. Example situations would be a
"snapshot"-like Version Control System (VCS) tag, a VCS branch such as
``v6-16-00-patches``, or a URL specifying a regularly updated snapshot tarball.
.. _version-comparison:
^^^^^^^^^^^^^^^^^^
Version comparison
^^^^^^^^^^^^^^^^^^
Spack imposes a generic total ordering on the set of versions,
independently from the package they are associated with.
Most Spack versions are numeric, a tuple of integers; for example,
``0.1``, ``6.96`` or ``1.2.3.1``. Spack knows how to compare and sort
numeric versions.
``0.1``, ``6.96`` or ``1.2.3.1``. In this very basic case, version
comparison is lexicographical on the numeric components:
``1.2 < 1.2.1 < 1.2.2 < 1.10``.
Some Spack versions involve slight extensions of numeric syntax; for
example, ``py-sphinx-rtd-theme@=0.1.10a0``. In this case, numbers are
always considered to be "newer" than letters. This is for consistency
with `RPM <https://bugzilla.redhat.com/show_bug.cgi?id=50977>`_.
Spack can also supports string components such as ``1.1.1a`` and
``1.y.0``. String components are considered less than numeric
components, so ``1.y.0 < 1.0``. This is for consistency with
`RPM <https://bugzilla.redhat.com/show_bug.cgi?id=50977>`_. String
components do not have to be separated by dots or any other delimiter.
So, the contrived version ``1y0`` is identical to ``1.y.0``.
Spack versions may also be arbitrary non-numeric strings, for example
``develop``, ``master``, ``local``.
Pre-release suffixes also contain string parts, but they are handled
in a special way. For example ``1.2.3alpha1`` is parsed as a pre-release
of the version ``1.2.3``. This allows Spack to order it before the
actual release: ``1.2.3alpha1 < 1.2.3``. Spack supports alpha, beta and
release candidate suffixes: ``1.2alpha1 < 1.2beta1 < 1.2rc1 < 1.2``. Any
suffix not recognized as a pre-release is treated as an ordinary
string component, so ``1.2 < 1.2-mysuffix``.
The order on versions is defined as follows. A version string is split
into a list of components based on delimiters such as ``.``, ``-`` etc.
Lists are then ordered lexicographically, where components are ordered
as follows:
Finally, there are a few special string components that are considered
"infinity versions". They include ``develop``, ``main``, ``master``,
``head``, ``trunk``, and ``stable``. For example: ``1.2 < develop``.
These are useful for specifying the most recent development version of
a package (often a moving target like a git branch), without assigning
a specific version number. Infinity versions are not automatically used when determining the latest version of a package unless explicitly required by another package or user.
More formally, the order on versions is defined as follows. A version
string is split into a list of components based on delimiters such as
``.`` and ``-`` and string boundaries. The components are split into
the **release** and a possible **pre-release** (if the last component
is numeric and the second to last is a string ``alpha``, ``beta`` or ``rc``).
The release components are ordered lexicographically, with comparsion
between different types of components as follows:
#. The following special strings are considered larger than any other
numeric or non-numeric version component, and satisfy the following
@@ -925,6 +949,9 @@ as follows:
#. All other non-numeric components are less than numeric components,
and are ordered alphabetically.
Finally, if the release components are equal, the pre-release components
are used to break the tie, in the obvious way.
The logic behind this sort order is two-fold:
#. Non-numeric versions are usually used for special cases while

View File

@@ -810,7 +810,7 @@ generated by ``spack ci generate``. You also want your generated rebuild jobs
.. code-block:: yaml
spack:
...
# ...
ci:
pipeline-gen:
- build-job:

View File

@@ -17,7 +17,7 @@ experimental software separately from the built-in repository. Spack
allows you to configure local repositories using either the
``repos.yaml`` or the ``spack repo`` command.
A package repository a directory structured like this::
A package repository is a directory structured like this::
repo/
repo.yaml

View File

@@ -2,12 +2,12 @@ sphinx==7.2.6
sphinxcontrib-programoutput==0.17
sphinx_design==0.5.0
sphinx-rtd-theme==2.0.0
python-levenshtein==0.23.0
python-levenshtein==0.25.0
docutils==0.20.1
pygments==2.17.2
urllib3==2.1.0
pytest==7.4.4
urllib3==2.2.1
pytest==8.1.1
isort==5.13.2
black==23.12.1
black==24.3.0
flake8==7.0.0
mypy==1.8.0
mypy==1.9.0

5
lib/spack/env/cc vendored
View File

@@ -248,7 +248,7 @@ case "$command" in
lang_flags=C
debug_flags="-g"
;;
c++|CC|g++|clang++|armclang++|icpc|icpx|dpcpp|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
command="$SPACK_CXX"
language="C++"
comp="CXX"
@@ -526,7 +526,7 @@ categorize_arguments() {
continue
fi
replaced="$after$stripped"
replaced="$after$stripped"
# it matched, remove it
shift
@@ -913,4 +913,3 @@ fi
# Execute the full command, preserving spaces with IFS set
# to the alarm bell separator.
IFS="$lsep"; exec $full_command_list

View File

@@ -18,7 +18,7 @@
* Homepage: https://pypi.python.org/pypi/archspec
* Usage: Labeling, comparison and detection of microarchitectures
* Version: 0.2.2 (commit 1dc58a5776dd77e6fc6e4ba5626af5b1fb24996e)
* Version: 0.2.3 (commit 7b8fe60b69e2861e7dac104bc1c183decfcd3daf)
astunparse
----------------

View File

@@ -1,2 +1,3 @@
"""Init file to avoid namespace packages"""
__version__ = "0.2.2"
__version__ = "0.2.3"

View File

@@ -3,6 +3,7 @@
"""
import sys
from .cli import main
sys.exit(main())

View File

@@ -46,7 +46,11 @@ def _make_parser() -> argparse.ArgumentParser:
def cpu() -> int:
"""Run the `archspec cpu` subcommand."""
print(archspec.cpu.host())
try:
print(archspec.cpu.host())
except FileNotFoundError as exc:
print(exc)
return 1
return 0

View File

@@ -5,10 +5,14 @@
"""The "cpu" package permits to query and compare different
CPU microarchitectures.
"""
from .microarchitecture import Microarchitecture, UnsupportedMicroarchitecture
from .microarchitecture import TARGETS, generic_microarchitecture
from .microarchitecture import version_components
from .detect import host
from .microarchitecture import (
TARGETS,
Microarchitecture,
UnsupportedMicroarchitecture,
generic_microarchitecture,
version_components,
)
__all__ = [
"Microarchitecture",

View File

@@ -4,15 +4,17 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Detection of CPU microarchitectures"""
import collections
import functools
import os
import platform
import re
import struct
import subprocess
import warnings
from typing import Dict, List, Optional, Set, Tuple, Union
from .microarchitecture import generic_microarchitecture, TARGETS
from .schema import TARGETS_JSON
from ..vendor.cpuid.cpuid import CPUID
from .microarchitecture import TARGETS, Microarchitecture, generic_microarchitecture
from .schema import CPUID_JSON, TARGETS_JSON
#: Mapping from operating systems to chain of commands
#: to obtain a dictionary of raw info on the current cpu
@@ -22,43 +24,46 @@
#: functions checking the compatibility of the host with a given target
COMPATIBILITY_CHECKS = {}
# Constants for commonly used architectures
X86_64 = "x86_64"
AARCH64 = "aarch64"
PPC64LE = "ppc64le"
PPC64 = "ppc64"
RISCV64 = "riscv64"
def info_dict(operating_system):
"""Decorator to mark functions that are meant to return raw info on
the current cpu.
def detection(operating_system: str):
"""Decorator to mark functions that are meant to return partial information on the current cpu.
Args:
operating_system (str or tuple): operating system for which the marked
function is a viable factory of raw info dictionaries.
operating_system: operating system where this function can be used.
"""
def decorator(factory):
INFO_FACTORY[operating_system].append(factory)
@functools.wraps(factory)
def _impl():
info = factory()
# Check that info contains a few mandatory fields
msg = 'field "{0}" is missing from raw info dictionary'
assert "vendor_id" in info, msg.format("vendor_id")
assert "flags" in info, msg.format("flags")
assert "model" in info, msg.format("model")
assert "model_name" in info, msg.format("model_name")
return info
return _impl
return factory
return decorator
@info_dict(operating_system="Linux")
def proc_cpuinfo():
"""Returns a raw info dictionary by parsing the first entry of
``/proc/cpuinfo``
"""
info = {}
def partial_uarch(
name: str = "", vendor: str = "", features: Optional[Set[str]] = None, generation: int = 0
) -> Microarchitecture:
"""Construct a partial microarchitecture, from information gathered during system scan."""
return Microarchitecture(
name=name,
parents=[],
vendor=vendor,
features=features or set(),
compilers={},
generation=generation,
)
@detection(operating_system="Linux")
def proc_cpuinfo() -> Microarchitecture:
"""Returns a partial Microarchitecture, obtained from scanning ``/proc/cpuinfo``"""
data = {}
with open("/proc/cpuinfo") as file: # pylint: disable=unspecified-encoding
for line in file:
key, separator, value = line.partition(":")
@@ -70,11 +75,96 @@ def proc_cpuinfo():
#
# we are on a blank line separating two cpus. Exit early as
# we want to read just the first entry in /proc/cpuinfo
if separator != ":" and info:
if separator != ":" and data:
break
info[key.strip()] = value.strip()
return info
data[key.strip()] = value.strip()
architecture = _machine()
if architecture == X86_64:
return partial_uarch(
vendor=data.get("vendor_id", "generic"), features=_feature_set(data, key="flags")
)
if architecture == AARCH64:
return partial_uarch(
vendor=_canonicalize_aarch64_vendor(data),
features=_feature_set(data, key="Features"),
)
if architecture in (PPC64LE, PPC64):
generation_match = re.search(r"POWER(\d+)", data.get("cpu", ""))
try:
generation = int(generation_match.group(1))
except AttributeError:
# There might be no match under emulated environments. For instance
# emulating a ppc64le with QEMU and Docker still reports the host
# /proc/cpuinfo and not a Power
generation = 0
return partial_uarch(generation=generation)
if architecture == RISCV64:
if data.get("uarch") == "sifive,u74-mc":
data["uarch"] = "u74mc"
return partial_uarch(name=data.get("uarch", RISCV64))
return generic_microarchitecture(architecture)
class CpuidInfoCollector:
"""Collects the information we need on the host CPU from cpuid"""
# pylint: disable=too-few-public-methods
def __init__(self):
self.cpuid = CPUID()
registers = self.cpuid.registers_for(**CPUID_JSON["vendor"]["input"])
self.highest_basic_support = registers.eax
self.vendor = struct.pack("III", registers.ebx, registers.edx, registers.ecx).decode(
"utf-8"
)
registers = self.cpuid.registers_for(**CPUID_JSON["highest_extension_support"]["input"])
self.highest_extension_support = registers.eax
self.features = self._features()
def _features(self):
result = set()
def check_features(data):
registers = self.cpuid.registers_for(**data["input"])
for feature_check in data["bits"]:
current = getattr(registers, feature_check["register"])
if self._is_bit_set(current, feature_check["bit"]):
result.add(feature_check["name"])
for call_data in CPUID_JSON["flags"]:
if call_data["input"]["eax"] > self.highest_basic_support:
continue
check_features(call_data)
for call_data in CPUID_JSON["extension-flags"]:
if call_data["input"]["eax"] > self.highest_extension_support:
continue
check_features(call_data)
return result
def _is_bit_set(self, register: int, bit: int) -> bool:
mask = 1 << bit
return register & mask > 0
@detection(operating_system="Windows")
def cpuid_info():
"""Returns a partial Microarchitecture, obtained from running the cpuid instruction"""
architecture = _machine()
if architecture == X86_64:
data = CpuidInfoCollector()
return partial_uarch(vendor=data.vendor, features=data.features)
return generic_microarchitecture(architecture)
def _check_output(args, env):
@@ -83,14 +173,25 @@ def _check_output(args, env):
return str(output.decode("utf-8"))
WINDOWS_MAPPING = {
"AMD64": "x86_64",
"ARM64": "aarch64",
}
def _machine():
""" "Return the machine architecture we are on"""
"""Return the machine architecture we are on"""
operating_system = platform.system()
# If we are not on Darwin, trust what Python tells us
if operating_system != "Darwin":
# If we are not on Darwin or Windows, trust what Python tells us
if operating_system not in ("Darwin", "Windows"):
return platform.machine()
# Normalize windows specific names
if operating_system == "Windows":
platform_machine = platform.machine()
return WINDOWS_MAPPING.get(platform_machine, platform_machine)
# On Darwin it might happen that we are on M1, but using an interpreter
# built for x86_64. In that case "platform.machine() == 'x86_64'", so we
# need to fix that.
@@ -103,54 +204,47 @@ def _machine():
if "Apple" in output:
# Note that a native Python interpreter on Apple M1 would return
# "arm64" instead of "aarch64". Here we normalize to the latter.
return "aarch64"
return AARCH64
return "x86_64"
return X86_64
@info_dict(operating_system="Darwin")
def sysctl_info_dict():
@detection(operating_system="Darwin")
def sysctl_info() -> Microarchitecture:
"""Returns a raw info dictionary parsing the output of sysctl."""
child_environment = _ensure_bin_usrbin_in_path()
def sysctl(*args):
def sysctl(*args: str) -> str:
return _check_output(["sysctl"] + list(args), env=child_environment).strip()
if _machine() == "x86_64":
flags = (
sysctl("-n", "machdep.cpu.features").lower()
+ " "
+ sysctl("-n", "machdep.cpu.leaf7_features").lower()
if _machine() == X86_64:
features = (
f'{sysctl("-n", "machdep.cpu.features").lower()} '
f'{sysctl("-n", "machdep.cpu.leaf7_features").lower()}'
)
info = {
"vendor_id": sysctl("-n", "machdep.cpu.vendor"),
"flags": flags,
"model": sysctl("-n", "machdep.cpu.model"),
"model name": sysctl("-n", "machdep.cpu.brand_string"),
}
else:
model = "unknown"
model_str = sysctl("-n", "machdep.cpu.brand_string").lower()
if "m2" in model_str:
model = "m2"
elif "m1" in model_str:
model = "m1"
elif "apple" in model_str:
model = "m1"
features = set(features.split())
info = {
"vendor_id": "Apple",
"flags": [],
"model": model,
"CPU implementer": "Apple",
"model name": sysctl("-n", "machdep.cpu.brand_string"),
}
return info
# Flags detected on Darwin turned to their linux counterpart
for darwin_flag, linux_flag in TARGETS_JSON["conversions"]["darwin_flags"].items():
if darwin_flag in features:
features.update(linux_flag.split())
return partial_uarch(vendor=sysctl("-n", "machdep.cpu.vendor"), features=features)
model = "unknown"
model_str = sysctl("-n", "machdep.cpu.brand_string").lower()
if "m2" in model_str:
model = "m2"
elif "m1" in model_str:
model = "m1"
elif "apple" in model_str:
model = "m1"
return partial_uarch(name=model, vendor="Apple")
def _ensure_bin_usrbin_in_path():
# Make sure that /sbin and /usr/sbin are in PATH as sysctl is
# usually found there
# Make sure that /sbin and /usr/sbin are in PATH as sysctl is usually found there
child_environment = dict(os.environ.items())
search_paths = child_environment.get("PATH", "").split(os.pathsep)
for additional_path in ("/sbin", "/usr/sbin"):
@@ -160,22 +254,10 @@ def _ensure_bin_usrbin_in_path():
return child_environment
def adjust_raw_flags(info):
"""Adjust the flags detected on the system to homogenize
slightly different representations.
"""
# Flags detected on Darwin turned to their linux counterpart
flags = info.get("flags", [])
d2l = TARGETS_JSON["conversions"]["darwin_flags"]
for darwin_flag, linux_flag in d2l.items():
if darwin_flag in flags:
info["flags"] += " " + linux_flag
def adjust_raw_vendor(info):
"""Adjust the vendor field to make it human readable"""
if "CPU implementer" not in info:
return
def _canonicalize_aarch64_vendor(data: Dict[str, str]) -> str:
"""Adjust the vendor field to make it human-readable"""
if "CPU implementer" not in data:
return "generic"
# Mapping numeric codes to vendor (ARM). This list is a merge from
# different sources:
@@ -185,43 +267,37 @@ def adjust_raw_vendor(info):
# https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64-cores.def
# https://patchwork.kernel.org/patch/10524949/
arm_vendors = TARGETS_JSON["conversions"]["arm_vendors"]
arm_code = info["CPU implementer"]
if arm_code in arm_vendors:
info["CPU implementer"] = arm_vendors[arm_code]
arm_code = data["CPU implementer"]
return arm_vendors.get(arm_code, arm_code)
def raw_info_dictionary():
"""Returns a dictionary with information on the cpu of the current host.
def _feature_set(data: Dict[str, str], key: str) -> Set[str]:
return set(data.get(key, "").split())
This function calls all the viable factories one after the other until
there's one that is able to produce the requested information.
def detected_info() -> Microarchitecture:
"""Returns a partial Microarchitecture with information on the CPU of the current host.
This function calls all the viable factories one after the other until there's one that is
able to produce the requested information. Falls-back to a generic microarchitecture, if none
of the calls succeed.
"""
# pylint: disable=broad-except
info = {}
for factory in INFO_FACTORY[platform.system()]:
try:
info = factory()
return factory()
except Exception as exc:
warnings.warn(str(exc))
if info:
adjust_raw_flags(info)
adjust_raw_vendor(info)
break
return info
return generic_microarchitecture(_machine())
def compatible_microarchitectures(info):
"""Returns an unordered list of known micro-architectures that are
compatible with the info dictionary passed as argument.
Args:
info (dict): dictionary containing information on the host cpu
def compatible_microarchitectures(info: Microarchitecture) -> List[Microarchitecture]:
"""Returns an unordered list of known micro-architectures that are compatible with the
partial Microarchitecture passed as input.
"""
architecture_family = _machine()
# If a tester is not registered, be conservative and assume no known
# target is compatible with the host
# If a tester is not registered, assume no known target is compatible with the host
tester = COMPATIBILITY_CHECKS.get(architecture_family, lambda x, y: False)
return [x for x in TARGETS.values() if tester(info, x)] or [
generic_microarchitecture(architecture_family)
@@ -230,8 +306,8 @@ def compatible_microarchitectures(info):
def host():
"""Detects the host micro-architecture and returns it."""
# Retrieve a dictionary with raw information on the host's cpu
info = raw_info_dictionary()
# Retrieve information on the host's cpu
info = detected_info()
# Get a list of possible candidates for this micro-architecture
candidates = compatible_microarchitectures(info)
@@ -258,16 +334,15 @@ def sorting_fn(item):
return max(candidates, key=sorting_fn)
def compatibility_check(architecture_family):
def compatibility_check(architecture_family: Union[str, Tuple[str, ...]]):
"""Decorator to register a function as a proper compatibility check.
A compatibility check function takes the raw info dictionary as a first
argument and an arbitrary target as the second argument. It returns True
if the target is compatible with the info dictionary, False otherwise.
A compatibility check function takes a partial Microarchitecture object as a first argument,
and an arbitrary target Microarchitecture as the second argument. It returns True if the
target is compatible with first argument, False otherwise.
Args:
architecture_family (str or tuple): architecture family for which
this test can be used, e.g. x86_64 or ppc64le etc.
architecture_family: architecture family for which this test can be used
"""
# Turn the argument into something iterable
if isinstance(architecture_family, str):
@@ -280,86 +355,57 @@ def decorator(func):
return decorator
@compatibility_check(architecture_family=("ppc64le", "ppc64"))
@compatibility_check(architecture_family=(PPC64LE, PPC64))
def compatibility_check_for_power(info, target):
"""Compatibility check for PPC64 and PPC64LE architectures."""
basename = platform.machine()
generation_match = re.search(r"POWER(\d+)", info.get("cpu", ""))
try:
generation = int(generation_match.group(1))
except AttributeError:
# There might be no match under emulated environments. For instance
# emulating a ppc64le with QEMU and Docker still reports the host
# /proc/cpuinfo and not a Power
generation = 0
# We can use a target if it descends from our machine type and our
# generation (9 for POWER9, etc) is at least its generation.
arch_root = TARGETS[basename]
arch_root = TARGETS[_machine()]
return (
target == arch_root or arch_root in target.ancestors
) and target.generation <= generation
) and target.generation <= info.generation
@compatibility_check(architecture_family="x86_64")
@compatibility_check(architecture_family=X86_64)
def compatibility_check_for_x86_64(info, target):
"""Compatibility check for x86_64 architectures."""
basename = "x86_64"
vendor = info.get("vendor_id", "generic")
features = set(info.get("flags", "").split())
# We can use a target if it descends from our machine type, is from our
# vendor, and we have all of its features
arch_root = TARGETS[basename]
arch_root = TARGETS[X86_64]
return (
(target == arch_root or arch_root in target.ancestors)
and target.vendor in (vendor, "generic")
and target.features.issubset(features)
and target.vendor in (info.vendor, "generic")
and target.features.issubset(info.features)
)
@compatibility_check(architecture_family="aarch64")
@compatibility_check(architecture_family=AARCH64)
def compatibility_check_for_aarch64(info, target):
"""Compatibility check for AARCH64 architectures."""
basename = "aarch64"
features = set(info.get("Features", "").split())
vendor = info.get("CPU implementer", "generic")
# At the moment it's not clear how to detect compatibility with
# At the moment, it's not clear how to detect compatibility with
# a specific version of the architecture
if target.vendor == "generic" and target.name != "aarch64":
if target.vendor == "generic" and target.name != AARCH64:
return False
arch_root = TARGETS[basename]
arch_root = TARGETS[AARCH64]
arch_root_and_vendor = arch_root == target.family and target.vendor in (
vendor,
info.vendor,
"generic",
)
# On macOS it seems impossible to get all the CPU features
# with syctl info, but for ARM we can get the exact model
if platform.system() == "Darwin":
model_key = info.get("model", basename)
model = TARGETS[model_key]
model = TARGETS[info.name]
return arch_root_and_vendor and (target == model or target in model.ancestors)
return arch_root_and_vendor and target.features.issubset(features)
return arch_root_and_vendor and target.features.issubset(info.features)
@compatibility_check(architecture_family="riscv64")
@compatibility_check(architecture_family=RISCV64)
def compatibility_check_for_riscv64(info, target):
"""Compatibility check for riscv64 architectures."""
basename = "riscv64"
uarch = info.get("uarch")
# sifive unmatched board
if uarch == "sifive,u74-mc":
uarch = "u74mc"
# catch-all for unknown uarchs
else:
uarch = "riscv64"
arch_root = TARGETS[basename]
arch_root = TARGETS[RISCV64]
return (target == arch_root or arch_root in target.ancestors) and (
target == uarch or target.vendor == "generic"
target.name == info.name or target.vendor == "generic"
)

View File

@@ -13,6 +13,7 @@
import archspec
import archspec.cpu.alias
import archspec.cpu.schema
from .alias import FEATURE_ALIASES
from .schema import LazyDictionary
@@ -47,7 +48,7 @@ class Microarchitecture:
which has "broadwell" as a parent, supports running binaries
optimized for "broadwell".
vendor (str): vendor of the micro-architecture
features (list of str): supported CPU flags. Note that the semantic
features (set of str): supported CPU flags. Note that the semantic
of the flags in this field might vary among architectures, if
at all present. For instance x86_64 processors will list all
the flags supported by a given CPU while Arm processors will
@@ -180,24 +181,28 @@ def generic(self):
generics = [x for x in [self] + self.ancestors if x.vendor == "generic"]
return max(generics, key=lambda x: len(x.ancestors))
def to_dict(self, return_list_of_items=False):
"""Returns a dictionary representation of this object.
def to_dict(self):
"""Returns a dictionary representation of this object."""
return {
"name": str(self.name),
"vendor": str(self.vendor),
"features": sorted(str(x) for x in self.features),
"generation": self.generation,
"parents": [str(x) for x in self.parents],
"compilers": self.compilers,
}
Args:
return_list_of_items (bool): if True returns an ordered list of
items instead of the dictionary
"""
list_of_items = [
("name", str(self.name)),
("vendor", str(self.vendor)),
("features", sorted(str(x) for x in self.features)),
("generation", self.generation),
("parents", [str(x) for x in self.parents]),
]
if return_list_of_items:
return list_of_items
return dict(list_of_items)
@staticmethod
def from_dict(data) -> "Microarchitecture":
"""Construct a microarchitecture from a dictionary representation."""
return Microarchitecture(
name=data["name"],
parents=[TARGETS[x] for x in data["parents"]],
vendor=data["vendor"],
features=set(data["features"]),
compilers=data.get("compilers", {}),
generation=data.get("generation", 0),
)
def optimization_flags(self, compiler, version):
"""Returns a string containing the optimization flags that needs
@@ -271,9 +276,7 @@ def tuplify(ver):
flags = flags_fmt.format(**compiler_entry)
return flags
msg = (
"cannot produce optimized binary for micro-architecture '{0}' with {1}@{2}"
)
msg = "cannot produce optimized binary for micro-architecture '{0}' with {1}@{2}"
if compiler_info:
versions = [x["versions"] for x in compiler_info]
msg += f' [supported compiler versions are {", ".join(versions)}]'
@@ -289,9 +292,7 @@ def generic_microarchitecture(name):
Args:
name (str): name of the micro-architecture
"""
return Microarchitecture(
name, parents=[], vendor="generic", features=[], compilers={}
)
return Microarchitecture(name, parents=[], vendor="generic", features=[], compilers={})
def version_components(version):
@@ -345,9 +346,7 @@ def fill_target_from_dict(name, data, targets):
compilers = values.get("compilers", {})
generation = values.get("generation", 0)
targets[name] = Microarchitecture(
name, parents, vendor, features, compilers, generation
)
targets[name] = Microarchitecture(name, parents, vendor, features, compilers, generation)
known_targets = {}
data = archspec.cpu.schema.TARGETS_JSON["microarchitectures"]

View File

@@ -7,7 +7,9 @@
"""
import collections.abc
import json
import os.path
import os
import pathlib
from typing import Tuple
class LazyDictionary(collections.abc.MutableMapping):
@@ -46,21 +48,65 @@ def __len__(self):
return len(self.data)
def _load_json_file(json_file):
json_dir = os.path.join(os.path.dirname(__file__), "..", "json", "cpu")
json_dir = os.path.abspath(json_dir)
#: Environment variable that might point to a directory with a user defined JSON file
DIR_FROM_ENVIRONMENT = "ARCHSPEC_CPU_DIR"
def _factory():
filename = os.path.join(json_dir, json_file)
with open(filename, "r", encoding="utf-8") as file:
return json.load(file)
#: Environment variable that might point to a directory with extensions to JSON files
EXTENSION_DIR_FROM_ENVIRONMENT = "ARCHSPEC_EXTENSION_CPU_DIR"
return _factory
def _json_file(filename: str, allow_custom: bool = False) -> Tuple[pathlib.Path, pathlib.Path]:
"""Given a filename, returns the absolute path for the main JSON file, and an
optional absolute path for an extension JSON file.
Args:
filename: filename for the JSON file
allow_custom: if True, allows overriding the location where the file resides
"""
json_dir = pathlib.Path(__file__).parent / ".." / "json" / "cpu"
if allow_custom and DIR_FROM_ENVIRONMENT in os.environ:
json_dir = pathlib.Path(os.environ[DIR_FROM_ENVIRONMENT])
json_dir = json_dir.absolute()
json_file = json_dir / filename
extension_file = None
if allow_custom and EXTENSION_DIR_FROM_ENVIRONMENT in os.environ:
extension_dir = pathlib.Path(os.environ[EXTENSION_DIR_FROM_ENVIRONMENT])
extension_dir.absolute()
extension_file = extension_dir / filename
return json_file, extension_file
def _load(json_file: pathlib.Path, extension_file: pathlib.Path):
with open(json_file, "r", encoding="utf-8") as file:
data = json.load(file)
if not extension_file or not extension_file.exists():
return data
with open(extension_file, "r", encoding="utf-8") as file:
extension_data = json.load(file)
top_level_sections = list(data.keys())
for key in top_level_sections:
if key not in extension_data:
continue
data[key].update(extension_data[key])
return data
#: In memory representation of the data in microarchitectures.json,
#: loaded on first access
TARGETS_JSON = LazyDictionary(_load_json_file("microarchitectures.json"))
TARGETS_JSON = LazyDictionary(_load, *_json_file("microarchitectures.json", allow_custom=True))
#: JSON schema for microarchitectures.json, loaded on first access
SCHEMA = LazyDictionary(_load_json_file("microarchitectures_schema.json"))
TARGETS_JSON_SCHEMA = LazyDictionary(_load, *_json_file("microarchitectures_schema.json"))
#: Information on how to call 'cpuid' to get information on the HOST CPU
CPUID_JSON = LazyDictionary(_load, *_json_file("cpuid.json", allow_custom=True))
#: JSON schema for cpuid.json, loaded on first access
CPUID_JSON_SCHEMA = LazyDictionary(_load, *_json_file("cpuid_schema.json"))

View File

@@ -9,11 +9,11 @@ language specific APIs.
Currently the repository contains the following JSON files:
```console
.
├── COPYRIGHT
── cpu
   ├── microarchitectures.json # Contains information on CPU microarchitectures
   └── microarchitectures_schema.json # Schema for the file above
cpu/
├── cpuid.json # Contains information on CPUID calls to retrieve vendor and features on x86_64
── cpuid_schema.json # Schema for the file above
├── microarchitectures.json # Contains information on CPU microarchitectures
└── microarchitectures_schema.json # Schema for the file above
```

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,134 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Schema for microarchitecture definitions and feature aliases",
"type": "object",
"additionalProperties": false,
"properties": {
"vendor": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"eax": {
"type": "integer"
},
"ecx": {
"type": "integer"
}
}
}
}
},
"highest_extension_support": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"eax": {
"type": "integer"
},
"ecx": {
"type": "integer"
}
}
}
}
},
"flags": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"eax": {
"type": "integer"
},
"ecx": {
"type": "integer"
}
}
},
"bits": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"register": {
"type": "string"
},
"bit": {
"type": "integer"
}
}
}
}
}
}
},
"extension-flags": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"eax": {
"type": "integer"
},
"ecx": {
"type": "integer"
}
}
},
"bits": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"register": {
"type": "string"
},
"bit": {
"type": "integer"
}
}
}
}
}
}
}
}
}

View File

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

View File

@@ -0,0 +1,76 @@
cpuid.py
========
Now, this is silly!
Pure Python library for accessing information about x86 processors
by querying the [CPUID](http://en.wikipedia.org/wiki/CPUID)
instruction. Well, not exactly pure Python...
It works by allocating a small piece of virtual memory, copying
a raw x86 function to that memory, giving the memory execute
permissions and then calling the memory as a function. The injected
function executes the CPUID instruction and copies the result back
to a ctypes.Structure where is can be read by Python.
It should work fine on both 32 and 64 bit versions of Windows and Linux
running x86 processors. Apple OS X and other BSD systems should also work,
not tested though...
Why?
----
For poops and giggles. Plus, having access to a low-level feature
without having to compile a C wrapper is pretty neat.
Examples
--------
Getting info with eax=0:
import cpuid
q = cpuid.CPUID()
eax, ebx, ecx, edx = q(0)
Running the files:
$ python example.py
Vendor ID : GenuineIntel
CPU name : Intel(R) Xeon(R) CPU W3550 @ 3.07GHz
Vector instructions supported:
SSE : Yes
SSE2 : Yes
SSE3 : Yes
SSSE3 : Yes
SSE4.1 : Yes
SSE4.2 : Yes
SSE4a : --
AVX : --
AVX2 : --
$ python cpuid.py
CPUID A B C D
00000000 0000000b 756e6547 6c65746e 49656e69
00000001 000106a5 00100800 009ce3bd bfebfbff
00000002 55035a01 00f0b2e4 00000000 09ca212c
00000003 00000000 00000000 00000000 00000000
00000004 00000000 00000000 00000000 00000000
00000005 00000040 00000040 00000003 00001120
00000006 00000003 00000002 00000001 00000000
00000007 00000000 00000000 00000000 00000000
00000008 00000000 00000000 00000000 00000000
00000009 00000000 00000000 00000000 00000000
0000000a 07300403 00000044 00000000 00000603
0000000b 00000000 00000000 00000095 00000000
80000000 80000008 00000000 00000000 00000000
80000001 00000000 00000000 00000001 28100800
80000002 65746e49 2952286c 6f655820 2952286e
80000003 55504320 20202020 20202020 57202020
80000004 30353533 20402020 37302e33 007a4847
80000005 00000000 00000000 00000000 00000000
80000006 00000000 00000000 01006040 00000000
80000007 00000000 00000000 00000000 00000100
80000008 00003024 00000000 00000000 00000000

View File

@@ -0,0 +1,172 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 Anders Høst
#
from __future__ import print_function
import platform
import os
import ctypes
from ctypes import c_uint32, c_long, c_ulong, c_size_t, c_void_p, POINTER, CFUNCTYPE
# Posix x86_64:
# Three first call registers : RDI, RSI, RDX
# Volatile registers : RAX, RCX, RDX, RSI, RDI, R8-11
# Windows x86_64:
# Three first call registers : RCX, RDX, R8
# Volatile registers : RAX, RCX, RDX, R8-11
# cdecl 32 bit:
# Three first call registers : Stack (%esp)
# Volatile registers : EAX, ECX, EDX
_POSIX_64_OPC = [
0x53, # push %rbx
0x89, 0xf0, # mov %esi,%eax
0x89, 0xd1, # mov %edx,%ecx
0x0f, 0xa2, # cpuid
0x89, 0x07, # mov %eax,(%rdi)
0x89, 0x5f, 0x04, # mov %ebx,0x4(%rdi)
0x89, 0x4f, 0x08, # mov %ecx,0x8(%rdi)
0x89, 0x57, 0x0c, # mov %edx,0xc(%rdi)
0x5b, # pop %rbx
0xc3 # retq
]
_WINDOWS_64_OPC = [
0x53, # push %rbx
0x89, 0xd0, # mov %edx,%eax
0x49, 0x89, 0xc9, # mov %rcx,%r9
0x44, 0x89, 0xc1, # mov %r8d,%ecx
0x0f, 0xa2, # cpuid
0x41, 0x89, 0x01, # mov %eax,(%r9)
0x41, 0x89, 0x59, 0x04, # mov %ebx,0x4(%r9)
0x41, 0x89, 0x49, 0x08, # mov %ecx,0x8(%r9)
0x41, 0x89, 0x51, 0x0c, # mov %edx,0xc(%r9)
0x5b, # pop %rbx
0xc3 # retq
]
_CDECL_32_OPC = [
0x53, # push %ebx
0x57, # push %edi
0x8b, 0x7c, 0x24, 0x0c, # mov 0xc(%esp),%edi
0x8b, 0x44, 0x24, 0x10, # mov 0x10(%esp),%eax
0x8b, 0x4c, 0x24, 0x14, # mov 0x14(%esp),%ecx
0x0f, 0xa2, # cpuid
0x89, 0x07, # mov %eax,(%edi)
0x89, 0x5f, 0x04, # mov %ebx,0x4(%edi)
0x89, 0x4f, 0x08, # mov %ecx,0x8(%edi)
0x89, 0x57, 0x0c, # mov %edx,0xc(%edi)
0x5f, # pop %edi
0x5b, # pop %ebx
0xc3 # ret
]
is_windows = os.name == "nt"
is_64bit = ctypes.sizeof(ctypes.c_voidp) == 8
class CPUID_struct(ctypes.Structure):
_register_names = ("eax", "ebx", "ecx", "edx")
_fields_ = [(r, c_uint32) for r in _register_names]
def __getitem__(self, item):
if item not in self._register_names:
raise KeyError(item)
return getattr(self, item)
def __repr__(self):
return "eax=0x{:x}, ebx=0x{:x}, ecx=0x{:x}, edx=0x{:x}".format(self.eax, self.ebx, self.ecx, self.edx)
class CPUID(object):
def __init__(self):
if platform.machine() not in ("AMD64", "x86_64", "x86", "i686"):
raise SystemError("Only available for x86")
if is_windows:
if is_64bit:
# VirtualAlloc seems to fail under some weird
# circumstances when ctypes.windll.kernel32 is
# used under 64 bit Python. CDLL fixes this.
self.win = ctypes.CDLL("kernel32.dll")
opc = _WINDOWS_64_OPC
else:
# Here ctypes.windll.kernel32 is needed to get the
# right DLL. Otherwise it will fail when running
# 32 bit Python on 64 bit Windows.
self.win = ctypes.windll.kernel32
opc = _CDECL_32_OPC
else:
opc = _POSIX_64_OPC if is_64bit else _CDECL_32_OPC
size = len(opc)
code = (ctypes.c_ubyte * size)(*opc)
if is_windows:
self.win.VirtualAlloc.restype = c_void_p
self.win.VirtualAlloc.argtypes = [ctypes.c_void_p, ctypes.c_size_t, ctypes.c_ulong, ctypes.c_ulong]
self.addr = self.win.VirtualAlloc(None, size, 0x1000, 0x40)
if not self.addr:
raise MemoryError("Could not allocate RWX memory")
ctypes.memmove(self.addr, code, size)
else:
from mmap import (
mmap,
MAP_PRIVATE,
MAP_ANONYMOUS,
PROT_WRITE,
PROT_READ,
PROT_EXEC,
)
self.mm = mmap(
-1,
size,
flags=MAP_PRIVATE | MAP_ANONYMOUS,
prot=PROT_WRITE | PROT_READ | PROT_EXEC,
)
self.mm.write(code)
self.addr = ctypes.addressof(ctypes.c_int.from_buffer(self.mm))
func_type = CFUNCTYPE(None, POINTER(CPUID_struct), c_uint32, c_uint32)
self.func_ptr = func_type(self.addr)
def __call__(self, eax, ecx=0):
struct = self.registers_for(eax=eax, ecx=ecx)
return struct.eax, struct.ebx, struct.ecx, struct.edx
def registers_for(self, eax, ecx=0):
"""Calls cpuid with eax and ecx set as the input arguments, and returns a structure
containing eax, ebx, ecx, and edx.
"""
struct = CPUID_struct()
self.func_ptr(struct, eax, ecx)
return struct
def __del__(self):
if is_windows:
self.win.VirtualFree.restype = c_long
self.win.VirtualFree.argtypes = [c_void_p, c_size_t, c_ulong]
self.win.VirtualFree(self.addr, 0, 0x8000)
else:
self.mm.close()
if __name__ == "__main__":
def valid_inputs():
cpuid = CPUID()
for eax in (0x0, 0x80000000):
highest, _, _, _ = cpuid(eax)
while eax <= highest:
regs = cpuid(eax)
yield (eax, regs)
eax += 1
print(" ".join(x.ljust(8) for x in ("CPUID", "A", "B", "C", "D")).strip())
for eax, regs in valid_inputs():
print("%08x" % eax, " ".join("%08x" % reg for reg in regs))

View File

@@ -0,0 +1,62 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 Anders Høst
#
from __future__ import print_function
import struct
import cpuid
def cpu_vendor(cpu):
_, b, c, d = cpu(0)
return struct.pack("III", b, d, c).decode("utf-8")
def cpu_name(cpu):
name = "".join((struct.pack("IIII", *cpu(0x80000000 + i)).decode("utf-8")
for i in range(2, 5)))
return name.split('\x00', 1)[0]
def is_set(cpu, leaf, subleaf, reg_idx, bit):
"""
@param {leaf} %eax
@param {sublead} %ecx, 0 in most cases
@param {reg_idx} idx of [%eax, %ebx, %ecx, %edx], 0-based
@param {bit} bit of reg selected by {reg_idx}, 0-based
"""
regs = cpu(leaf, subleaf)
if (1 << bit) & regs[reg_idx]:
return "Yes"
else:
return "--"
if __name__ == "__main__":
cpu = cpuid.CPUID()
print("Vendor ID : %s" % cpu_vendor(cpu))
print("CPU name : %s" % cpu_name(cpu))
print()
print("Vector instructions supported:")
print("SSE : %s" % is_set(cpu, 1, 0, 3, 25))
print("SSE2 : %s" % is_set(cpu, 1, 0, 3, 26))
print("SSE3 : %s" % is_set(cpu, 1, 0, 2, 0))
print("SSSE3 : %s" % is_set(cpu, 1, 0, 2, 9))
print("SSE4.1 : %s" % is_set(cpu, 1, 0, 2, 19))
print("SSE4.2 : %s" % is_set(cpu, 1, 0, 2, 20))
print("SSE4a : %s" % is_set(cpu, 0x80000001, 0, 2, 6))
print("AVX : %s" % is_set(cpu, 1, 0, 2, 28))
print("AVX2 : %s" % is_set(cpu, 7, 0, 1, 5))
print("BMI1 : %s" % is_set(cpu, 7, 0, 1, 3))
print("BMI2 : %s" % is_set(cpu, 7, 0, 1, 8))
# Intel RDT CMT/MBM
print("L3 Monitoring : %s" % is_set(cpu, 0xf, 0, 3, 1))
print("L3 Occupancy : %s" % is_set(cpu, 0xf, 1, 3, 0))
print("L3 Total BW : %s" % is_set(cpu, 0xf, 1, 3, 1))
print("L3 Local BW : %s" % is_set(cpu, 0xf, 1, 3, 2))

View File

@@ -42,11 +42,6 @@ def convert_to_posix_path(path: str) -> str:
return format_os_path(path, mode=Path.unix)
def convert_to_windows_path(path: str) -> str:
"""Converts the input path to Windows style."""
return format_os_path(path, mode=Path.windows)
def convert_to_platform_path(path: str) -> str:
"""Converts the input path to the current platform's native style."""
return format_os_path(path, mode=Path.platform_path)

View File

@@ -12,7 +12,7 @@
# Archive extensions allowed in Spack
PREFIX_EXTENSIONS = ("tar", "TAR")
EXTENSIONS = ("gz", "bz2", "xz", "Z")
NO_TAR_EXTENSIONS = ("zip", "tgz", "tbz2", "tbz", "txz")
NO_TAR_EXTENSIONS = ("zip", "tgz", "tbz2", "tbz", "txz", "whl")
# Add PREFIX_EXTENSIONS and EXTENSIONS last so that .tar.gz is matched *before* .tar or .gz
ALLOWED_ARCHIVE_TYPES = (
@@ -357,10 +357,8 @@ def strip_version_suffixes(path_or_url: str) -> str:
r"i[36]86",
r"ppc64(le)?",
r"armv?(7l|6l|64)?",
# PyPI
r"[._-]py[23].*\.whl",
r"[._-]cp[23].*\.whl",
r"[._-]win.*\.exe",
# PyPI wheels
r"-(?:py|cp)[23].*",
]
for regex in suffix_regexes:
@@ -403,7 +401,7 @@ def expand_contracted_extension_in_path(
def compression_ext_from_compressed_archive(extension: str) -> Optional[str]:
"""Returns compression extension for a compressed archive"""
extension = expand_contracted_extension(extension)
for ext in [*EXTENSIONS]:
for ext in EXTENSIONS:
if ext in extension:
return ext
return None

View File

@@ -171,7 +171,7 @@ def polite_path(components: Iterable[str]):
@memoized
def _polite_antipattern():
# A regex of all the characters we don't want in a filename
return re.compile(r"[^A-Za-z0-9_.-]")
return re.compile(r"[^A-Za-z0-9_+.-]")
def polite_filename(filename: str) -> str:
@@ -237,16 +237,6 @@ def _get_mime_type():
return file_command("-b", "-h", "--mime-type")
@memoized
def _get_mime_type_compressed():
"""Same as _get_mime_type but attempts to check for
compression first
"""
mime_uncompressed = _get_mime_type()
mime_uncompressed.add_default_arg("-Z")
return mime_uncompressed
def mime_type(filename):
"""Returns the mime type and subtype of a file.
@@ -262,21 +252,6 @@ def mime_type(filename):
return type, subtype
def compressed_mime_type(filename):
"""Same as mime_type but checks for type that has been compressed
Args:
filename (str): file to be analyzed
Returns:
Tuple containing the MIME type and subtype
"""
output = _get_mime_type_compressed()(filename, output=str, error=str).strip()
tty.debug("==> " + output)
type, _, subtype = output.partition("/")
return type, subtype
#: This generates the library filenames that may appear on any OS.
library_extensions = ["a", "la", "so", "tbd", "dylib"]
@@ -308,13 +283,6 @@ def paths_containing_libs(paths, library_names):
return rpaths_to_include
@system_path_filter
def same_path(path1, path2):
norm1 = os.path.abspath(path1).rstrip(os.path.sep)
norm2 = os.path.abspath(path2).rstrip(os.path.sep)
return norm1 == norm2
def filter_file(
regex: str,
repl: Union[str, Callable[[Match], str]],
@@ -909,39 +877,34 @@ def is_exe(path):
return os.path.isfile(path) and os.access(path, os.X_OK)
@system_path_filter
def get_filetype(path_name):
"""
Return the output of file path_name as a string to identify file type.
"""
file = Executable("file")
file.add_default_env("LC_ALL", "C")
output = file("-b", "-h", "%s" % path_name, output=str, error=str)
return output.strip()
def has_shebang(path):
"""Returns whether a path has a shebang line. Returns False if the file cannot be opened."""
try:
with open(path, "rb") as f:
return f.read(2) == b"#!"
except OSError:
return False
@system_path_filter
def is_nonsymlink_exe_with_shebang(path):
"""
Returns whether the path is an executable script with a shebang.
Return False when the path is a *symlink* to an executable script.
"""
"""Returns whether the path is an executable regular file with a shebang. Returns False too
when the path is a symlink to a script, and also when the file cannot be opened."""
try:
st = os.lstat(path)
# Should not be a symlink
if stat.S_ISLNK(st.st_mode):
return False
# Should be executable
if not st.st_mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH):
return False
# Should start with a shebang
with open(path, "rb") as f:
return f.read(2) == b"#!"
except (IOError, OSError):
except OSError:
return False
# Should not be a symlink
if stat.S_ISLNK(st.st_mode):
return False
# Should be executable
if not st.st_mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH):
return False
return has_shebang(path)
@system_path_filter(arg_slice=slice(1))
def chgrp_if_not_world_writable(path, group):
@@ -1163,20 +1126,6 @@ def write_tmp_and_move(filename):
shutil.move(tmp, filename)
@contextmanager
@system_path_filter
def open_if_filename(str_or_file, mode="r"):
"""Takes either a path or a file object, and opens it if it is a path.
If it's a file object, just yields the file object.
"""
if isinstance(str_or_file, str):
with open(str_or_file, mode) as f:
yield f
else:
yield str_or_file
@system_path_filter
def touch(path):
"""Creates an empty file at the specified path."""
@@ -1234,6 +1183,47 @@ def get_single_file(directory):
return fnames[0]
@system_path_filter
def windows_sfn(path: os.PathLike):
"""Returns 8.3 Filename (SFN) representation of
path
8.3 Filenames (SFN or short filename) is a file
naming convention used prior to Win95 that Windows
still (and will continue to) support. This convention
caps filenames at 8 characters, and most importantly
does not allow for spaces in addition to other specifications.
The scheme is generally the same as a normal Windows
file scheme, but all spaces are removed and the filename
is capped at 6 characters. The remaining characters are
replaced with ~N where N is the number file in a directory
that a given file represents i.e. Program Files and Program Files (x86)
would be PROGRA~1 and PROGRA~2 respectively.
Further, all file/directory names are all caps (although modern Windows
is case insensitive in practice).
Conversion is accomplished by fileapi.h GetShortPathNameW
Returns paths in 8.3 Filename form
Note: this method is a no-op on Linux
Args:
path: Path to be transformed into SFN (8.3 filename) format
"""
# This should not be run-able on linux/macos
if sys.platform != "win32":
return path
path = str(path)
import ctypes
k32 = ctypes.WinDLL("kernel32", use_last_error=True)
# stub Windows types TCHAR[LENGTH]
TCHAR_arr = ctypes.c_wchar * len(path)
ret_str = TCHAR_arr()
k32.GetShortPathNameW(path, ret_str, len(path))
return ret_str.value
@contextmanager
def temp_cwd():
tmp_dir = tempfile.mkdtemp()
@@ -1248,19 +1238,6 @@ def temp_cwd():
shutil.rmtree(tmp_dir, **kwargs)
@contextmanager
@system_path_filter
def temp_rename(orig_path, temp_path):
same_path = os.path.realpath(orig_path) == os.path.realpath(temp_path)
if not same_path:
shutil.move(orig_path, temp_path)
try:
yield
finally:
if not same_path:
shutil.move(temp_path, orig_path)
@system_path_filter
def can_access(file_name):
"""True if we have read/write access to the file."""
@@ -1377,120 +1354,89 @@ def traverse_tree(
yield (source_path, dest_path)
def lexists_islink_isdir(path):
"""Computes the tuple (lexists(path), islink(path), isdir(path)) in a minimal
number of stat calls on unix. Use os.path and symlink.islink methods for windows."""
if sys.platform == "win32":
if not os.path.lexists(path):
return False, False, False
return os.path.lexists(path), islink(path), os.path.isdir(path)
# First try to lstat, so we know if it's a link or not.
try:
lst = os.lstat(path)
except (IOError, OSError):
return False, False, False
is_link = stat.S_ISLNK(lst.st_mode)
# Check whether file is a dir.
if not is_link:
is_dir = stat.S_ISDIR(lst.st_mode)
return True, is_link, is_dir
# Check whether symlink points to a dir.
try:
st = os.stat(path)
is_dir = stat.S_ISDIR(st.st_mode)
except (IOError, OSError):
# Dangling symlink (i.e. it lexists but not exists)
is_dir = False
return True, is_link, is_dir
class BaseDirectoryVisitor:
"""Base class and interface for :py:func:`visit_directory_tree`."""
def visit_file(self, root, rel_path, depth):
def visit_file(self, root: str, rel_path: str, depth: int) -> None:
"""Handle the non-symlink file at ``os.path.join(root, rel_path)``
Parameters:
root (str): root directory
rel_path (str): relative path to current file from ``root``
root: root directory
rel_path: relative path to current file from ``root``
depth (int): depth of current file from the ``root`` directory"""
pass
def visit_symlinked_file(self, root, rel_path, depth):
"""Handle the symlink to a file at ``os.path.join(root, rel_path)``.
Note: ``rel_path`` is the location of the symlink, not to what it is
pointing to. The symlink may be dangling.
def visit_symlinked_file(self, root: str, rel_path: str, depth) -> None:
"""Handle the symlink to a file at ``os.path.join(root, rel_path)``. Note: ``rel_path`` is
the location of the symlink, not to what it is pointing to. The symlink may be dangling.
Parameters:
root (str): root directory
rel_path (str): relative path to current symlink from ``root``
depth (int): depth of current symlink from the ``root`` directory"""
root: root directory
rel_path: relative path to current symlink from ``root``
depth: depth of current symlink from the ``root`` directory"""
pass
def before_visit_dir(self, root, rel_path, depth):
def before_visit_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""Return True from this function to recurse into the directory at
os.path.join(root, rel_path). Return False in order not to recurse further.
Parameters:
root (str): root directory
rel_path (str): relative path to current directory from ``root``
depth (int): depth of current directory from the ``root`` directory
root: root directory
rel_path: relative path to current directory from ``root``
depth: depth of current directory from the ``root`` directory
Returns:
bool: ``True`` when the directory should be recursed into. ``False`` when
not"""
return False
def before_visit_symlinked_dir(self, root, rel_path, depth):
"""Return ``True`` to recurse into the symlinked directory and ``False`` in
order not to. Note: ``rel_path`` is the path to the symlink itself.
Following symlinked directories blindly can cause infinite recursion due to
cycles.
def before_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""Return ``True`` to recurse into the symlinked directory and ``False`` in order not to.
Note: ``rel_path`` is the path to the symlink itself. Following symlinked directories
blindly can cause infinite recursion due to cycles.
Parameters:
root (str): root directory
rel_path (str): relative path to current symlink from ``root``
depth (int): depth of current symlink from the ``root`` directory
root: root directory
rel_path: relative path to current symlink from ``root``
depth: depth of current symlink from the ``root`` directory
Returns:
bool: ``True`` when the directory should be recursed into. ``False`` when
not"""
return False
def after_visit_dir(self, root, rel_path, depth):
"""Called after recursion into ``rel_path`` finished. This function is not
called when ``rel_path`` was not recursed into.
def after_visit_dir(self, root: str, rel_path: str, depth: int) -> None:
"""Called after recursion into ``rel_path`` finished. This function is not called when
``rel_path`` was not recursed into.
Parameters:
root (str): root directory
rel_path (str): relative path to current directory from ``root``
depth (int): depth of current directory from the ``root`` directory"""
root: root directory
rel_path: relative path to current directory from ``root``
depth: depth of current directory from the ``root`` directory"""
pass
def after_visit_symlinked_dir(self, root, rel_path, depth):
"""Called after recursion into ``rel_path`` finished. This function is not
called when ``rel_path`` was not recursed into.
def after_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> None:
"""Called after recursion into ``rel_path`` finished. This function is not called when
``rel_path`` was not recursed into.
Parameters:
root (str): root directory
rel_path (str): relative path to current symlink from ``root``
depth (int): depth of current symlink from the ``root`` directory"""
root: root directory
rel_path: relative path to current symlink from ``root``
depth: depth of current symlink from the ``root`` directory"""
pass
def visit_directory_tree(root, visitor, rel_path="", depth=0):
"""Recurses the directory root depth-first through a visitor pattern using the
interface from :py:class:`BaseDirectoryVisitor`
def visit_directory_tree(
root: str, visitor: BaseDirectoryVisitor, rel_path: str = "", depth: int = 0
):
"""Recurses the directory root depth-first through a visitor pattern using the interface from
:py:class:`BaseDirectoryVisitor`
Parameters:
root (str): path of directory to recurse into
visitor (BaseDirectoryVisitor): what visitor to use
rel_path (str): current relative path from the root
depth (str): current depth from the root
root: path of directory to recurse into
visitor: what visitor to use
rel_path: current relative path from the root
depth: current depth from the root
"""
dir = os.path.join(root, rel_path)
dir_entries = sorted(os.scandir(dir), key=lambda d: d.name)
@@ -1498,26 +1444,19 @@ def visit_directory_tree(root, visitor, rel_path="", depth=0):
for f in dir_entries:
rel_child = os.path.join(rel_path, f.name)
islink = f.is_symlink()
# On Windows, symlinks to directories are distinct from
# symlinks to files, and it is possible to create a
# broken symlink to a directory (e.g. using os.symlink
# without `target_is_directory=True`), invoking `isdir`
# on a symlink on Windows that is broken in this manner
# will result in an error. In this case we can work around
# the issue by reading the target and resolving the
# directory ourselves
# On Windows, symlinks to directories are distinct from symlinks to files, and it is
# possible to create a broken symlink to a directory (e.g. using os.symlink without
# `target_is_directory=True`), invoking `isdir` on a symlink on Windows that is broken in
# this manner will result in an error. In this case we can work around the issue by reading
# the target and resolving the directory ourselves
try:
isdir = f.is_dir()
except OSError as e:
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
# if path is a symlink, determine destination and evaluate file vs directory
link_target = resolve_link_target_relative_to_the_link(f)
# link_target might be relative but
# resolve_link_target_relative_to_the_link
# will ensure that if so, that it is relative
# to the CWD and therefore
# makes sense
# link_target might be relative but resolve_link_target_relative_to_the_link
# will ensure that if so, that it is relative to the CWD and therefore makes sense
isdir = os.path.isdir(link_target)
else:
raise e

View File

@@ -98,36 +98,6 @@ def caller_locals():
del stack
def get_calling_module_name():
"""Make sure that the caller is a class definition, and return the
enclosing module's name.
"""
# Passing zero here skips line context for speed.
stack = inspect.stack(0)
try:
# Make sure locals contain __module__
caller_locals = stack[2][0].f_locals
finally:
del stack
if "__module__" not in caller_locals:
raise RuntimeError(
"Must invoke get_calling_module_name() " "from inside a class definition!"
)
module_name = caller_locals["__module__"]
base_name = module_name.split(".")[-1]
return base_name
def attr_required(obj, attr_name):
"""Ensure that a class has a required attribute."""
if not hasattr(obj, attr_name):
raise RequiredAttributeError(
"No required attribute '%s' in class '%s'" % (attr_name, obj.__class__.__name__)
)
def attr_setdefault(obj, name, value):
"""Like dict.setdefault, but for objects."""
if not hasattr(obj, name):
@@ -513,42 +483,6 @@ def copy(self):
return clone
def in_function(function_name):
"""True if the caller was called from some function with
the supplied Name, False otherwise."""
stack = inspect.stack()
try:
for elt in stack[2:]:
if elt[3] == function_name:
return True
return False
finally:
del stack
def check_kwargs(kwargs, fun):
"""Helper for making functions with kwargs. Checks whether the kwargs
are empty after all of them have been popped off. If they're
not, raises an error describing which kwargs are invalid.
Example::
def foo(self, **kwargs):
x = kwargs.pop('x', None)
y = kwargs.pop('y', None)
z = kwargs.pop('z', None)
check_kwargs(kwargs, self.foo)
# This raises a TypeError:
foo(w='bad kwarg')
"""
if kwargs:
raise TypeError(
"'%s' is an invalid keyword argument for function %s()."
% (next(iter(kwargs)), fun.__name__)
)
def match_predicate(*args):
"""Utility function for making string matching predicates.
@@ -764,11 +698,6 @@ def pretty_seconds(seconds):
return pretty_seconds_formatter(seconds)(seconds)
class RequiredAttributeError(ValueError):
def __init__(self, message):
super().__init__(message)
class ObjectWrapper:
"""Base class that wraps an object. Derived classes can add new behavior
while staying undercover.
@@ -843,6 +772,30 @@ def __repr__(self):
return repr(self.instance)
def get_entry_points(*, group: str):
"""Wrapper for ``importlib.metadata.entry_points``
Args:
group: entry points to select
Returns:
EntryPoints for ``group`` or empty list if unsupported
"""
try:
import importlib.metadata # type: ignore # novermin
except ImportError:
return []
try:
return importlib.metadata.entry_points(group=group)
except TypeError:
# Prior to Python 3.10, entry_points accepted no parameters and always
# returned a dictionary of entry points, keyed by group. See
# https://docs.python.org/3/library/importlib.metadata.html#entry-points
return importlib.metadata.entry_points().get(group, [])
def load_module_from_file(module_name, module_path):
"""Loads a python module from the path of the corresponding file.
@@ -911,25 +864,6 @@ def uniq(sequence):
return uniq_list
def star(func):
"""Unpacks arguments for use with Multiprocessing mapping functions"""
def _wrapper(args):
return func(*args)
return _wrapper
class Devnull:
"""Null stream with less overhead than ``os.devnull``.
See https://stackoverflow.com/a/2929954.
"""
def write(self, *_):
pass
def elide_list(line_list, max_num=10):
"""Takes a long list and limits it to a smaller number of elements,
replacing intervening elements with '...'. For example::

View File

@@ -8,7 +8,7 @@
import filecmp
import os
import shutil
from collections import OrderedDict
from typing import Callable, Dict, List, Optional, Tuple
import llnl.util.tty as tty
from llnl.util.filesystem import BaseDirectoryVisitor, mkdirp, touch, traverse_tree
@@ -51,32 +51,32 @@ class SourceMergeVisitor(BaseDirectoryVisitor):
- A list of merge conflicts in dst/
"""
def __init__(self, ignore=None):
def __init__(self, ignore: Optional[Callable[[str], bool]] = None):
self.ignore = ignore if ignore is not None else lambda f: False
# When mapping <src root> to <dst root>/<projection>, we need
# to prepend the <projection> bit to the relative path in the
# destination dir.
self.projection = ""
# When mapping <src root> to <dst root>/<projection>, we need to prepend the <projection>
# bit to the relative path in the destination dir.
self.projection: str = ""
# When a file blocks another file, the conflict can sometimes
# be resolved / ignored (e.g. <prefix>/LICENSE or
# or <site-packages>/<namespace>/__init__.py conflicts can be
# ignored).
self.file_conflicts = []
# Two files f and g conflict if they are not os.path.samefile(f, g) and they are both
# projected to the same destination file. These conflicts are not necessarily fatal, and
# can be resolved or ignored. For example <prefix>/LICENSE or
# <site-packages>/<namespace>/__init__.py conflicts can be ignored).
self.file_conflicts: List[MergeConflict] = []
# When we have to create a dir where a file is, or a file
# where a dir is, we have fatal errors, listed here.
self.fatal_conflicts = []
# When we have to create a dir where a file is, or a file where a dir is, we have fatal
# errors, listed here.
self.fatal_conflicts: List[MergeConflict] = []
# What directories we have to make; this is an ordered set,
# so that we have a fast lookup and can run mkdir in order.
self.directories = OrderedDict()
# What directories we have to make; this is an ordered dict, so that we have a fast lookup
# and can run mkdir in order.
self.directories: Dict[str, Tuple[str, str]] = {}
# Files to link. Maps dst_rel to (src_root, src_rel)
self.files = OrderedDict()
# Files to link. Maps dst_rel to (src_root, src_rel). This is an ordered dict, where files
# are guaranteed to be grouped by src_root in the order they were visited.
self.files: Dict[str, Tuple[str, str]] = {}
def before_visit_dir(self, root, rel_path, depth):
def before_visit_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""
Register a directory if dst / rel_path is not blocked by a file or ignored.
"""
@@ -104,7 +104,7 @@ def before_visit_dir(self, root, rel_path, depth):
self.directories[proj_rel_path] = (root, rel_path)
return True
def before_visit_symlinked_dir(self, root, rel_path, depth):
def before_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""
Replace symlinked dirs with actual directories when possible in low depths,
otherwise handle it as a file (i.e. we link to the symlink).
@@ -136,40 +136,56 @@ def before_visit_symlinked_dir(self, root, rel_path, depth):
self.visit_file(root, rel_path, depth)
return False
def visit_file(self, root, rel_path, depth):
def visit_file(self, root: str, rel_path: str, depth: int, *, symlink: bool = False) -> None:
proj_rel_path = os.path.join(self.projection, rel_path)
if self.ignore(rel_path):
pass
elif proj_rel_path in self.directories:
# Can't create a file where a dir is; fatal error
src_a_root, src_a_relpath = self.directories[proj_rel_path]
self.fatal_conflicts.append(
MergeConflict(
dst=proj_rel_path,
src_a=os.path.join(src_a_root, src_a_relpath),
src_a=os.path.join(*self.directories[proj_rel_path]),
src_b=os.path.join(root, rel_path),
)
)
elif proj_rel_path in self.files:
# In some cases we can resolve file-file conflicts
src_a_root, src_a_relpath = self.files[proj_rel_path]
self.file_conflicts.append(
MergeConflict(
dst=proj_rel_path,
src_a=os.path.join(src_a_root, src_a_relpath),
src_b=os.path.join(root, rel_path),
# When two files project to the same path, they conflict iff they are distinct.
# If they are the same (i.e. one links to the other), register regular files rather
# than symlinks. The reason is that in copy-type views, we need a copy of the actual
# file, not the symlink.
src_a = os.path.join(*self.files[proj_rel_path])
src_b = os.path.join(root, rel_path)
try:
samefile = os.path.samefile(src_a, src_b)
except OSError:
samefile = False
if not samefile:
# Distinct files produce a conflict.
self.file_conflicts.append(
MergeConflict(dst=proj_rel_path, src_a=src_a, src_b=src_b)
)
)
return
if not symlink:
# Remove the link in favor of the actual file. The del is necessary to maintain the
# order of the files dict, which is grouped by root.
del self.files[proj_rel_path]
self.files[proj_rel_path] = (root, rel_path)
else:
# Otherwise register this file to be linked.
self.files[proj_rel_path] = (root, rel_path)
def visit_symlinked_file(self, root, rel_path, depth):
def visit_symlinked_file(self, root: str, rel_path: str, depth: int) -> None:
# Treat symlinked files as ordinary files (without "dereferencing")
self.visit_file(root, rel_path, depth)
self.visit_file(root, rel_path, depth, symlink=True)
def set_projection(self, projection):
def set_projection(self, projection: str) -> None:
self.projection = os.path.normpath(projection)
# Todo, is this how to check in general for empty projection?
@@ -197,24 +213,19 @@ def set_projection(self, projection):
class DestinationMergeVisitor(BaseDirectoryVisitor):
"""DestinatinoMergeVisitor takes a SourceMergeVisitor
and:
"""DestinatinoMergeVisitor takes a SourceMergeVisitor and:
a. registers additional conflicts when merging
to the destination prefix
b. removes redundant mkdir operations when
directories already exist in the destination
prefix.
a. registers additional conflicts when merging to the destination prefix
b. removes redundant mkdir operations when directories already exist in the destination prefix.
This also makes sure that symlinked directories
in the target prefix will never be merged with
This also makes sure that symlinked directories in the target prefix will never be merged with
directories in the sources directories.
"""
def __init__(self, source_merge_visitor):
def __init__(self, source_merge_visitor: SourceMergeVisitor):
self.src = source_merge_visitor
def before_visit_dir(self, root, rel_path, depth):
def before_visit_dir(self, root: str, rel_path: str, depth: int) -> bool:
# If destination dir is a file in a src dir, add a conflict,
# and don't traverse deeper
if rel_path in self.src.files:
@@ -236,7 +247,7 @@ def before_visit_dir(self, root, rel_path, depth):
# don't descend into it.
return False
def before_visit_symlinked_dir(self, root, rel_path, depth):
def before_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""
Symlinked directories in the destination prefix should
be seen as files; we should not accidentally merge
@@ -262,7 +273,7 @@ def before_visit_symlinked_dir(self, root, rel_path, depth):
# Never descend into symlinked target dirs.
return False
def visit_file(self, root, rel_path, depth):
def visit_file(self, root: str, rel_path: str, depth: int) -> None:
# Can't merge a file if target already exists
if rel_path in self.src.directories:
src_a_root, src_a_relpath = self.src.directories[rel_path]
@@ -280,7 +291,7 @@ def visit_file(self, root, rel_path, depth):
)
)
def visit_symlinked_file(self, root, rel_path, depth):
def visit_symlinked_file(self, root: str, rel_path: str, depth: int) -> None:
# Treat symlinked files as ordinary files (without "dereferencing")
self.visit_file(root, rel_path, depth)

View File

@@ -815,10 +815,6 @@ def __init__(self, path):
super().__init__(msg)
class LockLimitError(LockError):
"""Raised when exceed maximum attempts to acquire a lock."""
class LockTimeoutError(LockError):
"""Raised when an attempt to acquire a lock times out."""

View File

@@ -189,6 +189,7 @@ def _windows_can_symlink() -> bool:
import llnl.util.filesystem as fs
fs.touchp(fpath)
fs.mkdirp(dpath)
try:
os.symlink(dpath, dlink)

View File

@@ -44,10 +44,6 @@ def is_debug(level=1):
return _debug >= level
def is_stacktrace():
return _stacktrace
def set_debug(level=0):
global _debug
assert level >= 0, "Debug level must be a positive value"
@@ -252,37 +248,6 @@ def die(message, *args, **kwargs) -> NoReturn:
sys.exit(1)
def get_number(prompt, **kwargs):
default = kwargs.get("default", None)
abort = kwargs.get("abort", None)
if default is not None and abort is not None:
prompt += " (default is %s, %s to abort) " % (default, abort)
elif default is not None:
prompt += " (default is %s) " % default
elif abort is not None:
prompt += " (%s to abort) " % abort
number = None
while number is None:
msg(prompt, newline=False)
ans = input()
if ans == str(abort):
return None
if ans:
try:
number = int(ans)
if number < 1:
msg("Please enter a valid number.")
number = None
except ValueError:
msg("Please enter a valid number.")
elif default is not None:
number = default
return number
def get_yes_or_no(prompt, **kwargs):
default_value = kwargs.get("default", None)

View File

@@ -244,7 +244,7 @@ def _search_duplicate_specs_in_externals(error_cls):
+ lines
+ ["as they might result in non-deterministic hashes"]
)
except TypeError:
except (TypeError, AttributeError):
details = []
errors.append(error_cls(summary=error_msg, details=details))
@@ -292,12 +292,6 @@ def _avoid_mismatched_variants(error_cls):
errors = []
packages_yaml = spack.config.CONFIG.get_config("packages")
def make_error(config_data, summary):
s = io.StringIO()
s.write("Occurring in the following file:\n")
syaml.dump_config(config_data, stream=s, blame=True)
return error_cls(summary=summary, details=[s.getvalue()])
for pkg_name in packages_yaml:
# 'all:' must be more forgiving, since it is setting defaults for everything
if pkg_name == "all" or "variants" not in packages_yaml[pkg_name]:
@@ -317,7 +311,7 @@ def make_error(config_data, summary):
f"Setting a preference for the '{pkg_name}' package to the "
f"non-existing variant '{variant.name}'"
)
errors.append(make_error(preferences, summary))
errors.append(_make_config_error(preferences, summary, error_cls=error_cls))
continue
# Variant cannot accept this value
@@ -329,11 +323,41 @@ def make_error(config_data, summary):
f"Setting the variant '{variant.name}' of the '{pkg_name}' package "
f"to the invalid value '{str(variant)}'"
)
errors.append(make_error(preferences, summary))
errors.append(_make_config_error(preferences, summary, error_cls=error_cls))
return errors
@config_packages
def _wrongly_named_spec(error_cls):
"""Warns if the wrong name is used for an external spec"""
errors = []
packages_yaml = spack.config.CONFIG.get_config("packages")
for pkg_name in packages_yaml:
if pkg_name == "all":
continue
externals = packages_yaml[pkg_name].get("externals", [])
is_virtual = spack.repo.PATH.is_virtual(pkg_name)
for entry in externals:
spec = spack.spec.Spec(entry["spec"])
regular_pkg_is_wrong = not is_virtual and pkg_name != spec.name
virtual_pkg_is_wrong = is_virtual and not any(
p.name == spec.name for p in spack.repo.PATH.providers_for(pkg_name)
)
if regular_pkg_is_wrong or virtual_pkg_is_wrong:
summary = f"Wrong external spec detected for '{pkg_name}': {spec}"
errors.append(_make_config_error(entry, summary, error_cls=error_cls))
return errors
def _make_config_error(config_data, summary, error_cls):
s = io.StringIO()
s.write("Occurring in the following file:\n")
syaml.dump_config(config_data, stream=s, blame=True)
return error_cls(summary=summary, details=[s.getvalue()])
#: Sanity checks on package directives
package_directives = AuditClass(
group="packages",
@@ -772,13 +796,33 @@ def check_virtual_with_variants(spec, msg):
except spack.repo.UnknownPackageError:
# This dependency is completely missing, so report
# and continue the analysis
summary = (
f"{pkg_name}: unknown package '{dep_name}' in " "'depends_on' directive"
)
summary = f"{pkg_name}: unknown package '{dep_name}' in 'depends_on' directive"
details = [f" in {filename}"]
errors.append(error_cls(summary=summary, details=details))
continue
# Check for self-referential specs similar to:
#
# depends_on("foo@X.Y", when="^foo+bar")
#
# That would allow clingo to choose whether to have foo@X.Y+bar in the graph.
problematic_edges = [
x for x in when.edges_to_dependencies(dep_name) if not x.virtuals
]
if problematic_edges and not dep.patches:
summary = (
f"{pkg_name}: dependency on '{dep.spec}' when '{when}' is self-referential"
)
details = [
(
f" please specify better using '^[virtuals=...] {dep_name}', or "
f"substitute with an equivalent condition on '{pkg_name}'"
),
f" in {filename}",
]
errors.append(error_cls(summary=summary, details=details))
continue
# check variants
dependency_variants = dep.spec.variants
for name, value in dependency_variants.items():

View File

@@ -5,7 +5,6 @@
import codecs
import collections
import errno
import hashlib
import io
import itertools
@@ -18,13 +17,11 @@
import tarfile
import tempfile
import time
import traceback
import urllib.error
import urllib.parse
import urllib.request
import warnings
from contextlib import closing, contextmanager
from gzip import GzipFile
from contextlib import closing
from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple
from urllib.error import HTTPError, URLError
@@ -50,6 +47,7 @@
import spack.stage
import spack.store
import spack.traverse as traverse
import spack.util.archive
import spack.util.crypto
import spack.util.file_cache as file_cache
import spack.util.gpg
@@ -112,10 +110,6 @@ def __init__(self, errors):
super().__init__(self.message)
class ListMirrorSpecsError(spack.error.SpackError):
"""Raised when unable to retrieve list of specs from the mirror"""
class BinaryCacheIndex:
"""
The BinaryCacheIndex tracks what specs are available on (usually remote)
@@ -542,83 +536,6 @@ def binary_index_location():
BINARY_INDEX: BinaryCacheIndex = llnl.util.lang.Singleton(BinaryCacheIndex) # type: ignore
class NoOverwriteException(spack.error.SpackError):
"""Raised when a file would be overwritten"""
def __init__(self, file_path):
super().__init__(f"Refusing to overwrite the following file: {file_path}")
class NoGpgException(spack.error.SpackError):
"""
Raised when gpg2 is not in PATH
"""
def __init__(self, msg):
super().__init__(msg)
class NoKeyException(spack.error.SpackError):
"""
Raised when gpg has no default key added.
"""
def __init__(self, msg):
super().__init__(msg)
class PickKeyException(spack.error.SpackError):
"""
Raised when multiple keys can be used to sign.
"""
def __init__(self, keys):
err_msg = "Multiple keys available for signing\n%s\n" % keys
err_msg += "Use spack buildcache create -k <key hash> to pick a key."
super().__init__(err_msg)
class NoVerifyException(spack.error.SpackError):
"""
Raised if file fails signature verification.
"""
pass
class NoChecksumException(spack.error.SpackError):
"""
Raised if file fails checksum verification.
"""
def __init__(self, path, size, contents, algorithm, expected, computed):
super().__init__(
f"{algorithm} checksum failed for {path}",
f"Expected {expected} but got {computed}. "
f"File size = {size} bytes. Contents = {contents!r}",
)
class NewLayoutException(spack.error.SpackError):
"""
Raised if directory layout is different from buildcache.
"""
def __init__(self, msg):
super().__init__(msg)
class InvalidMetadataFile(spack.error.SpackError):
pass
class UnsignedPackageException(spack.error.SpackError):
"""
Raised if installation of unsigned package is attempted without
the use of ``--no-check-signature``.
"""
def compute_hash(data):
if isinstance(data, str):
data = data.encode("utf-8")
@@ -993,15 +910,10 @@ def url_read_method(url):
if entry.endswith("spec.json") or entry.endswith("spec.json.sig")
]
read_fn = url_read_method
except KeyError as inst:
msg = "No packages at {0}: {1}".format(cache_prefix, inst)
tty.warn(msg)
except Exception as err:
# If we got some kind of S3 (access denied or other connection
# error), the first non boto-specific class in the exception
# hierarchy is Exception. Just print a warning and return
msg = "Encountered problem listing packages at {0}: {1}".format(cache_prefix, err)
tty.warn(msg)
# If we got some kind of S3 (access denied or other connection error), the first non
# boto-specific class in the exception is Exception. Just print a warning and return
tty.warn(f"Encountered problem listing packages at {cache_prefix}: {err}")
return file_list, read_fn
@@ -1048,11 +960,10 @@ def generate_package_index(cache_prefix, concurrency=32):
"""
try:
file_list, read_fn = _spec_files_from_cache(cache_prefix)
except ListMirrorSpecsError as err:
tty.error("Unable to generate package index, {0}".format(err))
return
except ListMirrorSpecsError as e:
raise GenerateIndexError(f"Unable to generate package index: {e}") from e
tty.debug("Retrieving spec descriptor files from {0} to build index".format(cache_prefix))
tty.debug(f"Retrieving spec descriptor files from {cache_prefix} to build index")
tmpdir = tempfile.mkdtemp()
@@ -1062,27 +973,22 @@ def generate_package_index(cache_prefix, concurrency=32):
try:
_read_specs_and_push_index(file_list, read_fn, cache_prefix, db, db_root_dir, concurrency)
except Exception as err:
msg = "Encountered problem pushing package index to {0}: {1}".format(cache_prefix, err)
tty.warn(msg)
tty.debug("\n" + traceback.format_exc())
except Exception as e:
raise GenerateIndexError(
f"Encountered problem pushing package index to {cache_prefix}: {e}"
) from e
finally:
shutil.rmtree(tmpdir)
shutil.rmtree(tmpdir, ignore_errors=True)
def generate_key_index(key_prefix, tmpdir=None):
"""Create the key index page.
Creates (or replaces) the "index.json" page at the location given in
key_prefix. This page contains an entry for each key (.pub) under
key_prefix.
Creates (or replaces) the "index.json" page at the location given in key_prefix. This page
contains an entry for each key (.pub) under key_prefix.
"""
tty.debug(
" ".join(
("Retrieving key.pub files from", url_util.format(key_prefix), "to build key index")
)
)
tty.debug(f"Retrieving key.pub files from {url_util.format(key_prefix)} to build key index")
try:
fingerprints = (
@@ -1090,17 +996,8 @@ def generate_key_index(key_prefix, tmpdir=None):
for entry in web_util.list_url(key_prefix, recursive=False)
if entry.endswith(".pub")
)
except KeyError as inst:
msg = "No keys at {0}: {1}".format(key_prefix, inst)
tty.warn(msg)
return
except Exception as err:
# If we got some kind of S3 (access denied or other connection
# error), the first non boto-specific class in the exception
# hierarchy is Exception. Just print a warning and return
msg = "Encountered problem listing keys at {0}: {1}".format(key_prefix, err)
tty.warn(msg)
return
except Exception as e:
raise CannotListKeys(f"Encountered problem listing keys at {key_prefix}: {e}") from e
remove_tmpdir = False
@@ -1125,213 +1022,55 @@ def generate_key_index(key_prefix, tmpdir=None):
keep_original=False,
extra_args={"ContentType": "application/json"},
)
except Exception as err:
msg = "Encountered problem pushing key index to {0}: {1}".format(key_prefix, err)
tty.warn(msg)
except Exception as e:
raise GenerateIndexError(
f"Encountered problem pushing key index to {key_prefix}: {e}"
) from e
finally:
if remove_tmpdir:
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 f, ChecksumWriter(f) as inner_checksum, closing(
GzipFile(filename="", mode="wb", compresslevel=6, mtime=0, fileobj=inner_checksum)
) as gzip_file, ChecksumWriter(gzip_file) as outer_checksum, tarfile.TarFile(
name="", mode="w", fileobj=outer_checksum
) as tar:
yield tar, inner_checksum, outer_checksum
def _tarinfo_name(absolute_path: str, *, _path=pathlib.PurePath) -> str:
"""Compute tarfile entry name as the relative path from the (system) root."""
return _path(*_path(absolute_path).parts[1:]).as_posix()
shutil.rmtree(tmpdir, ignore_errors=True)
def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
"""Create a tarfile of an install prefix of a spec. Skips existing buildinfo file.
Only adds regular files, symlinks and dirs. Skips devices, fifos. Preserves hardlinks.
Normalizes permissions like git. Tar entries are added in depth-first pre-order, with
dir entries partitioned by file | dir, and sorted alphabetically, for reproducibility.
Partitioning ensures only one dir is in memory at a time, and sorting improves compression.
Args:
tar: tarfile object to add files to
prefix: absolute install prefix of spec"""
if not os.path.isabs(prefix) or not os.path.isdir(prefix):
raise ValueError(f"prefix '{prefix}' must be an absolute path to a directory")
hardlink_to_tarinfo_name: Dict[Tuple[int, int], str] = dict()
stat_key = lambda stat: (stat.st_dev, stat.st_ino)
try: # skip buildinfo file if it exists
files_to_skip = [stat_key(os.lstat(buildinfo_file_name(prefix)))]
skip = lambda entry: stat_key(entry.stat(follow_symlinks=False)) in files_to_skip
except OSError:
files_to_skip = []
skip = lambda entry: False
# First add all directories leading up to `prefix` (Spack <= 0.21 did not do this, leading to
# issues when tarballs are used in runtimes like AWS lambda). Skip the file system root.
parent_dirs = reversed(pathlib.Path(prefix).parents)
next(parent_dirs) # skip the root: slices are supported from python 3.10
for parent_dir in parent_dirs:
dir_info = tarfile.TarInfo(_tarinfo_name(str(parent_dir)))
dir_info.type = tarfile.DIRTYPE
dir_info.mode = 0o755
tar.addfile(dir_info)
dir_stack = [prefix]
while dir_stack:
dir = dir_stack.pop()
# Add the dir before its contents
dir_info = tarfile.TarInfo(_tarinfo_name(dir))
dir_info.type = tarfile.DIRTYPE
dir_info.mode = 0o755
tar.addfile(dir_info)
# Sort by name: reproducible & improves compression
with os.scandir(dir) as it:
entries = sorted(it, key=lambda entry: entry.name)
new_dirs = []
for entry in entries:
if entry.is_dir(follow_symlinks=False):
new_dirs.append(entry.path)
continue
file_info = tarfile.TarInfo(_tarinfo_name(entry.path))
s = entry.stat(follow_symlinks=False)
# Skip existing binary distribution files.
id = stat_key(s)
if id in files_to_skip:
continue
# Normalize the mode
file_info.mode = 0o644 if s.st_mode & 0o100 == 0 else 0o755
if entry.is_symlink():
file_info.type = tarfile.SYMTYPE
file_info.linkname = os.readlink(entry.path)
tar.addfile(file_info)
elif entry.is_file(follow_symlinks=False):
# Deduplicate hardlinks
if s.st_nlink > 1:
if id in hardlink_to_tarinfo_name:
file_info.type = tarfile.LNKTYPE
file_info.linkname = hardlink_to_tarinfo_name[id]
tar.addfile(file_info)
continue
hardlink_to_tarinfo_name[id] = file_info.name
# If file not yet seen, copy it.
file_info.type = tarfile.REGTYPE
file_info.size = s.st_size
with open(entry.path, "rb") as f:
tar.addfile(file_info, f)
dir_stack.extend(reversed(new_dirs)) # we pop, so reverse to stay alphabetical
class ChecksumWriter(io.BufferedIOBase):
"""Checksum writer computes a checksum while writing to a file."""
myfileobj = None
def __init__(self, fileobj, algorithm=hashlib.sha256):
self.fileobj = fileobj
self.hasher = algorithm()
self.length = 0
def hexdigest(self):
return self.hasher.hexdigest()
def write(self, data):
if isinstance(data, (bytes, bytearray)):
length = len(data)
else:
data = memoryview(data)
length = data.nbytes
if length > 0:
self.fileobj.write(data)
self.hasher.update(data)
self.length += length
return length
def read(self, size=-1):
raise OSError(errno.EBADF, "read() on write-only object")
def read1(self, size=-1):
raise OSError(errno.EBADF, "read1() on write-only object")
def peek(self, n):
raise OSError(errno.EBADF, "peek() on write-only object")
@property
def closed(self):
return self.fileobj is None
def close(self):
fileobj = self.fileobj
if fileobj is None:
return
self.fileobj.close()
self.fileobj = None
def flush(self):
self.fileobj.flush()
def fileno(self):
return self.fileobj.fileno()
def rewind(self):
raise OSError("Can't rewind while computing checksum")
def readable(self):
return False
def writable(self):
return True
def seekable(self):
return True
def tell(self):
return self.fileobj.tell()
def seek(self, offset, whence=io.SEEK_SET):
# In principle forward seek is possible with b"0" padding,
# but this is not implemented.
if offset == 0 and whence == io.SEEK_CUR:
return
raise OSError("Can't seek while computing checksum")
def readline(self, size=-1):
raise OSError(errno.EBADF, "readline() on write-only object")
spack.util.archive.reproducible_tarfile_from_prefix(
tar,
prefix,
# Spack <= 0.21 did not include parent directories, leading to issues when tarballs are
# used in runtimes like AWS lambda.
include_parent_directories=True,
skip=skip,
)
def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict):
with gzip_compressed_tarfile(tarfile_path) as (tar, inner_checksum, outer_checksum):
with spack.util.archive.gzip_compressed_tarfile(tarfile_path) as (
tar,
inner_checksum,
outer_checksum,
):
# Tarball the install prefix
tarfile_of_spec_prefix(tar, binaries_dir)
# Serialize buildinfo for the tarball
bstring = syaml.dump(buildinfo, default_flow_style=True).encode("utf-8")
tarinfo = tarfile.TarInfo(name=_tarinfo_name(buildinfo_file_name(binaries_dir)))
tarinfo = tarfile.TarInfo(
name=spack.util.archive.default_path_to_name(buildinfo_file_name(binaries_dir))
)
tarinfo.type = tarfile.REGTYPE
tarinfo.size = len(bstring)
tarinfo.mode = 0o644
@@ -1360,7 +1099,8 @@ def push_or_raise(spec: Spec, out_url: str, options: PushOptions):
used at the mirror (following <tarball_directory_name>).
This method raises :py:class:`NoOverwriteException` when ``force=False`` and the tarball or
spec.json file already exist in the buildcache.
spec.json file already exist in the buildcache. It raises :py:class:`PushToBuildCacheError`
when the tarball or spec.json file cannot be pushed to the buildcache.
"""
if not spec.concrete:
raise ValueError("spec must be concrete to build tarball")
@@ -1438,13 +1178,18 @@ def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, option
key = select_signing_key(options.key)
sign_specfile(key, options.force, specfile_path)
# push tarball and signed spec json to remote mirror
web_util.push_to_url(spackfile_path, remote_spackfile_path, keep_original=False)
web_util.push_to_url(
signed_specfile_path if not options.unsigned else specfile_path,
remote_signed_specfile_path if not options.unsigned else remote_specfile_path,
keep_original=False,
)
try:
# push tarball and signed spec json to remote mirror
web_util.push_to_url(spackfile_path, remote_spackfile_path, keep_original=False)
web_util.push_to_url(
signed_specfile_path if not options.unsigned else specfile_path,
remote_signed_specfile_path if not options.unsigned else remote_specfile_path,
keep_original=False,
)
except Exception as e:
raise PushToBuildCacheError(
f"Encountered problem pushing binary {remote_spackfile_path}: {e}"
) from e
# push the key to the build cache's _pgp directory so it can be
# imported
@@ -1456,8 +1201,6 @@ def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, option
if options.regenerate_index:
generate_package_index(url_util.join(out_url, os.path.relpath(cache_prefix, stage_dir)))
return None
class NotInstalledError(spack.error.SpackError):
"""Raised when a spec is not installed but picked to be packaged."""
@@ -1512,28 +1255,6 @@ def specs_to_be_packaged(
return [s for s in itertools.chain(roots, deps) if not s.external]
def push(spec: Spec, mirror_url: str, options: PushOptions):
"""Create and push binary package for a single spec to the specified
mirror url.
Args:
spec: Spec to package and push
mirror_url: Desired destination url for binary package
options:
Returns:
True if package was pushed, False otherwise.
"""
try:
push_or_raise(spec, mirror_url, options)
except NoOverwriteException as e:
warnings.warn(str(e))
return False
return True
def try_verify(specfile_path):
"""Utility function to attempt to verify a local file. Assumes the
file is a clearsigned signature file.
@@ -1701,7 +1422,7 @@ def fetch_url_to_mirror(url):
response = spack.oci.opener.urlopen(
urllib.request.Request(
url=ref.manifest_url(),
headers={"Accept": "application/vnd.oci.image.manifest.v1+json"},
headers={"Accept": ", ".join(spack.oci.oci.manifest_content_type)},
)
)
except Exception:
@@ -2866,3 +2587,96 @@ def conditional_fetch(self) -> FetchIndexResult:
raise FetchIndexError(f"Remote index {url_manifest} is invalid")
return FetchIndexResult(etag=None, hash=index_digest.digest, data=result, fresh=False)
class NoOverwriteException(spack.error.SpackError):
"""Raised when a file would be overwritten"""
def __init__(self, file_path):
super().__init__(f"Refusing to overwrite the following file: {file_path}")
class NoGpgException(spack.error.SpackError):
"""
Raised when gpg2 is not in PATH
"""
def __init__(self, msg):
super().__init__(msg)
class NoKeyException(spack.error.SpackError):
"""
Raised when gpg has no default key added.
"""
def __init__(self, msg):
super().__init__(msg)
class PickKeyException(spack.error.SpackError):
"""
Raised when multiple keys can be used to sign.
"""
def __init__(self, keys):
err_msg = "Multiple keys available for signing\n%s\n" % keys
err_msg += "Use spack buildcache create -k <key hash> to pick a key."
super().__init__(err_msg)
class NoVerifyException(spack.error.SpackError):
"""
Raised if file fails signature verification.
"""
pass
class NoChecksumException(spack.error.SpackError):
"""
Raised if file fails checksum verification.
"""
def __init__(self, path, size, contents, algorithm, expected, computed):
super().__init__(
f"{algorithm} checksum failed for {path}",
f"Expected {expected} but got {computed}. "
f"File size = {size} bytes. Contents = {contents!r}",
)
class NewLayoutException(spack.error.SpackError):
"""
Raised if directory layout is different from buildcache.
"""
def __init__(self, msg):
super().__init__(msg)
class InvalidMetadataFile(spack.error.SpackError):
pass
class UnsignedPackageException(spack.error.SpackError):
"""
Raised if installation of unsigned package is attempted without
the use of ``--no-check-signature``.
"""
class ListMirrorSpecsError(spack.error.SpackError):
"""Raised when unable to retrieve list of specs from the mirror"""
class GenerateIndexError(spack.error.SpackError):
"""Raised when unable to generate key or package index for mirror"""
class CannotListKeys(GenerateIndexError):
"""Raised when unable to list keys when generating key index"""
class PushToBuildCacheError(spack.error.SpackError):
"""Raised when unable to push objects to binary mirror"""

View File

@@ -213,9 +213,6 @@ def _root_spec(spec_str: str) -> str:
platform = str(spack.platforms.host())
if platform == "darwin":
spec_str += " %apple-clang"
elif platform == "windows":
# TODO (johnwparent): Remove version constraint when clingo patch is up
spec_str += " %msvc@:19.37"
elif platform == "linux":
spec_str += " %gcc"
elif platform == "freebsd":

View File

@@ -147,7 +147,7 @@ def _add_compilers_if_missing() -> None:
mixed_toolchain=sys.platform == "darwin"
)
if new_compilers:
spack.compilers.add_compilers_to_config(new_compilers, init_config=False)
spack.compilers.add_compilers_to_config(new_compilers)
@contextlib.contextmanager

View File

@@ -542,7 +542,7 @@ def verify_patchelf(patchelf: "spack.util.executable.Executable") -> bool:
return version >= spack.version.Version("0.13.1")
def ensure_patchelf_in_path_or_raise() -> None:
def ensure_patchelf_in_path_or_raise() -> spack.util.executable.Executable:
"""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

View File

@@ -146,7 +146,7 @@ def mypy_root_spec() -> str:
def black_root_spec() -> str:
"""Return the root spec used to bootstrap black"""
return _root_spec("py-black@:23.1.0")
return _root_spec("py-black@:24.1.0")
def flake8_root_spec() -> str:

View File

@@ -217,6 +217,9 @@ def clean_environment():
env.unset("R_HOME")
env.unset("R_ENVIRON")
env.unset("LUA_PATH")
env.unset("LUA_CPATH")
# Affects GNU make, can e.g. indirectly inhibit enabling parallel build
# env.unset('MAKEFLAGS')
@@ -552,58 +555,55 @@ def set_package_py_globals(pkg, context: Context = Context.BUILD):
"""
module = ModuleChangePropagator(pkg)
m = module
if context == Context.BUILD:
jobs = determine_number_of_jobs(parallel=pkg.parallel)
m.make_jobs = jobs
module.std_cmake_args = spack.build_systems.cmake.CMakeBuilder.std_args(pkg)
module.std_meson_args = spack.build_systems.meson.MesonBuilder.std_args(pkg)
module.std_pip_args = spack.build_systems.python.PythonPipBuilder.std_args(pkg)
# TODO: make these build deps that can be installed if not found.
m.make = MakeExecutable("make", jobs)
m.gmake = MakeExecutable("gmake", jobs)
m.ninja = MakeExecutable("ninja", jobs, supports_jobserver=False)
# TODO: johnwparent: add package or builder support to define these build tools
# for now there is no entrypoint for builders to define these on their
# own
if sys.platform == "win32":
m.nmake = Executable("nmake")
m.msbuild = Executable("msbuild")
# analog to configure for win32
m.cscript = Executable("cscript")
jobs = determine_number_of_jobs(parallel=pkg.parallel)
module.make_jobs = jobs
# Find the configure script in the archive path
# Don't use which for this; we want to find it in the current dir.
m.configure = Executable("./configure")
# TODO: make these build deps that can be installed if not found.
module.make = MakeExecutable("make", jobs)
module.gmake = MakeExecutable("gmake", jobs)
module.ninja = MakeExecutable("ninja", jobs, supports_jobserver=False)
# TODO: johnwparent: add package or builder support to define these build tools
# for now there is no entrypoint for builders to define these on their
# own
if sys.platform == "win32":
module.nmake = Executable("nmake")
module.msbuild = Executable("msbuild")
# analog to configure for win32
module.cscript = Executable("cscript")
# Standard CMake arguments
m.std_cmake_args = spack.build_systems.cmake.CMakeBuilder.std_args(pkg)
m.std_meson_args = spack.build_systems.meson.MesonBuilder.std_args(pkg)
m.std_pip_args = spack.build_systems.python.PythonPipBuilder.std_args(pkg)
# Find the configure script in the archive path
# Don't use which for this; we want to find it in the current dir.
module.configure = Executable("./configure")
# Put spack compiler paths in module scope. (Some packages use it
# in setup_run_environment etc, so don't put it context == build)
link_dir = spack.paths.build_env_path
m.spack_cc = os.path.join(link_dir, pkg.compiler.link_paths["cc"])
m.spack_cxx = os.path.join(link_dir, pkg.compiler.link_paths["cxx"])
m.spack_f77 = os.path.join(link_dir, pkg.compiler.link_paths["f77"])
m.spack_fc = os.path.join(link_dir, pkg.compiler.link_paths["fc"])
module.spack_cc = os.path.join(link_dir, pkg.compiler.link_paths["cc"])
module.spack_cxx = os.path.join(link_dir, pkg.compiler.link_paths["cxx"])
module.spack_f77 = os.path.join(link_dir, pkg.compiler.link_paths["f77"])
module.spack_fc = os.path.join(link_dir, pkg.compiler.link_paths["fc"])
# Useful directories within the prefix are encapsulated in
# a Prefix object.
m.prefix = pkg.prefix
module.prefix = pkg.prefix
# Platform-specific library suffix.
m.dso_suffix = dso_suffix
module.dso_suffix = dso_suffix
def static_to_shared_library(static_lib, shared_lib=None, **kwargs):
compiler_path = kwargs.get("compiler", m.spack_cc)
compiler_path = kwargs.get("compiler", module.spack_cc)
compiler = Executable(compiler_path)
return _static_to_shared_library(
pkg.spec.architecture, compiler, static_lib, shared_lib, **kwargs
)
m.static_to_shared_library = static_to_shared_library
module.static_to_shared_library = static_to_shared_library
module.propagate_changes_to_mro()
@@ -789,7 +789,7 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD):
for mod in ["cray-mpich", "cray-libsci"]:
module("unload", mod)
if target.module_name:
if target and target.module_name:
load_module(target.module_name)
load_external_modules(pkg)
@@ -972,8 +972,8 @@ def __init__(self, *specs: spack.spec.Spec, context: Context) -> None:
self.should_set_package_py_globals = (
self.should_setup_dependent_build_env | self.should_setup_run_env | UseMode.ROOT
)
# In a build context, the root and direct build deps need build-specific globals set.
self.needs_build_context = UseMode.ROOT | UseMode.BUILDTIME_DIRECT
# In a build context, the root needs build-specific globals set.
self.needs_build_context = UseMode.ROOT
def set_all_package_py_globals(self):
"""Set the globals in modules of package.py files."""

View File

@@ -434,11 +434,6 @@ def _do_patch_libtool(self):
r"crtendS\.o",
]:
x.filter(regex=(rehead + o), repl="")
elif self.pkg.compiler.name == "dpcpp":
# Hack to filter out spurious predep_objects when building with Intel dpcpp
# (see https://github.com/spack/spack/issues/32863):
x.filter(regex=r"^(predep_objects=.*)/tmp/conftest-[0-9A-Fa-f]+\.o", repl=r"\1")
x.filter(regex=r"^(predep_objects=.*)/tmp/a-[0-9A-Fa-f]+\.o", repl=r"\1")
elif self.pkg.compiler.name == "nag":
for tag in ["fc", "f77"]:
marker = markers[tag]
@@ -541,7 +536,7 @@ def autoreconf(self, pkg, spec, prefix):
if os.path.exists(self.configure_abs_path):
return
# Else try to regenerate it, which reuquires a few build dependencies
# Else try to regenerate it, which requires a few build dependencies
ensure_build_dependencies_or_raise(
spec=spec,
dependencies=["autoconf", "automake", "libtool"],

View File

@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections.abc
import os
import re
from typing import Tuple
import llnl.util.filesystem as fs
@@ -15,6 +16,12 @@
from .cmake import CMakeBuilder, CMakePackage
def spec_uses_toolchain(spec):
gcc_toolchain_regex = re.compile(".*gcc-toolchain.*")
using_toolchain = list(filter(gcc_toolchain_regex.match, spec.compiler_flags["cxxflags"]))
return using_toolchain
def cmake_cache_path(name, value, comment="", force=False):
"""Generate a string for a cmake cache variable"""
force_str = " FORCE" if force else ""
@@ -132,6 +139,11 @@ def initconfig_compiler_entries(self):
"endif()\n",
]
# We defined hipcc as top-level compiler for packages when +rocm.
# This avoid problems coming from rocm flags being applied to another compiler.
if "+rocm" in spec:
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
flags = spec.compiler_flags
# use global spack compiler flags
@@ -199,6 +211,8 @@ def initconfig_mpi_entries(self):
mpiexec = "/usr/bin/srun"
else:
mpiexec = os.path.join(spec["slurm"].prefix.bin, "srun")
elif hasattr(spec["mpi"].package, "mpiexec"):
mpiexec = spec["mpi"].package.mpiexec
else:
mpiexec = os.path.join(spec["mpi"].prefix.bin, "mpirun")
if not os.path.exists(mpiexec):
@@ -211,7 +225,7 @@ def initconfig_mpi_entries(self):
else:
# starting with cmake 3.10, FindMPI expects MPIEXEC_EXECUTABLE
# vs the older versions which expect MPIEXEC
if self.pkg.spec["cmake"].satisfies("@3.10:"):
if spec["cmake"].satisfies("@3.10:"):
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", mpiexec))
else:
entries.append(cmake_cache_path("MPIEXEC", mpiexec))
@@ -246,12 +260,17 @@ def initconfig_hardware_entries(self):
# Include the deprecated CUDA_TOOLKIT_ROOT_DIR for supporting BLT packages
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", cudatoolkitdir))
archs = spec.variants["cuda_arch"].value
if archs[0] != "none":
arch_str = ";".join(archs)
entries.append(
cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(arch_str))
)
# CUDA_FLAGS
cuda_flags = []
if not spec.satisfies("cuda_arch=none"):
cuda_archs = ";".join(spec.variants["cuda_arch"].value)
entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", cuda_archs))
if spec_uses_toolchain(spec):
cuda_flags.append("-Xcompiler {}".format(spec_uses_toolchain(spec)[0]))
entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags)))
if "+rocm" in spec:
entries.append("#------------------{0}".format("-" * 30))
@@ -260,9 +279,6 @@ def initconfig_hardware_entries(self):
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
entries.append(
cmake_cache_path("HIP_CXX_COMPILER", "{0}".format(self.spec["hip"].hipcc))
)
llvm_bin = spec["llvm-amdgpu"].prefix.bin
llvm_prefix = spec["llvm-amdgpu"].prefix
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
@@ -275,11 +291,9 @@ def initconfig_hardware_entries(self):
archs = self.spec.variants["amdgpu_target"].value
if archs[0] != "none":
arch_str = ";".join(archs)
entries.append(
cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str))
)
entries.append(cmake_cache_string("AMDGPU_TARGETS", "{0}".format(arch_str)))
entries.append(cmake_cache_string("GPU_TARGETS", "{0}".format(arch_str)))
entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str))
entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str))
entries.append(cmake_cache_string("GPU_TARGETS", arch_str))
return entries

View File

@@ -15,6 +15,7 @@
import spack.build_environment
import spack.builder
import spack.deptypes as dt
import spack.package_base
from spack.directives import build_system, conflicts, depends_on, variant
from spack.multimethod import when
@@ -31,8 +32,86 @@ def _extract_primary_generator(generator):
primary generator from the generator string which may contain an
optional secondary generator.
"""
primary_generator = _primary_generator_extractor.match(generator).group(1)
return primary_generator
return _primary_generator_extractor.match(generator).group(1)
def _maybe_set_python_hints(pkg: spack.package_base.PackageBase, args: List[str]) -> None:
"""Set the PYTHON_EXECUTABLE, Python_EXECUTABLE, and Python3_EXECUTABLE CMake variables
if the package has Python as build or link dep and ``find_python_hints`` is set to True. See
``find_python_hints`` for context."""
if not getattr(pkg, "find_python_hints", False):
return
pythons = pkg.spec.dependencies("python", dt.BUILD | dt.LINK)
if len(pythons) != 1:
return
try:
python_executable = pythons[0].package.command.path
except RuntimeError:
return
args.extend(
[
CMakeBuilder.define("PYTHON_EXECUTABLE", python_executable),
CMakeBuilder.define("Python_EXECUTABLE", python_executable),
CMakeBuilder.define("Python3_EXECUTABLE", python_executable),
]
)
def _supports_compilation_databases(pkg: spack.package_base.PackageBase) -> bool:
"""Check if this package (and CMake) can support compilation databases."""
# CMAKE_EXPORT_COMPILE_COMMANDS only exists for CMake >= 3.5
if not pkg.spec.satisfies("^cmake@3.5:"):
return False
# CMAKE_EXPORT_COMPILE_COMMANDS is only implemented for Makefile and Ninja generators
if not (pkg.spec.satisfies("generator=make") or pkg.spec.satisfies("generator=ninja")):
return False
return True
def _conditional_cmake_defaults(pkg: spack.package_base.PackageBase, args: List[str]) -> None:
"""Set a few default defines for CMake, depending on its version."""
cmakes = pkg.spec.dependencies("cmake", dt.BUILD)
if len(cmakes) != 1:
return
cmake = cmakes[0]
# CMAKE_INTERPROCEDURAL_OPTIMIZATION only exists for CMake >= 3.9
try:
ipo = pkg.spec.variants["ipo"].value
except KeyError:
ipo = False
if cmake.satisfies("@3.9:"):
args.append(CMakeBuilder.define("CMAKE_INTERPROCEDURAL_OPTIMIZATION", ipo))
# Disable Package Registry: export(PACKAGE) may put files in the user's home directory, and
# find_package may search there. This is not what we want.
# Do not populate CMake User Package Registry
if cmake.satisfies("@3.15:"):
# see https://cmake.org/cmake/help/latest/policy/CMP0090.html
args.append(CMakeBuilder.define("CMAKE_POLICY_DEFAULT_CMP0090", "NEW"))
elif cmake.satisfies("@3.1:"):
# see https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_NO_PACKAGE_REGISTRY.html
args.append(CMakeBuilder.define("CMAKE_EXPORT_NO_PACKAGE_REGISTRY", True))
# Do not use CMake User/System Package Registry
# https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#disabling-the-package-registry
if cmake.satisfies("@3.16:"):
args.append(CMakeBuilder.define("CMAKE_FIND_USE_PACKAGE_REGISTRY", False))
elif cmake.satisfies("@3.1:3.15"):
args.append(CMakeBuilder.define("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY", False))
args.append(CMakeBuilder.define("CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY", False))
# Export a compilation database if supported.
if _supports_compilation_databases(pkg):
args.append(CMakeBuilder.define("CMAKE_EXPORT_COMPILE_COMMANDS", True))
def generator(*names: str, default: Optional[str] = None):
@@ -86,6 +165,13 @@ class CMakePackage(spack.package_base.PackageBase):
#: Legacy buildsystem attribute used to deserialize and install old specs
legacy_buildsystem = "cmake"
#: When this package depends on Python and ``find_python_hints`` is set to True, pass the
#: defines {Python3,Python,PYTHON}_EXECUTABLE explicitly, so that CMake locates the right
#: Python in its builtin FindPython3, FindPython, and FindPythonInterp modules. Spack does
#: CMake's job because CMake's modules by default only search for Python versions known at the
#: time of release.
find_python_hints = True
build_system("cmake")
with when("build_system=cmake"):
@@ -216,7 +302,10 @@ class CMakeBuilder(BaseBuilder):
@property
def archive_files(self):
"""Files to archive for packages based on CMake"""
return [os.path.join(self.build_directory, "CMakeCache.txt")]
files = [os.path.join(self.build_directory, "CMakeCache.txt")]
if _supports_compilation_databases(self):
files.append(os.path.join(self.build_directory, "compile_commands.json"))
return files
@property
def root_cmakelists_dir(self):
@@ -241,9 +330,9 @@ def std_cmake_args(self):
"""Standard cmake arguments provided as a property for
convenience of package writers
"""
std_cmake_args = CMakeBuilder.std_args(self.pkg, generator=self.generator)
std_cmake_args += getattr(self.pkg, "cmake_flag_args", [])
return std_cmake_args
args = CMakeBuilder.std_args(self.pkg, generator=self.generator)
args += getattr(self.pkg, "cmake_flag_args", [])
return args
@staticmethod
def std_args(pkg, generator=None):
@@ -263,11 +352,6 @@ def std_args(pkg, generator=None):
except KeyError:
build_type = "RelWithDebInfo"
try:
ipo = pkg.spec.variants["ipo"].value
except KeyError:
ipo = False
define = CMakeBuilder.define
args = [
"-G",
@@ -276,10 +360,6 @@ def std_args(pkg, generator=None):
define("CMAKE_BUILD_TYPE", build_type),
]
# CMAKE_INTERPROCEDURAL_OPTIMIZATION only exists for CMake >= 3.9
if pkg.spec.satisfies("^cmake@3.9:"):
args.append(define("CMAKE_INTERPROCEDURAL_OPTIMIZATION", ipo))
if primary_generator == "Unix Makefiles":
args.append(define("CMAKE_VERBOSE_MAKEFILE", True))
@@ -288,6 +368,9 @@ def std_args(pkg, generator=None):
[define("CMAKE_FIND_FRAMEWORK", "LAST"), define("CMAKE_FIND_APPBUNDLE", "LAST")]
)
_conditional_cmake_defaults(pkg, args)
_maybe_set_python_hints(pkg, args)
# Set up CMake rpath
args.extend(
[

View File

@@ -218,7 +218,7 @@ def pset_components(self):
"+inspector": " intel-inspector",
"+itac": " intel-itac intel-ta intel-tc" " intel-trace-analyzer intel-trace-collector",
# Trace Analyzer and Collector
"+vtune": " intel-vtune"
"+vtune": " intel-vtune",
# VTune, ..-profiler since 2020, ..-amplifier before
}.items():
if variant in self.spec:

View File

@@ -29,15 +29,12 @@ class LuaPackage(spack.package_base.PackageBase):
with when("build_system=lua"):
depends_on("lua-lang")
extends("lua", when="^lua")
with when("^lua-luajit"):
extends("lua-luajit")
depends_on("luajit")
depends_on("lua-luajit+lualinks")
with when("^lua-luajit-openresty"):
extends("lua-luajit-openresty")
depends_on("luajit")
depends_on("lua-luajit-openresty+lualinks")
with when("^[virtuals=lua-lang] lua"):
extends("lua")
with when("^[virtuals=lua-lang] lua-luajit"):
extends("lua-luajit+lualinks")
with when("^[virtuals=lua-lang] lua-luajit-openresty"):
extends("lua-luajit-openresty+lualinks")
@property
def lua(self):

View File

@@ -149,7 +149,7 @@ def std_args(pkg):
else:
default_library = "shared"
args = [
return [
"-Dprefix={0}".format(pkg.prefix),
# If we do not specify libdir explicitly, Meson chooses something
# like lib/x86_64-linux-gnu, which causes problems when trying to
@@ -163,8 +163,6 @@ def std_args(pkg):
"-Dwrap_mode=nodownload",
]
return args
@property
def build_dirname(self):
"""Returns the directory name to use when building the package."""

View File

@@ -69,7 +69,7 @@ class MSBuildBuilder(BaseBuilder):
@property
def build_directory(self):
"""Return the directory containing the MSBuild solution or vcxproj."""
return self.pkg.stage.source_path
return fs.windows_sfn(self.pkg.stage.source_path)
@property
def toolchain_version(self):

View File

@@ -77,7 +77,11 @@ def ignore_quotes(self):
@property
def build_directory(self):
"""Return the directory containing the makefile."""
return self.pkg.stage.source_path if not self.makefile_root else self.makefile_root
return (
fs.windows_sfn(self.pkg.stage.source_path)
if not self.makefile_root
else fs.windows_sfn(self.makefile_root)
)
@property
def std_nmake_args(self):

View File

@@ -9,10 +9,13 @@
import shutil
from os.path import basename, isdir
from llnl.util.filesystem import HeaderList, find_libraries, join_path, mkdirp
from llnl.util import tty
from llnl.util.filesystem import HeaderList, LibraryList, find_libraries, join_path, mkdirp
from llnl.util.link_tree import LinkTree
from spack.directives import conflicts, variant
from spack.build_environment import dso_suffix
from spack.directives import conflicts, license, variant
from spack.package_base import InstallError
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable
@@ -23,6 +26,7 @@ class IntelOneApiPackage(Package):
"""Base class for Intel oneAPI packages."""
homepage = "https://software.intel.com/oneapi"
license("https://intel.ly/393CijO")
# oneAPI license does not allow mirroring outside of the
# organization (e.g. University/Company).
@@ -179,16 +183,72 @@ class IntelOneApiLibraryPackage(IntelOneApiPackage):
"""
def openmp_libs(self):
"""Supply LibraryList for linking OpenMP"""
# NB: Hunting down explicit library files may be the Spack way of
# doing things, but it is better to add the compiler defined option
# e.g. -fopenmp
# If other packages use openmp, then all the packages need to
# support the same ABI. Spack usually uses the same compiler
# for all the packages, but you can force it if necessary:
#
# e.g. spack install blaspp%oneapi@2024 ^intel-oneapi-mkl%oneapi@2024
#
if self.spec.satisfies("%intel") or self.spec.satisfies("%oneapi"):
libname = "libiomp5"
elif self.spec.satisfies("%gcc"):
libname = "libgomp"
elif self.spec.satisfies("%clang"):
libname = "libomp"
else:
raise InstallError(
"OneAPI package with OpenMP threading requires one of %clang, %gcc, %oneapi, "
"or %intel"
)
# query the compiler for the library path
with self.compiler.compiler_environment():
omp_lib_path = Executable(self.compiler.cc)(
"--print-file-name", f"{libname}.{dso_suffix}", output=str
).strip()
# Newer versions of clang do not give the full path to libomp. If that's
# the case, look in a path relative to the compiler where libomp is
# typically found. If it's not found there, error out.
if not os.path.exists(omp_lib_path) and self.spec.satisfies("%clang"):
compiler_root = os.path.dirname(os.path.dirname(os.path.realpath(self.compiler.cc)))
omp_lib_path_compiler = os.path.join(compiler_root, "lib", f"{libname}.{dso_suffix}")
if os.path.exists(omp_lib_path_compiler):
omp_lib_path = omp_lib_path_compiler
# if the compiler cannot find the file, it returns the input path
if not os.path.exists(omp_lib_path):
raise InstallError(f"OneAPI package cannot locate OpenMP library: {omp_lib_path}")
omp_libs = LibraryList(omp_lib_path)
tty.info(f"OneAPI package requires OpenMP library: {omp_libs}")
return omp_libs
# find_headers uses heuristics to determine the include directory
# that does not work for oneapi packages. Use explicit directories
# instead.
def header_directories(self, dirs):
h = HeaderList([])
h.directories = dirs
# trilinos passes the directories to cmake, and cmake requires
# that the directory exists
for dir in dirs:
if not isdir(dir):
raise RuntimeError(f"{dir} does not exist")
return h
@property
def headers(self):
return self.header_directories(
[self.component_prefix.include, self.component_prefix.include.join(self.component_dir)]
)
# This should match the directories added to CPATH by
# env/vars.sh for the component
return self.header_directories([self.component_prefix.include])
@property
def libs(self):

View File

@@ -4,12 +4,15 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import inspect
import os
from typing import Iterable
from llnl.util.filesystem import filter_file
from llnl.util.filesystem import filter_file, find
from llnl.util.lang import memoized
import spack.builder
import spack.package_base
from spack.directives import build_system, extends
from spack.install_test import SkipTest, test_part
from spack.util.executable import Executable
from ._checks import BaseBuilder, execute_build_time_tests
@@ -28,6 +31,58 @@ class PerlPackage(spack.package_base.PackageBase):
extends("perl", when="build_system=perl")
@property
@memoized
def _platform_dir(self):
"""Name of platform-specific module subdirectory."""
perl = self.spec["perl"].command
options = "-E", "use Config; say $Config{archname}"
out = perl(*options, output=str.split, error=str.split)
return out.strip()
@property
def use_modules(self) -> Iterable[str]:
"""Names of the package's perl modules."""
module_files = find(self.prefix.lib, ["*.pm"], recursive=True)
# Drop the platform directory, if present
if self._platform_dir:
platform_dir = self._platform_dir + os.sep
module_files = [m.replace(platform_dir, "") for m in module_files]
# Drop the extension and library path
prefix = self.prefix.lib + os.sep
modules = [os.path.splitext(m)[0].replace(prefix, "") for m in module_files]
# Drop the perl subdirectory as well
return ["::".join(m.split(os.sep)[1:]) for m in modules]
@property
def skip_modules(self) -> Iterable[str]:
"""Names of modules that should be skipped when running tests.
These are a subset of use_modules.
Returns:
List of strings of module names.
"""
return []
def test_use(self):
"""Test 'use module'"""
if not self.use_modules:
raise SkipTest("Test requires use_modules package property.")
perl = self.spec["perl"].command
for module in self.use_modules:
if module in self.skip_modules:
continue
with test_part(self, f"test_use-{module}", purpose=f"checking use of {module}"):
options = ["-we", f'use strict; use {module}; print("OK\n")']
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out
@spack.builder.builder("perl")
class PerlBuilder(BaseBuilder):
@@ -52,7 +107,7 @@ class PerlBuilder(BaseBuilder):
phases = ("configure", "build", "install")
#: Names associated with package methods in the old build-system format
legacy_methods = ("configure_args", "check")
legacy_methods = ("configure_args", "check", "test_use")
#: Names associated with package attributes in the old build-system format
legacy_attributes = ()

View File

@@ -2,11 +2,15 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import functools
import inspect
import operator
import os
import re
import shutil
from typing import Iterable, List, Mapping, Optional
import stat
from typing import Dict, Iterable, List, Mapping, Optional, Tuple
import archspec
@@ -23,7 +27,7 @@
import spack.package_base
import spack.spec
import spack.store
from spack.directives import build_system, depends_on, extends, maintainers
from spack.directives import build_system, depends_on, extends
from spack.error import NoHeadersError, NoLibrariesError
from spack.install_test import test_part
from spack.spec import Spec
@@ -52,8 +56,6 @@ def _flatten_dict(dictionary: Mapping[str, object]) -> Iterable[str]:
class PythonExtension(spack.package_base.PackageBase):
maintainers("adamjstewart")
@property
def import_modules(self) -> Iterable[str]:
"""Names of modules that the Python package provides.
@@ -136,31 +138,52 @@ def view_file_conflicts(self, view, merge_map):
return conflicts
def add_files_to_view(self, view, merge_map, skip_if_exists=True):
if not self.extendee_spec:
# Patch up shebangs to the python linked in the view only if python is built by Spack.
if not self.extendee_spec or self.extendee_spec.external:
return super().add_files_to_view(view, merge_map, skip_if_exists)
# We only patch shebangs in the bin directory.
copied_files: Dict[Tuple[int, int], str] = {} # File identifier -> source
delayed_links: List[Tuple[str, str]] = [] # List of symlinks from merge map
bin_dir = self.spec.prefix.bin
python_prefix = self.extendee_spec.prefix
python_is_external = self.extendee_spec.external
global_view = fs.same_path(python_prefix, view.get_projection_for_spec(self.spec))
for src, dst in merge_map.items():
if os.path.exists(dst):
if skip_if_exists and os.path.lexists(dst):
continue
elif global_view or not fs.path_contains_subdirectory(src, bin_dir):
if not fs.path_contains_subdirectory(src, bin_dir):
view.link(src, dst)
elif not os.path.islink(src):
continue
s = os.lstat(src)
# Symlink is delayed because we may need to re-target if its target is copied in view
if stat.S_ISLNK(s.st_mode):
delayed_links.append((src, dst))
continue
# If it's executable and has a shebang, copy and patch it.
if (s.st_mode & 0b111) and fs.has_shebang(src):
copied_files[(s.st_dev, s.st_ino)] = dst
shutil.copy2(src, dst)
is_script = fs.is_nonsymlink_exe_with_shebang(src)
if is_script and not python_is_external:
fs.filter_file(
python_prefix,
os.path.abspath(view.get_projection_for_spec(self.spec)),
dst,
)
fs.filter_file(
python_prefix, os.path.abspath(view.get_projection_for_spec(self.spec)), dst
)
else:
orig_link_target = os.path.realpath(src)
new_link_target = os.path.abspath(merge_map[orig_link_target])
view.link(new_link_target, dst)
view.link(src, dst)
# Finally re-target the symlinks that point to copied files.
for src, dst in delayed_links:
try:
s = os.stat(src)
target = copied_files[(s.st_dev, s.st_ino)]
except (OSError, KeyError):
target = None
if target:
os.symlink(os.path.relpath(target, os.path.dirname(dst)), dst)
else:
view.link(src, dst, spec=self.spec)
def remove_files_from_view(self, view, merge_map):
ignore_namespace = False
@@ -346,16 +369,19 @@ def headers(self) -> HeaderList:
# Remove py- prefix in package name
name = self.spec.name[3:]
# Headers may be in either location
# Headers should only be in include or platlib, but no harm in checking purelib too
include = self.prefix.join(self.spec["python"].package.include).join(name)
platlib = self.prefix.join(self.spec["python"].package.platlib).join(name)
headers = fs.find_all_headers(include) + fs.find_all_headers(platlib)
purelib = self.prefix.join(self.spec["python"].package.purelib).join(name)
headers_list = map(fs.find_all_headers, [include, platlib, purelib])
headers = functools.reduce(operator.add, headers_list)
if headers:
return headers
msg = "Unable to locate {} headers in {} or {}"
raise NoHeadersError(msg.format(self.spec.name, include, platlib))
msg = "Unable to locate {} headers in {}, {}, or {}"
raise NoHeadersError(msg.format(self.spec.name, include, platlib, purelib))
@property
def libs(self) -> LibraryList:
@@ -364,15 +390,19 @@ def libs(self) -> LibraryList:
# Remove py- prefix in package name
name = self.spec.name[3:]
root = self.prefix.join(self.spec["python"].package.platlib).join(name)
# Libraries should only be in platlib, but no harm in checking purelib too
platlib = self.prefix.join(self.spec["python"].package.platlib).join(name)
purelib = self.prefix.join(self.spec["python"].package.purelib).join(name)
libs = fs.find_all_libraries(root, recursive=True)
find_all_libraries = functools.partial(fs.find_all_libraries, recursive=True)
libs_list = map(find_all_libraries, [platlib, purelib])
libs = functools.reduce(operator.add, libs_list)
if libs:
return libs
msg = "Unable to recursively locate {} libraries in {}"
raise NoLibrariesError(msg.format(self.spec.name, root))
msg = "Unable to recursively locate {} libraries in {} or {}"
raise NoLibrariesError(msg.format(self.spec.name, platlib, purelib))
@spack.builder.builder("python_pip")

View File

@@ -75,6 +75,8 @@
# does not like its directory structure.
#
import os
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.package_base import PackageBase
@@ -154,6 +156,32 @@ def hip_flags(amdgpu_target):
archs = ",".join(amdgpu_target)
return "--amdgpu-target={0}".format(archs)
# ASAN
@staticmethod
def asan_on(env, llvm_path):
env.set("CC", llvm_path + "/bin/clang")
env.set("CXX", llvm_path + "/bin/clang++")
env.set("ASAN_OPTIONS", "detect_leaks=0")
for root, dirs, files in os.walk(llvm_path):
if "libclang_rt.asan-x86_64.so" in files:
asan_lib_path = root
env.prepend_path("LD_LIBRARY_PATH", asan_lib_path)
SET_DWARF_VERSION_4 = ""
try:
# This will throw an error if imported on a non-Linux platform.
import distro
distname = distro.id()
except ImportError:
distname = "unknown"
if "rhel" in distname or "sles" in distname:
SET_DWARF_VERSION_4 = "-gdwarf-5"
env.set("CFLAGS", "-fsanitize=address -shared-libasan -g " + SET_DWARF_VERSION_4)
env.set("CXXFLAGS", "-fsanitize=address -shared-libasan -g " + SET_DWARF_VERSION_4)
env.set("LDFLAGS", "-Wl,--enable-new-dtags -fuse-ld=lld -fsanitize=address -g -Wl,")
# HIP version vs Architecture
# TODO: add a bunch of lines like:
@@ -162,23 +190,9 @@ def hip_flags(amdgpu_target):
# Add compiler minimum versions based on the first release where the
# processor is included in llvm/lib/Support/TargetParser.cpp
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx900:xnack-")
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx906:xnack-")
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx908:xnack-")
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx90c")
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a")
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a:xnack-")
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a:xnack+")
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx940")
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx941")
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx942")
depends_on("llvm-amdgpu@4.5.0:", when="amdgpu_target=gfx1013")
depends_on("llvm-amdgpu@3.8.0:", when="amdgpu_target=gfx1030")
depends_on("llvm-amdgpu@3.9.0:", when="amdgpu_target=gfx1031")
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx1032")
depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx1033")
depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx1034")
depends_on("llvm-amdgpu@4.5.0:", when="amdgpu_target=gfx1035")
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx1036")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1100")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1101")

View File

@@ -9,6 +9,8 @@
import inspect
from typing import List, Optional, Tuple
from llnl.util import lang
import spack.build_environment
#: Builder classes, as registered by the "builder" decorator
@@ -231,24 +233,27 @@ def __new__(mcs, name, bases, attr_dict):
for temporary_stage in (_RUN_BEFORE, _RUN_AFTER):
staged_callbacks = temporary_stage.callbacks
# We don't have callbacks in this class, move on
if not staged_callbacks:
# Here we have an adapter from an old-style package. This means there is no
# hierarchy of builders, and every callback that had to be combined between
# *Package and *Builder has been combined already by _PackageAdapterMeta
if name == "Adapter":
continue
# If we are here we have callbacks. To get a complete list, get first what
# was attached to parent classes, then prepend what we have registered here.
# If we are here we have callbacks. To get a complete list, we accumulate all the
# callbacks from base classes, we deduplicate them, then prepend what we have
# registered here.
#
# The order should be:
# 1. Callbacks are registered in order within the same class
# 2. Callbacks defined in derived classes precede those defined in base
# classes
callbacks_from_base = []
for base in bases:
callbacks_from_base = getattr(base, temporary_stage.attribute_name, None)
if callbacks_from_base:
break
else:
callbacks_from_base = []
current_callbacks = getattr(base, temporary_stage.attribute_name, None)
if not current_callbacks:
continue
callbacks_from_base.extend(current_callbacks)
callbacks_from_base = list(lang.dedupe(callbacks_from_base))
# Set the callbacks in this class and flush the temporary stage
attr_dict[temporary_stage.attribute_name] = staged_callbacks[:] + callbacks_from_base
del temporary_stage.callbacks[:]

View File

@@ -35,9 +35,9 @@ def _misc_cache():
#: Spack's cache for small data
MISC_CACHE: Union[
spack.util.file_cache.FileCache, llnl.util.lang.Singleton
] = 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():
@@ -91,6 +91,6 @@ def symlink(self, mirror_ref):
#: Spack's local cache for downloaded source archives
FETCH_CACHE: Union[
spack.fetch_strategy.FsCache, llnl.util.lang.Singleton
] = 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

@@ -70,7 +70,7 @@
JOB_NAME_FORMAT = (
"{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{arch=architecture}"
)
IS_WINDOWS = sys.platform == "win32"
spack_gpg = spack.main.SpackCommand("gpg")
spack_compiler = spack.main.SpackCommand("compiler")
@@ -103,7 +103,7 @@ def get_job_name(spec: spack.spec.Spec, build_group: str = ""):
job_name = spec.format(JOB_NAME_FORMAT)
if build_group:
job_name = "{0} {1}".format(job_name, build_group)
job_name = f"{job_name} {build_group}"
return job_name[:255]
@@ -114,7 +114,7 @@ def _remove_reserved_tags(tags):
def _spec_deps_key(s):
return "{0}/{1}".format(s.name, s.dag_hash(7))
return f"{s.name}/{s.dag_hash(7)}"
def _add_dependency(spec_label, dep_label, deps):
@@ -213,7 +213,7 @@ def _print_staging_summary(spec_labels, stages, mirrors_to_check, rebuild_decisi
mirrors = spack.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True)
tty.msg("Checked the following mirrors for binaries:")
for m in mirrors.values():
tty.msg(" {0}".format(m.fetch_url))
tty.msg(f" {m.fetch_url}")
tty.msg("Staging summary ([x] means a job needs rebuilding):")
for stage_index, stage in enumerate(stages):
@@ -296,7 +296,7 @@ def append_dep(s, d):
for spec in spec_list:
for s in spec.traverse(deptype="all"):
if s.external:
tty.msg("Will not stage external pkg: {0}".format(s))
tty.msg(f"Will not stage external pkg: {s}")
continue
skey = _spec_deps_key(s)
@@ -305,7 +305,7 @@ def append_dep(s, d):
for d in s.dependencies(deptype="all"):
dkey = _spec_deps_key(d)
if d.external:
tty.msg("Will not stage external dep: {0}".format(d))
tty.msg(f"Will not stage external dep: {d}")
continue
append_dep(skey, dkey)
@@ -374,8 +374,8 @@ def get_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"):
for path in lines:
if ".gitlab-ci.yml" in path or path in env_path:
tty.debug("env represented by {0} changed".format(env_path))
tty.debug("touched file: {0}".format(path))
tty.debug(f"env represented by {env_path} changed")
tty.debug(f"touched file: {path}")
return True
return False
@@ -419,7 +419,7 @@ def get_spec_filter_list(env, affected_pkgs, dependent_traverse_depth=None):
all_concrete_specs = env.all_specs()
tty.debug("All concrete environment specs:")
for s in all_concrete_specs:
tty.debug(" {0}/{1}".format(s.name, s.dag_hash()[:7]))
tty.debug(f" {s.name}/{s.dag_hash()[:7]}")
affected_pkgs = frozenset(affected_pkgs)
env_matches = [s for s in all_concrete_specs if s.name in affected_pkgs]
visited = set()
@@ -510,7 +510,7 @@ def __is_named(self, section):
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)]
keys = [f"{_name}-job", f"{_name}-job-remove"]
if any([key for key in keys if key in section]):
return _name
@@ -525,9 +525,9 @@ def __job_name(name, suffix=""):
jname = name
if suffix:
jname = "{0}-job{1}".format(name, suffix)
jname = f"{name}-job{suffix}"
else:
jname = "{0}-job".format(name)
jname = f"{name}-job"
return jname
@@ -739,7 +739,7 @@ def generate_gitlab_ci_yaml(
# Requested to prune untouched packages, but assume we won't do that
# unless we're actually in a git repo.
rev1, rev2 = get_change_revisions()
tty.debug("Got following revisions: rev1={0}, rev2={1}".format(rev1, rev2))
tty.debug(f"Got following revisions: rev1={rev1}, rev2={rev2}")
if rev1 and rev2:
# If the stack file itself did not change, proceed with pruning
if not get_stack_changed(env.manifest_path, rev1, rev2):
@@ -747,13 +747,13 @@ def generate_gitlab_ci_yaml(
affected_pkgs = compute_affected_packages(rev1, rev2)
tty.debug("affected pkgs:")
for p in affected_pkgs:
tty.debug(" {0}".format(p))
tty.debug(f" {p}")
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]))
tty.debug(f" {s.name}/{s.dag_hash()[:7]}")
# Allow overriding --prune-dag cli opt with environment variable
prune_dag_override = os.environ.get("SPACK_PRUNE_UP_TO_DATE", None)
@@ -978,7 +978,7 @@ def generate_gitlab_ci_yaml(
rebuild_decisions = {}
for stage_jobs in stages:
stage_name = "stage-{0}".format(stage_id)
stage_name = f"stage-{stage_id}"
stage_names.append(stage_name)
stage_id += 1
@@ -1009,7 +1009,7 @@ def generate_gitlab_ci_yaml(
job_object = spack_ci_ir["jobs"][release_spec_dag_hash]["attributes"]
if not job_object:
tty.warn("No match found for {0}, skipping it".format(release_spec))
tty.warn(f"No match found for {release_spec}, skipping it")
continue
if spack_pipeline_type is not None:
@@ -1119,7 +1119,7 @@ def main_script_replacements(cmd):
if artifacts_root:
job_object["needs"].append(
{"job": generate_job_name, "pipeline": "{0}".format(parent_pipeline_id)}
{"job": generate_job_name, "pipeline": f"{parent_pipeline_id}"}
)
# Let downstream jobs know whether the spec needed rebuilding, regardless
@@ -1185,19 +1185,17 @@ def main_script_replacements(cmd):
if spack_pipeline_type == "spack_pull_request":
spack.mirror.remove("ci_shared_pr_mirror", cfg.default_modify_scope())
tty.debug("{0} build jobs generated in {1} stages".format(job_id, stage_id))
tty.debug(f"{job_id} build jobs generated in {stage_id} stages")
if job_id > 0:
tty.debug(
"The max_needs_job is {0}, with {1} needs".format(max_needs_job, max_length_needs)
)
tty.debug(f"The max_needs_job is {max_needs_job}, with {max_length_needs} needs")
# Use "all_job_names" to populate the build group for this set
if cdash_handler and cdash_handler.auth_token:
try:
cdash_handler.populate_buildgroup(all_job_names)
except (SpackError, HTTPError, URLError) as err:
tty.warn("Problem populating buildgroup: {0}".format(err))
tty.warn(f"Problem populating buildgroup: {err}")
else:
tty.warn("Unable to populate buildgroup without CDash credentials")
@@ -1211,9 +1209,7 @@ def main_script_replacements(cmd):
sync_job = copy.deepcopy(spack_ci_ir["jobs"]["copy"]["attributes"])
sync_job["stage"] = "copy"
if artifacts_root:
sync_job["needs"] = [
{"job": generate_job_name, "pipeline": "{0}".format(parent_pipeline_id)}
]
sync_job["needs"] = [{"job": generate_job_name, "pipeline": f"{parent_pipeline_id}"}]
if "variables" not in sync_job:
sync_job["variables"] = {}
@@ -1230,6 +1226,7 @@ def main_script_replacements(cmd):
# TODO: Remove this condition in Spack 0.23
buildcache_source = os.environ.get("SPACK_SOURCE_MIRROR", None)
sync_job["variables"]["SPACK_BUILDCACHE_SOURCE"] = buildcache_source
sync_job["dependencies"] = []
output_object["copy"] = sync_job
job_id += 1
@@ -1348,7 +1345,7 @@ def main_script_replacements(cmd):
copy_specs_file = os.path.join(
copy_specs_dir,
"copy_{}_specs.json".format(spack_stack_name if spack_stack_name else "rebuilt"),
f"copy_{spack_stack_name if spack_stack_name else 'rebuilt'}_specs.json",
)
with open(copy_specs_file, "w") as fd:
@@ -1440,7 +1437,7 @@ def import_signing_key(base64_signing_key):
fd.write(decoded_key)
key_import_output = spack_gpg("trust", sign_key_path, output=str)
tty.debug("spack gpg trust {0}".format(sign_key_path))
tty.debug(f"spack gpg trust {sign_key_path}")
tty.debug(key_import_output)
# Now print the keys we have for verifying and signing
@@ -1466,45 +1463,39 @@ def can_verify_binaries():
return len(gpg_util.public_keys()) >= 1
def _push_mirror_contents(input_spec, sign_binaries, mirror_url):
def _push_to_build_cache(spec: spack.spec.Spec, sign_binaries: bool, mirror_url: str) -> None:
"""Unchecked version of the public API, for easier mocking"""
unsigned = not sign_binaries
tty.debug("Creating buildcache ({0})".format("unsigned" if unsigned else "signed"))
push_url = spack.mirror.Mirror.from_url(mirror_url).push_url
return bindist.push(input_spec, push_url, bindist.PushOptions(force=True, unsigned=unsigned))
bindist.push_or_raise(
spec,
spack.mirror.Mirror.from_url(mirror_url).push_url,
bindist.PushOptions(force=True, unsigned=not sign_binaries),
)
def push_mirror_contents(input_spec: spack.spec.Spec, mirror_url, sign_binaries):
def push_to_build_cache(spec: spack.spec.Spec, mirror_url: str, sign_binaries: bool) -> bool:
"""Push one or more binary packages to the mirror.
Arguments:
input_spec(spack.spec.Spec): Installed spec to push
mirror_url (str): Base url of target mirror
sign_binaries (bool): If True, spack will attempt to sign binary
package before pushing.
spec: Installed spec to push
mirror_url: URL of target mirror
sign_binaries: If True, spack will attempt to sign binary package before pushing.
"""
tty.debug(f"Pushing to build cache ({'signed' if sign_binaries else 'unsigned'})")
try:
return _push_mirror_contents(input_spec, sign_binaries, mirror_url)
except Exception as inst:
# If the mirror we're pushing to is on S3 and there's some
# permissions problem, for example, we can't just target
# that exception type here, since users of the
# `spack ci rebuild' may not need or want any dependency
# on boto3. So we use the first non-boto exception type
# in the heirarchy:
# boto3.exceptions.S3UploadFailedError
# boto3.exceptions.Boto3Error
# Exception
# BaseException
# object
err_msg = "Error msg: {0}".format(inst)
if any(x in err_msg for x in ["Access Denied", "InvalidAccessKeyId"]):
tty.msg("Permission problem writing to {0}".format(mirror_url))
tty.msg(err_msg)
_push_to_build_cache(spec, sign_binaries, mirror_url)
return True
except bindist.PushToBuildCacheError as e:
tty.error(str(e))
return False
except Exception as e:
# TODO (zackgalbreath): write an adapter for boto3 exceptions so we can catch a specific
# exception instead of parsing str(e)...
msg = str(e)
if any(x in msg for x in ["Access Denied", "InvalidAccessKeyId"]):
tty.error(f"Permission problem writing to {mirror_url}: {msg}")
return False
else:
raise inst
raise
def remove_other_mirrors(mirrors_to_keep, scope=None):
@@ -1531,8 +1522,9 @@ def copy_files_to_artifacts(src, artifacts_dir):
try:
fs.copy(src, artifacts_dir)
except Exception as err:
msg = ("Unable to copy files ({0}) to artifacts {1} due to " "exception: {2}").format(
src, artifacts_dir, str(err)
msg = (
f"Unable to copy files ({src}) to artifacts {artifacts_dir} due to "
f"exception: {str(err)}"
)
tty.warn(msg)
@@ -1548,23 +1540,23 @@ def copy_stage_logs_to_artifacts(job_spec: spack.spec.Spec, job_log_dir: str) ->
job_spec: spec associated with spack install log
job_log_dir: path into which build log should be copied
"""
tty.debug("job spec: {0}".format(job_spec))
tty.debug(f"job spec: {job_spec}")
if not job_spec:
msg = "Cannot copy stage logs: job spec ({0}) is required"
tty.error(msg.format(job_spec))
msg = f"Cannot copy stage logs: job spec ({job_spec}) is required"
tty.error(msg)
return
try:
pkg_cls = spack.repo.PATH.get_pkg_class(job_spec.name)
job_pkg = pkg_cls(job_spec)
tty.debug("job package: {0}".format(job_pkg))
tty.debug(f"job package: {job_pkg}")
except AssertionError:
msg = "Cannot copy stage logs: job spec ({0}) must be concrete"
tty.error(msg.format(job_spec))
msg = f"Cannot copy stage logs: job spec ({job_spec}) must be concrete"
tty.error(msg)
return
stage_dir = job_pkg.stage.path
tty.debug("stage dir: {0}".format(stage_dir))
tty.debug(f"stage dir: {stage_dir}")
for file in [job_pkg.log_path, job_pkg.env_mods_path, *job_pkg.builder.archive_files]:
copy_files_to_artifacts(file, job_log_dir)
@@ -1577,10 +1569,10 @@ def copy_test_logs_to_artifacts(test_stage, job_test_dir):
test_stage (str): test stage path
job_test_dir (str): the destination artifacts test directory
"""
tty.debug("test stage: {0}".format(test_stage))
tty.debug(f"test stage: {test_stage}")
if not os.path.exists(test_stage):
msg = "Cannot copy test logs: job test stage ({0}) does not exist"
tty.error(msg.format(test_stage))
msg = f"Cannot copy test logs: job test stage ({test_stage}) does not exist"
tty.error(msg)
return
copy_files_to_artifacts(os.path.join(test_stage, "*", "*.txt"), job_test_dir)
@@ -1595,7 +1587,7 @@ def download_and_extract_artifacts(url, work_dir):
url (str): Complete url to artifacts.zip file
work_dir (str): Path to destination where artifacts should be extracted
"""
tty.msg("Fetching artifacts from: {0}\n".format(url))
tty.msg(f"Fetching artifacts from: {url}\n")
headers = {"Content-Type": "application/zip"}
@@ -1612,7 +1604,7 @@ def download_and_extract_artifacts(url, work_dir):
response_code = response.getcode()
if response_code != 200:
msg = "Error response code ({0}) in reproduce_ci_job".format(response_code)
msg = f"Error response code ({response_code}) in reproduce_ci_job"
raise SpackError(msg)
artifacts_zip_path = os.path.join(work_dir, "artifacts.zip")
@@ -1642,7 +1634,7 @@ def get_spack_info():
return git_log
return "no git repo, use spack {0}".format(spack.spack_version)
return f"no git repo, use spack {spack.spack_version}"
def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
@@ -1665,8 +1657,8 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
"""
# figure out the path to the spack git version being used for the
# reproduction
print("checkout_commit: {0}".format(checkout_commit))
print("merge_commit: {0}".format(merge_commit))
print(f"checkout_commit: {checkout_commit}")
print(f"merge_commit: {merge_commit}")
dot_git_path = os.path.join(spack.paths.prefix, ".git")
if not os.path.exists(dot_git_path):
@@ -1685,14 +1677,14 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
git("log", "-1", checkout_commit, output=str, error=os.devnull, fail_on_error=False)
if git.returncode != 0:
tty.error("Missing commit: {0}".format(checkout_commit))
tty.error(f"Missing commit: {checkout_commit}")
return False
if merge_commit:
git("log", "-1", merge_commit, output=str, error=os.devnull, fail_on_error=False)
if git.returncode != 0:
tty.error("Missing commit: {0}".format(merge_commit))
tty.error(f"Missing commit: {merge_commit}")
return False
# Next attempt to clone your local spack repo into the repro dir
@@ -1715,7 +1707,7 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
)
if git.returncode != 0:
tty.error("Unable to checkout {0}".format(checkout_commit))
tty.error(f"Unable to checkout {checkout_commit}")
tty.msg(co_out)
return False
@@ -1734,7 +1726,7 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
)
if git.returncode != 0:
tty.error("Unable to merge {0}".format(merge_commit))
tty.error(f"Unable to merge {merge_commit}")
tty.msg(merge_out)
return False
@@ -1755,6 +1747,7 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
commands to run to reproduce the build once inside the container.
"""
work_dir = os.path.realpath(work_dir)
platform_script_ext = "ps1" if IS_WINDOWS else "sh"
download_and_extract_artifacts(url, work_dir)
gpg_path = None
@@ -1765,13 +1758,13 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
lock_file = fs.find(work_dir, "spack.lock")[0]
repro_lock_dir = os.path.dirname(lock_file)
tty.debug("Found lock file in: {0}".format(repro_lock_dir))
tty.debug(f"Found lock file in: {repro_lock_dir}")
yaml_files = fs.find(work_dir, ["*.yaml", "*.yml"])
tty.debug("yaml files:")
for yaml_file in yaml_files:
tty.debug(" {0}".format(yaml_file))
tty.debug(f" {yaml_file}")
pipeline_yaml = None
@@ -1786,10 +1779,10 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
pipeline_yaml = yaml_obj
if pipeline_yaml:
tty.debug("\n{0} is likely your pipeline file".format(yf))
tty.debug(f"\n{yf} is likely your pipeline file")
relative_concrete_env_dir = pipeline_yaml["variables"]["SPACK_CONCRETE_ENV_DIR"]
tty.debug("Relative environment path used by cloud job: {0}".format(relative_concrete_env_dir))
tty.debug(f"Relative environment path used by cloud job: {relative_concrete_env_dir}")
# Using the relative concrete environment path found in the generated
# pipeline variable above, copy the spack environment files so they'll
@@ -1803,10 +1796,11 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
shutil.copyfile(orig_yaml_path, copy_yaml_path)
# Find the install script in the unzipped artifacts and make it executable
install_script = fs.find(work_dir, "install.sh")[0]
st = os.stat(install_script)
os.chmod(install_script, st.st_mode | stat.S_IEXEC)
install_script = fs.find(work_dir, f"install.{platform_script_ext}")[0]
if not IS_WINDOWS:
# pointless on Windows
st = os.stat(install_script)
os.chmod(install_script, st.st_mode | stat.S_IEXEC)
# Find the repro details file. This just includes some values we wrote
# during `spack ci rebuild` to make reproduction easier. E.g. the job
# name is written here so we can easily find the configuration of the
@@ -1844,7 +1838,7 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
job_image = job_image_elt["name"]
else:
job_image = job_image_elt
tty.msg("Job ran with the following image: {0}".format(job_image))
tty.msg(f"Job ran with the following image: {job_image}")
# Because we found this job was run with a docker image, so we will try
# to print a "docker run" command that bind-mounts the directory where
@@ -1919,65 +1913,75 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
job_tags = None
if "tags" in job_yaml:
job_tags = job_yaml["tags"]
tty.msg("Job ran with the following tags: {0}".format(job_tags))
tty.msg(f"Job ran with the following tags: {job_tags}")
entrypoint_script = [
["git", "config", "--global", "--add", "safe.directory", mount_as_dir],
[".", os.path.join(mount_as_dir if job_image else work_dir, "share/spack/setup-env.sh")],
[
".",
os.path.join(
mount_as_dir if job_image else work_dir,
f"share/spack/setup-env.{platform_script_ext}",
),
],
["spack", "gpg", "trust", mounted_gpg_path if job_image else gpg_path] if gpg_path else [],
["spack", "env", "activate", mounted_env_dir if job_image else repro_dir],
[os.path.join(mounted_repro_dir, "install.sh") if job_image else install_script],
[
(
os.path.join(mounted_repro_dir, f"install.{platform_script_ext}")
if job_image
else install_script
)
],
]
entry_script = os.path.join(mounted_workdir, f"entrypoint.{platform_script_ext}")
inst_list = []
# Finally, print out some instructions to reproduce the build
if job_image:
# Allow interactive
entrypoint_script.extend(
[
[
"echo",
"Re-run install script using:\n\t{0}".format(
os.path.join(mounted_repro_dir, "install.sh")
if job_image
else install_script
),
],
# Allow interactive
["exec", "$@"],
]
install_mechanism = (
os.path.join(mounted_repro_dir, f"install.{platform_script_ext}")
if job_image
else install_script
)
entrypoint_script.append(["echo", f"Re-run install script using:\n\t{install_mechanism}"])
# Allow interactive
if IS_WINDOWS:
entrypoint_script.append(["&", "($args -Join ' ')", "-NoExit"])
else:
entrypoint_script.append(["exec", "$@"])
process_command(
"entrypoint", entrypoint_script, work_dir, run=False, exit_on_failure=False
)
docker_command = [
[
runtime,
"run",
"-i",
"-t",
"--rm",
"--name",
"spack_reproducer",
"-v",
":".join([work_dir, mounted_workdir, "Z"]),
"-v",
":".join(
[
os.path.join(work_dir, "jobs_scratch_dir"),
os.path.join(mount_as_dir, "jobs_scratch_dir"),
"Z",
]
),
"-v",
":".join([os.path.join(work_dir, "spack"), mount_as_dir, "Z"]),
"--entrypoint",
os.path.join(mounted_workdir, "entrypoint.sh"),
job_image,
"bash",
]
runtime,
"run",
"-i",
"-t",
"--rm",
"--name",
"spack_reproducer",
"-v",
":".join([work_dir, mounted_workdir, "Z"]),
"-v",
":".join(
[
os.path.join(work_dir, "jobs_scratch_dir"),
os.path.join(mount_as_dir, "jobs_scratch_dir"),
"Z",
]
),
"-v",
":".join([os.path.join(work_dir, "spack"), mount_as_dir, "Z"]),
"--entrypoint",
]
if IS_WINDOWS:
docker_command.extend(["powershell.exe", job_image, entry_script, "powershell.exe"])
else:
docker_command.extend([entry_script, job_image, "bash"])
docker_command = [docker_command]
autostart = autostart and setup_result
process_command("start", docker_command, work_dir, run=autostart)
@@ -1986,22 +1990,26 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
inst_list.extend(
[
" - Start the docker container install",
" $ {0}/start.sh".format(work_dir),
f" $ {work_dir}/start.{platform_script_ext}",
]
)
else:
process_command("reproducer", entrypoint_script, work_dir, run=False)
autostart = autostart and setup_result
process_command("reproducer", entrypoint_script, work_dir, run=autostart)
inst_list.append("\nOnce on the tagged runner:\n\n")
inst_list.extent(
[" - Run the reproducer script", " $ {0}/reproducer.sh".format(work_dir)]
[
" - Run the reproducer script",
f" $ {work_dir}/reproducer.{platform_script_ext}",
]
)
if not setup_result:
inst_list.append("\n - Clone spack and acquire tested commit")
inst_list.append("\n {0}\n".format(spack_info))
inst_list.append(f"\n {spack_info}\n")
inst_list.append("\n")
inst_list.append("\n Path to clone spack: {0}/spack\n\n".format(work_dir))
inst_list.append(f"\n Path to clone spack: {work_dir}/spack\n\n")
tty.msg("".join(inst_list))
@@ -2020,50 +2028,78 @@ def process_command(name, commands, repro_dir, run=True, exit_on_failure=True):
Returns: the exit code from processing the command
"""
tty.debug("spack {0} arguments: {1}".format(name, commands))
tty.debug(f"spack {name} arguments: {commands}")
if len(commands) == 0 or isinstance(commands[0], str):
commands = [commands]
# 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 = " \n ".join(map(args_to_string, commands))
def compose_command_err_handling(args):
if not IS_WINDOWS:
args = [f'"{arg}"' for arg in args]
arg_str = " ".join(args)
result = arg_str + "\n"
# ErrorActionPreference will handle PWSH commandlets (Spack calls),
# but we need to handle EXEs (git, etc) ourselves
catch_exe_failure = (
"""
if ($LASTEXITCODE -ne 0){
throw "Command {} has failed"
}
"""
if IS_WINDOWS
else ""
)
if exit_on_failure and catch_exe_failure:
result += catch_exe_failure.format(arg_str)
return result
# 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))
# Create a string [command 1] \n [command 2] \n ... \n [command n] with
# commands composed into a platform dependent shell script, pwsh on Windows,
full_command = "\n".join(map(compose_command_err_handling, commands))
# Write the command to a python script
if IS_WINDOWS:
script = f"{name}.ps1"
script_content = [f"\n# spack {name} command\n"]
if exit_on_failure:
fd.write("set -e\n")
script_content.append('$ErrorActionPreference = "Stop"\n')
if os.environ.get("SPACK_VERBOSE_SCRIPT"):
fd.write("set -x\n")
fd.write(full_command)
fd.write("\n")
script_content.append("Set-PSDebug -Trace 2\n")
else:
script = f"{name}.sh"
script_content = ["#!/bin/sh\n\n", f"\n# spack {name} command\n"]
if exit_on_failure:
script_content.append("set -e\n")
if os.environ.get("SPACK_VERBOSE_SCRIPT"):
script_content.append("set -x\n")
script_content.append(full_command)
script_content.append("\n")
st = os.stat(script)
os.chmod(script, st.st_mode | stat.S_IEXEC)
with open(script, "w") as fd:
for line in script_content:
fd.write(line)
copy_path = os.path.join(repro_dir, script)
shutil.copyfile(script, copy_path)
st = os.stat(copy_path)
os.chmod(copy_path, st.st_mode | stat.S_IEXEC)
if not IS_WINDOWS:
st = os.stat(copy_path)
os.chmod(copy_path, st.st_mode | stat.S_IEXEC)
# Run the generated install.sh shell script as if it were being run in
# Run the generated shell script as if it were being run in
# a login shell.
exit_code = None
if run:
try:
cmd_process = subprocess.Popen(["/bin/sh", "./{0}".format(script)])
# We use sh as executor on Linux like platforms, pwsh on Windows
interpreter = "powershell.exe" if IS_WINDOWS else "/bin/sh"
cmd_process = subprocess.Popen([interpreter, f"./{script}"])
cmd_process.wait()
exit_code = cmd_process.returncode
except (ValueError, subprocess.CalledProcessError, OSError) as err:
tty.error("Encountered error running {0} script".format(name))
tty.error(f"Encountered error running {name} script")
tty.error(err)
exit_code = 1
tty.debug("spack {0} exited {1}".format(name, exit_code))
tty.debug(f"spack {name} exited {exit_code}")
else:
# Delete the script, it is copied to the destination dir
os.remove(script)
@@ -2088,7 +2124,7 @@ def create_buildcache(
for mirror_url in destination_mirror_urls:
results.append(
PushResult(
success=push_mirror_contents(input_spec, mirror_url, sign_binaries), url=mirror_url
success=push_to_build_cache(input_spec, mirror_url, sign_binaries), url=mirror_url
)
)
@@ -2122,7 +2158,7 @@ def write_broken_spec(url, pkg_name, stack_name, job_url, pipeline_url, spec_dic
# If there is an S3 error (e.g., access denied or connection
# error), the first non boto-specific class in the exception
# hierarchy is Exception. Just print a warning and return
msg = "Error writing to broken specs list {0}: {1}".format(url, err)
msg = f"Error writing to broken specs list {url}: {err}"
tty.warn(msg)
finally:
shutil.rmtree(tmpdir)
@@ -2135,7 +2171,7 @@ def read_broken_spec(broken_spec_url):
try:
_, _, fs = web_util.read_from_url(broken_spec_url)
except (URLError, web_util.SpackWebError, HTTPError):
tty.warn("Unable to read broken spec from {0}".format(broken_spec_url))
tty.warn(f"Unable to read broken spec from {broken_spec_url}")
return None
broken_spec_contents = codecs.getreader("utf-8")(fs).read()
@@ -2150,14 +2186,14 @@ def display_broken_spec_messages(base_url, hashes):
for spec_hash, broken_spec in [tup for tup in broken_specs if tup[1]]:
details = broken_spec["broken-spec"]
if "job-name" in details:
item_name = "{0}/{1}".format(details["job-name"], spec_hash[:7])
item_name = f"{details['job-name']}/{spec_hash[:7]}"
else:
item_name = spec_hash
if "job-stack" in details:
item_name = "{0} (in stack {1})".format(item_name, details["job-stack"])
item_name = f"{item_name} (in stack {details['job-stack']})"
msg = " {0} was reported broken here: {1}".format(item_name, details["job-url"])
msg = f" {item_name} was reported broken here: {details['job-url']}"
tty.msg(msg)
@@ -2180,7 +2216,7 @@ def run_standalone_tests(**kwargs):
log_file = kwargs.get("log_file")
if cdash and log_file:
tty.msg("The test log file {0} option is ignored with CDash reporting".format(log_file))
tty.msg(f"The test log file {log_file} option is ignored with CDash reporting")
log_file = None
# Error out but do NOT terminate if there are missing required arguments.
@@ -2206,10 +2242,10 @@ def run_standalone_tests(**kwargs):
test_args.extend(["--log-file", log_file])
test_args.append(job_spec.name)
tty.debug("Running {0} stand-alone tests".format(job_spec.name))
tty.debug(f"Running {job_spec.name} stand-alone tests")
exit_code = process_command("test", test_args, repro_dir)
tty.debug("spack test exited {0}".format(exit_code))
tty.debug(f"spack test exited {exit_code}")
class CDashHandler:
@@ -2232,7 +2268,7 @@ def __init__(self, ci_cdash):
# append runner description to the site if available
runner = os.environ.get("CI_RUNNER_DESCRIPTION")
if runner:
self.site += " ({0})".format(runner)
self.site += f" ({runner})"
# track current spec, if any
self.current_spec = None
@@ -2260,21 +2296,13 @@ def build_name(self):
Returns: (str) current spec's CDash build name."""
spec = self.current_spec
if spec:
build_name = "{0}@{1}%{2} hash={3} arch={4} ({5})".format(
spec.name,
spec.version,
spec.compiler,
spec.dag_hash(),
spec.architecture,
self.build_group,
)
tty.debug(
"Generated CDash build name ({0}) from the {1}".format(build_name, spec.name)
)
build_name = f"{spec.name}@{spec.version}%{spec.compiler} \
hash={spec.dag_hash()} arch={spec.architecture} ({self.build_group})"
tty.debug(f"Generated CDash build name ({build_name}) from the {spec.name}")
return build_name
build_name = os.environ.get("SPACK_CDASH_BUILD_NAME")
tty.debug("Using CDash build name ({0}) from the environment".format(build_name))
tty.debug(f"Using CDash build name ({build_name}) from the environment")
return build_name
@property # type: ignore
@@ -2288,25 +2316,25 @@ def build_stamp(self):
Returns: (str) current CDash build stamp"""
build_stamp = os.environ.get("SPACK_CDASH_BUILD_STAMP")
if build_stamp:
tty.debug("Using build stamp ({0}) from the environment".format(build_stamp))
tty.debug(f"Using build stamp ({build_stamp}) from the environment")
return build_stamp
build_stamp = cdash_build_stamp(self.build_group, time.time())
tty.debug("Generated new build stamp ({0})".format(build_stamp))
tty.debug(f"Generated new build stamp ({build_stamp})")
return build_stamp
@property # type: ignore
@memoized
def project_enc(self):
tty.debug("Encoding project ({0}): {1})".format(type(self.project), self.project))
tty.debug(f"Encoding project ({type(self.project)}): {self.project})")
encode = urlencode({"project": self.project})
index = encode.find("=") + 1
return encode[index:]
@property
def upload_url(self):
url_format = "{0}/submit.php?project={1}"
return url_format.format(self.url, self.project_enc)
url_format = f"{self.url}/submit.php?project={self.project_enc}"
return url_format
def copy_test_results(self, source, dest):
"""Copy test results to artifacts directory."""
@@ -2324,7 +2352,7 @@ def create_buildgroup(self, opener, headers, url, group_name, group_type):
response_code = response.getcode()
if response_code not in [200, 201]:
msg = "Creating buildgroup failed (response code = {0})".format(response_code)
msg = f"Creating buildgroup failed (response code = {response_code})"
tty.warn(msg)
return None
@@ -2335,10 +2363,10 @@ def create_buildgroup(self, opener, headers, url, group_name, group_type):
return build_group_id
def populate_buildgroup(self, job_names):
url = "{0}/api/v1/buildgroup.php".format(self.url)
url = f"{self.url}/api/v1/buildgroup.php"
headers = {
"Authorization": "Bearer {0}".format(self.auth_token),
"Authorization": f"Bearer {self.auth_token}",
"Content-Type": "application/json",
}
@@ -2346,11 +2374,11 @@ def populate_buildgroup(self, job_names):
parent_group_id = self.create_buildgroup(opener, headers, url, self.build_group, "Daily")
group_id = self.create_buildgroup(
opener, headers, url, "Latest {0}".format(self.build_group), "Latest"
opener, headers, url, f"Latest {self.build_group}", "Latest"
)
if not parent_group_id or not group_id:
msg = "Failed to create or retrieve buildgroups for {0}".format(self.build_group)
msg = f"Failed to create or retrieve buildgroups for {self.build_group}"
tty.warn(msg)
return
@@ -2370,7 +2398,7 @@ def populate_buildgroup(self, job_names):
response_code = response.getcode()
if response_code != 200:
msg = "Error response code ({0}) in populate_buildgroup".format(response_code)
msg = f"Error response code ({response_code}) in populate_buildgroup"
tty.warn(msg)
def report_skipped(self, spec: spack.spec.Spec, report_dir: str, reason: Optional[str]):

View File

@@ -7,9 +7,7 @@
get_job_name = lambda needs_entry: (
needs_entry.get("job")
if (isinstance(needs_entry, collections.abc.Mapping) and needs_entry.get("artifacts", True))
else needs_entry
if isinstance(needs_entry, str)
else None
else needs_entry if isinstance(needs_entry, str) else None
)

View File

@@ -7,13 +7,14 @@
import glob
import hashlib
import json
import multiprocessing
import multiprocessing.pool
import os
import shutil
import sys
import tempfile
import urllib.request
from typing import Dict, List, Optional, Tuple
from typing import Dict, List, Optional, Tuple, Union
import llnl.util.tty as tty
from llnl.string import plural
@@ -274,23 +275,37 @@ def setup_parser(subparser: argparse.ArgumentParser):
# Sync buildcache entries from one mirror to another
sync = subparsers.add_parser("sync", help=sync_fn.__doc__)
sync.add_argument(
"--manifest-glob", help="a quoted glob pattern identifying copy manifest files"
sync_manifest_source = sync.add_argument_group(
"Manifest Source",
"Specify a list of build cache objects to sync using manifest file(s)."
'This option takes the place of the "source mirror" for synchronization'
'and optionally takes a "destination mirror" ',
)
sync.add_argument(
sync_manifest_source.add_argument(
"--manifest-glob", help="a quoted glob pattern identifying CI rebuild manifest files"
)
sync_source_mirror = sync.add_argument_group(
"Named Source",
"Specify a single registered source mirror to synchronize from. This option requires"
"the specification of a destination mirror.",
)
sync_source_mirror.add_argument(
"src_mirror",
metavar="source mirror",
type=arguments.mirror_name_or_url,
nargs="?",
type=arguments.mirror_name_or_url,
help="source mirror name, path, or URL",
)
sync.add_argument(
"dest_mirror",
metavar="destination mirror",
type=arguments.mirror_name_or_url,
nargs="?",
type=arguments.mirror_name_or_url,
help="destination mirror name, path, or URL",
)
sync.set_defaults(func=sync_fn)
# Update buildcache index without copying any additional packages
@@ -326,8 +341,30 @@ def _progress(i: int, total: int):
return ""
def _make_pool():
return multiprocessing.pool.Pool(determine_number_of_jobs(parallel=True))
class NoPool:
def map(self, func, args):
return [func(a) for a in args]
def starmap(self, func, args):
return [func(*a) for a in args]
def __enter__(self):
return self
def __exit__(self, *args):
pass
MaybePool = Union[multiprocessing.pool.Pool, NoPool]
def _make_pool() -> MaybePool:
"""Can't use threading because it's unsafe, and can't use spawned processes because of globals.
That leaves only forking"""
if multiprocessing.get_start_method() == "fork":
return multiprocessing.pool.Pool(determine_number_of_jobs(parallel=True))
else:
return NoPool()
def push_fn(args):
@@ -571,6 +608,15 @@ def _put_manifest(
base_manifest, base_config = base_images[architecture]
env = _retrieve_env_dict_from_config(base_config)
# If the base image uses `vnd.docker.distribution.manifest.v2+json`, then we use that too.
# This is because Singularity / Apptainer is very strict about not mixing them.
base_manifest_mediaType = base_manifest.get(
"mediaType", "application/vnd.oci.image.manifest.v1+json"
)
use_docker_format = (
base_manifest_mediaType == "application/vnd.docker.distribution.manifest.v2+json"
)
spack.user_environment.environment_modifications_for_specs(*specs).apply_modifications(env)
# Create an oci.image.config file
@@ -602,8 +648,8 @@ def _put_manifest(
# Upload the config file
upload_blob_with_retry(image_ref, file=config_file, digest=config_file_checksum)
oci_manifest = {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
manifest = {
"mediaType": base_manifest_mediaType,
"schemaVersion": 2,
"config": {
"mediaType": base_manifest["config"]["mediaType"],
@@ -614,7 +660,11 @@ def _put_manifest(
*(layer for layer in base_manifest["layers"]),
*(
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"mediaType": (
"application/vnd.docker.image.rootfs.diff.tar.gzip"
if use_docker_format
else "application/vnd.oci.image.layer.v1.tar+gzip"
),
"digest": str(checksums[s.dag_hash()].compressed_digest),
"size": checksums[s.dag_hash()].size,
}
@@ -623,11 +673,11 @@ def _put_manifest(
],
}
if annotations:
oci_manifest["annotations"] = annotations
if not use_docker_format and annotations:
manifest["annotations"] = annotations
# Finally upload the manifest
upload_manifest_with_retry(image_ref, oci_manifest=oci_manifest)
upload_manifest_with_retry(image_ref, manifest=manifest)
# delete the config file
os.unlink(config_file)
@@ -663,7 +713,7 @@ def _push_oci(
base_image: Optional[ImageReference],
installed_specs_with_deps: List[Spec],
tmpdir: str,
pool: multiprocessing.pool.Pool,
pool: MaybePool,
force: bool = False,
) -> Tuple[List[str], Dict[str, Tuple[dict, dict]], Dict[str, spack.oci.oci.Blob]]:
"""Push specs to an OCI registry
@@ -779,11 +829,10 @@ def _config_from_tag(image_ref: ImageReference, tag: str) -> Optional[dict]:
return config if "spec" in config else None
def _update_index_oci(
image_ref: ImageReference, tmpdir: str, pool: multiprocessing.pool.Pool
) -> None:
response = spack.oci.opener.urlopen(urllib.request.Request(url=image_ref.tags_url()))
spack.oci.opener.ensure_status(response, 200)
def _update_index_oci(image_ref: ImageReference, tmpdir: str, pool: MaybePool) -> None:
request = urllib.request.Request(url=image_ref.tags_url())
response = spack.oci.opener.urlopen(request)
spack.oci.opener.ensure_status(request, response, 200)
tags = json.load(response)["tags"]
# Fetch all image config files in parallel
@@ -1035,7 +1084,17 @@ def sync_fn(args):
requires an active environment in order to know which specs to sync
"""
if args.manifest_glob:
manifest_copy(glob.glob(args.manifest_glob))
# Passing the args.src_mirror here because it is not possible to
# have the destination be required when specifying a named source
# mirror and optional for the --manifest-glob argument. In the case
# of manifest glob sync, the source mirror positional argument is the
# destination mirror if it is specified. If there are two mirrors
# specified, the second is ignored and the first is the override
# destination.
if args.dest_mirror:
tty.warn(f"Ignoring unused arguemnt: {args.dest_mirror.name}")
manifest_copy(glob.glob(args.manifest_glob), args.src_mirror)
return 0
if args.src_mirror is None or args.dest_mirror is None:
@@ -1086,7 +1145,7 @@ def sync_fn(args):
shutil.rmtree(tmpdir)
def manifest_copy(manifest_file_list):
def manifest_copy(manifest_file_list, dest_mirror=None):
"""Read manifest files containing information about specific specs to copy
from source to destination, remove duplicates since any binary packge for
a given hash should be the same as any other, and copy all files specified
@@ -1100,10 +1159,17 @@ def manifest_copy(manifest_file_list):
# Last duplicate hash wins
deduped_manifest[spec_hash] = copy_list
build_cache_dir = bindist.build_cache_relative_path()
for spec_hash, copy_list in deduped_manifest.items():
for copy_file in copy_list:
tty.debug("copying {0} to {1}".format(copy_file["src"], copy_file["dest"]))
copy_buildcache_file(copy_file["src"], copy_file["dest"])
dest = copy_file["dest"]
if dest_mirror:
src_relative_path = os.path.join(
build_cache_dir, copy_file["src"].rsplit(build_cache_dir, 1)[1].lstrip("/")
)
dest = url_util.join(dest_mirror.push_url, src_relative_path)
tty.debug("copying {0} to {1}".format(copy_file["src"], dest))
copy_buildcache_file(copy_file["src"], dest)
def update_index(mirror: spack.mirror.Mirror, update_keys=False):
@@ -1130,14 +1196,18 @@ def update_index(mirror: spack.mirror.Mirror, update_keys=False):
url, bindist.build_cache_relative_path(), bindist.build_cache_keys_relative_path()
)
bindist.generate_key_index(keys_url)
try:
bindist.generate_key_index(keys_url)
except bindist.CannotListKeys as e:
# Do not error out if listing keys went wrong. This usually means that the _gpg path
# does not exist. TODO: distinguish between this and other errors.
tty.warn(f"did not update the key index: {e}")
def update_index_fn(args):
"""update a buildcache index"""
update_index(args.mirror, update_keys=args.keys)
return update_index(args.mirror, update_keys=args.keys)
def buildcache(parser, args):
if args.func:
args.func(args)
return args.func(args)

View File

@@ -5,6 +5,7 @@
import re
import sys
from typing import Dict, Optional
import llnl.string
import llnl.util.lang
@@ -17,10 +18,15 @@
import spack.util.crypto
import spack.util.web as web_util
from spack.cmd.common import arguments
from spack.package_base import PackageBase, deprecated_version, preferred_version
from spack.package_base import (
ManualDownloadRequiredError,
PackageBase,
deprecated_version,
preferred_version,
)
from spack.util.editor import editor
from spack.util.format import get_version_lines
from spack.version import Version
from spack.version import StandardVersion, Version
description = "checksum available versions of a package"
section = "packaging"
@@ -84,28 +90,30 @@ def checksum(parser, args):
spec = spack.spec.Spec(args.package)
# Get the package we're going to generate checksums for
pkg = spack.repo.PATH.get_pkg_class(spec.name)(spec)
pkg: PackageBase = spack.repo.PATH.get_pkg_class(spec.name)(spec)
versions = [Version(v) for v in args.versions]
# Skip manually downloaded packages
if pkg.manual_download:
raise ManualDownloadRequiredError(pkg.download_instr)
# Define placeholder for remote versions.
# This'll help reduce redundant work if we need to check for the existance
# of remote versions more than once.
remote_versions = None
versions = [StandardVersion.from_string(v) for v in args.versions]
# Define placeholder for remote versions. This'll help reduce redundant work if we need to
# check for the existence of remote versions more than once.
remote_versions: Optional[Dict[StandardVersion, str]] = None
# Add latest version if requested
if args.latest:
remote_versions = pkg.fetch_remote_versions(args.jobs)
remote_versions = pkg.fetch_remote_versions(concurrency=args.jobs)
if len(remote_versions) > 0:
latest_version = sorted(remote_versions.keys(), reverse=True)[0]
versions.append(latest_version)
versions.append(max(remote_versions.keys()))
# Add preferred version if requested
# Add preferred version if requested (todo: exclude git versions)
if args.preferred:
versions.append(preferred_version(pkg))
# Store a dict of the form version -> URL
url_dict = {}
url_dict: Dict[StandardVersion, str] = {}
for version in versions:
if deprecated_version(pkg, version):
@@ -115,16 +123,16 @@ def checksum(parser, args):
if url is not None:
url_dict[version] = url
continue
# if we get here, it's because no valid url was provided by the package
# do expensive fallback to try to recover
# If we get here, it's because no valid url was provided by the package. Do expensive
# fallback to try to recover
if remote_versions is None:
remote_versions = pkg.fetch_remote_versions(args.jobs)
remote_versions = pkg.fetch_remote_versions(concurrency=args.jobs)
if version in remote_versions:
url_dict[version] = remote_versions[version]
if len(versions) <= 0:
if remote_versions is None:
remote_versions = pkg.fetch_remote_versions(args.jobs)
remote_versions = pkg.fetch_remote_versions(concurrency=args.jobs)
url_dict = remote_versions
# A spidered URL can differ from the package.py *computed* URL, pointing to different tarballs.
@@ -175,7 +183,7 @@ def checksum(parser, args):
print()
if args.add_to_package:
add_versions_to_package(pkg, version_lines)
add_versions_to_package(pkg, version_lines, args.batch)
def print_checksum_status(pkg: PackageBase, version_hashes: dict):
@@ -221,7 +229,7 @@ def print_checksum_status(pkg: PackageBase, version_hashes: dict):
tty.die("Invalid checksums found.")
def add_versions_to_package(pkg: PackageBase, version_lines: str):
def add_versions_to_package(pkg: PackageBase, version_lines: str, is_batch: bool):
"""
Add checksumed versions to a package's instructions and open a user's
editor so they may double check the work of the function.
@@ -274,5 +282,5 @@ def add_versions_to_package(pkg: PackageBase, version_lines: str):
tty.msg(f"Added {num_versions_added} new versions to {pkg.name}")
tty.msg(f"Open {filename} to review the additions.")
if sys.stdout.isatty():
if sys.stdout.isatty() and not is_batch:
editor(filename)

View File

@@ -6,6 +6,7 @@
import json
import os
import shutil
from urllib.parse import urlparse, urlunparse
import llnl.util.filesystem as fs
import llnl.util.tty as tty
@@ -13,6 +14,7 @@
import spack.binary_distribution as bindist
import spack.ci as spack_ci
import spack.cmd
import spack.cmd.buildcache as buildcache
import spack.config as cfg
import spack.environment as ev
@@ -31,6 +33,7 @@
SPACK_COMMAND = "spack"
MAKE_COMMAND = "make"
INSTALL_FAIL_CODE = 1
FAILED_CREATE_BUILDCACHE_CODE = 100
def deindent(desc):
@@ -157,7 +160,9 @@ def setup_parser(subparser):
description=deindent(ci_reproduce.__doc__),
help=spack.cmd.first_line(ci_reproduce.__doc__),
)
reproduce.add_argument("job_url", help="URL of job artifacts bundle")
reproduce.add_argument(
"job_url", help="URL of GitLab job web page or artifact", type=_gitlab_artifacts_url
)
reproduce.add_argument(
"--runtime",
help="Container runtime to use.",
@@ -702,11 +707,9 @@ def ci_rebuild(args):
cdash_handler.report_skipped(job_spec, reports_dir, reason=msg)
cdash_handler.copy_test_results(reports_dir, job_test_dir)
# If the install succeeded, create a buildcache entry for this job spec
# and push it to one or more mirrors. If the install did not succeed,
# print out some instructions on how to reproduce this build failure
# outside of the pipeline environment.
if install_exit_code == 0:
# If the install succeeded, push it to one or more mirrors. Failure to push to any mirror
# will result in a non-zero exit code. Pushing is best-effort.
mirror_urls = [buildcache_mirror_url]
# TODO: Remove this block in Spack 0.23
@@ -718,13 +721,12 @@ def ci_rebuild(args):
destination_mirror_urls=mirror_urls,
sign_binaries=spack_ci.can_sign_binaries(),
):
msg = tty.msg if result.success else tty.warn
msg(
"{} {} to {}".format(
"Pushed" if result.success else "Failed to push",
job_spec.format("{name}{@version}{/hash:7}", color=clr.get_color_when()),
result.url,
)
if not result.success:
install_exit_code = FAILED_CREATE_BUILDCACHE_CODE
(tty.msg if result.success else tty.error)(
f'{"Pushed" if result.success else "Failed to push"} '
f'{job_spec.format("{name}{@version}{/hash:7}", color=clr.get_color_when())} '
f"to {result.url}"
)
# If this is a develop pipeline, check if the spec that we just built is
@@ -745,22 +747,22 @@ def ci_rebuild(args):
tty.warn(msg.format(broken_spec_path, err))
else:
# If the install did not succeed, print out some instructions on how to reproduce this
# build failure outside of the pipeline environment.
tty.debug("spack install exited non-zero, will not create buildcache")
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
)
repro_job_url = f"{api_root_url}/projects/{ci_project_id}/jobs/{ci_job_id}/artifacts"
# Control characters cause this to be printed in blue so it stands out
reproduce_msg = """
print(
f"""
\033[34mTo reproduce this build locally, run:
spack ci reproduce-build {0} [--working-dir <dir>] [--autostart]
spack ci reproduce-build {repro_job_url} [--working-dir <dir>] [--autostart]
If this project does not have public pipelines, you will need to first:
@@ -768,12 +770,9 @@ def ci_rebuild(args):
... then follow the printed instructions.\033[0;0m
""".format(
repro_job_url
"""
)
print(reproduce_msg)
rebuild_timer.stop()
try:
with open("install_timers.json", "w") as timelog:
@@ -792,11 +791,6 @@ def ci_reproduce(args):
artifacts of the provided gitlab pipeline rebuild job's URL will be used to derive
instructions for reproducing the build locally
"""
job_url = args.job_url
work_dir = args.working_dir
autostart = args.autostart
runtime = args.runtime
# Allow passing GPG key for reprocuding protected CI jobs
if args.gpg_file:
gpg_key_url = url_util.path_to_file_url(args.gpg_file)
@@ -805,7 +799,47 @@ def ci_reproduce(args):
else:
gpg_key_url = None
return spack_ci.reproduce_ci_job(job_url, work_dir, autostart, gpg_key_url, runtime)
return spack_ci.reproduce_ci_job(
args.job_url, args.working_dir, args.autostart, gpg_key_url, args.runtime
)
def _gitlab_artifacts_url(url: str) -> str:
"""Take a URL either to the URL of the job in the GitLab UI, or to the artifacts zip file,
and output the URL to the artifacts zip file."""
parsed = urlparse(url)
if not parsed.scheme or not parsed.netloc:
raise ValueError(url)
parts = parsed.path.split("/")
if len(parts) < 2:
raise ValueError(url)
# Just use API endpoints verbatim, they're probably generated by Spack.
if parts[1] == "api":
return url
# If it's a URL to the job in the Gitlab UI, we may need to append the artifacts path.
minus_idx = parts.index("-")
# Remove repeated slashes in the remainder
rest = [p for p in parts[minus_idx + 1 :] if p]
# Now the format is jobs/X or jobs/X/artifacts/download
if len(rest) < 2 or rest[0] != "jobs":
raise ValueError(url)
if len(rest) == 2:
# replace jobs/X with jobs/X/artifacts/download
rest.extend(("artifacts", "download"))
# Replace the parts and unparse.
parts[minus_idx + 1 :] = rest
# Don't allow fragments / queries
return urlunparse(parsed._replace(path="/".join(parts), fragment="", query=""))
def ci(parser, args):

View File

@@ -570,6 +570,14 @@ def add_concretizer_args(subparser):
default=None,
help="reuse installed dependencies only",
)
subgroup.add_argument(
"--deprecated",
action=ConfigSetAction,
dest="config:deprecated",
const=True,
default=None,
help="allow concretizer to select deprecated versions",
)
def add_connection_args(subparser, add_help):

View File

@@ -89,7 +89,7 @@ def compiler_find(args):
paths, scope=None, mixed_toolchain=args.mixed_toolchain
)
if new_compilers:
spack.compilers.add_compilers_to_config(new_compilers, scope=args.scope, init_config=False)
spack.compilers.add_compilers_to_config(new_compilers, scope=args.scope)
n = len(new_compilers)
s = "s" if n > 1 else ""

View File

@@ -76,6 +76,10 @@ def setup_parser(subparser):
)
add_parser.add_argument("-f", "--file", help="file from which to set all config values")
change_parser = sp.add_parser("change", help="swap variants etc. on specs in config")
change_parser.add_argument("path", help="colon-separated path to config section with specs")
change_parser.add_argument("--match-spec", help="only change constraints that match this")
prefer_upstream_parser = sp.add_parser(
"prefer-upstream", help="set package preferences from upstream"
)
@@ -118,7 +122,7 @@ def _get_scope_and_section(args):
if not section and not scope:
env = ev.active_environment()
if env:
scope = env.env_file_config_scope_name()
scope = env.scope_name
# set scope defaults
elif not scope:
@@ -263,6 +267,98 @@ def _can_update_config_file(scope: spack.config.ConfigScope, cfg_file):
return fs.can_write_to_dir(scope.path) and fs.can_access(cfg_file)
def _config_change_requires_scope(path, spec, scope, match_spec=None):
"""Return whether or not anything changed."""
require = spack.config.get(path, scope=scope)
if not require:
return False
changed = False
def override_cfg_spec(spec_str):
nonlocal changed
init_spec = spack.spec.Spec(spec_str)
# Overridden spec cannot be anonymous
init_spec.name = spec.name
if match_spec and not init_spec.satisfies(match_spec):
# If there is a match_spec, don't change constraints that
# don't match it
return spec_str
elif not init_spec.intersects(spec):
changed = True
return str(spack.spec.Spec.override(init_spec, spec))
else:
# Don't override things if they intersect, otherwise we'd
# be e.g. attaching +debug to every single version spec
return spec_str
if isinstance(require, str):
new_require = override_cfg_spec(require)
else:
new_require = []
for item in require:
if "one_of" in item:
item["one_of"] = [override_cfg_spec(x) for x in item["one_of"]]
elif "any_of" in item:
item["any_of"] = [override_cfg_spec(x) for x in item["any_of"]]
elif "spec" in item:
item["spec"] = override_cfg_spec(item["spec"])
elif isinstance(item, str):
item = override_cfg_spec(item)
else:
raise ValueError(f"Unexpected requirement: ({type(item)}) {str(item)}")
new_require.append(item)
spack.config.set(path, new_require, scope=scope)
return changed
def _config_change(config_path, match_spec_str=None):
all_components = spack.config.process_config_path(config_path)
key_components = all_components[:-1]
key_path = ":".join(key_components)
spec = spack.spec.Spec(syaml.syaml_str(all_components[-1]))
match_spec = None
if match_spec_str:
match_spec = spack.spec.Spec(match_spec_str)
if key_components[-1] == "require":
# Extract the package name from the config path, which allows
# args.spec to be anonymous if desired
pkg_name = key_components[1]
spec.name = pkg_name
changed = False
for scope in spack.config.writable_scope_names():
changed |= _config_change_requires_scope(key_path, spec, scope, match_spec=match_spec)
if not changed:
existing_requirements = spack.config.get(key_path)
if isinstance(existing_requirements, str):
raise spack.config.ConfigError(
"'config change' needs to append a requirement,"
" but existing require: config is not a list"
)
ideal_scope_to_modify = None
for scope in spack.config.writable_scope_names():
if spack.config.get(key_path, scope=scope):
ideal_scope_to_modify = scope
break
update_path = f"{key_path}:[{str(spec)}]"
spack.config.add(update_path, scope=ideal_scope_to_modify)
else:
raise ValueError("'config change' can currently only change 'require' sections")
def config_change(args):
_config_change(args.path, args.match_spec)
def config_update(args):
# Read the configuration files
spack.config.CONFIG.get_config(args.section, scope=args.scope)
@@ -490,5 +586,6 @@ def config(parser, args):
"update": config_update,
"revert": config_revert,
"prefer-upstream": config_prefer_upstream,
"change": config_change,
}
action[args.config_command](args)

View File

@@ -19,7 +19,7 @@
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ["jobs"])
arguments.add_common_arguments(subparser, ["jobs", "no_checksum", "spec"])
subparser.add_argument(
"-d",
"--source-path",
@@ -34,7 +34,6 @@ def setup_parser(subparser):
dest="ignore_deps",
help="do not try to install dependencies of requested packages",
)
arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
subparser.add_argument(
"--keep-prefix",
action="store_true",
@@ -63,7 +62,6 @@ def setup_parser(subparser):
choices=["root", "all"],
help="run tests on only root packages or all packages",
)
arguments.add_common_arguments(subparser, ["spec"])
stop_group = subparser.add_mutually_exclusive_group()
stop_group.add_argument(
@@ -125,9 +123,6 @@ def dev_build(self, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
if args.deprecated:
spack.config.set("config:deprecated", True, scope="command_line")
tests = False
if args.test == "all":
tests = True

View File

@@ -8,6 +8,7 @@
import llnl.util.tty as tty
import spack.cmd
import spack.config
import spack.spec
import spack.util.path
import spack.version
@@ -21,6 +22,7 @@
def setup_parser(subparser):
subparser.add_argument("-p", "--path", help="source location of package")
subparser.add_argument("-b", "--build-directory", help="build directory for the package")
clone_group = subparser.add_mutually_exclusive_group()
clone_group.add_argument(
@@ -151,4 +153,11 @@ def develop(parser, args):
env = spack.cmd.require_active_env(cmd_name="develop")
tty.debug("Updating develop config for {0} transactionally".format(env.name))
with env.write_transaction():
if args.build_directory is not None:
spack.config.add(
"packages:{}:package_attributes:build_directory:{}".format(
spec.name, args.build_directory
),
env.scope_name,
)
_update_config(spec, path)

View File

@@ -9,6 +9,7 @@
import shutil
import sys
import tempfile
from pathlib import Path
from typing import Optional
import llnl.string as string
@@ -44,6 +45,7 @@
"deactivate",
"create",
["remove", "rm"],
["rename", "mv"],
["list", "ls"],
["status", "st"],
"loads",
@@ -270,7 +272,8 @@ def create_temp_env_directory():
def _tty_info(msg):
"""tty.info like function that prints the equivalent printf statement for eval."""
decorated = f'{colorize("@*b{==>}")} {msg}\n'
print(f"printf {shlex.quote(decorated)};")
executor = "echo" if sys.platform == "win32" else "printf"
print(f"{executor} {shlex.quote(decorated)};")
def env_activate(args):
@@ -471,11 +474,82 @@ def env_remove(args):
tty.msg(f"Successfully removed environment '{bad_env_name}'")
#
# env rename
#
def env_rename_setup_parser(subparser):
"""rename an existing environment"""
subparser.add_argument(
"mv_from", metavar="from", help="name (or path) of existing environment"
)
subparser.add_argument(
"mv_to", metavar="to", help="new name (or path) for existing environment"
)
subparser.add_argument(
"-d",
"--dir",
action="store_true",
help="the specified arguments correspond to directory paths",
)
subparser.add_argument(
"-f", "--force", action="store_true", help="allow overwriting of an existing environment"
)
def env_rename(args):
"""Rename an environment.
This renames a managed environment or moves an anonymous environment.
"""
# Directory option has been specified
if args.dir:
if not ev.is_env_dir(args.mv_from):
tty.die("The specified path does not correspond to a valid spack environment")
from_path = Path(args.mv_from)
if not args.force:
if ev.is_env_dir(args.mv_to):
tty.die(
"The new path corresponds to an existing environment;"
" specify the --force flag to overwrite it."
)
if Path(args.mv_to).exists():
tty.die("The new path already exists; specify the --force flag to overwrite it.")
to_path = Path(args.mv_to)
# Name option being used
elif ev.exists(args.mv_from):
from_path = ev.environment.environment_dir_from_name(args.mv_from)
if not args.force and ev.exists(args.mv_to):
tty.die(
"The new name corresponds to an existing environment;"
" specify the --force flag to overwrite it."
)
to_path = ev.environment.root(args.mv_to)
# Neither
else:
tty.die("The specified name does not correspond to a managed spack environment")
# Guard against renaming from or to an active environment
active_env = ev.active_environment()
if active_env:
from_env = ev.Environment(from_path)
if from_env.path == active_env.path:
tty.die("Cannot rename active environment")
if to_path == active_env.path:
tty.die(f"{args.mv_to} is an active environment")
shutil.rmtree(to_path, ignore_errors=True)
fs.rename(from_path, to_path)
tty.msg(f"Successfully renamed environment {args.mv_from} to {args.mv_to}")
#
# env list
#
def env_list_setup_parser(subparser):
"""list available environments"""
"""list managed environments"""
def env_list(args):

View File

@@ -18,6 +18,7 @@
import spack.cray_manifest as cray_manifest
import spack.detection
import spack.error
import spack.repo
import spack.util.environment
from spack.cmd.common import arguments
@@ -152,9 +153,9 @@ def external_find(args):
def packages_to_search_for(
*, names: Optional[List[str]], tags: List[str], exclude: Optional[List[str]]
):
result = []
for current_tag in tags:
result.extend(spack.repo.PATH.packages_with_tags(current_tag, full=True))
result = list(
{pkg for tag in tags for pkg in spack.repo.PATH.packages_with_tags(tag, full=True)}
)
if names:
# Match both fully qualified and unqualified

View File

@@ -18,7 +18,7 @@
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
subparser.add_argument(
"-m",
"--missing",
@@ -28,7 +28,7 @@ def setup_parser(subparser):
subparser.add_argument(
"-D", "--dependencies", action="store_true", help="also fetch all dependencies"
)
arguments.add_common_arguments(subparser, ["specs"])
arguments.add_concretizer_args(subparser)
subparser.epilog = (
"With an active environment, the specs "
"parameter can be omitted. In this case all (uninstalled"
@@ -40,9 +40,6 @@ def fetch(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
if args.deprecated:
spack.config.set("config:deprecated", True, scope="command_line")
if args.specs:
specs = spack.cmd.parse_specs(args.specs, concretize=True)
else:

View File

@@ -140,6 +140,12 @@ def setup_parser(subparser):
subparser.add_argument(
"--only-deprecated", action="store_true", help="show only deprecated packages"
)
subparser.add_argument(
"--install-tree",
action="store",
default="all",
help="Install trees to query: 'all' (default), 'local', 'upstream', upstream name or path",
)
subparser.add_argument("--start-date", help="earliest date of installation [YYYY-MM-DD]")
subparser.add_argument("--end-date", help="latest date of installation [YYYY-MM-DD]")
@@ -168,6 +174,12 @@ def query_arguments(args):
q_args = {"installed": installed, "known": known, "explicit": explicit}
install_tree = args.install_tree
upstreams = spack.config.get("upstreams", {})
if install_tree in upstreams.keys():
install_tree = upstreams[install_tree]["install_tree"]
q_args["install_tree"] = install_tree
# Time window of installation
for attribute in ("start_date", "end_date"):
date = getattr(args, attribute)

View File

@@ -18,7 +18,14 @@
def setup_parser(subparser):
setup_parser.parser = subparser
subparser.epilog = """
Outside of an environment, the command concretizes specs and graphs them, unless the
--installed option is given. In that case specs are matched from the current DB.
If an environment is active, specs are matched from the currently available concrete specs
in the lockfile.
"""
method = subparser.add_mutually_exclusive_group()
method.add_argument(
"-a", "--ascii", action="store_true", help="draw graph as ascii to stdout (default)"
@@ -41,39 +48,40 @@ def setup_parser(subparser):
)
subparser.add_argument(
"-i",
"--installed",
action="store_true",
help="graph installed specs, or specs in the active env (implies --dot)",
"-i", "--installed", action="store_true", help="graph specs from the DB"
)
arguments.add_common_arguments(subparser, ["deptype", "specs"])
def graph(parser, args):
if args.installed and args.specs:
tty.die("cannot specify specs with --installed")
env = ev.active_environment()
if args.installed and env:
tty.die("cannot use --installed with an active environment")
if args.color and not args.dot:
tty.die("the --color option can be used only with --dot")
if args.installed:
args.dot = True
env = ev.active_environment()
if env:
specs = env.concrete_roots()
else:
if not args.specs:
specs = spack.store.STORE.db.query()
else:
result = []
for item in args.specs:
result.extend(spack.store.STORE.db.query(item))
specs = list(set(result))
elif env:
specs = env.concrete_roots()
if args.specs:
specs = env.all_matching_specs(*args.specs)
else:
specs = spack.cmd.parse_specs(args.specs, concretize=not args.static)
if not specs:
setup_parser.parser.print_help()
return 1
tty.die("no spec matching the query")
if args.static:
args.dot = True
static_graph_dot(specs, depflag=args.deptype)
return

View File

@@ -30,6 +30,7 @@
@c{@min:max} version range (inclusive)
@c{@min:} version <min> or higher
@c{@:max} up to version <max> (inclusive)
@c{@=version} exact version
compilers:
@g{%compiler} build with <compiler>

View File

@@ -176,7 +176,7 @@ def setup_parser(subparser):
dest="install_source",
help="install source files in prefix",
)
arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
arguments.add_common_arguments(subparser, ["no_checksum"])
subparser.add_argument(
"-v",
"--verbose",
@@ -290,11 +290,11 @@ def require_user_confirmation_for_overwrite(concrete_specs, args):
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):
if not os.path.exists(e.pkg.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:
with open(e.pkg.log_path, errors="replace") as log:
shutil.copyfileobj(log, sys.stderr)
@@ -326,9 +326,6 @@ def install(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
if args.deprecated:
spack.config.set("config:deprecated", True, scope="command_line")
if args.log_file and not args.log_format:
msg = "the '--log-format' must be specified when using '--log-file'"
tty.die(msg)
@@ -423,10 +420,9 @@ def install_with_active_env(env: ev.Environment, args, install_kwargs, reporter_
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)
if env.views:
with env.write_transaction():
env.write(regenerate=True)
def concrete_specs_from_cli(args, install_kwargs):

View File

@@ -292,9 +292,11 @@ def head(n, span_id, title, anchor=None):
out.write("<dd>\n")
out.write(
", ".join(
d
if d not in pkg_names
else '<a class="reference internal" href="#%s">%s</a>' % (d, d)
(
d
if d not in pkg_names
else '<a class="reference internal" href="#%s">%s</a>' % (d, d)
)
for d in deps
)
)

View File

@@ -5,8 +5,6 @@
import sys
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.find
import spack.environment as ev
@@ -70,16 +68,6 @@ def setup_parser(subparser):
help="load the first match if multiple packages match the spec",
)
subparser.add_argument(
"--only",
default="package,dependencies",
dest="things_to_load",
choices=["package", "dependencies"],
help="select whether to load the package and its dependencies\n\n"
"the default is to load the package and all dependencies. alternatively, "
"one can decide to load only the package or only the dependencies",
)
subparser.add_argument(
"--list",
action="store_true",
@@ -110,11 +98,6 @@ def load(parser, args):
)
return 1
if args.things_to_load != "package,dependencies":
tty.warn(
"The `--only` flag in spack load is deprecated and will be removed in Spack v0.22"
)
with spack.store.STORE.db.read_transaction():
env_mod = uenv.environment_modifications_for_specs(*specs)
for spec in specs:

View File

@@ -53,6 +53,7 @@ def setup_parser(subparser):
"-S", "--stages", action="store_true", help="top level stage directory"
)
directories.add_argument(
"-c",
"--source-dir",
action="store_true",
help="source directory for a spec (requires it to be staged first)",

View File

@@ -0,0 +1,71 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import errno
import gzip
import io
import os
import shutil
import sys
import spack.cmd
import spack.spec
import spack.util.compression as compression
from spack.cmd.common import arguments
from spack.main import SpackCommandError
description = "print out logs for packages"
section = "basic"
level = "long"
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ["spec"])
def _dump_byte_stream_to_stdout(instream: io.BufferedIOBase) -> None:
# Reopen stdout in binary mode so we don't have to worry about encoding
outstream = os.fdopen(sys.stdout.fileno(), "wb", closefd=False)
shutil.copyfileobj(instream, outstream)
def _logs(cmdline_spec: spack.spec.Spec, concrete_spec: spack.spec.Spec):
if concrete_spec.installed:
log_path = concrete_spec.package.install_log_path
elif os.path.exists(concrete_spec.package.stage.path):
# TODO: `spack logs` can currently not show the logs while a package is being built, as the
# combined log file is only written after the build is finished.
log_path = concrete_spec.package.log_path
else:
raise SpackCommandError(f"{cmdline_spec} is not installed or staged")
try:
stream = open(log_path, "rb")
except OSError as e:
if e.errno == errno.ENOENT:
raise SpackCommandError(f"No logs are available for {cmdline_spec}") from e
raise SpackCommandError(f"Error reading logs for {cmdline_spec}: {e}") from e
with stream as f:
ext = compression.extension_from_magic_numbers_by_stream(f, decompress=False)
if ext and ext != "gz":
raise SpackCommandError(f"Unsupported storage format for {log_path}: {ext}")
# If the log file is gzip compressed, wrap it with a decompressor
_dump_byte_stream_to_stdout(gzip.GzipFile(fileobj=f) if ext == "gz" else f)
def logs(parser, args):
specs = spack.cmd.parse_specs(args.spec)
if not specs:
raise SpackCommandError("You must supply a spec.")
if len(specs) != 1:
raise SpackCommandError("Too many specs. Supply only one.")
concrete_spec = spack.cmd.matching_spec_from_env(specs[0])
_logs(specs[0], concrete_spec)

View File

@@ -28,7 +28,7 @@
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
arguments.add_common_arguments(subparser, ["no_checksum"])
sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="mirror_command")
@@ -72,6 +72,7 @@ def setup_parser(subparser):
" retrieve all versions of each package",
)
arguments.add_common_arguments(create_parser, ["specs"])
arguments.add_concretizer_args(create_parser)
# Destroy
destroy_parser = sp.add_parser("destroy", help=mirror_destroy.__doc__)
@@ -549,7 +550,4 @@ def mirror(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
if args.deprecated:
spack.config.set("config:deprecated", True, scope="command_line")
action[args.mirror_command](args)

View File

@@ -19,7 +19,7 @@
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ["no_checksum", "deprecated", "specs"])
arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
arguments.add_concretizer_args(subparser)
@@ -33,9 +33,6 @@ def patch(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
if args.deprecated:
spack.config.set("config:deprecated", True, scope="command_line")
specs = spack.cmd.parse_specs(args.specs, concretize=False)
for spec in specs:
_patch(spack.cmd.matching_spec_from_env(spec).package)

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