Compare commits

..

291 Commits

Author SHA1 Message Date
Gregory Becker
d82b537339 more thread safety 2022-07-11 14:00:20 -04:00
Gregory Becker
3d8d1fe924 update binary index before threading 2022-07-11 13:19:45 -04:00
Luke Diorio-Toth
f09f834a8f py-gtdbtk and fastani: new packages (#31268) 2022-06-24 07:49:07 -07:00
Cody Balos
147f39d7aa Fix typo in documentation note about concretizer:unify (#31246) 2022-06-24 11:31:43 +02:00
Adam J. Stewart
9fad3ed5f1 giflib: fix macOS build (#31234) 2022-06-24 11:28:44 +02:00
Adam J. Stewart
1375b1975b librttopo: add missing Autotools deps (#31252) 2022-06-24 11:28:12 +02:00
Adam J. Stewart
c533612ab6 sfcgal: fix boost build issues (#31254) 2022-06-24 10:22:56 +02:00
Adam J. Stewart
e5cc3c51d1 py-numpy: add v1.23.0 (#31250) 2022-06-24 10:20:04 +02:00
Massimiliano Culpo
70650cacbd ASP-based solver: rescale target weights so that 0 is always the best score (#31226)
fixes #30997

Instead of giving a penalty of 30 to all nodes when preferences
are not package specific, give a penalty of 100 to all targets
of a node where we have package specific preferences, if the target
is not explicitly preferred.
2022-06-23 23:33:36 -07:00
Brian Van Essen
d8a5638d9f Fixed the range on Catch2 to avoid v3.x (#31242) 2022-06-23 16:10:27 -07:00
Luke Diorio-Toth
158f6ddb14 py-instrain: adding new package (#31244)
* py-instrain: adding new package

* py-instrain: fixed style

* removed unnecessary setuptools and numba version restrictions

* fixed pandas version
2022-06-23 22:58:45 +00:00
haralmha
86d1a6f2fc hadoop-xrootd: Add clang conflict (#31215)
* hadoop-xrootd: Add clang conflict

* Flake8

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-23 16:45:39 -06:00
Mikael Simberg
ca10ff1649 Allow using mimalloc 2 in pika and HPX (#31260) 2022-06-23 15:33:03 -07:00
Adam J. Stewart
19175b9bab keyutils: add macOS conflict (#31236) 2022-06-23 16:13:37 -06:00
Richard Berger
7d64a8e81f add charliecloud 0.27 and fix master install (#31247)
* charliecloud: custom autoreconf and require py-pip and py-wheel for master

* charliecloud: add 0.27

* charliecloud: add minimum py-pip version
2022-06-23 15:03:03 -07:00
Adam J. Stewart
a0b68a0baa rpcsvc-proto: add v1.4.3 (#31253) 2022-06-23 14:59:55 -07:00
Harmen Stoppels
b7e0692dfa libfuse: 3.11.0 (#31259) 2022-06-23 14:55:47 -07:00
Maciej Wójcik
8cc62ef916 Add some GROMACS versions (#31264)
* gromacs: add recent version

* gromacs-swaxs: add recent versions

* gromacs-chain-coordinate: add recent version
2022-06-23 14:53:32 -07:00
Stephen Sachs
2363aba710 [lammps] Rename master -> develop branch (#31263)
https://github.com/lammps/lammps/pull/3311

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-23 14:40:55 -07:00
Weston Ortiz
5a0c56229c goma: update package with new version and options (#31267) 2022-06-23 14:10:14 -07:00
AMD Toolchain Support
96bb72e412 Updated sha256 value for amdlibflame (#31269) 2022-06-23 14:07:09 -07:00
Adam J. Stewart
7c977733f1 py-pandas: add v1.4.3 (#31270) 2022-06-23 14:05:49 -07:00
Brian Van Essen
d48a760837 Add the rocm tag to packages from the Radeon Open Compute Platform. (#31187)
* Add the rocm tag to packages from the Radeon Open Compute Platform.

* Added more packages from the ROCm software distribution based on
reviewer feedback.

* Updated tags based on reviewer feedback
2022-06-23 09:10:01 -07:00
Brian Van Essen
c64298a183 Enable MVAPICH2 to use the mpichversion executable to detect externals (#31245)
This is an an alternative to mpiname.
2022-06-23 07:41:25 +02:00
Ben Boeckel
31d89e80bc protobuf: add 21.1 (#31249)
Older versions have compile errors under newer compilers (e.g., gcc-12).
2022-06-22 19:33:54 -06:00
Luke Diorio-Toth
2844f1fc45 added racon conflict with new versions of gcc (#31243) 2022-06-22 18:00:27 -07:00
Vicente Bolea
8b85f8ec58 vtk-m: change smoke test (#29113) 2022-06-22 18:58:03 -06:00
eugeneswalker
7ef52acfce relocation: x-pie-executable needs relocation (#31248) 2022-06-22 23:55:28 +00:00
Nicholas Sly
c3fecfb103 Add --disable-wrapper-runpath to openmpi when ~wrapper-rpath to avoid build time error. (#31221)
Co-authored-by: Nicholas Cameron Sly <sly1@rzalastor2.llnl.gov>
2022-06-22 16:57:55 -06:00
Adam J. Stewart
ef278c601c spack create: fix for no URL (#31239) 2022-06-22 18:45:03 +00:00
JeromeDuboisPro
5e9a8d27f7 add first version of py-pyrr package (#31211)
* add first version of py-pyrr package

* added license

* update license HEADER

* Remove preferred as there is only one version available

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

* Better specify dependency type

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

* remove useless variable license

Co-authored-by: Jérôme Dubois <jerome.dubois@cea.fr>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-22 10:36:49 -07:00
Manuela Kuhn
ffc90f944c py-bids-validator: add 1.9.4 (#31230) 2022-06-22 10:35:57 -07:00
Harmen Stoppels
699c0cf9a0 squashfs-mount: new package (#31225) 2022-06-22 14:31:20 +02:00
Massimiliano Culpo
55cac3b098 Remove update functions used to ease the transition in v0.16 (#31216) 2022-06-22 11:15:57 +02:00
Tamara Dahlgren
35d07a6f18 Add missing '?full_index=1' to meson 9850.patch URL (#31222)
* Add missing '?full_index=1' to meson 9850.patch URL

* Correct checksum

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>
2022-06-22 08:56:49 +02:00
Adam J. Stewart
1f42a5e598 py-geopandas: add v0.11.0 (#31218) 2022-06-21 18:14:04 -07:00
Adam J. Stewart
967463432b py-shapely: env vars always needed (#31217) 2022-06-21 18:11:36 -07:00
Howard Pritchard
bc03b5caaf meson: fix to recognize intel oneapi compiler (#30605)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2022-06-21 10:47:46 -07:00
Massimiliano Culpo
649760dc1a Canonicalize positional argument to spack bootstrap mirror (#31180)
fixes #31139
2022-06-21 19:25:01 +02:00
Adam J. Stewart
77118427b1 grep: add +pcre variant (#31204) 2022-06-21 10:06:42 -07:00
haralmha
1a024963a2 frontier-client: Add openssl and zlib directories to search path (#31212) 2022-06-21 09:38:24 -07:00
Massimiliano Culpo
aebb601b70 Stricter compatibility rules for OS and compiler when reusing specs (#31170)
* Stricter compatibility rules for OS and compiler when reusing specs
* Add unit test
2022-06-20 17:32:13 -07:00
Robert Cohn
d95f53e1ac New (external-only) package: oneapi-igc (#31045) 2022-06-20 13:38:41 -07:00
Christian Goll
0fe57962b3 OpenSUSE Tumbleweed: use GLIBC version as distro version (#19895)
Tumbleweed is a rolling release that would have used a date 
as a version instead.
2022-06-20 22:20:31 +02:00
Massimiliano Culpo
8ec451aa7d setuptools: add v62.4.0 (#31112) 2022-06-20 08:59:58 -07:00
Stephen Sachs
14349cb882 lammps: add lammps_sizes variant (#31182)
This is translated to CMakes LAMMS_SIZES variable. Used to select integer sizes.

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-20 09:39:03 +00:00
Pariksheet Nanda
bc438ed4e9 ome-files-cpp: add v0.6.0 (#31156) 2022-06-20 10:16:21 +02:00
Sam Broderick
760a12c440 Fix request for bzip2, since bzip was pulled due to patent issues (#31198) 2022-06-20 08:13:20 +00:00
Adam J. Stewart
9325c8e53f py-tensorboard-data-server: fix build on Apple M1 (#30908) 2022-06-20 10:12:32 +02:00
HELICS-bot
fd5b7d6cce helics: add v3.2.1 (#31190)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-20 09:54:57 +02:00
Cory Bloor
b19a0744f1 rocm: add master and develop to BLAS and SOLVER (#30273) 2022-06-20 09:52:47 +02:00
Sebastian Ehlert
75d0c0dff7 fpm: add v0.6.0 (#31193) 2022-06-20 09:49:21 +02:00
Adam J. Stewart
aedc41c3a0 texlive: fix and deprecate live version (#31195) 2022-06-20 09:44:36 +02:00
Valentin Churavy
1f39d6d916 Julia: add v1.7.3 (#31196) 2022-06-20 09:41:50 +02:00
Ye Luo
1bc3b0a926 quantum-espresso: Add 7.1 (#31192) 2022-06-18 23:32:28 +02:00
Ryan Marcellino
62596fb796 py-f90wrap: new version (#31174) 2022-06-17 17:09:34 -06:00
Brian Van Essen
15c35a3cff Bugfix external find --all for libraries (#31186)
* Fixed a bug in the 'external find --all' command where the call failed
to find packages by both executable and library. The bug was that the
call `path.all_packages()` incorrectly turned the variable
`packages_to_check` into a generator rather than keeping it a list.
Thus the second call to `detection.by_library` had no work to do.

* Fixed the help message for the find external and compiler commands as
well as others that used the `scopes_metavar` field to define where
the results should be stored in configuration space.  Specifically,
the fact that configuration could be added to the environment was not
mentioned in the help message.
2022-06-17 21:52:06 +00:00
Brian Van Essen
249c90f909 Added the ecp and radiuss tags to the LBANN software stack packages. (#31188) 2022-06-17 21:25:50 +00:00
Kyle Gerheiser
043b2cbb7c Fix external compiler detection for MPICH and OpenMPI (#30875)
os.path.dirname was being used to compare compilers. If two compilers
are in the same directory then it will pick up the first one it encounters.

Compare the full compiler path instead.
2022-06-17 14:01:49 -06:00
Bernhard Kaindl
aedf215b90 openssh: don't suid-install ssh-keysign (not used by default) (#31083) 2022-06-17 12:09:52 -06:00
Mikhail Titov
eed4a63be7 rct: update packages (RE, RG, RP, RS, RU) with new versions (#31172) 2022-06-17 10:44:22 -07:00
Massimiliano Culpo
13b609b4b6 docs: quote string to show valid YAML (#31178)
fixes #31167
2022-06-17 18:25:52 +02:00
Chuck Atkins
85dc20cb55 Spec: Add a new virtual-customizable home attribute (#30917)
* Spec: Add a new virtual-customizable home attribute

* java: Use the new builtin home attribute

* python: Use the new builtin home attribute
2022-06-17 10:29:08 -04:00
Massimiliano Culpo
667c39987c py-setuptools: install setuptools from wheels directly (#31131)
When installing setuptools from sources in Spack, we might
get into weird failures due to the way we use pip.

In particular, for Spack it's necessary to install in a
non-isolated pip environment to allow using PYTHONPATH as a
selection method for all the build requirements of a
Python package.

This can fail when installing setuptools since there might
be a setuptools version already installed for the Python
interpreter being used, with different entry points than
the one we want to install.

Installing from wheels both pip and setuptools should
harden our installation procedure in the context of:
- Bootstrapping Python dependencies of Spack
- Using external Python packages
2022-06-17 10:42:28 +02:00
Cyrus Harrison
f35d8c4102 vtk-h: use cmake base pkg, overhaul recipe (#28898)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-17 09:59:57 +02:00
Sreenivasa Murthy Kolam
6ac3186132 Support 'spack external find' for rocm packages (#30792) 2022-06-17 09:34:49 +02:00
Robert Cohn
466572dc14 Update Intel package descriptions (#31150) 2022-06-17 09:23:40 +02:00
Harmen Stoppels
1c0bf12e5b openssl package: default to mozilla certs (#31164)
On Cray systems that use Cray Data Virtualization Service (DVS),
symlinks across filesystems are not allowed, either due to a bug, or
because they're simply not POSIX compliant [1].

Spack's OpenSSL package defaults to `certs=system` which comes down to
symlinking `/etc/ssl` in the Spack install prefix, triggering this
problem, resulting in mysterious installation failures.

Instead of relying on system certs, we can just use
`ca-certificates-mozilla`, and if users really need system certs, then
they're probably better off marking OpenSSL entirely as external.

[1] https://github.com/glennklockwood/cray-dvs
2022-06-16 23:25:32 -06:00
Adam J. Stewart
bf990bc8ec py-sphinx: add v5, maintainer (#31171) 2022-06-16 20:41:31 -06:00
Massimiliano Culpo
267358a799 ASP-based solver: fix rules on version weights selection (#31153)
* ASP: sort and deduplicate version weights from installed specs

* Pick version weights according to provenance

* Add unit test
2022-06-16 14:17:40 -07:00
Peter Scheibel
392b548312 Manifest parsing: avoid irrelevant files (#31144)
* Manifest directory may not contain manifest files: exclude non-manifest files
* Manifest files use different name for rocmcc: add translation for it
2022-06-16 15:16:48 -05:00
Elizabeth Sherrock
8c3b82c140 New packages: py-ford and dependencies (#31107)
* Created package and added description

* Add py-markdown-include

* Created package

* Finished creating package

* Added py-md-environ

* Added build dependencies

* Added other deps

* Add python-markdown-math (#4)

* Created package and started to add info

* Removed unneeded global/install options

* Figured out version spec for markdown-math

* Removed type=build from unnecessary dependencies

* Removed unneeded install/global options, added version spec to dependency

* Added wscullin as interim maintainer for packages

* Fixed style issues

* Took care of trailing whitespace

* Removed comment line before imports

* Changed file charset to match other packages

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

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

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

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

* Removed test dependency after review feedback

* Added new 6.1.12 version to py-ford

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-16 12:14:40 -07:00
Qian Jianhua
2e4b533420 rpcsvc-proto: add 'cpp' path for rpcgen (#31157) 2022-06-16 18:24:28 +00:00
Mark Abraham
3b393fe0eb Add LevelZero variant to hwloc package (#31161)
* Add LevelZero variant to hwloc package

This permits the hwloc package to build with with support for the
Intel Level Zero low-level layer, analogous to CUDA, ROCm, and OpenCL.

* Fix typo
2022-06-16 12:21:36 -06:00
Massimiliano Culpo
895ceeda38 concretize.lp: impose a lower bound on the number of version facts if a solution exists (#31142)
* concretize.lp: impose a lower bound on the number of version facts if a valid version exists

fixes #30864

* Add a unit test
2022-06-16 09:25:56 -07:00
Satish Balay
6f1e3a4ad3 xsdk-examples: use 'parallel=False' with tests - as they may fail with a large '-j'[when used with +cuda] (#31138) 2022-06-16 07:50:45 -07:00
iarspider
ce41b7457b Xerces-C: Add option to disable transcoder (#31162)
* Xerces-C: Add option to disable transcoder

* Update package.py

* Apply suggestion from review

* Flake-8
2022-06-16 10:40:03 -04:00
G-Ragghianti
4f9f56630b slate, blaspp, lapackpp: new versions (#31147)
* Adding new release for slate, blaspp, and lapackpp

* Setting release tar file hashes

* New slate release
2022-06-16 08:09:42 -04:00
Rob Falgout
e216ba1520 hypre: new version 2.25.0 (#31146) 2022-06-16 08:07:30 -04:00
Massimiliano Culpo
4fd5ee1d9d CI: test binary bootstrapping of clingo on all macOS versions (#31160) 2022-06-16 07:26:20 -04:00
Mosè Giordano
89f32d51f3 grid: add new package (#31133) 2022-06-16 09:00:09 +02:00
Manuela Kuhn
3b3be70226 r-httpuv: fix zlib dependency (#31121) 2022-06-15 20:22:58 -05:00
Chuck Atkins
95888602f2 mesa: Match rtti settings with the libllvm dependency (#31145)
* llvm-amdgpu: Update the libllvm version provided

* mesa: Match configure rtti settings to the libllvm dependency
2022-06-15 17:29:33 -06:00
Wileam Y. Phan
0205fefe0c googletest: use URLs with .tar.gz extension (#31129) 2022-06-15 18:21:44 +00:00
Tom Scogland
b261b2a5ff Allow bootstrapping to work when partial or incompatible modules exist in the module path (#31035) 2022-06-15 19:09:07 +02:00
Ryan Mast
8c58c14c3d helics: add v2.8.1 (#31134) 2022-06-15 09:27:50 +02:00
SXS Bot
f7b4d488c3 spectre: add v2022.06.14 (#31135)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2022-06-15 09:27:10 +02:00
Sreenivasa Murthy Kolam
38a8d4d2fe ROCm support to build py-torch (#31115)
* rocm support to build py-torch

* rocm support to build py-torch
2022-06-14 15:56:11 -07:00
Robert Underwood
1ceee714db sz: smoke, unit, version updates, and more oh my (#30873)
Co-authored-by: Robert Underwood <runderwood@anl.gov>
2022-06-14 16:53:47 -06:00
Brian Van Essen
5b3e4ba3f8 Fixed bad hashes for recent versions and added v8.4.0 (#31038) 2022-06-14 22:05:44 +02:00
snehring
37426e41cb wget: fixing compilation issue with gcc11+ on rhel7 (#30858) 2022-06-14 16:03:02 +00:00
Sergey Kosukhin
a05e729e1b mpich: remove libtool patches (#30769) 2022-06-14 16:29:22 +02:00
Mikael Simberg
f8a6799e67 apex: fix compilation with binutils (#30638) 2022-06-14 16:04:53 +02:00
Maciej Wójcik
633ebd149c dbcsr: add versions up to v2.2.0 (#30891)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-14 15:08:13 +02:00
G-Ragghianti
bf6220821b Make the IntelPackage fail successfully (#30773)
Co-authored-by: Robert Cohn <rscohn2@gmail.com>
2022-06-14 15:06:06 +02:00
Sebastian Ehlert
3db96aa892 simple-dftd3: add package and dependencies (#31046)
- add simple-dftd3 (version 0.6.0, 0.5.1)
- add mctc-lib (version 0.3.0)
- add toml-f (version 0.2.3)
- update dftd4 (version 3.4.0, use mctc-lib as actual dependency)
- update json-fortran (version 8.*, make static library PIC)
2022-06-14 15:05:01 +02:00
Jim Galarowicz
c7628d768a survey: add v1.0.5 (#31053) 2022-06-14 14:56:51 +02:00
haralmha
e1ad926189 vectorclass-version2: move files to include folder (#31105) 2022-06-14 14:54:16 +02:00
dlkuehn
8705735c74 gemma: add new package. (#31078)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-06-14 12:53:14 +00:00
Hadrien G
d82fa045d5 acts: add v19.2 (#31108) 2022-06-14 12:45:03 +00:00
Richard Berger
c72d51cb3a legion: add HIP support (#31080) 2022-06-14 13:49:33 +02:00
Qian Jianhua
d76f184430 hybrid-lambda: fix build tests (#30214) 2022-06-14 13:46:23 +02:00
Seth R. Johnson
19ea24d2bd hdf5: add conflict for broken @1.8.22+fortran+mpi (#31111) 2022-06-14 13:42:48 +02:00
Bernhard Kaindl
83efea32f4 openssh: enable authentication via Kerberos through GSSAPI (#31086)
Add variant +gssapi to enable authentication via Kerberos through GSSAPI

When openssh is installed at sites using Kerberos, openssh needs to auth
via Kerberos through GSSAPI in order to work in such environments.
2022-06-14 13:41:32 +02:00
Mark Olesen
bc577f2dee openfoam: update v2112 to latest patch (#31113)
Co-authored-by: Mark Olesen <Mark.Olesen@esi-group.com>
2022-06-13 21:21:42 -06:00
Jean Luca Bez
04529fbe80 Update HDF5 VOL async (#31011)
* Update h5bench maintainers and versions

* Include version 1.1 for h5bench

* Correct release hash and set default version

* Update .tar.gz version

* Update HDF5 VOL async version and environment variable syntax
2022-06-13 21:58:16 -05:00
Wouter Deconinck
cdfbe2c25d root: new version 6.26.04 (#31116)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-13 17:45:37 -07:00
Manuela Kuhn
8305742d75 exempi: add 2.6.1 and fix boost dependency (#31120) 2022-06-13 15:20:31 -07:00
Greg Sjaardema
e0137b1566 SEACAS: Clean up, add new versions (#31119) 2022-06-13 16:22:43 -04:00
iarspider
be95699a55 Add checksum for pacparser 1.4.0 (#31110) 2022-06-13 14:17:33 -06:00
Massimiliano Culpo
7d96a0aa5a Pin setuptools version in Github Action Workflows (#31118)
fixes #31109
2022-06-13 21:09:16 +02:00
Qian Jianhua
874b713edf netpbm: run custom test command (#31072)
* netpbm: run custom test command

* fix styles

* change method name
2022-06-13 11:26:54 -07:00
iarspider
3c0a98c5ab sloccount: add build-time dependency on flex (#31106) 2022-06-13 09:39:44 -07:00
Elsa Gonsiorowski, PhD
998bf90b35 SCR release v3.0, including components (#29924) 2022-06-13 18:17:17 +02:00
liuyangzhuan
2ca32fbc8c Remove filter operation for superlu-dist to avoid permission issues on read-only systems (#30970)
* added package gptune with all its dependencies: adding py-autotune, pygmo, py-pyaml, py-autotune, py-gpy, py-lhsmdu, py-hpbandster, pagmo2, py-opentuner; modifying superlu-dist, py-scikit-optimize

* adding gptune package

* minor fix for macos spack test

* update patch for py-scikit-optimize; update test files for gptune

* fixing gptune package style error

* fixing unit tests

* a few changes reviewed in the PR

* improved gptune package.py with a few newly added/improved dependencies

* fixed a few style errors

* minor fix on package name py-pyro4

* fixing more style errors

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

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

* resolved a few issues in the PR

* fixing file permissions

* a few minor changes

* style correction

* minor correction to jq package file

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

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

* fixing a few issues in the PR

* adding py-selectors34 required by py-pyro4

* improved the superlu-dist package

* improved the superlu-dist package

* moree changes to gptune and py-selectors34 based on the PR

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

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

* improved gptune package: 1. addressing comments of tldahlgren in PR 26936; 2. adding variant openmpi

* fixing style issue of gptune

* changing file mode

* improved gptune package: add variant mpispawn which depends on openmpi; add variant superlu and hypre for installing the drivers; modified hypre package file to add a gptune variant

* fixing style error

* corrected pddrive_spawn path in gptune test; enforcing gcc>7

* fixing style error

* setting environment variables when loading gptune

* removing debug print in hypre/package.py

* adding superlu-dist v7.2.0; fixing an issue with CMAKE_INSTALL_LIBDIR

* changing site_packages_dir to python_platlib

* not using python3.9 for py-gpy, which causes due to dropped support of tp_print

* more replacement of site_packages_dir

* fixing a few dependencies in gptune; added a gptune version

* adding url for gptune

* minor correction of gptune

* updating versions in butterflypack

* added a version for openturns

* added a url for openturns

* minor fix for openturns

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

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

* added version2.1.1 for butterflypack

* fixing a tag in butterflypack

* minor fix for superlu-dist

* removed file filter for superlu-dist

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

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

* superlu-dist: add version detection for the testing; removing unused lines

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-13 08:48:55 -07:00
Jordan Galby
e50d08ce48 Fix spack style arbitrary git rev as base (#31019)
Allow `spack style -b @` or `spack style -b origin/develop` to work as
expected.

Regression since spack 0.17 #25085
2022-06-13 15:22:35 +00:00
Sergey Kosukhin
696d81513d nvhpc: conflict with all compilers except for gcc (#31073) 2022-06-13 16:47:28 +02:00
Mark Grondona
b38afa7528 Add flux-core v0.39.0 and v0.40.0 and flux-sched v0.23.0 (#31061) 2022-06-13 16:15:25 +02:00
Mikael Simberg
0f2786c9d3 Fix tracy-client package (#31076) 2022-06-13 16:11:00 +02:00
Carson Woods
f72c2ab583 Fix download URL for pcre package (#31077) 2022-06-13 16:05:25 +02:00
Adam J. Stewart
f6e6403fd1 Fix packages that will break with PIL 10 (#31071) 2022-06-13 16:04:13 +02:00
Simon Pintarelli
5550271ead atompaw: add v4.2.0.1 (#31087)
apply ifort patch including v4.2.0.0, but not for 4.2.0.1 anymore
2022-06-13 15:15:59 +02:00
Jack Morrison
a1b19345b1 opa-psm2: add v11.2.228 (#31089) 2022-06-13 14:58:25 +02:00
Erik Schnetter
e2aeb06c91 adios2: add v2.8.1 (#31090) 2022-06-13 14:55:09 +02:00
Brice Videau
14ae0e0d94 py-py-spy: fix dependency on libunwind (#31013)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-13 14:16:26 +02:00
Seth R. Johnson
516587a1da py-breathe: new version 4.33.1 and fix dependencies (#31098)
* py-breathe: new version 4.33.1 and fix dependencies

* remove unused dependencies
2022-06-12 18:06:39 -05:00
Paul R. C. Kent
dc36fd87bb Addllvmv1405 (#31099) 2022-06-12 11:24:31 -07:00
marcosmazz
06b5141d01 Limit Jasper version for WPS (#31088)
* Limit Jasper version for WPS

Jasper@3: changed API and does not support interfaces used by WPS.
This prevented ungrib.exe build and failed silently.
2022-06-12 19:02:07 +02:00
Seth R. Johnson
27610838dd py-sphinxcontrib-bibtex: new version 2.4.2 (#31097) 2022-06-12 09:24:46 -07:00
Danny McClanahan
0c7fd9bd8c fix doubly shell quoting args to spack spec (#29282)
* add test to verify fix works
* fix spec cflags/variants parsing test (breaking change)
* fix `spack spec` arg quoting issue
* add error report for deprecated cflags coalescing
* use .group(n) vs subscript regex group extraction for 3.5 compat
* add random test for untested functionality to pass codecov
* fix new test failure since rebase
2022-06-11 12:35:46 -07:00
Todd Gamblin
bf2b30a5f5 bugfix: preserve dict order for Spec.dag_hash() in Python 2 (#31092)
Fix a bug introduced in #21720. `spack_json.dump()` calls `_strify()` on dictionaries to
convert `unicode` to `str`, but it constructs `dict` objects instead of
`collections.OrderedDict` objects, so in Python 2 (or earlier versions of 3) it can
scramble dictionary order.

This can cause hashes to differ between Python 2 and Python 3, or between Python 3.7
and earlier Python 3's.

- [x] use `OrderedDict` in `_strify`
- [x] add a regression test
2022-06-10 20:32:35 -07:00
Asher Mancinelli
f42680b785 ripgrep: remove need for llvm (#31062) 2022-06-10 11:45:53 -07:00
Sergey Kosukhin
a2afd5b82f clingo: fix string formatting in error messages (#31084) 2022-06-10 16:24:27 +00:00
Cyrus Harrison
11f1b371f7 babelflow: fix conditional constraint in "when" decorator (#31057) 2022-06-10 18:07:22 +02:00
Valentin Churavy
cfc46504ac enzyme: new version 0.0.32 (#31081)
Add LLDEnzyme to libs list
2022-06-10 11:48:35 +02:00
dependabot[bot]
163251aa65 build(deps): bump actions/setup-python from 3.1.2 to 4 (#31059)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3.1.2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](98f2ad02fd...d09bd5e600)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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>
2022-06-10 11:03:36 +02:00
eugeneswalker
6ab9f3a290 exago@1.4.1: : needs py-pytest (#31060) 2022-06-09 16:55:04 -07:00
Gregory Lee
45043bcdf5 py-xdot requires explicit dependency on harfbuzz (#30968) 2022-06-09 13:53:32 -06:00
Adam J. Stewart
7642fa3d99 py-kornia: add v0.6.5 (#31067) 2022-06-09 12:13:51 -07:00
Adam J. Stewart
1689f7fcbe py-pillow: add v9.1.1 (#31068) 2022-06-09 12:12:02 -07:00
Adam J. Stewart
4f67afeb5f py-pytorch-lightning: add v1.6.4 (#31069) 2022-06-09 12:09:05 -07:00
Adam J. Stewart
9d8ecffed0 py-timm: add v0.5.4 (#31070) 2022-06-09 12:06:58 -07:00
Cyrus Harrison
1ada7ea809 add fix for implicit includes with newer vers of gcc (#31056) 2022-06-09 09:40:08 -07:00
Martin Lang
4a8db00691 nfft, pnfft: fix detection of fftw variants (precision) (#30935)
* nfft, pnfft: fix detection of fftw variants (precision)

* nfft, pnfft: use fftw's selected_precisions; avoid repetitive calls to spec

Co-authored-by: Martin Lang <martin.lang@mpsd.mpg.de>
2022-06-09 08:47:12 -07:00
Tim Fuller
01f8236bf5 Allow more fine-grained control over what submodules are updated (#27293)
The "submodules" argument of the "version" directive can now accept
a callable that returns a list of submodules, in addition to the usual
Boolean values
2022-06-09 07:45:49 +02:00
Adam J. Stewart
57822d3014 clingo: fix ~python build (#30824) 2022-06-09 07:33:56 +02:00
Massimiliano Culpo
3fdb3f832a Cancel running workflows automatically on PR update (#31044)
* Cancel running workflows automatically on PR update
* Add the last update later to check cancellation is working
* Use github.run_number instead of github.sha
2022-06-08 15:46:46 -07:00
Asher Mancinelli
bedad508a9 lua-mpack: build with -fPIC always (#31054) 2022-06-08 21:37:55 +00:00
Adam J. Stewart
31f6dedecd py-memray: add new package (#31033)
* py-memray: add new package

* Link to Python

* Add missing non-Python deps
2022-06-08 13:52:38 -07:00
Adam J. Stewart
dc0c4959db cuDNN: add v8.4.0.27-11.6 (#31034) 2022-06-08 13:48:12 -07:00
Mark W. Krentel
8550b6cf49 hpctoolkit: adjust dependencies for develop (#31050)
The develop branch now uses libiberty, but not binutils or libdwarf.
2022-06-08 13:42:32 -07:00
Jen Herting
0e5c4c9cbf Draft: Pending #29806 [py-sentry-sdk] added version 1.5.5 (#29143)
* [py-sentry-sdk] audited dependencies and relisted extras as variants

* [py-sentry-sdk] added version 1.5.5

* [py-sentry-sdk] flake8

* [py-sentry-sdk]

- added "descriptions" to variants
- removed conflicts
  - replaced with when statements in varients
2022-06-08 20:41:44 +00:00
Jen Herting
9bac72e818 New package: py-colossialai (#30807)
* colossalai is dependency for deepoffense

* [py-colossalai] added homepage

* [py-colossalai] added dependencies and removed older versions

* [py-colossalai] updated pypi url to match listed version

* [py-colossalai] spack -> spack.package

Co-authored-by: Sid Pendelberry <sid@rit.edu>
2022-06-08 20:34:34 +00:00
Brice Videau
a65a217c54 py-ytopt: add v0.0.4 (#31029) 2022-06-08 19:43:20 +00:00
Ryan Marcellino
26e6aae8d4 new package: py-pytest-asyncio (#31040) 2022-06-08 11:31:31 -07:00
Manuela Kuhn
d6fabd1533 py-glmsingle: add new package (#31043) 2022-06-08 10:03:18 -07:00
Massimiliano Culpo
d245c46487 bootstrap: account for disabled sources (#31042)
* bootstrap: account for disabled sources

Fix a bug introduced in #30192, which effectively skips
any prescription on disabled bootstrapping sources.

* Add unit test to avoid regression
2022-06-08 07:17:37 -06:00
Adam J. Stewart
3eba28e383 OpenCV: add v4.6.0 (#31022) 2022-06-08 14:31:55 +02:00
Adam J. Stewart
0d91cb58dc py-pympler: add v1.0.1 (#31031) 2022-06-08 14:27:56 +02:00
Adam J. Stewart
5f55abeecb Python: add v3.10.5 (#31039) 2022-06-08 14:22:51 +02:00
psakievich
c3c2416672 Nalu-Wind: allow for lowest order infinity version (#31036)
This will allow us to pin trilinos in our repo
2022-06-08 14:22:10 +02:00
Adam J. Stewart
9e2bc41e45 libtiff: add v4.4.0 (#31008) 2022-06-07 15:49:56 -06:00
Axel Huebl
8f80c5e6f7 openPMD-api: 0.14.5 (#31023)
Add the latest release.
2022-06-07 14:32:43 -07:00
Erik Schnetter
a5e1367882 meson: add version 0.62.2 (#31005) 2022-06-07 15:13:40 -06:00
Peter Scheibel
c724e26ba9 Staging: determine extensions from nonstandard URLs (#31027)
Fixes #31021

With #25185, we no longer default to using tar when we can't
determine the extension type, opting to fail instead.

This broke fetching for the pcre package, where we couldn't determine
the extension. To determine the extension, we were attempting to
extract it from the destination filename; however, this file name
may omit details of the origin URL that are required to determine the
extension, so instead we examine the URL directly.

This also updates the decompressor_for method not to set ext=None
by default: it must now always be set by the caller.
2022-06-07 14:12:08 -07:00
Glenn Johnson
1b9a1992fb Update Spack Bioconductor packages to Bioconductor 3.15 (#30984) 2022-06-07 20:10:01 +02:00
Graeme A Stewart
815764bdef Update prmon recipe, v3.0.2 (#30979)
* Update prmon recipe, v3.0.2

Update recipe to v3.0.2, using external dependency
option for the build (as these are satisfied so easily with Spack)

* Remove "broken" 3.0.1 version

This one could not build properly with Spack, due to
missing submodule sources
2022-06-07 17:17:25 +00:00
Bitllion
adf073b53c Add New Package:PSCMC (#30944)
* add some new version of abacus and fix bug on mkl

* Add Package:PSCMC

* update maintainer

* rebase

* update maintainers

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

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-07 10:11:14 -07:00
Axel Huebl
449e885d4c WarpX: 22.06 (#31012)
* WarpX: 22.06

Update `warpx` & `py-warpx` to the latest release, `22.06`.

* Patch: Fix 1D CUDA Builds
2022-06-07 09:49:35 -06:00
Brice Videau
560472ce3a Fix py-deap py-setuptools dependency (#31014) 2022-06-07 08:57:44 -06:00
Brice Videau
0c66446437 Add py-ytopt-autotune version v1.0.0 (#31015) 2022-06-07 08:49:44 -06:00
Massimiliano Culpo
6b4b1dacd9 docs: update the list of Docker images with Spack preinstalled (#31003)
Also, update the image in the docs and use ghcr.io
2022-06-07 16:43:04 +02:00
Gregory Lee
3e90134e14 json-glib depends on gobject-introspection (#30963) 2022-06-07 08:29:38 -06:00
Asher Mancinelli
4ad0594c7b fd: add new package (#31010) 2022-06-07 08:21:59 -06:00
kwryankrattiger
f13b760f10 Visit: Allow building without rendering (#31006)
This is important for HPC systems.
2022-06-07 08:21:36 -06:00
Carlos Bederián
0f6fb1a706 gmsh: +petsc requires ~int64 variant (#30969) 2022-06-07 16:21:07 +02:00
Jordan Galby
e74d85a524 Fix empty install prefix post-install sanity check (#30983) 2022-06-07 16:17:33 +02:00
Glenn Johnson
ffd63c5de1 R ecosystem: cran updates (#31004) 2022-06-07 16:12:51 +02:00
Axel Huebl
ed263615d7 AMReX: update the CMake requirements for v22.06+ (#31018) 2022-06-07 16:01:13 +02:00
Morten Kristensen
b4e775a11a py-vermin: add latest version 1.4.0 (#31009) 2022-06-07 06:09:39 -06:00
Mosè Giordano
6a2844fdee libint: add Python as build dependency (#30870)
Installation process of libint runs a Python script:
<69cc7b9bc6/export/cmake/CMakeLists.txt.export (L410)>.
If Python isn't explicitly listed as build dependency, system Python will be
picked up, which can cause troubles.
2022-06-07 06:01:53 -06:00
Manuela Kuhn
44d670a8ce git-annex: fix source urls (#30789) 2022-06-07 05:45:40 -06:00
Massimiliano Culpo
4a0ac87d07 archspec: bump to v0.1.4 (#30856)
Fixes compiler flags for oneapi and dpcpp
2022-06-07 08:51:34 +00:00
Michael Kuhn
2c6898c717 glib: add v2.72.2 (#31001) 2022-06-07 02:45:51 -06:00
Brice Videau
0a8083c604 Fix py-ray dependencies and build system (#31016)
* Fix py-ray dependencies and build system

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

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

* Added documentation for unusual dependencies.

* Fixed npm preinstall script per @adamjstewart suggestion.

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-07 01:36:24 +00:00
John W. Parent
5b45df5269 Update decompression support on Windows (#25185)
Most package installations include compressed source files. This
adds support for common archive types on Windows:

* Add support for using system 7zip functionality to decompress .Z
  files when available (and on Windows, use 7zip for .xz archives)
* Default to using built-in Python support for tar/bz2 decompression
  (note that Python tar documentation mentions preservation of file
  permissions)
* Add tests for decompression support
* Extract logic for handling exploding archives (i.e. compressed
  archives that expand to more than one base file) into an
  exploding_archive_catch context manager in the filesystem module
2022-06-06 18:14:43 -07:00
Chuck Atkins
9d7cc43673 Package: Don't warn for missing source on bundle packages without code (#30913) 2022-06-06 15:33:03 -07:00
miheer vaidya
932065beca Update package rtags (#30890)
* Update backage bear

Newer versions of rtags aren't available via older url

* Fix sha256 as download link has changed

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-06 15:30:35 -07:00
Massimiliano Culpo
360192cbfe atompow: remove again misplaced duplicate package (#30992)
Regression re-introduced in #30404
2022-06-06 14:59:22 -07:00
Jen Herting
7bc349c041 New package: py-numpy-quaternion (#29452)
* first build of numpy-quaternion and spherical-functions

* [py-numpy-quaternion] removed python restriction

* [py-numpy-quaternion] added scipy and numba variants

* [py-numpy-quaternion] fixing unicode

Co-authored-by: Sid Pendelberry <sid@rit.edu>
2022-06-06 14:42:33 -07:00
Jen Herting
603ec40ab1 [py-httpx] added version 0.22.0 (#29806)
* [py-httpx] python dependencies are type=('build', 'run')

* [py-httpx] py-wheel is now implied by PythonPackage

* [py-httpx] fixed older version dependencies

* [py-httpx] added version 0.22.0
2022-06-06 14:34:11 -07:00
renjithravindrankannath
ed6695b9c9 Correcting library path of hsakmt-roct for Centos7 and cleaning up the patch file. (#30885)
* Correcting library path of hsakmt-roct and cleaning up the patch file.

* Delete 007-library-path.patch
2022-06-06 13:50:41 -07:00
Adam J. Stewart
fb173f80b2 py-torchmetrics: add v0.9.0 (#31000) 2022-06-06 16:28:11 +02:00
Ye Luo
15d4262b9b quantum-espresso: no need of patch and hdf5 is optional for pw2qmcpack (#30884) 2022-06-06 15:47:10 +02:00
Daniel Arndt
7116fb1b70 Kokkos SYCL AOT flags (#30723)
* Kokkos SYCL AOT flags

* Improve selecting the Intel GPU arch
2022-06-06 15:41:13 +02:00
Adam J. Stewart
9b713fa6a6 py-black: new version/variants/maintainer (#30999) 2022-06-06 07:09:39 -06:00
Adam J. Stewart
8d4a5cb247 GCC: add Apple M1 support (#30825)
Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2022-06-06 14:46:43 +02:00
Filippo Spiga
bf2d44c87e nvhpc: add v22.5 (#30845) 2022-06-06 14:44:39 +02:00
Brian Van Essen
926e311f3c dihydrogen: propagate cuda_arch to nvshmem (#30886) 2022-06-06 14:38:58 +02:00
Simon Pintarelli
8ef937032c quantum-espresso: support libxc also for autotools build (#30895) 2022-06-06 14:26:07 +02:00
Erik
73ce789390 amrvis: add configuration file and default color palette (#30942) 2022-06-06 14:01:57 +02:00
Jianshen Liu
e4f3cfcc3a cppcheck: add v2.8 (#30993) 2022-06-06 13:42:42 +02:00
Erik Schnetter
7ac05485c6 cmake: New version 3.23.2 (#30994) 2022-06-05 14:01:18 +02:00
John W. Parent
13b0e73a4e Sanitize filepath from URL (#30625)
Spack's staging logic constructs a file path based on a URL. The URL
may contain characters which are not allowed in valid file paths on
the system (e.g. Windows prohibits ':' and '?' among others). This
commit adds a function to remove such offending characters (but
otherwise preserves the URL string when constructing a file path).
2022-06-04 15:06:43 -07:00
Tom Scogland
03c54aebdd luajit: use GC64 on darwin (#30971) 2022-06-04 14:44:45 +02:00
G-Ragghianti
f4a4b3fa87 Intel oneAPI DPCPP compatibility toolkit: add new package (#30986) 2022-06-04 14:31:41 +02:00
Adam J. Stewart
6b3607287a py-botorch: add new package (#30989) 2022-06-04 14:29:33 +02:00
Carlos Bederián
b4b2585d67 protobuf: patch build error when @3.20 %gcc@12.1.0 (#30973) 2022-06-03 21:32:13 +02:00
Satish Balay
29855ae31e petsc, py-petsc4py: add 3.17.2 (#30982) 2022-06-03 09:39:52 -07:00
Michael Kuhn
44b9efa132 rocksdb: add 7.2.2 (#30977) 2022-06-03 08:56:28 -07:00
Michael Kuhn
f21e26b904 doxygen: add 1.9.4 (#30975) 2022-06-03 08:54:34 -07:00
Jacob Merson
73865c38f9 Include new versions of model-traits package (#30972) 2022-06-03 08:51:43 -07:00
Martin Diehl
38ccefbe84 mpicxx does not work with icpx (#30098) 2022-06-03 08:40:02 -07:00
Adam J. Stewart
1bd33d88bd py-protobuf: pin dependents to @:3 (#30880) 2022-06-03 00:32:02 -04:00
Seth R. Johnson
67ad23cc11 geant4: enable building against spack-built geant outside of spack (#30936) 2022-06-02 21:09:41 -06:00
Adam J. Stewart
8640b50258 Rust: Apple M1 support (#30823) 2022-06-02 20:57:40 -04:00
Adam J. Stewart
043cc688ef py-torch: fix Apple M1 support (#30833) 2022-06-02 20:51:18 -04:00
Adam J. Stewart
e52527029a OpenJDK: fix Apple M1 support (#30826) 2022-06-02 20:48:55 -04:00
Alex Hedges
a7d2f76ac5 git: add v2.36.1 (#30966) 2022-06-02 13:21:37 -07:00
Derek Ryan Strong
fbb134b1af Add lftp 4.9.2 (#30967) 2022-06-02 19:34:46 +00:00
Bitllion
548e9ae88c Abacus (#30933)
* add pacakge: abacus

* rename

* fix some style bugs

* update package:abacus

* fix some style bugs

* format code

* Delete a line of useless comments

* updatee abacus

* Update package.py

add new version info and fix a bug on mkl

* update version info and fix a bug on mkl

* Update package.py

* fix style bugs

* trailing whitespace
2022-06-02 12:09:53 -07:00
Adam J. Stewart
5728ba0122 Use stable URLs for patch-diff GitHub patches (#30953) 2022-06-02 12:52:05 -04:00
Adam J. Stewart
2bda10edb5 Fix typo in GitHub Actions step name (#30924) 2022-06-02 16:33:39 +00:00
miheer vaidya
bd15ca4f16 Update bear to v3.0.0 (#30835) 2022-06-02 09:31:10 -07:00
Jakub Krajniak
f9dfd5fcb8 Add flag to enable WRF-Chem module (#30950)
* Add flag to enable WRF-Chem module

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

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

* Set chem variant only for v4+

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-02 09:11:45 -07:00
Glenn Johnson
f3c4e1adbb texlive: add 20220321 distribution (#30955) 2022-06-02 09:05:24 -07:00
Seth R. Johnson
b2d3ed9096 pmix: add explicit hwloc dependency (#30897)
pmix@:2 uses hwloc if it's available (e.g. in homebrew) which can break
the installation.
2022-06-02 14:47:53 +02:00
Mikael Simberg
dac5fec255 Add pika 0.5.0 (#30960) 2022-06-02 13:56:05 +02:00
Axel Huebl
9784b8f926 Prepare: openPMD-api 0.15.0-dev (#29484)
Anticipate openPMD-api changes in the next major release that are
already in `dev` (aka Spack `develop`):
- C++17 requirement
- drop: `mpark-variant` public dependency
- add: `toml11` private dependency

Also add @franzpoeschel as co-maintainer for the Spack package.
2022-06-01 19:13:33 -06:00
Axel Huebl
adef8f6ca7 WarpX: Patch no-MPI & Lib Install (#30866)
Fixes WarpX issues:
- https://github.com/ECP-WarpX/WarpX/pull/3134
- https://github.com/ECP-WarpX/WarpX/pull/3141

and uses GitHub patch URLs directly instead of storing
patch copies.
2022-06-01 18:49:25 -06:00
Larry Knox
c36f15e29e hdf5: new version version 1.10.9 (#30903) 2022-06-01 16:37:37 -06:00
Carlos Bederián
03531ed904 openmpi: add 4.1.4 (#30947) 2022-06-01 16:21:38 -06:00
Carlos Bederián
54332b2d83 python: add 3.9.13 (#30948) 2022-06-01 15:37:31 -06:00
Xavier Delaruelle
165f42b7ce environment-modules: add version 5.1.1 (#30946) 2022-06-01 12:17:48 -06:00
Sreenivasa Murthy Kolam
1190d03b0f Bump up the version for ROCm-5.1.3 release (#30819)
* Bump up the version for ROCm-5.1.3 release

* remove extra comma from hashes for device-libs of rocm-openmp-extras
2022-06-01 10:57:10 -07:00
kwryankrattiger
5faa927fe6 Ascent: Patch find conduit python (#30949)
Some systems have trouble when using the python on the login node so
this should provide an option to build that doesn't require running
python.
2022-06-01 10:36:33 -07:00
Adam J. Stewart
c60d220f81 py-jupyterlab: add v3.4.2 (#30867) 2022-06-01 10:18:47 -07:00
Hartmut Kaiser
61d3d60414 Update HPX recipe for HPX V1.8.0 (#30896) 2022-06-01 11:06:03 -06:00
rashawnLK
174258c09a Updated intel-gtpin package.py for most recent version, GTPin 3.0. (#30877)
* Updated intel-gtpin package.py for  most recent version, GTPin 3.0.

* Fixed style issues in package.py -- removed trailing whitespace on two
lines.
2022-06-01 11:05:41 -06:00
Erik
73c6a8f73d Version updates for SUNDIALS and CUDA (#30874) 2022-06-01 11:01:32 -06:00
Olivier Cessenat
86dc904080 ngspice: adding version 37 (#30925) 2022-06-01 10:50:02 -06:00
Weiqun Zhang
9e1c87409d amrex: add v22.06 (#30951) 2022-06-01 10:49:46 -06:00
Sergey Kosukhin
2b30dc2e30 nag: add new version (#30927)
* nag: add new version

* nag: update maintainers
2022-06-01 10:49:32 -06:00
Ben Darwin
b1ce756d69 minc-toolkit: add version 1.9.18.2 (#30926) 2022-06-01 10:45:34 -06:00
Ida Mjelde
1194ac6985 Adding a libunwind variant to libzmq (#30932)
* Adding a libunwind variant to libzmq

* Remove whitespace line 46
2022-06-01 10:29:56 -06:00
Asher Mancinelli
954f961208 tmux: support building from master and utf8 opts (#30928)
* tmux: support building from master and utf8 opts

* Fix style errors
2022-06-01 10:29:35 -06:00
Zack Galbreath
47ac710796 CPU & memory requests for jobs that generate GitLab CI pipelines (#30940)
gitlab ci: make sure pipeline generation isn't resource starved
2022-06-01 09:43:23 -06:00
Derek Ryan Strong
d7fb5a6db4 rclone: add 1.58 (#30887)
* Add rclone 1.58

* Update rclone git repo path
2022-05-31 19:35:12 -07:00
Maciej Wójcik
e0624b9278 gromacs: Add recent releases (#30892)
* gromacs: Add recent releases

* gromacs: Update branch name

* gromacs: Update links
2022-05-31 19:27:23 -07:00
Olivier Cessenat
e86614f7b8 gmsh: adding version 4.10.3 (#30923) 2022-05-31 18:53:03 -07:00
Garth N. Wells
d166b948ce fenics-dolfinx: dependency updates (#30919)
* Add pugixml dependency

* Dependency updates

* Fix Spack Numpy verion

* Test more generous NumPy constraint

* Fix NumPy requirment
2022-05-31 18:49:49 -07:00
lorddavidiii
9cc3a2942d cfitsio: add 4.1.0 (#30920) 2022-05-31 18:46:07 -07:00
Marie Houillon
5d685f9ff6 New version for openCARP packages (#30931)
Co-authored-by: openCARP consortium <info@opencarp.org>
2022-05-31 18:21:55 -07:00
Paul Kuberry
9ddf45964d xyce: add sha for version 7.5.0 (#30941) 2022-05-31 17:59:13 -07:00
iarspider
b88cc77f16 xpmem package: add patches for building on FC 35 with kernel 5.16.18-200 (#29945) 2022-05-31 15:55:51 -07:00
Robert Cohn
f3af38ba9b Fix module support for oneapi compilers (#28901)
Updates to improve Spack-generated modules for Intel oneAPI compilers:

* intel-oneapi-compilers set CC etc.
* Add a new package intel-oneapi-compilers-classic which can be used to
  generate a module which sets CC etc. to older compilers (e.g. icc)
* lmod module logic now updated to treat the intel-oneapi-compilers*
  packages as compilers
2022-05-31 15:02:25 -07:00
Wouter Deconinck
adc9f887ea acts-dd4hep: new package; acts: new version (#30850)
* acts-dd4hep: new package, separated from new acts@19.1.0

* acts-dd4hep: improved versioning

* acts-dd4hep: don't use curl | sha256sum

* acts: new variant `odd` for Open Data Detector

* acts-dd4hep: style changes
2022-05-31 11:30:36 -07:00
Wouter Deconinck
9461f482d9 assimp: new version 5.2.4 (#30929) 2022-05-31 12:25:24 -06:00
Paul Kuberry
e014b889c6 xyce: remove python packages as +pymi dependencies and hdf5 from trilinos dependency (#30938) 2022-05-31 14:04:57 -04:00
snehring
181ac574bb sentieon-genomics: adding version 202112.04 (#30876) 2022-05-31 10:05:27 -06:00
Adam J. Stewart
055c9d125d CUDA: make cuda_arch sticky (#30910) 2022-05-30 12:53:15 -07:00
Evan Bollig
a94438b1f5 Added AWS-AHUG alinux2 pipeline (#24601)
Add spack stacks targeted at Spack + AWS + ARM HPC User Group hackathon.  Includes
a list of miniapps and full-apps that are ready to run on both x86_64 and aarch64.

Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2022-05-30 10:26:39 -06:00
Joseph Wang
f583e471b8 pass CC variable to make (#30912)
Set CC to cc
2022-05-30 08:44:31 +02:00
Brian Van Essen
f67f3b1796 Add new versions of protobuf and py-protobuf (#30503)
* Add new versions

* Updated the hashes to match the published pypi.org hashes.  Added version constraints for Python.
2022-05-30 01:23:26 -05:00
Jean Luca Bez
77c86c759c HDF5 VOL-ASYNC update versions (#30900) 2022-05-29 17:49:52 -04:00
Adam J. Stewart
8084259bd3 protobuf: fix spack versions (#30879) 2022-05-28 14:53:24 -06:00
Evan Bollig
98860c6a5f Alinux isc buildcache (#30462)
Add two new stacks targeted at x86_64 and arm, representing an initial list of packages 
used by current and planned AWS Workshops, and built in conjunction with the ISC22
announcement of the spack public binary cache.

Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2022-05-28 11:32:53 -06:00
Todd Gamblin
e6929b9ff9 0.18.0.dev0 -> 0.19.0.dev0 (#30907) 2022-05-28 17:23:01 +00:00
Tom Scogland
18c2f1a57a refactor: packages import spack.package explicitly (#30404)
Explicitly import package utilities in all packages, and corresponding fallout.

This includes:

* rename `spack.package` to `spack.package_base`
* rename `spack.pkgkit` to `spack.package`
* update all packages in builtin, builtin_mock and tutorials to include `from spack.package import *`
* update spack style
  * ensure packages include the import
  * automatically add the new import and remove any/all imports of `spack` and `spack.pkgkit`
    from packages when using `--fix`
  * add support for type-checking packages with mypy when SPACK_MYPY_CHECK_PACKAGES
    is set in the environment
* fix all type checking errors in packages in spack upstream
* update spack create to include the new imports
* update spack repo to inject the new import, injection persists to allow for a deprecation period

Original message below:
 
As requested @adamjstewart, update all packages to use pkgkit.  I ended up using isort to do this,
so repro is easy:

```console
$ isort -a 'from spack.pkgkit import *' --rm 'spack' ./var/spack/repos/builtin/packages/*/package.py
$ spack style --fix
```

There were several line spacing fixups caused either by space manipulation in isort or by packages
that haven't been touched since we added requirements, but there are no functional changes in here.

* [x] add config to isort to make sure this is maintained going forward
2022-05-28 12:55:44 -04:00
Todd Gamblin
3054cd0eff update changelog for v0.18.0 (#30905) 2022-05-28 17:33:20 +02:00
JDBetteridge
9016b79270 Additional BLAS/LAPACK library configuration for Numpy (#30817)
* Add amdblis and amdlibflame as BLAS/LAPACK options

* Add Cray-libsci as BLAS/LAPACK option

* Use Netlib config for Cray-libsci
2022-05-28 03:33:31 -06:00
Erik Schnetter
9f5c6fb398 hpx: New version 1.8.0 (#30848) 2022-05-28 09:40:20 +02:00
Greg Becker
19087c9d35 target optimization: re-norm optimization scale so that 0 is best. (#29926)
referred targets are currently the only minimization criteria for Spack for which we allow
negative values. That means Spack may be incentivized to add nodes to the DAG if they
match the preferred target.

This PR re-norms the minimization criteria so that preferred targets are weighted from 0,
and default target weights are offset by the number of preferred targets per-package to
calculate node_target_weight.

Also fixes a bug in the test for preferred targets that was making the test easier to pass
than it should be.
2022-05-27 22:49:41 -07:00
Greg Becker
4116b04368 update tutorial command for v0.18.0 and new gpg key (#30904) 2022-05-28 02:36:20 +00:00
JDBetteridge
1485931695 Ensure same BLAS/LAPACK config from Numpy used in Scipy (#30818)
* Call Numpy package's set_blas_lapack() and setup_build_environment() in Scipy package

* Remove broken link from comment

* Use .package attribute of spec to avoid import
2022-05-27 10:46:21 -07:00
Derek Ryan Strong
78cac4d840 Add R 4.2.0 (#30859) 2022-05-27 08:24:28 -05:00
Michael Kuhn
2f628c3a97 gcc: add 9.5.0 (#30893) 2022-05-27 12:18:57 +02:00
Adam J. Stewart
a3a8710cbe Python: fix clingo bootstrapping on Apple M1 (#30834)
This PR fixes several issues I noticed while trying to get Spack working on Apple M1.

- [x] `build_environment.py` attempts to add `spec['foo'].libs` and `spec['foo'].headers` to our compiler wrappers for all dependencies using a try-except that ignores `NoLibrariesError` and `NoHeadersError` respectively. However, The `libs` and `headers` attributes of the Python package were erroneously using `RuntimeError` instead.
- [x] `spack external find python` (used during bootstrapping) currently has no way to determine whether or not an installation is `+shared`, so previously we would only search for static Python libs. However, most distributions including XCode/Conda/Intel ship shared Python libs. I updated `libs` to search for both shared and static (order based on variant) as a fallback.
- [x] The `headers` attribute was recursively searching in `prefix.include` for `pyconfig.h`, but this could lead to non-deterministic behavior if multiple versions of Python are installed and `pyconfig.h` files exist in multiple `<prefix>/include/pythonX.Y` locations. It's safer to search in `sysconfig.get_path('include')` instead.
- [x] The Python installation that comes with XCode is broken, and `sysconfig.get_paths` is hard-coded to return specific directories. This meant that our logic for `platlib`/`purelib`/`include` where we replace `platbase`/`base`/`installed_base` with `prefix` wasn't working and the `mkdirp` in `setup_dependent_package` was trying to create a directory in root, giving permissions issues. Even if you commented out those `mkdirp` calls, Spack would add the wrong directories to `PYTHONPATH`. Added a fallback hard-coded to `lib/pythonX.Y/site-packages` if sysconfig is broken (this is what distutils always did).
2022-05-27 03:18:20 -07:00
Paul R. C. Kent
0bf3a9c2af llvm: 14.0.3 and 14.0.4 (#30888) 2022-05-27 09:51:54 +02:00
Severin Strobl
cff955f7bd otf2/scorep: add versions 3.0/7.1 (#28631) 2022-05-27 00:43:58 +02:00
Scott Wittenburg
3d43ebec72 Revert "strip -Werror: all specific or none (#30284)" (#30878)
This reverts commit 330832c22c.
2022-05-26 14:17:01 -07:00
Robert Pavel
6fd07479e3 Updated mfem constraints in laghos spackage (#30851)
Updated mfme constraints in laghos spackage to better match comments and
support legacy builds of `laghos@1.0:2.0`
2022-05-26 10:20:42 -07:00
Simon Pintarelli
03bc36f8b0 q-e-sirius: remove ~apps constraint (#30857) 2022-05-26 10:18:37 -07:00
Brian Van Essen
93e1b283b7 Added hash for new versions (#30860) 2022-05-26 10:15:59 -07:00
Derek Ryan Strong
df2c0fbfbd Add new versions of GNU parallel (#30862) 2022-05-26 10:09:43 -07:00
Derek Ryan Strong
54a69587c3 Add newer nano versions (#30865) 2022-05-26 10:04:50 -07:00
Hans Johansen
294312f02b Adding new package bricks for x86, cuda (#30863)
* Adding new package bricks for x86, cuda

* Fixed complaints from "spack style" that CI found

* add license comment at top

Co-authored-by: drhansj <drhansj@berkeley.edu>
Co-authored-by: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com>
2022-05-26 07:40:11 -07:00
Massimiliano Culpo
0636fdbfef Remove the warning that Spack prints at each spec (#30872)
Add instead a warning box in the documentation
2022-05-26 14:35:20 +00:00
Scott Wittenburg
85e13260cf ci: Support secure binary signing on protected pipelines (#30753)
This PR supports the creation of securely signed binaries built from spack
develop as well as release branches and tags. Specifically:

- remove internal pr mirror url generation logic in favor of buildcache destination
on command line
    - with a single mirror url specified in the spack.yaml, this makes it clearer where 
    binaries from various pipelines are pushed
- designate some tags as reserved: ['public', 'protected', 'notary']
    - these tags are stripped from all jobs by default and provisioned internally
    based on pipeline type
- update gitlab ci yaml to include pipelines on more protected branches than just
develop (so include releases and tags)
    - binaries from all protected pipelines are pushed into mirrors including the
    branch name so releases, tags, and develop binaries are kept separate
- update rebuild jobs running on protected pipelines to run on special runners
provisioned with an intermediate signing key
    - protected rebuild jobs no longer use "SPACK_SIGNING_KEY" env var to
    obtain signing key (in fact, final signing key is nowhere available to rebuild jobs)
    - these intermediate signatures are verified at the end of each pipeline by a new
    signing job to ensure binaries were produced by a protected pipeline
- optionallly schedule a signing/notary job at the end of the pipeline to sign all
packges in the mirror
    - add signing-job-attributes to gitlab-ci section of spack environment to allow
    configuration
    - signing job runs on special runner (separate from protected rebuild runners)
    provisioned with public intermediate key and secret signing key
2022-05-26 08:31:22 -06:00
Adam J. Stewart
b5a519fa51 py-tensorboard: add v2.9.0 (#30832) 2022-05-26 07:43:40 -04:00
Adam J. Stewart
2e2d0b3211 libtiff: remove extra dependencies/patch (#30854) 2022-05-25 23:37:45 -06:00
6872 changed files with 17391 additions and 11855 deletions

View File

@@ -12,6 +12,7 @@ on:
# built-in repository or documentation
- 'var/spack/repos/builtin/**'
- '!var/spack/repos/builtin/packages/clingo-bootstrap/**'
- '!var/spack/repos/builtin/packages/clingo/**'
- '!var/spack/repos/builtin/packages/python/**'
- '!var/spack/repos/builtin/packages/re2c/**'
- 'lib/spack/docs/**'
@@ -19,6 +20,10 @@ on:
# nightly at 2:16 AM
- cron: '16 2 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
jobs:
fedora-clingo-sources:
@@ -175,10 +180,11 @@ jobs:
tree ~/.spack/bootstrap/store/
macos-clingo-binaries:
runs-on: macos-latest
runs-on: ${{ matrix.macos-version }}
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
macos-version: ['macos-10.15', 'macos-11', 'macos-12']
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
@@ -186,7 +192,7 @@ jobs:
brew install tree
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: ${{ matrix.python-version }}
- name: Bootstrap clingo
@@ -205,7 +211,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: ${{ matrix.python-version }}
- name: Setup repo

View File

@@ -19,6 +19,10 @@ on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
jobs:
deploy-images:
runs-on: ubuntu-latest

View File

@@ -16,6 +16,10 @@ on:
- '.github/workflows/macos_python.yml'
# TODO: run if we touch any of the recipes involved in this
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
# GitHub Action Limits
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -26,7 +30,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: 3.9
- name: spack install
@@ -42,7 +46,7 @@ jobs:
timeout-minutes: 700
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: 3.9
- name: spack install
@@ -56,7 +60,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: 3.9
- name: spack install

View File

@@ -9,6 +9,11 @@ on:
branches:
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
jobs:
# Validate that the code can be run on all the Python versions
# supported by Spack
@@ -16,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: '3.10'
- name: Install Python Packages
@@ -34,12 +39,12 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: '3.10'
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools==62.3.4 types-six
pip install --upgrade pip six setuptools types-six
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
@@ -109,7 +114,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -174,7 +179,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: '3.10'
- name: Install System packages
@@ -240,7 +245,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: '3.10'
- name: Install System packages
@@ -289,7 +294,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -332,7 +337,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb # @v2
with:
python-version: '3.10'
- name: Install Python packages
@@ -345,7 +350,7 @@ jobs:
coverage run $(which spack) audit packages
coverage combine
coverage xml
- name: Package audits (wwithout coverage)
- name: Package audits (without coverage)
if: ${{ needs.changes.outputs.with_coverage == 'false' }}
run: |
. share/spack/setup-env.sh

View File

@@ -9,6 +9,11 @@ on:
branches:
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
defaults:
run:
shell:
@@ -18,7 +23,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: 3.9
- name: Install Python Packages
@@ -36,12 +41,12 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six setuptools==62.3.4 flake8 isort>=4.3.5 mypy>=0.800 black pywin32 types-python-dateutil
python -m pip install --upgrade pip six setuptools flake8 isort>=4.3.5 mypy>=0.800 black pywin32 types-python-dateutil
- name: Create local develop
run: |
.\spack\.github\workflows\setup_git.ps1
@@ -58,7 +63,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: 3.9
- name: Install Python packages
@@ -78,7 +83,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: 3.9
- name: Install Python packages
@@ -98,7 +103,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: 3.9
- name: Install Python packages
@@ -123,7 +128,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: 3.9
- name: Install Python packages
@@ -154,7 +159,7 @@ jobs:
run:
shell: pwsh
steps:
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@d09bd5e6005b175076f227b13d9730d56e9dcfcb
with:
python-version: 3.9
- name: Install Python packages

View File

@@ -1,21 +1,3 @@
# v0.18.1 (2022-07-19)
### Spack Bugfixes
* Fix several bugs related to bootstrapping (#30834,#31042,#31180)
* Fix a regression that was causing spec hashes to differ between
Python 2 and Python 3 (#31092)
* Fixed compiler flags for oneAPI and DPC++ (#30856)
* Fixed several issues related to concretization (#31142,#31153,#31170,#31226)
* Improved support for Cray manifest file and `spack external find` (#31144,#31201,#31173.#31186)
* Assign a version to openSUSE Tumbleweed according to the GLIBC version
in the system (#19895)
* Improved Dockerfile generation for `spack containerize` (#29741,#31321)
* Fixed a few bugs related to concurrent execution of commands (#31509,#31493,#31477)
### Package updates
* WarpX: add v22.06, fixed libs property (#30866,#31102)
* openPMD: add v0.14.5, update recipe for @develop (#29484,#31023)
# v0.18.0 (2022-05-28)
`v0.18.0` is a major feature release.

View File

@@ -84,8 +84,8 @@ build ``hdf5`` with Intel oneAPI MPI do::
spack install hdf5 +mpi ^intel-oneapi-mpi
Using an Externally Installed oneAPI
====================================
Using Externally Installed oneAPI Tools
=======================================
Spack can also use oneAPI tools that are manually installed with
`Intel Installers`_. The procedures for configuring Spack to use
@@ -110,7 +110,7 @@ Another option is to manually add the configuration to
Libraries
---------
If you want Spack to use MKL that you have installed without Spack in
If you want Spack to use oneMKL that you have installed without Spack in
the default location, then add the following to
``~/.spack/packages.yaml``, adjusting the version as appropriate::
@@ -139,7 +139,7 @@ You can also use Spack-installed libraries. For example::
spack load intel-oneapi-mkl
Will update your environment CPATH, LIBRARY_PATH, and other
environment variables for building an application with MKL.
environment variables for building an application with oneMKL.
More information
================

View File

@@ -15,6 +15,9 @@ IntelPackage
Intel packages in Spack
^^^^^^^^^^^^^^^^^^^^^^^^
This is an earlier version of Intel software development tools and has
now been replaced by Intel oneAPI Toolkits.
Spack can install and use several software development products offered by Intel.
Some of these are available under no-cost terms, others require a paid license.
All share the same basic steps for configuration, installation, and, where

View File

@@ -109,9 +109,10 @@ Spack Images on Docker Hub
--------------------------
Docker images with Spack preinstalled and ready to be used are
built on `Docker Hub <https://hub.docker.com/u/spack>`_
at every push to ``develop`` or to a release branch. The OS that
are currently supported are summarized in the table below:
built when a release is tagged, or nightly on ``develop``. The images
are then pushed both to `Docker Hub <https://hub.docker.com/u/spack>`_
and to `GitHub Container Registry <https://github.com/orgs/spack/packages?repo_name=spack>`_.
The OS that are currently supported are summarized in the table below:
.. _containers-supported-os:
@@ -121,22 +122,31 @@ are currently supported are summarized in the table below:
* - Operating System
- Base Image
- Spack Image
* - Ubuntu 16.04
- ``ubuntu:16.04``
- ``spack/ubuntu-xenial``
* - Ubuntu 18.04
- ``ubuntu:18.04``
- ``spack/ubuntu-bionic``
* - Ubuntu 20.04
- ``ubuntu:20.04``
- ``spack/ubuntu-focal``
* - Ubuntu 22.04
- ``ubuntu:22.04``
- ``spack/ubuntu-jammy``
* - CentOS 7
- ``centos:7``
- ``spack/centos7``
* - CentOS Stream
- ``quay.io/centos/centos:stream``
- ``spack/centos-stream``
* - openSUSE Leap
- ``opensuse/leap``
- ``spack/leap15``
* - Amazon Linux 2
- ``amazonlinux:2``
- ``spack/amazon-linux``
All the images are tagged with the corresponding release of Spack:
.. image:: dockerhub_spack.png
.. image:: images/ghcr_spack.png
with the exception of the ``latest`` tag that points to the HEAD
of the ``develop`` branch. These images are available for anyone

View File

@@ -151,7 +151,7 @@ Package-related modules
^^^^^^^^^^^^^^^^^^^^^^^
:mod:`spack.package`
Contains the :class:`~spack.package.Package` class, which
Contains the :class:`~spack.package_base.Package` class, which
is the superclass for all packages in Spack. Methods on ``Package``
implement all phases of the :ref:`package lifecycle
<package-lifecycle>` and manage the build process.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -1070,13 +1070,32 @@ Commits
Submodules
You can supply ``submodules=True`` to cause Spack to fetch submodules
recursively along with the repository at fetch time. For more information
about git submodules see the manpage of git: ``man git-submodule``.
recursively along with the repository at fetch time.
.. code-block:: python
version('1.0.1', tag='v1.0.1', submodules=True)
If a package has needs more fine-grained control over submodules, define
``submodules`` to be a callable function that takes the package instance as
its only argument. The function should return a list of submodules to be fetched.
.. code-block:: python
def submodules(package):
submodules = []
if "+variant-1" in package.spec:
submodules.append("submodule_for_variant_1")
if "+variant-2" in package.spec:
submodules.append("submodule_for_variant_2")
return submodules
class MyPackage(Package):
version("0.1.0", submodules=submodules)
For more information about git submodules see the manpage of git: ``man
git-submodule``.
.. _github-fetch:
@@ -2393,9 +2412,9 @@ Influence how dependents are built or run
Spack provides a mechanism for dependencies to influence the
environment of their dependents by overriding the
:meth:`setup_dependent_run_environment <spack.package.PackageBase.setup_dependent_run_environment>`
:meth:`setup_dependent_run_environment <spack.package_base.PackageBase.setup_dependent_run_environment>`
or the
:meth:`setup_dependent_build_environment <spack.package.PackageBase.setup_dependent_build_environment>`
:meth:`setup_dependent_build_environment <spack.package_base.PackageBase.setup_dependent_build_environment>`
methods.
The Qt package, for instance, uses this call:
@@ -2417,7 +2436,7 @@ will have the ``PYTHONPATH``, ``PYTHONHOME`` and ``PATH`` environment
variables set appropriately before starting the installation. To make things
even simpler the ``python setup.py`` command is also inserted into the module
scope of dependents by overriding a third method called
:meth:`setup_dependent_package <spack.package.PackageBase.setup_dependent_package>`
:meth:`setup_dependent_package <spack.package_base.PackageBase.setup_dependent_package>`
:
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/python/package.py
@@ -2775,6 +2794,256 @@ Suppose a user invokes ``spack install`` like this:
Spack will fail with a constraint violation, because the version of
MPICH requested is too low for the ``mpi`` requirement in ``foo``.
.. _custom-attributes:
------------------
Custom attributes
------------------
Often a package will need to provide attributes for dependents to query
various details about what it provides. While any number of custom defined
attributes can be implemented by a package, the four specific attributes
described below are always available on every package with default
implementations and the ability to customize with alternate implementations
in the case of virtual packages provided:
=========== =========================================== =====================
Attribute Purpose Default
=========== =========================================== =====================
``home`` The installation path for the package ``spec.prefix``
``command`` An executable command for the package | ``spec.name`` found
in
| ``.home.bin``
``headers`` A list of headers provided by the package | All headers
searched
| recursively in
``.home.include``
``libs`` A list of libraries provided by the package | ``lib{spec.name}``
searched
| recursively in
``.home`` starting
| with ``lib``,
``lib64``, then the
| rest of ``.home``
=========== =========================================== =====================
Each of these can be customized by implementing the relevant attribute
as a ``@property`` in the package's class:
.. code-block:: python
:linenos:
class Foo(Package):
...
@property
def libs(self):
# The library provided by Foo is libMyFoo.so
return find_libraries('libMyFoo', root=self.home, recursive=True)
A package may also provide a custom implementation of each attribute
for the virtual packages it provides by implementing the
``virtualpackagename_attributename`` property in the package's class.
The implementation used is the first one found from:
#. Specialized virtual: ``Package.virtualpackagename_attributename``
#. Generic package: ``Package.attributename``
#. Default
The use of customized attributes is demonstrated in the next example.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Example: Customized attributes for virtual packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Consider a package ``foo`` that can optionally provide two virtual
packages ``bar`` and ``baz``. When both are enabled the installation tree
appears as follows:
.. code-block:: console
include/foo.h
include/bar/bar.h
lib64/libFoo.so
lib64/libFooBar.so
baz/include/baz/baz.h
baz/lib/libFooBaz.so
The install tree shows that ``foo`` is providing the header ``include/foo.h``
and library ``lib64/libFoo.so`` in it's install prefix. The virtual
package ``bar`` is providing ``include/bar/bar.h`` and library
``lib64/libFooBar.so``, also in ``foo``'s install prefix. The ``baz``
package, however, is provided in the ``baz`` subdirectory of ``foo``'s
prefix with the ``include/baz/baz.h`` header and ``lib/libFooBaz.so``
library. Such a package could implement the optional attributes as
follows:
.. code-block:: python
:linenos:
class Foo(Package):
...
variant('bar', default=False, description='Enable the Foo implementation of bar')
variant('baz', default=False, description='Enable the Foo implementation of baz')
...
provides('bar', when='+bar')
provides('baz', when='+baz')
....
# Just the foo headers
@property
def headers(self):
return find_headers('foo', root=self.home.include, recursive=False)
# Just the foo libraries
@property
def libs(self):
return find_libraries('libFoo', root=self.home, recursive=True)
# The header provided by the bar virutal package
@property
def bar_headers(self):
return find_headers('bar/bar.h', root=self.home.include, recursive=False)
# The libary provided by the bar virtual package
@property
def bar_libs(self):
return find_libraries('libFooBar', root=sef.home, recursive=True)
# The baz virtual package home
@property
def baz_home(self):
return self.prefix.baz
# The header provided by the baz virtual package
@property
def baz_headers(self):
return find_headers('baz/baz', root=self.baz_home.include, recursive=False)
# The library provided by the baz virtual package
@property
def baz_libs(self):
return find_libraries('libFooBaz', root=self.baz_home, recursive=True)
Now consider another package, ``foo-app``, depending on all three:
.. code-block:: python
:linenos:
class FooApp(CMakePackage):
...
depends_on('foo')
depends_on('bar')
depends_on('baz')
The resulting spec objects for it's dependencies shows the result of
the above attribute implementations:
.. code-block:: python
# The core headers and libraries of the foo package
>>> spec['foo']
foo@1.0%gcc@11.3.1+bar+baz arch=linux-fedora35-haswell
>>> spec['foo'].prefix
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# home defaults to the package install prefix without an explicit implementation
>>> spec['foo'].home
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# foo headers from the foo prefix
>>> spec['foo'].headers
HeaderList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include/foo.h',
])
# foo include directories from the foo prefix
>>> spec['foo'].headers.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include']
# foo libraries from the foo prefix
>>> spec['foo'].libs
LibraryList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64/libFoo.so',
])
# foo library directories from the foo prefix
>>> spec['foo'].libs.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64']
.. code-block:: python
# The virtual bar package in the same prefix as foo
# bar resolves to the foo package
>>> spec['bar']
foo@1.0%gcc@11.3.1+bar+baz arch=linux-fedora35-haswell
>>> spec['bar'].prefix
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# home defaults to the foo prefix without either a Foo.bar_home
# or Foo.home implementation
>>> spec['bar'].home
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# bar header in the foo prefix
>>> spec['bar'].headers
HeaderList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include/bar/bar.h'
])
# bar include dirs from the foo prefix
>>> spec['bar'].headers.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include']
# bar library from the foo prefix
>>> spec['bar'].libs
LibraryList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64/libFooBar.so'
])
# bar library directories from the foo prefix
>>> spec['bar'].libs.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64']
.. code-block:: python
# The virtual baz package in a subdirectory of foo's prefix
# baz resolves to the foo package
>>> spec['baz']
foo@1.0%gcc@11.3.1+bar+baz arch=linux-fedora35-haswell
>>> spec['baz'].prefix
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# baz_home implementation provides the subdirectory inside the foo prefix
>>> spec['baz'].home
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz'
# baz headers in the baz subdirectory of the foo prefix
>>> spec['baz'].headers
HeaderList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/include/baz/baz.h'
])
# baz include directories in the baz subdirectory of the foo prefix
>>> spec['baz'].headers.directories
[
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/include'
]
# baz libraries in the baz subdirectory of the foo prefix
>>> spec['baz'].libs
LibraryList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/lib/libFooBaz.so'
])
# baz library directories in the baz subdirectory of the foo porefix
>>> spec['baz'].libs.directories
[
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/lib'
]
.. _abstract-and-concrete:
-------------------------
@@ -3022,7 +3291,7 @@ The classes that are currently provided by Spack are:
+----------------------------------------------------------+----------------------------------+
| **Base Class** | **Purpose** |
+==========================================================+==================================+
| :class:`~spack.package.Package` | General base class not |
| :class:`~spack.package_base.Package` | General base class not |
| | specialized for any build system |
+----------------------------------------------------------+----------------------------------+
| :class:`~spack.build_systems.makefile.MakefilePackage` | Specialized class for packages |
@@ -3153,7 +3422,7 @@ for the install phase is:
For those not used to Python instance methods, this is the
package itself. In this case it's an instance of ``Foo``, which
extends ``Package``. For API docs on Package objects, see
:py:class:`Package <spack.package.Package>`.
:py:class:`Package <spack.package_base.Package>`.
``spec``
This is the concrete spec object created by Spack from an
@@ -5476,6 +5745,24 @@ Version Lists
Spack packages should list supported versions with the newest first.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Using ``home`` vs ``prefix``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``home`` and ``prefix`` are both attributes that can be queried on a
package's dependencies, often when passing configure arguments pointing to the
location of a dependency. The difference is that while ``prefix`` is the
location on disk where a concrete package resides, ``home`` is the `logical`
location that a package resides, which may be different than ``prefix`` in
the case of virtual packages or other special circumstances. For most use
cases inside a package, it's dependency locations can be accessed via either
``self.spec['foo'].home`` or ``self.spec['foo'].prefix``. Specific packages
that should be consumed by dependents via ``.home`` instead of ``.prefix``
should be noted in their respective documentation.
See :ref:`custom-attributes` for more details and an example implementing
a custom ``home`` attribute.
---------------------------
Packaging workflow commands
---------------------------

View File

@@ -7,7 +7,7 @@ bash, , , Compiler wrappers
tar, , , Extract/create archives
gzip, , , Compress/Decompress archives
unzip, , , Compress/Decompress archives
bzip, , , Compress/Decompress archives
bzip2, , , Compress/Decompress archives
xz, , , Compress/Decompress archives
zstd, , Optional, Compress/Decompress archives
file, , , Create/Use Buildcaches
@@ -15,4 +15,4 @@ gnupg2, , , Sign/Verify Buildcaches
git, , , Manage Software Repositories
svn, , Optional, Manage Software Repositories
hg, , Optional, Manage Software Repositories
Python header files, , Optional (e.g. ``python3-dev`` on Debian), Bootstrapping from sources
Python header files, , Optional (e.g. ``python3-dev`` on Debian), Bootstrapping from sources
1 Name Supported Versions Notes Requirement Reason
7 tar Extract/create archives
8 gzip Compress/Decompress archives
9 unzip Compress/Decompress archives
10 bzip bzip2 Compress/Decompress archives
11 xz Compress/Decompress archives
12 zstd Optional Compress/Decompress archives
13 file Create/Use Buildcaches
15 git Manage Software Repositories
16 svn Optional Manage Software Repositories
17 hg Optional Manage Software Repositories
18 Python header files Optional (e.g. ``python3-dev`` on Debian) Bootstrapping from sources

View File

@@ -308,6 +308,68 @@ def change_sed_delimiter(old_delim, new_delim, *filenames):
filter_file(double_quoted, '"%s"' % repl, f)
@contextmanager
def exploding_archive_catch(stage):
# Check for an exploding tarball, i.e. one that doesn't expand to
# a single directory. If the tarball *didn't* explode, move its
# contents to the staging source directory & remove the container
# directory. If the tarball did explode, just rename the tarball
# directory to the staging source directory.
#
# NOTE: The tar program on Mac OS X will encode HFS metadata in
# hidden files, which can end up *alongside* a single top-level
# directory. We initially ignore presence of hidden files to
# accomodate these "semi-exploding" tarballs but ensure the files
# are copied to the source directory.
# Expand all tarballs in their own directory to contain
# exploding tarballs.
tarball_container = os.path.join(stage.path,
"spack-expanded-archive")
mkdirp(tarball_container)
orig_dir = os.getcwd()
os.chdir(tarball_container)
try:
yield
# catch an exploding archive on sucessful extraction
os.chdir(orig_dir)
exploding_archive_handler(tarball_container, stage)
except Exception as e:
# return current directory context to previous on failure
os.chdir(orig_dir)
raise e
@system_path_filter
def exploding_archive_handler(tarball_container, stage):
"""
Args:
tarball_container: where the archive was expanded to
stage: Stage object referencing filesystem location
where archive is being expanded
"""
files = os.listdir(tarball_container)
non_hidden = [f for f in files if not f.startswith('.')]
if len(non_hidden) == 1:
src = os.path.join(tarball_container, non_hidden[0])
if os.path.isdir(src):
stage.srcdir = non_hidden[0]
shutil.move(src, stage.source_path)
if len(files) > 1:
files.remove(non_hidden[0])
for f in files:
src = os.path.join(tarball_container, f)
dest = os.path.join(stage.path, f)
shutil.move(src, dest)
os.rmdir(tarball_container)
else:
# This is a non-directory entry (e.g., a patch file) so simply
# rename the tarball container to be the source path.
shutil.move(tarball_container, stage.source_path)
else:
shutil.move(tarball_container, stage.source_path)
@system_path_filter(arg_slice=slice(1))
def get_owner_uid(path, err_msg=None):
if not os.path.exists(path):

View File

@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#: (major, minor, micro, dev release) tuple
spack_version_info = (0, 18, 1)
spack_version_info = (0, 19, 0, 'dev0')
#: PEP440 canonical <major>.<minor>.<micro>.<devN> string
spack_version = '.'.join(str(s) for s in spack_version_info)

View File

@@ -12,7 +12,7 @@
import spack.error
import spack.hooks
import spack.monitor
import spack.package
import spack.package_base
import spack.repo
import spack.util.executable

View File

@@ -80,32 +80,41 @@ def _try_import_from_store(module, query_spec, query_info=None):
for candidate_spec in installed_specs:
pkg = candidate_spec['python'].package
module_paths = {
module_paths = [
os.path.join(candidate_spec.prefix, pkg.purelib),
os.path.join(candidate_spec.prefix, pkg.platlib),
}
sys.path.extend(module_paths)
] # type: list[str]
path_before = list(sys.path)
# NOTE: try module_paths first and last, last allows an existing version in path
# to be picked up and used, possibly depending on something in the store, first
# allows the bootstrap version to work when an incompatible version is in
# sys.path
orders = [
module_paths + sys.path,
sys.path + module_paths,
]
for path in orders:
sys.path = path
try:
_fix_ext_suffix(candidate_spec)
if _python_import(module):
msg = ('[BOOTSTRAP MODULE {0}] The installed spec "{1}/{2}" '
'provides the "{0}" Python module').format(
module, query_spec, candidate_spec.dag_hash()
)
tty.debug(msg)
if query_info is not None:
query_info['spec'] = candidate_spec
return True
except Exception as e:
msg = ('unexpected error while trying to import module '
'"{0}" from spec "{1}" [error="{2}"]')
tty.warn(msg.format(module, candidate_spec, str(e)))
else:
msg = "Spec {0} did not provide module {1}"
tty.warn(msg.format(candidate_spec, module))
try:
_fix_ext_suffix(candidate_spec)
if _python_import(module):
msg = ('[BOOTSTRAP MODULE {0}] The installed spec "{1}/{2}" '
'provides the "{0}" Python module').format(
module, query_spec, candidate_spec.dag_hash()
)
tty.debug(msg)
if query_info is not None:
query_info['spec'] = candidate_spec
return True
except Exception as e:
msg = ('unexpected error while trying to import module '
'"{0}" from spec "{1}" [error="{2}"]')
tty.warn(msg.format(module, candidate_spec, str(e)))
else:
msg = "Spec {0} did not provide module {1}"
tty.warn(msg.format(candidate_spec, module))
sys.path = sys.path[:-3]
sys.path = path_before
return False

View File

@@ -55,7 +55,7 @@
import spack.config
import spack.install_test
import spack.main
import spack.package
import spack.package_base
import spack.paths
import spack.platforms
import spack.repo
@@ -722,7 +722,7 @@ def get_std_cmake_args(pkg):
package were a CMakePackage instance.
Args:
pkg (spack.package.PackageBase): package under consideration
pkg (spack.package_base.PackageBase): package under consideration
Returns:
list: arguments for cmake
@@ -738,7 +738,7 @@ def get_std_meson_args(pkg):
package were a MesonPackage instance.
Args:
pkg (spack.package.PackageBase): package under consideration
pkg (spack.package_base.PackageBase): package under consideration
Returns:
list: arguments for meson
@@ -748,12 +748,12 @@ def get_std_meson_args(pkg):
def parent_class_modules(cls):
"""
Get list of superclass modules that descend from spack.package.PackageBase
Get list of superclass modules that descend from spack.package_base.PackageBase
Includes cls.__module__
"""
if (not issubclass(cls, spack.package.PackageBase) or
issubclass(spack.package.PackageBase, cls)):
if (not issubclass(cls, spack.package_base.PackageBase) or
issubclass(spack.package_base.PackageBase, cls)):
return []
result = []
module = sys.modules.get(cls.__module__)
@@ -771,7 +771,7 @@ def load_external_modules(pkg):
associated with them.
Args:
pkg (spack.package.PackageBase): package to load deps for
pkg (spack.package_base.PackageBase): package to load deps for
"""
for dep in list(pkg.spec.traverse()):
external_modules = dep.external_modules or []
@@ -1109,7 +1109,7 @@ def start_build_process(pkg, function, kwargs):
Args:
pkg (spack.package.PackageBase): package whose environment we should set up the
pkg (spack.package_base.PackageBase): package whose environment we should set up the
child process for.
function (typing.Callable): argless function to run in the child
process.
@@ -1234,7 +1234,7 @@ def make_stack(tb, stack=None):
if 'self' in frame.f_locals:
# Find the first proper subclass of PackageBase.
obj = frame.f_locals['self']
if isinstance(obj, spack.package.PackageBase):
if isinstance(obj, spack.package_base.PackageBase):
break
# We found obj, the Package implementation we care about.

View File

@@ -9,7 +9,7 @@
from spack.build_systems.autotools import AutotoolsPackage
from spack.directives import extends
from spack.package import ExtensionError
from spack.package_base import ExtensionError
from spack.util.executable import which

View File

@@ -16,7 +16,7 @@
from spack.build_environment import InstallError
from spack.directives import conflicts, depends_on
from spack.operating_systems.mac_os import macos_version
from spack.package import PackageBase, run_after, run_before
from spack.package_base import PackageBase, run_after, run_before
from spack.util.executable import Executable
from spack.version import Version

View File

@@ -8,7 +8,7 @@
from llnl.util.filesystem import install, mkdirp
from spack.build_systems.cmake import CMakePackage
from spack.package import run_after
from spack.package_base import run_after
def cmake_cache_path(name, value, comment=""):

View File

@@ -18,7 +18,7 @@
import spack.build_environment
from spack.directives import conflicts, depends_on, variant
from spack.package import InstallError, PackageBase, run_after
from spack.package_base import InstallError, PackageBase, run_after
from spack.util.path import convert_to_posix_path
# Regex to extract the primary generator from the CMake generator

View File

@@ -6,7 +6,7 @@
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.multimethod import when
from spack.package import PackageBase
from spack.package_base import PackageBase
class CudaPackage(PackageBase):
@@ -37,6 +37,7 @@ class CudaPackage(PackageBase):
variant('cuda_arch',
description='CUDA architecture',
values=spack.variant.any_combination_of(*cuda_arch_values),
sticky=True,
when='+cuda')
# https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-examples

View File

@@ -3,14 +3,16 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.package
from typing import Optional
import spack.package_base
import spack.util.url
class GNUMirrorPackage(spack.package.PackageBase):
class GNUMirrorPackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for GNU packages."""
#: Path of the package in a GNU mirror
gnu_mirror_path = None
gnu_mirror_path = None # type: Optional[str]
#: List of GNU mirrors used by Spack
base_mirrors = [

View File

@@ -26,7 +26,7 @@
import spack.error
from spack.build_environment import dso_suffix
from spack.package import InstallError, PackageBase, run_after
from spack.package_base import InstallError, PackageBase, run_after
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable
from spack.util.prefix import Prefix
@@ -1115,7 +1115,7 @@ def _setup_dependent_env_callback(
raise InstallError('compilers_of_client arg required for MPI')
def setup_dependent_package(self, module, dep_spec):
# https://spack.readthedocs.io/en/latest/spack.html#spack.package.PackageBase.setup_dependent_package
# https://spack.readthedocs.io/en/latest/spack.html#spack.package_base.PackageBase.setup_dependent_package
# Reminder: "module" refers to Python module.
# Called before the install() method of dependents.
@@ -1259,6 +1259,14 @@ def install(self, spec, prefix):
for f in glob.glob('%s/intel*log' % tmpdir):
install(f, dst)
@run_after('install')
def validate_install(self):
# Sometimes the installer exits with an error but doesn't pass a
# non-zero exit code to spack. Check for the existence of a 'bin'
# directory to catch this error condition.
if not os.path.exists(self.prefix.bin):
raise InstallError('The installer has failed to install anything.')
@run_after('install')
def configure_rpath(self):
if '+rpath' not in self.spec:

View File

@@ -10,7 +10,7 @@
from spack.directives import depends_on, extends
from spack.multimethod import when
from spack.package import PackageBase
from spack.package_base import PackageBase
from spack.util.executable import Executable

View File

@@ -11,7 +11,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import conflicts
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class MakefilePackage(PackageBase):

View File

@@ -7,7 +7,7 @@
from llnl.util.filesystem import install_tree, working_dir
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
from spack.util.executable import which

View File

@@ -11,7 +11,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import depends_on, variant
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class MesonPackage(PackageBase):

View File

@@ -6,7 +6,7 @@
import inspect
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class OctavePackage(PackageBase):

View File

@@ -14,7 +14,7 @@
from llnl.util.filesystem import find_headers, find_libraries, join_path
from spack.package import Package
from spack.package_base import Package
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable

View File

@@ -10,7 +10,7 @@
from llnl.util.filesystem import filter_file
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
from spack.util.executable import Executable

View File

@@ -6,6 +6,7 @@
import os
import re
import shutil
from typing import Optional
import llnl.util.tty as tty
from llnl.util.filesystem import (
@@ -19,13 +20,13 @@
from llnl.util.lang import match_predicate
from spack.directives import depends_on, extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class PythonPackage(PackageBase):
"""Specialized class for packages that are built using pip."""
#: Package name, version, and extension on PyPI
pypi = None
pypi = None # type: Optional[str]
maintainers = ['adamjstewart']
@@ -46,7 +47,7 @@ class PythonPackage(PackageBase):
# package manually
depends_on('py-wheel', type='build')
py_namespace = None
py_namespace = None # type: Optional[str]
@staticmethod
def _std_args(cls):

View File

@@ -9,7 +9,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class QMakePackage(PackageBase):

View File

@@ -5,9 +5,10 @@
import inspect
from typing import Optional
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class RPackage(PackageBase):
@@ -28,10 +29,10 @@ class RPackage(PackageBase):
# package attributes that can be expanded to set the homepage, url,
# list_url, and git values
# For CRAN packages
cran = None
cran = None # type: Optional[str]
# For Bioconductor packages
bioc = None
bioc = None # type: Optional[str]
maintainers = ['glennpj']

View File

@@ -3,13 +3,14 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from typing import Optional
import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
from spack.build_environment import SPACK_NO_PARALLEL_MAKE, determine_number_of_jobs
from spack.directives import extends
from spack.package import PackageBase
from spack.package_base import PackageBase
from spack.util.environment import env_flag
from spack.util.executable import Executable, ProcessError
@@ -36,8 +37,8 @@ class RacketPackage(PackageBase):
extends('racket')
pkgs = False
subdirectory = None
name = None
subdirectory = None # type: Optional[str]
name = None # type: Optional[str]
parallel = True
@property

View File

@@ -77,7 +77,7 @@
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.package import PackageBase
from spack.package_base import PackageBase
class ROCmPackage(PackageBase):

View File

@@ -7,7 +7,7 @@
import inspect
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class RubyPackage(PackageBase):

View File

@@ -7,7 +7,7 @@
import inspect
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class SConsPackage(PackageBase):

View File

@@ -11,7 +11,7 @@
from llnl.util.filesystem import find, join_path, working_dir
from spack.directives import depends_on, extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class SIPPackage(PackageBase):

View File

@@ -3,15 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.package
from typing import Optional
import spack.package_base
import spack.util.url
class SourceforgePackage(spack.package.PackageBase):
class SourceforgePackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for Sourceforge
packages."""
#: Path of the package in a Sourceforge mirror
sourceforge_mirror_path = None
sourceforge_mirror_path = None # type: Optional[str]
#: List of Sourceforge mirrors used by Spack
base_mirrors = [

View File

@@ -2,16 +2,17 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from typing import Optional
import spack.package
import spack.package_base
import spack.util.url
class SourcewarePackage(spack.package.PackageBase):
class SourcewarePackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for Sourceware.org
packages."""
#: Path of the package in a Sourceware mirror
sourceware_mirror_path = None
sourceware_mirror_path = None # type: Optional[str]
#: List of Sourceware mirrors used by Spack
base_mirrors = [

View File

@@ -9,7 +9,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class WafPackage(PackageBase):

View File

@@ -3,15 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.package
from typing import Optional
import spack.package_base
import spack.util.url
class XorgPackage(spack.package.PackageBase):
class XorgPackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for x.org
packages."""
#: Path of the package in a x.org mirror
xorg_mirror_path = None
xorg_mirror_path = None # type: Optional[str]
#: List of x.org mirrors used by Spack
# Note: x.org mirrors are a bit tricky, since many are out-of-sync or off.

View File

@@ -14,7 +14,7 @@
import spack.repo
import spack.stage
import spack.util.crypto
from spack.package import preferred_version
from spack.package_base import preferred_version
from spack.util.naming import valid_fully_qualified_module_name
from spack.version import Version, ver

View File

@@ -57,7 +57,7 @@
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------
from spack import *
from spack.package import *
class {class_name}({base_class_name}):
@@ -826,7 +826,7 @@ def get_versions(args, name):
spack.util.url.require_url_format(args.url)
if args.url.startswith('file://'):
valid_url = False # No point in spidering these
except ValueError:
except (ValueError, TypeError):
valid_url = False
if args.url is not None and args.template != 'bundle' and valid_url:

View File

@@ -11,7 +11,7 @@
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.environment as ev
import spack.package
import spack.package_base
import spack.repo
import spack.store
@@ -57,7 +57,7 @@ def dependencies(parser, args):
else:
spec = specs[0]
dependencies = spack.package.possible_dependencies(
dependencies = spack.package_base.possible_dependencies(
spec,
transitive=args.transitive,
expand_virtuals=args.expand_virtuals,

View File

@@ -5,7 +5,6 @@
from __future__ import print_function
import argparse
import errno
import os
import sys
@@ -94,21 +93,6 @@ def external_find(args):
# It's fine to not find any manifest file if we are doing the
# search implicitly (i.e. as part of 'spack external find')
pass
except Exception as e:
# For most exceptions, just print a warning and continue.
# Note that KeyboardInterrupt does not subclass Exception
# (so CTRL-C will terminate the program as expected).
skip_msg = ("Skipping manifest and continuing with other external "
"checks")
if ((isinstance(e, IOError) or isinstance(e, OSError)) and
e.errno in [errno.EPERM, errno.EACCES]):
# The manifest file does not have sufficient permissions enabled:
# print a warning and keep going
tty.warn("Unable to read manifest due to insufficient "
"permissions.", skip_msg)
else:
tty.warn("Unable to read manifest, unexpected error: {0}"
.format(str(e)), skip_msg)
# If the user didn't specify anything, search for build tools by default
if not args.tags and not args.all and not args.packages:
@@ -220,7 +204,7 @@ def external_list(args):
list(spack.repo.path.all_packages())
# Print all the detectable packages
tty.msg("Detectable packages per repository")
for namespace, pkgs in sorted(spack.package.detectable_packages.items()):
for namespace, pkgs in sorted(spack.package_base.detectable_packages.items()):
print("Repository:", namespace)
colify.colify(pkgs, indent=4, output=sys.stdout)

View File

@@ -18,7 +18,7 @@
import spack.fetch_strategy as fs
import spack.repo
import spack.spec
from spack.package import has_test_method, preferred_version
from spack.package_base import has_test_method, preferred_version
description = 'get detailed information on a particular package'
section = 'basic'
@@ -269,14 +269,14 @@ def print_tests(pkg):
names = []
pkg_cls = pkg if inspect.isclass(pkg) else pkg.__class__
if has_test_method(pkg_cls):
pkg_base = spack.package.PackageBase
pkg_base = spack.package_base.PackageBase
test_pkgs = [str(cls.test) for cls in inspect.getmro(pkg_cls) if
issubclass(cls, pkg_base) and cls.test != pkg_base.test]
test_pkgs = list(set(test_pkgs))
names.extend([(test.split()[1]).lower() for test in test_pkgs])
# TODO Refactor START
# Use code from package.py's test_process IF this functionality is
# Use code from package_base.py's test_process IF this functionality is
# accepted.
v_names = list(set([vspec.name for vspec in pkg.virtuals_provided]))

View File

@@ -302,7 +302,7 @@ def install(parser, args, **kwargs):
)
reporter = spack.report.collect_info(
spack.package.PackageInstaller, '_install_task', args.log_format, args)
spack.package_base.PackageInstaller, '_install_task', args.log_format, args)
if args.log_file:
reporter.filename = args.log_file

View File

@@ -12,7 +12,7 @@
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.error
import spack.package
import spack.package_base
import spack.repo
import spack.store
from spack.database import InstallStatuses

View File

@@ -18,7 +18,7 @@
import spack.config
import spack.environment
import spack.hash_types as ht
import spack.package
import spack.package_base
import spack.solver.asp as asp
description = "concretize a specs using an ASP solver"

View File

@@ -65,7 +65,7 @@ def is_package(f):
packages, since we allow `from spack import *` and poking globals
into packages.
"""
return f.startswith("var/spack/repos/")
return f.startswith("var/spack/repos/") and f.endswith('package.py')
#: decorator for adding tools to the list
@@ -94,16 +94,16 @@ def changed_files(base="develop", untracked=True, all_files=False, root=None):
git = which("git", required=True)
# ensure base is in the repo
git("show-ref", "--verify", "--quiet", "refs/heads/%s" % base,
fail_on_error=False)
base_sha = git("rev-parse", "--quiet", "--verify", "--revs-only", base,
fail_on_error=False, output=str)
if git.returncode != 0:
tty.die(
"This repository does not have a '%s' branch." % base,
"This repository does not have a '%s' revision." % base,
"spack style needs this branch to determine which files changed.",
"Ensure that '%s' exists, or specify files to check explicitly." % base
)
range = "{0}...".format(base)
range = "{0}...".format(base_sha.strip())
git_args = [
# Add changed files committed since branching off of develop
@@ -236,7 +236,7 @@ def translate(match):
continue
if not args.root_relative and re_obj:
line = re_obj.sub(translate, line)
print(" " + line)
print(line)
def print_style_header(file_list, args):
@@ -290,20 +290,26 @@ def run_flake8(flake8_cmd, file_list, args):
@tool("mypy")
def run_mypy(mypy_cmd, file_list, args):
# always run with config from running spack prefix
mypy_args = [
common_mypy_args = [
"--config-file", os.path.join(spack.paths.prefix, "pyproject.toml"),
"--package", "spack",
"--package", "llnl",
"--show-error-codes",
]
# not yet, need other updates to enable this
# if any([is_package(f) for f in file_list]):
# mypy_args.extend(["--package", "packages"])
mypy_arg_sets = [common_mypy_args + [
"--package", "spack",
"--package", "llnl",
]]
if 'SPACK_MYPY_CHECK_PACKAGES' in os.environ:
mypy_arg_sets.append(common_mypy_args + [
'--package', 'packages',
'--disable-error-code', 'no-redef',
])
output = mypy_cmd(*mypy_args, fail_on_error=False, output=str)
returncode = mypy_cmd.returncode
returncode = 0
for mypy_args in mypy_arg_sets:
output = mypy_cmd(*mypy_args, fail_on_error=False, output=str)
returncode |= mypy_cmd.returncode
rewrite_and_print_output(output, args)
rewrite_and_print_output(output, args)
print_tool_result("mypy", returncode)
return returncode
@@ -318,16 +324,29 @@ def run_isort(isort_cmd, file_list, args):
pat = re.compile("ERROR: (.*) Imports are incorrectly sorted")
replacement = "ERROR: {0} Imports are incorrectly sorted"
returncode = 0
for chunk in grouper(file_list, 100):
packed_args = isort_args + tuple(chunk)
output = isort_cmd(*packed_args, fail_on_error=False, output=str, error=str)
returncode |= isort_cmd.returncode
returncode = [0]
rewrite_and_print_output(output, args, pat, replacement)
def process_files(file_list, is_args):
for chunk in grouper(file_list, 100):
packed_args = is_args + tuple(chunk)
output = isort_cmd(*packed_args, fail_on_error=False, output=str, error=str)
returncode[0] |= isort_cmd.returncode
print_tool_result("isort", returncode)
return returncode
rewrite_and_print_output(output, args, pat, replacement)
packages_isort_args = ('--rm', 'spack', '--rm', 'spack.pkgkit', '--rm',
'spack.package_defs', '-a', 'from spack.package import *')
packages_isort_args = packages_isort_args + isort_args
# packages
process_files(filter(is_package, file_list),
packages_isort_args)
# non-packages
process_files(filter(lambda f: not is_package(f), file_list),
isort_args)
print_tool_result("isort", returncode[0])
return returncode[0]
@tool("black")

View File

@@ -20,7 +20,7 @@
import spack.cmd.common.arguments as arguments
import spack.environment as ev
import spack.install_test
import spack.package
import spack.package_base
import spack.repo
import spack.report
@@ -189,7 +189,7 @@ def test_run(args):
# Set up reporter
setattr(args, 'package', [s.format() for s in test_suite.specs])
reporter = spack.report.collect_info(
spack.package.PackageBase, 'do_test', args.log_format, args)
spack.package_base.PackageBase, 'do_test', args.log_format, args)
if not reporter.filename:
if args.log_file:
if os.path.isabs(args.log_file):
@@ -217,7 +217,7 @@ def test_list(args):
else set()
def has_test_and_tags(pkg_class):
return spack.package.has_test_method(pkg_class) and \
return spack.package_base.has_test_method(pkg_class) and \
(not args.tag or pkg_class.name in tagged)
if args.list_all:

View File

@@ -15,7 +15,7 @@
import spack.cmd.common.arguments as arguments
import spack.environment as ev
import spack.error
import spack.package
import spack.package_base
import spack.repo
import spack.store
from spack.database import InstallStatuses
@@ -221,7 +221,7 @@ def do_uninstall(env, specs, force):
except spack.repo.UnknownEntityError:
# The package.py file has gone away -- but still
# want to uninstall.
spack.package.Package.uninstall_by_spec(item, force=True)
spack.package_base.Package.uninstall_by_spec(item, force=True)
# A package is ready to be uninstalled when nothing else references it,
# unless we are requested to force uninstall it.

View File

@@ -422,7 +422,7 @@ def url_list_parsing(args, urls, url, pkg):
urls (set): List of URLs that have already been added
url (str or None): A URL to potentially add to ``urls`` depending on
``args``
pkg (spack.package.PackageBase): The Spack package
pkg (spack.package_base.PackageBase): The Spack package
Returns:
set: The updated set of ``urls``
@@ -470,7 +470,7 @@ def name_parsed_correctly(pkg, name):
"""Determine if the name of a package was correctly parsed.
Args:
pkg (spack.package.PackageBase): The Spack package
pkg (spack.package_base.PackageBase): The Spack package
name (str): The name that was extracted from the URL
Returns:
@@ -487,7 +487,7 @@ def version_parsed_correctly(pkg, version):
"""Determine if the version of a package was correctly parsed.
Args:
pkg (spack.package.PackageBase): The Spack package
pkg (spack.package_base.PackageBase): The Spack package
version (str): The version that was extracted from the URL
Returns:

View File

@@ -252,13 +252,6 @@ def find_new_compilers(path_hints=None, scope=None):
merged configuration.
"""
compilers = find_compilers(path_hints)
return select_new_compilers(compilers, scope)
def select_new_compilers(compilers, scope=None):
"""Given a list of compilers, remove those that are already defined in
the configuration.
"""
compilers_not_in_config = []
for c in compilers:
arch_spec = spack.spec.ArchSpec((None, c.operating_system, c.target))

View File

@@ -171,12 +171,11 @@ def strip(self):
def paths(self):
"""Important paths in the image"""
Paths = collections.namedtuple('Paths', [
'environment', 'store', 'hidden_view', 'view'
'environment', 'store', 'view'
])
return Paths(
environment='/opt/spack-environment',
store='/opt/software',
hidden_view='/opt/._view',
view='/opt/view'
)

View File

@@ -39,6 +39,10 @@ def translated_compiler_name(manifest_compiler_name):
elif manifest_compiler_name in spack.compilers.supported_compilers():
return manifest_compiler_name
else:
# Try to fail quickly. This can occur in two cases: (1) the compiler
# definition (2) a spec can specify a compiler that doesn't exist; the
# first will be caught when creating compiler definition. The second
# will result in Specs with associated undefined compilers.
raise spack.compilers.UnknownCompilerError(
"Manifest parsing - unknown compiler: {0}"
.format(manifest_compiler_name))
@@ -182,8 +186,6 @@ def read(path, apply_updates):
tty.debug("{0}: {1} compilers read from manifest".format(
path,
str(len(compilers))))
# Filter out the compilers that already appear in the configuration
compilers = spack.compilers.select_new_compilers(compilers)
if apply_updates and compilers:
spack.compilers.add_compilers_to_config(
compilers, init_config=False)

View File

@@ -240,7 +240,7 @@ def compute_windows_program_path_for_package(pkg):
program files location, return list of best guesses
Args:
pkg (spack.package.Package): package for which
pkg (spack.package_base.Package): package for which
Program Files location is to be computed
"""
if not is_windows:

View File

@@ -21,6 +21,7 @@
from llnl.util.lang import dedupe
from llnl.util.symlink import symlink
import spack.binary_distribution
import spack.bootstrap
import spack.compilers
import spack.concretize
@@ -1282,6 +1283,10 @@ def _concretize_separately(self, tests=False):
# processes try to write the config file in parallel
_ = spack.compilers.get_compiler_config()
# Ensure that buildcache index is updated if reuse is on
if spack.config.get('config:reuse', False):
spack.binary_distribution.binary_index.update()
# Early return if there is nothing to do
if len(arguments) == 0:
return []
@@ -1612,10 +1617,9 @@ def install_specs(self, specs=None, **install_args):
# ensure specs already installed are marked explicit
all_specs = specs or [cs for _, cs in self.concretized_specs()]
specs_installed = [s for s in all_specs if s.installed]
if specs_installed:
with spack.store.db.write_transaction(): # do all in one transaction
for spec in specs_installed:
spack.store.db.update_explicit(spec, True)
with spack.store.db.write_transaction(): # do all in one transaction
for spec in specs_installed:
spack.store.db.update_explicit(spec, True)
if not specs_to_install:
tty.msg('All of the packages are already installed')

View File

@@ -35,6 +35,7 @@
import six.moves.urllib.parse as urllib_parse
import llnl.util
import llnl.util.filesystem as fs
import llnl.util.tty as tty
from llnl.util.filesystem import (
get_single_file,
@@ -119,6 +120,11 @@ def __init__(self, **kwargs):
# 'no_cache' option from version directive.
self.cache_enabled = not kwargs.pop('no_cache', False)
self.package = None
def set_package(self, package):
self.package = package
# Subclasses need to implement these methods
def fetch(self):
"""Fetch source code archive or repo.
@@ -242,6 +248,10 @@ def source_id(self):
if all(component_ids):
return component_ids
def set_package(self, package):
for item in self:
item.package = package
@fetcher
class URLFetchStrategy(FetchStrategy):
@@ -327,7 +337,9 @@ def fetch(self):
continue
try:
self._fetch_from_url(url)
partial_file, save_file = self._fetch_from_url(url)
if save_file and (partial_file is not None):
llnl.util.filesystem.rename(partial_file, save_file)
break
except FailedDownloadError as e:
errors.append(str(e))
@@ -377,7 +389,9 @@ def _check_headers(self, headers):
@_needs_stage
def _fetch_urllib(self, url):
save_file = self.stage.save_filename
save_file = None
if self.stage.save_filename:
save_file = self.stage.save_filename
tty.msg('Fetching {0}'.format(url))
# Run urllib but grab the mime type from the http headers
@@ -387,18 +401,16 @@ def _fetch_urllib(self, url):
# clean up archive on failure.
if self.archive_file:
os.remove(self.archive_file)
if os.path.lexists(save_file):
if save_file and os.path.exists(save_file):
os.remove(save_file)
msg = 'urllib failed to fetch with error {0}'.format(e)
raise FailedDownloadError(url, msg)
if os.path.lexists(save_file):
os.remove(save_file)
with open(save_file, 'wb') as _open_file:
shutil.copyfileobj(response, _open_file)
self._check_headers(str(headers))
return None, save_file
@_needs_stage
def _fetch_curl(self, url):
@@ -459,7 +471,7 @@ def _fetch_curl(self, url):
if self.archive_file:
os.remove(self.archive_file)
if partial_file and os.path.lexists(partial_file):
if partial_file and os.path.exists(partial_file):
os.remove(partial_file)
if curl.returncode == 22:
@@ -486,9 +498,7 @@ def _fetch_curl(self, url):
"Curl failed with error %d" % curl.returncode)
self._check_headers(headers)
if save_file and (partial_file is not None):
os.rename(partial_file, save_file)
return partial_file, save_file
@property # type: ignore # decorated properties unsupported in mypy
@_needs_stage
@@ -520,7 +530,7 @@ def expand(self):
"Failed on expand() for URL %s" % self.url)
if not self.extension:
self.extension = extension(self.archive_file)
self.extension = extension(self.url)
if self.stage.expanded:
tty.debug('Source already staged to %s' % self.stage.source_path)
@@ -528,50 +538,11 @@ def expand(self):
decompress = decompressor_for(self.archive_file, self.extension)
# Expand all tarballs in their own directory to contain
# exploding tarballs.
tarball_container = os.path.join(self.stage.path,
"spack-expanded-archive")
# Below we assume that the command to decompress expand the
# archive in the current working directory
mkdirp(tarball_container)
with working_dir(tarball_container):
with fs.exploding_archive_catch(self.stage):
decompress(self.archive_file)
# Check for an exploding tarball, i.e. one that doesn't expand to
# a single directory. If the tarball *didn't* explode, move its
# contents to the staging source directory & remove the container
# directory. If the tarball did explode, just rename the tarball
# directory to the staging source directory.
#
# NOTE: The tar program on Mac OS X will encode HFS metadata in
# hidden files, which can end up *alongside* a single top-level
# directory. We initially ignore presence of hidden files to
# accomodate these "semi-exploding" tarballs but ensure the files
# are copied to the source directory.
files = os.listdir(tarball_container)
non_hidden = [f for f in files if not f.startswith('.')]
if len(non_hidden) == 1:
src = os.path.join(tarball_container, non_hidden[0])
if os.path.isdir(src):
self.stage.srcdir = non_hidden[0]
shutil.move(src, self.stage.source_path)
if len(files) > 1:
files.remove(non_hidden[0])
for f in files:
src = os.path.join(tarball_container, f)
dest = os.path.join(self.stage.path, f)
shutil.move(src, dest)
os.rmdir(tarball_container)
else:
# This is a non-directory entry (e.g., a patch file) so simply
# rename the tarball container to be the source path.
shutil.move(tarball_container, self.stage.source_path)
else:
shutil.move(tarball_container, self.stage.source_path)
def archive(self, destination):
"""Just moves this archive to the destination."""
if not self.archive_file:
@@ -642,7 +613,7 @@ def fetch(self):
# remove old symlink if one is there.
filename = self.stage.save_filename
if os.path.lexists(filename):
if os.path.exists(filename):
os.remove(filename)
# Symlink to local cached archive.
@@ -1014,9 +985,20 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False):
git(*args)
# Init submodules if the user asked for them.
if self.submodules:
with working_dir(dest):
args = ['submodule', 'update', '--init', '--recursive']
git_commands = []
submodules = self.submodules
if callable(submodules):
submodules = list(submodules(self.package))
git_commands.append(["submodule", "init", "--"] + submodules)
git_commands.append(['submodule', 'update', '--recursive'])
elif submodules:
git_commands.append(["submodule", "update", "--init", "--recursive"])
if not git_commands:
return
with working_dir(dest):
for args in git_commands:
if not spack.config.get('config:debug'):
args.insert(1, '--quiet')
git(*args)
@@ -1556,7 +1538,7 @@ def _extrapolate(pkg, version):
try:
return URLFetchStrategy(pkg.url_for_version(version),
fetch_options=pkg.fetch_options)
except spack.package.NoURLError:
except spack.package_base.NoURLError:
msg = ("Can't extrapolate a URL for version %s "
"because package %s defines no URLs")
raise ExtrapolationError(msg % (version, pkg.name))

View File

@@ -50,7 +50,7 @@
import spack.error
import spack.hooks
import spack.monitor
import spack.package
import spack.package_base
import spack.package_prefs as prefs
import spack.repo
import spack.store
@@ -103,7 +103,7 @@ def _check_last_phase(pkg):
package already.
Args:
pkg (spack.package.PackageBase): the package being installed
pkg (spack.package_base.PackageBase): the package being installed
Raises:
``BadInstallPhase`` if stop_before or last phase is invalid
@@ -125,7 +125,7 @@ def _handle_external_and_upstream(pkg, explicit):
database if it is external package.
Args:
pkg (spack.package.Package): the package whose installation is under
pkg (spack.package_base.Package): the package whose installation is under
consideration
explicit (bool): the package was explicitly requested by the user
Return:
@@ -265,7 +265,7 @@ def _install_from_cache(pkg, cache_only, explicit, unsigned=False):
Extract the package from binary cache
Args:
pkg (spack.package.PackageBase): the package to install from the binary cache
pkg (spack.package_base.PackageBase): package to install from the binary cache
cache_only (bool): only extract from binary cache
explicit (bool): ``True`` if installing the package was explicitly
requested by the user, otherwise, ``False``
@@ -355,7 +355,7 @@ def _process_binary_cache_tarball(pkg, binary_spec, explicit, unsigned,
Process the binary cache tarball.
Args:
pkg (spack.package.PackageBase): the package being installed
pkg (spack.package_base.PackageBase): the package being installed
binary_spec (spack.spec.Spec): the spec whose cache has been confirmed
explicit (bool): the package was explicitly requested by the user
unsigned (bool): ``True`` if binary package signatures to be checked,
@@ -394,7 +394,7 @@ def _try_install_from_binary_cache(pkg, explicit, unsigned=False):
Try to extract the package from binary cache.
Args:
pkg (spack.package.PackageBase): the package to be extracted from binary cache
pkg (spack.package_base.PackageBase): package to be extracted from binary cache
explicit (bool): the package was explicitly requested by the user
unsigned (bool): ``True`` if binary package signatures to be checked,
otherwise, ``False``
@@ -530,7 +530,7 @@ def log(pkg):
Copy provenance into the install directory on success
Args:
pkg (spack.package.Package): the package that was built and installed
pkg (spack.package_base.Package): the package that was built and installed
"""
packages_dir = spack.store.layout.build_packages_path(pkg.spec)
@@ -616,7 +616,7 @@ def package_id(pkg):
and packages for combinatorial environments.
Args:
pkg (spack.package.PackageBase): the package from which the identifier is
pkg (spack.package_base.PackageBase): the package from which the identifier is
derived
"""
if not pkg.spec.concrete:
@@ -769,7 +769,7 @@ def _add_bootstrap_compilers(
Args:
compiler: the compiler to boostrap
architecture: the architecture for which to bootstrap the compiler
pkgs (spack.package.PackageBase): the package with possible compiler
pkgs (spack.package_base.PackageBase): the package with possible compiler
dependencies
request (BuildRequest): the associated install request
all_deps (defaultdict(set)): dictionary of all dependencies and
@@ -786,7 +786,7 @@ def _add_init_task(self, pkg, request, is_compiler, all_deps):
Creates and queus the initial build task for the package.
Args:
pkg (spack.package.Package): the package to be built and installed
pkg (spack.package_base.Package): the package to be built and installed
request (BuildRequest or None): the associated install request
where ``None`` can be used to indicate the package was
explicitly requested by the user
@@ -968,7 +968,7 @@ def _cleanup_task(self, pkg):
Cleanup the build task for the spec
Args:
pkg (spack.package.PackageBase): the package being installed
pkg (spack.package_base.PackageBase): the package being installed
"""
self._remove_task(package_id(pkg))
@@ -982,7 +982,7 @@ def _ensure_install_ready(self, pkg):
already locked.
Args:
pkg (spack.package.PackageBase): the package being locally installed
pkg (spack.package_base.PackageBase): the package being locally installed
"""
pkg_id = package_id(pkg)
pre = "{0} cannot be installed locally:".format(pkg_id)
@@ -1014,7 +1014,8 @@ def _ensure_locked(self, lock_type, pkg):
Args:
lock_type (str): 'read' for a read lock, 'write' for a write lock
pkg (spack.package.PackageBase): the package whose spec is being installed
pkg (spack.package_base.PackageBase): the package whose spec is being
installed
Return:
(lock_type, lock) tuple where lock will be None if it could not
@@ -1228,7 +1229,7 @@ def _install_task(self, task):
# Create a child process to do the actual installation.
# Preserve verbosity settings across installs.
spack.package.PackageBase._verbose = (
spack.package_base.PackageBase._verbose = (
spack.build_environment.start_build_process(
pkg, build_process, install_args)
)
@@ -1373,7 +1374,7 @@ def _setup_install_dir(self, pkg):
Write a small metadata file with the current spack environment.
Args:
pkg (spack.package.Package): the package to be built and installed
pkg (spack.package_base.Package): the package to be built and installed
"""
if not os.path.exists(pkg.spec.prefix):
tty.debug('Creating the installation directory {0}'.format(pkg.spec.prefix))
@@ -1447,7 +1448,7 @@ def _flag_installed(self, pkg, dependent_ids=None):
known dependents.
Args:
pkg (spack.package.Package): Package that has been installed locally,
pkg (spack.package_base.Package): Package that has been installed locally,
externally or upstream
dependent_ids (list or None): list of the package's
dependent ids, or None if the dependent ids are limited to
@@ -1536,7 +1537,7 @@ def install(self):
Install the requested package(s) and or associated dependencies.
Args:
pkg (spack.package.Package): the package to be built and installed"""
pkg (spack.package_base.Package): the package to be built and installed"""
self._init_queue()
fail_fast_err = 'Terminating after first install failure'
@@ -1788,7 +1789,7 @@ def __init__(self, pkg, install_args):
process in the build.
Arguments:
pkg (spack.package.PackageBase) the package being installed.
pkg (spack.package_base.PackageBase) the package being installed.
install_args (dict) arguments to do_install() from parent process.
"""
@@ -1848,8 +1849,8 @@ def run(self):
# get verbosity from do_install() parameter or saved value
self.echo = self.verbose
if spack.package.PackageBase._verbose is not None:
self.echo = spack.package.PackageBase._verbose
if spack.package_base.PackageBase._verbose is not None:
self.echo = spack.package_base.PackageBase._verbose
self.pkg.stage.keep = self.keep_stage
@@ -2001,7 +2002,7 @@ def build_process(pkg, install_args):
This function's return value is returned to the parent process.
Arguments:
pkg (spack.package.PackageBase): the package being installed.
pkg (spack.package_base.PackageBase): the package being installed.
install_args (dict): arguments to do_install() from parent process.
"""
@@ -2049,7 +2050,7 @@ def __init__(self, pkg, request, compiler, start, attempts, status,
Instantiate a build task for a package.
Args:
pkg (spack.package.Package): the package to be built and installed
pkg (spack.package_base.Package): the package to be built and installed
request (BuildRequest or None): the associated install request
where ``None`` can be used to indicate the package was
explicitly requested by the user
@@ -2062,7 +2063,7 @@ def __init__(self, pkg, request, compiler, start, attempts, status,
"""
# Ensure dealing with a package that has a concrete spec
if not isinstance(pkg, spack.package.PackageBase):
if not isinstance(pkg, spack.package_base.PackageBase):
raise ValueError("{0} must be a package".format(str(pkg)))
self.pkg = pkg
@@ -2240,11 +2241,11 @@ def __init__(self, pkg, install_args):
Instantiate a build request for a package.
Args:
pkg (spack.package.Package): the package to be built and installed
pkg (spack.package_base.Package): the package to be built and installed
install_args (dict): the install arguments associated with ``pkg``
"""
# Ensure dealing with a package that has a concrete spec
if not isinstance(pkg, spack.package.PackageBase):
if not isinstance(pkg, spack.package_base.PackageBase):
raise ValueError("{0} must be a package".format(str(pkg)))
self.pkg = pkg
@@ -2314,7 +2315,7 @@ def get_deptypes(self, pkg):
"""Determine the required dependency types for the associated package.
Args:
pkg (spack.package.PackageBase): explicit or implicit package being
pkg (spack.package_base.PackageBase): explicit or implicit package being
installed
Returns:
@@ -2337,7 +2338,7 @@ def run_tests(self, pkg):
"""Determine if the tests should be run for the provided packages
Args:
pkg (spack.package.PackageBase): explicit or implicit package being
pkg (spack.package_base.PackageBase): explicit or implicit package being
installed
Returns:

View File

@@ -196,6 +196,14 @@ def provides(self):
if self.spec.name == 'llvm-amdgpu':
provides['compiler'] = spack.spec.CompilerSpec(str(self.spec))
provides['compiler'].name = 'rocmcc'
# Special case for oneapi
if self.spec.name == 'intel-oneapi-compilers':
provides['compiler'] = spack.spec.CompilerSpec(str(self.spec))
provides['compiler'].name = 'oneapi'
# Special case for oneapi classic
if self.spec.name == 'intel-oneapi-compilers-classic':
provides['compiler'] = spack.spec.CompilerSpec(str(self.spec))
provides['compiler'].name = 'intel'
# All the other tokens in the hierarchy must be virtual dependencies
for x in self.hierarchy_tokens:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -356,7 +356,7 @@ def patch_for_package(self, sha256, pkg):
Arguments:
sha256 (str): sha256 hash to look up
pkg (spack.package.Package): Package object to get patch for.
pkg (spack.package_base.Package): Package object to get patch for.
We build patch objects lazily because building them requires that
we have information about the package's location in its repo.

View File

@@ -1,83 +0,0 @@
# Copyright 2013-2022 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)
# flake8: noqa: F401
"""pkgkit is a set of useful build tools and directives for packages.
Everything in this module is automatically imported into Spack package files.
"""
import llnl.util.filesystem
from llnl.util.filesystem import *
import spack.directives
import spack.util.executable
from spack.build_systems.aspell_dict import AspellDictPackage
from spack.build_systems.autotools import AutotoolsPackage
from spack.build_systems.cached_cmake import (
CachedCMakePackage,
cmake_cache_option,
cmake_cache_path,
cmake_cache_string,
)
from spack.build_systems.cmake import CMakePackage
from spack.build_systems.cuda import CudaPackage
from spack.build_systems.gnu import GNUMirrorPackage
from spack.build_systems.intel import IntelPackage
from spack.build_systems.lua import LuaPackage
from spack.build_systems.makefile import MakefilePackage
from spack.build_systems.maven import MavenPackage
from spack.build_systems.meson import MesonPackage
from spack.build_systems.octave import OctavePackage
from spack.build_systems.oneapi import (
IntelOneApiLibraryPackage,
IntelOneApiPackage,
IntelOneApiStaticLibraryList,
)
from spack.build_systems.perl import PerlPackage
from spack.build_systems.python import PythonPackage
from spack.build_systems.qmake import QMakePackage
from spack.build_systems.r import RPackage
from spack.build_systems.racket import RacketPackage
from spack.build_systems.rocm import ROCmPackage
from spack.build_systems.ruby import RubyPackage
from spack.build_systems.scons import SConsPackage
from spack.build_systems.sip import SIPPackage
from spack.build_systems.sourceforge import SourceforgePackage
from spack.build_systems.sourceware import SourcewarePackage
from spack.build_systems.waf import WafPackage
from spack.build_systems.xorg import XorgPackage
from spack.dependency import all_deptypes
from spack.directives import *
from spack.install_test import get_escaped_text_output
from spack.installer import (
ExternalPackageError,
InstallError,
InstallLockError,
UpstreamPackageError,
)
from spack.mixins import filter_compiler_wrappers
from spack.multimethod import when
from spack.package import (
BundlePackage,
DependencyConflictError,
Package,
build_system_flags,
env_flags,
flatten_dependencies,
inject_flags,
install_dependency_symlinks,
on_package_attributes,
run_after,
run_before,
)
from spack.spec import InvalidSpecDetected, Spec
from spack.util.executable import *
from spack.variant import (
any_combination_of,
auto_or_any_combination_of,
conditional,
disjoint_sets,
)
from spack.version import Version, ver

View File

@@ -433,8 +433,9 @@ def needs_binary_relocation(m_type, m_subtype):
m_type (str): MIME type of the file
m_subtype (str): MIME subtype of the file
"""
subtypes = ('x-executable', 'x-sharedlib', 'x-mach-binary', 'x-pie-executable')
if m_type == 'application':
if m_subtype in ('x-executable', 'x-sharedlib', 'x-mach-binary'):
if m_subtype in subtypes:
return True
return False

View File

@@ -202,17 +202,11 @@ class RepoLoader(_PrependFileLoader):
"""Loads a Python module associated with a package in specific repository"""
#: Code in ``_package_prepend`` is prepended to imported packages.
#:
#: Spack packages were originally expected to call `from spack import *`
#: themselves, but it became difficult to manage and imports in the Spack
#: core the top-level namespace polluted by package symbols this way. To
#: solve this, the top-level ``spack`` package contains very few symbols
#: of its own, and importing ``*`` is essentially a no-op. The common
#: routines and directives that packages need are now in ``spack.pkgkit``,
#: and the import system forces packages to automatically include
#: this. This way, old packages that call ``from spack import *`` will
#: continue to work without modification, but it's no longer required.
#: Spack packages are expected to call `from spack.package import *`
#: themselves, but we are allowing a deprecation period before breaking
#: external repos that don't do this yet.
_package_prepend = ('from __future__ import absolute_import;'
'from spack.pkgkit import *')
'from spack.package import *')
def __init__(self, fullname, repo, package_name):
self.repo = repo
@@ -450,10 +444,10 @@ def is_package_file(filename):
# Package files are named `package.py` and are not in lib/spack/spack
# We have to remove the file extension because it can be .py and can be
# .pyc depending on context, and can differ between the files
import spack.package # break cycle
import spack.package_base # break cycle
filename_noext = os.path.splitext(filename)[0]
packagebase_filename_noext = os.path.splitext(
inspect.getfile(spack.package.PackageBase))[0]
inspect.getfile(spack.package_base.PackageBase))[0]
return (filename_noext != packagebase_filename_noext and
os.path.basename(filename_noext) == 'package')

View File

@@ -15,7 +15,7 @@
import spack.build_environment
import spack.fetch_strategy
import spack.package
import spack.package_base
from spack.install_test import TestSuite
from spack.reporter import Reporter
from spack.reporters.cdash import CDash
@@ -131,7 +131,7 @@ def gather_info(do_fn):
"""
@functools.wraps(do_fn)
def wrapper(instance, *args, **kwargs):
if isinstance(instance, spack.package.PackageBase):
if isinstance(instance, spack.package_base.PackageBase):
pkg = instance
elif hasattr(args[0], 'pkg'):
pkg = args[0].pkg

View File

@@ -22,7 +22,7 @@
import spack.build_environment
import spack.fetch_strategy
import spack.package
import spack.package_base
from spack.error import SpackError
from spack.reporter import Reporter
from spack.util.crypto import checksum

View File

@@ -7,7 +7,7 @@
import spack.build_environment
import spack.fetch_strategy
import spack.package
import spack.package_base
from spack.reporter import Reporter
__all__ = ['JUnit']

View File

@@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from io import BufferedReader, IOBase
from io import BufferedReader
import six
import six.moves.urllib.error as urllib_error
@@ -23,15 +23,11 @@
# https://github.com/python/cpython/pull/3249
class WrapStream(BufferedReader):
def __init__(self, raw):
# In botocore >=1.23.47, StreamingBody inherits from IOBase, so we
# only add missing attributes in older versions.
# https://github.com/boto/botocore/commit/a624815eabac50442ed7404f3c4f2664cd0aa784
if not isinstance(raw, IOBase):
raw.readable = lambda: True
raw.writable = lambda: False
raw.seekable = lambda: False
raw.closed = False
raw.flush = lambda: None
raw.readable = lambda: True
raw.writable = lambda: False
raw.seekable = lambda: False
raw.closed = False
raw.flush = lambda: None
super(WrapStream, self).__init__(raw)
def detach(self):

View File

@@ -26,9 +26,6 @@
"cpe-version": {"type": "string", "minLength": 1},
"system-type": {"type": "string", "minLength": 1},
"schema-version": {"type": "string", "minLength": 1},
# Older schemas use did not have "cpe-version", just the
# schema version; in that case it was just called "version"
"version": {"type": "string", "minLength": 1},
}
},
"compilers": {

View File

@@ -198,9 +198,6 @@ def update(data):
" [files={0}]")
warnings.warn(msg.format(', '.join(data['include'])))
if 'packages' in data:
updated |= spack.schema.packages.update(data['packages'])
# Spack 0.19 drops support for `spack:concretization` in favor of
# `spack:concretizer:unify`. Here we provide an upgrade path that changes the former
# into the latter, or warns when there's an ambiguity. Note that Spack 0.17 is not

View File

@@ -9,54 +9,6 @@
"""
def deprecate_paths_and_modules(instance, deprecated_properties):
"""Function to produce warning/error messages if "paths" and "modules" are
found in "packages.yaml"
Args:
instance: instance of the configuration file
deprecated_properties: deprecated properties in instance
Returns:
Warning/Error message to be printed
"""
import copy
import os.path
import llnl.util.tty
import spack.util.spack_yaml as syaml
# Copy the instance to remove default attributes that are not related
# to the part that needs to be reported
instance_copy = copy.copy(instance)
# Check if this configuration comes from an environment or not
absolute_path = instance_copy._end_mark.name
command_to_suggest = '$ spack config update packages'
if os.path.basename(absolute_path) == 'spack.yaml':
command_to_suggest = '$ spack env update <environment>'
# Retrieve the relevant part of the configuration as YAML
keys_to_be_removed = [
x for x in instance_copy if x not in deprecated_properties
]
for key in keys_to_be_removed:
instance_copy.pop(key)
yaml_as_str = syaml.dump_config(instance_copy, blame=True)
if llnl.util.tty.is_debug():
msg = 'OUTDATED CONFIGURATION FILE [file={0}]\n{1}'
llnl.util.tty.debug(msg.format(absolute_path, yaml_as_str))
msg = ('detected deprecated properties in {0}\nActivate the debug '
'flag to have more information on the deprecated parts or '
'run:\n\n\t{2}\n\nto update the file to the new format\n')
return msg.format(
absolute_path, yaml_as_str, command_to_suggest
)
#: Properties for inclusion in other schemas
properties = {
'packages': {
@@ -136,16 +88,7 @@ def deprecate_paths_and_modules(instance, deprecated_properties):
'required': ['spec']
}
},
# Deprecated properties, will trigger an error with a
# message telling how to update.
'paths': {'type': 'object'},
'modules': {'type': 'object'},
},
'deprecatedProperties': {
'properties': ['modules', 'paths'],
'message': deprecate_paths_and_modules,
'error': False
}
},
},
},
@@ -160,41 +103,3 @@ def deprecate_paths_and_modules(instance, deprecated_properties):
'additionalProperties': False,
'properties': properties,
}
def update(data):
"""Update the data in place to remove deprecated properties.
Args:
data (dict): dictionary to be updated
Returns:
True if data was changed, False otherwise
"""
changed = False
for cfg_object in data.values():
externals = []
# If we don't have these deprecated attributes, continue
if not any(x in cfg_object for x in ('paths', 'modules')):
continue
# If we arrive here we need to make some changes i.e.
# we need to remove and eventually convert some attributes
changed = True
paths = cfg_object.pop('paths', {})
for spec, prefix in paths.items():
externals.append({
'spec': str(spec),
'prefix': str(prefix)
})
modules = cfg_object.pop('modules', {})
for spec, module in modules.items():
externals.append({
'spec': str(spec),
'modules': [str(module)]
})
if externals:
cfg_object['externals'] = externals
return changed

View File

@@ -41,7 +41,7 @@
import spack.directives
import spack.environment as ev
import spack.error
import spack.package
import spack.package_base
import spack.package_prefs
import spack.platforms
import spack.repo
@@ -1820,7 +1820,7 @@ def setup(self, driver, specs, reuse=None):
self.possible_virtuals = set(
x.name for x in specs if x.virtual
)
possible = spack.package.possible_dependencies(
possible = spack.package_base.possible_dependencies(
*specs,
virtuals=self.possible_virtuals,
deptype=spack.dependency.all_deptypes
@@ -1880,14 +1880,9 @@ def setup(self, driver, specs, reuse=None):
# Inject dev_path from environment
env = ev.active_environment()
if env:
for name, info in env.dev_specs.items():
dev_spec = spack.spec.Spec(info['spec'])
dev_spec.constrain(
'dev_path=%s' % spack.util.path.canonicalize_path(info['path'])
)
self.condition(spack.spec.Spec(name), dev_spec,
msg="%s is a develop spec" % name)
for spec in sorted(specs):
for dep in spec.traverse():
_develop_specs_from_env(dep, env)
self.gen.h1('Spec Constraints')
self.literal_specs(specs)

View File

@@ -896,7 +896,7 @@ def clear(self):
def _command_default_handler(descriptor, spec, cls):
"""Default handler when looking for the 'command' attribute.
Tries to search for ``spec.name`` in the ``spec.prefix.bin`` directory.
Tries to search for ``spec.name`` in the ``spec.home.bin`` directory.
Parameters:
descriptor (ForwardQueryToPackage): descriptor that triggered the call
@@ -910,20 +910,21 @@ def _command_default_handler(descriptor, spec, cls):
Raises:
RuntimeError: If the command is not found
"""
path = os.path.join(spec.prefix.bin, spec.name)
home = getattr(spec.package, 'home')
path = os.path.join(home.bin, spec.name)
if fs.is_exe(path):
return spack.util.executable.Executable(path)
else:
msg = 'Unable to locate {0} command in {1}'
raise RuntimeError(msg.format(spec.name, spec.prefix.bin))
raise RuntimeError(msg.format(spec.name, home.bin))
def _headers_default_handler(descriptor, spec, cls):
"""Default handler when looking for the 'headers' attribute.
Tries to search for ``*.h`` files recursively starting from
``spec.prefix.include``.
``spec.package.home.include``.
Parameters:
descriptor (ForwardQueryToPackage): descriptor that triggered the call
@@ -937,21 +938,22 @@ def _headers_default_handler(descriptor, spec, cls):
Raises:
NoHeadersError: If no headers are found
"""
headers = fs.find_headers('*', root=spec.prefix.include, recursive=True)
home = getattr(spec.package, 'home')
headers = fs.find_headers('*', root=home.include, recursive=True)
if headers:
return headers
else:
msg = 'Unable to locate {0} headers in {1}'
raise spack.error.NoHeadersError(
msg.format(spec.name, spec.prefix.include))
msg.format(spec.name, home))
def _libs_default_handler(descriptor, spec, cls):
"""Default handler when looking for the 'libs' attribute.
Tries to search for ``lib{spec.name}`` recursively starting from
``spec.prefix``. If ``spec.name`` starts with ``lib``, searches for
``spec.package.home``. If ``spec.name`` starts with ``lib``, searches for
``{spec.name}`` instead.
Parameters:
@@ -978,6 +980,7 @@ def _libs_default_handler(descriptor, spec, cls):
# get something like 'libabcXabc.so, but for now we consider this
# unlikely).
name = spec.name.replace('-', '?')
home = getattr(spec.package, 'home')
# Avoid double 'lib' for packages whose names already start with lib
if not name.startswith('lib'):
@@ -990,12 +993,12 @@ def _libs_default_handler(descriptor, spec, cls):
for shared in search_shared:
libs = fs.find_libraries(
name, spec.prefix, shared=shared, recursive=True)
name, home, shared=shared, recursive=True)
if libs:
return libs
msg = 'Unable to recursively locate {0} libraries in {1}'
raise spack.error.NoLibrariesError(msg.format(spec.name, spec.prefix))
raise spack.error.NoLibrariesError(msg.format(spec.name, home))
class ForwardQueryToPackage(object):
@@ -1116,6 +1119,9 @@ def __set__(self, instance, value):
class SpecBuildInterface(lang.ObjectWrapper):
# home is available in the base Package so no default is needed
home = ForwardQueryToPackage('home', default_handler=None)
command = ForwardQueryToPackage(
'command',
default_handler=_command_default_handler

View File

@@ -363,12 +363,13 @@ def __exit__(self, exc_type, exc_val, exc_tb):
def expected_archive_files(self):
"""Possible archive file paths."""
paths = []
fnames = []
expanded = True
if isinstance(self.default_fetcher, fs.URLFetchStrategy):
expanded = self.default_fetcher.expand_archive
fnames.append(os.path.basename(self.default_fetcher.url))
clean_url = os.path.basename(
sup.sanitize_file_path(self.default_fetcher.url))
fnames.append(clean_url)
if self.mirror_paths:
fnames.extend(os.path.basename(x) for x in self.mirror_paths)

View File

@@ -128,7 +128,7 @@ def test_cmake_bad_generator(config, mock_packages):
s.concretize()
pkg = spack.repo.get(s)
pkg.generator = 'Yellow Sticky Notes'
with pytest.raises(spack.package.InstallError):
with pytest.raises(spack.package_base.InstallError):
get_std_cmake_args(pkg)

View File

@@ -10,7 +10,7 @@
import spack.cmd.install
import spack.config
import spack.package
import spack.package_base
import spack.util.spack_json as sjson
from spack.main import SpackCommand
from spack.spec import Spec

View File

@@ -9,7 +9,7 @@
import spack.caches
import spack.main
import spack.package
import spack.package_base
import spack.stage
clean = spack.main.SpackCommand('clean')
@@ -31,7 +31,7 @@ def __init__(self, name):
def __call__(self, *args, **kwargs):
counts[self.name] += 1
monkeypatch.setattr(spack.package.PackageBase, 'do_clean',
monkeypatch.setattr(spack.package_base.PackageBase, 'do_clean',
Counter('package'))
monkeypatch.setattr(spack.stage, 'purge', Counter('stages'))
monkeypatch.setattr(

View File

@@ -29,22 +29,6 @@ def _create_config(scope=None, data={}, section='packages'):
return cfg_file
@pytest.fixture()
def packages_yaml_v015(mutable_config):
"""Create a packages.yaml in the old format"""
old_data = {
'packages': {
'cmake': {
'paths': {'cmake@3.14.0': '/usr'}
},
'gcc': {
'modules': {'gcc@8.3.0': 'gcc-8'}
}
}
}
return functools.partial(_create_config, data=old_data, section='packages')
@pytest.fixture()
def config_yaml_v015(mutable_config):
"""Create a packages.yaml in the old format"""
@@ -493,19 +477,6 @@ def test_config_remove_from_env(mutable_empty_config, mutable_mock_env_path):
assert output == expected
def test_config_update_packages(packages_yaml_v015):
"""Test Spack updating old packages.yaml format for externals
to new format. Ensure that data is preserved and converted
properly.
"""
packages_yaml_v015()
config('update', '-y', 'packages')
# Check the entries have been transformed
data = spack.config.get('packages')
check_packages_updated(data)
def test_config_update_config(config_yaml_v015):
config_yaml_v015()
config('update', '-y', 'config')
@@ -522,100 +493,26 @@ def test_config_update_not_needed(mutable_config):
assert data_before == data_after
def test_config_update_fail_on_permission_issue(
packages_yaml_v015, monkeypatch
):
# The first time it will update and create the backup file
packages_yaml_v015()
# Mock a global scope where we cannot write
monkeypatch.setattr(
spack.cmd.config, '_can_update_config_file', lambda x, y: False
)
with pytest.raises(spack.main.SpackCommandError):
config('update', '-y', 'packages')
def test_config_revert(packages_yaml_v015):
cfg_file = packages_yaml_v015()
bkp_file = cfg_file + '.bkp'
config('update', '-y', 'packages')
# Check that the backup file exists, compute its md5 sum
assert os.path.exists(bkp_file)
md5bkp = fs.md5sum(bkp_file)
config('revert', '-y', 'packages')
# Check that the backup file does not exist anymore and
# that the md5 sum of the configuration file is the same
# as that of the old backup file
assert not os.path.exists(bkp_file)
assert md5bkp == fs.md5sum(cfg_file)
def test_config_revert_raise_if_cant_write(packages_yaml_v015, monkeypatch):
packages_yaml_v015()
config('update', '-y', 'packages')
# Mock a global scope where we cannot write
monkeypatch.setattr(
spack.cmd.config, '_can_revert_update', lambda x, y, z: False
)
# The command raises with an helpful error if a configuration
# file is to be deleted and we don't have sufficient permissions
with pytest.raises(spack.main.SpackCommandError):
config('revert', '-y', 'packages')
def test_updating_config_implicitly_raises(packages_yaml_v015):
# Trying to write implicitly to a scope with a configuration file
# in the old format raises an exception
packages_yaml_v015()
with pytest.raises(RuntimeError):
config('add', 'packages:cmake:buildable:false')
def test_updating_multiple_scopes_at_once(packages_yaml_v015):
# Create 2 config files in the old format
packages_yaml_v015(scope='user')
packages_yaml_v015(scope='site')
# Update both of them at once
config('update', '-y', 'packages')
for scope in ('user', 'site'):
data = spack.config.get('packages', scope=scope)
check_packages_updated(data)
@pytest.mark.regression('18031')
def test_config_update_can_handle_comments(mutable_config):
# Create an outdated config file with comments
scope = spack.config.default_modify_scope()
cfg_file = spack.config.config.get_config_filename(scope, 'packages')
cfg_file = spack.config.config.get_config_filename(scope, 'config')
with open(cfg_file, mode='w') as f:
f.write("""
packages:
config:
# system cmake in /usr
cmake:
paths:
cmake@3.14.0: /usr
# Another comment after the outdated section
buildable: False
install_tree: './foo'
# Another comment after the outdated section
install_hash_length: 7
""")
# Try to update it, it should not raise errors
config('update', '-y', 'packages')
config('update', '-y', 'config')
# Check data
data = spack.config.get('packages', scope=scope)
assert 'paths' not in data['cmake']
assert 'externals' in data['cmake']
externals = data['cmake']['externals']
assert len(externals) == 1
assert externals[0]['spec'] == 'cmake@3.14.0'
assert externals[0]['prefix'] == '/usr'
data = spack.config.get('config', scope=scope)
assert 'root' in data['install_tree']
# Check the comment is there
with open(cfg_file) as f:
@@ -627,39 +524,21 @@ def test_config_update_can_handle_comments(mutable_config):
@pytest.mark.regression('18050')
def test_config_update_works_for_empty_paths(mutable_config):
# Create an outdated config file with empty "paths" and "modules"
scope = spack.config.default_modify_scope()
cfg_file = spack.config.config.get_config_filename(scope, 'packages')
cfg_file = spack.config.config.get_config_filename(scope, 'config')
with open(cfg_file, mode='w') as f:
f.write("""
packages:
cmake:
paths: {}
modules: {}
buildable: False
config:
install_tree: ''
""")
# Try to update it, it should not raise errors
output = config('update', '-y', 'packages')
output = config('update', '-y', 'config')
# This ensures that we updated the configuration
assert '[backup=' in output
def check_packages_updated(data):
"""Check that the data from the packages_yaml_v015
has been updated.
"""
assert 'externals' in data['cmake']
externals = data['cmake']['externals']
assert {'spec': 'cmake@3.14.0', 'prefix': '/usr'} in externals
assert 'paths' not in data['cmake']
assert 'externals' in data['gcc']
externals = data['gcc']['externals']
assert {'spec': 'gcc@8.3.0', 'modules': ['gcc-8']} in externals
assert 'modules' not in data['gcc']
def check_config_updated(data):
assert isinstance(data['install_tree'], dict)
assert data['install_tree']['root'] == '/fake/path'

View File

@@ -160,3 +160,9 @@ def _parse_name_offset(path, v):
spack.cmd.create.get_name(args)
captured = capsys.readouterr()
assert "Couldn't guess a name" in str(captured)
def test_no_url(parser):
"""Test creation of package without a URL."""
args = parser.parse_args(['--skip-editor', '-n', 'create-new-package'])
spack.cmd.create.create(parser, args)

View File

@@ -2288,76 +2288,6 @@ def test_env_write_only_non_default_nested(tmpdir):
assert manifest == contents
@pytest.fixture
def packages_yaml_v015(tmpdir):
"""Return the path to an existing manifest in the v0.15.x format
and the path to a non yet existing backup file.
"""
raw_yaml = """
spack:
specs:
- mpich
packages:
cmake:
paths:
cmake@3.17.3: /usr
"""
manifest = tmpdir.ensure('spack.yaml')
backup_file = tmpdir.join('spack.yaml.bkp')
manifest.write(raw_yaml)
return manifest, backup_file
def test_update_anonymous_env(packages_yaml_v015):
manifest, backup_file = packages_yaml_v015
env('update', '-y', str(manifest.dirname))
# The environment is now at the latest format
assert ev.is_latest_format(str(manifest))
# A backup file has been created and it's not at the latest format
assert os.path.exists(str(backup_file))
assert not ev.is_latest_format(str(backup_file))
def test_double_update(packages_yaml_v015):
manifest, backup_file = packages_yaml_v015
# Update the environment
env('update', '-y', str(manifest.dirname))
# Try to read the environment (it should not error)
ev.create('test', str(manifest))
# Updating again does nothing since the manifest is up-to-date
env('update', '-y', str(manifest.dirname))
# The environment is at the latest format
assert ev.is_latest_format(str(manifest))
# A backup file has been created and it's not at the latest format
assert os.path.exists(str(backup_file))
assert not ev.is_latest_format(str(backup_file))
def test_update_and_revert(packages_yaml_v015):
manifest, backup_file = packages_yaml_v015
# Update the environment
env('update', '-y', str(manifest.dirname))
assert os.path.exists(str(backup_file))
assert not ev.is_latest_format(str(backup_file))
assert ev.is_latest_format(str(manifest))
# Revert to previous state
env('revert', '-y', str(manifest.dirname))
assert not os.path.exists(str(backup_file))
assert not ev.is_latest_format(str(manifest))
def test_old_format_cant_be_updated_implicitly(packages_yaml_v015):
manifest, backup_file = packages_yaml_v015
env('activate', str(manifest.dirname))
with pytest.raises(spack.main.SpackCommandError):
add('hdf5')
@pytest.mark.parametrize('concretization,unify', [
('together', 'true'),
('separately', 'false')

View File

@@ -8,8 +8,6 @@
import pytest
from llnl.util.filesystem import getuid, touch
import spack
import spack.detection
import spack.detection.path
@@ -196,53 +194,6 @@ def test_find_external_empty_default_manifest_dir(
external('find')
@pytest.mark.skipif(sys.platform == 'win32',
reason="Can't chmod on Windows")
@pytest.mark.skipif(getuid() == 0, reason='user is root')
def test_find_external_manifest_with_bad_permissions(
mutable_config, working_env, mock_executable, mutable_mock_repo,
_platform_executables, tmpdir, monkeypatch):
"""The user runs 'spack external find'; the default path for storing
manifest files exists but with insufficient permissions. Check that
the command does not fail.
"""
test_manifest_dir = str(tmpdir.mkdir('manifest_dir'))
test_manifest_file_path = os.path.join(test_manifest_dir, 'badperms.json')
touch(test_manifest_file_path)
monkeypatch.setenv('PATH', '')
monkeypatch.setattr(spack.cray_manifest, 'default_path',
test_manifest_dir)
try:
os.chmod(test_manifest_file_path, 0)
output = external('find')
assert 'insufficient permissions' in output
assert 'Skipping manifest and continuing' in output
finally:
os.chmod(test_manifest_file_path, 0o700)
def test_find_external_manifest_failure(
mutable_config, mutable_mock_repo, tmpdir, monkeypatch):
"""The user runs 'spack external find'; the manifest parsing fails with
some exception. Ensure that the command still succeeds (i.e. moves on
to other external detection mechanisms).
"""
# First, create an empty manifest file (without a file to read, the
# manifest parsing is skipped)
test_manifest_dir = str(tmpdir.mkdir('manifest_dir'))
test_manifest_file_path = os.path.join(test_manifest_dir, 'test.json')
touch(test_manifest_file_path)
def fail():
raise Exception()
monkeypatch.setattr(
spack.cmd.external, '_collect_and_consume_cray_manifest_files', fail)
monkeypatch.setenv('PATH', '')
output = external('find')
assert 'Skipping manifest and continuing' in output
def test_find_external_nonempty_default_manifest_dir(
mutable_database, mutable_mock_repo,
_platform_executables, tmpdir, monkeypatch,

View File

@@ -20,7 +20,7 @@
import spack.config
import spack.environment as ev
import spack.hash_types as ht
import spack.package
import spack.package_base
import spack.util.executable
from spack.error import SpackError
from spack.main import SpackCommand
@@ -66,7 +66,7 @@ def test_install_package_and_dependency(
def test_install_runtests_notests(monkeypatch, mock_packages, install_mockery):
def check(pkg):
assert not pkg.run_tests
monkeypatch.setattr(spack.package.PackageBase, 'unit_test_check', check)
monkeypatch.setattr(spack.package_base.PackageBase, 'unit_test_check', check)
install('-v', 'dttop')
@@ -75,7 +75,7 @@ def test_install_runtests_root(monkeypatch, mock_packages, install_mockery):
def check(pkg):
assert pkg.run_tests == (pkg.name == 'dttop')
monkeypatch.setattr(spack.package.PackageBase, 'unit_test_check', check)
monkeypatch.setattr(spack.package_base.PackageBase, 'unit_test_check', check)
install('--test=root', 'dttop')
@@ -84,7 +84,7 @@ def test_install_runtests_all(monkeypatch, mock_packages, install_mockery):
def check(pkg):
assert pkg.run_tests
monkeypatch.setattr(spack.package.PackageBase, 'unit_test_check', check)
monkeypatch.setattr(spack.package_base.PackageBase, 'unit_test_check', check)
install('--test=all', 'a')
@@ -257,7 +257,7 @@ def test_install_commit(
"""
repo_path, filename, commits = mock_git_version_info
monkeypatch.setattr(spack.package.PackageBase,
monkeypatch.setattr(spack.package_base.PackageBase,
'git', 'file://%s' % repo_path,
raising=False)

View File

@@ -22,7 +22,7 @@
#: new fake package template
pkg_template = '''\
from spack import *
from spack.package import *
class {name}(Package):
homepage = "http://www.example.com"

View File

@@ -28,7 +28,7 @@ def test_stage_spec(monkeypatch):
def fake_stage(pkg, mirror_only=False):
expected.remove(pkg.name)
monkeypatch.setattr(spack.package.PackageBase, 'do_stage', fake_stage)
monkeypatch.setattr(spack.package_base.PackageBase, 'do_stage', fake_stage)
stage('trivial-install-test-package', 'mpileaks')
@@ -42,7 +42,7 @@ def check_stage_path(monkeypatch, tmpdir):
def fake_stage(pkg, mirror_only=False):
assert pkg.path == expected_path
monkeypatch.setattr(spack.package.PackageBase, 'do_stage', fake_stage)
monkeypatch.setattr(spack.package_base.PackageBase, 'do_stage', fake_stage)
return expected_path
@@ -69,7 +69,7 @@ def fake_stage(pkg, mirror_only=False):
assert pkg.name == 'trivial-install-test-package'
assert pkg.path is None
monkeypatch.setattr(spack.package.PackageBase, 'do_stage', fake_stage)
monkeypatch.setattr(spack.package_base.PackageBase, 'do_stage', fake_stage)
e = ev.create('test')
e.add('mpileaks')
@@ -87,7 +87,7 @@ def fake_stage(pkg, mirror_only=False):
assert pkg.name == 'mpileaks'
assert pkg.version == Version('100.100')
monkeypatch.setattr(spack.package.PackageBase, 'do_stage', fake_stage)
monkeypatch.setattr(spack.package_base.PackageBase, 'do_stage', fake_stage)
e = ev.create('test')
e.add('mpileaks@100.100')
@@ -115,7 +115,7 @@ def test_stage_full_env(mutable_mock_env_path, monkeypatch):
def fake_stage(pkg, mirror_only=False):
expected.remove(pkg.name)
monkeypatch.setattr(spack.package.PackageBase, 'do_stage', fake_stage)
monkeypatch.setattr(spack.package_base.PackageBase, 'do_stage', fake_stage)
with e:
stage()

View File

@@ -76,7 +76,9 @@ def flake8_package_with_errors(scope="function"):
package = FileFilter(filename)
package.filter("state = 'unmodified'", "state = 'modified'", string=True)
package.filter(
"from spack import *", "from spack import *\nimport os", string=True
"from spack.package import *",
"from spack.package import *\nimport os",
string=True
)
yield filename
finally:
@@ -96,6 +98,26 @@ def test_changed_files(flake8_package):
assert flake8_package in files
def test_changed_files_from_git_rev_base(tmpdir, capfd):
"""Test arbitrary git ref as base."""
git = which("git", required=True)
with tmpdir.as_cwd():
git("init")
git("checkout", "-b", "main")
git("config", "user.name", "test user")
git("config", "user.email", "test@user.com")
git("commit", "--allow-empty", "-m", "initial commit")
tmpdir.ensure('bin/spack')
assert changed_files(base="HEAD") == ['bin/spack']
assert changed_files(base="main") == ['bin/spack']
git("add", 'bin/spack')
git("commit", "-m", "v1")
assert changed_files(base="HEAD") == []
assert changed_files(base="HEAD~") == ["bin/spack"]
def test_changed_no_base(tmpdir, capfd):
"""Ensure that we fail gracefully with no base branch."""
tmpdir.join("bin").ensure("spack")
@@ -111,7 +133,7 @@ def test_changed_no_base(tmpdir, capfd):
changed_files(base="foobar")
out, err = capfd.readouterr()
assert "This repository does not have a 'foobar' branch." in err
assert "This repository does not have a 'foobar'" in err
def test_changed_files_all_files(flake8_package):
@@ -273,17 +295,17 @@ def test_style(flake8_package, tmpdir):
relative = os.path.relpath(flake8_package)
# no args
output = style()
output = style(fail_on_error=False)
assert relative in output
assert "spack style checks were clean" in output
# one specific arg
output = style(flake8_package)
output = style(flake8_package, fail_on_error=False)
assert relative in output
assert "spack style checks were clean" in output
# specific file that isn't changed
output = style(__file__)
output = style(__file__, fail_on_error=False)
assert relative not in output
assert __file__ in output
assert "spack style checks were clean" in output

View File

@@ -13,7 +13,7 @@
import spack.cmd.install
import spack.config
import spack.package
import spack.package_base
import spack.paths
import spack.store
from spack.main import SpackCommand
@@ -239,7 +239,7 @@ def test_test_list(
reason="Not supported on Windows (yet)")
def test_has_test_method_fails(capsys):
with pytest.raises(SystemExit):
spack.package.has_test_method('printing-package')
spack.package_base.has_test_method('printing-package')
captured = capsys.readouterr()[1]
assert 'is not a class' in captured

View File

@@ -35,7 +35,7 @@
import spack.database
import spack.directory_layout
import spack.environment as ev
import spack.package
import spack.package_base
import spack.package_prefs
import spack.paths
import spack.platforms
@@ -532,7 +532,7 @@ def _pkg_install_fn(pkg, spec, prefix):
@pytest.fixture
def mock_pkg_install(monkeypatch):
monkeypatch.setattr(spack.package.PackageBase, 'install',
monkeypatch.setattr(spack.package_base.PackageBase, 'install',
_pkg_install_fn, raising=False)
@@ -934,7 +934,7 @@ def mock_fetch(mock_archive, monkeypatch):
mock_fetcher.append(URLFetchStrategy(mock_archive.url))
monkeypatch.setattr(
spack.package.PackageBase, 'fetcher', mock_fetcher)
spack.package_base.PackageBase, 'fetcher', mock_fetcher)
class MockLayout(object):

View File

@@ -10,7 +10,6 @@
logic needs to consume all related specs in a single pass).
"""
import json
import os
import pytest
@@ -33,7 +32,7 @@
},
"compiler": {
"name": "gcc",
"version": "10.2.0.cray"
"version": "10.2.0"
},
"dependencies": {
"packagey": {
@@ -157,7 +156,7 @@ def spec_json(self):
# Intended to match example_compiler_entry above
_common_compiler = JsonCompilerEntry(
name='gcc',
version='10.2.0.cray',
version='10.2.0',
arch={
"os": "centos8",
"target": "x86_64"
@@ -310,16 +309,8 @@ def test_failed_translate_compiler_name():
def create_manifest_content():
return {
# Note: the cray_manifest module doesn't use the _meta section right
# now, but it is anticipated to be useful
'_meta': {
"file-type": "cray-pe-json",
"system-type": "test",
"schema-version": "1.3",
"cpe-version": "22.06"
},
'specs': list(x.to_dict() for x in generate_openmpi_entries()),
'compilers': [_common_compiler.compiler_json()]
'compilers': []
}
@@ -345,45 +336,3 @@ def test_read_cray_manifest(
' ^/openmpifakehasha'.split(),
concretize=True)
assert concretized_specs[0]['hwloc'].dag_hash() == 'hwlocfakehashaaa'
def test_read_cray_manifest_twice_no_compiler_duplicates(
tmpdir, mutable_config, mock_packages, mutable_database):
if spack.config.get('config:concretizer') == 'clingo':
pytest.skip("The ASP-based concretizer is currently picky about "
" OS matching and will fail.")
with tmpdir.as_cwd():
test_db_fname = 'external-db.json'
with open(test_db_fname, 'w') as db_file:
json.dump(create_manifest_content(), db_file)
# Read the manifest twice
cray_manifest.read(test_db_fname, True)
cray_manifest.read(test_db_fname, True)
compilers = spack.compilers.all_compilers()
filtered = list(c for c in compilers if
c.spec == spack.spec.CompilerSpec('gcc@10.2.0.cray'))
assert(len(filtered) == 1)
def test_read_old_manifest_v1_2(
tmpdir, mutable_config, mock_packages, mutable_database):
"""Test reading a file using the older format
('version' instead of 'schema-version').
"""
manifest_dir = str(tmpdir.mkdir('manifest_dir'))
manifest_file_path = os.path.join(manifest_dir, 'test.json')
with open(manifest_file_path, 'w') as manifest_file:
manifest_file.write("""\
{
"_meta": {
"file-type": "cray-pe-json",
"system-type": "EX",
"version": "1.3"
},
"specs": []
}
""")
cray_manifest.read(manifest_file_path, True)

View File

@@ -0,0 +1 @@
TEST

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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