Compare commits

...

1119 Commits

Author SHA1 Message Date
Gregory Becker
f70d2c7ccb fixup Spec parsing in error messages 2022-05-20 00:56:15 -07:00
Gregory Becker
62d18d9af7 refactor to single error predicate 2022-05-19 14:12:21 -07:00
Gregory Becker
8824040eda conflicts: better message for conflicts with no when= 2022-05-19 12:00:09 -07:00
Gregory Becker
d744b83584 error messages: prefix error facts with error_ 2022-05-19 11:01:34 -07:00
Gregory Becker
14601b59ef missing self argument 2022-05-19 09:55:48 -07:00
Gregory Becker
8d7360106f internal_error: minor refactor for clarity 2022-05-19 09:52:31 -07:00
Gregory Becker
881f184eab version selection: improve comment 2022-05-19 09:34:40 -07:00
Gregory Becker
63bec85a24 version_unsatisfiable: improve comments 2022-05-19 09:32:06 -07:00
Gregory Becker
159975a561 concretizer: improve comments on one-sided comparisons 2022-05-19 09:17:56 -07:00
Gregory Becker
25ba7d071a error message for unsatisfiable compiler version 2022-05-18 16:37:06 -07:00
Gregory Becker
54b79d5661 cleanup virtual versions 2022-05-18 15:07:06 -07:00
Gregory Becker
235f93c241 cleanup error code in concretize.lp 2022-05-18 12:59:06 -07:00
Gregory Becker
a73c5ffb0b flake 2022-05-17 13:36:15 -07:00
Gregory Becker
ce53ce284b error messages: use production quality messages 2022-05-17 11:11:50 -07:00
Gregory Becker
ae68318475 update test for new error messages 2022-05-16 17:01:26 -07:00
Gregory Becker
bd63c19b94 ensure error messages evaluated first 2022-05-16 14:54:53 -07:00
Gregory Becker
3f3bcacd16 flake 2022-05-16 12:20:30 -07:00
Gregory Becker
d349d4ab0b internal errors: request bug report and give debug-level output automatically 2022-05-16 10:41:50 -07:00
Gregory Becker
e61b3c96f6 concretizer tests: clean up temporary values 2022-05-16 10:36:23 -07:00
Gregory Becker
bcbb0a3b85 concretizer: cleanup commented-out code 2022-05-16 10:28:27 -07:00
Gregory Becker
3c556ab318 cleanup, remove show-cores option 2022-05-16 10:20:35 -07:00
Gregory Becker
563ae5188e improve multiple-variant-value error 2022-05-15 11:59:58 -07:00
Gregory Becker
f4b3561f71 wip try without unsat cores 2022-05-13 17:08:26 -07:00
Gregory Becker
0748a1b290 fix version weight 2022-05-13 16:36:56 -07:00
Gregory Becker
0bfece0c5e fix platform errors 2022-05-13 16:23:58 -07:00
Gregory Becker
6e9b16279a wip 2022-05-13 12:25:57 -07:00
Gregory Becker
cf71baff30 refactor calculation of assumption_names 2022-05-13 12:25:57 -07:00
Gregory Becker
b9831acb44 solver: messages for dependency conditions 2022-05-13 12:25:57 -07:00
Gregory Becker
5f2edb1860 fixup 2022-05-13 12:25:57 -07:00
Gregory Becker
8b6809cf66 solver: bypass conditional logic for unconditional variants
add message to variant conditionals
2022-05-13 12:25:57 -07:00
Gregory Becker
a93a4274aa solver: add messages to variant_value/provider/external conditions 2022-05-13 12:25:57 -07:00
Gregory Becker
59bb42ee7f solver: add messages to conditions for conflict triggers/constraints 2022-05-13 12:25:57 -07:00
Gregory Becker
11d382bff1 show-cores: fewer modes required 2022-05-13 12:25:57 -07:00
Gregory Becker
57889ec446 solver: orthogonalize variant_value maxima and minima 2022-05-13 12:25:57 -07:00
Gregory Becker
66bda49c44 solver: rework which facts are assumptions 2022-05-13 12:25:57 -07:00
Gregory Becker
94a2ab5359 solver: error -> internal_error for errors that should not be exposed generally 2022-05-13 12:25:56 -07:00
Gregory Becker
6d0044f703 solver: rename version_satisfies/2 to node_version_satisfies/2 for clarity 2022-05-13 12:25:56 -07:00
Gregory Becker
3fa447a84a solver: clean up emission of conflicts 2022-05-13 12:25:56 -07:00
Gregory Becker
d501ce0c7e remove special handling for error/rule atoms 2022-05-13 12:25:56 -07:00
Todd Gamblin
5cb40cbcd2 directory_layout: remove outdated checks for old DAG hash
We previously had checks in `directory_layout` to check for build-dependency
conflicts when we weren't storing build dependencies.  We don't need
those anymore; we can just rely on the DAG hash now that it includes everything
we know about each spec.

- [x] Remove vestigial code for checking installed spec against concrete spec
      in `ensure_installed()`
- [x] Remove `SpecHashCollisionError` -- if specs have the same hash now, they're
      the same as far as `DirectoryLayout` should be concerned.
- [x] Convert spec comparison to `dag_hash()` comparison when adding extensions.
2022-05-13 10:45:12 -07:00
Todd Gamblin
c93e465134 full hash: fix uninstall and gc with full hash DB
The database now stores full hashes, so we need to adjust the criteria we use to
determine if something can be uninstalled. Specifically, it's ok to uninstall thing that
have remaining build-only dependents.
2022-05-13 10:45:12 -07:00
Todd Gamblin
521c206030 concretizer: enable hash reuse with full hash
With the original DAG hash, we did not store build dependencies in the database, but
with the full DAG hash, we do. Previously, we'd never tell the concretizer about build
dependencies of things used by hash, because we never had them. Now, we have to avoid
telling the concretizer about them, or they'll unnecessarily constrain build
dependencies for new concretizations.

- [x] Make database track all dependencies included in the `dag_hash`
- [x] Modify spec_clauses so that build dependency information is optional
      and off by default.
- [x] `spack diff` asks `spec_clauses` for build dependencies for completeness
- [x] Modify `concretize.lp` so that reuse optimization doesn't affect fresh
      installations.
- [x] Modify concretizer setup so that it does *not* prioritize installed versions
      over package versions. We don't need this with reuse, so they're low priority.
- [x] Fix `test_installed_deps` for full hash and new concretizer (does not work
      for old concretizer with full hash -- leave this for later if we need it)
- [x] Move `test_installed_deps` mock packages to `builtin.mock` for easier debugging
      with `spack -m`.
- [x] Fix `test_reuse_installed_packages_when_package_def_changes` for full hash
2022-05-13 10:45:12 -07:00
Todd Gamblin
15eb98368d bugfix: tests trying to ignore package changes should use build_hash
- [x] update test to use `build_hash` instead of `dag_hash`, as we're testing for
      graph structure, and specifically NOT testing for package changes.
- [x] make hash descriptors callable on specs to simplify syntax for invoking them
- [x] make `Spec.spec_hash()` public
2022-05-13 10:45:12 -07:00
Todd Gamblin
7c1d566959 Remove all uses of runtime_hash; document lockfile formats and fix tests
This removes all but one usage of runtime hash. The runtime hash was being used to write
historical lockfiles for tests, but we don't need it for that; we can just save those
lockfiles.

- [x] add legacy lockfiles for v1, v2, v3
- [x] fix bugs with v1 lockfile tests (the dummy lockfile we were writing was not actually
      a v1 lockfile because it used the new spec file format).
- [x] remove all but one runtime_hash usage -- that one needs a small rework of the
      concretizer to really fix, as it's about separate concretization of build
      dependencies.
- [x] Document the history of the lockfile format in `environment/__init__.py`
2022-05-13 10:45:12 -07:00
Todd Gamblin
7ab46e26b5 content_hash(): make it work on abstract specs
Some test cases had to be modified in a kludgy way so that abstract specs made
concrete would have versions on them. We shouldn't *need* to do this, as the
only reason we care is because the content hash has to be able to get an archive
for a version.

This modifies the content hash so that it can be called on abstract specs,
including only relevant content.

This does NOT add a partial content hash to the DAG hash, as we do not really
want that -- we don't need in-memory spec hashes to need to load package files.
It just makes `Package.content_hash()` less prickly and tests easier to
understand.
2022-05-13 10:45:12 -07:00
Todd Gamblin
6db215dd89 spec: fix serialization, avoid double call to node_dict_with_hashes 2022-05-13 10:45:12 -07:00
Todd Gamblin
72b38851eb hashes: revert spack monitor hash changes to preserve original protocol
`spack monitor` expects a field called `spec_full_hash`, so we shouldn't change that.
Instead, we can pass a `dag_hash` (which is now the full hash) but not change the field
name.
2022-05-13 10:45:12 -07:00
Todd Gamblin
9d9e970367 fix full hash calls in spack graph 2022-05-13 10:45:12 -07:00
Todd Gamblin
283a4e6068 remove no longer needed full hash check 2022-05-13 10:45:12 -07:00
Todd Gamblin
d20cc7b124 spec: remove hashes_final as it's no longer needed.
`hashes_final` was used to indicate when a spec was concrete but possibly lacked
`full_hash` or `build_hash` fields. This was only necessary because older Spacks
didn't generate them, and we want to avoid recomputing them, as we likely do not
have the same package files as existed at concretization time.

Now, we don't need to do that -- there is only the DAG hash and specs are either
concrete and have a `dag_hash`, or not concrete and have no `dag_hash`. There's
no middle ground.
2022-05-13 10:45:12 -07:00
Scott Wittenburg
0dd373846f gitlab ci: switch over to new bucket for all stacks 2022-05-13 10:45:12 -07:00
Scott Wittenburg
c202953528 gitlab ci: Docstring methods or make them private 2022-05-13 10:45:12 -07:00
Scott Wittenburg
be0e3f4458 binary_distribution: Refactor index generation into smaller methods 2022-05-13 10:45:12 -07:00
Scott Wittenburg
fd3bb5177b env: Use order of roots to resolve DAG hash conflicts in legacy lockfiles 2022-05-13 10:45:12 -07:00
Scott Wittenburg
9de61c0197 env: enforce predictable ordering when reading lockfile
Without some enforcement of spec ordering, python 2 produced
different results in the affected test than did python 3.  This
change makes the arbitrary but reproducible decision to sort
the specs by their lockfile key alphabetically.
2022-05-13 10:45:12 -07:00
Scott Wittenburg
84cfb3b7fe spec: fix infinite recursion when computing package hash
Issue described in the following PR comment:

https://github.com/spack/spack/pull/28504#issuecomment-1051835568

Solution described in subsequent comment:

https://github.com/spack/spack/pull/28504#issuecomment-1053986132
2022-05-13 10:45:12 -07:00
Scott Wittenburg
cb0d12b9d5 Fix how environments are read from lockfile 2022-05-13 10:45:12 -07:00
Scott Wittenburg
f6e7c0b740 hashes: remove full_hash and build_hash from spack 2022-05-13 10:45:12 -07:00
Scott Wittenburg
512645ff2e environment: key by dag_hash instead of build_hash 2022-05-13 10:45:12 -07:00
Scott Wittenburg
32a2c22b2b tests: fix failing test_hash_change
The full hash appears twice in the spec dict now, replacing just
the value replaces it under "hash" and "full_hash".  Only replace
the one that appears after "full_hash".

I'm actually not sure what purpose this test served, so maybe it
could be removed, as it may be testing some distinction between
full and dag hash which no longer exists.
2022-05-13 10:45:12 -07:00
Todd Gamblin
e02020c80a Include all deps and package content in the dag_hash()
For a long time, Spack has used a coarser hash to identify packages
than it likely should. Packages are identified by `dag_hash()`, which
includes only link and run dependencies. Build dependencies are
stripped before hashing, and we have notincluded hashes of build
artifacts or the `package.py` files used to build.  This means the
DAG hash actually doesn't represent all the things Spack can build,
and it reduces reproducibility.

We did this because, in the early days, users were (rightly) annoyed
when a new version of CMake, autotools, or some other build dependency
would necessitate a rebuild of their entire stack. Coarsening the hash
avoided this issue and enabled a modicum of stability when only reusing
packages by hash match.

Now that we have `--reuse`, we don't need to be so careful. Users can
avoid unnecessary rebuilds much more easily, and we can add more
provenance to the spec without worrying that frequent hash changes
will cause too many rebuilds.

This commit starts the refactor with the following major change:

- [x] Make `Spec.dag_hash()` include build, run, and link
      dependencides and the package hash (it is now equivalent to
      `full_hash()`).

It also adds a couple of bugfixes for problems discovered during
the switch:

- [x] Don't add a `package_hash()` in `to_node_dict()` unless
      the spec is concrete (fixes breaks on abstract specs)

- [x] Don't add source ids to the package hash for packages without
      a known fetch strategy (may mock packages are like this)

- [x] Change how `Spec.patches` is memoized. Using
      `llnl.util.lang.memoized` on `Spec` objects causes specs to
      be stored in a `dict`, which means they need a hash.  But,
      `dag_hash()` now includes patch `sha256`'s via the package
      hash, which can lead to infinite recursion
2022-05-13 10:45:12 -07:00
Massimiliano Culpo
d900ac2003 Reuse concretization by default (#30396)
* Enable reuse by default in Spack
* Update documentation to match new default
* Configure pipelines not to reuse software
2022-05-13 09:11:10 -07:00
Teodor Nikolov
faa277778e sarus: fix dependency on boost (#30659)
The program_options variant is disabled by default in Boost and
has to be enabled explicitly.
2022-05-13 08:41:41 -06:00
Harmen Stoppels
b60d3dcd29 libtree: add v3.0.4, v3.1.1 (#30658) 2022-05-13 11:35:06 +00:00
Todd Gamblin
e0bed2d6a7 tutorial stack: allow deprecated versions (#30648)
For tutorial builds, we should continue to allow deprecated builds to be installed. We
can update them as needed when we update the tutorial, but we don't need to correct them
immediately on deprecation in CI.

- [x] add `deprecated:true` to tutorial `spack.yaml` config.
2022-05-13 04:09:39 -06:00
Massimiliano Culpo
745c191d73 Gitlab pipelines: add a small legend in the logs to interpret "[x]" (#30643) 2022-05-12 21:46:35 +02:00
Chuck Atkins
42e9430fbc silo: Cleanup the HDF5 dependency specs (#30593) 2022-05-12 15:43:11 -04:00
Chuck Atkins
f11572166f vtk: fix hdf5 version specification (#30592) 2022-05-12 21:16:57 +02:00
Adam J. Stewart
aa6665d5ee py-scikit-learn: add v1.1.0 (#30649) 2022-05-12 12:50:26 -06:00
Simon Pintarelli
3e8f31a068 atompaw: add version 4.2.0.0 (#30650) 2022-05-12 18:09:30 +00:00
Massimiliano Culpo
3625ea4726 Revert "atompaw: add new package (#30619)" (#30647)
This reverts commit 12b0278f08.
2022-05-12 19:47:47 +02:00
snehring
245b95223d soapdenovo-trans: add v1.0.5 (#30629) 2022-05-12 19:14:49 +02:00
Max Zeyen
e00c8a7d98 code-server: add new versions (#30646) 2022-05-12 10:08:02 -07:00
Adam J. Stewart
97792f04e9 py-netcdf4: add v1.5.8 (#30598) 2022-05-12 09:02:27 -05:00
Frédéric Simonis
ca069f6906 precice: add v2.4.0 (#30633) 2022-05-12 15:57:53 +02:00
Qian Jianhua
35a91bdd72 fakexrandr: remove 'ldconfig' from Makefile (#30632) 2022-05-12 14:55:45 +02:00
Mikael Simberg
c866a50446 Add patch for compiling llvm ~omp_as_runtime (#30583) 2022-05-12 05:49:39 -06:00
Harmen Stoppels
3033abb5bd Add cuda 11.7 compat bounds for gcc/clang (#30639) 2022-05-12 10:41:30 +00:00
Harmen Stoppels
d37f439557 pigz: add v2.7 (#30640) 2022-05-12 10:39:08 +00:00
dlkuehn
18710936f1 platypus: limit install to Python2 (#30624)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-05-12 09:30:45 +02:00
Simon Pintarelli
12b0278f08 atompaw: add new package (#30619) 2022-05-12 09:24:38 +02:00
Eureka Hwang
34fd6e36ce cuda: add v11.7 (#30630) 2022-05-12 09:20:42 +02:00
marcosmazz
363536fd92 quantum-espresso: add gipaw variant (#30628)
Co-authored-by: Marcos Mazzini - <mmazzini@serafin.ccad.unc.edu.ar>
2022-05-11 18:31:19 -07:00
Abhik Sarkar
d57d343b6d This commit removes the Boost.with_default_variants to variants (#28960)
that packages are precisely dependant upon. This is the second batch
of 20 packages with modified boost dependencies.
2022-05-11 17:16:19 -07:00
Tamara Dahlgren
1b254d19c4 Allow read-only access to file cache (when needed) (#29693)
* Allow read-only access to file cache (when needed)
* Tweaked and added unit tests
* Skip test_cache_init_entry_fails for windows
2022-05-11 16:25:06 -07:00
shanedsnyder
82b916be36 add darshan-3.4.0-pre1 release (#30569)
include new dependencies on autotools/m4/etc.
2022-05-11 16:21:56 -06:00
snehring
66d3648200 bamutil: updating to 1.0.15 (#30623)
* bamutil: updating to 1.0.15

* bamutil: switching to github archive
2022-05-11 22:12:32 +00:00
AMD Toolchain Support
d2fc7b9f7d lammps: updating googletest version to 1.11 to avoid GTEST_DISALLOW_ASSIGN_Error (#30563)
* updating googletest version to 1.11 to avoid GTEST_DISALLOW_ASSIGN_ error

* limiting the version scope

* modified the version limit

Co-authored-by: mohan babu <mohbabul@amd.com>
2022-05-11 13:17:47 -06:00
Wouter Deconinck
1067749371 assimp: add v5.2.3 (#29629) 2022-05-11 20:03:07 +02:00
snehring
8bd893367d sentieon-genomics: add version 202112.02, remove manual download (#30145) 2022-05-11 19:38:24 +02:00
Mikael Simberg
2ed542b744 Add conflict for ROCm and asio in HPX package (#30620) 2022-05-11 10:33:16 -07:00
Stephen Hudson
5cb7a5db45 libEnsemble: add v0.9.1 (#30621) 2022-05-11 16:41:45 +00:00
Cory Bloor
f84991b5a8 rocfft: add spack build test support (#29957)
* rocfft: add spack build test support

* Style cleanup for variant specs
2022-05-11 09:37:22 -07:00
Hadrien G
928ecd1f4e [acts] Add version 19 (#30615)
No build system visible changes, so AFAIK this should Just Work
2022-05-11 09:13:27 -07:00
Thomas Dickerson
72e594fb10 Fix default buildcache location (#30230)
Resolve path/URL parsing issues introduced by #27021
2022-05-11 17:50:04 +02:00
Vasileios Karakasis
f9d701f9cf ReFrame: add v3.11.0 (#30578) 2022-05-11 08:41:40 -06:00
Harmen Stoppels
63f7053fe8 eccodes: add v2.25.0 (#30618) 2022-05-11 12:04:43 +00:00
Harmen Stoppels
1c51d6313b jasper: avoid --gc-sections / hidden symbols (#30617)
Jasper v3.x changed a default to hide hidden symbols, but apparently
eccodes relies on those symbols and fails to link otherwise.
2022-05-11 11:52:54 +00:00
Harmen Stoppels
c164e6fe03 jasper: update cmake dependency (#30616) 2022-05-11 13:33:46 +02:00
Gregory Lee
2d823dcf90 gobject-introspection: add libffi dependency (#30601) 2022-05-11 13:29:54 +02:00
Tom Scogland
a12c638224 Neovim luajit (#28855)
Upstream neovim builds with luajit-openresty or luajit in almost all
cases.  To support the current usage, a user can specify that they want
lua, but this will allow the use of the normal (faster, better tested
and better maintained) setup.
2022-05-11 05:01:35 -06:00
Richard Berger
0739691688 flecsi: add GPU dependencies and refactor (#30543) 2022-05-11 12:51:21 +02:00
Seth R. Johnson
62ffc8c1dd vecgeom: new version 1.2.0 (#30586) 2022-05-11 10:49:14 +00:00
Wouter Deconinck
61969566f8 pango: updated versions with MesonPackage (#30591) 2022-05-11 12:48:07 +02:00
Ida Mjelde
49948bb3e7 root: changes due to var name webui->webgui from version 6.17.02 (#29964) 2022-05-11 10:44:17 +00:00
Harmen Stoppels
c9c347f0f0 jasper: add 3.0.x (#30614) 2022-05-11 12:26:23 +02:00
Dan Bonachea
ee9b61be7a upcxx,gasnet: Add a note to the +cuda variant description (#30602)
Resolves issue #30589
2022-05-10 22:45:32 -06:00
snehring
be45292a9c last: updating to 1282 (#30606) 2022-05-11 00:26:54 +00:00
HELICS-bot
61f8c97bb7 helics: Add version 3.2.0 (#30604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-10 23:02:08 +00:00
Adam J. Stewart
b0403624cf py-scikit-learn: add v1.1.0rc1 (#30600) 2022-05-10 21:50:56 +00:00
Adam J. Stewart
4baed234be py-xarray: add v2022.3.0 (#30599) 2022-05-10 21:45:55 +00:00
Adam J. Stewart
9de1edee80 py-geopandas: add v0.10.X (#30597) 2022-05-10 21:32:12 +00:00
Harmen Stoppels
9ce726eed5 openmpi: only set variants when condition is met (#30585) 2022-05-10 13:05:44 -06:00
Harmen Stoppels
c45ee381bd hyperfine: add v1.13.0 (#30584) 2022-05-10 18:05:13 +00:00
Sergey Kosukhin
56d76766b7 cray-mpich: add variant 'wrappers' (#30249) 2022-05-10 12:22:04 -05:00
Andrea Valenzuela
6c309bbb32 Add checksum for py-pylint@2.13.5 (#30356)
* Add checksum for py-pylint@2.13.5

* Update dependencies

* Add checksum for py-astroid@2.11.4

* Correct py-toml addition and add py-tomli dependency

* Remove py-pytoml dependency for versions @2.13:

* Modify py-astroid version range

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

* Discontinue py-astroid dependency @2.8.0:2.8 for new versions

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

* Discontinue py-mccabe dependency @0.6.0:0.6 for new versions

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

* Remove mccabe and setuptools-scm dependencies

* Update astroid dependencies

* Extend py-typed-ast version range to future releases

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

* py-dill only required for version 2.13.5 and above

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

* Add maccabe dependency and correct setuptools run dependency

* Setuptools fix

* Add setuptools as run dependency

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-10 11:21:48 -06:00
Chris White
cfed42ecfc guard against SPACK_FC possibly not being defined (#30581) 2022-05-10 12:19:03 -05:00
haralmha
01b79abcdf py-pyarrow: Add versions 8.0.0 and 7.0.0 (#30524)
* py-pyarrow: Add version 7.0.0

* Add version constraints on dependencies

* Add version 8.0.0

* arrow: Add version 8.0.0

* py-pyarrow: Allow version 8.0.0 of arrow
2022-05-10 12:16:55 -05:00
G-Ragghianti
4d84c774d1 Added dependency on hipify-clang and fixed hipify-clang package (#30576) 2022-05-10 09:38:16 -07:00
Sreenivasa Murthy Kolam
00e9780136 Update ROCm recipes for rocm-5.1.0 release (#30027)
* Bump up rocm release version to rocm-5.1.0
* update rocm-opencl for rocm-5.1.0 release
* update the migraphx,miopen(hip,opencl),mivisionx,rocm-tensile
* update the mlirmiopen checksum version
2022-05-10 08:42:22 -07:00
Scott Wittenburg
a65e00392c gitlab ci: do not override .generate tags for e4s (#30571) 2022-05-10 08:05:19 -07:00
Wouter Deconinck
250fa6dada libxkbcommon: new version 1.4.0, support for newer meson build system (#30420) 2022-05-10 09:59:26 -05:00
Danny McClanahan
dd7822fdf7 depend on gettext in subversion when +nls is enabled (#30573) 2022-05-10 09:58:35 -05:00
Todd Gamblin
555202833f bootstrap: clean up CI workflows a bit (#30574)
- [x] Add `mkdir -p` and `chmod` to ensure `/home/spack-test` exists and
      has correct permissions.
- [x] Remove version comments from dependabot-managed action commits
- [x] Don't duplicate comment describing required fixes for distros with
      patched git
2022-05-10 16:27:37 +02:00
Valentin Volkl
b76fc61deb agile: add new package (#30244)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-10 12:40:04 +00:00
Ida Mjelde
186abe525e gitconddb: add v0.2.0 and v0.1 patch releases (#29965)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-10 11:13:06 +00:00
Dom Heinzeller
31d8607b3c hdf: build on Ubuntu 20.04 aarch64 (#30522) 2022-05-10 10:47:04 +02:00
Brice Videau
622841063c userspace-rcu: add versions up to v0.13.1 (#30534) 2022-05-10 08:57:08 +02:00
mcuma
23b7071bb0 wi4mpi: fix a missed conversion to string (#30541) 2022-05-10 07:42:21 +02:00
Erik Schnetter
359229f5f8 memkind: conflicts with jemalloc (#30070) 2022-05-10 07:41:01 +02:00
JDBetteridge
2db545ffdc libflame: fix for linking with BLIS library (#30527) 2022-05-10 07:39:02 +02:00
Ryan Mulhall
3986ac3828 fms: add versions and expose more CMake build options (#28966)
Co-authored-by: rem1776 <Ryan.Mulhall@lscamd50-d.gfdl.noaa.gov>
2022-05-10 07:28:23 +02:00
Robert Cohn
c47c5d75e4 oneapi: add v2022.2 (#30531) 2022-05-10 07:25:06 +02:00
Todd Gamblin
a0d4630448 bugfix: spack pkg list should be more picky about what's a package (#30577)
`spack pkg list` tests were broken by #29593 for cases when your `builtin.mock` repo
still has stale backup files (or, really, stale directories) sitting around. This
happens if you switch branches a lot. In this case, things like this were causing
erroneous packages in the mock listing:

```
var/spack/repos/builtin.mock/packages/
    foo/
        package.py~
```

- [x] make `list_packages` consider only directories with one-deep `package.py` files.
2022-05-10 04:57:58 +00:00
Tom Scogland
7f1659786b Add a Lua build-system (#28854)
Reworking lua to allow easier substitution of the base lua implementation.

Also adding in a maintained version of luajit and re-factoring the entire stack 
to use a custom build-system to centralize functionality like environment 
variable management and luarocks installation.

The `lua-lang` virtual is now versioned so that a package that requires 
Lua 5.1 semantics can get any lua, but one that requires 5.2 will only 
get upstream lua.

The luaposix package requires lua-bit32, but only when built with a 
lua conforming to version 5.1.  This adds the package, and the 
dependencies, but exposed a problem with luarocks dependency 
detection.  Since we're  installing each package in its own "tree" and 
there's no environment  variable to list extra trees, spack now 
generates a luarocks config  file that lists all the trees of all the 
dependencies, and references  it by setting `LUAROCKS_CONFIG` 
in the build environment of every LuaPackage.  This allows luarocks 
to find the spack installed  dependencies correctly rather than 
trying (and failing) to download them.

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Tom Scogland <tscogland@llnl.gov>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-10 06:54:38 +02:00
Sam Grayson
b5da0d02bf Fix py-numpy #30373 by backporting Numpy PR (#30486)
* Fix py-numpy #30373

* Update `when` for patch.
2022-05-09 22:13:39 -06:00
eugeneswalker
8575afac4e e4s on mac ci: set SPACK_DISABLE_LOCAL_CONFIG=1 (#30568)
* e4s on mac ci: set SPACK_DISABLE_LOCAL_CONFIG=1
* export SPACK_USER_CACHE_PATH so that ~/.spack/... isn't used
2022-05-09 21:13:34 -06:00
Todd Gamblin
7997dfcf80 tests: fix references to hard-coded master branch in git tests (#30572)
Some of our `git` tests still fail when `init.defaultBranch` is set to something other
than `master`.

- [x] get rid of all hard-coded `master` refs
- [x] Use `'default'` to key tests that use the default branch
2022-05-09 16:42:25 -07:00
Erik Schnetter
19c8e02e32 sqlite: New version 3.38.5 (#30556) 2022-05-09 16:25:39 -06:00
sabrivatansever
320e6e06e6 Cutlang: Create package.py (#30535) 2022-05-09 20:39:53 +00:00
Adam J. Stewart
d7b66dd286 Python: add v3.8.13 and v3.7.13 (#30553)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-09 13:49:41 -06:00
Rebecca Haluska
70a8b91ec2 sina: add 1.11 version (#27161)
* sina: add 1.11 version

* Moved 1.11 above 1.10
2022-05-09 19:27:59 +00:00
Douglas Thain
1883fedae7 cctools: add 7.4.2 (#28766)
* Update to cctools-7.4.2
* Add simple patch to remove broken test cases.
* import unlink
* add maintainers
2022-05-09 10:50:00 -07:00
Sergei Shudler
c4412306da Added a new patched version for parallelmergetree (#29499)
* Added a new patched version for parallelmergetree

* Retain older versions instead of replacing them
2022-05-09 10:47:34 -07:00
Dom Heinzeller
c49508648a Get timeout for web requests with urllib from spack config, same as for curl (#30468) 2022-05-09 10:35:17 -07:00
John W. Parent
9bcf496f21 Windows permissions: uninstalling and cleaning stages (#29714)
When running on Windows, Spack may generate files in the stage/install
prefixes that do not have write permissions, which prevents the
removal of those directories (e.g. when cleaning stages or uninstalling).
There should be a refactoring to avoid this in the first place, but that
is assumed to be longer term, so the temporary fix is to make such files
writable if they are not. This PR:

* Automatically handles these permissions errors when uninstalling
  packages from the Spack root (makes then writable)
* Updates similar already-existing logic when removing Spack-managed
  stage directories (the error-handling was assuming all errors were
  permissions errors and was therefore handling other errors
  inappropriately)

Note: these permissions issues only appear on Windows so this logic is
only applied there (permissions are not modified for this purpose on
Linux etc.).

This also adds special handling for a case where calling `isdir`
on an `os.DirEntry` object would fail for improperly-created symlinks
(e.g. on Windows, using `os.symlink` without `target_is_directory=True`).
Note this specific issue only came up when enabling link_tree tests
(specifically `source_merge_visitor_cant_be_cyclical`).
2022-05-09 10:28:14 -07:00
Will Saunders
060e88387e hipsycl: add v0.9.2 (#30566) 2022-05-09 17:54:14 +02:00
Oliver Perks
a24bae1986 Updated ACfL package to 22.0.1, removing 21 package, as no licence required is now false. (#30562) 2022-05-09 15:12:08 +02:00
Erik Schnetter
d08520cb15 mpitrampoline: Correct build environment (#30549) 2022-05-09 13:40:10 +02:00
Erik Schnetter
5397dcee51 simulationio: add v9.0.2 (#30550) 2022-05-09 13:39:18 +02:00
Adam J. Stewart
d62e4b1d66 py-radiant-mlhub: add new versions (#30555) 2022-05-09 12:44:49 +02:00
Adam J. Stewart
9ed1c76486 py-cartopy: add new versions (#30554) 2022-05-09 12:44:33 +02:00
Adam J. Stewart
10efbc071f py-geocube: add v0.3.1 (#30558) 2022-05-09 12:44:01 +02:00
Massimiliano Culpo
d517dcdc71 tcl: add v8.6.12 (#30560) 2022-05-09 11:12:16 +02:00
Massimiliano Culpo
104d60887f CI: fix bootstrapping on Fedora (#30559)
Fedora updated git, so we need to apply, again, the
workaround for CVE-2022-24765
2022-05-09 09:11:03 +00:00
Erik Schnetter
1bde91735b mpitrampoline: New version 4.0.2 (#30548) 2022-05-09 10:01:41 +02:00
Erik Schnetter
335083d2dc openssl: Update to 1.1.1o (#30551) 2022-05-08 22:57:37 -06:00
Peter Scheibel
0858c281e4 Cray manifest file: accept "nvidia" as "nvhpc" (#30428)
* create function for translating compiler names on specs/compiler entries in manifest

* add tests for translating compiler names on spec/compiler entries

* use higher-level function in test and add comment to prefer testing via higher-level function

* opensuse clingo check should not fail on account of this pr, but I cannot get it to pass by restarting via CI UI
2022-05-08 17:51:27 -07:00
Erik Schnetter
adc8a2ca00 curl: New version 7.83.0 (#30552) 2022-05-09 00:36:03 +02:00
Derek Ryan Strong
dc6d45c8b4 Add latest Lmod 8.6, 8.7 (#30542)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-07 20:04:10 -06:00
Harmen Stoppels
fcaf9c8cdf gcc: version 12.1.0 (#30537) 2022-05-07 19:28:54 -06:00
Phil Carns
1f74dc63dc Add mochi-margo 0.9.9 (#30539)
- necessary for compatibility with upcoming Mercury 2.2.0 release
2022-05-07 19:28:36 -06:00
Francesco Di Natale
ceaad43e54 Addition of 1.1.9dev version for py-maestrowf (#30523)
* Addition of 1.1.9dev version.

* Small style fix -- extra blank line.

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

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

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

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

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

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

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

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

* Additional dependencies and version constraints.

* Revert to py-poetry.

* Remove run from cryptography (build only).

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-07 19:28:23 -06:00
Erik
4c8eb92314 Put make() inside a self.run_test call (#30536) 2022-05-07 18:45:57 -06:00
Ryan Marcellino
89775e32c0 vim: add +gtk variant to pair with +gui (#30520)
* vim: add +gtk3 variant to pair with +gui

* address review comments
2022-05-07 17:49:33 -06:00
Robert Pavel
5ab526185a Force GCC to always provide a C++14 flag (#29781)
* Force GCC to always provide a C++14 flag

Updated gnu logic so that the c++14 flag for g++ is always propagated.
This fixes issues with build systems that error out if passed an empty
string for a flag.

Engaging in the best kind of software engineering by updating the unit
test to pass with the value it is now passed. This should better match
the expected flag for g++ compiling with the C++14 standard
2022-05-07 13:09:20 -04:00
WYF
654a07d642 nmap: fix build issue (#30429) 2022-05-07 03:02:26 +02:00
JDBetteridge
dfdbd1151d Eigen: turn on BUILD_TESTING for build to complete (#30528)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-06 16:28:33 -06:00
Sebastian Schmitt
22f3ef0a21 Add sphinx-tabs package (#27698)
* Add py-docutils@0.16

* Add sphinx-tabs package

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

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

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

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

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-06 10:33:38 -05:00
Jim Galarowicz
165bcf5cc3 openspeedshop: fix missing import statement (#30506) 2022-05-06 10:27:09 -05:00
Greg Becker
27462bc982 Fix improper type for InvalidDependencyError argument (#30504) 2022-05-06 16:23:12 +02:00
eugeneswalker
c2afb4b916 arborx: inherit from CudaPackage, ROCmPackage (#30490) 2022-05-06 16:18:06 +02:00
Thomas Dickerson
6c6685b5fa boost: add support for alternate boost-context backends (#30496)
The fcontext backend is the default high-performance backend.
The ucontext backend is needed when using Boost context in conjunction with ASAN.
The WinFibers backend...also exists.

https://www.boost.org/doc/libs/1_79_0/libs/context/doc/html/context/cc/implementations__fcontext_t__ucontext_t_and_winfiber.html
2022-05-06 16:14:45 +02:00
Ken Raffenetti
17c32811fb level-zero: add new package (#30253)
Co-authored-by: Robert Cohn <rscohn2@gmail.com>
Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>
Co-authored-by: John Mellor-Crummey <johnmc@rice.edu>
2022-05-06 16:12:23 +02:00
WYF
ad1391db75 gdb: fix run issue with v9.2 (#30491) 2022-05-06 07:53:40 -06:00
Chuck Atkins
d8e010a9f5 ci: Enable the ParaView GUI in the DAVSDK pipeline (#30473)
* ci: Enable the ParaView GUI in the DAVSDK pipeline

* qt: Patch for long paths in ci
2022-05-06 09:36:56 -04:00
Seth R. Johnson
5a55e78073 py-qrcode: new package (#30529) 2022-05-06 07:05:53 -06:00
Todd Gamblin
c1007efe5a slurm: add new versions to address CVEs 2022-29500, 2022-29501 and 2022-29502 (#30525)
Due to CVE 2022-29500, CVE 2022-29501, and CVE 2022-29502, SLURM versions prior to
21.08.8 and 20.11.9 are deprecated.

See:
* https://www.schedmd.com/news.php?id=260#OPT_260
* https://cve.report/CVE-2022-29500
* https://cve.report/CVE-2022-29501
* https://cve.report/CVE-2022-29502

- [x] Deprecate versions prior to 21.08.8 and 20.11.9
- [x] Add 21-08-8-1, 21-08-8-2, and 20-11-9-1
2022-05-06 07:05:41 -06:00
Harmen Stoppels
2f14695882 docs: jobserver & generated makefiles (#30526) 2022-05-06 14:04:48 +02:00
Brian Van Essen
afc2d4284a Added a version for a tag that sets a stable version of master to pull (#30511) 2022-05-06 01:45:38 -06:00
dependabot[bot]
999eee64b8 build(deps): bump docker/build-push-action from 2.10.0 to 3 (#30515)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.10.0 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](ac9327eae2...e551b19e49)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:38:07 +02:00
dependabot[bot]
5d0f2bb461 build(deps): bump docker/setup-qemu-action from 1.2.0 to 2 (#30518)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1.2.0 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](27d0a4f181...8b122486ce)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:37:34 +02:00
dependabot[bot]
ec295a13fd build(deps): bump docker/setup-buildx-action from 1.7.0 to 2 (#30517)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.7.0 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f211e3e9de...dc7b9719a9)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:37:11 +02:00
dependabot[bot]
1b1770ea9e build(deps): bump docker/login-action from 1.14.1 to 2 (#30516)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.14.1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](dd4fa0671b...49ed152c8e)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:36:50 +02:00
Tom Scogland
d3a0ac1c0a Preserve jobserver file descriptors into build environment (#30302)
This ensures that multiple spack instances called from `make` will respect the maximum number of jobs in the POSIX jobserver across packages.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-06 04:09:58 +00:00
Jim Galarowicz
3137e7c61b Add two critical fixes and update for version 1.0.4 (#30507) 2022-05-05 18:37:52 -06:00
Mark Grondona
202214d855 flux-sched: add patch for signedness compare issue on gcc@9.40 (#30514)
Problem: GCC 9.4.0 catches a bad integer comparison in
resource/hlapi/bindings/c++/reapi_cli_impl.hpp in flux-sched@0.22.0
and current master.

Add a patch to work around the problem until an upstream fix is
available.
2022-05-06 00:11:04 +00:00
Ken Raffenetti
b6e1cbd86d mpich: Add ROCm variant (#30502)
* mpich: Add ROCm variant

* fixup
2022-05-05 15:49:41 -06:00
Gregory Lee
e6d1c2d9f3 updated stat build dep requirements (#30505) 2022-05-05 20:24:43 +00:00
Niclas Jansson
1a368419da neko: Add version 0.3.2 (#30497)
* neko: Add version 0.3.2

* Switch to sha256

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

* Fix url pattern

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-05 20:12:48 +00:00
Tom Scogland
6898b7c2f6 harden unit tests, enable basic parallelism (#29593)
* use the init.defaultBranch name, not master

* make tcl and modules/common independent

Both used to use not just the same directory, but the same *file* for
their outputs.  In parallel this can cause problems, but it can also
accidentally allow expected failures to pass if the file is left around
by mistake.

* use a non-global misc_cache in tests

* make pkg tests resilient to gitignore

* make source cache and module directories non-global
2022-05-05 11:48:16 -07:00
Harmen Stoppels
2836648904 Makefile generator for parallel spack install of environments (#30254)
`make` solves a lot of headaches that would otherwise have to be implemented in Spack:

1. Parallelism over packages through multiple `spack install` processes
2. Orderly output of parallel package installs thanks to `make --sync-output=recurse` or `make -Orecurse` (works well in GNU Make 4.3; macOS is unfortunately on a 16 years old 3.x version, but it's one `spack install gmake` away...)
3. Shared jobserver across packages, which means a single `-j` to rule them all, instead of manually finding a balance between `#spack install processes` & `#jobs per package` (See #30302).

This pr adds the `spack env depfile` command that generates a Makefile with dag hashes as
targets, and dag hashes of dependencies as prerequisites, and a command
along the lines of `spack install --only=packages /hash` to just install
a single package.

It exposes two convenient phony targets: `all`, `fetch-all`. The former installs the environment, the latter just fetches all sources. So one can either use `make all -j16` directly or run `make fetch-all -j16` on a login node and `make all -j16` on a compute node. 

Example:

```yaml
spack:
  specs: [perl]
  view: false
```

running

```
$ spack -e . env depfile --make-target-prefix env | tee Makefile
```
generates

```Makefile
SPACK ?= spack

.PHONY: env/all env/fetch-all env/clean

env/all: env/env

env/fetch-all: env/fetch

env/env: env/.install/cdqldivylyxocqymwnfzmzc5sx2zwvww
	@touch $@

env/fetch: env/.fetch/cdqldivylyxocqymwnfzmzc5sx2zwvww env/.fetch/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.fetch/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.fetch/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk env/.fetch/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws env/.fetch/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.fetch/73t7ndb5w72hrat5hsax4caox2sgumzu env/.fetch/trvdyncxzfozxofpm3cwgq4vecpxixzs env/.fetch/sbzszb7v557ohyd6c2ekirx2t3ctxfxp env/.fetch/c4go4gxlcznh5p5nklpjm644epuh3pzc
	@touch $@

env/dirs:
	@mkdir -p env/.fetch env/.install

env/.fetch/%: | env/dirs
	$(info Fetching $(SPEC))
	$(SPACK) -e '/tmp/tmp.7PHPSIRACv' fetch $(SPACK_FETCH_FLAGS) /$(notdir $@) && touch $@

env/.install/%: env/.fetch/%
	$(info Installing $(SPEC))
	+$(SPACK) -e '/tmp/tmp.7PHPSIRACv' install $(SPACK_INSTALL_FLAGS) --only-concrete --only=package --no-add /$(notdir $@) && touch $@

# Set the human-readable spec for each target
env/%/cdqldivylyxocqymwnfzmzc5sx2zwvww: SPEC = perl@5.34.1%gcc@10.3.0+cpanm+shared+threads arch=linux-ubuntu20.04-zen2
env/%/gv5kin2xnn33uxyfte6k4a3bynhmtxze: SPEC = berkeley-db@18.1.40%gcc@10.3.0+cxx~docs+stl patches=b231fcc arch=linux-ubuntu20.04-zen2
env/%/cuymc7e5gupwyu7vza5d4vrbuslk277p: SPEC = bzip2@1.0.8%gcc@10.3.0~debug~pic+shared arch=linux-ubuntu20.04-zen2
env/%/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk: SPEC = diffutils@3.8%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws: SPEC = libiconv@1.16%gcc@10.3.0 libs=shared,static arch=linux-ubuntu20.04-zen2
env/%/yfz2agazed7ohevqvnrmm7jfkmsgwjao: SPEC = gdbm@1.19%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/73t7ndb5w72hrat5hsax4caox2sgumzu: SPEC = readline@8.1%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/trvdyncxzfozxofpm3cwgq4vecpxixzs: SPEC = ncurses@6.2%gcc@10.3.0~symlinks+termlib abi=none arch=linux-ubuntu20.04-zen2
env/%/sbzszb7v557ohyd6c2ekirx2t3ctxfxp: SPEC = pkgconf@1.8.0%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/c4go4gxlcznh5p5nklpjm644epuh3pzc: SPEC = zlib@1.2.12%gcc@10.3.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-zen2

# Install dependencies
env/.install/cdqldivylyxocqymwnfzmzc5sx2zwvww: env/.install/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.install/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.install/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.install/c4go4gxlcznh5p5nklpjm644epuh3pzc
env/.install/cuymc7e5gupwyu7vza5d4vrbuslk277p: env/.install/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk
env/.install/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk: env/.install/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
env/.install/yfz2agazed7ohevqvnrmm7jfkmsgwjao: env/.install/73t7ndb5w72hrat5hsax4caox2sgumzu
env/.install/73t7ndb5w72hrat5hsax4caox2sgumzu: env/.install/trvdyncxzfozxofpm3cwgq4vecpxixzs
env/.install/trvdyncxzfozxofpm3cwgq4vecpxixzs: env/.install/sbzszb7v557ohyd6c2ekirx2t3ctxfxp

env/clean:
	rm -f -- env/env env/fetch env/.fetch/cdqldivylyxocqymwnfzmzc5sx2zwvww env/.fetch/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.fetch/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.fetch/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk env/.fetch/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws env/.fetch/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.fetch/73t7ndb5w72hrat5hsax4caox2sgumzu env/.fetch/trvdyncxzfozxofpm3cwgq4vecpxixzs env/.fetch/sbzszb7v557ohyd6c2ekirx2t3ctxfxp env/.fetch/c4go4gxlcznh5p5nklpjm644epuh3pzc env/.install/cdqldivylyxocqymwnfzmzc5sx2zwvww env/.install/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.install/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.install/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk env/.install/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws env/.install/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.install/73t7ndb5w72hrat5hsax4caox2sgumzu env/.install/trvdyncxzfozxofpm3cwgq4vecpxixzs env/.install/sbzszb7v557ohyd6c2ekirx2t3ctxfxp env/.install/c4go4gxlcznh5p5nklpjm644epuh3pzc
```

Then with `make -O` you get very nice orderly output when packages are built in parallel:
```console
$ make -Orecurse -j16
spack -e . install --only-concrete --only=package /c4go4gxlcznh5p5nklpjm644epuh3pzc && touch c4go4gxlcznh5p5nklpjm644epuh3pzc
==> Installing zlib-1.2.12-c4go4gxlcznh5p5nklpjm644epuh3pzc
...
  Fetch: 0.00s.  Build: 0.88s.  Total: 0.88s.
[+] /tmp/tmp.b1eTyAOe85/store/linux-ubuntu20.04-zen2/gcc-10.3.0/zlib-1.2.12-c4go4gxlcznh5p5nklpjm644epuh3pzc
spack -e . install --only-concrete --only=package /sbzszb7v557ohyd6c2ekirx2t3ctxfxp && touch sbzszb7v557ohyd6c2ekirx2t3ctxfxp
==> Installing pkgconf-1.8.0-sbzszb7v557ohyd6c2ekirx2t3ctxfxp
...
  Fetch: 0.00s.  Build: 3.96s.  Total: 3.96s.
[+] /tmp/tmp.b1eTyAOe85/store/linux-ubuntu20.04-zen2/gcc-10.3.0/pkgconf-1.8.0-sbzszb7v557ohyd6c2ekirx2t3ctxfxp
```

For Perl, at least for me, using `make -j16` versus `spack -e . install -j16` speeds up the builds from 3m32.623s to 2m22.775s, as some configure scripts run in parallel.

Another nice feature is you can do Makefile "metaprogramming" and depend on packages built by Spack. This example fetches all sources (in parallel) first, print a message, and only then build packages (in parallel).

```Makefile
SPACK ?= spack

.PHONY: env

all: env

spack.lock: spack.yaml
	$(SPACK) -e . concretize -f

env.mk: spack.lock
	$(SPACK) -e . env depfile -o $@ --make-target-prefix spack

fetch: spack/fetch
	@echo Fetched all packages && touch $@

env: fetch spack/env
	@echo This executes after the environment has been installed

clean:
	rm -rf spack/ env.mk spack.lock

ifeq (,$(filter clean,$(MAKECMDGOALS)))
include env.mk
endif
```
2022-05-05 10:45:21 -07:00
Brian Van Essen
0dd9e5c86f Enable PyTorch 1.10.x to build on Power systems (#30494)
* Use patches from IBM's Open CE project to enable PyTorch to build on
Power systems.

Cherry-pick a patch to allow earlier versions of PyTorch to build with
CUDA 11.4.

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-05 16:38:45 +00:00
Tamara Dahlgren
011a491b16 package audit: ensure stand-alone test method not include in build-phase testing (#30352) 2022-05-05 18:04:16 +02:00
Massimiliano Culpo
c9714533f3 clingo: add v5.5.2 (#30495)
* clingo add v5.5.2

* Unify dependencies for @spack and @master
2022-05-05 08:58:23 -07:00
David
faeffdfaf2 Update totalview package.py with new version and maintainer (#30341)
* Update totalview package.py with new version and maintainer

* Update totalview/package.py version order

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-05 08:37:56 -07:00
Dom Heinzeller
a15a69a769 Bug fix for mesa-glu: if gl is provided by mesa, need to specify argument to ./configure (#30082) 2022-05-05 08:35:54 -07:00
Hans Fangohr
9a33121859 octopus: update to 11.4 and add tests (#30321)
* octopus: adding versions up to 11.4

* octopus: add smoke tests

* octopus: add necessary flags for gcc@10

* octopus: update to compilation and dependencies

* octopus: adding new variants

* octopus: remove 'poke' (as this poke is not in spack [yet])

* octopus: allow compilation from git repo develop branch

* octopus: adapt to spack style requirements

* octopus: add maintainer

* octopus: make tests after install optional

Thank you @tldahlgren

* octopus: follow recommended practice for test input data

Move the two configuration files we use for smoke tests into `test`
subdirectory. Thanks @tldahlgren.

* Adding maintainer

with their agreement by email

* octopus: reduce duplication of flags

- part of code review

* octopus: https is preferred over http

* octopus: remove .99 from versioning information

Thanks to https://github.com/spack/spack/pull/26402, we can drop the
"2:3.99" notation when we mean all versions 2.x and 3.x

Examples: b9e72557e8 (diff-b8373d30b3a141c495c2281273ee6184fc513413142afaf2adac1f406cd6b0d7)

(from review)

* octopus: args.extend([x]) -> args.append(x)

(hint from review)
2022-05-05 08:33:16 -07:00
Ken Raffenetti
e88396e5ed yaksa: Add support for cuda_arch variants (#30471) 2022-05-05 08:12:21 -07:00
Harmen Stoppels
dcd2f8a4ed ucx: overhaul package recipe (#30215)
- hyphens to underscore in variant names (e.g. `~ib_hw_tm` instead of `~ib-hw-tm`)
- disable docs, disable go, drop the unused `doc` variant
- `+static +shared` => `libs=static,shared`
- `vfs` support (add libfuse@3: dep)
- fix `backtrace_detail` for UCX 1.12+ (`--enable-backtrace-detail` => `--with-bfd`)
- group variants and sort
2022-05-05 15:07:34 +02:00
Valentin Volkl
381ec8abac baurmc: add new package (#30245)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-05 13:30:45 +02:00
Jennifer Green
fd6d226524 git: adding subtree support, post-install step, reordered deps (#30400) 2022-05-05 11:08:51 +02:00
Adam J. Stewart
cef9245ee1 LAPACK: add API compatibility versions (#29828) 2022-05-05 10:38:20 +02:00
dlkuehn
24fecdc738 rnaz: add version 2.1.1 and git repository to newest version. (#30349)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-05 10:32:41 +02:00
snehring
4a228055e2 trimmomatic: adding more flexible java dep (#30488) 2022-05-05 10:21:20 +02:00
Wouter Deconinck
17ede26cea flatbufffers: patches are in v2.0.0 (#30492) 2022-05-05 10:14:10 +02:00
SXS Bot
8bcccbeac7 spectre: add v2022.05.05 (#30493)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2022-05-05 09:49:25 +02:00
Greg Becker
e6346eb033 spack external find: add search path customization (#30479) 2022-05-05 08:59:44 +02:00
Seth R. Johnson
a5d06325e7 qt: fix ~opengl and use_spack_dep (#30487) 2022-05-04 22:41:37 -04:00
Dan Bonachea
9bb23a7f46 UPC++: minor packaging improvements (#30482)
* upcxx: Add `spack external find` support

* upcxx: Minor tweaks to Shasta support
2022-05-04 15:27:21 -07:00
Andrea Valenzuela
5a434cb840 Add scitokens-cpp recipe and also as a variant for xrootd (#30362)
* Add scitokens-cpp recipe

* Add scitokens-cpp variant in xrootd

* Fix typo

* Fix flake8 style errors

* Update license date

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-04 13:03:50 -07:00
iarspider
0be5dea13f Fix professor recipe (#30002)
* [WIP] Cleanup professor dependencies

* Add dependency on ROOT
* Remove direct dependency on wxwidgets
    * `prof-I` tool requires matplotlib with wxwidgets backend, made that optional

* Update package.py

* Update package.py (#38)

* Update package.py

* Update package.py
2022-05-04 11:19:43 -07:00
David
b6f2a70f7b Update gtk-doc depends for tce findings (#30337)
gtk-doc can call pkg-config when used at runtime, so pkgconfig needs
to be a runtime requirement.

itstool needs to be a build-time requirement.
2022-05-04 11:17:34 -07:00
Olivier Cessenat
0d3d1ea7d0 gxsview: vtk9 no longer builds libvtkjpeg... (#30340) 2022-05-04 11:12:49 -07:00
Andrea Valenzuela
39c4a66e5b Add checksum for py-prompt-toolkit@3.0.29 (#30330)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-05-04 11:53:53 -06:00
Carlos Bederián
0bd0ba53a3 curl: tls=mbedtls requires fPIC (#30447) 2022-05-04 10:53:33 -07:00
snehring
e24373f262 gatk: updating and expanding java dependency (#30476) 2022-05-04 17:51:44 +00:00
Adam J. Stewart
b7f33fb393 Python package: add backup BINDIR setting (#30408) 2022-05-04 10:50:18 -07:00
Chuck Atkins
250d5d2c00 qt: Assimp dependency specificationa is more nuanced (#30460)
libassimp has been a dependency for all of 5.x but expressing that has
varied significantly throughout the 5.x lifecycle:

  v5.0:  qt3d uses internal-only libassimp
  v5.5:  external-only libassimp
  v5.6:  either internal or external libassimp via autodetection
  v5.9:  user-selectable internal-vs-external via -assimp
  v5.14: additional qtquick3d module uses -assimp
  v5.15: qtquick3d switches to the -quick3d-assimp option
    * current bug where the incorrect target is setup
2022-05-04 13:30:15 -04:00
Sergey Kosukhin
8b0f6187e0 bugfix: fix filter_compiler_wrappers for Cray compiler (#29786) 2022-05-04 10:13:12 -07:00
Adam J. Stewart
8bf988abb9 GDAL: add v3.4.3 (#30474) 2022-05-04 16:34:17 +00:00
Bitllion
aab7dcaad9 add package: abacus (#30416)
* 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
2022-05-04 09:29:08 -07:00
Mikael Simberg
5b68fa1ecb Add mimalloc package with use in HPX and pika (#30457)
* Add mimalloc package

* Add mimalloc as allocator option to pika

* Add mimalloc as allocator option to hpx

* Set git property globally instead of per-version in pika, hpx, and mimalloc packages

Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
2022-05-04 09:19:15 -07:00
acastanedam
4d03a2768e gpi-2_fix_deps: setup 'gawk' and 'sed' dependencies (#29740)
Strictly, `sed` is a `build` and `run` dependency in all gpi-2
versions, whereas `gawk` is a `run` (`build` and `run`) dependency for
gpi-2 versions greater or equal (less) than 1.4.0
2022-05-04 09:14:21 -07:00
Scott Wittenburg
6b6147d5a0 gitlab: Remove temporary storage url from all stacks (#29949)
Gitlab pipelines run for spack already have other S3 storage locations
configured for storage of binaries, so this PR removes the redundant
per-pipeline mirror.  As a result, the "cleanup" jobs will no longer be
generated at the end of each pipeline, removing one possible point of
pipeline failure.
2022-05-04 09:18:47 -06:00
Andrea Valenzuela
6702e87ee4 Add checksum for version 1.1.13 and update dependencies (#30470) 2022-05-04 10:08:43 -05:00
fpruvost
7ad5ca2cc3 chameleon: add maintainers information (#30472) 2022-05-04 08:57:44 -06:00
Auriane R
2418cfb79b pika: Add 0.4.0 release (#30469) 2022-05-04 16:29:30 +02:00
Ross Miller
9486c76d70 Use gccgo to bootstrap go on aarch64 (#30350)
The go-bootstrap package doesn't work on aarch64 platforms, so the only way
to build Go is to use gccgo.

Also, some versions of gccgo have a bug that prevents them from compiling
go (see golang/go#47771), so this patch limits gcc to versions newer than
10.4.0 or 11.3.0.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-04 16:16:53 +02:00
fpruvost
dc99fe98b9 chameleon: add new package (#30368) 2022-05-04 08:09:54 -06:00
Andrea Valenzuela
cb97b25646 Add checksum for py-plac@1.3.5 (#30327)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-05-04 08:06:11 -06:00
Andrea Valenzuela
a84593a510 Add checksum for py-networkx@2.7.1 and fix python dependency (#30326)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-05-04 08:05:51 -06:00
Paul Ferrell
2f6556ea82 mesa: intel needs c99 standard specified under intel. (#30334) 2022-05-04 14:21:25 +02:00
snehring
b4213b2c60 maq: adding perl dep, addressing gcc errors (#30312) 2022-05-04 14:07:02 +02:00
lpoirel
e378d96d15 namd: place an upper bound on the charmpp dependency version (#30397)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-04 13:58:25 +02:00
Axel Huebl
715686f0ec WarpX: add v22.05 (#30467)
Update `warpx` & `py-warpx` to the latest release, `22.05`.
2022-05-04 00:57:42 -06:00
snehring
d0fdaf6d03 igv: changing to 'all platforms' version. Adding igvtools variant. (#30379) 2022-05-04 08:29:06 +02:00
Adam J. Stewart
b8ebaa0813 py-shapely: add v1.8.2 (#30466) 2022-05-04 07:43:52 +02:00
Massimiliano Culpo
5c7d6c6e10 Remove deprecated "--run-tests" option of "spack install" (#30461) 2022-05-04 07:43:29 +02:00
eugeneswalker
96f9a1d88b boost: fix v1.78 build with oneapi (#30463) 2022-05-03 23:29:37 -06:00
Carlos Bederián
f5eb9fb501 autodock-vina: add versions up to v1.2.3, fixes (#30443)
* C++ package, use spack_cxx
* download from github, add 1.2.x versions
* remove patches already present in 1.1.2-boost-new release
* specify boost dependencies
2022-05-04 06:24:15 +02:00
Paul Ferrell
dd8f533e97 paraview: add LANL/TCE used variants for Paraview (#30336)
- Added +eyedomelighting
- Added +pagosa
- Added +fortran
- Added pandas dependency and min version
2022-05-04 06:18:35 +02:00
Glenn Johnson
bab41de538 ncl: constrain hdf5 dependency to version 1.10 (#29607) 2022-05-03 23:11:34 -05:00
Harsh Bhatia
17c1808ef7 new package: py-pytaridx (#30444)
* new package: pytaridx

* fixed copyright year

* Update git link

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

* added type in python depends

* added pypi link

* Update package.py

* Update package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-03 23:10:49 -05:00
snehring
157ee3458f ea-utils: new version, cleanup, and newer gcc compat (#30204) 2022-05-04 06:06:59 +02:00
dependabot[bot]
3ce8bff22e build(deps): bump docker/setup-buildx-action from 1.6.0 to 1.7.0 (#30387)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](94ab11c41e...f211e3e9de)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-04 06:04:38 +02:00
Ethan Stam
281165693a ParaView: let paraview build its own verdict tpl (#30332) 2022-05-04 06:03:52 +02:00
eugeneswalker
f8653dfb9b mesa@22: gallium-xlib -> xlib (#30465) 2022-05-04 05:53:09 +02:00
Frank Willmore
a6589daa87 Vacuumms 1.1.1 (#30458)
* adding updated package for vacuumms

* deprecating old version

* add link to DOI

* style: trailing whitespace

* Update var/spack/repos/builtin/packages/vacuumms/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-05-03 19:13:43 -06:00
Richard Berger
43a503c195 flcl: add new versions (#30363)
* flcl: add new versions

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

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

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-03 19:01:32 -06:00
Keita Iwabuchi
1eff83990b Metall Package: add v0.20 (#30446)
* Metall package: add dependency to GCC for build test

* Package Metall: add v.017

* Package Metall: update the package file

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

Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>

* Metall package: add v0.18 and v0.19

* Metall Package: add v0.20

Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2022-05-03 16:46:04 -07:00
Lucas Frérot
17e71a675a tamaas: new package (#30449)
* tamaas: added new package

* tamaas: passing dependency prefixes to build

* tamaas: Python 3.7 dependency

* tamaas: compiler conflicts and correct ~python

* tamaas: no newline in docstring

* tamaas: correct python build dep. when ~python
2022-05-03 16:17:17 -07:00
Adam J. Stewart
872aa32a00 py-matplotlib: add v3.5.2 (#30459) 2022-05-03 17:06:04 -06:00
Ken Raffenetti
4c19410669 mpich: add datatype engine variant (#30257)
Starting with MPICH 3.4, we offer different datatype engine options
(dataloop or yaksa). The default is 'auto', which will choose based on
the device configuration. Starting with MPICH 4.0, building against an
external yaksa library is supported.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-03 22:12:19 +02:00
Massimiliano Culpo
a5e92893d3 Simplify fixture used to test spack info (#30456) 2022-05-03 09:39:00 -07:00
Chuck Atkins
bdef031d4e opengl: Fix opengl concretization issues from missing versions (#30331) 2022-05-03 10:51:41 -05:00
asesidaa
a10f5656ab Add detection for hpcx-mpi in esmf (#30280) 2022-05-03 17:45:04 +02:00
Olivier Cessenat
653ed78645 keepassxc: add v2.7.1 (#30450) 2022-05-03 16:54:04 +02:00
haralmha
bc7fc8f456 flatbuffers: add v2.0.0 (#30455) 2022-05-03 16:53:24 +02:00
Ken Raffenetti
55bbbe8657 yaksa: add ROCm variant (#30222) 2022-05-03 16:52:31 +02:00
Mosè Giordano
a6dcce4cf2 swiftsim: do not build with -Werror (#30454) 2022-05-03 07:50:23 -07:00
Seth R. Johnson
e301de98cb Revert "qt: Fix the assimp dependency specification (#30435)" (#30451)
This reverts commit 4219b89faa.
2022-05-03 10:16:56 -04:00
Chris Richardson
6ecee4e6d5 Fix install of xsimd with xtensor (#30196) 2022-05-03 15:03:28 +02:00
Olivier Cessenat
2d89bc350c htop: add v3.2.0 (#30452) 2022-05-03 06:38:14 -05:00
Sinan
14e5497758 postgresql: add libs property (#30392)
Co-authored-by: sbulut <sbulut@3vgeomatics.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-03 09:24:59 +02:00
Brian Van Essen
4576fbe648 OpenCV and OpenBLAS: add external find support (#30240)
Added support for finding the OpenCV package via the find external
command. Included support for identifying variants based on available
shared libraries.

Added support to finding the OpenBLAS package via the find external
command.

Enabled packages to show that they can be discovered via the find
external command in the info message.

Updated the OpenCV and OpenBLAS packages to use the extensible search
mechanism for library extensions on multiple OS platforms.

Corrected how find externals works on Darwin for OpenCV and OpenBLAS
to accommodate that the version numbers are placed before the file
extension instead of after it, as on Linux.

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-03 09:04:50 +02:00
Sinan
84611b5f29 package/gdal fix config issue with +pg for newer gdal (#30421)
* package/gdal fix config issue with +pg for newer gdal

* fix version logic

* improve style

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
2022-05-02 22:06:42 -05:00
Harsh Bhatia
cbf0c3a8c4 update version of py-mock, py-msgpack, py-gridformats, py-pyrsistent (#30445)
* add v3.0.3 for py-mock

* added v0.6.0 and 0.6.1 for py-msgpack

* added v0.4.0 for py-gridformats

* added v0.16.0 for py-pyrsistent
2022-05-02 20:17:54 -06:00
Chuck Atkins
d6c1619b67 mesa: Add v22.0.2 (#30439)
This adds v22.0.2 which also drops swr support.
2022-05-02 20:13:47 -06:00
Michele Martone
d23d611f35 librsb: added v1.3.0.1 (#30425)
* librsb: added v1.2.0.10 (#26043)

* librsb: add v1.2.0.11/v1.3.0.0 (#28636)

* librsb: add v1.3.0.1 (#30424)

* unconflict clang

* address apparent style issues

given
 https://github.com/spack/spack/runs/6248126997?check_suite_focus=true
and its excerpt

  var/spack/repos/builtin/packages/librsb/package.py:27: [E265] block comment should start with '# '
  var/spack/repos/builtin/packages/librsb/package.py:52: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:53: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:53: [E501] line too long (89 > 88 characters)
  var/spack/repos/builtin/packages/librsb/package.py:54: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:55: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:56: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:57: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:59: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:60: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:62: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:63: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:64: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:66: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:68: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:70: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:71: [E211] whitespace before '('

let these changes flow in.

* +asan+native: mark as conflict; thanks @tldahlgren

* +asan conflict grouped with other conflicts

As suggested as good Spack style by @tldahlgren .
2022-05-02 16:41:43 -06:00
Weiqun Zhang
8ed8922af5 amrex: add v22.05 (#30441) 2022-05-02 15:17:48 -06:00
laestrada
01c17562f5 gchp: added version 13.4.0 (#30442) 2022-05-02 13:55:50 -07:00
dlkuehn
c97d931ea7 masurca: add version 4.0.9 (#30440)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-05-02 14:50:10 -06:00
Massimiliano Culpo
21bf0cf43c Fix issue in CI with Git 2.35 (#30436) 2022-05-02 20:49:53 +00:00
Ken Raffenetti
e2c72e583f spack ci: Fix typo in error message (#30438) 2022-05-02 20:33:54 +00:00
Chuck Atkins
4219b89faa qt: Fix the assimp dependency specification (#30435) 2022-05-02 16:22:13 -04:00
Carlos Bederián
253b208537 mesa: add 21.3.8 (#30412) 2022-05-02 12:40:30 -04:00
Kyle Gerheiser
4509e96704 git-lfs: add build-tools tag (#30431)
Let Spack find external git-lfs by default. There seemed to be agreement to add git-lfs to the build tools in https://github.com/spack/spack/pull/29031.
2022-05-02 09:02:42 -06:00
Stephen Hudson
f0bb7c74a9 libEnsemble: add v0.9.0 (#30409) 2022-05-02 08:26:36 -06:00
Erik Schnetter
c93fd4c600 netlib-lapack: add v3.10.1 (#30198) 2022-05-02 16:11:37 +02:00
Hadrien G
76d9df2cf1 acts: add v18.0.0 (#30219)
- Keep long lists in alphabetical order for easier reading
- Add a placeholder for Exa.TrkX plugin since we're missing a dep on the
  Spack side
- Add support for the ONNX plugin since Spack now has an ONNX runtime
  package
- Use spack's pybind11 package now that we're given the option to do so
2022-05-02 16:02:04 +02:00
Valentin Volkl
d2f67ff7b9 lcio: fix possible issue with root's cxxstd (#30241) 2022-05-02 15:55:15 +02:00
Jean-Paul Pelteret
b5b62b0c82 ADOL-C: Add a patch to force Colpack detection to fail (#30413) 2022-05-02 15:52:38 +02:00
eugeneswalker
e691d6df64 binutils@2.38 %gcc: add -fPIC -fcommon -Wl,-z,notext (#30345) 2022-05-02 15:38:07 +02:00
Luc Berger
25206c86c4 kokkos-kernels: add v3.6.00 (#30316) 2022-05-02 15:31:44 +02:00
Xavier Delaruelle
144d7cd932 environment-modules: add v5.1.0 (#30419) 2022-05-02 08:57:19 +02:00
Sebastian Ehlert
e7eceaf4e6 dftd4: add v3.4.0 (#30423) 2022-05-02 08:56:43 +02:00
Wouter Deconinck
f943cc0149 root: add v6.26.02 (#30426) 2022-05-02 08:55:57 +02:00
Wouter Deconinck
879949b78e gaudi: add v36.5 (#30427) 2022-05-02 08:54:50 +02:00
Michael Kuhn
38e5b96431 sysstat: add 12.4.5 and fix build failures (#30121)
This adds the newest stable version (and removes old development
versions), a few missing dependencies and workarounds for build
failures. Without the environment variables, sysstat will try creating
directories in `/var/log`, and without `--disable-file-attr`, sysstat
will try to change file ownership.
2022-05-02 08:24:11 +02:00
Todd Gamblin
9a028e3b15 bugfix: don't calculate spack tutorial version from version info
A recent switch to the way we do `develop` versioning broke this.  We
should hard-code the latest tutorial version.
2022-05-01 23:13:50 -07:00
Harmen Stoppels
f2c1b40e58 libxml2: new url, add 2.9.13 (#30401) 2022-04-29 23:22:24 -06:00
snehring
06b5217c01 hapcut2: adding new version 1.3.1 (#30383) 2022-04-29 16:06:47 -06:00
Paul R. C. Kent
52bf7f4157 Add 3.14.0 (#30384) 2022-04-29 14:23:12 -07:00
snehring
31eb759892 beagle: adding 5.4, making java dep more flexible. (#30354) 2022-04-29 14:11:20 -07:00
Cody Balos
b5f2c20f74 sundials: add 6.2.0 and logging-level variant (#30353) 2022-04-29 14:07:55 -07:00
Dan Bonachea
cf48588c45 Upcxx 2022.3.0 update (#30393)
* upcxx,gasnet: Add 2022.3.0 version hashes
* gasnet: Add ofi and ucx experimental conduits
* gasnet: Add CUDA and ROCm/HIP variants
* upcxx: Add Cray EX/Shasta detection and auto-config
* upcxx: Add ROCm/HIP support
* Use implicit dependencies from CudaPackage, ROCmPackage
2022-04-29 20:56:21 +00:00
Erik Schnetter
e59cde9b7f gsl: New version 2.7.1 (#30364) 2022-04-29 13:32:27 -07:00
snehring
7e54bddc0c gdal: changing behavior of configure for +xml2 with 3.0+ (#30405)
* gdal: changing behavior of configure for +xml2 with 3.0+

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-29 20:11:46 +00:00
snehring
7f1411d131 diamond: updating to 2.0.15 (#30386) 2022-04-29 13:58:30 -06:00
dmentock
f0afceeb9c added libpng version 1.5.30 to libpng package (#30395) 2022-04-29 12:43:30 -07:00
Satish Balay
7ee15553e4 petsc, py-petsc4py: add 3.17.1 (#30399) 2022-04-29 12:40:44 -07:00
haralmha
d062d2e92b hto4l: Set GSL_HOME (#30402) 2022-04-29 12:32:40 -07:00
Erik Schnetter
7c631d1c55 autoconf-archive: New version 2022.02.11 (#30403) 2022-04-29 12:31:23 -07:00
Asher Mancinelli
6df71118fb Pass blas flags to hsl lflags when ^coinhsl+blas (#30309) 2022-04-29 12:46:43 -06:00
Erik Schnetter
ed7812b8be sqlite: New version 3.38.3 (#30370) 2022-04-29 12:02:55 -06:00
agoodLANL
ff03ac3e06 itstool: version 2.0.7 and py2 dependency (#30375)
* Added version 2.0.7 and a conflict

* added maintainer
2022-04-29 10:43:18 -06:00
Erik Schnetter
b6ae2436be libjpeg-turbo: New version 2.1.3 (#30366) 2022-04-29 10:42:55 -06:00
Andrea Valenzuela
ec266a86b6 Add checksum for py-prettytable@3.2.0 (#30329)
* Add checksum for py-more-itertools@8.12.0 and fix python dependency

* Add checksum for py-prettytable@3.2.0

* Package version 8.11.0 is the only version that requires python 3.6+

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

* Add reference to python@3.6 support when 8.11

* Revert "Add reference to python@3.6 support when 8.11"

This reverts commit 0ba0002193.

* Add python 3.7: requirement

* Revert range for python 3.6

* Revert py-more-itertools modifications

Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-29 10:33:04 -05:00
Jennifer Green
ecbac17217 htop: new variants (#30398)
* htop variants for debug, hwloc, unicode support

* removed redundant ncurses dep
2022-04-29 08:42:42 -06:00
Erik Schnetter
43a84f58e9 libjpeg: New version 9e (#30365) 2022-04-29 06:46:34 -06:00
Harmen Stoppels
9ed37742e9 squashfs: new version, deprecated older versions (#30361) 2022-04-29 11:17:44 +02:00
Harmen Stoppels
dbe2c44a25 netcdf-fortran: add compat bound for netcdf-c (#30358) 2022-04-29 11:16:51 +02:00
luker
f40780310b CrayPE_binutils package fix for CCE (#30338) 2022-04-29 09:36:52 +02:00
Massimiliano Culpo
c06f69d0bf spack.yaml: add concretizer.yaml to the schema (#30376) 2022-04-29 01:06:36 -06:00
Sinan
8a6b73bb2c package/kealib: add libs property (#30391)
Co-authored-by: sbulut <sbulut@3vgeomatics.com>
2022-04-29 02:38:19 +00:00
lpoirel
9e6298569e Delocalize type output for bash completion (#30360) 2022-04-28 23:24:10 +00:00
Sergey Kosukhin
ad0430f463 netcdf-fortran: do not build with MPI wrappers (#30371) 2022-04-29 01:19:42 +02:00
Erik Schnetter
7d26d56e59 meson: New version 0.62.1 (#30367) 2022-04-28 14:26:36 -06:00
Erik Schnetter
06988c38fd reprimand: New version 1.4 (#30369) 2022-04-28 12:58:11 -07:00
kwryankrattiger
f6d2b07368 SDK: Require paraview@5.10: in the ECP SDK (#30372)
* SDK: Require paraview@5.10: in the ECP SDK

* SDK: Updated dev src conflicts to be more explicit
2022-04-28 13:38:42 -06:00
Peter Scheibel
bb43308c44 Add command for reading JSON-based DB description (now with more tests) (#29652)
This is an amended version of https://github.com/spack/spack/pull/24894 (reverted in https://github.com/spack/spack/pull/29603). https://github.com/spack/spack/pull/24894
broke all instances of `spack external find` (namely when it is invoked without arguments/options)
because it was mandating the presence of a file which most systems would not have.
This allows `spack external find` to proceed if that file is not present and adds tests for this.

- [x] Add a test which confirms that `spack external find` successfully reads a manifest file
      if present in the default manifest path

--- Original commit message ---

Adds `spack external read-cray-manifest`, which reads a json file that describes a
set of package DAGs. The parsed results are stored directly in the database. A user
can see these installed specs with `spack find` (like any installed spec). The easiest
way to use them right now as dependencies is to run
`spack spec ... ^/hash-of-external-package`.

Changes include:

* `spack external read-cray-manifest --file <path/to/file>` will add all specs described
  in the file to Spack's installation DB and will also install described compilers to the
  compilers configuration (the expected format of the file is described in this PR as well including examples of the file)
* Database records now may include an "origin" (the command added in this PR
  registers the origin as "external-db"). In the future, it is assumed users may want
  to be able to treat installs registered with this command differently (e.g. they may
  want to uninstall all specs added with this command)
* Hash properties are now always preserved when copying specs if the source spec
  is concrete
  * I don't think the hashes of installed-and-concrete specs should change and this
    was the easiest way to handle that
  * also specs that are concrete preserve their `.normal` property when copied
    (external specs may mention compilers that are not registered, and without this
    change they would fail in `normalize` when calling `validate_or_raise`)
  * it might be this should only be the case if the spec was installed

- [x] Improve testing
- [x] Specifically mark DB records added with this command (so that users can do
      something like "uninstall all packages added with `spack read-external-db`)
  * This is now possible with `spack uninstall --all --origin=external-db` (this will
    remove all specs added from manifest files)
- [x] Strip variants that are listed in json entries but don't actually exist for the package
2022-04-28 10:56:26 -07:00
Massimiliano Culpo
6a9df34abd ASP-based solver: discard unknown packages from reuse (#30357)
* ASP-based solver: discard unknown packages from reuse

This is an add-on to #28259 that cover for the case of
a single package.py being removed from a repository,
rather than an entire custom repository being removed.

* Add unit test
2022-04-28 10:40:28 -07:00
Frédéric Simonis
1006dd54de Add BUILD_TESTING to standard CMake arguments (#30374)
CTest determines whether to enable tests using the BUILD_TESTING variable.
This should be used by projects to conditionally enable the compilation of tests.
Spack knowns which packages have to run tests and can thus automatically define this variable.
2022-04-28 17:03:13 +00:00
Andrea Valenzuela
cf905ec14a Add checksum for py-poetry-core@1.0.8 (#30359)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-04-28 11:24:08 -05:00
Andrea Valenzuela
19bb4bdeb8 Add checksum for py-more-itertools@8.12.0 and fix python dependency (#30325)
* Add checksum for py-more-itertools@8.12.0 and fix python dependency

* Package version 8.11.0 is the only version that requires python 3.6+

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

* Add reference to python 3.6 dependency

Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-28 10:23:10 -06:00
Andrew Davison
47f9e71302 py-quantities: add versions from 0.12.2-13.0 (#28586)
* py-quantities: add versions from 0.12.2-13.0

* Attempt to fix the version specification

* add maintainer, implement suggestions from reviewer
2022-04-28 11:14:50 -05:00
Chris White
2e9da47a2d Ascent/Conduit: re-add fortran compiler that was mistakenly removed (#30351) 2022-04-28 07:09:40 -07:00
Greg Becker
3e863848f8 build_env/test_env: add concretizer args (#30289) 2022-04-28 11:37:15 +02:00
Harmen Stoppels
e7a0b952ab install --overwrite: use rename instead of tmpdir (#29746)
I tried to use --overwrite on nvhpc, but nvhpc's install size is 16GB. Seems
better to do os.rename in the same directory than moving the directory to
`/tmp`.

- [x] install --overwrite: use rename instead of tmpdir
- [x] use tempfile
2022-04-28 01:42:42 -06:00
Patrick Broderick
8b85b33ba5 Add spiral fftx (#28583)
* add fftx package; rename spiral to spiral-software and add spiral-package-*
* Update year in copyright notice
* Add package description to FFTX/package.py
* Changes to package files for SPIRAL & FFTX for PR
* Update package definitions
* remove unnecessary lines
2022-04-27 22:26:44 -07:00
Larry Knox
90dafdd9f0 Add HDF5 version 1.12.2. (#30348) 2022-04-27 22:50:28 -06:00
Paul R. C. Kent
d989478154 llvm: Add 14.0.1 14.0.2 (#30347) 2022-04-27 20:22:40 -06:00
Wileam Y. Phan
ebd930ace9 Add Python chmod +x equivalent in fpm package (#30342) 2022-04-28 00:16:19 +00:00
Erik Schnetter
53e0e7aabe z3: New version 4.8.16 (#30328) 2022-04-27 17:10:15 -07:00
dlkuehn
27cbc4ebc8 tcsh: add version 6.24.00 (#30346)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-27 23:43:06 +00:00
Asher Mancinelli
2515cafb9c hiop: Enable barebones testing (#30313)
* Enable barebones testing

Run 6 test cases representative of the entire HiOp test suite.

* Apply style changes

* Dont use unpacking for py2 compat
2022-04-27 23:08:33 +00:00
Annop Wongwathanarat
5593611b5e armpl: add new package (#30305)
Co-authored-by: Annop Wongwathanarat <annop.wongwathanarat@arm.com>
2022-04-27 15:25:47 -07:00
dlkuehn
f544b051c4 orthofinder: add version 2.5.4 (#30344)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-27 22:23:34 +00:00
Luc Berger
c534e70950 Kokkos: update package for release 3.6.00 (#30315) 2022-04-27 13:52:15 -07:00
Paul Ferrell
9ffb3b4ac0 mvapich2 MPI_ROOT needed in modules (#30335)
We've found that when using mvapich2 via modules, we need to set the MPI_ROOT
environment variable.
2022-04-27 13:41:06 -07:00
kwryankrattiger
893c5271ac Update ascent and deps for 0.8.x (#29954)
* Update package versions for Ascent/SDK

* Umpire build static for cuda from dray

* Propagate cuda_arch for ascent and dray packages.

* Ascent: Update dependency versions for ascent@0.8:

* VTK-h: Patch +shared+cuda for VTK-h 0.8.x

* Ascent: Patch to allow @0.8: +shared+cuda

* Turn off building ascent tests.

* Update ascent patch

* WIP: Ascent: Update patch to configure MPI build with CUDA

* Ascent: Tests require vtk-m+testlib

* WIP: Ascent: Constrain 0.7 for vtk-h

* Ascent: Directly depend on VTK-m
2022-04-27 13:39:18 -06:00
eugeneswalker
f7a9456553 e4s ci: uncomment umpire (#29776) 2022-04-27 18:22:46 +00:00
kwryankrattiger
8250235207 Mesa: Constrain compatible LLVM version (#30102)
Base on release date, not actual compatibility, because LLVM
version compatibility is not documented clearly in Mesa for
upper version limits.
2022-04-27 12:03:02 -06:00
Lucas Frérot
eb51591b02 SCons: added versions 4.0.0-4.3.0 (#30296)
* SCons: added versions 4.0.0-4.3.0

* scons: correct package name casing in url_for_version
2022-04-27 11:08:30 -05:00
Brian Van Essen
06e7249850 Allow PyTorch to forward gcc-toolchain cxxcflag to CUDA toolchains (#30318) 2022-04-27 10:48:06 -05:00
Martin Diehl
c4ad003af2 damask-*: add v3.0.0alpha6 (#30124) 2022-04-27 16:01:36 +02:00
dependabot[bot]
1243717012 build(deps): bump actions/checkout from 2 to 3.0.2 (#30235)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...2541b1294d2704b0964813337f33b291d3f8596b)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-04-27 13:47:50 +02:00
snehring
da3d315cba blat: add v37 (#30166) 2022-04-27 12:26:57 +02:00
Michael Kuhn
48ff4c7679 rust: add 1.60.0 and fix libgit2 incompatibility (#30123) 2022-04-27 12:22:52 +02:00
liuyangzhuan
9fc6494a28 Added GPTune v3.0.0 and its dependency py-pymoo (#30119) 2022-04-27 12:21:44 +02:00
Valentin Volkl
9d4cedac51 tauola: fix ~lhapdf (#30190) 2022-04-27 12:16:08 +02:00
Derek Ryan Strong
f66139dfe4 Add fix for binutils 2.38 +gas makeinfo issue (#30209)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-27 12:11:48 +02:00
nfurmento
79e0a3dad0 Starpu and Fxt: new packages (#29285) 2022-04-27 12:10:09 +02:00
dependabot[bot]
3dbbf3a101 build(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0 (#30234)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](e3c560433a...81cd2dc814)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 11:26:19 +02:00
Harmen Stoppels
f273e7d329 openmpi: add toggle for rsh plm (#30251)
By default `openmpi` needs `rsh` from `openssh`, which is a somewhat
redundant dependency for clusters using slurm. This PR adds a toggle to
allow users to disable the ssh/rsh plm altogether.
2022-04-27 11:15:48 +02:00
snehring
351072cd9f gcta: rework package recipe (#30286) 2022-04-27 08:56:31 +00:00
Adam J. Stewart
0b23f1be05 py-pil: deprecate package (#30308) 2022-04-27 02:34:29 -06:00
Glenn Johnson
b8015a71e9 relion: add altcpu variant and fix fftw (#30097)
This package was not setting FFTW when +mklfft was used with +cuda.
Since both were set to 'True', the default build was not linked to
any FFTW, leading to a run time error. It seems MKL support was
conflated with alternative CPU acceleration support. This PR does the
following:

- adds the altcpu variant to specify non-GPU/CPU acceleration
- sets a conflict between +altcpu and +cuda
- sets an FFTW implementation
- sets fltk+xft when +gui to get a decent looking GUI interface
- sets tbb dependency only when +altcpu
- adds dependency on ctffind
- adds variant and dependency on motioncor2
- sets defaults for
    - qsub template location
    - ctffind location
    - motioncor2 location

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-27 10:30:39 +02:00
snehring
739f040fa8 bucky: fix compile errors with newer gccs (#30314) 2022-04-27 02:11:02 -06:00
Massimiliano Culpo
d5fc859f46 ASP-based solver: handle installed specs from unknown namespaces (#30092)
fixes #28259

This commit discard specs from unknown namespaces from the
ones that can be "reused" during concretization. Previously
Spack would just error out when encountering them.
2022-04-27 02:10:46 -06:00
Erik Schnetter
753f4a4bc3 reprimand: update requests on boost (#30109) 2022-04-27 09:46:22 +02:00
Lhxone
8c280d98ca suntans: add new package (#30149) 2022-04-27 09:35:40 +02:00
eugeneswalker
d5e1fa5771 py-cryptography@35: tell cargo to use cli git, not cargo internal git… (#30307) 2022-04-26 20:58:28 -06:00
Michael Kuhn
f30b79b2c5 libgit2: add 1.4.3 and 1.3.1 (#30122) 2022-04-26 20:54:30 -06:00
Erik Schnetter
54146d44f9 fossil: New package (#30311)
* fossil: new package

* fossil: Format code
2022-04-27 00:47:24 +00:00
Tamara Dahlgren
0c31ab87c9 Feature: Allow re-use of run_test() in install_time_test_callbacks (#26594)
Allow re-use of run_test() in install_time_test_callbacks

Co-authored-by: Greg Becker <becker33@llnl.gov>
2022-04-26 17:40:05 -07:00
Lhxone
e49cccb0d9 New package: CaNS (#30218) 2022-04-27 00:33:36 +00:00
haralmha
7a1841c464 hadoop: Update url and add version 3.3.2 (#29812)
* hadoop: Update url and add version 3.3.2

* Update url
2022-04-26 17:26:28 -07:00
haralmha
40ebeb2dc8 arrow: Add version 7.0.0 (#29962) 2022-04-26 16:57:56 -07:00
Lhxone
e5444b9a77 New package: Swan (#30217) 2022-04-26 16:32:19 -07:00
haralmha
89cc16a9cd gnuplot: Add version 5.4.3 and add workaround for not found DSO (#30163) 2022-04-26 16:03:36 -07:00
Ken Raffenetti
a24070d532 docs: Fix ROCmPackage example syntax (#30168) 2022-04-26 16:00:40 -07:00
Kyle Gerheiser
f473fd8084 Add g2tmpl versions 1.10.2 and 1.10.1 (#30202) 2022-04-26 15:56:06 -07:00
John Hodrien
5055f5e3e2 Power9 build fix for ctffind4 (#30300)
Only tested against the latest version, which is why it only applies the patch
when using 4.1.14.

Fix comes from:

https://grigoriefflab.umassmed.edu/forum/software/ctffind_ctftilt/installing_ctffind_4114_ibm_power9
2022-04-26 17:13:37 -05:00
Joel Falcou
0b26103c07 EVE now use main instead of develop as main branch (#30220) 2022-04-26 15:34:45 -06:00
Greg Becker
f99614be02 old concretizer: update deprecation warning (#30227) 2022-04-26 14:17:17 -07:00
Mark W. Krentel
c02e83092e intel-xed: add version 2022.04.17 (#30239)
1. Add version 2022.04.17 (new numbering scheme) and update mbuild resource.
2. Branch 'master' is now 'main'.
3. Old rev 10.2019.03 needs a patch for python vs python3.
2022-04-26 14:15:10 -07:00
Kyle Gerheiser
85e99fa154 Add NCIO v1.1.0 (#30306)
See release notes https://github.com/NOAA-EMC/NCEPLIBS-ncio/releases/tag/v1.1.0
2022-04-26 21:03:26 +00:00
John W. Parent
83b91246b1 Windows: fix termination of process output redirection (#29923)
The parent thread in the process stdout redirection logic on Windows
was closing a file that was being read in child thread, which lead to
error-based termination of the reader thread. This updates the
interaction to avoid the error.
2022-04-26 12:56:13 -07:00
Andrea Valenzuela
0f4b228eff Add checksum for py-ipywidgets@7.7.0 (#30155)
* Add checksum for py-ipywidgets@7.7.0

* Correct py-widgetsnbextension and py-ipython dependencies

* Update widgetsnbextension dependency to 3.6

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

* Allow requirement to next versions

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

* Revert ipyhton dependencies

* Add widgetsnbextension@3.6.0 checksum

Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-26 14:48:53 -05:00
Lucas Frérot
2abbad1ca5 thrust: added version 1.12.1-1.16.0 (#30292) 2022-04-26 11:27:25 -07:00
Lucas Frérot
43d8fe212f py-uvw: updated versions (#30297) 2022-04-26 10:06:41 -07:00
Valentin Volkl
84befcdfe2 opendatadetector: add new package (#30298)
* opendatadetector: add new package

* style

* opendatadetector: add hep tag
2022-04-26 09:25:41 -07:00
Tamara Dahlgren
def8fce250 ginkgo: fix stand-alone test directory / install_test (#28412) 2022-04-26 09:20:10 -07:00
lorddavidiii
3a0aba0835 spack spec: add '--format' argument (#27908) 2022-04-26 09:08:56 -07:00
snehring
254cd624fe exabayes: specify c++11 (#30282) 2022-04-26 17:22:27 +02:00
Erik Schnetter
802a48fb43 boost: update list of modules (#30104)
Co-authored-by: Tim Haines <thaines.astro@gmail.com>
2022-04-26 17:12:47 +02:00
Mark W. Krentel
c81affa551 setup_package: don't unload modules on Cray when run with --dirty (#30261)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-26 16:53:10 +02:00
Simon Pintarelli
3e51304b68 spfft: pass cuda_arch to cmake (#30295) 2022-04-26 14:59:48 +02:00
snehring
62abbeaf6f express: specify patch version range (#30283) 2022-04-26 11:27:32 +02:00
H. Joe Lee
80e24f3f69 googletest: change "master" to "main" (#30285)
There's no master branch on GitHub for googletest.
2022-04-26 11:27:08 +02:00
dlkuehn
24f5069584 snpeff: change jdk dependency to java (#30048)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-26 11:25:03 +02:00
Kevin Huck
5da78991d4 apex: add v2.5.1 (#30287) 2022-04-26 11:19:07 +02:00
Asher Mancinelli
cfb5d5f988 hiop: add v0.6.1, add new variant "cusolver" (#30288) 2022-04-26 11:12:14 +02:00
Michael Kuhn
a10d262f5f glib: add 2.72.1 and 2.70.5 (#30274) 2022-04-26 11:10:34 +02:00
Harmen Stoppels
16e926d374 gawk: drop gettext by default (#30290)
Reduces the number of packages to bootstrap gcc (which actually has
--disable-nls).
2022-04-26 11:02:03 +02:00
Massimiliano Culpo
b9d6a5103d ASP-based solver: allow configuring target selection (#29835)
* ASP-based solver: allow configuring target selection

This commit adds a new "concretizer:targets" configuration
section, and two options under it.

 - "concretizer:targets:granularity" allows switching from
considering only generic targets to consider all possible
microarchitectures.

 - "concretizer:targets:host_compatible" instead controls
whether we can concretize for microarchitectures that
are incompatible with the current host.

* Add documentation

* Add unit-tests
2022-04-25 17:19:51 -07:00
iarspider
834f8e04ca Environments: add flag to skip printing concretized specs (#30272)
With an active environment, you can now run "spack concretize --quiet"
and it will suppress printing the concretized specs.
2022-04-25 15:54:54 -07:00
Rohit Goswami
3ade5516a2 MAINT: Add a debug variant to PyTorch (#30267)
* MAINT: Add a debug flag

* MAINT: Apply suggestions from code review

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-25 15:33:37 -05:00
eugeneswalker
b41de6d86b exago +cuda, +rocm: pass amdgpu_target, cuda_arch to dependencies, as appropriate (#30259)
* exago +rocm: pass amdgpu_target to raja, hiop dependencies

* +cuda builds: pass cuda_arch to dependencies

* hiop: pass cuda_arch to dependencies
2022-04-25 19:48:35 +00:00
Erik Schnetter
c72fba7e4c gcc: Make gcc 11.3 build on Darwin (#30278)
Don't apply a Darwin-specific patch that doesn't work on 11.3 any more.

Closes https://github.com/spack/spack/issues/30264.
2022-04-25 20:15:51 +02:00
Erik Schnetter
96113a5dc6 gcc: Make gcc 11.3 build on Darwin (#30278)
Don't apply a Darwin-specific patch that doesn't work on 11.3 any more.

Closes https://github.com/spack/spack/issues/30264.
2022-04-25 20:15:31 +02:00
Seth R. Johnson
db0335fa54 OpenMPI: improve PMix handling (#29449)
* openmpi: always require pmix for 4:

`~pmix` is not applicable to version 4+, since it always builds a vendored
copy of pmix (currently 3.2.3).

* pmix: relax version requirements

When the version range was specified, newer versions didn't exist.
Also use normalized spack versions rather than artificial .9.9 /.0.0.

* openmpi: restrict pmix versions

pmix option isn't available for OpenMPI@1, and according to
https://github.com/open-mpi/ompi/issues/7988 , OpenMPI 4.0.1 will not
build with pmix@3.1.5.

* pmix: add newer versions

* OpenMPI: re-express conflicts/configure logic as conditional variants

This relies partly on `self.enable_or_disable` and its ilk to emit an
empty list when the variant isn't applicable.
2022-04-25 11:54:20 -06:00
Massimiliano Culpo
268c671dc8 ASP-based solver: always consider version of installed packages (#29933)
* ASP-based solver: always consider version of installed packages

fixes #29201

Explicitly add facts for versions of installed software when
using the --reuse option, so that we could consider versions
that are not declared in package.py
2022-04-25 10:09:49 -07:00
Harmen Stoppels
3dd4999fd7 spec.py: make parser select from environment (#30276)
The parser is already committing a crime of querying the database for
specs when it encounters a `/hash`. It's helpful, but unfortunately not
helpful when trying to install a specific spec in an environment by
hash. Therefore, consider the environment first, then the database.

This allows the following:

```console
$ spack -e . concretize
==> Starting concretization
==> Environment concretized in 0.27 seconds.
==> Concretized diffutils
 -   7vangk4  diffutils@3.8%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
 -   hyb7ehx      ^libiconv@1.16%gcc@10.3.0 libs=shared,static arch=linux-ubuntu20.04-zen2

$ spack -e . install /hyb7ehx
==> Installing libiconv-1.16-hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
...
==> libiconv: Successfully installed libiconv-1.16-hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
  Fetch: 0.01s.  Build: 17.54s.  Total: 17.55s.
[+] /tmp/tmp.VpvYApofVm/store/linux-ubuntu20.04-zen2/gcc-10.3.0/libiconv-1.16-hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
```
2022-04-25 08:41:48 -07:00
Hervé Yviquel
c1ed51e767 mpich: add variant to enable per VCI critical sections (#27840) 2022-04-25 17:31:13 +02:00
Theofilos Manitaras
2a8a0aa156 Add libfabric version 1.14.1 (#30275) 2022-04-25 08:51:12 -06:00
eugeneswalker
5073613c6e slepc +rocm: pass amdgpu_target to dep (#30252) 2022-04-25 08:50:49 -06:00
Vicente Bolea
4a76ca1f5e vtk-m: add v1.8.0-rc1 (#30233) 2022-04-25 16:49:38 +02:00
Mark W. Krentel
878e6b6712 hpctoolkit: add version 2022.04.15, update recipe (#30258)
1. update for rocm 4.5 and drop support for earlier rocm.
2. no longer use mbedtls or gotcha, they are only for old revs.
3. update version requirements for dyninst and libmonitor
4. begin to deprecate old versions
2022-04-25 16:40:00 +02:00
Erik Schnetter
aeba9daea6 mpiwrapper: add new package (#30107)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-25 15:01:39 +02:00
Matthew Archer
25d115ba1a ufcx: add new package (#29861) 2022-04-25 14:50:45 +02:00
Adam J. Stewart
f37e07a882 GDAL: don't add system paths to env vars (#30229) 2022-04-25 14:48:46 +02:00
Seth R. Johnson
4c0cc5a295 testu01: new package (#30266) 2022-04-25 14:46:52 +02:00
Qian Jianhua
57968e7ad4 fakexrandr: mkdir for install (#29845) 2022-04-25 14:42:15 +02:00
Qian Jianhua
02a7fc69ed pgplot: fix syntax error in recipe (#30270) 2022-04-25 14:32:04 +02:00
Todd Gamblin
d729b4e72b bugfix: installed and installed_upstream should not assert (#30271)
Fix bug introduced in #30191. `Spec.installed` and `Spec.installed_upstream` should just return
`False` for abstract specs, as they can be called in that context.

- [x] `Spec.installed` returns `False` now instead of asserting that the `Spec`
      is concrete.
- [x] `Spec.installed_upstream` returns `False` now instead of asserting that the `Spec`
      is concrete.
- [x] `Spec.installed_upstream` no longer caches its result, as install status seems
      like a bad thing to cache -- it can easily be invalidated. Calling code should
      use transactions if there are peformance issues, as with other places in Spack.
- [x] add tests for `Spec.installed` and `Spec.installed_upstream`
2022-04-25 07:46:21 +00:00
Mark W. Krentel
35a4c2325e hpcviewer: add version 2022.03 (#30255) 2022-04-25 09:40:43 +02:00
Diego Alvarez
6253445b13 Added nextflow 22.04.0 (#30265) 2022-04-23 14:17:41 -07:00
H. Joe Lee
dea5fe87f7 Hermes: new package (#29863) 2022-04-23 06:38:14 -06:00
QuellynSnead
6162ea95b0 trilinos: limit secas patch range for cce (#30205)
The cray_secas.patch no longer appears to be necessary
with cce 13.x. Limit its application to cce 12.14.1 - 12.99.99.
2022-04-23 07:01:13 -04:00
Erik Schnetter
44b409d696 memkind: Don't use -Werror when building (#30071) 2022-04-23 09:16:47 +02:00
Massimiliano Culpo
a9fbc0175d Move "installed" and "installed_upstream" from PackageBase to Spec (#30191)
This PR moves the `installed` and `installed_upstream` properties from `PackageBase` to `Spec` and is a step towards being able to reuse specs for which we don't have a `package.py` available. It _should_ be sufficient to complete the concretization step and see the spec in the concretized DAG.

To fully reuse a spec without a package.py though we need a way to serialize enough data to reconstruct the results of calls to:
- `Spec.libs`, `Spec.headers` and `Spec.ommand`
- `Package.setup_dependent_*_environment` and `Package.setup_run_environment`

- [x] Add stub methods to packages with warnings
- [x] Add a missing "root=False" in cmd/fetch.py
- [x] Assert that a spec is concrete before checking installation status
2022-04-22 16:46:45 -07:00
eugeneswalker
58ee164777 hiop +rocm: add amdgpu_target for deps (#30184)
* hiop +rocm: add amdgpu_target for deps

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

Perfect! Thanks!

Co-authored-by: Asher Mancinelli <ashermancinelli@gmail.com>

* don't use f-string, not compatible with py 2

Co-authored-by: Asher Mancinelli <ashermancinelli@gmail.com>
2022-04-22 16:26:38 -07:00
Bernd Riederer
78d87c71f6 Uncrustify package: add versions up to 0.74 (#27621) 2022-04-22 21:43:44 +00:00
eugeneswalker
9633145374 exago: depend on petsc@3.16:3.16 when @1.3.0: (#30238)
* exago: depend on petsc@3.16.0:3.16.99 when @1.3.0:

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

Co-authored-by: Cameron Rutherford <cameron.rutherford@me.com>

* constrain petsc to @3.16.0:3.16

Co-authored-by: Cameron Rutherford <cameron.rutherford@me.com>
2022-04-22 14:13:22 -07:00
Harmen Stoppels
29d96633ee openssl: enable nvhpc build by disabling asm (#30248) 2022-04-22 14:34:41 -06:00
Peter Scheibel
267da78559 Package-level submodule attribute: support explicit versions (#30085) 2022-04-22 11:02:17 -07:00
Andrea Valenzuela
013a0a04a4 Add checksum for jupyter-console@6.4.3 (#30156)
* Add checksum for jupyter-console@6.4.3

* Update py-jupyter-console dependency

* Extend jupyter-client@7.0.0 dependency to newer versions

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

Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-22 16:42:49 +00:00
Ken Raffenetti
a6a7c3ce88 mpich: Add CUDA variant (#29901)
CUDA device memory is supported with the ch4 device.

Update provides to include MPI-4.0 functionality
2022-04-22 17:02:27 +02:00
haralmha
960b48b613 py-pystan: Add new package (#29772)
* py-pystan: Add new package

* Fix dependencies

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

* Add run dependency to py-setuptools

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

* Add py-httpstan@4.7.2 and py-pysimdjson@3.2.0

* Dependency

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-22 09:56:07 -05:00
Michael Kuhn
84bb8e316d fix pkgconfig dependencies (#30246)
`pkgconfig` is the correct virtual dependency, `pkg-config` and
`pkgconf` are providers of it.
2022-04-22 07:34:30 -06:00
Harmen Stoppels
010068c50a netcdf-fortran: add v4.5.4 (#30242) 2022-04-22 14:30:58 +02:00
Harmen Stoppels
a7ebdd2d10 osu-micro-benchmarks: set NVCCFLAGS (#30221) 2022-04-22 13:59:26 +02:00
Tom Scogland
62553e7521 openssl: exclude more dangerous environment variables (#30208)
* pkg/openssl: blacklist more dangerous environment variables

* fix style
2022-04-22 04:51:18 -07:00
Massimiliano Culpo
f961a11187 Update Dockerfiles and images for Spack v0.18.0 (#30216)
This PR updates the list of images we build nightly, deprecating 
Ubuntu 16.04 and CentOS 8 and adding Ubuntu 20.04, Ubuntu 22.04
and CentOS Stream. It also removes a lot of duplication by generating
the Dockerfiles during the CI workflow and uploading them as artifacts
for later inspection or reuse.
2022-04-22 08:51:26 +02:00
Ethan Stam
b00983439f py-cinemasci: new version 1.7.0 (#30193)
* py-cinemasci: new version 1.7.0

* remove preferred version

* add py-pyyaml dependency
2022-04-21 21:34:26 -06:00
Thomas Madlener
5fe4ac2b05 lcio: install more missing files for python bindings (#29739) 2022-04-21 20:30:28 -06:00
Alex Hedges
c60ded8ccc findutils: new version 4.9.0 (#30170) 2022-04-22 00:15:20 +02:00
Michael Kuhn
ce7c8b44d5 gcc: add 11.3.0 (#30226) 2022-04-21 23:22:52 +02:00
eugeneswalker
4817e4c80c exago: use hipcc for +rocm builds (#30232) 2022-04-21 14:22:41 -06:00
eugeneswalker
111aeeb0ae exago: depends on pkgconfig (#30231) 2022-04-21 13:21:16 -07:00
Erik Schnetter
3a70df9f64 fftw: Link explicitly against -lmpi (#29279)
* fftw: Link explicitly against `-lmpi`

Closes https://github.com/spack/spack/issues/29224.

* Generalize MPI flags

Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>

* Add platform guard

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
2022-04-21 13:14:21 -06:00
Scott McMillan
616a8eebcd perl: fix issues when compiling 5.34 with nvhpc compilers (#30110)
Co-authored-by: Scott McMillan <smcmillan@nvidia.com>
2022-04-21 11:10:46 -06:00
Harmen Stoppels
ac9bd3d72d openssh: no pie for %nvhpc (#30189) 2022-04-21 11:21:35 +02:00
Tim Haines
7118602251 boost: add v1.79.0 (#30137) 2022-04-21 01:09:23 -05:00
marcost2
7ebce6191a nvtop: add versions up to v2.0.1, rework package recipe (#30180) 2022-04-21 07:58:37 +02:00
Michael Kuhn
03832a0b0f meson: add 0.62.0 and 0.61.4 (#30201) 2022-04-20 21:26:38 -06:00
Geoffrey Oxberry
b2534171be ipopt: update urls to use github instead of coin-or.org, add version 3.14.5, add maintainer (#30207)
* ipopt: add goxberry as maintainer

This commit adds 'goxberry' (me, Geoff Oxberry) as a maintainer of the
Ipopt Spack package.

* ipopt: use github url instead of coin-or.org url

This commit changes the package URL for Ipopt from one containing
`coin-or.org` to one containing `github.com`. The rationale for
using `github.com` is as follows:

- The COIN-OR webpage now directs users interested in Ipopt source to
  GitHub.

- Ipopt used to have a COIN-OR project homepage actually hosted on
  coin-or.org using an SVN-Trac web page. A link to this project
  homepage no longer appears within the "Projects" section of
  COIN-OR's website.

- COIN-OR issued a 2021-12-15 post on the News section of its web site
  (see https://www.coin-or.org/news/) that discusses the impact that
  lack of financial support has on COIN-OR software maintenance. It
  seems reasonable to suspect that the GitHub project is likely to
  outlast the COIN-OR web site.

The sha256 hashes for ipopt@:3.12 downloaded from GitHub differ from
the corresponding COIN-OR versions, so these hashes are also updated.

* ipopt 3.14.5: add new version

This commit adds the latest version of Ipopt, 3.14.5, to the Ipopt
Spack package.
2022-04-20 19:18:55 -07:00
Tom Scogland
4905a71d6d refactor powershell setup to make it sourceable (#29987)
* refactor powershell setup to make it sourceable

* only set editor if it is unset

* change directory to spack root in subshell

* Update share/spack/setup-env.ps1

Co-authored-by: John W. Parent <45471568+johnwparent@users.noreply.github.com>

Co-authored-by: John W. Parent <45471568+johnwparent@users.noreply.github.com>
2022-04-20 17:11:44 -07:00
eugeneswalker
0abc4564ae hiop +rocm: use hipcc for cxx (#30182)
* hiop +rocm: use hipcc for cxx

* move CMAKE_CXX_COMPILER arg for +rocm case to existing block
2022-04-20 13:39:19 -07:00
eugeneswalker
13d05848ad ipopt: use url_for_version to handle different urls for 3.13.4 onwards (#30197)
* ipopt: use url_for_version to handle different urls for 3.13.4 onwards

* ipopt: new versions: 3.14.1, 3.14.2, 3.14.3, 3.14.4

* fix indent
2022-04-20 13:38:21 -07:00
Giacomo Marciani
6f2f9653c5 [aws-parallelcluster] Fix maintainers (#30194) 2022-04-20 20:27:47 +02:00
Erik Schnetter
8556f83238 mpitrampoline: New version 4.0.0 (#30106) 2022-04-20 18:15:45 +02:00
haralmha
a717c5df40 py-httpstan: Add new package (#29770)
* py-httpstan: Add new package

* Fix dependencies

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

* Add run dependency to py-setuptools

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-20 11:07:43 -05:00
Wileam Y. Phan
3552cfac1a fpm: add dependency on git (#30158) 2022-04-20 09:54:50 -06:00
Alex Hedges
b792e08c15 openssh: new version 9.0p1 (#30172) 2022-04-20 09:39:22 -06:00
snehring
d1d86d68f1 casper: fix compilation errors on newer compilers (#30142) 2022-04-20 17:11:05 +02:00
Harmen Stoppels
974beb4ffc git: add 2.35.2 + deprecations (CVE-2022-24765) (#30040)
* git: add 2.35.2, explicit version(...)

git 2.35.2 fixes CVE-2022-24765 which seems to only affect Windows. But
nonetheless we should maybe set deprecated=True on older versions... The
restructure allows for that.

* deprecate over CVE-2022-24765
2022-04-20 07:22:20 -07:00
Harmen Stoppels
b7f8899d45 docs: add (config.yaml) to sections for faster lookup by config file (#30157) 2022-04-20 15:00:43 +02:00
Harmen Stoppels
e47ec07ffc ucx: fix simd_values (#30186) 2022-04-20 10:00:45 +00:00
Axel Huebl
778eee1579 WarpX 22.04+: Fix RZ Test (#30185)
In WarpX 22.04, we introduced the openPMD `thetaMode` for fields in
RZ geometry. That means we need to name the fields differently than
the reconstructured Cartesian slice that we default to in plotfiles.
2022-04-20 02:18:46 -06:00
Ken Raffenetti
a43a633b2a yaksa: add new package (#29877) 2022-04-20 09:56:02 +02:00
Asher Mancinelli
5e00dffe7f Add new hiop version, add ginkgo glu version (#30178) 2022-04-20 09:51:58 +02:00
Dylan Simon
7aa1fef506 ncurses: add query parameters to select wide/nowide; readline: use wide only (#30144)
* ncurses: add wide, nowide headers, libs query parameter options

* readline: only link with libncursesw

Needed for python to detect proper ncurses library #27369
2022-04-20 09:44:34 +02:00
Giacomo Marciani
2d94624d0a updated v2.11.6 (#30165) 2022-04-20 09:44:10 +02:00
Thomas Madlener
cc6cc4c7e5 dd4hep: Add latest version (#30164) 2022-04-20 09:43:54 +02:00
Mikael Simberg
943d463a2d Configure nvhpc GCC from Spack variables (#29769)
Alter the `install_components/install` script to pass the `-gcc $SPACK_CC`,
`-gpp $SPACK_CXX`, and `-g77 $SPACK_F77` flags to `makelocalrc`.  This
ensures that nvhpc is configured to use the spack gcc spec, rather than
whatever gcc is found on the path.

Co-authored-by: Mikael Simberg <simberg@cscs.ch>

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-04-20 09:40:03 +02:00
Alex Hedges
53eb044b28 wget: new version 1.21.3 (#30175) 2022-04-20 07:31:33 +00:00
Alex Hedges
4f3553ae7c util-linux: new version 2.38 (#30174) 2022-04-20 07:28:07 +00:00
Tim Haines
e59d7fcb9b precice: conflict with boost@1.79.0 (#30179)
See https://github.com/precice/precice/pull/1250 for details.
2022-04-20 09:13:26 +02:00
Mark Grondona
056ea79d2c flux-core: add v0.36.0-0.38.0, flux-sched: add v0.21.0-0.22.0 (#30176)
* flux-core: add v0.36, v0.37 and v0.38

 - add flux-core versions v0.36.0, v0.37.0, and v0.38.0.
 - add libarchive requirement for v0.38.0.
 - remove yaml-cpp depends which hasn't been required since v0.11

* flux-sched: add v0.21.0, v0.21.1, and v0.22.0

Add versions 0.21.0, 0.21.1 and 0.22.0 of flux-sched.
2022-04-20 09:12:33 +02:00
Adam J. Stewart
83533fc31f PythonPackage docs: Spack now supports Windows (#30177) 2022-04-20 09:11:19 +02:00
Alex Hedges
0420c829c6 gzip: new version 1.12 (#30171) 2022-04-20 09:07:56 +02:00
Alex Hedges
c664a31f7b strace: new version 5.17 (#30173) 2022-04-19 23:18:40 +00:00
Scott Wittenburg
a710a2425a ci: Make test independent from any changes in spack repo (#30150)
Fix test_ci_generate_prune_untouched(), which would fail if run when
the latest commit changed the .gitlab-ci.yml.  This change mocks the
get_stack_changed() method in that test to disregard the state of
the current spack repo in favor of a mock repo under test control.
2022-04-19 16:27:24 -06:00
Erik Schnetter
5e014be8b7 hpx: Add missing boost+context dependency (#30108) 2022-04-19 16:48:49 -04:00
Harmen Stoppels
abc162cf3b environment.py: write lockfile last (#30039)
This makes it easier to write `spack.lock: spack.yaml` type of rules in `Makefiles`.
2022-04-19 12:32:59 -07:00
John W. Parent
dc3cf5c6b0 OpenSSL package: fix ./configure error; restore parallel build (#29928)
* The configure script on Windows requires that CC/CXX be enclosed
  in quotes if the paths to those compiler executables contain
  spaces (so unlike most instances of Executable, the arguments
  need to contain the quotes)
* OpenSSL requires the nasm package on Windows
* Restore parallel build from 075e942 (accidentally reverted in
  #27021)
2022-04-19 11:04:26 -07:00
Harmen Stoppels
75638c1e88 ncurses: fix nvhpc, allow cmake+ncurses %nvhpc (#30162) 2022-04-19 10:19:19 -06:00
Jen Herting
fb5b78335b [py-hpack] added version 3.0.0 (#29802)
* [py-hpack] py-wheel is implied by PythonPackage

* [py-hpack] fixes python dependency version

* [py-hpack] added version 3.0.0
2022-04-19 10:19:00 -06:00
haralmha
63600c0d0d py-ipympl: Add new package (#29442)
* py-ipympl: Add new package

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

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

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

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

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

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

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

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

* Remove trailing whitespaces

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-19 11:12:06 -05:00
haralmha
beaf1c7fcc py-webargs: Add new package (#29768)
* py-webargs: Add new package

* Fix python requirement

* Add run dependency to py-packaging

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-19 11:11:25 -05:00
Jen Herting
2da7f40cbc [py-librosa] added version 0.9.1 and reformatted dependency list (#29544) 2022-04-19 11:10:10 -05:00
Jen Herting
4c446d54b1 New package: py-python-crfsuite (#29450)
* [py-python-crfsuite] created template

* [py-python-crfsuite]

- added homepage
- added description
- added dependencies
- removed fixmes
2022-04-19 11:09:47 -05:00
Christopher Kotfila
4067a28182 Set resource requests on package builds (#29922)
gitlab ci: Set resource requests explicitly

This PR sets resource requests for the Kubernetes executor, which should aid in
better workload scheduling in the cluster.  The specific values were derived from
profile data taken from several full "from scratch" rebuilds in a separate worker pool.

Co-authored-by: Zack Galbreath <zack.galbreath@kitware.com>
2022-04-19 10:09:32 -06:00
Sergey Kosukhin
f0ceeac0a8 serialbox: setup the run and dependent build environments (#29892)
* serialbox: setup the run and dependent build environments

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-19 11:08:26 -05:00
snehring
2965a7a7e9 andi: add v0.14 (#30100) 2022-04-19 09:54:56 -06:00
snehring
3273928ddc aperture-photometry: add v3.0.2, change url (#30103)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-19 15:50:53 +00:00
Sergey Kosukhin
a4f32dbf8d netcdf-c: prevent overlinking to a system installation of libcurl (#28537) 2022-04-19 09:26:33 -06:00
Sergey Kosukhin
823b982ee1 netcdf-c: fix configure check for the -fno-strict-aliasing flag (#30159) 2022-04-19 08:50:47 -06:00
Andrea Valenzuela
afbbbf9921 jupyterlab-widgets: add v1.1.0 (#30161)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-04-19 08:38:50 -06:00
Andrea Valenzuela
68d32f7fdc py-fonttools: add v4.31.2 (#30153)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-04-19 08:11:05 -06:00
Theofilos Manitaras
e13655b584 Add a shared variant for libaec (#30087) 2022-04-19 16:03:00 +02:00
Cory Bloor
78facf0761 rocmlibs: relax rocm-cmake version requirements (#29857)
* rocmlibs: relax rocm-cmake version requirements

The rocm-cmake modules tend to be backwards-compatible, to the extent
that most ROCm math libraries were built using rocm-cmake@master
for a long while without anybody noticing. (That was fixed in
97f0c3ccd9f0a40896998a7580150a514ec3bc37.)

Some packages, like comgr, barely use rocm-cmake for anything, and
we can easily set a very minimal version requirement. For most
packages, however, it would be a lot of effort to determine the
minimum rocm-cmake version required for each release. For those
packages, I just turned the exact version requirement into a
minimum version requirement.

Since I was looking through the CMakeLists.txt for a large number of
libraries, I also took note of the cmake_minimum_required and adjusted
the cmake minimum requirements to match.

* Add rocblas build dependency to hipblas

The rocblas library is required both for both building and linking
hipblas.

* Remove rocm-cmake from vtk-m dependency list

The rocm-cmake package provides CMake scripts that facilitate common
build configuration tasks in the ROCm libraries. It is never needed at
link-time. Also, there are no calls to find_package(ROCM) or
include(ROCM.*)in vtk-m, so this dependency will never be used.
2022-04-19 07:26:40 -06:00
Glenn Johnson
17c264b30a motioncor2: update (#30094)
- older versions are no longer available for download so mark them
  deprecated
- set manual_download
- set url_for_version
- only install the binary that matches the cuda version
2022-04-19 12:38:07 +00:00
Glenn Johnson
634d51cec2 ctffind: update to version 4.1.14 and add MKL support (#30095)
- patch error in configure for 4.1.8
- use fftw-api
- enable support for MKL FFT
- add needed dependencies for libtiff and jpeg
2022-04-19 12:30:28 +00:00
iarspider
bf1ef4bc37 valgrind: add support for shared and static libs(#30028)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-04-19 14:26:26 +02:00
Robert Underwood
6b62a15ab6 which: add external find support (#30056)
Co-authored-by: Robert Underwood <runderwood@anl.gov>
2022-04-19 14:24:47 +02:00
Harmen Stoppels
9a05a7a714 nvhpc: gcc is a direct dep (#29963) 2022-04-19 08:17:58 -04:00
H. Joe Lee
1c13b3707c or-tools: add new package. (#29858) 2022-04-19 14:12:05 +02:00
Valentin Volkl
bad6ebc910 pacparser: fix compilation with clang (#29589) 2022-04-19 14:10:05 +02:00
Erik Schnetter
48122affbd memkind: fix minor typo (#30069) 2022-04-19 14:07:40 +02:00
Peter Brady
e72afede17 truchas: add new package (#29980) 2022-04-19 13:54:26 +02:00
Erik Schnetter
0d2044c659 simgrid: update package description (#30111) 2022-04-19 11:45:44 +02:00
Jean-Paul Pelteret
a37dd23403 ADOL-C: Add traceless refcounting as a default variant (#30114) 2022-04-19 11:43:19 +02:00
Jean-Paul Pelteret
d6483fe483 SymEngine: add v0.9 (#30115) 2022-04-19 11:42:41 +02:00
iarspider
be12fea11e lwtnn: add v2.13 (#30151) 2022-04-19 11:41:20 +02:00
Andrea Valenzuela
65cf6b0d5c py-frozenlist: add v1.3.0 (#30154)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-04-19 11:40:40 +02:00
Alex Hedges
21ef70d807 less: add v590 (#30127) 2022-04-19 09:28:12 +00:00
Alex Hedges
82a6d6f5d8 direnv: add v2.31.0 (#30118) 2022-04-19 11:03:35 +02:00
Andrea Valenzuela
a4bead73b1 py-avro: add v1.11.0 (#30152)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-04-19 08:50:21 +00:00
Jeremy L Thompson
d4b68995c3 ratel: add develop and v0.1 (#29474) 2022-04-19 10:41:53 +02:00
Bernhard Kaindl
0ce88521ce glew,vapor: Move depends_on("glu") from glew to vapor (#30112)
In #26630, I assumed "glu" was needed by glew because it included glu.h, but
actually, glew can be used without glu when GLEW_NO_GLU is defined and this
is documented in the announcement of glew-1.6.0:

> https://www.geeks3d.com/20110430/opengl-glew-1-6-0-available/
> * Define GLEW_NO_GLU for no glu dependency

It is therefore the duty of users of glew to decide if they use glu,
and then they need to have a depends_on("glu").

Thus, move the depends_on("glu") which I changed from "gl" in #26630
to vapor, which itself uses glu as well.
2022-04-19 10:22:32 +02:00
Alex Hedges
aac7176924 coreutils: add v9.0 and v9.1 (#30128) 2022-04-19 02:18:33 -06:00
Harmen Stoppels
bc347f1f1c bubblewrap: add versions up to v0.6.1, use configure script (#30129) 2022-04-19 10:09:26 +02:00
Harmen Stoppels
6eac7acb93 libcap: add v2.64 (#30130) 2022-04-19 10:07:26 +02:00
John W. Parent
08ea458814 CMake: add v3.23.1 and v3.22.4 (#30131) 2022-04-19 10:06:39 +02:00
snehring
b6c1143f3f mysqlpp: add v3.3.0 (#30136) 2022-04-19 10:02:39 +02:00
Tim Haines
1cba551fe6 Dyninst: deprecate unsupported versions (#30138) 2022-04-19 09:54:17 +02:00
snehring
326fa2392b gaussian: adding tcsh dependency (#30096) 2022-04-19 01:50:44 -06:00
dlkuehn
0c4a866c2e trinotate: add v3.2.2 (#30141)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-19 09:29:30 +02:00
Adam J. Stewart
54e9b6b8fb py-rtree: add v1.0.0 (#30140) 2022-04-19 09:28:42 +02:00
Harmen Stoppels
a3a61241fc openmpi: no nvc -fexceptions support (#30044) 2022-04-19 09:21:08 +02:00
snehring
7133838fa5 diamond: add v2.0.14 (#30143) 2022-04-19 09:20:20 +02:00
Sam Grayson
8de726336f Add music package (#30147) 2022-04-18 20:51:13 -05:00
Peter Brady
3835ac0c41 spdlog: use external fmt (#30051) 2022-04-18 09:41:00 -04:00
range3
a405a6efe3 py-torch: fix cuda dependencies (#30117) 2022-04-16 21:06:43 -06:00
Harmen Stoppels
b0c8affbd9 gcc: avoid excessive stat calls (#30005)
For about a decade GCC has an option `-f[no]-canonical-system-headers`
which basically runs `realpath` on all "system headers", to possibly
reduce the length of paths in diagnostics. [1]

Spack usually installs the "system headers" of GCC in very deeply nested
directories. Calling `realpath` there results in stat calls on every
level, for every header file. On some slow filesystem I have,
`-fno-canonical-system-headers` gives about 5x speedup to compile hello
world in C, meaning that ./configure scripts would be much faster when
using this flag by default.

[1] https://codereview.appspot.com/6495088
2022-04-16 21:12:03 +02:00
marcost2
03a7643816 mpich: Fix @4 build with gcc@10+ (#30084)
* Also set FCFLAGS for gcc@10
* Set FCFLAGS for clang/apple-clang too
2022-04-16 19:53:44 +02:00
Kai Torben Ohlhus
1ada151d80 octave: add version 7.1.0 (#30089)
https://octave.org/news/release/2022/04/06/octave-7.1.0-released.html
2022-04-16 06:28:10 +02:00
John W. Parent
840858c215 CMake package: use Windows SSL implementation (#29943)
Add option to allow using OpenSSL (by default this uses the SSL
implementation that comes with Windows, since that is more likely
to have needed certificates).
2022-04-16 00:38:28 +00:00
John W. Parent
0f80a5a9d5 Remove assert in favor of error message (#29797) 2022-04-15 22:44:44 +00:00
dlkuehn
c8f85ebea3 Update: bamtools to version 2.5.2 (#29021)
Co-authored-by: las_dkuehn <las_dkuehn@gilman-0107-02.las.iastate.edu>
2022-04-15 14:18:47 -07:00
Dom Heinzeller
3b8256ef6a Backport f2py's define for threading bugfix to numpy versions 1.20.3:1.22.1 (#30065) 2022-04-15 15:47:01 -05:00
Erik Schnetter
33d791bd1c compose: New package (#30073)
* compose: New package

* compose: Add maintainer

* compose: Remove unused import

* compose: Switch copyright date to 2021
2022-04-15 11:17:50 -07:00
Chris White
374ebe5840 Adiak package: use correct CMake MPI variables (#30086) 2022-04-15 10:33:56 -07:00
Sajid Ali
cf21fd837f llvm@14: Fix build: Add hwloc include directory for libompd (#29757) 2022-04-15 17:44:22 +02:00
Thomas Madlener
01609b3111 py-awkward: Add latest versions (#29744)
* py-awkward: Add new versions

* py-awkward: Update dependencies

* Make setuptools a runtime dependency as well

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-15 09:53:27 -05:00
Theofilos Manitaras
fdc9a29a9b Patch libfabric for the Nvidia compilers (#30090)
* Patch libfabric@1.6.0:1.14.0 for the Nvidia compilers

Signed-off-by: Theofilos Manitaras <manitaras@cscs.ch>
2022-04-15 06:42:26 -06:00
Robert Underwood
0e0c438dd6 Fix R build in containers (#30055)
R needs which as a build dependency, but it may not be provided in a
minimal container.

Co-authored-by: Robert Underwood <runderwood@anl.gov>
2022-04-14 23:06:15 -05:00
Axel Huebl
015046cb97 Add: openPMD-viewer 1.4.0 & validator update (#30083) 2022-04-15 06:03:59 +02:00
Matthieu Dorier
388d5fada3 mochi-thallium: add v0.10.1, update cereal dependency (#30059)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-14 21:55:35 -06:00
John W. Parent
2d3a613128 NASM package: fix install on Windows (#29905)
* Don't rely on NASM's nmake to export install target. Spack
  now handles NASM installation; the install tree structure
  mimics NASM Windows installer behavior.
* Add dependency on perl
2022-04-14 12:20:41 -07:00
Jen Herting
ce0346abd9 New package: py-nara-wpe (#29451)
* espnet first build with depends

* [py-nara-wpe] fixed copyright

* [py-nara-wpe] fixing up dependencies

Co-authored-by: Sid Pendelberry <sid@rit.edu>
2022-04-14 14:09:03 -05:00
Jen Herting
00313f9e20 New package: py-distance (#29546)
* [py-distance] created template

* [py-distance]

- added homepage
- added description
- removed fixmes

* [py-distance] depends on setuptools
2022-04-14 14:08:09 -05:00
Howard Pritchard
6c03e1efb6 openmpi: main no longer depends on pandoc (#30068)
we switched to an optional sphinx based way of
generating docs, so remove pandoc, which can cause
issues with latex conflicts.

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2022-04-14 12:58:30 -06:00
John W. Parent
b1de8a5680 Windows platform: don't allow MakefilePackage (#29904) 2022-04-14 11:41:12 -07:00
Jason Lee
02a1f6f0f1 New package: SICM (#30066) 2022-04-14 12:30:42 -06:00
Cyrus Harrison
79be21c8e4 add conduit 0.8.3 release (#30067) 2022-04-14 11:42:31 -06:00
Dom Heinzeller
bb70e6ffcd netcdf-cxx4 Package: updates to build on Mac OS (#29246)
Bug fixes for package netcdf-cxx4 so that it builds on macOS semi
case-sensitive filesystems; this includes additional changes to build
netcdf-cxx4 consistently with netcdf-fortran.

* netcdf-fortran: remove unused config_flags
* netcdf-fortran: avoid building without the optimization flags
* netcdf-cxx4: do not enforce autoreconf. This was a rudiment from the
  times when the package was fetched with git, which broke timestamp
  order of the automatically generated Autoconf files.
* netcdf-cxx4: inject PIC flags for C++ when '+pic'
* netcdf-cxx4: inject C/CXXFLAGS via the wrapper
* netcdf-cxx4: fix the underlinking problem for platforms other than darwin
  (add netcdf-c libs netcdf-cxx4 ldlibs flags)
* netcdf-cxx4: remove redundant extension of CPPFLAGS
* netcdf-cxx4: only need to use MPI compiler wrapper when building C
  (vs both C and C++)
* netcdf-cxx4: remove variant 'static'
  This makes it consistent with other packages from the NetCDF
  constellation: always build the static libraries and additionally
  build the shared ones when '+shared'.
* netcdf-cxx4: do not configure --with/--without-pic.
  This makes it consistent with other packages from the NetCDF
  constellation: build the shared libraries with the PIC flag and
  the static ones without it (the default for Autotools) when
  '~pic', and build the static libraries with PIC when '+pic' (to
  make them injectable into other shared libraries).
* netcdf-cxx4: run the tests serially
* netcdf-cxx4: build the plugins only when the tests are run

Co-authored-by: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
2022-04-14 10:10:30 -07:00
dlkuehn
b09fb467f1 Package rna-seqc: Change jdk dependency to java (#30049)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-14 10:02:06 -07:00
Zack Galbreath
dec3e31e60 spack ci: remove relate-CDash-builds functionality (#29950)
gitlab ci: Remove code for relating CDash builds

Relating CDash builds to their dependencies was a seldom used feature.  Removing
it will make it easier for us to reorganize our CDash projects & build groups in the 
future by eliminating the needs to keep track of CDash build ids in our binary mirrors.
2022-04-14 10:42:30 -06:00
Olivier Cessenat
f5520de4bd libefence: add package for the Electric Fence library from B. Perens (#29595) 2022-04-14 08:53:52 -07:00
Massimiliano Culpo
be99a72d57 Add CHANGELOG for v0.17.2 2022-04-14 16:19:37 +02:00
Kevin Huck
6f1a5c8fee apex: add v2.5.0 (#30018) 2022-04-14 11:45:02 +02:00
Valentin Volkl
a482970a35 sherpa: fix build of recola interface (#30000) 2022-04-14 11:43:39 +02:00
dependabot[bot]
bbb3f724af build(deps): bump actions/setup-python from 3.1.1 to 3.1.2 (#30017)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](21c0493ecf...98f2ad02fd)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 10:47:01 +02:00
Peter Scheibel
89f6db21f1 Ad-hoc Git commit versions: support submodules (#30037)
* Allow packages to add a 'submodules' property that determines when ad-hoc Git-commit-based versions should initialize submodules

* add support for ad-hoc git-commit-based versions to instantiate submodules if the associated package has a 'submodules' property and it indicates this should happen for the associated spec

* allow Package-level submodule request to influence all explicitly-defined version() in the Package

* skip test on windows which fails because of long paths
2022-04-13 20:05:14 -07:00
dlkuehn
b28b24ccf8 express: version update to 1.5.3 (#29760)
Co-authored-by: snehring <snehring@iastate.edu>
2022-04-13 20:02:53 -06:00
Chris White
3dfa64edab BLT package: add version 0.5.1 (#30053) 2022-04-13 20:02:27 -06:00
iarspider
2046ca7722 Add checksum for libisl 0.24 and update URL (#30025) 2022-04-13 17:41:34 -07:00
Mikael Simberg
4f5d5bb2ef Add hpx-kokkos package (#29766)
Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
2022-04-14 00:23:33 +00:00
Veselin Dobrev
34d9d58924 New package version: mfem v4.4 (#29658) 2022-04-13 16:27:54 -07:00
Dylan Simon
0804637228 distcc: add 3.3.5 for gcc@10 (#29666) 2022-04-13 16:11:36 -07:00
Matthieu Dorier
a837008ff7 [mochi-thallium] added new version of mochi-thallium (#29791) 2022-04-13 14:51:06 -07:00
Jeremy L Thompson
1ffad2073d libceed - add v0.9 and 0.10.1 (#29820) 2022-04-13 14:47:11 -07:00
Massimiliano Culpo
c846b5149d Add support for Python 3.10 (#29581)
* Add support for Python 3.10

* Update unit-tests to use 3.10

* Update Getting started section of the docs

* Update bootstrap action
2022-04-13 14:32:23 -07:00
Seth R. Johnson
4c1250854a perl: fix mac patch (#30001)
- Apply macosx version workaround to all 5.35 and less
- Delete an obsolete mac patch file that I didn't notice when adding
  #28797
2022-04-13 12:34:48 -06:00
iarspider
fbd94b9ad2 Add checksums for xtensor 0.24.1 and xtl 0.7.4 (#30032) 2022-04-13 11:22:59 -06:00
mcourtois
10a3822728 mumps: install header files as compiled (#29940)
Co-authored-by: Mathieu Courtois <mathieu.courtois@edf.fr>
2022-04-13 09:45:47 -07:00
Umar Arshad
586df30f9a ArrayFire: new version and update CUDA usage (#29988)
* Set CUDA architectures in ArrayFire based on cuda_arch

The cuda_arch flag was not recognized by the ArrayFire package and
therefore any setting was not respected. This commit adds the appropriate
cmake flags if cuda_arch is specified. If no cuda_arch is specified,
then the flag is set to "Auto" which checks the installed compute
architectures on the build system.

* ArrayFire only requires boost headers to build. Update version to 1.75

ArrayFire only requires boost headers at build time. This commit also
updates the version to 1.75 to avoid some errors in Boost Compute

* Disable tests in ArrayFire by default

* Add support for ArrayFire v3.8.1

* Add maintainer for ArrayFire package

* Remove test variant from ArrayFire. Use comprehensions

* Reduce boost requirement in ArrayFire

* Address cuda_arch suggestions

* Add commit hashes to Release versions of ArrayFire

* Fix style issues in ArrayFire package
2022-04-13 09:31:40 -07:00
Paul
803900ddc5 Add Go 1.18 and 1.17.8 (#30035) 2022-04-13 09:29:12 -07:00
Massimiliano Culpo
0480afe29d CI: avoid issues with Ubuntu patched git by adding safe.directory (#30042)
Ubuntu patched git v2.25.1 with a security fix that also
introduced a breaking change, so v2.25.1 behaves like
v2.35.2 with respect to the use cases in CVE-2022-24765
2022-04-13 11:10:00 +00:00
Harmen Stoppels
cb56e9b745 libbsd: fixes for %nvhpc (#29848) 2022-04-13 11:24:02 +02:00
renjithravindrankannath
6a8aa59717 reverting the changes present in 29017 as CFLAGS and CXXFLAGS which overrides defaults in other packages (#30036) 2022-04-13 08:29:56 +02:00
Daryl W. Grunau
110ade1804 Apply llvm7_intel.patch with intel@19.1.3 (#29955)
* llvm7_intel.patch required for intel@19.1.3 too

* apply llvm7_intel.patch forall intel@19.0 and intel@19.1

Co-authored-by: Daryl W. Grunau <dwg@lanl.gov>
2022-04-12 15:38:11 -07:00
Adam J. Stewart
5db279f986 py-numpy: add v1.21.6 (#30034) 2022-04-12 22:30:13 +00:00
Sergey Kosukhin
67a90a644f hdf5: remove redundant dependency on numactl (#29914) 2022-04-12 14:55:28 -07:00
Jose E. Roman
fef84f2265 New patch release SLEPc 3.17.1 (#30010)
Co-authored-by: Satish Balay <balay@mcs.anl.gov>
2022-04-12 14:50:32 -07:00
Kyle Gerheiser
b0e35dffa3 Add grib_util v1.2.4 (#30033) 2022-04-12 13:32:19 -07:00
Nathan Hanford
a3520d14bd Splice differing virtual packages (#27919)
Co-authored-by: Nathan Hanford <hanford1@llnl.gov>
2022-04-12 13:31:39 -07:00
psakievich
7d534f38d6 Don't allow replacement of root develop specs with --reuse (#28605)
* Fix to concretize.lp

do not allow dev specs to be reused

Co-authored-by: Gregory Becker <becker33@llnl.gov>
2022-04-12 10:37:24 -07:00
Peter Scheibel
2aec5b65f3 Git commit versions bugfix: Environments and Concretization (#29717)
Spack added support in #24639 for ad-hoc Git-commit-hash-based
versions: A user can install a package x@hash, where X is a package
that stores its source code in a Git repository, and the hash refers
to a commit in that repository which is not recorded as an explicit
version in the package.py file for X.

A couple issues were found relating to this:

* If an environment defines an alternative package repo (i.e. with
  repos.yaml), and spack.yaml contains user Specs with ad-hoc
  Git-commit-hash-based versions for packages in that repo,
  then as part of retrieving the data needed for version comparisons
  it will attempt to retrieve the package before the environment's
  configuration is instantiated.
* The bookkeeping information added to compare ad-hoc git versions was
  being stripped from Specs during concretization (such that user
  Specs which succeeded before concretizing would then fail after)

This addresses the issues:

* The first issue is resolved by deferring access to the associated
  Package until the versions are actually compared to one another.
* The second issue is resolved by ensuring that the Git bookkeeping
  information is explicitly applied to Specs after they are concretized.

This also:

* Resolves an ambiguity in the mock_git_version_info fixture used to
  create a tree of Git commits and provide a list where each index
  maps to a known commit.
* Isolates the cache used for Git repositories in tests using the
  mock_git_version_info fixture
* Adds a TODO which points out that if the remote Git repository
  overwrites tags, that Spack will then fail when using
  ad-hoc Git-commit-hash-based versions
2022-04-12 09:58:26 -07:00
Mikael Simberg
17e2fb0ef6 Add missing Boost dependencies to pika+generic_coroutines variant (#30026)
Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
2022-04-12 12:36:14 +02:00
Carlos Bederián
ce09b42cdd curl: nss deprecated since 7.82 (#30020)
* curl: nss deprecated since 7.82
2022-04-12 03:30:24 -06:00
Brian Van Essen
433d404a93 lbann (and related stack): avoid bug in cmake 3.23.0 (#30019) 2022-04-12 08:56:48 +02:00
Massimiliano Culpo
8d56728984 vmd: remove custom phases 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
39b58abd9c siesta: remove custom phases 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
d7a6cb3e53 qbank: remove custom phases 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
fd724fb38d py-sip: remove custom phases 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
2bb9eeac28 py-gosam: remove custom phases 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
b7ce6a5ec1 openmx: remove custom phases 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
1999135cab ntl: remove custom phases 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
a708844e87 nsimd: remove custom phases, refactor variants 2022-04-12 08:39:15 +02:00
Massimiliano Culpo
4dd5bcb3ef npb: remove custom phases 2022-04-12 08:39:15 +02:00
liuyangzhuan
dc44642bfb bump py-statsmodels versions to 0.13.2 for gptune (#29972) 2022-04-11 17:10:28 -06:00
Doug Jacobsen
a9b4f33f23 Update gpg publish to work with mirror arguments (#28740)
This commit updates the `gpg publish` command to work with the mirror
arguments, when trying to push keys to a mirror.

- [x] update `gpg publish command
- [x] add test for publishing GPG keys and rebuilding the key index within a mirror
2022-04-11 14:48:08 -07:00
Sergey Kosukhin
6e5cba7b82 cray platform: unload cray-mpich (#29898) 2022-04-11 14:34:09 -07:00
Ken Raffenetti
b45e734b59 mpich: add v4.0.2 (#30012) 2022-04-11 15:22:34 -06:00
marcosmazz
624077e629 Fix typo in package wrf (#30014) 2022-04-11 14:11:19 -07:00
iarspider
da0a7836f3 ROOT: allow c++20, default to c++14 (#30006) 2022-04-11 12:39:11 -07:00
Massimiliano Culpo
271f0c024a libceed: remove custom phases, slight refactor of variants (#29970) 2022-04-11 20:20:25 +02:00
Harmen Stoppels
8deb50fea5 zstd: bring back libs=shared,static and compression=zlib,lz4,lzma variants (#29995)
* zstd: bring back libs=shared,static and compression=zlib,lz4,lzma variants

Should make building `gcc+binutils ^zstd libs=static` a bit easier (this
is the case where we don't control the compiler wrappers of gcc because
of bootstrapping, nor of ld because of how gcc invokes the linker).
2022-04-11 09:30:30 -06:00
Cory Bloor
b71661eaa6 rocmlibs: cleanup amdgpu_target variant behaviour (#28907)
* Use auto_or_any_combination_of for AMD GPU architecture variant

* Make consistent rocmlibs amdgpu_target variants

* Propagate amdgpu_target variant

* Fix amdgpu_target=auto

* Fix amdgpu_target=auto setting HCC_AMDGPU_TARGET

* Tighten HIP CMake requirements

Co-authored-by: Teodor Nikolov <teodor.nikolov22@gmail.com>
2022-04-11 15:08:28 +02:00
Massimiliano Culpo
f110d0848a nasm: remove custom phases (#29986) 2022-04-11 15:07:15 +02:00
Massimiliano Culpo
b033dbbbd0 minigmg: remove custom phases 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
1a999d6e2d minigmg: remove custom phases 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
9740c3b300 mg: remove custom phases, turn it into a Makefile package 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
b9d12df7a9 memkind: remove custom phases, add v1.13.0 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
a9a7ac71fa madgraph5amc: remove custom phases 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
c8f37797a4 matlab: remove custom phases 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
6bdd9db594 libplist: remove custom phases, make it an Autotools package 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
92531ca773 libimagequant: remove custom phases, make it a Makefile package 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
495dd61218 libgridxc: remove custom phases, make it a Makefile package 2022-04-11 11:42:45 +02:00
Massimiliano Culpo
d0ad644ea6 Remove custom phases in packages (1/n) (#29968)
* abi-dumper: remove custom phases

* apktool: remove custom phases, add v2.6.1

* aragorn: remove custom phases

* ascent: remove custom phases

* astral: remove custom phases, add v5.7.1

* bigdft: remove redundant phase definitions

* bazel: remove custom phases phase definitions

* blasr: remove custom phases phase definitions

* bmake: remove custom phases phase definitions, add v20220330

* botan: remove custom phases phase definitions

* breakdancer: remove custom phases phase definitions

* dnstracer: remove custom phases phase definitions

* conduit: remove custom phases phase definitions

* eclipse-gcj-parser: remove custom phases phase definitions

* eem: remove custom phases phase definitions

* fasttree: remove custom phases phase definitions

* fleur: remove custom phases phase definitions

* fpm: remove custom phases phase definitions

* genie: remove custom phases phase definitions

* gluegen: remove custom phases phase definitions

* gnat: remove custom phases phase definitions

* hpgmg: remove custom phases phase definitions

* karma: remove custom phases phase definitions

* libc: remove custom phases phase definitions
2022-04-11 11:39:50 +02:00
Sebastian Pipping
c2f470f4a6 expat: Deprecate 2.4.6 (#29973)
* expat: Deprecate 2.4.6

* expat: Increase detail on deprecation of 2.4.5
2022-04-11 03:22:32 -06:00
Adam J. Stewart
831346a3fb py-pyupgrade: add new package (#29747) 2022-04-11 11:00:32 +02:00
AMD Toolchain Support
ae76834f3d Python: fix build with AOCC compiler (#28708)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-11 02:50:29 -06:00
dependabot[bot]
714573cdbc build(deps): bump actions/setup-python from 3.1.0 to 3.1.1 (#29956)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](9c644ca2ab...21c0493ecf)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 10:50:08 +02:00
Glenn Johnson
7d67577156 heasoft: add new package (#29841) 2022-04-11 10:47:38 +02:00
Wouter Deconinck
7dc569ceeb intel-oneapi-compilers package: add rpath for lib/ directory (#29931) 2022-04-11 02:22:34 -06:00
Sajid Ali
7475eba798 cereal: add v1.3.1, v1.3.2 (#29385)
Restrict lbann to use v1.3.0 of this package

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-11 10:19:48 +02:00
Harmen Stoppels
25ae8c526b openmpi: ucx >= 1.9.0 for 4.0.x, 4.1.x and 5.x (#29971) 2022-04-11 10:13:50 +02:00
Peter Brady
c364a04a42 chaco: fix build on macOS with Apple Clang 12 or greater (#29975) 2022-04-11 10:11:34 +02:00
Peter Brady
f229f746db scorpio: fix build on macOS with Apple Clang 12 or greater (#29977) 2022-04-11 10:10:47 +02:00
dependabot[bot]
7385ea5f01 build(deps): bump actions/upload-artifact from 2 to 3 (#29981)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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-04-11 09:56:04 +02:00
dependabot[bot]
8e177a45d2 build(deps): bump actions/download-artifact from 2 to 3 (#29982)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  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-04-11 09:55:32 +02:00
Joseph Wang
b1b9ed298d davix: add v0.8.0, v0.8.1 (#29991) 2022-04-11 09:37:52 +02:00
Wouter Deconinck
70f6496f08 vecmem: add versions up to v0.12.0 (#29989) 2022-04-11 09:34:01 +02:00
Harmen Stoppels
9bc5b0cad5 gmp,mpc,mpfr: libs=static,shared variant (#29996) 2022-04-11 09:33:15 +02:00
Seth R. Johnson
1ea05cd456 macos: fewer calls to sw_vers (#29997)
In a typical call to spack, the OperatingSystem gets instantiated
multiple times. For macOS, each one requires a call to `sw_vers`, which
is done through the Executable helper class. Memoizing
reduces the call count from "spac spec" from three to one.
2022-04-11 09:31:24 +02:00
Jakub Krajniak
65763d18fb wps: add tools and utils to PATH at runtime (#29998) 2022-04-11 09:30:11 +02:00
Harmen Stoppels
796ce7fe84 gdrcopy: don't run ldconfig (#29999) 2022-04-11 09:20:31 +02:00
Tim Haines
4564aa4549 Remove versions 1.34.0:1.38.0 (#29983)
These versions have never been buildable because they do not include a 'bootstrap.sh' file.
2022-04-10 20:08:39 -07:00
Adam J. Stewart
646a4bb26c py-pytorch-lightning: add v1.6.0 (#29785) 2022-04-10 15:34:09 -06:00
Massimiliano Culpo
7893be7712 musl: remove custom phases, add v1.2.3 (#29985) 2022-04-09 23:07:59 +02:00
Massimiliano Culpo
3ad3e53ff8 blis, amdblis: remove custom phases, add v0.9.0 for blis (#29969)
Also refactor a few variants
2022-04-09 10:08:36 +02:00
Carlos Bederián
f6795ae46d netlib-scalapack: add v2.2.0 (#29880) 2022-04-08 15:26:36 -06:00
Massimiliano Culpo
23e85f4086 Environments: unify the spec objects on first concretization (#29948)
Currently environments are indexed by build hashes. When looking into this bug I noticed there is a disconnect between environments that are concretized in memory for the first time and environments that are read from a `spack.lock`. The issue is that specs read from a `spack.lock` don't have a full hash, since they are indexed by a build hash which is strictly coarser. They are also marked "final" as they are read from a file, so we can't compute additional hashes. 

This bugfix PR makes "first concretization" equivalent to re-reading the specs from a corresponding `spack.lock`, and doing so unveiled a few tests were we were making wrong assumptions and relying on the fact that a `spack.lock` file was not there already.

* Add unit test
* Modify mpich to trigger jobs in pipelines
* Fix two failing unit tests
* Fix another full_hash vs. build_hash mismatch in tests
2022-04-08 15:26:17 -06:00
downloadico
dfff935f17 trinity: Add version 2.14.0.FULL (#29753) 2022-04-08 14:26:29 -06:00
haralmha
b662a5968b rapidjson: Add version 1.2.0-2022-03-09 (#29869) 2022-04-08 13:08:41 -07:00
Harmen Stoppels
99083f1706 Deprecate top-level module config (#28659)
* Ignore top-level module config; add auto-update

In Spack 0.17 we got module sets (modules:[name]:[prop]), and for
backwards compat modules:[prop] was short for modules:default:[prop].

But this makes it awkward to define default config for the "default"
module set.

Since 0.17 is branched off, we can now deprecate top-level module config
(that is, just ignore it with a warning).

This PR does that, and it implements `spack config update modules` to
make upgrading easy (we should have added that to 0.17 already...)

It also removes references to  `dotkit` stuff which was already
deprecated in 0.13 and could have been removed in 0.14.

Prefix inspections are the only exception, since the top-level prefix inspections
used for `spack load` and `spack env activate`.
2022-04-08 19:00:35 +00:00
Harmen Stoppels
13f3bd533d ucx: fix opt default value and typo (#29967) 2022-04-08 18:28:57 +02:00
Mikael Simberg
8c0b695f13 pika 0.3.0 : fix +mpi build (#29966)
Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
2022-04-08 09:31:54 -04:00
Greg Becker
79ba0c50c1 concretize.lp: enforce target compatibility through DAG (#29694)
Spack currently allows dependencies to be concretized for an 
architecture incompatible with the root. This commit adds rules
to make this situation impossible by design.
2022-04-08 11:01:04 +02:00
Harmen Stoppels
b667be470e zstd: improve %nvhpc conflict (#29867) 2022-04-08 09:28:31 +02:00
Carlos Bederián
99425e273b ucx: +cm dropped in 1.11 (#29958) 2022-04-08 09:26:34 +02:00
Carlos Bederián
dbf947599f blis: add conflict with nvhpc/pgi (#29959) 2022-04-08 09:25:39 +02:00
mcourtois
bc34bcfbc2 metis: install more headers files (#29939)
* update metis: install more all files

* ok to be a package reviewer

Co-authored-by: Mathieu Courtois <mathieu.courtois@edf.fr>
2022-04-07 20:10:29 -06:00
iarspider
08c73e456c New package: dwz (#29832) 2022-04-07 17:30:40 -07:00
iarspider
3a6ff4dd92 New package: millepede (#29911) 2022-04-08 00:17:07 +00:00
Jim Galarowicz
012889bc40 survey package: add dependencies for @1.0.3: (#29902) 2022-04-07 17:30:37 -06:00
iarspider
8ab6af9ed9 Add checksum for lwtnn@2.10 (#29873) 2022-04-07 16:29:34 -07:00
haralmha
170613ff6b py-protobuf: Add version 3.20.0 (#29903) 2022-04-07 17:18:26 -06:00
Massimiliano Culpo
ff04d1bfc1 Use the non-deprecated MetaPathFinder interface (#29745)
* Extract the MetaPathFinder and Loaders for packages in their own classes

https://peps.python.org/pep-0451/

Currently, RepoPath and Repo implement the (deprecated) interface of
MetaPathFinder (find_module) and of Loader (load_module). This commit
extracts both of them and places the code in their own classes.

The MetaPathFinder interface is updated to contain both the deprecated
"find_module" (for Python 2.7 support) and the recommended "find_spec".
Update of the Loader interface is deferred at a subsequent commit.

* Move the lines to be prepended inside "RepoLoader"

Also adjust the naming of a few variables too

* Remove spack.util.imp, since code is only used in spack.repo

* Remove support from loading Python modules Python > 3 but < 3.5

* Remove `Repo._create_namespace`

This function was interacting badly with the MetaPathFinder
and causing issues with "normal" imports. Removing the
function allows to do things like:
```python
import spack.pkg.builtin.mpich
cls = spack.pkg.builtin.mpich.Mpich
```

* Remove code needed to trigger the Singleton evaluation

The finder is coded in a way to trigger the Singleton,
so we don't need external code now that we register it
at module level into `sys.meta_path`.

* Add unit tests
2022-04-07 15:58:20 -07:00
iarspider
48b222c36b Add checksum for log4cplus@2.0.7 (#29912) 2022-04-07 15:52:40 -07:00
iarspider
6058d52746 Add checksum for libxml2@6.2.0 (#29918) 2022-04-07 15:37:25 -07:00
eugeneswalker
5f996edde9 e4s ci: expand mac mini stack (#29929) 2022-04-07 15:28:33 -07:00
Alexander Van Craen
ea8c9ae6b7 Add dpcpp version 2021.12 (#29934) 2022-04-07 15:25:08 -07:00
iarspider
b92a6d106b Update ucx to 1.12.0; add variants (#29944) 2022-04-07 14:58:50 -07:00
Kyle Gerheiser
2474609395 Fix OpenMPI external detection logic (#29946)
MPICH and OpenMPI share the same logic for these and these fixes have already been applied to MPICH.

See: https://github.com/spack/spack/pull/29284
2022-04-07 14:45:00 -07:00
iarspider
dd6f4e680a Add checksum for rdma-core@39.1 (#29921) 2022-04-07 15:34:19 -06:00
Harmen Stoppels
e73cf5df44 mpich: no longer a need for custom urls (#29941) 2022-04-07 14:13:57 -07:00
Harmen Stoppels
544486538c libtool: new version 2.4.7 (#29932) 2022-04-07 13:26:38 -06:00
Alexander Van Craen
f5b1d513e1 Add cxxopts version 3.0.0 (#29935) 2022-04-07 12:18:34 -06:00
Peter Brady
fa6f1336c1 petaca: add v22.03, update variants (#29752) 2022-04-07 18:44:55 +02:00
Scott Wittenburg
b2eda32e55 ci: clean up env between tests with working_dir (#29807) 2022-04-07 17:11:58 +02:00
Scott Wittenburg
ff33978b0d ci: do not prune specs when stacks are touched (#29825) 2022-04-07 08:55:40 -06:00
Harmen Stoppels
43577beb9c autotools.py: pic flags for %nvhpc (#29920) 2022-04-07 14:52:47 +02:00
Carlos Bederián
656074a96d python: add 3.10.4, 3.9.12, 3.9.11 (#29927) 2022-04-07 14:50:31 +02:00
Harmen Stoppels
cd0b6b9088 openmpi: inherit CudaPackage (#29917)
OpenMPI includes cuda_runtime.h, which errors with `#error --
unsupported GNU version! gcc versions later than 9 are not supported!`

By inheriting CudaPackage, the proper conflicts between `cuda` and
`gcc`/`clang` are added.
2022-04-07 09:08:37 +02:00
Andrea Valenzuela
57f5c92a39 Add checksum for py-fonttools@4.26.2 (#29897)
* Add checksum for fonttools@4.26.2

* Add python 3.6 dependency for py-fonttools@4.26.2 and update to 3.7 as of py-fonttools@4.28

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

Co-authored-by: Andrea Valenzuela <avalenzu@pccms161.dyndns.cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-06 10:20:49 -05:00
Chuck Atkins
7477161a05 mesa, mesa18: Package updates (#29573)
* mesa, mesa18: Implement the swr variant consistently between mesa and mesa18

* mesa: Bump to 21.3.7

* mesa: Build release by default tie swr to release builds

* mesa, mesa18: re-enable the llvm variant by default

This reverts the change made in #29360
2022-04-06 10:11:19 -05:00
Harmen Stoppels
5283ca5781 mfem: fix for mpich@4 (#29913) 2022-04-06 15:07:24 +00:00
Harmen Stoppels
beff697cc0 web.py: set User-Agent (#29919)
Some servers require `User-Agent` to be set, and otherwise error with
access denied. One such example is mpich.

To fix this, set `User-Agent: Spackbot/[version]` as a header.
Apparently by convention, it should include the word `bot`.
2022-04-06 15:59:20 +02:00
Mikael Simberg
0dc3c85a90 Add pika 0.3.0 (#29916) 2022-04-06 05:02:23 -06:00
Harmen Stoppels
558f7f007e link_tree.py: format conflict error message (#29870)
Show each `[src a] and [src b] both project to [dst]` on a separate
line.
2022-04-06 07:27:02 +02:00
Harmen Stoppels
a717ba9b87 xxhash: add v0.8.1 (#29868) 2022-04-06 07:25:23 +02:00
iarspider
419c2ecb95 gdrcopy: add v2.3 (#29874) 2022-04-06 07:10:34 +02:00
SXS Bot
532182db52 spectre: add v2022.04.04 (#29876)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2022-04-06 07:08:50 +02:00
Carlos Bederián
bd3e86ee28 scotch: @7: no longer builds libptesmumps.so (#29842) 2022-04-06 07:08:21 +02:00
Axel Huebl
7613b8a3bc WarpX: add v22.04 (#29883)
Update `warpx` & `py-warpx` to the latest release, `22.04`.
2022-04-06 07:03:24 +02:00
Rémi Lacroix
49f9a2136d mpiFileUtils: Add missing dependency with attr. (#29886)
This was added in version 0.11.1.
2022-04-06 07:02:01 +02:00
Hadrien G
57e2ea1ac4 Make dd4hep boost deps explicit (#29890) 2022-04-06 06:58:19 +02:00
Sergey Kosukhin
2816d28e90 claw: enable building with clang@11: and aocc@3: (#29891) 2022-04-06 06:57:38 +02:00
Auriane R
da6d9a33c1 pika: add hipblas dependency when rocm variant (#29681)
Hipblas is now compulsory when building with rocm.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-04-06 06:54:53 +02:00
Valentin Volkl
c8728a1526 gdb: depend only on python, not python+debug (#29374) 2022-04-06 06:52:42 +02:00
Andrea Valenzuela
24800c3de5 py-awkward: add v1.5.1 and fix rapidjson dependency (#29896)
Co-authored-by: Andrea Valenzuela <avalenzu@pccms161.dyndns.cern.ch>
2022-04-06 06:50:32 +02:00
Seth R. Johnson
e520d77760 libproxy: add perl/python variants (#29875) 2022-04-06 06:47:06 +02:00
Jean Luca Bez
90c4b43274 h5bench: add v1.2, use git to get submodules, add variants (#29819) 2022-04-06 06:31:49 +02:00
iarspider
2d6ba6663a Add checksums for cuDNN 8.3.2, 8.3.3; fix URLs on ARM (#29895) 2022-04-06 06:12:03 +02:00
dependabot[bot]
764a97d428 build(deps): bump codecov/codecov-action from 2.1.0 to 3 (#29908)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](f32b3a3741...e3c560433a)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-06 06:08:22 +02:00
Erik Schnetter
69b3a88fa3 Bugfix: CVS fetching (#29793)
#27021 broke fetching for CVS-based packages because:

- The mirror logic was using URL parsing to extract a path from the
  CVS repository location
- #27021 added sanity checks to enforce that strings passed to the
  URL parser were actually URLs

This replaces the call to "url_util.parse" with logic that is
customized for CVS. This implies that VCSFetchStrategy should
rename the "url_attr" attribute to something more generic, but
that should be handled separately.
2022-04-05 18:45:45 -07:00
Hadrien G
6a3c0825e3 It's already established that we want Boost +python above (#29894) 2022-04-05 12:34:42 -06:00
Harmen Stoppels
935faeb0c0 cmake: improve ~/+ownlibs (#29847)
* remove openssl variant

* require internal curl to have external openssl.

* Fix dependencies

* mono: remove ~openssl reference
2022-04-05 18:59:09 +02:00
Ken Raffenetti
16c5091026 mpich: add new releases (#28573)
* mpich: add 3.4.3, 4.0, 4.0.1
* mpich: add url_for_version function

For versions 4.0 and up, get tarballs from GitHub. This will help with
CI builds, since the MPICH website denies the urllib user-agent from
downloading release tarballs.

* mpich: disable cuda support

MPICH is failing to build in CI due to a configuration script bug in
detecting CUDA support. Disable CUDA support by default until we add a
proper variant.
2022-04-05 17:02:58 +02:00
eugeneswalker
b2717a8abf cub: new versions (#29878) 2022-04-04 18:23:58 -07:00
psakievich
4b3f6cede8 Update exawind openfast dependencies (#29884) 2022-04-04 18:15:30 -07:00
Massimiliano Culpo
f2fc4ee9af Allow conditional possible values in variants (#29530)
Allow declaring possible values for variants with an associated condition. If the variant takes one of those values, the condition is imposed as a further constraint.

The idea of this PR is to implement part of the mechanisms needed for modeling [packages with multiple build-systems]( https://github.com/spack/seps/pull/3). After this PR the build-system directive can be implemented as:
```python
variant(
    'build-system',
    default='cmake',
    values=(
        'autotools',
        conditional('cmake', when='@X.Y:')
    ), 
    description='...',
)
```

Modifications:
- [x] Allow conditional possible values in variants
- [x] Add a unit-test for the feature
- [x] Add documentation
2022-04-04 17:37:57 -07:00
iarspider
d64de54ebe Add shared/static variants to gmp and mpfr (#29836)
* Add shared/static variants to gmp and mpfr

* Update package.py

* Update package.py
2022-04-04 16:20:04 -07:00
Harmen Stoppels
b7eb4af98f expat: 2.4.x (#29872) 2022-04-04 16:00:13 -07:00
Wouter Deconinck
075457db00 Build tests/benchmarks only when self.run_tests (#29862) 2022-04-04 17:21:34 -05:00
Nathan Hanford
88d8ca9b65 rewiring of spliced specs (#26873)
* tests for rewiring pure specs to spliced specs

* relocate text, binaries, and links

* using llnl.util.symlink for windows compat.

Note: This does not include CLI hooks for relocation.

Co-authored-by: Nathan Hanford <hanford1@llnl.gov>
2022-04-04 14:45:35 -07:00
Josh Bowden
8ddaa08ed2 Damaris package: add version 1.6.0; master branch (#29083)
Also add options to build documentation and Python support.
2022-04-04 09:18:12 -07:00
Tracy-Pantleo
6d42a1e0f0 Wonton, Tangram, Portage packages: ctest update (#29823) 2022-04-04 09:12:54 -07:00
Harmen Stoppels
36c0a1eec3 curl: libs variant (#29865) 2022-04-04 07:30:30 -06:00
Valentin Volkl
d7aac3af24 root: add conflict for removed feature vmc (#29777)
Co-authored-by: Hadrien G. <knights_of_ni@gmx.com>
2022-04-04 06:10:26 -06:00
Harmen Stoppels
5680c90c7d curl: 7.82.0 (#29864) 2022-04-04 13:15:56 +02:00
Matthias Diener
b9cdc7ed55 charmpp: avoid setting MPICC for mpi backend (#23645) 2022-04-04 09:49:15 +00:00
Gianluca Ficarelli
fbf50fbfa8 Remove "dir=/tmp" when using tempfile.mkdtemp in packages (#29866)
From the tempfile module docs:

  The default directory is chosen from a platform-dependent list, but the
  user of the application can control the directory location by setting
  the TMPDIR, TEMP or TMP environment variables
2022-04-04 09:40:09 +00:00
Harmen Stoppels
a3de8eb8bb libuv: new versions, new url, drop autotools (#29846) 2022-04-04 03:02:29 -06:00
Andrey Prokopenko
a3c3f9f98b arborx: add v1.2 (#29853) 2022-04-04 02:58:32 -06:00
Satish Balay
a24306dad7 petsc,py-petsc4py,slepc,py-slepc4py: add version 3.17.0 (#29822) 2022-04-04 10:55:18 +02:00
Sajid Ali
fc00119e52 PETSc: add fortran variant to allow builds without fortran (#29800) 2022-04-04 10:54:45 +02:00
Glenn Johnson
1e437bbc66 ncbi-rmblastn: add missing dependencies (#29606)
missing dependencies
- boost
- lzo

Also, turn off libuv. This does not build properly with libuv so it is
not a dependency. However, configure will look for libuv on the system
and try to use it if found, thus breaking the build.
2022-04-04 10:50:36 +02:00
Weiqun Zhang
d04f6e47ff amrex: add v22.04 (#29838) 2022-04-04 10:34:54 +02:00
Thomas Dickerson
ee505e6c69 Add support for racket packages (#27564)
- Add variants for various common build flags, including support for both versions of the Racket VM environment.
- Prevent `-j` flags to `make`, which has been known to cause problems with Racket builds.
- Prefer the minimal release to improve install times. Bells and whistles carry their own runtime dependencies and should be installed via `raco`. An enterprising user may even create a `RacketPackage` class to make spack aware of `raco` installed packages.
- Match the official version numbering scheme.
2022-04-04 10:32:25 +02:00
Cody Balos
d61e54b4c7 sundials: add magma variant (#29844) 2022-04-04 10:12:56 +02:00
Adam J. Stewart
443db0b8c3 py-pandas: add v1.4.2 (#29856) 2022-04-04 10:05:23 +02:00
dependabot[bot]
105b42c15f build(deps): bump actions/setup-python from 2 to 3.1.0 (#29843)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...9c644ca2ab8e57ea0a487b5ec2f8290740378bfd)

---
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-04-04 09:55:49 +02:00
Harmen Stoppels
9cc45f66b7 zstd: doesn't build with %nvhpc (#29849) 2022-04-04 09:48:24 +02:00
Harmen Stoppels
28a9da9130 cmake: build with %nvhpc (#29851) 2022-04-04 09:47:59 +02:00
marcost2
21cb859b4f amber20 + ambertools21: fix build issues (#29809)
* Amber: fix must be declared before the namelist is declared

[1]: http://archive.ambermd.org/202105/0098.html
2022-04-04 09:47:09 +02:00
Erik Schnetter
dc7fbafdb2 zlib: Update to 1.2.12 (#29792)
- Update to version 1.2.12.
- Mark older versions as deprecated because they have security bugs.
- mfem: Update list of system library directories
- zlib patch: cc patch

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-04-04 09:03:00 +02:00
Harmen Stoppels
d5a78d49fe mbedtls: fix build with %nvhpc (#29850) 2022-04-04 00:58:19 -06:00
Harmen Stoppels
8ef299ed16 perl: conflict with unpatched releases for %nvhpc (#29854) 2022-04-04 08:33:09 +02:00
Harmen Stoppels
79bc2949ce openssl: add conflict for %nvhpc (#29855) 2022-04-04 08:31:44 +02:00
Chuck Atkins
542f46065a adios2: Bump version and cleanup package code (#29779) 2022-04-02 18:16:07 -07:00
John W. Parent
c7b9354810 Perl package: add version 5.34.1 (#29840)
Versions at or after 5.34.1 don't build with MSVC <= 19.29.30136
2022-04-02 04:38:30 -06:00
Brian Spilner
a94e47743f cdo: new version 2.0.5 (#29558) 2022-04-02 02:26:23 -06:00
Keita Iwabuchi
bfb846a513 Metall package: add v0.18 and v0.19 (#28982)
Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2022-04-02 01:46:19 -06:00
Jen Herting
14c5d26c48 [py-httpcore] added version 0.14.7 (#29805)
* [py-httpcore] py-wheel is implied by PythonPackage

* [py-httpcore] python packages are type=('build', 'run')

* [py-httpcore] fixed dependency versions

* [py-httpcore] added version 0.14.7
2022-04-02 00:42:33 -06:00
Jen Herting
dfc6c2a437 [py-hyperframe] added version 5.2.0 (#29803)
* [py-hyperframe] py-wheel is implied by PythonPackage

* [py-hyperframe] fixed python version requirement

* [py-hyperframe] added version 5.2.0
2022-04-02 00:26:38 -06:00
Jen Herting
5874d1fbd8 New package: py-jamo (#29545)
* [py-jamo] created template

* [py-jamo]

- added homepage
- added dependencies
- added description
- removed fixmes
2022-04-02 00:06:31 -06:00
Valentin Volkl
a53ffbd621 dd4hep, podio: add new versions, fix tests (#29541) 2022-04-01 23:58:31 -06:00
iarspider
54491a5d96 New package: gbl (#29834) 2022-04-01 17:27:14 -07:00
haralmha
f12c3fcd55 fplll package: Add version 5.4.1 (#29829) 2022-04-01 17:02:32 -07:00
Brian Van Essen
29da99427e "spack external find": also find library-only packages (#28005)
Update "spack external find --all" to also find library-only packages.
A Package can add a ".libraries" attribute, which is a list of regular
expressions to use to find libraries associated with the Package.
"spack external find --all" will search LD_LIBRARY_PATH for potential
libraries.

This PR adds examples for NCCL, RCCL, and hipblas packages. These
examples specify the suffix ".so" for the regular expressions used
to find libraries, so generally are only useful for detecting library
packages on Linux.
2022-04-01 13:30:10 -07:00
Peter Scheibel
a58fa289b9 Allow "spack install foo@git-hash" without terminal prompt (#29827)
Do not prompt user with checksum warning when using git commit hashes
as versions. Spack was incorrectly reporting this as a potential
problem: it would display a prompt asking the user whether they
want to proceed if Spack was running in a terminal, or it would
terminate the running instance of Spack if running as part of a
script.
2022-04-01 10:27:03 -07:00
Harmen Stoppels
ea61a657ae hwloc: 2.0.x, 2.7.x (#29816) 2022-04-01 06:02:33 -06:00
Ben Morgan
56695bb09c vecgeom: add v1.1.20 (#29831) 2022-04-01 07:15:44 -04:00
Howard Pritchard
6237d54936 openmpi: add 4.1.3 release (#29824)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2022-04-01 04:26:22 -06:00
Harmen Stoppels
a7b91321e5 osu-micro-benchmarks: add v5.9 (#29814)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-01 00:46:43 -06:00
Harmen Stoppels
9dac0dea25 ca-certificates-mozilla: 2022-03-18, 2022-03-29 (#29813) 2022-04-01 00:46:21 -06:00
Cory Bloor
9a977cb694 rocm-cmake: remove ldconfig variant (#29508)
* rocm-cmake: remove ldconfig variant

The packages built for `rocm-cmake~ldconfig` and `rocm-cmake+ldconfig`
are identical, so the variant is unnecessary.

The `ROCM_DISABLE_LDCONFIG` option changes how `rocm_create_package`
generates DEB and RPM packages with CPack. rocm-cmake itself uses
`rocm_create_package`, however, this option is has no effect because
Spack does not build the CPack packages. It is also unnecessary on
rocm-cmake, because rocm-cmake does not contain any shared libraries
for ldconfig to configure. The rocm-cmake package is purely composed
of CMake scripts.

* Tighten CMake version dependency

* Improve package description
2022-03-31 19:34:11 -06:00
John W. Parent
88b1bf751d Windows Support: Fixup Perl build (#29711)
* Add pl2bat to PATH: Windows on Perl requires the script pl2bat.bat
  and Perl to be available to the installer via the PATH. The build
  and dependent environments of Perl on Windows have the install
  prefix bin added to the PATH.
* symlink with win32file module instead of using Executable to
  call mklink (mklink is a shell function and so is not accessible
  in this manner).
2022-03-31 11:47:11 -07:00
Harmen Stoppels
90da5dc909 pmix: new versions (#29817) 2022-03-31 19:15:09 +02:00
Ivo Steinbrecher
44263b7226 Allow use of "git:"-based URLs (#29765) 2022-03-31 10:14:18 -07:00
Tyler Funnell
1ecb19894c fish: add v3.4.1 (#29818) 2022-03-31 09:58:30 -06:00
haralmha
81e9e47337 py-marshmallow: Add new package (#29764)
* py-marshmallow: Add new package

* Modify py-packaging dependency type

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

* Add run dependency to py-packaging

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-31 09:56:18 -05:00
iarspider
cbba0ffc0c pacparser: add v1.3.8, v1.3.9 (#29677) 2022-03-31 09:34:06 +02:00
haralmha
f20db5fc61 lwtnn: add new package (#29763) 2022-03-31 07:22:48 +02:00
Brice Videau
40154d83ae ytopt: add v0.0.3 (#29655)
Co-authored-by: Jaehoon Koo <jkoo@mcswl052.mcs.anl.gov>
2022-03-31 04:40:54 +00:00
haralmha
5c5da19b0c hto4l: Add new package (#29794) 2022-03-31 06:22:55 +02:00
Mark W. Krentel
75d692eed3 libunwind: restore version 1.6.2 to preferred (#29796)
Version 1.6.2 is now available from mirror.spack.io, so this avoids
problems fetching from savannah.nongnu.org.
2022-03-31 06:21:28 +02:00
Glenn Johnson
f6f89677a7 giflib: add libs property (#29604) 2022-03-30 22:14:31 -06:00
Max Zeyen
26bcbc521e gpi-space: fix boost dependency (#29787) 2022-03-31 06:14:13 +02:00
Jen Herting
c99b3c31db New package: py-pypinyin (#29547)
* [py-pypinyin] created template

* [py-pypinyin]

- added homepage
- added dependencies
- removed some fixmes

* [py-pypinyin] added description
2022-03-30 22:02:41 -06:00
Jon Rood
768c35dd23 amr-wind: does not require hypre with unified memory any longer. (#29799) 2022-03-31 05:56:30 +02:00
Auriane R
c9054a66af pika: add conflict with gcc versions strictly inferior to 9 (#29798) 2022-03-31 05:53:51 +02:00
Vicente Bolea
5d47347d8c ParaView: add v5.10.1 (#29516) 2022-03-31 05:38:22 +02:00
Qian Jianhua
f136f62407 exciting: fix bug on aarch64 (#29762) 2022-03-30 21:30:27 -06:00
Richarda Butler
63b981dba4 Bugfix: Kokkos stand alone test (#29403)
* Use the cmake in the user's path

* Use test_suite cache

* Clean up the code
2022-03-30 18:39:41 -07:00
Scott Wittenburg
685e3d7ae9 spack ci: filter untouched pkgs from PR pipelines (#29697)
We've previously generated CI pipelines for PRs, and they rebuild any packages that don't have
a binary in an existing build cache.  The assumption we were making was that ALL prior merged
builds would be in cache, but due to the way we do security in the pipeline, they aren't. `develop`
pipelines can take a while to catch up with the latest PRs, and while it does that, there may be a
bunch of redundant builds on PRs that duplicate things being rebuilt on `develop`.  Until we can
do better caching of PR builds, we'll have this problem.

We can do better in PRs, though, by *only* rebuilding things in the CI environment that are actually
touched by the PR.  This change computes exactly what packages are changed by a PR branch and
*only* includes those packages' dependents and dependencies in the generated pipeline.  Other
as-yet unbuilt packages are pruned from CI for the PR.

For `develop` pipelines, we still want to build everything to ensure that the stack works, and to ensure
that `develop` catches up with PRs. This is especially true since we do not do rebuilds for *every* commit
on `develop` -- just the most recent one after each `develop` pipeline finishes.  Since we skip around,
we may end up missing builds unless we ensure that we rebuild everything.

We differentiate between `develop` and PR pipelines in `.gitlab-ci.yml` by setting 
`SPACK_PRUNE_UNTOUCHED` for PRs. `develop` will still have the old behavior.

- [x] Add `SPACK_PRUNE_UNTOUCHED` variable to `spack ci`
- [x] Refactor `spack pkg` command by moving historical package checking logic to `spack.repo`
- [x] Implement pruning logic in `spack ci` to remove untouched packages
- [x] add tests
2022-03-30 17:17:29 -07:00
Adam J. Stewart
f97be99f2a Mixed compilers: drop warning message to debug level (#29748) 2022-03-30 15:18:37 -06:00
haralmha
1eb61dd9f3 py-pysimdjson: Add new package (#29767)
* py-pysimdjson: Add new package

* Cleanup

* Fix python requirement

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-30 14:58:36 -06:00
Jörg Behrmann
4571f4c994 Add completion of locals to spack python (#29702) 2022-03-30 14:38:39 -06:00
Glenn Johnson
20000493f3 libtiff: add missing dependencies (#29605)
* libtiff: add missing dependencies

- gl
- glu
- freeglut

* Make X/GL only for Darwin/Mac

* Catch the force_autoreconf property

* add platform=darwin to the autotools deps as well

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-30 14:27:01 -05:00
Harmen Stoppels
36fcf461d9 cmake: add v3.23.0 (#29790) 2022-03-30 08:23:22 -06:00
Greg Becker
58a32b04d9 patch cache: fix bug finding inherited packages (#29574) 2022-03-30 14:19:52 +02:00
Olivier Cessenat
d13c1cfa9f keepassxc: adding version 2.6.6 and major release 2.7.0 (#29676) 2022-03-30 10:55:56 +02:00
Valentin Volkl
a77ce04005 krb5: add v1.19.3, fix build on clang13 (#29683)
Fixes the following error on %clang@13.0.1
  >> 2413    bison: error while loading shared libraries: libtextstyle.so.0: cannot open shared object file: No such file or directory
  >> 2414    make[2]: *** [<builtin>: getdate.c] Error 127
2022-03-30 10:53:57 +02:00
Weston Ortiz
cd6e70f539 goma: add v7.0.4 (#29685) 2022-03-30 10:53:25 +02:00
Seth R. Johnson
1b067ee3e6 veccore: drop useless variants and switch to new repository location (#29678)
VecCore's new home is on github (hashes have changed even though commit
IDs and presumably contents are the same), and it does not need any configuration
options. See discussion at https://gitlab.cern.ch/VecGeom/VecCore/-/merge_requests/1 .
2022-03-30 10:50:41 +02:00
dlkuehn
cd2b2898a1 kallisto: add v0.48.0 (#29689)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-03-30 10:48:44 +02:00
dlkuehn
4c437a8683 freebayes: add v1.3.6 (#29692)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-03-30 10:45:31 +02:00
Tom Scogland
4898759eab gcc: add missing dependencies (#29671)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-30 10:42:38 +02:00
Cameron Smith
295507129b simmetrix-simmodsuite: add opencascade variant and version 16.0-220312 (#29759)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-03-30 02:33:45 -06:00
Matthieu Dorier
eba0997521 ftxui: add new package (#29724) 2022-03-30 10:10:45 +02:00
Glenn Johnson
acb982f7fa py-m2r: constrain py-mistune to version 0.8.1 (#29608)
* py-m2r: constrain py-mistune to version 0.8.1

* Remove lower half of py-mistune version constraint
2022-03-30 08:00:39 +00:00
Greg Sjaardema
ef1e96def4 cgns: add maintainer (#29775) 2022-03-30 09:42:18 +02:00
Niclas Jansson
fdab17a4d4 neko: add new package (#28791)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-03-30 09:34:10 +02:00
Thomas Dickerson
8806f9f826 proj: add v8.2.1, v8.2.0 and v8.1.1 (#29774)
Version 9.0.0 drops Autotools support in favor of CMake and will presumably require larger changes to package.py
2022-03-30 01:31:56 -06:00
Robert Pavel
54d738ff9c Flecsi: updated version semantic (#29780)
Updated flecsi spackage to better support changes in control variables
in post 2.1.0 releases while also making legacy versions clearer as to
what is a tagged release and what is a rolling-ish development branch
2022-03-30 09:21:17 +02:00
Mikael Simberg
e58ac0705d Add patch to fix compilation of boost with compilers not in path (#29718)
Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
2022-03-30 09:14:03 +02:00
Glenn Johnson
0182e39d44 r-quantreg: add v5.88 (#29621) 2022-03-29 21:02:41 -06:00
Glenn Johnson
7cfe626e21 py-reportlab: add missing dependency on freetype (#29611)
* py-reportlab: add missing dependency on freetype

* Add missing dependencies

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

Use pil virtual.

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-29 20:43:12 -05:00
Seth R. Johnson
0367b73ed5 Trilinos: add linker flags to improve behavior (#29492) 2022-03-29 18:13:09 -04:00
Nichols A. Romero
f66e7aea94 Support DASK backend in XARRAY. (#29726)
* Support DASK backend in XARRAY.

* Create XARRAY parallel variant with correct py-dask dependency.
2022-03-29 14:02:40 -06:00
MicK7
ef23c3b122 Update cgns for new release (#29709)
Add CGNS 4.3.0 version
2022-03-29 20:36:05 +02:00
Asher Mancinelli
078ee48c4b ExaGO: add v1.4.0 and v1.4.1 (#29712)
* ExaGO: Handling of cuda architectures and amdgpu targets changed
  to effectively handle multiple targets. See #28441.
* Add ROCm support to ExaGO and update ROCm support in HiOp
* ExaGO+rocm requires HiOp+rocm
* Newer versions of CMake may set HIP_CLANG_INCLUDE_PATH incorrectly:
  add comments to the ExaGO/HiOp packages explaining how to address
  this problem if it occurs.
2022-03-29 10:01:30 -07:00
Harmen Stoppels
9516fa9447 cmake: use CMAKE_INSTALL_RPATH_USE_LINK_PATH (#29703)
* cmake: use CMAKE_INSTALL_RPATH_USE_LINK_PATH

Spack has a heuristic to add rpaths for packages it knows are required,
but it's really a heuristic, and it does not work when the dependencies
put their libraries in a different folder than `<prefix>/lib{64,}`.

CMake patches binaries after install with the "install rpaths", which by
default are provided by Spack and its heuristic through
`CMAKE_INSTALL_RPATH`.

CMake however knows better what libraries are effectively being linked
to, and has an option to include those in the install rpath too, through
`CMAKE_INSTALL_RPATH_USE_LINK_PATH`.

These two CMake options are complementary, repeated rpaths seem to be
filtered, and the "use link path" paths are appended to Spack's
heuristic "install rpath".

So, it seems like a good idea to enable "use link path" by default, so
that:
- `dlopen` by library name uses Spack's heuristic search paths
- linked libraries in non-standard locations within a prefix get an
rpath thanks to CMake.

* docs
2022-03-29 12:24:10 -04:00
Greg Sjaardema
c0b400c422 cgns: add v4.3.0 (#29773) 2022-03-29 09:46:55 -06:00
Matthieu Dorier
134debc518 mochi-margo: add v0.9.8 (#29771) 2022-03-29 17:39:14 +02:00
Seth R. Johnson
ed1a48f50a SUNDIALS: refactor CMake recipe (#29585)
- Use define/define_from_variant
- Remove unused "fortran_flags"
- Fix CUDA architectures when using multiple (needs semicolon not comma
  separators)
- Add `when=` variant restrictions to simplify logic
2022-03-29 17:09:02 +02:00
Carlos Bederián
02cbb8ffaa cuda: add 11.6.2 (#29756) 2022-03-28 17:38:38 -06:00
Tamara Dahlgren
fd055d4678 spack info: make sections optional; add build/stand-alone test information (#22097)
Add output of build- and install-time tests to info command

Enable dependencies, variants, and versions by default (i.e., provide --no* 
options; add gcc to test_info_fields to increase coverage for c_names->v_names
2022-03-28 22:15:38 +00:00
Thomas Dickerson
40fad1472a Convert git-over-ssh package URLs to canonical format (#29754)
Use canonical SSH urls for git-over-ssh package urls. See also: discussion on #29706, #29749, and https://forum.gitlab.com/t/provided-ssh-url-is-in-the-wrong-format/14320
2022-03-28 14:48:20 -07:00
Richard Berger
00469d84e7 spiner: fix +cuda (#29758) 2022-03-28 15:30:44 -06:00
John W. Parent
1c2fff2cb7 Add ssh to filter of valid urls (#29749) 2022-03-28 14:13:55 -07:00
eugeneswalker
5424e4bdc1 e4s ci spack.yaml: add h5bench (#29755) 2022-03-28 20:55:14 +00:00
Richard Berger
5fe20b462c New package: spiner (#29719)
* New package: spiner

* Update dependencies for spiner package

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

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

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

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

* Remove versions that can't be installed and use ports-of-call@1.1.0

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2022-03-28 13:22:46 -06:00
Massimiliano Culpo
2856b29740 Removed unneeded conflicts in CudaPackage and RocmPackage (#29699)
Since the variant is conditional there's no need to add
conflicts too.
2022-03-28 10:58:56 -06:00
Jim Galarowicz
a7e365536b survey package: add versions 1.0.2/1.0.3; add tls model variant (#29375) 2022-03-28 09:20:14 -07:00
Richard Berger
6aedbb32da ports-of-call: new version 1.1.0 (#29723)
Version 1.0.0 was uninstallable.
2022-03-28 11:30:57 -04:00
FJ-NaokiMatsumura
9e169ae243 batchedblas: new package (#29028) 2022-03-28 17:16:03 +02:00
Max Zeyen
1dbab78db1 gpi-space: add v22.03 (#29736) 2022-03-28 14:50:21 +02:00
Filippo Spiga
8228ac7d62 Adding NVIDIA HPC SDK 22.3 (#29737)
Co-authored-by: Filippo Spiga <fspiga@nvidia.com>
2022-03-28 05:18:29 -06:00
Harmen Stoppels
3f41f8d093 julia: add patch reverting llvm rpath changes (#29731) 2022-03-28 02:34:27 -06:00
Harmen Stoppels
1ac7f2b02b julia 1.6/1.7: constrain libgit2, libssh2 (#29728) 2022-03-28 10:28:09 +02:00
FJ-NaokiMatsumura
26f94b24e8 py-torch: fix to build with fujitsu-ssl2 (#29283)
* py-torch: fix build with fujitsu-ssl2

* fix to use fujitsu-ssl2 in py-torch v1.5.0 to v1.11.0

* fix to use fujitsu-ssl2 in py-torch v1.2.0 to v1.11.0

* Delete fj-ssl2.patch

* renamed the patches

* Rename fj-ssl2.1.5.patch to fj-ssl2_1.5.patch

* Delete fj-ssl2_1.5.patch
2022-03-27 19:22:18 -06:00
Matthieu Dorier
c75fb4da20 mochi-thallium: new package (#29722) 2022-03-27 18:18:24 -06:00
百地 希留耶
cd00eba9d6 autotools doc: add missing right quote (#29734) 2022-03-27 22:42:29 +00:00
David M. Rogers
073330e893 h5z-zfp: fix build when ^hdf5+mpi (#29733) 2022-03-27 13:50:53 -04:00
Howard Pritchard
bb9ac2be9c openmpi: switch to using main (#29725)
The Open MPI project has elected to name our development branch - main.

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2022-03-27 13:01:33 +02:00
Glenn Johnson
b1f38f6fa2 py-torchvision: adjust jpeg dependency (#29614) 2022-03-26 21:21:37 -05:00
eugeneswalker
8e4e69e91d llvm: add @14.0.0 (#29732)
* llvm: add @14.0.0

* llvm@14 provides virtual
2022-03-26 15:42:24 -06:00
Glenn Johnson
a785eeb896 r-rsqlite: add v2.2.10 (#29624) 2022-03-25 21:06:19 -06:00
Jen Herting
1b41e7408d [julia] gfortran patch required for 1.7.2 (#29720) 2022-03-25 19:20:22 +01:00
Sreenivasa Murthy Kolam
15bdc6b3e1 Update rocm recipes for rocm-5.0.0 release (#29269)
* update rocm recipes for ROCm-5.0.0 release

* revert address sanitizer changes

* fix style errors

* update to the rocm recipes for 5.0.2 release

* fix review comments inside the rocfft recipe

* update the rocfft recipe for sqlite dependency
2022-03-25 10:56:52 -07:00
Richard Berger
56717e8b85 New package: ports-of-call (#29696) 2022-03-25 09:13:06 -06:00
Massimiliano Culpo
048a0de35b Use the appropriate function to remove files in the stage directory (#29690)
We shouldn't be using "remove_linked_tree" to remove the lock file,
since that function expects to receive a directory path as an
argument.

Also, as a further measure to avoid regression, this commit restores
the "ignore_errors=True" argument on linux and adds a unit test
checking that "remove_linked_tree" doesn't change file permissions
as a side effect of a failure to remove.
2022-03-25 08:39:09 +01:00
iarspider
4702b49094 Sherpa: add several new variants used by CMS (#29338) 2022-03-24 19:30:33 -06:00
Valentin Volkl
0168047429 vecgeom: fix install error when ~cuda (#29716) 2022-03-24 18:38:56 -06:00
Jean Luca Bez
0a3d496db1 PDC: add version 0.2 and branches (#29572)
* Update package.py

* Update package.py

* Fixes on versions

* Fix style

* Remove code

* Include latest version and removed code

* Remove unecessary cmake dependency

* Apply suggestions
2022-03-24 18:34:44 -06:00
Harmen Stoppels
e22fbdb6b8 environment.py: ensure view dir does not exist (#29641) 2022-03-24 15:42:33 -06:00
iarspider
f8201f4acc Fix py-onnx-runtime recipe (#29646)
* Fix py-onnx-runtime recipe

* Add missing dependencies

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

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

* Update package.py

* Better fix for py-onnx-runtime

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-24 14:23:52 -05:00
Cameron Smith
27e57c444e omega-h: add v10.1.0 from fork (#29528)
* omegah: v10.1.0

this version is from the SCOREC fork of Omega_h

* prefix version with scorec

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

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2022-03-24 12:03:23 -06:00
Harmen Stoppels
1b55057f36 add_files_to_view: flip incorrect default (#29700) 2022-03-24 11:59:03 -06:00
Harmen Stoppels
f8224f284c environment.py: concrete root specs to view (#29634)
Slight simplification of the code: just pass the list of concrete root
specs to the view
2022-03-24 14:59:24 +01:00
Harmen Stoppels
1a728c98ff fix --reuse w/ upstreams in env (#29680) 2022-03-24 13:25:00 +00:00
Harmen Stoppels
59e522e815 environment views: single pass view generation (#29443)
Reduces the number of stat calls to a bare minimum:
- Single pass over src prefixes
- Handle projection clashes in memory

Symlinked directories in the src prefixes are now conditionally
transformed into directories with symlinks in the dst dir. Notably
`intel-mkl`, `cuda` and `qt` has top-level symlinked directories that
previously resulted in empty directories in the view. We now avoid
cycles and possible exponential blowup by only expanding symlinks that:
- point to dirs deeper in the folder structure;
- are a fixed depth of 2.
2022-03-24 03:54:33 -06:00
Harmen Stoppels
011a8b3f3e environment.py: clean up broken views on failure (#29643)
When view creation fails for some reason, remove it, so that the next
time around it can start from scratch.
2022-03-24 09:04:42 +01:00
Ralf Gommers
20255b6161 Update py-numpy dependency on Python to avoid build failures (#29682) 2022-03-23 17:51:56 -06:00
Valentin Volkl
34732c57b3 py-cffi: add compiler flags to fix build with clang (#29679)
* py-cffi: add compiler flags to fix build with clang

For %clang@13.0.1, this avoids the
```
clang-13: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
```
warning being turned into an error, and fixes this link error:
```
build/temp.linux-x86_64-3.10/c/_cffi_backend.o: file not recognized: file format not recognized
```

* style
2022-03-23 13:49:36 -05:00
Harmen Stoppels
c300b92047 environment: be more defensive when deleting roots for old views (#29636)
Currently `old_root` is computed by reading the symlink at `self.root`.
We should be more defensive in removing it by checking that it is in the
same directory as the new root. Otherwise, in the worst case, when
someone runs `spack env create --with-view=./view -d .` and `view`
already exists and is a symlink to `/`, Spack effectively runs `rm -rf /`.
2022-03-23 08:54:55 -06:00
Ce Qin
f41c3a0fe9 tetgen: add v1.5.1 and v1.6.0 (#29630) 2022-03-23 11:00:07 +01:00
Harmen Stoppels
773da7ceba python: drop dependency on file for script check (#29513)
`file` was used to detect Python scripts with shebangs, so that the interpreter could be changed from <python prefix> to <view path>. With this change, we detect shebangs using Python instead, so that `file` is no longer required.
2022-03-23 10:31:23 +01:00
Matthew Archer
487b1c3690 kahip: add v3.12, v3.13 and v3.14 (#29648)
Co-authored-by: cleathart <c.leathart@hotmail.co.uk>
2022-03-23 10:22:27 +01:00
luker
5afdccba06 variorum: update package for CCE (#29656)
CCE needs additional compiler flags.
2022-03-23 09:19:01 +01:00
eugeneswalker
49498af9ec libgit2: add versions 1.2.0, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.4.3 (#29675) 2022-03-23 09:16:23 +01:00
Adam J. Stewart
5df10c04cd Use stable URLs and ?full_index=1 for all github patches (#29239)
The number of commit characters in patch files fetched from GitHub can change,
so we should use `full_index=1` to enforce full commit hashes (and a stable
patch `sha256`).

Similarly, URLs for branches like `master` don't give us stable patch files,
because branches are moving targets. Use specific tags or commits for those.

- [x] update all github patch URLs to use `full_index=1`
- [x] don't use `master` or other branches for patches
- [x] add an audit check and a test for `?full_index=1`

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2022-03-23 08:50:00 +01:00
Massimiliano Culpo
8f89932aad Remove known issues from documentation (#29664)
Known issues reports only 2 issues, among the bugs reported on GitHub.
One of the two is also outdated, since the issue has been solved
with the new concretizer. Thus, this commit removes the section.
2022-03-23 08:06:49 +01:00
Carlos Bederián
b936168224 ucx: add 1.12.1 (#29665) 2022-03-22 19:18:57 -07:00
Harmen Stoppels
80195bd1ed sbang.py: single lstat (#29670) 2022-03-22 23:12:06 +01:00
Abhik Sarkar
eda5b854a5 Feature/composed boost pkg deps p1 (#28959)
* This commit removes the Boost.with_default_variants to variants
that packages are precisely dependant upon. This is the first batch
of 20 packages with modified boost dependencies.

* Style fixes

* Tested bridger: works for gcc-4.9.3 and gcc-8.3.1
2022-03-22 13:42:15 -06:00
François Trahay
6760175289 New package: Vite (#29489) 2022-03-22 10:46:39 -06:00
John W. Parent
a14901f792 Windows PWSH setup fix (#29649)
A command in the script to make Spack accessible in PWSH was invoked with
multiple arguments when it in fact requires a single argument.
2022-03-22 09:42:21 -07:00
Massimiliano Culpo
9177f223c3 libunwind: make v1.5.0 preferred (#29660)
Commit 26ff443 made the Gitlab pipeline failing on develop 
(while it was not failing in the original PR) due to errors in the 
fetcher. This change preserves the new versions, but will give
some time for use to sync our tarball mirror for better reliability
2022-03-22 11:33:27 +01:00
eugeneswalker
ad6d28d9ad e4s mini mac stack: add bzip2 (#29650) 2022-03-21 21:22:21 -06:00
Mark W. Krentel
26ff44388f libunwind: add versions 1.6.2 and 1.6-stable (#29639) 2022-03-21 22:30:36 +00:00
Seth R. Johnson
075c76128a numactl: add explicit darwin conflict (#29481) 2022-03-21 15:50:01 -06:00
Seth R. Johnson
226004b960 Add conflicts/updates for HEP tools on Summit (#29556)
* Fix bad `-mfma` flag on summit

* ROOT: new version and ppc conflict

See https://github.com/root-project/root/issues/9297
2022-03-21 15:43:01 -06:00
Thomas Madlener
3448a4642a geant4-data: Add latest version to make it available for geant4 (#29462) 2022-03-21 15:14:43 -06:00
Joe Schoonover
dae656405f hohqmesh: add v1.2.1 (#29454) 2022-03-21 20:24:48 +00:00
Valentin Volkl
3c0e422509 xapian-core: add v1.4.19 (#29583) 2022-03-21 14:02:57 -06:00
Valentin Volkl
b08f147cf3 edm4hep: add version 0.4.1 (#29542)
* edm4hep: add version 0.4.1

* style
2022-03-21 13:10:40 -06:00
Glenn Johnson
15dbc86177 r-insight: add v0.16.0 (#29617) 2022-03-21 11:53:21 -06:00
Glenn Johnson
2f3a31cef6 py-pyvcf: constrain py-setuptools to 0.57 (#29610)
This package can not use setuptools newer than 0.57 due to needing
features removed in later versions of setuptools.
2022-03-21 11:03:12 -06:00
Seth R. Johnson
fa554d763e vecgeom: fix cuda arch (#29582)
* vecgeom: fix cuda arch

* vecgeom: change 'options' to 'args'

* vecgeom: add spec to locals

* vecgeom: suppress architecture specializations when cuda
2022-03-21 10:54:58 -06:00
Glenn Johnson
b4b8aaf3bc r-sf: add v1.0.7 (#29625) 2022-03-21 10:47:01 -06:00
Valentin Volkl
c4b3b9ed9a mariadb: add version 10.8.2 (#29586) 2022-03-21 10:41:45 -06:00
Glenn Johnson
674030ce62 r-yaml: add v2.3.5 (#29628) 2022-03-21 17:27:09 +01:00
haralmha
0b7eca36d1 lcgenv: add new package (#29436) 2022-03-21 17:03:20 +01:00
Felix Liu
3c1f87099b Updated configure flags in newer versions of ipopt (#29445) 2022-03-21 17:01:13 +01:00
David M. Rogers
6d0b59b7ea sparrow: add new package (#29291) 2022-03-21 16:59:11 +01:00
Greg Becker
dba7a03daa config add: fix parsing of validator error to infer type from oneOf (#29475) 2022-03-21 16:55:02 +01:00
miheer vaidya
560abdc46d Barvinok: fix pet variant description, add maintainer (#29421) 2022-03-21 16:53:44 +01:00
Glenn Johnson
9c2465173e r-tinytex: add v0.37 (#29627) 2022-03-21 09:51:00 -06:00
Thomas Madlener
06a9496a39 geant4: Add external find support (#29642)
* geant4: Add external find support (partial)

* Fix style

* Fix style another time
2022-03-21 15:50:42 +00:00
Glenn Johnson
8fcfde62df r-terra: add v1.5-21 (#29626) 2022-03-21 09:43:42 -06:00
dependabot[bot]
b65054881f build(deps): bump docker/build-push-action from 2.9.0 to 2.10.0 (#29506)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.9.0 to 2.10.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](7f9d37fa54...ac9327eae2)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 16:39:45 +01:00
Cameron Smith
6b6f67e90f pumi: add v2.2.7 (#29521) 2022-03-21 16:36:23 +01:00
Larry Knox
e485d16c62 hdf5: add v1.13.1 (#29514)
Also add preferred=True to all "maintenance versions".
2022-03-21 16:23:41 +01:00
Harmen Stoppels
18f71aef1e elfio: add v3.10 (#29644) 2022-03-21 08:27:08 -06:00
Glenn Johnson
ef0bc71035 r-recipes: add v0.2.0 (#29623)
Also add new package: r-hardhat.
2022-03-21 09:21:02 -05:00
Glenn Johnson
b4ab4ddc27 augustus: explicitly depend on ncurses (#29597) 2022-03-21 15:18:19 +01:00
Glenn Johnson
f2b123760c bamtools: add missing dependency on jsoncpp (#29598) 2022-03-21 15:16:34 +01:00
Glenn Johnson
db5bd7134a cistem: add missing dependency on libtiff (#29599) 2022-03-21 15:15:59 +01:00
Glenn Johnson
26a62a3258 cnvnator: tweak dependencies (#29600)
- constrain samtools to version 1.13
- replace lzma dependency with xz
- add missing dependencies for libdeflate and openssl
- explicitly set LD_FLAGS for dependencies in makefile
2022-03-21 15:15:27 +01:00
Glenn Johnson
732f1dd14d gate: add v9.1 (#29601) 2022-03-21 15:14:54 +01:00
Glenn Johnson
e05f453531 gatetools: add v0.11.2 (#29602) 2022-03-21 15:14:20 +01:00
Glenn Johnson
d69e8dbace relion: add dependency on libpng for version 4 (#29615) 2022-03-21 15:10:52 +01:00
Glenn Johnson
3ec27332ec r-future: add v1.24.0 (#29616) 2022-03-21 15:09:51 +01:00
Glenn Johnson
311dc67536 r-jsonlite: add v1.8.0 (#29618) 2022-03-21 15:08:56 +01:00
Glenn Johnson
1b849aaa2c r-philentropy: add v0.6.0 (#29619)
This also adds r-poorman as a new package.
2022-03-21 15:08:34 +01:00
Glenn Johnson
b67c7e593b r-pillar: add v1.7.0 (#29620) 2022-03-21 15:08:08 +01:00
Glenn Johnson
daaac3e2f0 r-rcurl: add v1.98-1.6 (#29622) 2022-03-21 15:06:41 +01:00
haralmha
c7f9431e1b crmc: new package (#29371) 2022-03-21 14:53:06 +01:00
haralmha
b0a712097a ftjam: add new package (#29320) 2022-03-21 14:52:12 +01:00
Paul Kuberry
558e99ecca xyce: switch to Trilinos 13.2.0 and add dependencies for +pymi (#29331)
* xyce: switch to Trilinos 13.2.0 and add dependencies for +pymi

* xyce: clean up Trilinos dependency logic
2022-03-21 14:26:41 +01:00
Adam J. Stewart
12ed453707 py-torchgeo: add v0.2.1 (#29632) 2022-03-21 14:24:15 +01:00
Jörg Behrmann
8fdc2ff462 python: add v3.10.3 (#29640)
From the release announcement: "This is a special bugfix release ahead of
schedule to address a memory leak that was happening on certain function calls
when using Cython. The memory leak consisted of a small constant amount of bytes
in certain function calls from Cython code. Although in most cases this was not
very noticeable, it was very impactful for long-running applications and certain
usage patterns. Check bpo-46347 for more information."
2022-03-21 13:18:52 +01:00
Harmen Stoppels
cf3cfab86c libtree: add upperbound for elfio (#29637) 2022-03-21 12:59:15 +01:00
Harmen Stoppels
8f5b9a89fb major.minor.micro.dev0 Spack version (#25267)
When you install Spack from a tarball, it will always show an exact
version for Spack itself, even when you don't download a tagged commit:

```
$ wget -q https://github.com/spack/spack/archive/refs/heads/develop.tar.gz
$ tar -xf develop.tar.gz
$ ./spack-develop/bin/spack --version
0.16.2
```

This PR sets the Spack version to `0.18.0.dev0` on develop, following [PEP440](https://github.com/spack/spack/pull/25267#issuecomment-896340234) as
suggested by Adam Stewart.

```
spack (fix/set-dev-version)$ spack --version
0.18.0.dev0 (git 0.17.1-1526-e270464ae0)
spack (fix/set-dev-version)$ mv .git .git_
spack $ spack --version
0.18.0.dev0
```

- [x] Update the release guide
- [x] Add __version__ to spack's __init__.py
- [x] Use PEP 440 canonical version strings
- [x] Make spack --version output [actual version] (git version)

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2022-03-20 22:37:55 -06:00
Harmen Stoppels
6d1da528f7 cmake: 3.21.x, 3.22.x bump (#29633) 2022-03-20 17:50:20 -06:00
Valentin Volkl
6611f0bf4b rivet: fix dependency build types (#29358)
* rivet: fix dependency build types

If it isn't a python package, there is no good reason to change the default build type to remove link

* rivet: turn swig into build dependency
2022-03-20 14:18:12 -06:00
Luca Heltai
3d6156d3b2 dealii: new version and restrict sundials version (#29631) 2022-03-20 15:47:37 -04:00
Glenn Johnson
c6b69a8244 py-torch: set INTEL_MKL_DIR (#29613)
Add the INTEL_MKL_DIR variable so py-torch can find mkl if provided by
intel-oneapi-mkl.
2022-03-20 10:35:18 -05:00
Diego Alvarez
d349677dcb OpenJDK: add 11.0.14.1, 17.0.2 (#29167)
* Added OpenJDK 11.0.14.1 and 17.0.2

* Fix preferred_defined change.
2022-03-20 08:55:22 -04:00
Vivian Hafener
b5dc0c63ea rust: new version 1.58.1 and deprecate older (#29322)
* Added rust version 1.58.1

* Fixed flake8 style errors

Co-authored-by: Viv Eric Hafener <vehrc@sporcbuild.rc.rit.edu>
2022-03-20 08:49:08 -04:00
Martin Aumüller
048b5ad2d0 botan: new versions 2.18.2, 2.19.0 and 2.19.1 (#29361) 2022-03-20 08:42:30 -04:00
Doug Jacobsen
9b0d5cbabf Enable GCS urls as valid (#29592)
* Add tests to ensure google cloud storage urls work as mirrors

This commit adds two tests to track that GCS buckets can work as
mirrors, and can be parsed as valid URLs.

Currently, gs:// format URLs are not correctly parsed.

* Fix URL parsing for GCS buckets

This commit adds GCS bucket URLs as valid URLs.
2022-03-20 01:13:00 -07:00
Peter Scheibel
26552533be We were doing a check in a metaclass to ensure that Package classes weren't defining a function themselves; this check failed (erroneously) if that Package class subclassed another package class (because the check examined all superclasses and thought the definition we automatically add was an offender) (#29569) 2022-03-19 21:37:40 -07:00
Adam J. Stewart
4b0cddb674 GDAL: add v3.4.2 (#29496) 2022-03-19 20:08:11 -05:00
Glenn Johnson
c3a1dd0bdb py-torch-sparse: add missing dependency on py-torch (#29612) 2022-03-19 20:00:35 -05:00
Nils Vu
bfb6873ce3 Revert "Add command for reading a json-based DB description (#24894)" (#29603)
This reverts commit 531b1c5c3d.
2022-03-19 16:30:46 -06:00
Glenn Johnson
71c9334e30 py-pysam: update to version 0.18.0 (#29609) 2022-03-19 15:50:28 -06:00
Carlos Bederián
8c508b530b mmg: add vtk variant (#29533) 2022-03-19 10:02:25 -06:00
Adam J. Stewart
7f3a63aaa6 py-rasterio: add v1.2.10 (#29497) 2022-03-19 08:38:55 -04:00
Ben Darwin
38cce0355c ants: add version 20220205 (#29500)
A new release hasn't been tagged in over a year.
2022-03-19 08:36:24 -04:00
Timothy Brown
892aa0fd16 WRF: Update AOCC patches for latest WRF version. (#29529) 2022-03-19 08:26:30 -04:00
Joel Falcou
a627684115 EVE: new version 2022.03.0 (#29511) 2022-03-19 08:23:46 -04:00
lorddavidiii
9c780ac413 opencl-c-headers and opencl-clhpp: add new versions (#29535)
- these versions are a synchronization with the OpenCL v3.0.10
  specification release.
2022-03-19 08:19:03 -04:00
Qian Jianhua
8537634283 dicom3tools: fix build error with Fujitsu compiler (#29435) 2022-03-18 23:03:36 -05:00
Tom Scogland
3ffe9a27b2 allow ci reproduce to work when spack is cloned to a directory not named spack (#29518) 2022-03-18 20:22:28 -06:00
Tom Scogland
9e01e17dc6 R versions (#29258)
* lower priority of package-provided urls

This change favors urls found in a scraped page over those provided by
the package from `url_for_version`.  In most cases this doesn't matter,
but R specifically returns known bad URLs in some cases, and the
fallback path for a failed fetch uses `fetch_remote_versions` to find a
substitute.  This fixes that problem.

fixes #29204

* consider what links actually exist in all cases

Checksum was only actually scraping when called with no versions.  It
now always scrapes and then selects URLs from the set of URLs known to
exist whenever possible.

fixes #25831

* bow to the wrath of flake8

* test-fetch urls from package, prefer if successful

* Update lib/spack/spack/package.py

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

* reword as suggested

* re-enable mypy specific ignore and ignore pyflakes

* remove flake8 ignore from .flake8

* address review comments

* address comments

* add sneaky missing substitute

I missed this one because we call substitute on a URL that doesn't
contain a version component.  I'm not sure how that's supposed to work,
but apparently it's required by at least one mock package, so back in it
goes.

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2022-03-18 18:42:17 -06:00
Peter Scheibel
531b1c5c3d Add command for reading a json-based DB description (#24894)
Adds `spack external read-cray-manifest`, which reads a json file that describes a set of package DAGs. The parsed results are stored directly in the database. A user can see these installed specs with `spack find` (like any installed spec). The easiest way to use them right now as dependencies is to run `spack spec ... ^/hash-of-external-package`.

Changes include:

* `spack external read-cray-manifest --file <path/to/file>` will add all specs described in the file to Spack's installation DB and will also install described compilers to the compilers configuration (the expected format of the file is described in this PR as well including examples of the file)
* Database records now may include an "origin" (the command added in this PR registers the origin as "external-db"). In the future, it is assumed users may want to be able to treat installs registered with this command differently (e.g. they may want to uninstall all specs added with this command)
* Hash properties are now always preserved when copying specs if the source spec is concrete
  * I don't think the hashes of installed-and-concrete specs should change and this was the easiest way to handle that
  * also specs that are concrete preserve their `.normal` property when copied (external specs may mention compilers that are not registered, and without this change they would fail in `normalize` when calling `validate_or_raise`)
  * it might be this should only be the case if the spec was installed

- [x] Improve testing
- [x] Specifically mark DB records added with this command (so that users can do something like "uninstall all packages added with `spack read-external-db`)
  * This is now possible with `spack uninstall --all --origin=external-db` (this will remove all specs added from manifest files)
- [x] Strip variants that are listed in json entries but don't actually exist for the package

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-03-18 17:07:22 -07:00
Larry Knox
be0d611dc1 hdf5-vol-log: new version 1.1 (#29553) 2022-03-18 17:43:08 -04:00
JDBetteridge
e0e3443f3a PETSc: split install() into configure(), build(), install() (#29126) 2022-03-18 07:59:11 -05:00
haralmha
56ba61c52f hepmcanalysis: propagate cxxstd from root (#29512)
* Use same cxx value as root

* Remove pointer syntax from non-pointer type in source

* Run patch function before build

* Use raw string in filter_file and merge edit function with patch

* Escape parentheses

* Use gDirectory from ROOT instead of CurrentDirectory function
2022-03-18 08:52:05 -04:00
Carlos Bederián
dd67f46c6b mmg: add 5.6.0 (#29534) 2022-03-18 08:51:02 -04:00
Harmen Stoppels
62fcf407e2 environment: Don't print 'updating view at' when no specs (#29536) 2022-03-18 08:49:47 -04:00
Massimiliano Culpo
2fa495154e Split the workflow section and remove outdated advices (#29344)
This PR removes a few outdated sections from the "Basics" part of the 
documentation. It also makes a few topic under the environment section
more prominent by removing an unneeded spack.yaml subsection and 
promoting everything under it.
2022-03-18 10:41:27 +01:00
Abhik Sarkar
0ce8b9d398 Make boost minimal and composable (Original PR#22303) (#28623)
* Make boost composable

Currently Boost enables a few components through variants by default,
which means that if you want to use only what you need and no more, you
have to explicitly disable these variants, leading to concretization
errors whenever a second package explicitly needs those components.

For instance if package A only needs `+component_a` it might depend on
`boost +component_a ~component_b`. And if packge B only needs
`+component_b` it might depend on `boost ~component_a +component_b`. If
package C now depends on both A and B, this leads to unsatisfiable
variants and hence a concretization error.

However, if we default to disabling all components, package A can simply
depend on `boost +component_a` and package B on `boost +component_b` and
package C will concretize to depending on `boost +component_a
+component_b`, and whatever you install, you get the bare minimum.

* Fix style

* Added composable boost dependencies for folly

* fixing akantu merge issue

* hpctoolkit boost dependencies already defined

* Fix Styles

* Fixup style once more

* Adding isort fix

* isort one more time

* Fix for package audit issue

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Co-authored-by: Ryan O'Malley <rd.omalley@comcast.net>
2022-03-17 17:42:07 -06:00
lorddavidiii
f8f4aafe81 clinfo: add new versions (#29537) 2022-03-17 23:19:33 +01:00
Harmen Stoppels
ea13122f3c Add deprecation warnings for activate/deactivate/view (#29430) 2022-03-17 14:52:56 -07:00
Harmen Stoppels
282a366fc4 windows ci: make conditional on style tests etc (#29567) 2022-03-17 14:20:02 -07:00
Zack Galbreath
5a72204d38 Remove references to features/windows-support branch (#29565) 2022-03-17 10:29:29 -07:00
Jen Herting
27f608c800 New package: py-jaconv (#29548)
* [py-jaconv] created template

* [py-jaconv]

- added homepage
- added description
- depends on setuptools
- removed fixmes
2022-03-17 12:15:04 -05:00
Toyohisa Kameyama
5a85b181d3 octa: new package. (#29333) 2022-03-17 09:58:51 -07:00
John Parent
99c1f9b987 PWSH Support
Include support for powershell

Prepend cmd and pwsh with [spack] to denote spack enabled shell
2022-03-17 09:01:01 -07:00
John Parent
4aee27816e Windows Support: Testing Suite integration
Broaden support for execution of the test suite
on Windows.
General bug and review fixups
2022-03-17 09:01:01 -07:00
Peter Josef Scheibel
e63b4f752a Failed _write now track that the DB is inconsistent
Consistency is restored on next transaction
2022-03-17 09:01:01 -07:00
John Parent
cf1349ba35 "spack commands --update-completion" 2022-03-17 09:01:01 -07:00
John W. Parent
e4d4a5193f Path handling (#28402)
Consolidate Spack's internal filepath logic to a select
few places and refactor to consistent internal useage of
os.path utilities. Creates a prefix, and a series of utilities
in the path utility module that facilitate handling paths
in a platform agnostic manner.

Convert Windows paths to posix paths internally

Prefer posixpath.join instead of os.path.join

Updated util/ directory to account for Windows integration

Co-authored-by: Stephen Crowell <stephen.crowell@khq.kitware.com>
Co-authored-by: John Parent <john.parent@kitware.com>

Module template format for windows (#23041)
2022-03-17 09:01:01 -07:00
John Parent
df4129d395 Expand external find for Windows (#27588)
* Incorporate new search location

* Add external user option

* proper doc string

* Explicit commands in getting started

* raise during chgrp on Win

recover installer changes

Notate admin privleges

Windows phase install hooks

Find external python and install ninja (#23496)

Allow external find python to find windows python and spack install ninja

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Betsy McPhail <betsy.mcphail@kitware.com>
2022-03-17 09:01:01 -07:00
Betsy McPhail
06aef626cb Update tests support for Windows
Fixup common tests

    * Remove requirement for Python 2.6
    * Skip new failing test

Windows: Update url util to handle Windows paths (#27959)

    * update url util to handle windows paths

    * Update tests to handle fixed url handling

    * canonicalize path only when the path type matches the host platform

    * Skip some url tests on Windows

Co-authored-by: Omar Padron <omar.padron@kitware.com>

Use threading.TIMEOUT_MAX when available (#24246)

This value was introduced in Python 3.2. Specifying a timeout greater than
this value will raise an OverflowError.

Co-authored-by: Lou Lawrence <lou.lawrence@kitware.com>
Co-authored-by: John Parent <john.parent@kitware.com>
Co-authored-by: Betsy McPhail <betsy.mcphail@kitware.com>
2022-03-17 09:01:01 -07:00
John Parent
31daf0f2b6 Add Windows to platform and target changes
Add compiler hint to the root spec for Windows

Reporters on Windows (#26038)

Reporters use Jinja2 as the templating engine, and Jinja2 indexes
templates by Unix separators, even on Windows, so search using Unix paths
on all systems.

Support patching on win via git (#25871)

Handle GRP on windows
2022-03-17 09:01:01 -07:00
John Parent
3a994032f8 Spack on Windows package ports
CMake - Windows Bootstrap (#25825)

Remove hardcoded cmake compiler (#26410)

Revert breaking cmake changes
Ensure no autotools on Windows

Perl on Windows (#26612)

Python source build windows (#26313)

Reconfigure sysconf for Windows

Python2.6 compatibility

Fxixup new sbang tests for windows

Ruby support (#28287)

Add NASM support (#28319)

Add mock Ninja package for testing
2022-03-17 09:01:01 -07:00
John Parent
90c773488c Add Github Actions for Windows (#24504)
Setup Installer CI (#25184), (#25191)

Co-authored-by: Zack Galbreath <zack.galbreath@kitware.com>
Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com>
Co-authored-by: Betsy McPhail <betsy.mcphail@kitware.com>
2022-03-17 09:01:01 -07:00
John W. Parent
e65d3d14b4 Relocate spack_cmd and scripts from installer to root bin (#24651)
Relocate spack_cmd and scripts from installer
to root bin

Refactor documentation, installer, and launcher
to facilitate that change
2022-03-17 09:01:01 -07:00
Betsy McPhail
4a73bfc3b9 Use Python's zipfile, if available (#24556)
* Style fixes

* Use Python's zipfile, if available

The compression libs are optional in Python. Rely on python as a
first attempt then fall back to `unzip`
2022-03-17 09:01:01 -07:00
Betsy McPhail
f8782c46d7 Windows: VS and CMake support
Fix: Building packages with CMake is broken (#24241)

vsInstallPaths needs to be renamed vs_install_paths (#24297)
2022-03-17 09:01:01 -07:00
Jared Popelar
15ef85e161 Packaging of netlib-lapack for windows (#24993)
MSVC's internal CMake and Ninja now detected by spack external find and added to packages.yaml

Saving progress on packaging zlib for Windows

Fixing the shared CMake flag

* Loading Intel's ifx Fortran compiler into MSVC; if there are multiple
versions of MSVC installed and detected, ifx will only be placed into
the first block written in compilers.yaml. The version number of ifx can
be detected using MSVC's version flag (instead of /QV) by using
ignore_version_errors. This commit also provides support for detection
of Intel compilers in their own compiler block by adding ifx.exe to the
fc/f77_name blocks inside intel.py

* Giving CMake a Fortran compiler argument

* Adding patch file for removing duplicated mangling header for versions 3.9.1 and older; static and shared now successfully building on Windows

* Have netlib-lapack depend  on ninja@1.10

Co-authored-by: John R. Cary <cary@txcorp.com>
Co-authored-by: Jared Popelar <jpopelar@txcorp.com>

Making a default config.yaml for Windows

Small path length for build_stage

Provide more prerequisite details, mention default config.yaml

Killing an unnecessary setvars call

Replacing some lost changes, proofreading, updating windows-supported package list

Co-authored-by: John Parent <john.parent@kitware.com>
2022-03-17 09:01:01 -07:00
lou.lawrence@kitware.com
012758c179 Windows: Create installer and environment
* Add 'make-installer' command for Windows

* Add '--bat' arg to env activate, env deactivate and unload commands

* An equivalent script to setup-env on linux: spack_cmd.bat. This script
has a wrapper to evaluate cd, load/unload, env activate/deactivate.(#21734)

* Add spacktivate and config editor (#22049)

* spack_cmd: will find python and spack on its own. It preferentially
tries to use python on your PATH (#22414)

* Ignore Windows python installer if found (#23134)

* Bundle git in windows installer (#23597)

* Add Windows section to Getting Started document
(#23131), (#23295), (#24240)

Co-authored-by: Stephen Crowell <stephen.crowell@kitware.com>
Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com>
Co-authored-by: Betsy McPhail <betsy.mcphail@kitware.com>
Co-authored-by: Jared Popelar <jpopelar@txcorp.com>
Co-authored-by: Ben Cowan <benc@txcorp.com>

Update Installer CI

Co-authored-by: John Parent <john.parent@kitware.com>
2022-03-17 09:01:01 -07:00
Betsy McPhail
a7101db39d MSVC Compiler Find and vcvars env integration (#22856)
Made the vcvars batch script location a member variable of the msvc compiler subclass, initialized from the compiler executable path.  Added a setup_custom_environment() method to the msvc subclass that sources the vcvars script, dumps the environment, and copies the relevant environment variables to the Spack environment.  Added class variables to the Windows OS and MSVC compiler subclasses to enable finding the compiler executables and determining their versions.
2022-03-17 09:01:01 -07:00
loulawrence
f587a9ce68 use pytest stdout/err capture (#22584)
* On windows, write to StringIO without redirection in test cases to avoid conflicting with logger
2022-03-17 09:01:01 -07:00
Ben Cowan
a0164793cb Features/windows install (#22204)
* Fixed path and uid issues.

* Added needed import statement; kluged .exe extension.

* Got package to build.  Some manual intervention necessary, including sourcing the MSVC setup script and having certain configuration parameters.

* Removed CMake executable suffix hack.
2022-03-17 09:01:01 -07:00
Betsy McPhail
d4d101f57e Allow 'spack external find' to find executables on the system path (#22091)
Co-authored-by: Lou Lawrence <lou.lawrence@kitware.com>
2022-03-17 09:01:01 -07:00
Betsy McPhail
fb0e91c534 Windows: Symlink support
To provide Windows-compatible functionality, spack code should use
llnl.util.symlink instead of os.symlink. On non-Windows platforms
and on Windows where supported, os.symlink will still be used.

Use junctions when symlinks aren't supported on Windows (#22583)

Support islink for junctions (#24182)

Windows: Update llnl/util/filesystem

* Use '/' as path separator on Windows.
* Recognizing that Windows paths start with '<Letter>:/' instead of '/'

Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com>
Co-authored-by: John Parent <john.parent@kitware.com>
2022-03-17 09:01:01 -07:00
Betsy McPhail
a7de2fa380 Create rename utility function
os.rename() fails on Windows if file already exists.

Create getuid utility function (#21736)

On Windows, replace os.getuid with ctypes.windll.shell32.IsUserAnAdmin().

Tests: Use getuid util function

Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com>
Co-authored-by: Betsy McPhail <betsy.mcphail@kitware.com>
2022-03-17 09:01:01 -07:00
Betsy McPhail
b60a0eea01 Workarounds for install errors on Windows (#21890)
1. Forwarding sys.stdin, e.g. use input_multiprocess_fd,
gives an error on Windows. Skipping for now

3.  subprocess_context needs to serialize for Windows, like it does
for Mac.

Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com>
Co-authored-by: John Parent <john.parent@kitware.com>
2022-03-17 09:01:01 -07:00
Ben Cowan
81bc00d61f Adding basic Windows features (#21259)
* Snapshot of some MSVC infrastructure added during experiments a while ago.  Rebasing from spack/develop.

* Added platform and OS definitions for Windows.

* Updated Windows platform file to conform to new archspec use.

* Added Windows as a platform; introduced some debugging code.

* Added type annotations.

* Fixed copyright.

* Removed print statements.

* Ensure `spack arch` returns correctly on Windows (#21428)

* Correctly identify windows as 'windows-Windows10-AMD64'
2022-03-17 09:01:01 -07:00
Wouter Deconinck
b26b3bebb4 assimp: depends on pkgconfig; disable bundled dependencies (#29551)
* [assimp] depends_on pkgconfig and disable hunter, build zlib/minizip
2022-03-17 15:56:33 +01:00
Erik Schnetter
e174623edf openssh: Update to version 8.9 (#29539) 2022-03-17 08:18:51 -06:00
Harmen Stoppels
55544950e2 PackageViewMixin: fix symlinks conflict issue (#29515)
`stat`'ing a file in the dst dir is the wrong thing to do, you should
`lstat` to capture broken symlinks.
2022-03-17 08:18:28 -06:00
Valentin Volkl
3544b0274f fastjet: use mirror for sources (#29357)
as a workaround for https://github.com/spack/spack/issues/20050
2022-03-17 12:21:36 +00:00
haralmha
9ba41449a9 Add intermediate folder in lib to LD_LIBRARY_PATH (#29519) 2022-03-17 12:20:22 +00:00
Erik Schnetter
5fd05a8cbe openssl: Deprecate old versions (#29554) 2022-03-17 06:02:56 -06:00
Jen Herting
5f3ab83e2d New package: py-quart (#29142)
* [py-quart] created template

* [py-quart]

- added homepage
- added description
- added dependencies
- removed fixmes

* [py-quart] removed setuptools dependency
2022-03-17 05:42:31 -06:00
Wouter Deconinck
fa9894ae16 assimp: remove -Werror to allow compilation on Intel oneAPI (#29552) 2022-03-17 03:54:53 -06:00
Tom Scogland
3648adc2a7 python: allow versions with garbage suffix (#29543)
* python: allow versions with garbage suffix

Ubuntu 22.04 preview python prints version as 3.10.2+, the + causes
version parsing to fail and breaks detection.

* Add version comment

* match VALID_VERSION regex
2022-03-17 03:54:29 -06:00
Seth R. Johnson
4ef534b19b libiconv,lmod: improvements for static builds (#29493)
* libiconv: compile with pic even when static build

* lmod: require shared lua

It seems to be unable to detect lua-posix when using a static lua:
```
Error: The follow lua module(s) are missing:  posix
```
2022-03-16 22:31:33 +01:00
Erik Schnetter
73287df7c5 openssl: Security update (#29538) 2022-03-16 13:47:04 -06:00
Jen Herting
993ce4c095 [py-configparser] added version 5.2.0 (#29136)
* [py-configparser] added version 5.2.0

* [py-configparser] fixed setuptools versions and added setuptools_scm
2022-03-16 14:13:08 -05:00
Jen Herting
4b9f216c11 New package: py-hypercorn (#29141)
* [py-hypercorn] created template

* [py-hypercorn]

- added homepage
- added description
- added dependencies
- removed fixmes

* [py-hypercorn] removed setuptools dependency and added version restriction for py-typing-extensions
2022-03-16 14:12:27 -05:00
Adam J. Stewart
508e3e03b9 py-numpy: add v1.22.3 (#29425) 2022-03-16 19:24:10 +01:00
Olivier Cessenat
9b0c2cb954 diffutils: work around for nvhpc not 11 compliant for __builtin_add_overflow (#28451) 2022-03-16 12:34:58 -04:00
Charles Doutriaux
ea93b1a03b Py kosh (#29532) 2022-03-16 09:16:55 -05:00
Alberto Invernizzi
d3131cd2da constrain dependency as needed by neovim (#29252) 2022-03-15 19:38:21 -06:00
Simon Flood
3a5ae0fb66 Added R 4.1.3 to package.py (#29495) 2022-03-15 20:11:11 -05:00
Tom Scogland
94794d061a optimize instantiation and comparison of versions (#29429)
Re-work the checks and comparisons around commit versions, when no
commit version is involved the overhead is now in the noise, where one
is the overhead is now constant rather than linear.
2022-03-15 18:53:28 +00:00
Larry Knox
1250fac467 Add changes to test functions for checking spack versions of hdf5 with (#29159)
develop in the version string.  The versions from the HDF5 code were not
matching because 'develop-' is not part of the HDF5 version.  Also, the
develop-x.x versions in spack omit the release version (third) number
because the branch spans all of the release versions.
2022-03-15 12:22:30 -06:00
Harmen Stoppels
8c59736ff9 libdrm: add docs variants and missing dependency (#29423) 2022-03-15 17:38:57 +01:00
Simon Frasch
825fed2ffa spla: add version 1.5.4 (#29509) 2022-03-15 16:14:17 +01:00
haralmha
be58d354ac py-stomp-py: Add new package (#29380)
* py-stomp-py: Add package

* Specify python and py-docopt dependencies
2022-03-15 08:02:41 -06:00
FJ-NaokiMatsumura
4176ce5c07 h5z-zfp: fix build with Fujitsu compiler (#29029) 2022-03-15 05:46:21 -06:00
Toyohisa Kameyama
8409443b1f jogl: new package (#29332) 2022-03-15 04:10:59 -06:00
Toyohisa Kameyama
aee763015e glugen: new package. (#29312) 2022-03-15 00:01:15 -07:00
Carlos Bederián
50b5b314b3 petsc, py-petsc4py: add 3.16.5 (#29505)
* petsc: add 3.16.5

* py-petsc4py: add 3.16.5
2022-03-14 19:15:04 -07:00
Jon Rood
8a754ad502 amr-wind: Fix hypre dependency. (#29504) 2022-03-14 19:10:21 -06:00
Axel Huebl
7f03724db2 py-pybind11: 2.9.1 (#29387)
* py-pybind11: 2.9.1

Add the latest releases of pybind11.

* Bump requirements

according to `pyproject.toml`
2022-03-14 16:06:12 -05:00
Axel Huebl
ed359cb00b Update: py-cmake (#28760)
* Update: py-cmake

Add additional dependencies as declared by the `py-cmake` repository.

Note: for either from-source or from-binary builds, this downloads
additional software via the network. We might want to propose upstream
patches to make this work on nodes without internet connection.

* Add Review Comments + Newest Version

* Add: Ninja

Preferred generator according to outputs and upstream repo logic

* Attempt to use resource() for CMake source
2022-03-14 13:21:54 -07:00
Jen Herting
f5a2d87eb2 [py-watchdog] added version 2.1.6 (#29137)
* [py-watchdog] switched to pypi and audited dependencies

* [py-watchdog] added version 2.1.6

* [py-watchdog] updated dependencies for old versions

* [py-watchdog] added when for variant

* [py-watchdog] added some newlines to make flake8 happy
2022-03-14 14:46:53 -05:00
eugeneswalker
c3b6b3036d ci: add e4s mac stack (#29476) 2022-03-14 09:32:09 -07:00
Sergey Kosukhin
f1bdbefd46 mpich: fix the detection of the package (#29284) 2022-03-14 16:33:56 +01:00
Tim Haines
f14840fcf2 Dyninst: add v12.1.0 (#29482) 2022-03-14 07:53:00 -07:00
Ben Morgan
2e3bea8e17 vecgeom: add v1.1.19 (#29488)
Adjust build args for new CUDA build mechanism.
2022-03-14 06:34:33 -06:00
Harmen Stoppels
474493713b compiler.py: early return in compiler_environment when no modules (#29441) 2022-03-14 11:27:49 +00:00
François Trahay
ccfaec7b1c eztrace: new version and refactor for cmake/autotools build (#29458) 2022-03-14 06:32:19 -04:00
Mark W. Krentel
4635c813e0 hsa-rocr-dev, llvm-amdgpu: change dependency libelf to elf (#29408)
* hsa-rocr-dev, llvm-amdgpu: change dependency libelf to elf

Change the libelf dependency to the virtual elf for two rocm packages.
This allows other packages (hpctoolkit) to combine rocm and dyninst
(with elfutils) while still being able to build rocm with libelf when
needed, eg darwin.

* add comment describing include path for libelf vs elfutils
2022-03-14 04:30:55 -06:00
Seth R. Johnson
a4f9d4fa4a hdf5: relax fortran constraint (#29472) 2022-03-14 09:39:35 +01:00
Axel Huebl
32281ee40e toml11: v3.7.1 (#29483)
Add the latest toml11 release :)
2022-03-14 08:18:14 +01:00
Vicente Mataix Ferrándiz
8ab3b56e00 FreeFem: new version 4.10 (#29438)
* Adding release 4.10

* Incorrect checksum

* Update sums

* Revert tar

* Update sum for tar
2022-03-13 11:57:06 -04:00
Thomas Madlener
f93107fff3 rapidjson: Add doc variant (#29460) 2022-03-13 11:52:30 -04:00
Massimiliano Culpo
a6eed4a7c7 Remove "setup_environment" and "setup_dependent_environment" (#29463)
fixes #29446

The new setup_*_environment functions have been falling back
to calling the old functions and warn the user since #11115.

This commit removes the fallback behavior and any use of:
- setup_environment
- setup_dependent_environment
in the codebase
2022-03-13 11:51:55 -04:00
liuyangzhuan
406939f485 butterflypack: add 2.1.1 (#29467)
* added version2.1.1 for butterflypack

* fixing a tag in butterflypack

* minor fix for superlu-dist
2022-03-13 11:46:57 -04:00
Ben Darwin
a649ee9b69 itk: add verion 5.3rc02 (contains fix for ITK/issues/2674) (#29471) 2022-03-13 11:44:45 -04:00
Ben Darwin
0a9e41770b itk: add MINC file support (#29470) 2022-03-13 11:44:34 -04:00
Timothy Brown
717ac6ca0a wps: new version 4.3 (#29473)
* Adding new version [WPS].

* Making `spack style` happy.
2022-03-13 11:43:39 -04:00
Massimiliano Culpo
2c11d5f2a8 python: fix build after change in Spec.dependencies signature (#29480)
fixes #29478

As was written Python was looking for dependencies named "link"
rather than dependencies of type "link".
2022-03-12 19:42:21 -07:00
Harmen Stoppels
8adc6b7e8e module_cmd.py: use posix awk; fix stderr redirection (#29440)
Emulates `env -0` in a posix compliant way, avoiding a slow python process, speeds up setting up the build env when modules should load.
2022-03-11 18:29:11 +01:00
Adam J. Stewart
7ad8937d7a Add py-torch 1.11, py-torchvision 0.12 (#29455) 2022-03-11 16:52:10 +01:00
Ryan Marcellino
abab284996 new package: py-pytest-parallel (#29431)
* new package: py-pytest-parallel

* depend on python@3.7:

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-11 09:39:47 -06:00
Harmen Stoppels
1caa3107b3 perl: prefer all stable releases (#29456) 2022-03-11 15:02:16 +01:00
haralmha
5590f7385a py-hepdata-converter: Add new package (#29422) 2022-03-10 22:10:19 -06:00
Paul R. C. Kent
037c73c387 Add v0.3.20 (#29453) 2022-03-10 20:14:33 -07:00
Jon Rood
ca3354bdea amr-wind: Add ROCmPackage (#29448)
* Add ROCmPackage to amr-wind and simplify package.

* Add MPI_ROOT.

* Fix error.

* Fix error.

* Fix append.

* Add hypre rocm dependency.

* Remove itertools import.
2022-03-10 17:49:10 -08:00
Pieter Ghysels
da7419c035 Scotch: new v7.0.1 with CMake (#29355)
* Add Scotch v7.0.1, now supporting CMake

* Fix for shared lib build

* Add pghysels (myself) as scotch maintainer

* Simplify mpi variant

* Change @:6.9.99 to @:6 (couple times)
2022-03-10 19:16:02 -05:00
Harmen Stoppels
88fbba3e1e intel-mkl: load compiler modules when querying compiler (#29439) 2022-03-10 14:14:17 -08:00
Massimiliano Culpo
2cd5c00923 Allow for multiple dependencies/dependents from the same package (#28673)
Change the internal representation of `Spec` to allow for multiple dependencies or
dependents stemming from the same package. This change permits to represent cases
which are frequent in cross compiled environments or to bootstrap compilers.

Modifications:
- [x] Substitute `DependencyMap` with `_EdgeMap`. The main differences are that the
      latter does not support direct item assignment and can be modified only through its
      API. It also provides a `select_by` method to query items.
- [x] Reworked a few public APIs of `Spec` to get list of dependencies or related edges.
- [x] Added unit tests to prevent regression on #11983 and prove the synthetic construction
      of specs with multiple deps from the same package. 

Since #22845 went in first, this PR reuses that format and thus it should not change hashes.
The same package may be present multiple times in the list of dependencies with different
associated specs (each with its own hash).
2022-03-10 11:53:45 -08:00
Harmen Stoppels
3d624d204f patchelf: 0.14.x (#29444) 2022-03-10 10:18:25 -08:00
Chris White
428c63087a lock down blt versions for umpire and raja, add upcoming release to use new blt release (#29433) 2022-03-10 08:48:00 -08:00
Tracy-Pantleo
9ab21024e2 Jali/Wonton packages: add version 1.1.6 and 1.3.2, respectively (#28597)
* The new version of Wonton requires the new version of Jali
* Wonton: versions after 1.2.10 don't require boost at all

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2022-03-09 17:11:14 -08:00
Jon Rood
a4703b1220 amdscalapack: Remove build_type variant (#29383)
* amdscalapack: Fix CMake build_type.

* Remove build_type variant from amdscalapack.
2022-03-09 21:35:15 +00:00
eugeneswalker
9493da2536 fms: add v2021.04 (#29424) 2022-03-09 13:07:03 -08:00
Harmen Stoppels
dc78f4c58a environment.py: allow link:run (#29336)
* environment.py: allow link:run

Some users want minimal views, excluding run-type dependencies, since
those type of dependencies are covered by rpaths and the symlinked
libraries in the view aren't used anyways.

With this change, an environment like this:

```
spack:
  specs: ['py-flake8']
  view:
    default:
      root: view
      link: run
```

includes python packages and python, but no link type deps of python.
2022-03-09 12:35:26 -08:00
Brian Van Essen
bedc9fe665 Removed excessive constraints on dependent packages in LBANN (#29416) 2022-03-09 19:48:29 +01:00
Brian Van Essen
ff7230c0cf lbann: allow unsupported compiler (#29417) 2022-03-09 19:47:55 +01:00
Jen Herting
033647c8b1 New package: py-wsproto (#29140)
* [py-wsproto] created template

* [py-wsproto]

- added homepage
- added description
- added dependencies
- removed fixmes

* [py-wsproto] removed unicode character
2022-03-09 18:29:17 +00:00
Jen Herting
43c768f4b7 New package: py-yaspin (#29138)
* [py-yaspin] created template

* [py-yaspin]

- added homepage
- added description
- added dependencies
- removed fixmes

* [py-yaspin]

- removed setuptools
- added dependency on py-dataclasses

* [py-yaspin] removed range for py-dataclasses version
2022-03-09 11:09:38 -06:00
百地 希留耶
3270aa106b Hide package repository count when redirecting stdout (#29402) 2022-03-09 17:07:07 +00:00
kwryankrattiger
2dd9414bbb Diffutils: Conflict nvhpc when not 3.7 (#29420) 2022-03-09 16:27:19 +00:00
kwryankrattiger
30a9bfe38f ECP-SDK/VTK-m: Make ROCm + VTK-m contraints (#28712)
* ECP-SDK/VTK-m: Update ROCm variant

VTK-m set contraint for when rocm/kokkos are available.
SDK Make ROCmPackage and propagate amdgpu_arch and rocm variant to
VTK-m.

Note: SDK has to check vtk-m@ 1.7: and :1.6 explicitly in orderer to have 1.7
be selected by default if +rocm in the SDK.

* ECP-SDK: Enable ROCm + VTK-m constraints
2022-03-09 11:23:47 -05:00
百地 希留耶
3370d3f57e Fix tab completion erroring with spack unit-test (#29405) 2022-03-09 16:09:57 +01:00
Harmen Stoppels
3df90e3e33 ci.py: fix utf-8 issue with git log output (#29419) 2022-03-09 13:13:37 +00:00
haralmha
89e2ee70e2 hadoop-xrootd: add new package (#29401) 2022-03-09 02:14:33 -07:00
haralmha
2111cf8044 thepeg: Add zlib dependency (#29370)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-03-09 02:02:37 -07:00
Robert Romero
811abf5d00 HiCOPS: add new package (#26767)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-03-09 09:47:04 +01:00
iarspider
37e14ee1ac sigcpp: add new package (#29341) 2022-03-09 09:41:13 +01:00
Jon Rood
68f0973339 hypre: add rocm support (#29147)
Co-authored-by: Sarah Osborn <30503782+osborn9@users.noreply.github.com>
2022-03-09 09:39:59 +01:00
Wouter Deconinck
9d1d52d51f geant4: new version 11.0.1 (#29411) 2022-03-09 09:32:35 +01:00
haralmha
27e3b34d6d qmtest: add new package (#29377) 2022-03-09 09:28:27 +01:00
kentaw77
c523e22575 zpares: add new package (#29278) 2022-03-09 09:25:22 +01:00
Mosè Giordano
5064ad6cad libblastrampoline: add v5.0.2 (#29407) 2022-03-09 09:19:23 +01:00
Brian Van Essen
990a620d52 rdkit: added new versions up to 1021_09_05 (#29415) 2022-03-09 09:02:59 +01:00
haralmha
a9996db35c py-control: add new package (#29386)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-03-08 13:22:40 -07:00
haralmha
ddc5b4422d py-param: add new package (#29384)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-03-08 12:58:46 -07:00
Keita Teranishi
b2a02861bb trilinos: new variant for the Panzer package (#29256)
* Adding Panzer as Default

* Set Panzer as non-default

* Updated the conflict for Panzer.

* Updated the conflict for Panzer.

* Resolve the issue with Stratimikos and Thyra

* Fixing stk build issues.

* Fixing stk build issues.

* Adding another conflict for Thrya
2022-03-08 12:14:40 -07:00
Wouter Deconinck
1df9c3437f hztool: new package (dependency of sherpa #29338) (#29365) 2022-03-08 19:58:29 +01:00
SXS Bot
9cc6bc26a2 spectre: add v2022.03.07 (#29378)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2022-03-08 19:36:00 +01:00
Tiziano Müller
94ce7f5040 cray-libsci/cp2k: add constraints to get consistently linked executables (#29396)
* cray-libsci: only be a provider for scalapack with +mpi

If a package explicitly links the scalapack provider we might otherwise end up with different variants of libsci being linked: the explicitly linked one and the one added by the Cray compiler wrappers.

* cp2k: require cray-libsci+openmp with +openmp for consistency

otherwise we might get 2 different libsci linked: one explicitly, the other one via the Cray compiler wrappers, leading at least to segfaults during cleanup

* cp2k: depend on cray-fftw+openmp with +openmp
2022-03-08 19:32:15 +01:00
Seth R. Johnson
5bea24526f Fix overconstrained HDF5 variants (#29132)
* hdf5: mark +fortran+shared conflict for older version

This version was only activated unintentionally by silo's conflict
statement, but `@1.8.15+shared+fortran+cxx` errors out in configure:

```
CMake Error at CMakeLists.txt:814 (message):
   **** Shared FORTRAN libraries are unsupported ****
```

* silo: refine hdf5 conflicts to avoid building old version

Before this, `silo+hdf5` concretized to 1.10.7 or sometimes 1.8.15. Now
I've verified it works for the following configurations:
```
silo@4.10.2 patches=7b5a1dc,952d3c9
^   hdf5@1.10.7 api=default

silo@4.10.2 patches=7b5a1dc,952d3c9,eb2a3a0
^   hdf5@1.10.8 api=v18

silo@4.10.2 patches=7b5a1dc,952d3c9,eb2a3a0
^   hdf5@1.12.1 api=v110

silo@4.11-bsd patches=eb2a3a0
^   hdf5@1.12.1 api=v110

silo@4.11-bsd patches=eb2a3a0
^   hdf5@1.10.8 api=default

silo@4.11-bsd patches=eb2a3a0
^   hdf5@1.12.1 api=default
```

and verified that the following fail:
```
silo@4.10.2 ^hdf5@1.12.1 api=default
silo@4.11 ^hdf5 api=v18
silo@4.11-bsd ^hdf5@1.13.0 api=v12
silo@4.11-bsd ^hdf5@1.13.0 api=default
```

and have updated the constraints to match. Hdf5 no longer has to be
downgraded to work with Silo.

* silo: fix dependency conflicts

* py-h5py: shorten and add comments to py-h5py hdf5 dependencies

* e4s: remove slightly outdated hdf5 requirement

* e4s: remove excessive hdf5 variant constraints

These I think are holdovers from the old concretizer.

- `hdf5_compat` can be expressed as `+hdf5 ^hdf5@1.8`
- The extra variants on hdf5 shouldn't break conduit
- axom unnecessarily restricts hdf5 version

* conduit: restore hdf5_compat flag
2022-03-08 13:15:10 -05:00
Tanner Hobson
57b27023a4 sensei: add v3.2.2 (#29388) 2022-03-08 11:14:41 -07:00
Seth R. Johnson
ceb260927b git-lfs and go: add new versions (#29121)
* go: new version 1.17.7

* git-lfs: new versions 2.12,2.13,3.1
2022-03-08 19:06:57 +01:00
Glenn Johnson
1c362ccb11 gurobi: add v9.5.1 and fix build (#29225)
This package can not be install with pip, it uses distutils
2022-03-08 19:00:58 +01:00
haralmha
2c2eb911e1 vectorclass-version2: add new package (#29400) 2022-03-08 18:41:08 +01:00
Axel Huebl
d1e0266952 rocm-smi: project moved (deprecate) (#28733)
According to its README, this project moved.

References:
- https://github.com/RadeonOpenCompute/ROC-smi#rocm-system-management-interface
- https://github.com/RadeonOpenCompute/rocm_smi_lib/tree/master/python_smi_tools
2022-03-08 18:31:20 +01:00
Richarda Butler
8986c21d73 bolt: fix standalone test (#29389) 2022-03-08 18:25:13 +01:00
Chris White
64532902f9 blt: add v0.5.0 (#29393) 2022-03-08 18:20:53 +01:00
haralmha
568a535e3f apfel: depend on python also for ~python variant (#29395) 2022-03-08 17:10:56 +01:00
Nils Vu
cd5e7579be spectre: add docs dependencies, BUILD_DOCS toggle (#29399)
New versions don't try to configure docs targets at all when the
BUILD_DOCS option is turned off. This avoids CMake warnings
when docs dependencies are not found.
2022-03-08 16:51:05 +01:00
Mikael Simberg
b559b99c8f Add pika 0.2.0 (#29398)
* Add pika 0.2.0
* Add apex variant to pika
2022-03-08 04:46:47 -07:00
Harmen Stoppels
a39a6c4ea7 version.py: set is_commit in constructor (#29369)
Speeds up comparison on `Version` by ~2.5x, e.g.

```python
In [1]: v = spack.version.Version('1.0.0'); w = spack.version.Version('1.0.2')

In [2]: %timeit v < w

1.47 µs ± 5.59 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

535 ns ± 1.75 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
```
2022-03-08 10:50:48 +01:00
Harmen Stoppels
4b5e071141 Add libtree 3.1.0 (#29356) 2022-03-08 10:18:47 +01:00
eugeneswalker
2a64c6a402 rocsolver depends on fmt@7:8.0.1 (#29391) 2022-03-07 18:58:42 -07:00
Qian Jianhua
aea10bf876 landsfcutil: support Fujitsu compiler (#29367) 2022-03-07 17:18:23 -08:00
Qian Jianhua
2088d407a2 sigio: support Fujitsu compiler (#29366) 2022-03-07 17:17:44 -08:00
Qian Jianhua
cc14384818 sfcio: support Fujitsu compiler (#29364) 2022-03-07 17:15:08 -08:00
Dom Heinzeller
3d29e0d641 Bug fixes for ESMF on macOS with apple-clang+gfortran, with gfortran-10+ in general, and on Cray (#29193)
* Bugfix in var/spack/repos/builtin/packages/esmf/package.py

* Bug fixes in var/spack/repos/builtin/packages/esmf/package.py to build ESMF on macOS with clang+gfortran and on cray

* Add maintainer to var/spack/repos/builtin/packages/esmf/package.py

* Fix style errors

* Fix more style errors
2022-03-07 11:58:39 -07:00
Valentin Volkl
ad2b493171 libzmq: default to ~docs (#29372) 2022-03-07 10:54:31 -07:00
Valentin Volkl
5bbcb43ad3 py-jupytext: add version 0.13.6 (#28688)
* py-jupytext: add version 0.13.6

From da3fcc305d:

markdown-it-py v2.0 implements some internal changes, but won't affect jupytext

* py-jupytext: keep mdit-py version restricted to 1

* py-jupytext: update dependencies

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-07 11:17:34 -06:00
Aurelien Bouteiller
fe8548853d PaRSEC: moved repository to GitHub, now require cmake 3.18 (#29346)
Signed-off-by: Aurelien Bouteiller <bouteill@icl.utk.edu>
2022-03-07 09:05:14 -08:00
Pieter Ghysels
4a17099cc3 Strumpack v6.3.1 (#29353)
* Add STRUMPACK version 6.3.1

* Add STRUMPACK version 6.3.1 (in URL)
2022-03-07 09:04:32 -08:00
Valentin Volkl
822b763222 man-db: add gitlab repository, new version 2.10.1 (fixes MAXDIRS issue) (#29359)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-03-07 08:22:52 -07:00
Valentin Volkl
28aa1a64d4 groff: default to ~pdf (#29373) 2022-03-07 08:02:49 -07:00
Valentin Volkl
e3ab326228 mesa, mesa18: default to ~llvm (#29360) 2022-03-07 09:59:20 -05:00
haralmha
6934703ffb Add checksum for relax@root6 (#29314) 2022-03-07 10:54:45 +01:00
Valentin Volkl
53fb5963eb starlight: add new package (#29158) 2022-03-07 02:30:13 -07:00
liuyangzhuan
022aa496a5 butterflypack: add v2.1.1 (#29343) 2022-03-07 08:50:32 +01:00
Todd Gamblin
d424d0e54e find: deprecate spack find -bootstrap for spack -bootstrap find (#29152)
Since adding the `spack --bootstrap` argument we don't need `spack find --bootstrap`
anymore.  Deprecate it.
2022-03-05 21:41:18 -08:00
Greg Sjaardema
762893d4a6 seacas: new version with new dependency on fmt (#29348)
Removed the internal copies of lib::fmt and modified to have a dependency on lib::fmt instead.  Requires fmt-8.1.0 or later
2022-03-05 15:11:18 -05:00
Vivian Hafener
addf6f2686 New package: py-ml-collections (#29325) 2022-03-05 14:03:41 -06:00
Vivian Hafener
ce4b812b52 Rebased upon upstream (#29337) 2022-03-05 14:03:03 -06:00
Greg Sjaardema
afaaf04fa9 fmt: add 8.1.0 and 8.1.1 (#29347) 2022-03-05 02:50:53 +01:00
Jen Herting
9f49461183 New package: py-priority (#29139)
* [py-priority] created template

* [py-priority]

- added homepage
- added description
- added dependencies
- removed fixmes
2022-03-04 15:26:30 -07:00
Asher Mancinelli
4081597731 hiop: add version v0.5.4 (#29301)
* Add HiOp v0.5.4, update magma constraint

* Add v2.6.2rc1 to magma, make hiop depend on it

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-04 13:52:23 -06:00
Paul R. C. Kent
d42e5421dc New versions: qmcpack@3.12.0, 3.13.0 (#29345) 2022-03-04 11:19:34 -08:00
Harmen Stoppels
80a6eab2db Add a test 2022-03-04 18:13:34 +01:00
Harmen Stoppels
916da02326 Fix audit 2022-03-04 18:13:34 +01:00
Harmen Stoppels
9199800bbd VersionRange.satisfies should test non-empty intersection 2022-03-04 18:13:34 +01:00
Ethan Stam
838a0086cf Initial changes needed to build paraview@5.9.0%xl_r (#22050) 2022-03-04 17:29:40 +01:00
Massimiliano Culpo
ab74738609 Revert "butterflypack: add v2.1.1 (#29151)" (#29339)
This reverts commit b7794cdac8.
2022-03-04 14:40:09 +00:00
Weiqun Zhang
90c28783a0 amrex: add v22.03 (#29273) 2022-03-04 07:38:37 -07:00
Enrico Usai
35406a8984 aws-parallelcluster: add v2.11.5 (#29286) 2022-03-04 05:22:18 -07:00
Bambi
6a1b0331a9 kakoune: add new package (#29148) 2022-03-04 11:42:01 +01:00
Marie Houillon
258600eede New version for openCARP packages, v9.0 (#29150)
Co-authored-by: openCARP consortium <info@opencarp.org>
2022-03-04 11:31:18 +01:00
liuyangzhuan
b7794cdac8 butterflypack: add v2.1.1 (#29151) 2022-03-04 11:30:15 +01:00
haralmha
a6580d4704 edm4hep: Add dependencies to py-jinja2 and py-pyyaml (#28944) 2022-03-04 11:27:46 +01:00
Nils Vu
4d0ee4e169 Fix checksum for spectre@2022.02.17 (#29179) 2022-03-04 11:11:42 +01:00
Olivier Cessenat
6bc2e660e8 dos2unix: add the external find feature (#29335) 2022-03-04 02:34:37 -07:00
Seth R. Johnson
8665ccb661 slurm: add external find (#29146) 2022-03-04 10:29:05 +01:00
Wouter Deconinck
6610c50414 madx: new package, versions 5.07.00, 5.08.00, 5.08.01 (#28932) 2022-03-04 10:25:40 +01:00
Toyohisa Kameyama
b0c63a6554 boost: update version analysis patch for fujitsu compiler. (#29198) 2022-03-04 10:24:12 +01:00
Nils Vu
77d2b9a87a charmpp: resolve conflict with '+smp' (#29243)
The 'multicore' backend always uses SMP, so reverse
the logic of the `conflict` clause. This resolves an issue
where the '+smp' default caused the 'backend' to switch
away from 'multicore' unintentionally (#29234).
2022-03-04 10:16:49 +01:00
Dom Heinzeller
f931067bf2 exempi: fix typo in "satisfies" condition (#29233) 2022-03-04 10:13:07 +01:00
Valentin Volkl
7d66779c06 lhapdf: add python variant, change source tarball url to avoid python build failures (#29267) 2022-03-04 10:11:47 +01:00
Carlos Bederián
6cfcf59781 mumps: add v5.4.1 (#29330) 2022-03-04 09:29:25 +01:00
Michael Kuhn
544258f16a qt: add 5.15.3 (#29328) 2022-03-04 09:24:11 +01:00
Massimiliano Culpo
b48bdc9e19 Fix importing Spack packages as Python modules (#29221)
fixes #29203

This PR fixes a subtle bug we have when importing
Spack packages as Python modules that can lead to
multiple module objects being created for the same
package.

It also fixes all the places in unit-tests where
"relying" on the old bug was crucial to have a new
"clean" state of the package class.
2022-03-04 08:42:27 +01:00
Axel Huebl
cf4f281f54 WarpX: 22.03 (#29334)
Update `warpx` & `py-warpx` to the latest release, `22.03`.
2022-03-03 21:54:34 -07:00
natshineman
673faf6044 Update MVAPICH2 to latest release verison 2.3.7 (#29329)
Co-authored-by: Nat Shineman <shineman.5@buckeyemail.osu.edu>
2022-03-03 21:34:35 -07:00
eugeneswalker
e86cdbbf23 libdrm@2.4.101: needs meson for build (#29327) 2022-03-03 19:53:40 -08:00
Toyohisa Kameyama
0c4b56d885 llvm: fix build with Fujitsu compiler, and conflicts gcc@8.4 on aarch64 (#29030)
* llvm: fix build with Fujitsu compiler.

* Add conflict gcc 8.4 and aarch64.

* update conflicts version.

* fix version to apply patch.
2022-03-03 19:50:23 -07:00
Vivian Hafener
ebdba2c6a7 New package: py-npx (#29324)
* New package py-npx

* Fixed linked issue
2022-03-03 18:42:55 -07:00
iarspider
7d68d4564c Add checksum for py-setuptools-scm 5.0.2 (#29213) 2022-03-03 17:58:32 -07:00
Doug Jacobsen
06fd0f892e Revert GCS fetch strategy, to remove s3 interface (#28736)
This commit reverts the GCS fetch strategy to before commit:
d759612523

The previous commit added some s3 syntax to handle connections, but
added them into the GCS fetch strategy in a way that prevents GCS from
working anymore.
2022-03-03 16:34:33 -08:00
iarspider
b13629062a Add checksum for gmp 6.2.0 (#29212)
* Add checksum for gmp 6.2.0

* Update package.py
2022-03-03 17:14:41 -07:00
iarspider
a284c3e76d New version: py-testpath 0.6.0; update py-flit-core dependency (#29200) 2022-03-03 17:10:48 -07:00
Carlos Bederián
efcdd64893 nss: add 3.75 (#29197) 2022-03-03 23:59:37 +01:00
Greg Becker
e2b87ade06 rocmcc compiler: initial commit based on aocc and clang (#28575)
* rocmcc compiler: initial commit based on aocc and clang

Co-authored-by: luker <luke.roskop@hpe.com>
Co-authored-by: Tom Scogland <scogland1@llnl.gov>
2022-03-03 14:34:22 -07:00
Manuela Kuhn
96c1fb7b0b py-mako-1.1.6 (#29207)
* py-mako-1.1.6

* fix python dependency
2022-03-03 14:16:54 -06:00
Manuela Kuhn
4d5eff11b4 py-mistune: add 2.0.2 and change source to pypi (#29215) 2022-03-03 19:23:41 +01:00
Manuela Kuhn
8db12b72ec py-multidict: add 6.0.2 and get sources fom pypi (#29219) 2022-03-03 19:23:21 +01:00
Manuela Kuhn
9900d348d7 py-matplotlib-inline: add v0.1.3 (#29208) 2022-03-03 19:22:27 +01:00
TZ
85c454bdb0 kokkos: make Spack accept CUDA compute capability 8.6 (#27257)
The Kokkos sources already know AMPERE86 since some time; make
Spack accept and pass it, too.
2022-03-03 18:20:25 +00:00
1463 changed files with 36500 additions and 11256 deletions

View File

@@ -31,19 +31,25 @@ jobs:
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch unzip which xz python3 python3-devel tree \
cmake bison bison-devel libstdc++-static
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Bootstrap clingo
shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
spack bootstrap untrust github-actions
spack bootstrap untrust github-actions-v0.2
spack external find cmake bison
spack -d solve zlib
tree ~/.spack/bootstrap/store/
@@ -61,19 +67,25 @@ jobs:
bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
make patch unzip xz-utils python3 python3-dev tree \
cmake bison
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap clingo
shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
spack bootstrap untrust github-actions
spack bootstrap untrust github-actions-v0.2
spack external find cmake bison
spack -d solve zlib
tree ~/.spack/bootstrap/store/
@@ -90,14 +102,20 @@ jobs:
apt-get install -y \
bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
make patch unzip xz-utils python3 python3-dev tree
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap clingo
shell: runuser -u spack-test -- bash {0}
run: |
@@ -105,7 +123,6 @@ jobs:
spack -d solve zlib
tree ~/.spack/bootstrap/store/
opensuse-clingo-sources:
runs-on: ubuntu-latest
container: "opensuse/leap:latest"
@@ -118,16 +135,19 @@ jobs:
bzip2 curl file gcc-c++ gcc gcc-fortran tar git gpg2 gzip \
make patch unzip which xz python3 python3-devel tree \
cmake bison
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup repo
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
- name: Bootstrap clingo
run: |
source share/spack/setup-env.sh
spack bootstrap untrust github-actions
spack bootstrap untrust github-actions-v0.2
spack external find cmake bison
spack -d solve zlib
tree ~/.spack/bootstrap/store/
@@ -138,12 +158,13 @@ jobs:
- name: Install dependencies
run: |
brew install cmake bison@2.7 tree
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Bootstrap clingo
run: |
source share/spack/setup-env.sh
export PATH=/usr/local/opt/bison@2.7/bin:$PATH
spack bootstrap untrust github-actions
spack bootstrap untrust github-actions-v0.2
spack external find --not-buildable cmake bison
spack -d solve zlib
tree ~/.spack/bootstrap/store/
@@ -152,13 +173,14 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
steps:
- name: Install dependencies
run: |
brew install tree
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: ${{ matrix.python-version }}
- name: Bootstrap clingo
@@ -172,13 +194,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9']
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: ${{ matrix.python-version }}
- name: Setup repo and non-root user
- name: Setup repo
run: |
git --version
git fetch --unshallow
@@ -202,14 +225,20 @@ jobs:
apt-get install -y \
bzip2 curl file g++ gcc patchelf gfortran git gzip \
make patch unzip xz-utils python3 python3-dev tree
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap GnuPG
shell: runuser -u spack-test -- bash {0}
run: |
@@ -231,20 +260,26 @@ jobs:
bzip2 curl file g++ gcc patchelf gfortran git gzip \
make patch unzip xz-utils python3 python3-dev tree \
gawk
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap GnuPG
shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
spack solve zlib
spack bootstrap untrust github-actions
spack bootstrap untrust github-actions-v0.2
spack -d gpg list
tree ~/.spack/bootstrap/store/
@@ -256,7 +291,8 @@ jobs:
brew install tree
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
@@ -272,11 +308,20 @@ jobs:
brew install gawk tree
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
spack solve zlib
spack bootstrap untrust github-actions
spack bootstrap untrust github-actions-v0.2
spack -d gpg list
tree ~/.spack/bootstrap/store/
# [1] Distros that have patched git to resolve CVE-2022-24765 (e.g. Ubuntu patching v2.25.1)
# introduce breaking behaviorso we have to set `safe.directory` in gitconfig ourselves.
# See:
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
# - https://github.com/actions/checkout/issues/760
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog

View File

@@ -13,6 +13,8 @@ on:
paths:
- '.github/workflows/build-containers.yml'
- 'share/spack/docker/*'
- 'share/templates/container/*'
- 'lib/spack/spack/container/*'
# Let's also build & tag Spack containers on releases.
release:
types: [published]
@@ -29,15 +31,21 @@ jobs:
# A matrix of Dockerfile paths, associated tags, and which architectures
# they support.
matrix:
dockerfile: [[amazon-linux, amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'],
[centos7, centos-7.dockerfile, 'linux/amd64,linux/arm64,linux/ppc64le'],
[leap15, leap-15.dockerfile, 'linux/amd64,linux/arm64,linux/ppc64le'],
[ubuntu-xenial, ubuntu-1604.dockerfile, 'linux/amd64,linux/arm64,linux/ppc64le'],
[ubuntu-bionic, ubuntu-1804.dockerfile, 'linux/amd64,linux/arm64,linux/ppc64le']]
# Meaning of the various items in the matrix list
# 0: Container name (e.g. ubuntu-bionic)
# 1: Platforms to build for
# 2: Base image (e.g. ubuntu:18.04)
dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'],
[centos7, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:7'],
[centos-stream, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream'],
[leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'],
[ubuntu-bionic, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:18.04'],
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04']]
name: Build ${{ matrix.dockerfile[0] }}
steps:
- name: Checkout
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- name: Set Container Tag Normal (Nightly)
run: |
@@ -52,22 +60,34 @@ jobs:
versioned="${{matrix.dockerfile[0]}}:${GITHUB_REF##*/}"
echo "versioned=${versioned}" >> $GITHUB_ENV
- name: Check ${{ matrix.dockerfile[1] }} Exists
- name: Generate the Dockerfile
env:
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
run: |
printf "Preparing to build ${{ env.container }} from ${{ matrix.dockerfile[1] }}"
if [ ! -f "share/spack/docker/${{ matrix.dockerfile[1]}}" ]; then
printf "Dockerfile ${{ matrix.dockerfile[0]}} does not exist"
.github/workflows/generate_spack_yaml_containerize.sh
. share/spack/setup-env.sh
mkdir -p dockerfiles/${{ matrix.dockerfile[0] }}
spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile
printf "Preparing to build ${{ env.container }} from dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile"
if [ ! -f "dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile" ]; then
printf "dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile does not exist"
exit 1;
fi
- name: Upload Dockerfile
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
with:
name: dockerfiles
path: dockerfiles
- name: Set up QEMU
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # @v1
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # @v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # @v1
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # @v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # @v1
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # @v1
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -75,17 +95,19 @@ jobs:
- name: Log in to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # @v1
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # @v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Deploy ${{ matrix.dockerfile[1] }}
uses: docker/build-push-action@7f9d37fa544684fb73bfe4835ed7214c255ce02b # @v2
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # @v2
with:
file: share/spack/docker/${{matrix.dockerfile[1]}}
platforms: ${{ matrix.dockerfile[2] }}
context: dockerfiles/${{ matrix.dockerfile[0] }}
platforms: ${{ matrix.dockerfile[1] }}
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
spack/${{ env.container }}
spack/${{ env.versioned }}

View File

@@ -0,0 +1,7 @@
$ proc = Start-Process ${{ env.spack_installer }}\spack.exe "/install /quiet" -Passthru
$handle = $proc.Handle # cache proc.Handle
$proc.WaitForExit();
if ($proc.ExitCode -ne 0) {
Write-Warning "$_ exited with status code $($proc.ExitCode)"
}

View File

@@ -0,0 +1,9 @@
#!/bin/bash
(echo "spack:" \
&& echo " specs: []" \
&& echo " container:" \
&& echo " format: docker" \
&& echo " images:" \
&& echo " os: \"${SPACK_YAML_OS}\"" \
&& echo " spack:" \
&& echo " ref: ${GITHUB_REF}") > spack.yaml

View File

@@ -24,8 +24,8 @@ jobs:
name: gcc with clang
runs-on: macos-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
- name: spack install
@@ -39,8 +39,8 @@ jobs:
runs-on: macos-latest
timeout-minutes: 700
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
- name: spack install
@@ -52,8 +52,8 @@ jobs:
name: scipy, mpl, pd
runs-on: macos-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
- name: spack install

11
.github/workflows/setup_git.ps1 vendored Normal file
View File

@@ -0,0 +1,11 @@
# (c) 2021 Lawrence Livermore National Laboratory
Set-Location spack
git config --global user.email "spack@example.com"
git config --global user.name "Test User"
if ($(git branch --show-current) -ne "develop")
{
git branch develop origin/develop
}

View File

@@ -0,0 +1,4 @@
param ($systemFolder, $shortcut)
$start = [System.Environment]::GetFolderPath("$systemFolder")
Invoke-Item "$start\Programs\Spack\$shortcut"

View File

@@ -15,10 +15,10 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install Python Packages
run: |
pip install --upgrade pip
@@ -31,12 +31,12 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools types-six
@@ -57,7 +57,7 @@ jobs:
packages: ${{ steps.filter.outputs.packages }}
with_coverage: ${{ steps.coverage.outputs.with_coverage }}
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
@@ -96,7 +96,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
concretizer: ['clingo']
include:
- python-version: 2.7
@@ -106,10 +106,10 @@ jobs:
- python-version: 3.9
concretizer: original
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -162,7 +162,7 @@ jobs:
SPACK_TEST_SOLVER: ${{ matrix.concretizer }}
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: unittests,linux,${{ matrix.concretizer }}
@@ -171,12 +171,12 @@ jobs:
needs: [ validate, style, changes ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install System packages
run: |
sudo apt-get -y update
@@ -200,7 +200,7 @@ jobs:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: shelltests,linux
@@ -218,7 +218,7 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- name: Setup repo and non-root user
run: |
git --version
@@ -237,12 +237,12 @@ jobs:
needs: [ validate, style, changes ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install System packages
run: |
sudo apt-get -y update
@@ -274,7 +274,7 @@ jobs:
SPACK_TEST_SOLVER: clingo
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: unittests,linux,clingo
@@ -286,10 +286,10 @@ jobs:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -320,7 +320,7 @@ jobs:
echo "ONLY PACKAGE RECIPES CHANGED [skipping coverage]"
$(which spack) unit-test -x -m "not maybeslow" -k "package_sanity"
fi
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
files: ./coverage.xml
@@ -331,10 +331,10 @@ jobs:
needs: [ validate, style, changes ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools pytest codecov coverage[toml]==6.2
@@ -350,7 +350,7 @@ jobs:
run: |
. share/spack/setup-env.sh
$(which spack) audit packages
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: unittests,linux,audits

188
.github/workflows/windows_python.yml vendored Normal file
View File

@@ -0,0 +1,188 @@
name: windows tests
on:
push:
branches:
- develop
- releases/**
pull_request:
branches:
- develop
- releases/**
defaults:
run:
shell:
powershell Invoke-Expression -Command ".\share\spack\qa\windows_test_setup.ps1"; {0}
jobs:
validate:
runs-on: windows-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: 3.9
- name: Install Python Packages
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade vermin
- name: vermin (Spack's Core)
run: vermin --backport argparse --backport typing -t='2.7-' -t='3.5-' -v spack/lib/spack/spack/ spack/lib/spack/llnl/ spack/bin/
- name: vermin (Repositories)
run: vermin --backport argparse --backport typing -t='2.7-' -t='3.5-' -v spack/var/spack/repos
# Run style checks on the files that have been changed
style:
runs-on: windows-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: 3.9
- name: Install Python packages
run: |
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
- name: Run style tests
run: |
spack style
- name: Verify license headers
run: |
python spack\bin\spack license verify
unittest:
needs: [ validate, style ]
runs-on: windows-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov coverage
- name: Create local develop
run: |
.\spack\.github\workflows\setup_git.ps1
- name: Unit Test
run: |
echo F|xcopy .\spack\share\spack\qa\configuration\windows_config.yaml $env:USERPROFILE\.spack\windows\config.yaml
spack unit-test --verbose --ignore=lib/spack/spack/test/cmd
unittest-cmd:
needs: [ validate, style ]
runs-on: windows-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov coverage
- name: Create local develop
run: |
.\spack\.github\workflows\setup_git.ps1
- name: Command Unit Test
run: |
echo F|xcopy .\spack\share\spack\qa\configuration\windows_config.yaml $env:USERPROFILE\.spack\windows\config.yaml
spack unit-test lib/spack/spack/test/cmd --verbose
buildtest:
needs: [ validate, style ]
runs-on: windows-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov coverage
- name: Build Test
run: |
spack compiler find
echo F|xcopy .\spack\share\spack\qa\configuration\windows_config.yaml $env:USERPROFILE\.spack\windows\config.yaml
spack external find cmake
spack external find ninja
spack install abseil-cpp
generate-installer-test:
needs: [ validate, style ]
runs-on: windows-latest
steps:
- name: Disable Windows Symlinks
run: |
git config --global core.symlinks false
shell:
powershell
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov coverage
- name: Add Light and Candle to Path
run: |
$env:WIX >> $GITHUB_PATH
- name: Run Installer
run: |
.\spack\share\spack\qa\setup_spack.ps1
spack make-installer -s spack -g SILENT pkg
echo "installer_root=$((pwd).Path)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
env:
ProgressPreference: SilentlyContinue
- uses: actions/upload-artifact@v3
with:
name: Windows Spack Installer Bundle
path: ${{ env.installer_root }}\pkg\Spack.exe
- uses: actions/upload-artifact@v3
with:
name: Windows Spack Installer
path: ${{ env.installer_root}}\pkg\Spack.msi
execute-installer:
needs: generate-installer-test
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
with:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six pywin32 setuptools codecov coverage
- name: Setup installer directory
run: |
mkdir -p spack_installer
echo "spack_installer=$((pwd).Path)\spack_installer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- uses: actions/download-artifact@v3
with:
name: Windows Spack Installer Bundle
path: ${{ env.spack_installer }}
- name: Execute Bundled Installer
run: |
$proc = Start-Process ${{ env.spack_installer }}\spack.exe "/install /quiet" -Passthru
$handle = $proc.Handle # cache proc.Handle
$proc.WaitForExit();
$LASTEXITCODE
env:
ProgressPreference: SilentlyContinue
- uses: actions/download-artifact@v3
with:
name: Windows Spack Installer
path: ${{ env.spack_installer }}
- name: Execute MSI
run: |
$proc = Start-Process ${{ env.spack_installer }}\spack.msi "/quiet" -Passthru
$handle = $proc.Handle # cache proc.Handle
$proc.WaitForExit();
$LASTEXITCODE

View File

@@ -1,3 +1,19 @@
# v0.17.2 (2022-04-13)
### Spack bugfixes
* Fix --reuse with upstreams set in an environment (#29680)
* config add: fix parsing of validator error to infer type from oneOf (#29475)
* Fix spack -C command_line_scope used in conjunction with other flags (#28418)
* Use Spec.constrain to construct spec lists for stacks (#28783)
* Fix bug occurring when searching for inherited patches in packages (#29574)
* Fixed a few bugs when manipulating symlinks (#28318, #29515, #29636)
* Fixed a few minor bugs affecting command prompt, terminal title and argument completion (#28279, #28278, #28939, #29405, #29070, #29402)
* Fixed a few bugs affecting the spack ci command (#29518, #29419)
* Fix handling of Intel compiler environment (#29439)
* Fix a few edge cases when reindexing the DB (#28764)
* Remove "Known issues" from documentation (#29664)
* Other miscellaneous bugfixes (0b72e070583fc5bcd016f5adc8a84c99f2b7805f, #28403, #29261)
# v0.17.1 (2021-12-23)
### Spack Bugfixes

20
bin/haspywin.py Normal file
View File

@@ -0,0 +1,20 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import subprocess
import sys
def getpywin():
try:
import win32con # noqa
except ImportError:
subprocess.check_call(
[sys.executable, "-m", "pip", "-q", "install", "--upgrade", "pip"])
subprocess.check_call(
[sys.executable, "-m", "pip", "-q", "install", "pywin32"])
if __name__ == '__main__':
getpywin()

223
bin/spack.bat Normal file
View File

@@ -0,0 +1,223 @@
:: Copyright 2013-2021 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)
::#######################################################################
::
:: This file is part of Spack and sets up the spack environment for batch,
:: This includes environment modules and lmod support,
:: and it also puts spack in your path. The script also checks that at least
:: module support exists, and provides suggestions if it doesn't. Source
:: it like this:
::
:: . /path/to/spack/install/spack_cmd.bat
::
@echo off
set spack=%SPACK_ROOT%\bin\spack
::#######################################################################
:: This is a wrapper around the spack command that forwards calls to
:: 'spack load' and 'spack unload' to shell functions. This in turn
:: allows them to be used to invoke environment modules functions.
::
:: 'spack load' is smarter than just 'load' because it converts its
:: arguments into a unique Spack spec that is then passed to module
:: commands. This allows the user to use packages without knowing all
:: their installation details.
::
:: e.g., rather than requiring a full spec for libelf, the user can type:
::
:: spack load libelf
::
:: This will first find the available libelf module file and use a
:: matching one. If there are two versions of libelf, the user would
:: need to be more specific, e.g.:
::
:: spack load libelf@0.8.13
::
:: This is very similar to how regular spack commands work and it
:: avoids the need to come up with a user-friendly naming scheme for
:: spack module files.
::#######################################################################
:_sp_shell_wrapper
set "_sp_flags="
set "_sp_args="
set "_sp_subcommand="
setlocal enabledelayedexpansion
:: commands have the form '[flags] [subcommand] [args]'
:: flags will always start with '-', e.g. --help or -V
:: subcommands will never start with '-'
:: everything after the subcommand is an arg
for %%x in (%*) do (
set t="%%~x"
if "!t:~0,1!" == "-" (
if defined _sp_subcommand (
:: We already have a subcommand, processing args now
set "_sp_args=!_sp_args! !t!"
) else (
set "_sp_flags=!_sp_flags! !t!"
shift
)
) else if not defined _sp_subcommand (
set "_sp_subcommand=!t!"
shift
) else (
set "_sp_args=!_sp_args! !t!"
shift
)
)
:: --help, -h and -V flags don't require further output parsing.
:: If we encounter, execute and exit
if defined _sp_flags (
if NOT "%_sp_flags%"=="%_sp_flags:-h=%" (
python "%spack%" %_sp_flags%
exit /B 0
) else if NOT "%_sp_flags%"=="%_sp_flags:--help=%" (
python "%spack%" %_sp_flags%
exit /B 0
) else if NOT "%_sp_flags%"=="%_sp_flags:-V=%" (
python "%spack%" %_sp_flags%
exit /B 0
)
)
:: pass parsed variables outside of local scope. Need to do
:: this because delayedexpansion can only be set by setlocal
echo %_sp_flags%>flags
echo %_sp_args%>args
echo %_sp_subcommand%>subcmd
endlocal
set /p _sp_subcommand=<subcmd
set /p _sp_flags=<flags
set /p _sp_args=<args
set str_subcommand=%_sp_subcommand:"='%
set str_flags=%_sp_flags:"='%
set str_args=%_sp_args:"='%
if "%str_subcommand%"=="ECHO is off." (set "_sp_subcommand=")
if "%str_flags%"=="ECHO is off." (set "_sp_flags=")
if "%str_args%"=="ECHO is off." (set "_sp_args=")
del subcmd
del flags
del args
:: Filter out some commands. For any others, just run the command.
if "%_sp_subcommand%" == "cd" (
goto :case_cd
) else if "%_sp_subcommand%" == "env" (
goto :case_env
) else if "%_sp_subcommand%" == "load" (
goto :case_load
) else if "%_sp_subcommand%" == "unload" (
goto :case_load
) else (
goto :default_case
)
::#######################################################################
:case_cd
:: Check for --help or -h
:: TODO: This is not exactly the same as setup-env.
:: In setup-env, '--help' or '-h' must follow the cd
:: Here, they may be anywhere in the args
if defined _sp_args (
if NOT "%_sp_args%"=="%_sp_args:--help=%" (
python "%spack%" cd -h
goto :end_switch
) else if NOT "%_sp_args%"=="%_sp_args:-h=%" (
python "%spack%" cd -h
goto :end_switch
)
)
for /F "tokens=* USEBACKQ" %%F in (
`python "%spack%" location %_sp_args%`) do (
set "LOC=%%F"
)
for %%Z in ("%LOC%") do if EXIST %%~sZ\NUL (cd /d "%LOC%")
goto :end_switch
:case_env
:: If no args or args contain --bat or -h/--help: just execute.
if NOT defined _sp_args (
goto :default_case
)else if NOT "%_sp_args%"=="%_sp_args:--help=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args: -h=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:deactivate=%" (
for /f "tokens=* USEBACKQ" %%I in (
`call python "%spack%" %_sp_flags% env deactivate --bat %_sp_args:deactivate=%`
) do %%I
) else if NOT "%_sp_args%"=="%_sp_args:activate=%" (
for /f "tokens=* USEBACKQ" %%I in (
`call python "%spack%" %_sp_flags% env activate --bat %_sp_args:activate=%`
) do %%I
) else (
goto :default_case
)
goto :end_switch
:case_load
:: If args contain --sh, --csh, or -h/--help: just execute.
if defined _sp_args (
if NOT "%_sp_args%"=="%_sp_args:--help=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args: -h=%" (
goto :default_case
) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
goto :default_case
)
)
for /f "tokens=* USEBACKQ" %%I in (
`python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`) do %%I
)
goto :end_switch
:case_unload
goto :case_load
:default_case
python "%spack%" %_sp_flags% %_sp_subcommand% %_sp_args%
goto :end_switch
:end_switch
exit /B %ERRORLEVEL%
::########################################################################
:: Prepends directories to path, if they exist.
:: pathadd /path/to/dir # add to PATH
:: or pathadd OTHERPATH /path/to/dir # add to OTHERPATH
::########################################################################
:_spack_pathadd
set "_pa_varname=PATH"
set "_pa_new_path=%~1"
if NOT "%~2" == "" (
set "_pa_varname=%~1"
set "_pa_new_path=%~2"
)
set "_pa_oldvalue=%_pa_varname%"
for %%Z in ("%_pa_new_path%") do if EXIST %%~sZ\NUL (
if defined %_pa_oldvalue% (
set "_pa_varname=%_pa_new_path%:%_pa_oldvalue%"
) else (
set "_pa_varname=%_pa_new_path%"
)
)
exit /b 0
:: set module system roots
:_sp_multi_pathadd
for %%I in (%~2) do (
for %%Z in (%_sp_compatible_sys_types%) do (
:pathadd "%~1" "%%I\%%Z"
)
)
exit /B %ERRORLEVEL%

72
bin/spack_cmd.bat Normal file
View File

@@ -0,0 +1,72 @@
@ECHO OFF
setlocal EnableDelayedExpansion
:: (c) 2021 Lawrence Livermore National Laboratory
:: To use this file independently of Spack's installer, execute this script in its directory, or add the
:: associated bin directory to your PATH. Invoke to launch Spack Shell.
::
:: source_dir/spack/bin/spack_cmd.bat
::
pushd %~dp0..
set SPACK_ROOT=%CD%
pushd %CD%\..
set spackinstdir=%CD%
popd
:: Check if Python is on the PATH
if not defined python_pf_ver (
(for /f "delims=" %%F in ('where python.exe') do (
set "python_pf_ver=%%F"
goto :found_python
) ) 2> NUL
)
:found_python
if not defined python_pf_ver (
:: If not, look for Python from the Spack installer
:get_builtin
(for /f "tokens=*" %%g in ('dir /b /a:d "!spackinstdir!\Python*"') do (
set "python_ver=%%g")) 2> NUL
if not defined python_ver (
echo Python was not found on your system.
echo Please install Python or add Python to your PATH.
) else (
set "py_path=!spackinstdir!\!python_ver!"
set "py_exe=!py_path!\python.exe"
)
goto :exitpoint
) else (
:: Python is already on the path
set "py_exe=!python_pf_ver!"
(for /F "tokens=* USEBACKQ" %%F in (
`"!py_exe!" --version`) do (set "output=%%F")) 2>NUL
if not "!output:Microsoft Store=!"=="!output!" goto :get_builtin
goto :exitpoint
)
:exitpoint
set "PATH=%SPACK_ROOT%\bin\;%PATH%"
if defined py_path (
set "PATH=%py_path%;%PATH%"
)
if defined py_exe (
"%py_exe%" "%SPACK_ROOT%\bin\haspywin.py"
"%py_exe%" "%SPACK_ROOT%\bin\spack" external find python >NUL
)
set "EDITOR=notepad"
DOSKEY spacktivate=spack env activate $*
@echo **********************************************************************
@echo ** Spack Package Manager
@echo **********************************************************************
IF "%1"=="" GOTO CONTINUE
set
GOTO:EOF
:continue
set PROMPT=[spack] %PROMPT%
%comspec% /k

10
bin/spack_pwsh.ps1 Normal file
View File

@@ -0,0 +1,10 @@
# 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)
$Env:SPACK_PS1_PATH="$PSScriptRoot\..\share\spack\setup-env.ps1"
& (Get-Process -Id $pid).Path -NoExit {
. $Env:SPACK_PS1_PATH ;
Push-Location $ENV:SPACK_ROOT
}

View File

@@ -9,15 +9,24 @@ bootstrap:
# may not be able to bootstrap all of the software that Spack needs,
# depending on its type.
sources:
- name: 'github-actions'
- name: 'github-actions-v0.2'
type: buildcache
description: |
Buildcache generated from a public workflow using Github Actions.
The sha256 checksum of binaries is checked before installation.
info:
url: https://mirror.spack.io/bootstrap/github-actions/v0.2
homepage: https://github.com/spack/spack-bootstrap-mirrors
releases: https://github.com/spack/spack-bootstrap-mirrors/releases
- name: 'github-actions-v0.1'
type: buildcache
description: |
Buildcache generated from a public workflow using Github Actions.
The sha256 checksum of binaries is checked before installation.
info:
url: https://mirror.spack.io/bootstrap/github-actions/v0.1
homepage: https://github.com/alalazo/spack-bootstrap-mirrors
releases: https://github.com/alalazo/spack-bootstrap-mirrors/releases
homepage: https://github.com/spack/spack-bootstrap-mirrors
releases: https://github.com/spack/spack-bootstrap-mirrors/releases
# This method is just Spack bootstrapping the software it needs from sources.
# It has been added here so that users can selectively disable bootstrapping
# from sources by "untrusting" it.
@@ -28,5 +37,5 @@ bootstrap:
trusted:
# By default we trust bootstrapping from sources and from binaries
# produced on Github via the workflow
github-actions: true
github-actions-v0.2: true
spack-install: true

View File

@@ -14,4 +14,17 @@ concretizer:
# concretizing specs. If `true`, we'll try to use as many installs/binaries
# as possible, rather than building. If `false`, we'll always give you a fresh
# concretization.
reuse: false
reuse: true
# Options that tune which targets are considered for concretization. The
# concretization process is very sensitive to the number targets, and the time
# needed to reach a solution increases noticeably with the number of targets
# considered.
targets:
# Determine whether we want to target specific or generic microarchitectures.
# An example of the first kind might be for instance "skylake" or "bulldozer",
# while generic microarchitectures are for instance "aarch64" or "x86_64_v4".
granularity: microarchitectures
# If "false" allow targets that are incompatible with the current host (for
# instance concretize with target "icelake" while running on "haswell").
# If "true" only allow targets that are compatible with the host.
host_compatible: true

View File

@@ -35,13 +35,10 @@ modules:
# These are configurations for the module set named "default"
default:
# These values are defaulted in the code. They are not defaulted here so
# that we can enable backwards compatibility with the old syntax more
# easily (old value is in the config yaml, config:module_roots)
# Where to install modules
# roots:
# tcl: $spack/share/spack/modules
# lmod: $spack/share/spack/lmod
roots:
tcl: $spack/share/spack/modules
lmod: $spack/share/spack/lmod
# What type of modules to use
enable:
- tcl

View File

@@ -35,7 +35,8 @@ packages:
jpeg: [libjpeg-turbo, libjpeg]
lapack: [openblas, amdlibflame]
libllvm: [llvm, llvm-amdgpu]
lua-lang: [lua, lua-luajit]
lua-lang: [lua, lua-luajit-openresty, lua-luajit]
luajit: [lua-luajit-openresty, lua-luajit]
mariadb-client: [mariadb-c-client, mariadb]
mkl: [intel-mkl]
mpe: [mpe2]

View File

@@ -0,0 +1,5 @@
config:
locks: false
concretizer: original
build_stage::
- '$spack/.staging'

View File

@@ -192,32 +192,32 @@ you can use them to customize an installation in :ref:`sec-specs`.
Reusing installed dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. warning::
By default, when you run ``spack install``, Spack tries hard to reuse existing installations
as dependencies, either from a local store or from remote buildcaches if configured.
This minimizes unwanted rebuilds of common dependencies, in particular if
you update Spack frequently.
The ``--reuse`` option described here will become the default installation
method in the next Spack version, and you will be able to get the current
behavior by using ``spack install --fresh``.
By default, when you run ``spack install``, Spack tries to build a new
version of the package you asked for, along with updated versions of
its dependencies. This gets you the latest versions and configurations,
but it can result in unwanted rebuilds if you update Spack frequently.
If you want Spack to try hard to reuse existing installations as dependencies,
you can add the ``--reuse`` option:
In case you want the latest versions and configurations to be installed instead,
you can add the ``--fresh`` option:
.. code-block:: console
$ spack install --reuse mpich
$ spack install --fresh mpich
This will not do anything if ``mpich`` is already installed. If ``mpich``
is not installed, but dependencies like ``hwloc`` and ``libfabric`` are,
the ``mpich`` will be build with the installed versions, if possible.
You can use the :ref:`spack spec -I <cmd-spack-spec>` command to see what
Reusing installations in this mode is "accidental", and happening only if
there's a match between existing installations and what Spack would have installed
anyhow.
You can use the ``spack spec -I mpich`` command to see what
will be reused and what will be built before you install.
You can configure Spack to use the ``--reuse`` behavior by default in
``concretizer.yaml``.
You can configure Spack to use the ``--fresh`` behavior by default in
``concretizer.yaml``:
.. code-block:: yaml
concretizer:
reuse: false
.. _cmd-spack-uninstall:
@@ -1723,8 +1723,8 @@ Activating Extensions in a View
Another way to use extensions is to create a view, which merges the
python installation along with the extensions into a single prefix.
See :ref:`filesystem-views` for a more in-depth description of views and
:ref:`cmd-spack-view` for usage of the ``spack view`` command.
See :ref:`configuring_environment_views` for a more in-depth description
of views.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Activating Extensions Globally

View File

@@ -5,9 +5,9 @@
.. _build-settings:
===================
Build Customization
===================
================================
Package Settings (packages.yaml)
================================
Spack allows you to customize how your software is built through the
``packages.yaml`` file. Using it, you can make Spack prefer particular
@@ -219,33 +219,65 @@ Concretizer options
but you can also use ``concretizer.yaml`` to customize aspects of the
algorithm it uses to select the dependencies you install:
.. _code-block: yaml
.. literalinclude:: _spack_root/etc/spack/defaults/concretizer.yaml
:language: yaml
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Reuse already installed packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``reuse`` attribute controls whether Spack will prefer to use installed packages (``true``), or
whether it will do a "fresh" installation and prefer the latest settings from
``package.py`` files and ``packages.yaml`` (``false``).
You can use:
.. code-block:: console
% spack install --reuse <spec>
to enable reuse for a single installation, and you can use:
.. code-block:: console
spack install --fresh <spec>
to do a fresh install if ``reuse`` is enabled by default.
``reuse: true`` is the default.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Selection of the target microarchitectures
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The options under the ``targets`` attribute control which targets are considered during a solve.
Currently the options in this section are only configurable from the ``concretization.yaml`` file
and there are no corresponding command line arguments to enable them for a single solve.
The ``granularity`` option can take two possible values: ``microarchitectures`` and ``generic``.
If set to:
.. code-block:: yaml
concretizer:
# Whether to consider installed packages or packages from buildcaches when
# concretizing specs. If `true`, we'll try to use as many installs/binaries
# as possible, rather than building. If `false`, we'll always give you a fresh
# concretization.
reuse: false
targets:
granularity: microarchitectures
^^^^^^^^^^^^^^^^
``reuse``
^^^^^^^^^^^^^^^^
Spack will consider all the microarchitectures known to ``archspec`` to label nodes for
compatibility. If instead the option is set to:
This controls whether Spack will prefer to use installed packages (``true``), or
whether it will do a "fresh" installation and prefer the latest settings from
``package.py`` files and ``packages.yaml`` (``false``). .
.. code-block:: yaml
You can use ``spack install --reuse`` to enable reuse for a single installation,
and you can use ``spack install --fresh`` to do a fresh install if ``reuse`` is
enabled by default.
concretizer:
targets:
granularity: generic
.. note::
``reuse: false`` is the current default, but ``reuse: true`` will be the default
in the next Spack release. You will still be able to use ``spack install --fresh``
to get the old behavior.
Spack will consider only generic microarchitectures. For instance, when running on an
Haswell node, Spack will consider ``haswell`` as the best target in the former case and
``x86_64_v3`` as the best target in the latter case.
The ``host_compatible`` option is a Boolean option that determines whether or not the
microarchitectures considered during the solve are constrained to be compatible with the
host Spack is currently running on. For instance, if this option is set to ``true``, a
user cannot concretize for ``target=icelake`` while running on an Haswell node.
.. _package-preferences:

View File

@@ -47,10 +47,12 @@ on these ideas for each distinct build system that Spack supports:
:maxdepth: 1
:caption: Language-specific
build_systems/luapackage
build_systems/octavepackage
build_systems/perlpackage
build_systems/pythonpackage
build_systems/rpackage
build_systems/racketpackage
build_systems/rubypackage
.. toctree::

View File

@@ -433,7 +433,7 @@ For example:
.. code-block:: python
variant('profiler', when='@2.0:')
config_args += self.with_or_without('profiler)
config_args += self.with_or_without('profiler')
will neither add ``--with-profiler`` nor ``--without-profiler`` when the version is
below ``2.0``.

View File

@@ -159,6 +159,85 @@ and CMake simply ignores the empty command line argument. For example the follow
will generate ``'cmake' '-DEXAMPLE=ON' ...`` when `@2.0: +example` is met, but will
result in ``'cmake' '' ...`` when the spec version is below ``2.0``.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CMake arguments provided by Spack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following default arguments are controlled by Spack:
``CMAKE_INSTALL_PREFIX``
------------------------
Is set to the the package's install directory.
``CMAKE_PREFIX_PATH``
---------------------
CMake finds dependencies through calls to ``find_package()``, ``find_program()``,
``find_library()``, ``find_file()``, and ``find_path()``, which use a list of search
paths from ``CMAKE_PREFIX_PATH``. Spack sets this variable to a list of prefixes of the
spec's transitive dependencies.
For troubleshooting cases where CMake fails to find a dependency, add the
``--debug-find`` flag to ``cmake_args``.
``CMAKE_BUILD_TYPE``
--------------------
Every CMake-based package accepts a ``-DCMAKE_BUILD_TYPE`` flag to
dictate which level of optimization to use. In order to ensure
uniformity across packages, the ``CMakePackage`` base class adds
a variant to control this:
.. code-block:: python
variant('build_type', default='RelWithDebInfo',
description='CMake build type',
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
However, not every CMake package accepts all four of these options.
Grep the ``CMakeLists.txt`` file to see if the default values are
missing or replaced. For example, the
`dealii <https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/dealii/package.py>`_
package overrides the default variant with:
.. code-block:: python
variant('build_type', default='DebugRelease',
description='The build type to build',
values=('Debug', 'Release', 'DebugRelease'))
For more information on ``CMAKE_BUILD_TYPE``, see:
https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
``CMAKE_INSTALL_RPATH`` and ``CMAKE_INSTALL_RPATH_USE_LINK_PATH=ON``
--------------------------------------------------------------------
CMake uses different RPATHs during the build and after installation, so that executables
can locate the libraries they're linked to during the build, and installed executables
do not have RPATHs to build directories. In Spack, we have to make sure that RPATHs are
set properly after installation.
Spack sets ``CMAKE_INSTALL_RPATH`` to a list of ``<prefix>/lib`` or ``<prefix>/lib64``
directories of the spec's link-type dependencies. Apart from that, it sets
``-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON``, which should add RPATHs for directories of
linked libraries not in the directories covered by ``CMAKE_INSTALL_RPATH``.
Usually it's enough to set only ``-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON``, but the
reason to provide both options is that packages may dynamically open shared libraries,
which CMake cannot detect. In those cases, the RPATHs from ``CMAKE_INSTALL_RPATH`` are
used as search paths.
.. note::
Some packages provide stub libraries, which contain an interface for linking without
an implementation. When using such libraries, it's best to override the option
``-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF`` in ``cmake_args``, so that stub libraries
are not used at runtime.
^^^^^^^^^^
Generators
@@ -196,36 +275,6 @@ generators, but it should be simple to add support for alternative
generators. For more information on CMake generators, see:
https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
^^^^^^^^^^^^^^^^
CMAKE_BUILD_TYPE
^^^^^^^^^^^^^^^^
Every CMake-based package accepts a ``-DCMAKE_BUILD_TYPE`` flag to
dictate which level of optimization to use. In order to ensure
uniformity across packages, the ``CMakePackage`` base class adds
a variant to control this:
.. code-block:: python
variant('build_type', default='RelWithDebInfo',
description='CMake build type',
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
However, not every CMake package accepts all four of these options.
Grep the ``CMakeLists.txt`` file to see if the default values are
missing or replaced. For example, the
`dealii <https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/dealii/package.py>`_
package overrides the default variant with:
.. code-block:: python
variant('build_type', default='DebugRelease',
description='The build type to build',
values=('Debug', 'Release', 'DebugRelease'))
For more information on ``CMAKE_BUILD_TYPE``, see:
https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CMakeLists.txt in a sub-directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@@ -0,0 +1,105 @@
.. 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)
.. _luapackage:
------------
LuaPackage
------------
LuaPackage is a helper for the common case of Lua packages that provide
a rockspec file. This is not meant to take a rock archive, but to build
a source archive or repository that provides a rockspec, which should cover
most lua packages. In the case a Lua package builds by Make rather than
luarocks, prefer MakefilePackage.
^^^^^^
Phases
^^^^^^
The ``LuaPackage`` base class comes with the following phases:
#. ``unpack`` - if using a rock, unpacks the rock and moves into the source directory
#. ``preprocess`` - adjust sources or rockspec to fix build
#. ``install`` - install the project
By default, these phases run:
.. code-block:: console
# If the archive is a source rock
$ luarocks unpack <archive>.src.rock
$ # preprocess is a noop by default
$ luarocks make <name>.rockspec
Any of these phases can be overridden in your package as necessary.
^^^^^^^^^^^^^^^
Important files
^^^^^^^^^^^^^^^
Packages that use the Lua/LuaRocks build system can be identified by the
presence of a ``*.rockspec`` file in their sourcetree, or can be fetched as
a source rock archive (``.src.rock``). This file declares things like build
instructions and dependencies, the ``.src.rock`` also contains all code.
It is common for the rockspec file to list the lua version required in
a dependency. The LuaPackage class adds appropriate dependencies on a Lua
implementation, but it is a good idea to specify the version required with
a ``depends_on`` statement. The block normally will be a table definition like
this:
.. code-block:: lua
dependencies = {
"lua >= 5.1",
}
The LuaPackage class supports source repositories and archives containing
a rockspec and directly downloading source rock files. It *does not* support
downloading dependencies listed inside a rockspec, and thus does not support
directly downloading a rockspec as an archive.
^^^^^^^^^^^^^^^^^^^^^^^^^
Build system dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^
All base dependencies are added by the build system, but LuaRocks is run to
avoid downloading extra Lua dependencies during build. If the package needs
Lua libraries outside the standard set, they should be added as dependencies.
To specify a Lua version constraint but allow all lua implementations, prefer
to use ``depends_on("lua-lang@5.1:5.1.99")`` to express any 5.1 compatible
version. If the package requires LuaJit rather than Lua,
a ``depends_on("luajit")`` should be used to ensure a LuaJit distribution is
used instead of the Lua interpreter. Alternately, if only interpreted Lua will
work ``depends_on("lua")`` will express that.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Passing arguments to luarocks make
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you need to pass any arguments to the ``luarocks make`` call, you can
override the ``luarocks_args`` method like so:
.. code-block:: python
def luarocks_args(self):
return ['flag1', 'flag2']
One common use of this is to override warnings or flags for newer compilers, as in:
.. code-block:: python
def luarocks_args(self):
return ["CFLAGS='-Wno-error=implicit-function-declaration'"]
^^^^^^^^^^^^^^^^^^^^^^
External documentation
^^^^^^^^^^^^^^^^^^^^^^
For more information on the LuaRocks build system, see:
https://luarocks.org/

View File

@@ -645,8 +645,7 @@ are not yet in Spack, and Spack contains many Python packages that are
not yet in Anaconda. The main advantage of Spack over Anaconda is its
ability to choose a specific compiler and BLAS/LAPACK or MPI library.
Spack also has better platform support for supercomputers, and can build
optimized binaries for your specific microarchitecture. On the other hand,
Anaconda offers Windows support.
optimized binaries for your specific microarchitecture.
^^^^^^^^^^^^^^^^^^^^^^
External documentation

View File

@@ -0,0 +1,46 @@
.. Copyright 2013-2021 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)
.. _racketpackage:
-------------
RacketPackage
-------------
Much like Python, Racket packages and modules have their own special build system.
To learn more about the specifics of Racket package system, please refer to the
`Racket Docs <https://docs.racket-lang.org/pkg/cmdline.html>`_.
^^^^^^
Phases
^^^^^^
The ``RacketPackage`` base class provides an ``install`` phase that
can be overridden, corresponding to the use of:
.. code-block:: console
$ raco pkg install
^^^^^^^
Caveats
^^^^^^^
In principle, ``raco`` supports a second, ``setup`` phase; however, we have not
implemented this separately, as in normal circumstances, ``install`` also handles
running ``setup`` automatically.
Unlike Python, Racket currently on supports two installation scopes for packages, user
or system, and keeps a registry of installed packages at each scope in its configuration files.
This means we can't simply compose a "``RACKET_PATH``" environment variable listing all of the
places packages are installed, and update this at will.
Unfortunately this means that all currently installed packages which extend Racket via ``raco pkg install``
are accessible whenever Racket is accessible.
Additionally, because Spack does not implement uninstall hooks, uninstalling a Spack ``rkt-`` package
will have no effect on the ``raco`` installed packages visible to your Racket installation.
Instead, you must manually run ``raco pkg remove`` to keep the two package managers in a mutually
consistent state.

View File

@@ -95,7 +95,7 @@ class of your package. For example, you can add it to your
# Set up the hip macros needed by the build
args.extend([
'-DENABLE_HIP=ON',
'-DHIP_ROOT_DIR={0}'.format(spec['hip'].prefix])
'-DHIP_ROOT_DIR={0}'.format(spec['hip'].prefix)])
rocm_archs = spec.variants['amdgpu_target'].value
if 'none' not in rocm_archs:
args.append('-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'

View File

@@ -23,7 +23,10 @@
import sys
from glob import glob
from docutils.statemachine import StringList
from sphinx.domains.python import PythonDomain
from sphinx.ext.apidoc import main as sphinx_apidoc
from sphinx.parsers import RSTParser
# -- Spack customizations -----------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
@@ -82,9 +85,6 @@
#
# Disable duplicate cross-reference warnings.
#
from sphinx.domains.python import PythonDomain
class PatchedPythonDomain(PythonDomain):
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
if 'refspecific' in node:
@@ -92,8 +92,20 @@ def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
return super(PatchedPythonDomain, self).resolve_xref(
env, fromdocname, builder, typ, target, node, contnode)
#
# Disable tabs to space expansion in code blocks
# since Makefiles require tabs.
#
class NoTabExpansionRSTParser(RSTParser):
def parse(self, inputstring, document):
if isinstance(inputstring, str):
lines = inputstring.splitlines()
inputstring = StringList(lines, document.current_source)
super().parse(inputstring, document)
def setup(sphinx):
sphinx.add_domain(PatchedPythonDomain, override=True)
sphinx.add_source_parser(NoTabExpansionRSTParser, override=True)
# -- General configuration -----------------------------------------------------
@@ -180,6 +192,7 @@ def setup(sphinx):
('py:class', '_frozen_importlib_external.SourceFileLoader'),
# Spack classes that are private and we don't want to expose
('py:class', 'spack.provider_index._IndexBase'),
('py:class', 'spack.repo._PrependFileLoader'),
]
# The reST default role (used for this markup: `text`) to use for all documents.

View File

@@ -5,9 +5,9 @@
.. _config-yaml:
==============
Basic Settings
==============
============================
Spack Settings (config.yaml)
============================
Spack's basic configuration options are set in ``config.yaml``. You can
see the default settings by looking at
@@ -72,21 +72,6 @@ used to configure module names.
packages have been installed will prevent Spack from being
able to find the old installation directories.
--------------------
``module_roots``
--------------------
Controls where Spack installs generated module files. You can customize
the location for each type of module. e.g.:
.. code-block:: yaml
module_roots:
tcl: $spack/share/spack/modules
lmod: $spack/share/spack/lmod
See :ref:`modules` for details.
--------------------
``build_stage``
--------------------

View File

@@ -37,8 +37,6 @@ Here is an example ``config.yaml`` file:
config:
install_tree: $spack/opt/spack
module_roots:
lmod: $spack/share/spack/lmod
build_stage:
- $tempdir/$user/spack-stage
- ~/.spack/stage
@@ -253,8 +251,6 @@ your configurations look like this:
config:
install_tree: $spack/opt/spack
module_roots:
lmod: $spack/share/spack/lmod
build_stage:
- $tempdir/$user/spack-stage
- ~/.spack/stage
@@ -278,8 +274,6 @@ command:
$ spack config get config
config:
install_tree: /some/other/directory
module_roots:
lmod: $spack/share/spack/lmod
build_stage:
- $tempdir/$user/spack-stage
- ~/.spack/stage
@@ -345,13 +339,11 @@ higher-precedence scope is *prepended* to the defaults. ``spack config
get config`` shows the result:
.. code-block:: console
:emphasize-lines: 7-10
:emphasize-lines: 5-8
$ spack config get config
config:
install_tree: /some/other/directory
module_roots:
lmod: $spack/share/spack/lmod
build_stage:
- /lustre-scratch/$user/spack
- ~/mystage
@@ -375,13 +367,11 @@ user config looked like this:
The merged configuration would look like this:
.. code-block:: console
:emphasize-lines: 7-8
:emphasize-lines: 5-6
$ spack config get config
config:
install_tree: /some/other/directory
module_roots:
lmod: $spack/share/spack/lmod
build_stage:
- /lustre-scratch/$user/spack
- ~/mystage
@@ -502,9 +492,6 @@ account all scopes. For example, to see the fully merged
template_dirs:
- $spack/templates
directory_layout: {architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}
module_roots:
tcl: $spack/share/spack/modules
lmod: $spack/share/spack/lmod
build_stage:
- $tempdir/$user/spack-stage
- ~/.spack/stage
@@ -552,9 +539,6 @@ down the problem:
/home/myuser/spack/etc/spack/defaults/config.yaml:23 template_dirs:
/home/myuser/spack/etc/spack/defaults/config.yaml:24 - $spack/templates
/home/myuser/spack/etc/spack/defaults/config.yaml:28 directory_layout: {architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}
/home/myuser/spack/etc/spack/defaults/config.yaml:32 module_roots:
/home/myuser/spack/etc/spack/defaults/config.yaml:33 tcl: $spack/share/spack/modules
/home/myuser/spack/etc/spack/defaults/config.yaml:34 lmod: $spack/share/spack/lmod
/home/myuser/spack/etc/spack/defaults/config.yaml:49 build_stage:
/home/myuser/spack/etc/spack/defaults/config.yaml:50 - $tempdir/$user/spack-stage
/home/myuser/spack/etc/spack/defaults/config.yaml:51 - ~/.spack/stage

View File

@@ -1057,39 +1057,39 @@ Release branches
^^^^^^^^^^^^^^^^
There are currently two types of Spack releases: :ref:`major releases
<major-releases>` (``0.13.0``, ``0.14.0``, etc.) and :ref:`point releases
<point-releases>` (``0.13.1``, ``0.13.2``, ``0.13.3``, etc.). Here is a
<major-releases>` (``0.17.0``, ``0.18.0``, etc.) and :ref:`point releases
<point-releases>` (``0.17.1``, ``0.17.2``, ``0.17.3``, etc.). Here is a
diagram of how Spack release branches work::
o branch: develop (latest version)
o branch: develop (latest version, v0.19.0.dev0)
|
o merge v0.14.1 into develop
|\
| o branch: releases/v0.14, tag: v0.14.1
o | merge v0.14.0 into develop
|\|
| o tag: v0.14.0
o
| o branch: releases/v0.18, tag: v0.18.1
o |
| o tag: v0.18.0
o |
| o
|/
o merge v0.13.2 into develop
|\
| o branch: releases/v0.13, tag: v0.13.2
o | merge v0.13.1 into develop
|\|
| o tag: v0.13.1
o | merge v0.13.0 into develop
|\|
| o tag: v0.13.0
o
|
o
| o branch: releases/v0.17, tag: v0.17.2
o |
| o tag: v0.17.1
o |
| o tag: v0.17.0
o |
| o
|/
o
The ``develop`` branch has the latest contributions, and nearly all pull
requests target ``develop``.
requests target ``develop``. The ``develop`` branch will report that its
version is that of the next **major** release with a ``.dev0`` suffix.
Each Spack release series also has a corresponding branch, e.g.
``releases/v0.14`` has ``0.14.x`` versions of Spack, and
``releases/v0.13`` has ``0.13.x`` versions. A major release is the first
``releases/v0.18`` has ``0.18.x`` versions of Spack, and
``releases/v0.17`` has ``0.17.x`` versions. A major release is the first
tagged version on a release branch. Minor releases are back-ported from
develop onto release branches. This is typically done by cherry-picking
bugfix commits off of ``develop``.
@@ -1100,12 +1100,20 @@ packages. They should generally only contain fixes to the Spack core.
However, sometimes priorities are such that new functionality needs to
be added to a minor release.
Both major and minor releases are tagged. After each release, we merge
the release branch back into ``develop`` so that the version bump and any
other release-specific changes are visible in the mainline. As a
convenience, we also tag the latest release as ``releases/latest``,
so that users can easily check it out to get the latest
stable version. See :ref:`merging-releases` for more details.
Both major and minor releases are tagged. As a convenience, we also tag
the latest release as ``releases/latest``, so that users can easily check
it out to get the latest stable version. See :ref:`updating-latest-release`
for more details.
.. note::
Older spack releases were merged **back** into develop so that we could
do fancy things with tags, but since tarballs and many git checkouts do
not have tags, this proved overly complex and confusing.
We have since converted to using `PEP 440 <https://peps.python.org/pep-0440/>`_
compliant versions. `See here <https://github.com/spack/spack/pull/25267>`_ for
details.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Scheduling work for releases
@@ -1163,10 +1171,11 @@ completed, the steps to make the major release are:
``releases/vX.Y``. That is, you should create a ``releases/vX.Y``
branch if you are preparing the ``X.Y.0`` release.
#. Bump the version in ``lib/spack/spack/__init__.py``.
#. Remove the ``dev0`` development release segment from the version tuple in
``lib/spack/spack/__init__.py``.
See `this example from 0.13.0
<https://github.com/spack/spack/commit/8eeb64096c98b8a43d1c587f13ece743c864fba9>`_
The version number itself should already be correct and should not be
modified.
#. Update ``CHANGELOG.md`` with major highlights in bullet form.
@@ -1188,9 +1197,16 @@ completed, the steps to make the major release are:
is outdated submit pull requests to ``develop`` as normal
and keep rebasing the release branch on ``develop``.
#. Bump the major version in the ``develop`` branch.
Create a pull request targeting the ``develop`` branch, bumping the major
version in ``lib/spack/spack/__init__.py`` with a ``dev0`` release segment.
For instance when you have just released ``v0.15.0``, set the version
to ``(0, 16, 0, 'dev0')`` on ``develop``.
#. Follow the steps in :ref:`publishing-releases`.
#. Follow the steps in :ref:`merging-releases`.
#. Follow the steps in :ref:`updating-latest-release`.
#. Follow the steps in :ref:`announcing-releases`.
@@ -1266,9 +1282,6 @@ completed, the steps to make the point release are:
#. Bump the version in ``lib/spack/spack/__init__.py``.
See `this example from 0.14.1
<https://github.com/spack/spack/commit/ff0abb9838121522321df2a054d18e54b566b44a>`_.
#. Update ``CHANGELOG.md`` with a list of the changes.
This is typically a summary of the commits you cherry-picked onto the
@@ -1290,7 +1303,7 @@ completed, the steps to make the point release are:
#. Follow the steps in :ref:`publishing-releases`.
#. Follow the steps in :ref:`merging-releases`.
#. Follow the steps in :ref:`updating-latest-release`.
#. Follow the steps in :ref:`announcing-releases`.
@@ -1351,11 +1364,11 @@ Publishing a release on GitHub
selectable in the versions menu.
.. _merging-releases:
.. _updating-latest-release:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Updating `releases/latest` and `develop`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^
Updating `releases/latest`
^^^^^^^^^^^^^^^^^^^^^^^^^^
If the new release is the **highest** Spack release yet, you should
also tag it as ``releases/latest``. For example, suppose the highest
@@ -1379,40 +1392,6 @@ To tag ``releases/latest``, do this:
The ``--force`` argument to ``git tag`` makes ``git`` overwrite the existing
``releases/latest`` tag with the new one.
We also merge each release that we tag as ``releases/latest`` into ``develop``.
Make sure to do this with a merge commit:
.. code-block:: console
$ git checkout develop
$ git merge --no-ff -s ours vX.Y.Z # vX.Y.Z is the new release's tag
$ git push
We merge back to ``develop`` because it:
* updates the version and ``CHANGELOG.md`` on ``develop``; and
* ensures that your release tag is reachable from the head of
``develop``.
We *must* use a real merge commit (via the ``--no-ff`` option) to
ensure that the release tag is reachable from the tip of ``develop``.
This is necessary for ``spack -V`` to work properly -- it uses ``git
describe --tags`` to find the last reachable tag in the repository and
reports how far we are from it. For example:
.. code-block:: console
$ spack -V
0.14.2-1486-b80d5e74e5
This says that we are at commit ``b80d5e74e5``, which is 1,486 commits
ahead of the ``0.14.2`` release.
We put this step last in the process because it's best to do it only once
the release is complete and tagged. If you do it before you've tagged the
release and later decide you want to tag some later commit, you'll need
to merge again.
.. _announcing-releases:

View File

@@ -5,9 +5,9 @@
.. _environments:
============
Environments
============
=========================
Environments (spack.yaml)
=========================
An environment is used to group together a set of specs for the
purpose of building, rebuilding and deploying in a coherent fashion.
@@ -349,6 +349,24 @@ If the Environment has been concretized, Spack will install the
concretized specs. Otherwise, ``spack install`` will first concretize
the Environment and then install the concretized specs.
.. note::
Every ``spack install`` process builds one package at a time with multiple build
jobs, controlled by the ``-j`` flag and the ``config:build_jobs`` option
(see :ref:`build-jobs`). To speed up environment builds further, independent
packages can be installed in parallel by launching more Spack instances. For
example, the following will build at most four packages in parallel using
three background jobs:
.. code-block:: console
[myenv]$ spack install & spack install & spack install & spack install
Another option is to generate a ``Makefile`` and run ``make -j<N>`` to control
the number of parallel install processes. See :ref:`env-generate-depfile`
for details.
As it installs, ``spack install`` creates symbolic links in the
``logs/`` directory in the Environment, allowing for easy inspection
of build logs related to that environment. The ``spack install``
@@ -384,18 +402,11 @@ Sourcing that file in Bash will make the environment available to the
user; and can be included in ``.bashrc`` files, etc. The ``loads``
file may also be copied out of the environment, renamed, etc.
----------
spack.yaml
----------
Spack environments can be customized at finer granularity by editing
the ``spack.yaml`` manifest file directly.
.. _environment-configuration:
^^^^^^^^^^^^^^^^^^^^^^^^
------------------------
Configuring Environments
^^^^^^^^^^^^^^^^^^^^^^^^
------------------------
A variety of Spack behaviors are changed through Spack configuration
files, covered in more detail in the :ref:`configuration`
@@ -417,9 +428,9 @@ environment can be specified by ``env:NAME`` (to affect environment
``foo``, set ``--scope env:foo``). These commands will automatically
manipulate configuration inline in the ``spack.yaml`` file.
"""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^
Inline configurations
"""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^
Inline Environment-scope configuration is done using the same yaml
format as standard Spack configuration scopes, covered in the
@@ -440,9 +451,9 @@ a ``packages.yaml`` file) could contain:
This configuration sets the default compiler for all packages to
``intel``.
"""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^
Included configurations
"""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^
Spack environments allow an ``include`` heading in their yaml
schema. This heading pulls in external configuration files and applies
@@ -462,9 +473,9 @@ to make small changes to an individual Environment. Included configs
listed earlier will have higher precedence, as the included configs are
applied in reverse order.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------------------------
Manually Editing the Specs List
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------------------------
The list of abstract/root specs in the Environment is maintained in
the ``spack.yaml`` manifest under the heading ``specs``.
@@ -482,9 +493,9 @@ Appending to this list in the yaml is identical to using the ``spack
add`` command from the command line. However, there is more power
available from the yaml file.
"""""""""""""""""""
^^^^^^^^^^^^^^^^^^^
Spec concretization
"""""""""""""""""""
^^^^^^^^^^^^^^^^^^^
Specs can be concretized separately or together, as already
explained in :ref:`environments_concretization`. The behavior active
@@ -510,9 +521,9 @@ which can currently take either one of the two allowed values ``together`` or ``
the environment remains consistent. When instead the specs are concretized
separately only the new specs will be re-concretized after any addition.
"""""""""""""
^^^^^^^^^^^^^
Spec Matrices
"""""""""""""
^^^^^^^^^^^^^
Entries in the ``specs`` list can be individual abstract specs or a
spec matrix.
@@ -572,9 +583,9 @@ This allows one to create toolchains out of combinations of
constraints and apply them somewhat indiscriminately to packages,
without regard for the applicability of the constraint.
""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^
Spec List References
""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^
The last type of possible entry in the specs list is a reference.
@@ -674,9 +685,9 @@ The valid variables for a ``when`` clause are:
#. ``hostname``. The hostname of the system (if ``hostname`` is an
executable in the user's PATH).
""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^
SpecLists as Constraints
""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^
Dependencies and compilers in Spack can be both packages in an
environment and constraints on other packages. References to SpecLists
@@ -708,41 +719,41 @@ For example, the following environment has three root packages:
This allows for a much-needed reduction in redundancy between packages
and constraints.
^^^^^^^^^^^^^^^^^^^^^^^^^
Environment-managed Views
^^^^^^^^^^^^^^^^^^^^^^^^^
----------------
Filesystem Views
----------------
Spack Environments can define filesystem views of their software,
which are maintained as packages and can be installed and uninstalled from
the Environment. Filesystem views provide an access point for packages
from the filesystem for users who want to access those packages
directly. For more information on filesystem views, see the section
:ref:`filesystem-views`.
Spack Environment managed views are updated every time the environment
is written out to the lock file ``spack.lock``, so the concrete
environment and the view are always compatible.
Spack Environments can define filesystem views, which provide a direct access point
for software similar to the directory hierarchy that might exist under ``/usr/local``.
Filesystem views are updated every time the environment is written out to the lock
file ``spack.lock``, so the concrete environment and the view are always compatible.
The files of the view's installed packages are brought into the view by symbolic or
hard links, referencing the original Spack installation, or by copy.
.. _configuring_environment_views:
"""""""""""""""""""""""""""""
Configuring environment views
"""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Configuration in ``spack.yaml``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Spack Environment manifest file has a top-level keyword
``view``. Each entry under that heading is a view descriptor, headed
by a name. The view descriptor contains the root of the view, and
``view``. Each entry under that heading is a **view descriptor**, headed
by a name. Any number of views may be defined under the ``view`` heading.
The view descriptor contains the root of the view, and
optionally the projections for the view, ``select`` and
``exclude`` lists for the view and link information via ``link`` and
``link_type``. For example, in the following manifest
``link_type``.
For example, in the following manifest
file snippet we define a view named ``mpis``, rooted at
``/path/to/view`` in which all projections use the package name,
version, and compiler name to determine the path for a given
package. This view selects all packages that depend on MPI, and
excludes those built with the PGI compiler at version 18.5.
All the dependencies of each root spec in the environment will be linked
in the view due to the command ``link: all`` and the files in the view will
be symlinks to the spack install directories.
The root specs with their (transitive) link and run type dependencies
will be put in the view due to the ``link: all`` option,
and the files in the view will be symlinks to the spack install
directories.
.. code-block:: yaml
@@ -758,16 +769,26 @@ be symlinks to the spack install directories.
link: all
link_type: symlink
For more information on using view projections, see the section on
:ref:`adding_projections_to_views`. The default for the ``select`` and
The default for the ``select`` and
``exclude`` values is to select everything and exclude nothing. The
default projection is the default view projection (``{}``). The ``link``
defaults to ``all`` but can also be ``roots`` when only the root specs
in the environment are desired in the view. The ``link_type`` defaults
to ``symlink`` but can also take the value of ``hardlink`` or ``copy``.
attribute allows the following values:
#. ``link: all`` include root specs with their transitive run and link type
dependencies (default);
#. ``link: run`` include root specs with their transitive run type dependencies;
#. ``link: roots`` include root specs without their dependencies.
The ``link_type`` defaults to ``symlink`` but can also take the value
of ``hardlink`` or ``copy``.
.. tip::
The option ``link: run`` can be used to create small environment views for
Python packages. Python will be able to import packages *inside* of the view even
when the environment is not activated, and linked libraries will be located
*outside* of the view thanks to rpaths.
Any number of views may be defined under the ``view`` heading in a
Spack Environment.
There are two shorthands for environments with a single view. If the
environment at ``/path/to/env`` has a single view, with a root at
@@ -833,9 +854,47 @@ regenerate`` will regenerate the views for the environment. This will
apply any updates in the environment configuration that have not yet
been applied.
""""""""""""""""""""""""""""
.. _view_projections:
""""""""""""""""
View Projections
""""""""""""""""
The default projection into a view is to link every package into the
root of the view. The projections attribute is a mapping of partial specs to
spec format strings, defined by the :meth:`~spack.spec.Spec.format`
function, as shown in the example below:
.. code-block:: yaml
projections:
zlib: {name}-{version}
^mpi: {name}-{version}/{^mpi.name}-{^mpi.version}-{compiler.name}-{compiler.version}
all: {name}-{version}/{compiler.name}-{compiler.version}
The entries in the projections configuration file must all be either
specs or the keyword ``all``. For each spec, the projection used will
be the first non-``all`` entry that the spec satisfies, or ``all`` if
there is an entry for ``all`` and no other entry is satisfied by the
spec. Where the keyword ``all`` appears in the file does not
matter.
Given the example above, the spec ``zlib@1.2.8``
will be linked into ``/my/view/zlib-1.2.8/``, the spec
``hdf5@1.8.10+mpi %gcc@4.9.3 ^mvapich2@2.2`` will be linked into
``/my/view/hdf5-1.8.10/mvapich2-2.2-gcc-4.9.3``, and the spec
``hdf5@1.8.10~mpi %gcc@4.9.3`` will be linked into
``/my/view/hdf5-1.8.10/gcc-4.9.3``.
If the keyword ``all`` does not appear in the projections
configuration file, any spec that does not satisfy any entry in the
file will be linked into the root of the view as in a single-prefix
view. Any entries that appear below the keyword ``all`` in the
projections configuration file will not be used, as all specs will use
the projection under ``all`` before reaching those entries.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Activating environment views
""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``spack env activate`` command will put the default view for the
environment into the user's path, in addition to activating the
@@ -869,3 +928,93 @@ environment.
The ``spack env deactivate`` command will remove the default view of
the environment from the user's path.
.. _env-generate-depfile:
------------------------------------------
Generating Depfiles from Environments
------------------------------------------
Spack can generate ``Makefile``\s to make it easier to build multiple
packages in an environment in parallel. Generated ``Makefile``\s expose
targets that can be included in existing ``Makefile``\s, to allow
other targets to depend on the environment installation.
A typical workflow is as follows:
.. code:: console
spack env create -d .
spack -e . add perl
spack -e . concretize
spack -e . env depfile > Makefile
make -j64
This generates a ``Makefile`` from a concretized environment in the
current working directory, and ``make -j64`` installs the environment,
exploiting parallelism across packages as much as possible. Spack
respects the Make jobserver and forwards it to the build environment
of packages, meaning that a single ``-j`` flag is enough to control the
load, even when packages are built in parallel.
By default the following phony convenience targets are available:
- ``make all``: installs the environment (default target);
- ``make fetch-all``: only fetch sources of all packages;
- ``make clean``: cleans files used by make, but does not uninstall packages.
.. tip::
GNU Make version 4.3 and above have great support for output synchronization
through the ``-O`` and ``--output-sync`` flags, which ensure that output is
printed orderly per package install. To get synchronized output with colors,
use ``make -j<N> SPACK_COLOR=always --output-sync=recurse``.
The following advanced example shows how generated targets can be used in a
``Makefile``:
.. code:: Makefile
SPACK ?= spack
.PHONY: all clean fetch env
all: env
spack.lock: spack.yaml
$(SPACK) -e . concretize -f
env.mk: spack.lock
$(SPACK) -e . env depfile -o $@ --make-target-prefix spack
fetch: spack/fetch
$(info Environment fetched!)
env: spack/env
$(info Environment installed!)
clean:
rm -rf spack.lock env.mk spack/
ifeq (,$(filter clean,$(MAKECMDGOALS)))
include env.mk
endif
When ``make`` is invoked, it first "remakes" the missing include ``env.mk``
from its rule, which triggers concretization. When done, the generated targets
``spack/fetch`` and ``spack/env`` are available. In the above
example, the ``env`` target uses the latter as a prerequisite, meaning
that it can make use of the installed packages in its commands.
As it is typically undesirable to remake ``env.mk`` as part of ``make clean``,
the include is conditional.
.. note::
When including generated ``Makefile``\s, it is important to use
the ``--make-target-prefix`` flag and use the non-phony targets
``<target-prefix>/env`` and ``<target-prefix>/fetch`` as
prerequisites, instead of the phony targets ``<target-prefix>/all``
and ``<target-prefix>/fetch-all`` respectively.

View File

@@ -149,27 +149,28 @@ Spack fall back to bootstrapping from sources:
.. code-block:: console
$ spack bootstrap untrust github-actions
==> "github-actions" is now untrusted and will not be used for bootstrapping
$ spack bootstrap untrust github-actions-v0.2
==> "github-actions-v0.2" is now untrusted and will not be used for bootstrapping
You can verify that the new settings are effective with:
.. code-block:: console
$ spack bootstrap list
Name: github-actions UNTRUSTED
Name: github-actions-v0.2 UNTRUSTED
Type: buildcache
Info:
url: https://mirror.spack.io/bootstrap/github-actions/v0.1
homepage: https://github.com/alalazo/spack-bootstrap-mirrors
releases: https://github.com/alalazo/spack-bootstrap-mirrors/releases
url: https://mirror.spack.io/bootstrap/github-actions/v0.2
homepage: https://github.com/spack/spack-bootstrap-mirrors
releases: https://github.com/spack/spack-bootstrap-mirrors/releases
Description:
Buildcache generated from a public workflow using Github Actions.
The sha256 checksum of binaries is checked before installation.
[ ... ]
Name: spack-install TRUSTED
@@ -1516,3 +1517,238 @@ To ensure that Spack does not autodetect the Cray programming
environment, unset the environment variable ``MODULEPATH``. This
will cause Spack to treat a linux container on a Cray system as a base
linux distro.
.. _windows_support:
----------------
Spack On Windows
----------------
Windows support for Spack is currently under development. While this work is still in an early stage,
it is currently possible to set up Spack and perform a few operations on Windows. This section will guide
you through the steps needed to install Spack and start running it on a fresh Windows machine.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Step 1: Install prerequisites
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To use Spack on Windows, you will need the following packages:
Required:
* Microsoft Visual Studio
* Python
* Git
Optional:
* Intel Fortran (needed for some packages)
.. note::
Currently MSVC is the only compiler tested for C/C++ projects. Intel OneAPI provides Fortran support.
"""""""""""""""""""""""
Microsoft Visual Studio
"""""""""""""""""""""""
Microsoft Visual Studio provides the only Windows C/C++ compiler that is currently supported by Spack.
We require several specific components to be included in the Visual Studio installation.
One is the C/C++ toolset, which can be selected as "Desktop development with C++" or "C++ build tools,"
depending on installation type (Professional, Build Tools, etc.) The other required component is
"C++ CMake tools for Windows," which can be selected from among the optional packages.
This provides CMake and Ninja for use during Spack configuration.
If you already have Visual Studio installed, you can make sure these components are installed by
rerunning the installer. Next to your installation, select "Modify" and look at the
"Installation details" pane on the right.
"""""""""""""
Intel Fortran
"""""""""""""
For Fortran-based packages on Windows, we strongly recommend Intel's oneAPI Fortran compilers.
The suite is free to download from Intel's website, located at
https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/fortran-compiler.html#gs.70t5tw.
The executable of choice for Spack will be Intel's Beta Compiler, ifx, which supports the classic
compiler's (ifort's) frontend and runtime libraries by using LLVM.
""""""
Python
""""""
As Spack is a Python-based package, an installation of Python will be needed to run it.
Python 3 can be downloaded and installed from the Windows Store, and will be automatically added
to your ``PATH`` in this case.
.. note::
Spack currently supports Python versions later than 3.2 inclusive.
"""
Git
"""
A bash console and GUI can be downloaded from https://git-scm.com/downloads.
If you are unfamiliar with Git, there are a myriad of resources online to help
guide you through checking out repositories and switching development branches.
When given the option of adjusting your ``PATH``, choose the ``Git from the
command line and also from 3rd-party software`` option. This will automatically
update your ``PATH`` variable to include the ``git`` command.
Spack support on Windows is currently dependent on installing the Git for Windows project
as the project providing Git support on Windows. This is additionally the recommended method
for installing Git on Windows, a link to which can be found above. Spack requires the
utilities vendored by this project.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Step 2: Install and setup Spack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We are now ready to get the Spack environment set up on our machine. We
begin by using Git to clone the Spack repo, hosted at https://github.com/spack/spack.git
into a desired directory, for our purposes today, called ``spack_install``.
In order to install Spack with Windows support, run the following one liner
in a Windows CMD prompt.
.. code-block:: console
git clone https://github.com/spack/spack.git
.. note::
If you chose to install Spack into a directory on Windows that is set up to require Administrative
Privleges, Spack will require elevated privleges to run.
Administrative Privleges can be denoted either by default such as
``C:\Program Files``, or aministrator applied administrative restrictions
on a directory that spack installs files to such as ``C:\Users``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Step 3: Run and configure Spack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To use Spack, run ``bin\spack_cmd.bat`` (you may need to Run as Administrator) from the top-level spack
directory. This will provide a Windows command prompt with an environment properly set up with Spack
and its prerequisites. If you receive a warning message that Python is not in your ``PATH``
(which may happen if you installed Python from the website and not the Windows Store) add the location
of the Python executable to your ``PATH`` now. You can permanently add Python to your ``PATH`` variable
by using the ``Edit the system environment variables`` utility in Windows Control Panel.
.. note::
Alternatively, Powershell can be used in place of CMD
To configure Spack, first run the following command inside the Spack console:
.. code-block:: console
spack compiler find
This creates a ``.staging`` directory in our Spack prefix, along with a ``windows`` subdirectory
containing a ``compilers.yaml`` file. On a fresh Windows install with the above packages
installed, this command should only detect Microsoft Visual Studio and the Intel Fortran
compiler will be integrated within the first version of MSVC present in the ``compilers.yaml``
output.
Spack provides a default ``config.yaml`` file for Windows that it will use unless overridden.
This file is located at ``etc\spack\defaults\windows\config.yaml``. You can read more on how to
do this and write your own configuration files in the :ref:`Configuration Files<configuration>` section of our
documentation. If you do this, pay particular attention to the ``build_stage`` block of the file
as this specifies the directory that will temporarily hold the source code for the packages to
be installed. This path name must be sufficiently short for compliance with cmd, otherwise you
will see build errors during installation (particularly with CMake) tied to long path names.
To allow Spack use of external tools and dependencies already on your system, the
external pieces of software must be described in the ``packages.yaml`` file.
There are two methods to populate this file:
The first and easiest choice is to use Spack to find installation on your system. In
the Spack terminal, run the following commands:
.. code-block:: console
spack external find cmake
spack external find ninja
The ``spack external find <name>`` will find executables on your system
with the same name given. The command will store the items found in
``packages.yaml`` in the ``.staging\`` directory.
Assuming that the command found CMake and Ninja executables in the previous
step, continue to Step 4. If no executables were found, we may need to manually direct spack towards the CMake
and Ninja installations we set up with Visual Studio. Therefore, your ``packages.yaml`` file will look something
like this, with possibly slight variants in the paths to CMake and Ninja:
.. code-block:: yaml
packages:
cmake:
externals:
- spec: cmake@3.19
prefix: 'c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake'
buildable: False
ninja:
externals:
- spec: ninja@1.8.2
prefix: 'c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja'
buildable: False
You can also use an separate installation of CMake if you have one and prefer
to use it. If you don't have a path to Ninja analogous to the above, then you can
obtain it by running the Visual Studio Installer and following the instructions
at the start of this section. Also note that .yaml files use spaces for indentation
and not tabs, so ensure that this is the case when editing one directly.
.. note:: Cygwin
The use of Cygwin is not officially supported by Spack and is not tested.
However Spack will not throw an error, so use if choosing to use Spack
with Cygwin, know that no functionality is garunteed.
^^^^^^^^^^^^^^^^^
Step 4: Use Spack
^^^^^^^^^^^^^^^^^
Once the configuration is complete, it is time to give the installation a test. Install a basic package though the
Spack console via:
.. code-block:: console
spack install cpuinfo
If in the previous step, you did not have CMake or Ninja installed, running the command above should boostrap both packages
"""""""""""""""""""""""""""
Windows Compatible Packages
"""""""""""""""""""""""""""
Many Spack packages are not currently compatible with Windows, due to Unix
dependencies or incompatible build tools like autoconf. Here are several
packages known to work on Windows:
* abseil-cpp
* clingo
* cpuinfo
* cmake
* glm
* nasm
* netlib-lapack (requires Intel Fortran)
* ninja
* openssl
* perl
* python
* ruby
* wrf
* zlib
.. note::
This is by no means a comprehensive list
^^^^^^^^^^^^^^
For developers
^^^^^^^^^^^^^^
The intent is to provide a Windows installer that will automatically set up
Python, Git, and Spack, instead of requiring the user to do so manually.
Instructions for creating the installer are at
https://github.com/spack/spack/blob/develop/lib/spack/spack/cmd/installer/README.md
Alternatively a pre-built copy of the Windows installer is available as an artifact of Spack's Windows CI

View File

@@ -54,9 +54,8 @@ or refer to the full manual below.
features
getting_started
basic_usage
workflows
Tutorial: Spack 101 <https://spack-tutorial.readthedocs.io>
known_issues
replace_conda_homebrew
.. toctree::
:maxdepth: 2

View File

@@ -1,77 +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)
============
Known Issues
============
This is a list of known bugs in Spack. It provides ways of getting around these
problems if you encounter them.
---------------------------------------------------
Variants are not properly forwarded to dependencies
---------------------------------------------------
**Status:** Expected to be fixed by Spack's new concretizer
Sometimes, a variant of a package can also affect how its dependencies are
built. For example, in order to build MPI support for a package, it may
require that its dependencies are also built with MPI support. In the
``package.py``, this looks like:
.. code-block:: python
depends_on('hdf5~mpi', when='~mpi')
depends_on('hdf5+mpi', when='+mpi')
Spack handles this situation properly for *immediate* dependencies, and
builds ``hdf5`` with the same variant you used for the package that
depends on it. However, for *indirect* dependencies (dependencies of
dependencies), Spack does not backtrack up the DAG far enough to handle
this. Users commonly run into this situation when trying to build R with
X11 support:
.. code-block:: console
$ spack install r+X
...
==> Error: Invalid spec: 'cairo@1.14.8%gcc@6.2.1+X arch=linux-fedora25-x86_64 ^bzip2@1.0.6%gcc@6.2.1+shared arch=linux-fedora25-x86_64 ^font-util@1.3.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^fontconfig@2.12.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^freetype@2.7.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^gettext@0.19.8.1%gcc@6.2.1+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-fedora25-x86_64 ^glib@2.53.1%gcc@6.2.1~libmount arch=linux-fedora25-x86_64 ^inputproto@2.3.2%gcc@6.2.1 arch=linux-fedora25-x86_64 ^kbproto@1.0.7%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libffi@3.2.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libpng@1.6.29%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libpthread-stubs@0.4%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libx11@1.6.5%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxau@1.0.8%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxcb@1.12%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxdmcp@1.1.2%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxext@1.3.3%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxml2@2.9.4%gcc@6.2.1~python arch=linux-fedora25-x86_64 ^libxrender@0.9.10%gcc@6.2.1 arch=linux-fedora25-x86_64 ^ncurses@6.0%gcc@6.2.1~symlinks arch=linux-fedora25-x86_64 ^openssl@1.0.2k%gcc@6.2.1 arch=linux-fedora25-x86_64 ^pcre@8.40%gcc@6.2.1+utf arch=linux-fedora25-x86_64 ^pixman@0.34.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^pkg-config@0.29.2%gcc@6.2.1+internal_glib arch=linux-fedora25-x86_64 ^python@2.7.13%gcc@6.2.1+shared~tk~ucs4 arch=linux-fedora25-x86_64 ^readline@7.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^renderproto@0.11.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^sqlite@3.18.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^tar^util-macros@1.19.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xcb-proto@1.12%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xextproto@7.3.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xproto@7.0.31%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xtrans@1.3.5%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xz@5.2.3%gcc@6.2.1 arch=linux-fedora25-x86_64 ^zlib@1.2.11%gcc@6.2.1+pic+shared arch=linux-fedora25-x86_64'.
Package cairo requires variant ~X, but spec asked for +X
A workaround is to explicitly activate the variants of dependencies as well:
.. code-block:: console
$ spack install r+X ^cairo+X ^pango+X
See https://github.com/spack/spack/issues/267 and
https://github.com/spack/spack/issues/2546 for further details.
-----------------------------------------------
depends_on cannot handle recursive dependencies
-----------------------------------------------
**Status:** Not yet a work in progress
Although ``depends_on`` can handle any aspect of Spack's spec syntax,
it currently cannot handle recursive dependencies. If the ``^`` sigil
appears in a ``depends_on`` statement, the concretizer will hang.
For example, something like:
.. code-block:: python
depends_on('mfem+cuda ^hypre+cuda', when='+cuda')
should be rewritten as:
.. code-block:: python
depends_on('mfem+cuda', when='+cuda')
depends_on('hypre+cuda', when='+cuda')
See https://github.com/spack/spack/issues/17660 and
https://github.com/spack/spack/issues/11160 for more details.

View File

@@ -5,9 +5,9 @@
.. _mirrors:
=======
Mirrors
=======
======================
Mirrors (mirrors.yaml)
======================
Some sites may not have access to the internet for fetching packages.
These sites will need a local repository of tarballs from which they

View File

@@ -5,9 +5,9 @@
.. _modules:
=======
Modules
=======
======================
Modules (modules.yaml)
======================
The use of module systems to manage user environment in a controlled way
is a common practice at HPC centers that is often embraced also by
@@ -181,10 +181,7 @@ to the environment variables listed below the folder name.
Spack modules can be configured for multiple module sets. The default
module set is named ``default``. All Spack commands which operate on
modules default to apply the ``default`` module set, but can be
applied to any module set in the configuration. Settings applied at
the root of the configuration (e.g. ``modules:enable`` rather than
``modules:default:enable``) are applied to the default module set for
backwards compatibility.
applied to any module set in the configuration.
"""""""""""""""""""""""""
Changing the modules root
@@ -378,7 +375,7 @@ most likely via the ``+blas`` variant specification.
The most heavyweight solution to module naming is to change the entire
naming convention for module files. This uses the projections format
covered in :ref:`adding_projections_to_views`.
covered in :ref:`view_projections`.
.. code-block:: yaml
@@ -540,8 +537,7 @@ configuration:
#. The configuration is for an :ref:`environment <environments>` and
will never be applied outside the environment,
#. The environment in question is configured to use a :ref:`view
<filesystem-views>`,
#. The environment in question is configured to use a view,
#. The :ref:`environment view is configured
<configuring_environment_views>` with a projection that ensures
every package is linked to a unique directory,

View File

@@ -1423,6 +1423,37 @@ other similar operations:
).with_default('auto').with_non_feature_values('auto'),
)
"""""""""""""""""""""""""""
Conditional Possible Values
"""""""""""""""""""""""""""
There are cases where a variant may take multiple values, and the list of allowed values
expand over time. Think for instance at the C++ standard with which we might compile
Boost, which can take one of multiple possible values with the latest standards
only available from a certain version on.
To model a similar situation we can use *conditional possible values* in the variant declaration:
.. code-block:: python
variant(
'cxxstd', default='98',
values=(
'98', '11', '14',
# C++17 is not supported by Boost < 1.63.0.
conditional('17', when='@1.63.0:'),
# C++20/2a is not support by Boost < 1.73.0
conditional('2a', '2b', when='@1.73.0:')
),
multi=False,
description='Use the specified C++ standard when building.',
)
The snippet above allows ``98``, ``11`` and ``14`` as unconditional possible values for the
``cxxstd`` variant, while ``17`` requires a version greater or equal to ``1.63.0``
and both ``2a`` and ``2b`` require a version greater or equal to ``1.73.0``.
^^^^^^^^^^^^^^^^^^^^
Conditional Variants
^^^^^^^^^^^^^^^^^^^^
@@ -2543,7 +2574,7 @@ from being linked in at activation time.
Views
-----
As covered in :ref:`filesystem-views`, the ``spack view`` command can be
The ``spack view`` command can be
used to symlink a number of packages into a merged prefix. The methods of
``PackageViewMixin`` can be overridden to customize how packages are added
to views. Generally this can be used to create copies of specific files rather

View File

@@ -0,0 +1,206 @@
.. 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)
=====================================
Using Spack to Replace Homebrew/Conda
=====================================
Spack is an incredibly powerful package manager, designed for supercomputers
where users have diverse installation needs. But Spack can also be used to
handle simple single-user installations on your laptop. Most macOS users are
already familiar with package managers like Homebrew and Conda, where all
installed packages are symlinked to a single central location like ``/usr/local``.
In this section, we will show you how to emulate the behavior of Homebrew/Conda
using :ref:`environments`!
-----
Setup
-----
First, let's create a new environment. We'll assume that Spack is already set up
correctly, and that you've already sourced the setup script for your shell.
To create a new environment, simply run:
.. code-block:: console
$ spack env create myenv
Here, *myenv* can be anything you want to name your environment. Next, we can add
a list of packages we would like to install into our environment. Let's say we
want a newer version of Bash than the one that comes with macOS, and we want a
few Python libraries. We can run:
.. code-block:: console
$ spack -e myenv add bash@5 python py-numpy py-scipy py-matplotlib
Each package can be listed on a separate line, or combined into a single line like we did above.
Notice that we're explicitly asking for Bash 5 here. You can use any spec
you would normally use on the command line with other Spack commands.
Next, we want to manually configure a couple of things:
.. code-block:: console
$ spack -e myenv config edit
.. code-block:: yaml
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs: [bash@5, python, py-numpy, py-scipy, py-matplotlib]
view: true
You can see the packages we added earlier in the ``specs:`` section. If you
ever want to add more packages, you can either use ``spack add`` or manually
edit this file.
We also need to change the ``concretization:`` option. By default, Spack
concretizes each spec *separately*, allowing multiple versions of the same
package to coexist. Since we want a single consistent environment, we want to
concretize all of the specs *together*.
Here is what your ``spack.yaml`` looks like with this new setting:
.. code-block:: yaml
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs: [bash@5, python, py-numpy, py-scipy, py-matplotlib]
view: true
concretization: together
^^^^^^^^^^^^^^^^
Symlink location
^^^^^^^^^^^^^^^^
Spack symlinks all installations to ``/Users/me/spack/var/spack/environments/myenv/.spack-env/view``,
which is the default when ``view: true``.
You can actually change this to any directory you want. For example, Homebrew
uses ``/usr/local``, while Conda uses ``/Users/me/anaconda``. In order to access
files in these locations, you need to update ``PATH`` and other environment variables
to point to them. Activating the Spack environment does this automatically, but
you can also manually set them in your ``.bashrc``.
.. warning::
There are several reasons why you shouldn't use ``/usr/local``:
1. If you are on macOS 10.11+ (El Capitan and newer), Apple makes it hard
for you. You may notice permissions issues on ``/usr/local`` due to their
`System Integrity Protection <https://support.apple.com/en-us/HT204899>`_.
By default, users don't have permissions to install anything in ``/usr/local``,
and you can't even change this using ``sudo chown`` or ``sudo chmod``.
2. Other package managers like Homebrew will try to install things to the
same directory. If you plan on using Homebrew in conjunction with Spack,
don't symlink things to ``/usr/local``.
3. If you are on a shared workstation, or don't have sudo privileges, you
can't do this.
If you still want to do this anyway, there are several ways around SIP.
You could disable SIP by booting into recovery mode and running
``csrutil disable``, but this is not recommended, as it can open up your OS
to security vulnerabilities. Another technique is to run ``spack concretize``
and ``spack install`` using ``sudo``. This is also not recommended.
The safest way I've found is to create your installation directories using
sudo, then change ownership back to the user like so:
.. code-block:: bash
for directory in .spack bin contrib include lib man share
do
sudo mkdir -p /usr/local/$directory
sudo chown $(id -un):$(id -gn) /usr/local/$directory
done
Depending on the packages you install in your environment, the exact list of
directories you need to create may vary. You may also find some packages
like Java libraries that install a single file to the installation prefix
instead of in a subdirectory. In this case, the action is the same, just replace
``mkdir -p`` with ``touch`` in the for-loop above.
But again, it's safer just to use the default symlink location.
------------
Installation
------------
To actually concretize the environment, run:
.. code-block:: console
$ spack -e myenv concretize
This will tell you which if any packages are already installed, and alert you
to any conflicting specs.
To actually install these packages and symlink them to your ``view:``
directory, simply run:
.. code-block:: console
$ spack -e myenv install
$ spack env activate myenv
Now, when you type ``which python3``, it should find the one you just installed.
In order to change the default shell to our newer Bash installation, we first
need to add it to this list of acceptable shells. Run:
.. code-block:: console
$ sudo vim /etc/shells
and add the absolute path to your bash executable. Then run:
.. code-block:: console
$ chsh -s /path/to/bash
Now, when you log out and log back in, ``echo $SHELL`` should point to the
newer version of Bash.
---------------------------
Updating Installed Packages
---------------------------
Let's say you upgraded to a new version of macOS, or a new version of Python
was released, and you want to rebuild your entire software stack. To do this,
simply run the following commands:
.. code-block:: console
$ spack env activate myenv
$ spack concretize --force
$ spack install
The ``--force`` flag tells Spack to overwrite its previous concretization
decisions, allowing you to choose a new version of Python. If any of the new
packages like Bash are already installed, ``spack install`` won't re-install
them, it will keep the symlinks in place.
--------------
Uninstallation
--------------
If you decide that Spack isn't right for you, uninstallation is simple.
Just run:
.. code-block:: console
$ spack env activate myenv
$ spack uninstall --all
This will uninstall all packages in your environment and remove the symlinks.

View File

@@ -5,9 +5,9 @@
.. _repositories:
=============================
Package Repositories
=============================
=================================
Package Repositories (repos.yaml)
=================================
Spack comes with thousands of built-in package recipes in
``var/spack/repos/builtin/``. This is a **package repository** -- a

View File

@@ -1,5 +1,5 @@
Name, Supported Versions, Notes, Requirement Reason
Python, 2.7/3.5-3.9, , Interpreter for Spack
Python, 2.7/3.5-3.10, , Interpreter for Spack
C/C++ Compilers, , , Building software
make, , , Build software
patch, , , Build software
1 Name Supported Versions Notes Requirement Reason
2 Python 2.7/3.5-3.9 2.7/3.5-3.10 Interpreter for Spack
3 C/C++ Compilers Building software
4 make Build software
5 patch Build software

File diff suppressed because it is too large Load Diff

8
lib/spack/env/cc vendored
View File

@@ -241,28 +241,28 @@ case "$command" in
mode=cpp
debug_flags="-g"
;;
cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc)
cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc|amdclang|cl.exe)
command="$SPACK_CC"
language="C"
comp="CC"
lang_flags=C
debug_flags="-g"
;;
c++|CC|g++|clang++|armclang++|icpc|icpx|dpcpp|pgc++|nvc++|xlc++|xlc++_r|FCC)
c++|CC|g++|clang++|armclang++|icpc|icpx|dpcpp|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++)
command="$SPACK_CXX"
language="C++"
comp="CXX"
lang_flags=CXX
debug_flags="-g"
;;
ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt)
ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt|amdflang)
command="$SPACK_FC"
language="Fortran 90"
comp="FC"
lang_flags=F
debug_flags="-g"
;;
f77|xlf|xlf_r|pgf77)
f77|xlf|xlf_r|pgf77|amdflang)
command="$SPACK_F77"
language="Fortran 77"
comp="F77"

1
lib/spack/env/rocmcc/amdclang vendored Symbolic link
View File

@@ -0,0 +1 @@
../cc

1
lib/spack/env/rocmcc/amdclang++ vendored Symbolic link
View File

@@ -0,0 +1 @@
../cpp

1
lib/spack/env/rocmcc/amdflang vendored Symbolic link
View File

@@ -0,0 +1 @@
../fc

View File

@@ -5,26 +5,36 @@
import collections
import errno
import glob
import grp
import hashlib
import itertools
import numbers
import os
import pwd
import re
import shutil
import stat
import sys
import tempfile
from contextlib import contextmanager
from sys import platform as _platform
import six
from llnl.util import tty
from llnl.util.compat import Sequence
from llnl.util.lang import dedupe, memoized
from llnl.util.symlink import symlink
from spack.util.executable import Executable
from spack.util.path import path_to_os_path, system_path_filter
is_windows = _platform == 'win32'
if not is_windows:
import grp
import pwd
else:
import win32security
__all__ = [
'FileFilter',
@@ -44,6 +54,7 @@
'fix_darwin_install_name',
'force_remove',
'force_symlink',
'getuid',
'chgrp',
'chmod_x',
'copy',
@@ -53,6 +64,7 @@
'is_exe',
'join_path',
'last_modification_time_recursive',
'library_extensions',
'mkdirp',
'partition_path',
'prefixes',
@@ -60,6 +72,7 @@
'remove_directory_contents',
'remove_if_dead_link',
'remove_linked_tree',
'rename',
'set_executable',
'set_install_permissions',
'touch',
@@ -71,18 +84,41 @@
]
def getuid():
if is_windows:
import ctypes
if ctypes.windll.shell32.IsUserAnAdmin() == 0:
return 1
return 0
else:
return os.getuid()
@system_path_filter
def rename(src, dst):
# On Windows, os.rename will fail if the destination file already exists
if is_windows:
if os.path.exists(dst):
os.remove(dst)
os.rename(src, dst)
@system_path_filter
def path_contains_subdirectory(path, root):
norm_root = os.path.abspath(root).rstrip(os.path.sep) + os.path.sep
norm_path = os.path.abspath(path).rstrip(os.path.sep) + os.path.sep
return norm_path.startswith(norm_root)
#: This generates the library filenames that may appear on any OS.
library_extensions = ['a', 'la', 'so', 'tbd', 'dylib']
def possible_library_filenames(library_names):
"""Given a collection of library names like 'libfoo', generate the set of
library filenames that may be found on the system (e.g. libfoo.so). This
generates the library filenames that may appear on any OS.
library filenames that may be found on the system (e.g. libfoo.so).
"""
lib_extensions = ['a', 'la', 'so', 'tbd', 'dylib']
lib_extensions = library_extensions
return set(
'.'.join((lib, extension)) for lib, extension in
itertools.product(library_names, lib_extensions))
@@ -95,6 +131,7 @@ def paths_containing_libs(paths, library_names):
required_lib_fnames = possible_library_filenames(library_names)
rpaths_to_include = []
paths = path_to_os_path(*paths)
for path in paths:
fnames = set(os.listdir(path))
if fnames & required_lib_fnames:
@@ -103,6 +140,7 @@ def paths_containing_libs(paths, library_names):
return rpaths_to_include
@system_path_filter
def same_path(path1, path2):
norm1 = os.path.abspath(path1).rstrip(os.path.sep)
norm2 = os.path.abspath(path2).rstrip(os.path.sep)
@@ -153,7 +191,7 @@ def groupid_to_group(x):
if string:
regex = re.escape(regex)
filenames = path_to_os_path(*filenames)
for filename in filenames:
msg = 'FILTER FILE: {0} [replacing "{1}"]'
@@ -263,13 +301,39 @@ def change_sed_delimiter(old_delim, new_delim, *filenames):
repl = r's@\1@\2@g'
repl = repl.replace('@', new_delim)
filenames = path_to_os_path(*filenames)
for f in filenames:
filter_file(whole_lines, repl, f)
filter_file(single_quoted, "'%s'" % repl, f)
filter_file(double_quoted, '"%s"' % repl, f)
@system_path_filter(arg_slice=slice(1))
def get_owner_uid(path, err_msg=None):
if not os.path.exists(path):
mkdirp(path, mode=stat.S_IRWXU)
p_stat = os.stat(path)
if p_stat.st_mode & stat.S_IRWXU != stat.S_IRWXU:
tty.error("Expected {0} to support mode {1}, but it is {2}"
.format(path, stat.S_IRWXU, p_stat.st_mode))
raise OSError(errno.EACCES,
err_msg.format(path, path) if err_msg else "")
else:
p_stat = os.stat(path)
if _platform != "win32":
owner_uid = p_stat.st_uid
else:
sid = win32security.GetFileSecurity(
path, win32security.OWNER_SECURITY_INFORMATION) \
.GetSecurityDescriptorOwner()
owner_uid = win32security.LookupAccountSid(None, sid)[0]
return owner_uid
@system_path_filter
def set_install_permissions(path):
"""Set appropriate permissions on the installed file."""
# If this points to a file maintained in a Spack prefix, it is assumed that
@@ -292,14 +356,22 @@ def group_ids(uid=None):
Returns:
(list of int): gids of groups the user is a member of
"""
if is_windows:
tty.warn("Function is not supported on Windows")
return []
if uid is None:
uid = os.getuid()
uid = getuid()
user = pwd.getpwuid(uid).pw_name
return [g.gr_gid for g in grp.getgrall() if user in g.gr_mem]
@system_path_filter(arg_slice=slice(1))
def chgrp(path, group):
"""Implement the bash chgrp function on a single path"""
if is_windows:
raise OSError("Function 'chgrp' is not supported on Windows")
if isinstance(group, six.string_types):
gid = grp.getgrnam(group).gr_gid
else:
@@ -307,6 +379,7 @@ def chgrp(path, group):
os.chown(path, -1, gid)
@system_path_filter(arg_slice=slice(1))
def chmod_x(entry, perms):
"""Implements chmod, treating all executable bits as set using the chmod
utility's `+X` option.
@@ -320,6 +393,7 @@ def chmod_x(entry, perms):
os.chmod(entry, perms)
@system_path_filter
def copy_mode(src, dest):
"""Set the mode of dest to that of src unless it is a link.
"""
@@ -336,6 +410,7 @@ def copy_mode(src, dest):
os.chmod(dest, dest_mode)
@system_path_filter
def unset_executable_mode(path):
mode = os.stat(path).st_mode
mode &= ~stat.S_IXUSR
@@ -344,6 +419,7 @@ def unset_executable_mode(path):
os.chmod(path, mode)
@system_path_filter
def copy(src, dest, _permissions=False):
"""Copy the file(s) *src* to the file or directory *dest*.
@@ -388,6 +464,7 @@ def copy(src, dest, _permissions=False):
copy_mode(src, dst)
@system_path_filter
def install(src, dest):
"""Install the file(s) *src* to the file or directory *dest*.
@@ -406,6 +483,7 @@ def install(src, dest):
copy(src, dest, _permissions=True)
@system_path_filter
def resolve_link_target_relative_to_the_link(link):
"""
os.path.isdir uses os.path.exists, which for links will check
@@ -420,6 +498,7 @@ def resolve_link_target_relative_to_the_link(link):
return os.path.join(link_dir, target)
@system_path_filter
def copy_tree(src, dest, symlinks=True, ignore=None, _permissions=False):
"""Recursively copy an entire directory tree rooted at *src*.
@@ -488,7 +567,7 @@ def copy_tree(src, dest, symlinks=True, ignore=None, _permissions=False):
.format(target, new_target))
target = new_target
os.symlink(target, d)
symlink(target, d)
elif os.path.isdir(link_target):
mkdirp(d)
else:
@@ -504,6 +583,7 @@ def copy_tree(src, dest, symlinks=True, ignore=None, _permissions=False):
copy_mode(s, d)
@system_path_filter
def install_tree(src, dest, symlinks=True, ignore=None):
"""Recursively install an entire directory tree rooted at *src*.
@@ -523,11 +603,13 @@ def install_tree(src, dest, symlinks=True, ignore=None):
copy_tree(src, dest, symlinks=symlinks, ignore=ignore, _permissions=True)
@system_path_filter
def is_exe(path):
"""True if path is an executable file."""
return os.path.isfile(path) and os.access(path, os.X_OK)
@system_path_filter
def get_filetype(path_name):
"""
Return the output of file path_name as a string to identify file type.
@@ -539,6 +621,30 @@ def get_filetype(path_name):
return output.strip()
@system_path_filter
def is_nonsymlink_exe_with_shebang(path):
"""
Returns whether the path is an executable script with a shebang.
Return False when the path is a *symlink* to an executable script.
"""
try:
st = os.lstat(path)
# Should not be a symlink
if stat.S_ISLNK(st.st_mode):
return False
# Should be executable
if not st.st_mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH):
return False
# Should start with a shebang
with open(path, 'rb') as f:
return f.read(2) == b'#!'
except (IOError, OSError):
return False
@system_path_filter(arg_slice=slice(1))
def chgrp_if_not_world_writable(path, group):
"""chgrp path to group if path is not world writable"""
mode = os.stat(path).st_mode
@@ -568,7 +674,7 @@ def mkdirp(*paths, **kwargs):
mode = kwargs.get('mode', None)
group = kwargs.get('group', None)
default_perms = kwargs.get('default_perms', 'args')
paths = path_to_os_path(*paths)
for path in paths:
if not os.path.exists(path):
try:
@@ -629,6 +735,7 @@ def mkdirp(*paths, **kwargs):
raise OSError(errno.EEXIST, "File already exists", path)
@system_path_filter
def force_remove(*paths):
"""Remove files without printing errors. Like ``rm -f``, does NOT
remove directories."""
@@ -640,6 +747,7 @@ def force_remove(*paths):
@contextmanager
@system_path_filter
def working_dir(dirname, **kwargs):
if kwargs.get('create', False):
mkdirp(dirname)
@@ -659,39 +767,37 @@ def __init__(self, inner_exception, outer_exception):
@contextmanager
def replace_directory_transaction(directory_name, tmp_root=None):
"""Moves a directory to a temporary space. If the operations executed
within the context manager don't raise an exception, the directory is
deleted. If there is an exception, the move is undone.
@system_path_filter
def replace_directory_transaction(directory_name):
"""Temporarily renames a directory in the same parent dir. If the operations
executed within the context manager don't raise an exception, the renamed directory
is deleted. If there is an exception, the move is undone.
Args:
directory_name (path): absolute path of the directory name
tmp_root (path): absolute path of the parent directory where to create
the temporary
Returns:
temporary directory where ``directory_name`` has been moved
"""
# Check the input is indeed a directory with absolute path.
# Raise before anything is done to avoid moving the wrong directory
assert os.path.isdir(directory_name), \
'Invalid directory: ' + directory_name
assert os.path.isabs(directory_name), \
'"directory_name" must contain an absolute path: ' + directory_name
directory_name = os.path.abspath(directory_name)
assert os.path.isdir(directory_name), 'Not a directory: ' + directory_name
directory_basename = os.path.basename(directory_name)
# Note: directory_name is normalized here, meaning the trailing slash is dropped,
# so dirname is the directory's parent not the directory itself.
tmpdir = tempfile.mkdtemp(
dir=os.path.dirname(directory_name),
prefix='.backup')
if tmp_root is not None:
assert os.path.isabs(tmp_root)
tmp_dir = tempfile.mkdtemp(dir=tmp_root)
tty.debug('Temporary directory created [{0}]'.format(tmp_dir))
shutil.move(src=directory_name, dst=tmp_dir)
tty.debug('Directory moved [src={0}, dest={1}]'.format(directory_name, tmp_dir))
# We have to jump through hoops to support Windows, since
# os.rename(directory_name, tmpdir) errors there.
backup_dir = os.path.join(tmpdir, 'backup')
os.rename(directory_name, backup_dir)
tty.debug('Directory moved [src={0}, dest={1}]'.format(directory_name, backup_dir))
try:
yield tmp_dir
yield backup_dir
except (Exception, KeyboardInterrupt, SystemExit) as inner_exception:
# Try to recover the original directory, if this fails, raise a
# composite exception.
@@ -699,10 +805,7 @@ def replace_directory_transaction(directory_name, tmp_root=None):
# Delete what was there, before copying back the original content
if os.path.exists(directory_name):
shutil.rmtree(directory_name)
shutil.move(
src=os.path.join(tmp_dir, directory_basename),
dst=os.path.dirname(directory_name)
)
os.rename(backup_dir, directory_name)
except Exception as outer_exception:
raise CouldNotRestoreDirectoryBackup(inner_exception, outer_exception)
@@ -710,10 +813,11 @@ def replace_directory_transaction(directory_name, tmp_root=None):
raise
else:
# Otherwise delete the temporary directory
shutil.rmtree(tmp_dir, ignore_errors=True)
tty.debug('Temporary directory deleted [{0}]'.format(tmp_dir))
shutil.rmtree(tmpdir, ignore_errors=True)
tty.debug('Temporary directory deleted [{0}]'.format(tmpdir))
@system_path_filter
def hash_directory(directory, ignore=[]):
"""Hashes recursively the content of a directory.
@@ -742,6 +846,7 @@ def hash_directory(directory, ignore=[]):
@contextmanager
@system_path_filter
def write_tmp_and_move(filename):
"""Write to a temporary file, then move into place."""
dirname = os.path.dirname(filename)
@@ -753,6 +858,7 @@ def write_tmp_and_move(filename):
@contextmanager
@system_path_filter
def open_if_filename(str_or_file, mode='r'):
"""Takes either a path or a file object, and opens it if it is a path.
@@ -765,9 +871,13 @@ def open_if_filename(str_or_file, mode='r'):
yield str_or_file
@system_path_filter
def touch(path):
"""Creates an empty file at the specified path."""
perms = (os.O_WRONLY | os.O_CREAT | os.O_NONBLOCK | os.O_NOCTTY)
if is_windows:
perms = (os.O_WRONLY | os.O_CREAT)
else:
perms = (os.O_WRONLY | os.O_CREAT | os.O_NONBLOCK | os.O_NOCTTY)
fd = None
try:
fd = os.open(path, perms)
@@ -777,6 +887,7 @@ def touch(path):
os.close(fd)
@system_path_filter
def touchp(path):
"""Like ``touch``, but creates any parent directories needed for the file.
"""
@@ -784,14 +895,16 @@ def touchp(path):
touch(path)
@system_path_filter
def force_symlink(src, dest):
try:
os.symlink(src, dest)
symlink(src, dest)
except OSError:
os.remove(dest)
os.symlink(src, dest)
symlink(src, dest)
@system_path_filter
def join_path(prefix, *args):
path = str(prefix)
for elt in args:
@@ -799,6 +912,7 @@ def join_path(prefix, *args):
return path
@system_path_filter
def ancestor(dir, n=1):
"""Get the nth ancestor of a directory."""
parent = os.path.abspath(dir)
@@ -807,6 +921,7 @@ def ancestor(dir, n=1):
return parent
@system_path_filter
def get_single_file(directory):
fnames = os.listdir(directory)
if len(fnames) != 1:
@@ -826,6 +941,7 @@ def temp_cwd():
@contextmanager
@system_path_filter
def temp_rename(orig_path, temp_path):
same_path = os.path.realpath(orig_path) == os.path.realpath(temp_path)
if not same_path:
@@ -837,11 +953,13 @@ def temp_rename(orig_path, temp_path):
shutil.move(temp_path, orig_path)
@system_path_filter
def can_access(file_name):
"""True if we have read/write access to the file."""
return os.access(file_name, os.R_OK | os.W_OK)
@system_path_filter
def traverse_tree(source_root, dest_root, rel_path='', **kwargs):
"""Traverse two filesystem trees simultaneously.
@@ -924,6 +1042,105 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs):
yield (source_path, dest_path)
def lexists_islink_isdir(path):
"""Computes the tuple (lexists(path), islink(path), isdir(path)) in a minimal
number of stat calls."""
# First try to lstat, so we know if it's a link or not.
try:
lst = os.lstat(path)
except (IOError, OSError):
return False, False, False
is_link = stat.S_ISLNK(lst.st_mode)
# Check whether file is a dir.
if not is_link:
is_dir = stat.S_ISDIR(lst.st_mode)
return True, is_link, is_dir
# Check whether symlink points to a dir.
try:
st = os.stat(path)
is_dir = stat.S_ISDIR(st.st_mode)
except (IOError, OSError):
# Dangling symlink (i.e. it lexists but not exists)
is_dir = False
return True, is_link, is_dir
def visit_directory_tree(root, visitor, rel_path='', depth=0):
"""
Recurses the directory root depth-first through a visitor pattern
The visitor interface is as follows:
- visit_file(root, rel_path, depth)
- before_visit_dir(root, rel_path, depth) -> bool
if True, descends into this directory
- before_visit_symlinked_dir(root, rel_path, depth) -> bool
if True, descends into this directory
- after_visit_dir(root, rel_path, depth) -> void
only called when before_visit_dir returns True
- after_visit_symlinked_dir(root, rel_path, depth) -> void
only called when before_visit_symlinked_dir returns True
"""
dir = os.path.join(root, rel_path)
if sys.version_info >= (3, 5, 0):
dir_entries = sorted(os.scandir(dir), key=lambda d: d.name) # novermin
else:
dir_entries = os.listdir(dir)
dir_entries.sort()
for f in dir_entries:
if sys.version_info >= (3, 5, 0):
rel_child = os.path.join(rel_path, f.name)
islink = f.is_symlink()
# On Windows, symlinks to directories are distinct from
# symlinks to files, and it is possible to create a
# broken symlink to a directory (e.g. using os.symlink
# without `target_is_directory=True`), invoking `isdir`
# on a symlink on Windows that is broken in this manner
# will result in an error. In this case we can work around
# the issue by reading the target and resolving the
# directory ourselves
try:
isdir = f.is_dir()
except OSError as e:
if is_windows and hasattr(e, 'winerror')\
and e.winerror == 5 and islink:
# if path is a symlink, determine destination and
# evaluate file vs directory
link_target = resolve_link_target_relative_to_the_link(f)
# link_target might be relative but
# resolve_link_target_relative_to_the_link
# will ensure that if so, that it is relative
# to the CWD and therefore
# makes sense
isdir = os.path.isdir(link_target)
else:
raise e
else:
rel_child = os.path.join(rel_path, f)
lexists, islink, isdir = lexists_islink_isdir(os.path.join(dir, f))
if not lexists:
continue
if not isdir:
# handle files
visitor.visit_file(root, rel_child, depth)
elif not islink and visitor.before_visit_dir(root, rel_child, depth):
# Handle ordinary directories
visit_directory_tree(root, visitor, rel_child, depth + 1)
visitor.after_visit_dir(root, rel_child, depth)
elif islink and visitor.before_visit_symlinked_dir(root, rel_child, depth):
# Handle symlinked directories
visit_directory_tree(root, visitor, rel_child, depth + 1)
visitor.after_visit_symlinked_dir(root, rel_child, depth)
@system_path_filter
def set_executable(path):
mode = os.stat(path).st_mode
if mode & stat.S_IRUSR:
@@ -935,6 +1152,7 @@ def set_executable(path):
os.chmod(path, mode)
@system_path_filter
def last_modification_time_recursive(path):
path = os.path.abspath(path)
times = [os.stat(path).st_mtime]
@@ -944,6 +1162,7 @@ def last_modification_time_recursive(path):
return max(times)
@system_path_filter
def remove_empty_directories(root):
"""Ascend up from the leaves accessible from `root` and remove empty
directories.
@@ -960,6 +1179,7 @@ def remove_empty_directories(root):
pass
@system_path_filter
def remove_dead_links(root):
"""Recursively removes any dead link that is present in root.
@@ -972,6 +1192,7 @@ def remove_dead_links(root):
remove_if_dead_link(path)
@system_path_filter
def remove_if_dead_link(path):
"""Removes the argument if it is a dead link.
@@ -982,24 +1203,65 @@ def remove_if_dead_link(path):
os.unlink(path)
def readonly_file_handler(ignore_errors=False):
# TODO: generate stages etc. with write permissions wherever
# so this callback is no-longer required
"""
Generate callback for shutil.rmtree to handle permissions errors on
Windows. Some files may unexpectedly lack write permissions even
though they were generated by Spack on behalf of the user (e.g. the
stage), so this callback will detect such cases and modify the
permissions if that is the issue. For other errors, the fallback
is either to raise (if ignore_errors is False) or ignore (if
ignore_errors is True). This is only intended for Windows systems
and will raise a separate error if it is ever invoked (by accident)
on a non-Windows system.
"""
def error_remove_readonly(func, path, exc):
if not is_windows:
raise RuntimeError("This method should only be invoked on Windows")
excvalue = exc[1]
if is_windows and func in (os.rmdir, os.remove, os.unlink) and\
excvalue.errno == errno.EACCES:
# change the file to be readable,writable,executable: 0777
os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
# retry
func(path)
elif not ignore_errors:
raise
return error_remove_readonly
@system_path_filter
def remove_linked_tree(path):
"""Removes a directory and its contents.
If the directory is a symlink, follows the link and removes the real
directory before removing the link.
This method will force-delete files on Windows
Parameters:
path (str): Directory to be removed
"""
kwargs = {'ignore_errors': True}
# Windows readonly files cannot be removed by Python
# directly.
if is_windows:
kwargs['ignore_errors'] = False
kwargs['onerror'] = readonly_file_handler(ignore_errors=True)
if os.path.exists(path):
if os.path.islink(path):
shutil.rmtree(os.path.realpath(path), True)
shutil.rmtree(os.path.realpath(path), **kwargs)
os.unlink(path)
else:
shutil.rmtree(path, True)
shutil.rmtree(path, **kwargs)
@contextmanager
@system_path_filter
def safe_remove(*files_or_dirs):
"""Context manager to remove the files passed as input, but restore
them in case any exception is raised in the context block.
@@ -1046,6 +1308,7 @@ def safe_remove(*files_or_dirs):
raise
@system_path_filter
def fix_darwin_install_name(path):
"""Fix install name of dynamic libraries on Darwin to have full path.
@@ -1132,6 +1395,7 @@ def find(root, files, recursive=True):
return _find_non_recursive(root, files)
@system_path_filter
def _find_recursive(root, search_files):
# The variable here is **on purpose** a defaultdict. The idea is that
@@ -1142,7 +1406,6 @@ def _find_recursive(root, search_files):
# Make the path absolute to have os.walk also return an absolute path
root = os.path.abspath(root)
for path, _, list_files in os.walk(root):
for search_file in search_files:
matches = glob.glob(os.path.join(path, search_file))
@@ -1156,6 +1419,7 @@ def _find_recursive(root, search_files):
return answer
@system_path_filter
def _find_non_recursive(root, search_files):
# The variable here is **on purpose** a defaultdict as os.list_dir
# can return files in any order (does not preserve stability)
@@ -1287,7 +1551,7 @@ def directories(self, value):
if isinstance(value, six.string_types):
value = [value]
self._directories = [os.path.normpath(x) for x in value]
self._directories = [path_to_os_path(os.path.normpath(x))[0] for x in value]
def _default_directories(self):
"""Default computation of directories based on the list of
@@ -1445,6 +1709,7 @@ def find_headers(headers, root, recursive=False):
return HeaderList(find(root, headers, recursive))
@system_path_filter
def find_all_headers(root):
"""Convenience function that returns the list of all headers found
in the directory passed as argument.
@@ -1672,6 +1937,7 @@ def find_libraries(libraries, root, shared=True, recursive=False):
return LibraryList(found_libs)
@system_path_filter
@memoized
def can_access_dir(path):
"""Returns True if the argument is an accessible directory.
@@ -1685,6 +1951,7 @@ def can_access_dir(path):
return os.path.isdir(path) and os.access(path, os.R_OK | os.X_OK)
@system_path_filter
@memoized
def can_write_to_dir(path):
"""Return True if the argument is a directory in which we can write.
@@ -1698,6 +1965,7 @@ def can_write_to_dir(path):
return os.path.isdir(path) and os.access(path, os.R_OK | os.X_OK | os.W_OK)
@system_path_filter
@memoized
def files_in(*search_paths):
"""Returns all the files in paths passed as arguments.
@@ -1719,6 +1987,12 @@ def files_in(*search_paths):
return files
def is_readable_file(file_path):
"""Return True if the path passed as argument is readable"""
return os.path.isfile(file_path) and os.access(file_path, os.R_OK)
@system_path_filter
def search_paths_for_executables(*path_hints):
"""Given a list of path hints returns a list of paths where
to search for an executable.
@@ -1746,6 +2020,39 @@ def search_paths_for_executables(*path_hints):
return executable_paths
@system_path_filter
def search_paths_for_libraries(*path_hints):
"""Given a list of path hints returns a list of paths where
to search for a shared library.
Args:
*path_hints (list of paths): list of paths taken into
consideration for a search
Returns:
A list containing the real path of every existing directory
in `path_hints` and its `lib` and `lib64` subdirectory if it exists.
"""
library_paths = []
for path in path_hints:
if not os.path.isdir(path):
continue
path = os.path.abspath(path)
library_paths.append(path)
lib_dir = os.path.join(path, 'lib')
if os.path.isdir(lib_dir):
library_paths.append(lib_dir)
lib64_dir = os.path.join(path, 'lib64')
if os.path.isdir(lib64_dir):
library_paths.append(lib64_dir)
return library_paths
@system_path_filter
def partition_path(path, entry=None):
"""
Split the prefixes of the path at the first occurrence of entry and
@@ -1762,7 +2069,11 @@ def partition_path(path, entry=None):
# Derive the index of entry within paths, which will correspond to
# the location of the entry in within the path.
try:
entries = path.split(os.sep)
sep = os.sep
entries = path.split(sep)
if entries[0].endswith(":"):
# Handle drive letters e.g. C:/ on Windows
entries[0] = entries[0] + sep
i = entries.index(entry)
if '' in entries:
i -= 1
@@ -1773,6 +2084,7 @@ def partition_path(path, entry=None):
return paths, '', []
@system_path_filter
def prefixes(path):
"""
Returns a list containing the path and its ancestors, top-to-bottom.
@@ -1786,6 +2098,9 @@ def prefixes(path):
For example, path ``./hi/jkl/mn`` results in a list with the following
paths, in order: ``./hi``, ``./hi/jkl``, and ``./hi/jkl/mn``.
On Windows, paths will be normalized to use ``/`` and ``/`` will always
be used as the separator instead of ``os.sep``.
Parameters:
path (str): the string used to derive ancestor paths
@@ -1794,14 +2109,17 @@ def prefixes(path):
"""
if not path:
return []
parts = path.strip(os.sep).split(os.sep)
if path.startswith(os.sep):
parts.insert(0, os.sep)
sep = os.sep
parts = path.strip(sep).split(sep)
if path.startswith(sep):
parts.insert(0, sep)
elif parts[0].endswith(":"):
# Handle drive letters e.g. C:/ on Windows
parts[0] = parts[0] + sep
paths = [os.path.join(*parts[:i + 1]) for i in range(len(parts))]
try:
paths.remove(os.sep)
paths.remove(sep)
except ValueError:
pass
@@ -1813,6 +2131,7 @@ def prefixes(path):
return paths
@system_path_filter
def md5sum(file):
"""Compute the MD5 sum of a file.
@@ -1828,6 +2147,7 @@ def md5sum(file):
return md5.digest()
@system_path_filter
def remove_directory_contents(dir):
"""Remove all contents of a directory."""
if os.path.exists(dir):
@@ -1839,6 +2159,7 @@ def remove_directory_contents(dir):
@contextmanager
@system_path_filter
def keep_modification_time(*filenames):
"""
Context manager to keep the modification timestamps of the input files.

View File

@@ -16,7 +16,7 @@
import six
from six import string_types
from llnl.util.compat import MutableMapping, zip_longest
from llnl.util.compat import MutableMapping, MutableSequence, zip_longest
# Ignore emacs backups when listing modules
ignore_modules = [r'^\.#', '~$']
@@ -589,20 +589,31 @@ def match(string):
return match
def dedupe(sequence):
"""Yields a stable de-duplication of an hashable sequence
def dedupe(sequence, key=None):
"""Yields a stable de-duplication of an hashable sequence by key
Args:
sequence: hashable sequence to be de-duplicated
key: callable applied on values before uniqueness test; identity
by default.
Returns:
stable de-duplication of the sequence
Examples:
Dedupe a list of integers:
[x for x in dedupe([1, 2, 1, 3, 2])] == [1, 2, 3]
[x for x in llnl.util.lang.dedupe([1,-2,1,3,2], key=abs)] == [1, -2, 3]
"""
seen = set()
for x in sequence:
if x not in seen:
x_key = x if key is None else key(x)
if x_key not in seen:
yield x
seen.add(x)
seen.add(x_key)
def pretty_date(time, now=None):
@@ -878,11 +889,6 @@ def load_module_from_file(module_name, module_path):
except KeyError:
pass
raise
elif sys.version_info[0] == 3 and sys.version_info[1] < 5:
import importlib.machinery
loader = importlib.machinery.SourceFileLoader( # novm
module_name, module_path)
module = loader.load_module()
elif sys.version_info[0] == 2:
import imp
module = imp.load_source(module_name, module_path)
@@ -956,3 +962,50 @@ def nullcontext(*args, **kwargs):
class UnhashableArguments(TypeError):
"""Raise when an @memoized function receives unhashable arg or kwarg values."""
def enum(**kwargs):
"""Return an enum-like class.
Args:
**kwargs: explicit dictionary of enums
"""
return type('Enum', (object,), kwargs)
class TypedMutableSequence(MutableSequence):
"""Base class that behaves like a list, just with a different type.
Client code can inherit from this base class:
class Foo(TypedMutableSequence):
pass
and later perform checks based on types:
if isinstance(l, Foo):
# do something
"""
def __init__(self, iterable):
self.data = list(iterable)
def __getitem__(self, item):
return self.data[item]
def __setitem__(self, key, value):
self.data[key] = value
def __delitem__(self, key):
del self.data[key]
def __len__(self):
return len(self.data)
def insert(self, index, item):
self.data.insert(index, item)
def __repr__(self):
return repr(self.data)
def __str__(self):
return str(self.data)

View File

@@ -10,9 +10,11 @@
import filecmp
import os
import shutil
from collections import OrderedDict
import llnl.util.tty as tty
from llnl.util.filesystem import mkdirp, touch, traverse_tree
from llnl.util.symlink import islink, symlink
__all__ = ['LinkTree']
@@ -20,7 +22,7 @@
def remove_link(src, dest):
if not os.path.islink(dest):
if not islink(dest):
raise ValueError("%s is not a link tree!" % dest)
# remove if dest is a hardlink/symlink to src; this will only
# be false if two packages are merged into a prefix and have a
@@ -29,6 +31,246 @@ def remove_link(src, dest):
os.remove(dest)
class MergeConflict:
"""
The invariant here is that src_a and src_b are both mapped
to dst:
project(src_a) == project(src_b) == dst
"""
def __init__(self, dst, src_a=None, src_b=None):
self.dst = dst
self.src_a = src_a
self.src_b = src_b
class SourceMergeVisitor(object):
"""
Visitor that produces actions:
- An ordered list of directories to create in dst
- A list of files to link in dst
- A list of merge conflicts in dst/
"""
def __init__(self, ignore=None):
self.ignore = ignore if ignore is not None else lambda f: False
# When mapping <src root> to <dst root>/<projection>, we need
# to prepend the <projection> bit to the relative path in the
# destination dir.
self.projection = ''
# When a file blocks another file, the conflict can sometimes
# be resolved / ignored (e.g. <prefix>/LICENSE or
# or <site-packages>/<namespace>/__init__.py conflicts can be
# ignored).
self.file_conflicts = []
# When we have to create a dir where a file is, or a file
# where a dir is, we have fatal errors, listed here.
self.fatal_conflicts = []
# What directories we have to make; this is an ordered set,
# so that we have a fast lookup and can run mkdir in order.
self.directories = OrderedDict()
# Files to link. Maps dst_rel to (src_rel, src_root)
self.files = OrderedDict()
def before_visit_dir(self, root, rel_path, depth):
"""
Register a directory if dst / rel_path is not blocked by a file or ignored.
"""
proj_rel_path = os.path.join(self.projection, rel_path)
if self.ignore(rel_path):
# Don't recurse when dir is ignored.
return False
elif proj_rel_path in self.files:
# Can't create a dir where a file is.
src_a_root, src_a_relpath = self.files[proj_rel_path]
self.fatal_conflicts.append(MergeConflict(
dst=proj_rel_path,
src_a=os.path.join(src_a_root, src_a_relpath),
src_b=os.path.join(root, rel_path)))
return False
elif proj_rel_path in self.directories:
# No new directory, carry on.
return True
else:
# Register new directory.
self.directories[proj_rel_path] = (root, rel_path)
return True
def after_visit_dir(self, root, rel_path, depth):
pass
def before_visit_symlinked_dir(self, root, rel_path, depth):
"""
Replace symlinked dirs with actual directories when possible in low depths,
otherwise handle it as a file (i.e. we link to the symlink).
Transforming symlinks into dirs makes it more likely we can merge directories,
e.g. when <prefix>/lib -> <prefix>/subdir/lib.
We only do this when the symlink is pointing into a subdirectory from the
symlink's directory, to avoid potential infinite recursion; and only at a
constant level of nesting, to avoid potential exponential blowups in file
duplication.
"""
if self.ignore(rel_path):
return False
# Only follow symlinked dirs in <prefix>/**/**/*
if depth > 1:
handle_as_dir = False
else:
# Only follow symlinked dirs when pointing deeper
src = os.path.join(root, rel_path)
real_parent = os.path.realpath(os.path.dirname(src))
real_child = os.path.realpath(src)
handle_as_dir = real_child.startswith(real_parent)
if handle_as_dir:
return self.before_visit_dir(root, rel_path, depth)
self.visit_file(root, rel_path, depth)
return False
def after_visit_symlinked_dir(self, root, rel_path, depth):
pass
def visit_file(self, root, rel_path, depth):
proj_rel_path = os.path.join(self.projection, rel_path)
if self.ignore(rel_path):
pass
elif proj_rel_path in self.directories:
# Can't create a file where a dir is; fatal error
src_a_root, src_a_relpath = self.directories[proj_rel_path]
self.fatal_conflicts.append(MergeConflict(
dst=proj_rel_path,
src_a=os.path.join(src_a_root, src_a_relpath),
src_b=os.path.join(root, rel_path)))
elif proj_rel_path in self.files:
# In some cases we can resolve file-file conflicts
src_a_root, src_a_relpath = self.files[proj_rel_path]
self.file_conflicts.append(MergeConflict(
dst=proj_rel_path,
src_a=os.path.join(src_a_root, src_a_relpath),
src_b=os.path.join(root, rel_path)))
else:
# Otherwise register this file to be linked.
self.files[proj_rel_path] = (root, rel_path)
def set_projection(self, projection):
self.projection = os.path.normpath(projection)
# Todo, is this how to check in general for empty projection?
if self.projection == '.':
self.projection = ''
return
# If there is a projection, we'll also create the directories
# it consists of, and check whether that's causing conflicts.
path = ''
for part in self.projection.split(os.sep):
path = os.path.join(path, part)
if path not in self.files:
self.directories[path] = ('<projection>', path)
else:
# Can't create a dir where a file is.
src_a_root, src_a_relpath = self.files[path]
self.fatal_conflicts.append(MergeConflict(
dst=path,
src_a=os.path.join(src_a_root, src_a_relpath),
src_b=os.path.join('<projection>', path)))
class DestinationMergeVisitor(object):
"""DestinatinoMergeVisitor takes a SourceMergeVisitor
and:
a. registers additional conflicts when merging
to the destination prefix
b. removes redundant mkdir operations when
directories already exist in the destination
prefix.
This also makes sure that symlinked directories
in the target prefix will never be merged with
directories in the sources directories.
"""
def __init__(self, source_merge_visitor):
self.src = source_merge_visitor
def before_visit_dir(self, root, rel_path, depth):
# If destination dir is a file in a src dir, add a conflict,
# and don't traverse deeper
if rel_path in self.src.files:
src_a_root, src_a_relpath = self.src.files[rel_path]
self.src.fatal_conflicts.append(MergeConflict(
rel_path,
os.path.join(src_a_root, src_a_relpath),
os.path.join(root, rel_path)))
return False
# If destination dir was also a src dir, remove the mkdir
# action, and traverse deeper.
if rel_path in self.src.directories:
del self.src.directories[rel_path]
return True
# If the destination dir does not appear in the src dir,
# don't descend into it.
return False
def after_visit_dir(self, root, rel_path, depth):
pass
def before_visit_symlinked_dir(self, root, rel_path, depth):
"""
Symlinked directories in the destination prefix should
be seen as files; we should not accidentally merge
source dir with a symlinked dest dir.
"""
# Always conflict
if rel_path in self.src.directories:
src_a_root, src_a_relpath = self.src.directories[rel_path]
self.src.fatal_conflicts.append(MergeConflict(
rel_path,
os.path.join(src_a_root, src_a_relpath),
os.path.join(root, rel_path)))
if rel_path in self.src.files:
src_a_root, src_a_relpath = self.src.files[rel_path]
self.src.fatal_conflicts.append(MergeConflict(
rel_path,
os.path.join(src_a_root, src_a_relpath),
os.path.join(root, rel_path)))
# Never descend into symlinked target dirs.
return False
def after_visit_symlinked_dir(self, root, rel_path, depth):
pass
def visit_file(self, root, rel_path, depth):
# Can't merge a file if target already exists
if rel_path in self.src.directories:
src_a_root, src_a_relpath = self.src.directories[rel_path]
self.src.fatal_conflicts.append(MergeConflict(
rel_path,
os.path.join(src_a_root, src_a_relpath),
os.path.join(root, rel_path)))
elif rel_path in self.src.files:
src_a_root, src_a_relpath = self.src.files[rel_path]
self.src.fatal_conflicts.append(MergeConflict(
rel_path,
os.path.join(src_a_root, src_a_relpath),
os.path.join(root, rel_path)))
class LinkTree(object):
"""Class to create trees of symbolic links from a source directory.
@@ -113,7 +355,7 @@ def unmerge_directories(self, dest_root, ignore):
os.remove(marker)
def merge(self, dest_root, ignore_conflicts=False, ignore=None,
link=os.symlink, relative=False):
link=symlink, relative=False):
"""Link all files in src into dest, creating directories
if necessary.
@@ -125,7 +367,7 @@ def merge(self, dest_root, ignore_conflicts=False, ignore=None,
ignore (callable): callable that returns True if a file is to be
ignored in the merge (by default ignore nothing)
link (callable): function to create links with (defaults to os.symlink)
link (callable): function to create links with (defaults to llnl.util.symlink)
relative (bool): create all symlinks relative to the target
(default False)
@@ -137,7 +379,7 @@ def merge(self, dest_root, ignore_conflicts=False, ignore=None,
conflict = self.find_conflict(
dest_root, ignore=ignore, ignore_file_conflicts=ignore_conflicts)
if conflict:
raise MergeConflictError(conflict)
raise SingleMergeConflictError(conflict)
self.merge_directories(dest_root, ignore)
existing = []
@@ -169,7 +411,24 @@ def unmerge(self, dest_root, ignore=None, remove_file=remove_link):
class MergeConflictError(Exception):
pass
class SingleMergeConflictError(MergeConflictError):
def __init__(self, path):
super(MergeConflictError, self).__init__(
"Package merge blocked by file: %s" % path)
class MergeConflictSummary(MergeConflictError):
def __init__(self, conflicts):
"""
A human-readable summary of file system view merge conflicts (showing only the
first 3 issues.)
"""
msg = "{0} fatal error(s) when merging prefixes:".format(len(conflicts))
# show the first 3 merge conflicts.
for conflict in conflicts[:3]:
msg += "\n `{0}` and `{1}` both project to `{2}`".format(
conflict.src_a, conflict.src_b, conflict.dst)
super(MergeConflictSummary, self).__init__(msg)

View File

@@ -4,9 +4,9 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import errno
import fcntl
import os
import socket
import sys
import time
from datetime import datetime
from typing import Dict, Tuple # novm
@@ -15,6 +15,10 @@
import spack.util.string
if sys.platform != 'win32':
import fcntl
__all__ = [
'Lock',
'LockDowngradeError',
@@ -29,8 +33,6 @@
'CantCreateLockError'
]
#: Mapping of supported locks to description
lock_type = {fcntl.LOCK_SH: 'read', fcntl.LOCK_EX: 'write'}
#: A useful replacement for functions that should return True when not provided
#: for example.
@@ -166,6 +168,30 @@ def _attempts_str(wait_time, nattempts):
return ' after {0:0.2f}s and {1}'.format(wait_time, attempts)
class LockType(object):
READ = 0
WRITE = 1
@staticmethod
def to_str(tid):
ret = "READ"
if tid == LockType.WRITE:
ret = "WRITE"
return ret
@staticmethod
def to_module(tid):
lock = fcntl.LOCK_SH
if tid == LockType.WRITE:
lock = fcntl.LOCK_EX
return lock
@staticmethod
def is_valid(op):
return op == LockType.READ \
or op == LockType.WRITE
class Lock(object):
"""This is an implementation of a filesystem lock using Python's lockf.
@@ -276,9 +302,10 @@ def _lock(self, op, timeout=None):
successfully acquired, the total wait time and the number of attempts
is returned.
"""
assert op in lock_type
assert LockType.is_valid(op)
op_str = LockType.to_str(op)
self._log_acquiring('{0} LOCK'.format(lock_type[op].upper()))
self._log_acquiring('{0} LOCK'.format(op_str))
timeout = timeout or self.default_timeout
# Create file and parent directories if they don't exist.
@@ -286,13 +313,13 @@ def _lock(self, op, timeout=None):
self._ensure_parent_directory()
self._file = file_tracker.get_fh(self.path)
if op == fcntl.LOCK_EX and self._file.mode == 'r':
if LockType.to_module(op) == fcntl.LOCK_EX and self._file.mode == 'r':
# Attempt to upgrade to write lock w/a read-only file.
# If the file were writable, we'd have opened it 'r+'
raise LockROFileError(self.path)
self._log_debug("{0} locking [{1}:{2}]: timeout {3} sec"
.format(lock_type[op], self._start, self._length,
.format(op_str.lower(), self._start, self._length,
timeout))
poll_intervals = iter(Lock._poll_interval_generator())
@@ -313,17 +340,16 @@ def _lock(self, op, timeout=None):
return total_wait_time, num_attempts
raise LockTimeoutError("Timed out waiting for a {0} lock."
.format(lock_type[op]))
.format(op_str.lower()))
def _poll_lock(self, op):
"""Attempt to acquire the lock in a non-blocking manner. Return whether
the locking attempt succeeds
"""
assert op in lock_type
module_op = LockType.to_module(op)
try:
# Try to get the lock (will raise if not available.)
fcntl.lockf(self._file, op | fcntl.LOCK_NB,
fcntl.lockf(self._file, module_op | fcntl.LOCK_NB,
self._length, self._start, os.SEEK_SET)
# help for debugging distributed locking
@@ -331,11 +357,11 @@ def _poll_lock(self, op):
# All locks read the owner PID and host
self._read_log_debug_data()
self._log_debug('{0} locked {1} [{2}:{3}] (owner={4})'
.format(lock_type[op], self.path,
.format(LockType.to_str(op), self.path,
self._start, self._length, self.pid))
# Exclusive locks write their PID/host
if op == fcntl.LOCK_EX:
if module_op == fcntl.LOCK_EX:
self._write_log_debug_data()
return True
@@ -420,7 +446,7 @@ def acquire_read(self, timeout=None):
if self._reads == 0 and self._writes == 0:
# can raise LockError.
wait_time, nattempts = self._lock(fcntl.LOCK_SH, timeout=timeout)
wait_time, nattempts = self._lock(LockType.READ, timeout=timeout)
self._reads += 1
# Log if acquired, which includes counts when verbose
self._log_acquired('READ LOCK', wait_time, nattempts)
@@ -445,7 +471,7 @@ def acquire_write(self, timeout=None):
if self._writes == 0:
# can raise LockError.
wait_time, nattempts = self._lock(fcntl.LOCK_EX, timeout=timeout)
wait_time, nattempts = self._lock(LockType.WRITE, timeout=timeout)
self._writes += 1
# Log if acquired, which includes counts when verbose
self._log_acquired('WRITE LOCK', wait_time, nattempts)
@@ -489,7 +515,7 @@ def downgrade_write_to_read(self, timeout=None):
if self._writes == 1 and self._reads == 0:
self._log_downgrading()
# can raise LockError.
wait_time, nattempts = self._lock(fcntl.LOCK_SH, timeout=timeout)
wait_time, nattempts = self._lock(LockType.READ, timeout=timeout)
self._reads = 1
self._writes = 0
self._log_downgraded(wait_time, nattempts)
@@ -508,7 +534,7 @@ def upgrade_read_to_write(self, timeout=None):
if self._reads == 1 and self._writes == 0:
self._log_upgrading()
# can raise LockError.
wait_time, nattempts = self._lock(fcntl.LOCK_EX, timeout=timeout)
wait_time, nattempts = self._lock(LockType.WRITE, timeout=timeout)
self._reads = 0
self._writes = 1
self._log_upgraded(wait_time, nattempts)
@@ -592,6 +618,12 @@ def release_write(self, release_fn=None):
else:
return False
def cleanup(self):
if self._reads == 0 and self._writes == 0:
os.unlink(self.path)
else:
raise LockError("Attempting to cleanup active lock.")
def _get_counts_desc(self):
return '(reads {0}, writes {1})'.format(self._reads, self._writes) \
if tty.is_verbose() else ''

View File

@@ -0,0 +1,112 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import errno
import os
import shutil
import tempfile
from os.path import exists, join
from sys import platform as _platform
from llnl.util import lang
is_windows = _platform == 'win32'
if is_windows:
from win32file import CreateHardLink
def symlink(real_path, link_path):
"""
Create a symbolic link.
On Windows, use junctions if os.symlink fails.
"""
if not is_windows or _win32_can_symlink():
os.symlink(real_path, link_path)
else:
try:
# Try to use junctions
_win32_junction(real_path, link_path)
except OSError:
# If all else fails, fall back to copying files
shutil.copyfile(real_path, link_path)
def islink(path):
return os.path.islink(path) or _win32_is_junction(path)
# '_win32' functions based on
# https://github.com/Erotemic/ubelt/blob/master/ubelt/util_links.py
def _win32_junction(path, link):
# junctions require absolute paths
if not os.path.isabs(link):
link = os.path.abspath(link)
# os.symlink will fail if link exists, emulate the behavior here
if exists(link):
raise OSError(errno.EEXIST, 'File exists: %s -> %s' % (link, path))
if not os.path.isabs(path):
parent = os.path.join(link, os.pardir)
path = os.path.join(parent, path)
path = os.path.abspath(path)
CreateHardLink(link, path)
@lang.memoized
def _win32_can_symlink():
tempdir = tempfile.mkdtemp()
dpath = join(tempdir, 'dpath')
fpath = join(tempdir, 'fpath.txt')
dlink = join(tempdir, 'dlink')
flink = join(tempdir, 'flink.txt')
import llnl.util.filesystem as fs
fs.touchp(fpath)
try:
os.symlink(dpath, dlink)
can_symlink_directories = os.path.islink(dlink)
except OSError:
can_symlink_directories = False
try:
os.symlink(fpath, flink)
can_symlink_files = os.path.islink(flink)
except OSError:
can_symlink_files = False
# Cleanup the test directory
shutil.rmtree(tempdir)
return can_symlink_directories and can_symlink_files
def _win32_is_junction(path):
"""
Determines if a path is a win32 junction
"""
if os.path.islink(path):
return False
if is_windows:
import ctypes.wintypes
GetFileAttributes = ctypes.windll.kernel32.GetFileAttributesW
GetFileAttributes.argtypes = (ctypes.wintypes.LPWSTR,)
GetFileAttributes.restype = ctypes.wintypes.DWORD
INVALID_FILE_ATTRIBUTES = 0xFFFFFFFF
FILE_ATTRIBUTE_REPARSE_POINT = 0x400
res = GetFileAttributes(path)
return res != INVALID_FILE_ATTRIBUTES and \
bool(res & FILE_ATTRIBUTE_REPARSE_POINT)
return False

View File

@@ -6,19 +6,22 @@
from __future__ import unicode_literals
import contextlib
import fcntl
import os
import struct
import sys
import termios
import textwrap
import traceback
from datetime import datetime
from sys import platform as _platform
import six
from six import StringIO
from six.moves import input
if _platform != "win32":
import fcntl
import termios
from llnl.util.tty.color import cescape, clen, cprint, cwrite
# Globals
@@ -143,7 +146,7 @@ def process_stacktrace(countback):
file_list = []
for frame in st:
# Check that the file is a spack file
if frame[0].find("/spack") >= 0:
if frame[0].find(os.path.sep + "spack") >= 0:
file_list.append(frame[0])
# We use commonprefix to find what the spack 'root' directory is.
root_dir = os.path.commonprefix(file_list)
@@ -370,22 +373,29 @@ def hline(label=None, **kwargs):
def terminal_size():
"""Gets the dimensions of the console: (rows, cols)."""
def ioctl_gwinsz(fd):
try:
rc = struct.unpack('hh', fcntl.ioctl(
fd, termios.TIOCGWINSZ, '1234'))
except BaseException:
return
return rc
rc = ioctl_gwinsz(0) or ioctl_gwinsz(1) or ioctl_gwinsz(2)
if not rc:
try:
fd = os.open(os.ctermid(), os.O_RDONLY)
rc = ioctl_gwinsz(fd)
os.close(fd)
except BaseException:
pass
if not rc:
rc = (os.environ.get('LINES', 25), os.environ.get('COLUMNS', 80))
if _platform != "win32":
def ioctl_gwinsz(fd):
try:
rc = struct.unpack('hh', fcntl.ioctl(
fd, termios.TIOCGWINSZ, '1234'))
except BaseException:
return
return rc
rc = ioctl_gwinsz(0) or ioctl_gwinsz(1) or ioctl_gwinsz(2)
if not rc:
try:
fd = os.open(os.ctermid(), os.O_RDONLY)
rc = ioctl_gwinsz(fd)
os.close(fd)
except BaseException:
pass
if not rc:
rc = (os.environ.get('LINES', 25), os.environ.get('COLUMNS', 80))
return int(rc[0]), int(rc[1])
return int(rc[0]), int(rc[1])
else:
if sys.version_info[0] < 3:
raise RuntimeError("Terminal size not obtainable on Windows with a\
Python version older than 3")
rc = (os.environ.get('LINES', 25), os.environ.get('COLUMNS', 80))
return int(rc[0]), int(rc[1])

View File

@@ -8,15 +8,19 @@
from __future__ import unicode_literals
import atexit
import ctypes
import errno
import io
import multiprocessing
import os
import re
import select
import signal
import sys
import threading
import traceback
from contextlib import contextmanager
from threading import Thread
from types import ModuleType # novm
from typing import Optional # novm
@@ -399,7 +403,7 @@ def replace_environment(env):
os.environ[name] = val
class log_output(object):
def log_output(*args, **kwargs):
"""Context manager that logs its output to a file.
In the simplest case, the usage looks like this::
@@ -414,6 +418,7 @@ class log_output(object):
with log_output('logfile.txt', echo=True):
# do things ... output will be logged and printed out
The following is available on Unix only. No-op on Windows.
And, if you just want to echo *some* stuff from the parent, use
``force_echo``::
@@ -423,6 +428,20 @@ class log_output(object):
with logger.force_echo():
# things here will be echoed *and* logged
See individual log classes for more information.
This method is actually a factory serving a per platform
(unix vs windows) log_output class
"""
if sys.platform == 'win32':
return winlog(*args, **kwargs)
else:
return nixlog(*args, **kwargs)
class nixlog(object):
"""
Under the hood, we spawn a daemon and set up a pipe between this
process and the daemon. The daemon writes our output to both the
file and to stdout (if echoing). The parent process can communicate
@@ -564,7 +583,7 @@ def __enter__(self):
sys.stdout.flush()
sys.stderr.flush()
# Now do the actual output rediction.
# Now do the actual output redirection.
self.use_fds = _file_descriptors_work(sys.stdout, sys.stderr)
if self.use_fds:
# We try first to use OS-level file descriptors, as this
@@ -671,6 +690,175 @@ def force_echo(self):
sys.stdout.flush()
class StreamWrapper:
""" Wrapper class to handle redirection of io streams """
def __init__(self, sys_attr):
self.sys_attr = sys_attr
self.saved_stream = None
if sys.platform.startswith('win32'):
if sys.version_info < (3, 5):
libc = ctypes.CDLL(ctypes.util.find_library('c'))
else:
if hasattr(sys, 'gettotalrefcount'): # debug build
libc = ctypes.CDLL('ucrtbased')
else:
libc = ctypes.CDLL('api-ms-win-crt-stdio-l1-1-0')
kernel32 = ctypes.WinDLL('kernel32')
# https://docs.microsoft.com/en-us/windows/console/getstdhandle
if self.sys_attr == 'stdout':
STD_HANDLE = -11
elif self.sys_attr == 'stderr':
STD_HANDLE = -12
else:
raise KeyError(self.sys_attr)
c_stdout = kernel32.GetStdHandle(STD_HANDLE)
self.libc = libc
self.c_stream = c_stdout
else:
self.libc = ctypes.CDLL(None)
self.c_stream = ctypes.c_void_p.in_dll(self.libc, self.sys_attr)
self.sys_stream = getattr(sys, self.sys_attr)
self.orig_stream_fd = self.sys_stream.fileno()
# Save a copy of the original stdout fd in saved_stream
self.saved_stream = os.dup(self.orig_stream_fd)
def redirect_stream(self, to_fd):
"""Redirect stdout to the given file descriptor."""
# Flush the C-level buffer stream
if sys.platform.startswith('win32'):
self.libc.fflush(None)
else:
self.libc.fflush(self.c_stream)
# Flush and close sys_stream - also closes the file descriptor (fd)
sys_stream = getattr(sys, self.sys_attr)
sys_stream.flush()
sys_stream.close()
# Make orig_stream_fd point to the same file as to_fd
os.dup2(to_fd, self.orig_stream_fd)
# Set sys_stream to a new stream that points to the redirected fd
new_buffer = open(self.orig_stream_fd, 'wb')
new_stream = io.TextIOWrapper(new_buffer)
setattr(sys, self.sys_attr, new_stream)
self.sys_stream = getattr(sys, self.sys_attr)
def flush(self):
if sys.platform.startswith('win32'):
self.libc.fflush(None)
else:
self.libc.fflush(self.c_stream)
self.sys_stream.flush()
def close(self):
"""Redirect back to the original system stream, and close stream"""
try:
if self.saved_stream is not None:
self.redirect_stream(self.saved_stream)
finally:
if self.saved_stream is not None:
os.close(self.saved_stream)
class winlog(object):
"""
Similar to nixlog, with underlying
functionality ported to support Windows.
Does not support the use of 'v' toggling as nixlog does.
"""
def __init__(self, file_like=None, echo=False, debug=0, buffer=False,
env=None, filter_fn=None):
self.env = env
self.debug = debug
self.echo = echo
self.logfile = file_like
self.stdout = StreamWrapper('stdout')
self.stderr = StreamWrapper('stderr')
self._active = False
self._ioflag = False
self.old_stdout = sys.stdout
self.old_stderr = sys.stderr
def __enter__(self):
if self._active:
raise RuntimeError("Can't re-enter the same log_output!")
if self.logfile is None:
raise RuntimeError(
"file argument must be set by __init__ ")
# Open both write and reading on logfile
if type(self.logfile) == StringIO:
self._ioflag = True
# cannot have two streams on tempfile, so we must make our own
sys.stdout = self.logfile
sys.stderr = self.logfile
else:
self.writer = open(self.logfile, mode='wb+')
self.reader = open(self.logfile, mode='rb+')
# Dup stdout so we can still write to it after redirection
self.echo_writer = open(os.dup(sys.stdout.fileno()), "w")
# Redirect stdout and stderr to write to logfile
self.stderr.redirect_stream(self.writer.fileno())
self.stdout.redirect_stream(self.writer.fileno())
self._kill = threading.Event()
def background_reader(reader, echo_writer, _kill):
# for each line printed to logfile, read it
# if echo: write line to user
try:
while True:
is_killed = _kill.wait(.1)
# Flush buffered build output to file
# stdout/err fds refer to log file
self.stderr.flush()
self.stdout.flush()
line = reader.readline()
if self.echo and line:
echo_writer.write('{0}'.format(line.decode()))
echo_writer.flush()
if is_killed:
break
finally:
reader.close()
self._active = True
with replace_environment(self.env):
self._thread = Thread(target=background_reader,
args=(self.reader, self.echo_writer, self._kill))
self._thread.start()
return self
def __exit__(self, exc_type, exc_val, exc_tb):
if self._ioflag:
sys.stdout = self.old_stdout
sys.stderr = self.old_stderr
self._ioflag = False
else:
self.writer.close()
self.echo_writer.flush()
self.stdout.flush()
self.stderr.flush()
self._kill.set()
self._thread.join()
self.stdout.close()
self.stderr.close()
self._active = False
@contextmanager
def force_echo(self):
"""Context manager to force local echo, even if echo is off."""
if not self._active:
raise RuntimeError(
"Can't call force_echo() outside log_output region!")
yield
def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo,
log_file_wrapper, control_pipe, filter_fn):
"""Daemon used by ``log_output`` to write to a log file and to ``stdout``.

View File

@@ -11,6 +11,7 @@
things like timeouts in ``ProcessController.wait()``, which are set to
get tests done quickly, not to avoid high CPU usage.
Note: The functionality in this module is unsupported on Windows
"""
from __future__ import print_function
@@ -19,7 +20,6 @@
import re
import signal
import sys
import termios
import time
import traceback
@@ -27,6 +27,13 @@
from spack.util.executable import which
termios = None
try:
import termios as term_mod
termios = term_mod
except ImportError:
pass
class ProcessController(object):
"""Wrapper around some fundamental process control operations.

View File

@@ -3,10 +3,11 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#: major, minor, patch version for Spack, in a tuple
spack_version_info = (0, 17, 1)
#: (major, minor, micro, dev release) tuple
spack_version_info = (0, 18, 0, 'dev0')
#: String containing Spack version joined with .'s
spack_version = '.'.join(str(v) for v in spack_version_info)
#: PEP440 canonical <major>.<minor>.<micro>.<devN> string
spack_version = '.'.join(str(s) for s in spack_version_info)
__all__ = ['spack_version_info', 'spack_version']
__version__ = spack_version

View File

@@ -41,11 +41,14 @@ def _search_duplicate_compilers(error_cls):
from six.moves.urllib.request import urlopen
try:
from collections.abc import Sequence # novm
except ImportError:
from collections import Sequence
import llnl.util.lang
from llnl.util.compat import Sequence
import spack.config
import spack.patch
import spack.repo
import spack.spec
import spack.variant
#: Map an audit tag to a list of callables implementing checks
CALLBACKS = {}
@@ -180,7 +183,6 @@ def run_check(tag, **kwargs):
@config_compiler
def _search_duplicate_compilers(error_cls):
"""Report compilers with the same spec and two different definitions"""
import spack.config
errors = []
compilers = list(sorted(
@@ -217,8 +219,6 @@ def _search_duplicate_compilers(error_cls):
@config_packages
def _search_duplicate_specs_in_externals(error_cls):
"""Search for duplicate specs declared as externals"""
import spack.config
errors, externals = [], collections.defaultdict(list)
packages_yaml = spack.config.get('packages')
@@ -265,6 +265,7 @@ def _search_duplicate_specs_in_externals(error_cls):
kwargs=('pkgs',)
)
#: Sanity checks on linting
# This can take some time, so it's run separately from packages
package_https_directives = AuditClass(
@@ -275,15 +276,58 @@ def _search_duplicate_specs_in_externals(error_cls):
)
@package_directives
def _check_build_test_callbacks(pkgs, error_cls):
"""Ensure stand-alone test method is not included in build-time callbacks"""
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
test_callbacks = pkg.build_time_test_callbacks
if test_callbacks and 'test' in test_callbacks:
msg = ('{0} package contains "test" method in '
'build_time_test_callbacks')
instr = ('Remove "test" from: [{0}]'
.format(', '.join(test_callbacks)))
errors.append(error_cls(msg.format(pkg.name), [instr]))
return errors
@package_directives
def _check_patch_urls(pkgs, error_cls):
"""Ensure that patches fetched from GitHub have stable sha256 hashes."""
github_patch_url_re = (
r"^https?://github\.com/.+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)"
)
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
for condition, patches in pkg.patches.items():
for patch in patches:
if not isinstance(patch, spack.patch.UrlPatch):
continue
if not re.match(github_patch_url_re, patch.url):
continue
full_index_arg = "?full_index=1"
if not patch.url.endswith(full_index_arg):
errors.append(error_cls(
"patch URL in package {0} must end with {1}".format(
pkg.name, full_index_arg,
),
[patch.url],
))
return errors
@package_https_directives
def _linting_package_file(pkgs, error_cls):
"""Check for correctness of links
"""
import llnl.util.lang
import spack.repo
import spack.spec
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
@@ -308,11 +352,6 @@ def _linting_package_file(pkgs, error_cls):
@package_directives
def _unknown_variants_in_directives(pkgs, error_cls):
"""Report unknown or wrong variants in directives for this package"""
import llnl.util.lang
import spack.repo
import spack.spec
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
@@ -367,9 +406,6 @@ def _unknown_variants_in_directives(pkgs, error_cls):
@package_directives
def _unknown_variants_in_dependencies(pkgs, error_cls):
"""Report unknown dependencies and wrong variants for dependencies"""
import spack.repo
import spack.spec
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
@@ -417,8 +453,6 @@ def _unknown_variants_in_dependencies(pkgs, error_cls):
@package_directives
def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls):
"""Report if version constraints used in directives are not satisfiable"""
import spack.repo
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
@@ -455,7 +489,6 @@ def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls
def _analyze_variants_in_directive(pkg, constraint, directive, error_cls):
import spack.variant
variant_exceptions = (
spack.variant.InconsistentValidationError,
spack.variant.MultipleValuesInExclusiveVariantError,

View File

@@ -27,7 +27,6 @@
import spack.config as config
import spack.database as spack_db
import spack.fetch_strategy as fs
import spack.hash_types as ht
import spack.hooks
import spack.hooks.sbang
import spack.mirror
@@ -182,7 +181,6 @@ def _associate_built_specs_with_mirror(self, cache_key, mirror_url):
for indexed_spec in spec_list:
dag_hash = indexed_spec.dag_hash()
full_hash = indexed_spec._full_hash
if dag_hash not in self._mirrors_for_spec:
self._mirrors_for_spec[dag_hash] = []
@@ -190,11 +188,8 @@ def _associate_built_specs_with_mirror(self, cache_key, mirror_url):
for entry in self._mirrors_for_spec[dag_hash]:
# A binary mirror can only have one spec per DAG hash, so
# if we already have an entry under this DAG hash for this
# mirror url, we may need to replace the spec associated
# with it (but only if it has a different full_hash).
# mirror url, we're done.
if entry['mirror_url'] == mirror_url:
if full_hash and full_hash != entry['spec']._full_hash:
entry['spec'] = indexed_spec
break
else:
self._mirrors_for_spec[dag_hash].append({
@@ -403,6 +398,11 @@ def _fetch_and_cache_index(self, mirror_url, expect_hash=None):
hash_fetch_url = url_util.join(
mirror_url, _build_cache_relative_path, 'index.json.hash')
if not web_util.url_exists(index_fetch_url):
# A binary mirror is not required to have an index, so avoid
# raising FetchCacheError in that case.
return False
old_cache_key = None
fetched_hash = None
@@ -762,6 +762,62 @@ def sign_tarball(key, force, specfile_path):
spack.util.gpg.sign(key, specfile_path, '%s.asc' % specfile_path)
def _fetch_spec_from_mirror(spec_url):
s = None
tty.debug('fetching {0}'.format(spec_url))
_, _, spec_file = web_util.read_from_url(spec_url)
spec_file_contents = codecs.getreader('utf-8')(spec_file).read()
# Need full spec.json name or this gets confused with index.json.
if spec_url.endswith('.json'):
s = Spec.from_json(spec_file_contents)
elif spec_url.endswith('.yaml'):
s = Spec.from_yaml(spec_file_contents)
return s
def _read_specs_and_push_index(file_list, cache_prefix, db, db_root_dir):
for file_path in file_list:
try:
s = _fetch_spec_from_mirror(url_util.join(cache_prefix, file_path))
except (URLError, web_util.SpackWebError) as url_err:
tty.error('Error reading specfile: {0}'.format(file_path))
tty.error(url_err)
if s:
db.add(s, None)
db.mark(s, 'in_buildcache', True)
# Now generate the index, compute its hash, and push the two files to
# the mirror.
index_json_path = os.path.join(db_root_dir, 'index.json')
with open(index_json_path, 'w') as f:
db._write_to_file(f)
# Read the index back in and compute its hash
with open(index_json_path) as f:
index_string = f.read()
index_hash = compute_hash(index_string)
# Write the hash out to a local file
index_hash_path = os.path.join(db_root_dir, 'index.json.hash')
with open(index_hash_path, 'w') as f:
f.write(index_hash)
# Push the index itself
web_util.push_to_url(
index_json_path,
url_util.join(cache_prefix, 'index.json'),
keep_original=False,
extra_args={'ContentType': 'application/json'})
# Push the hash
web_util.push_to_url(
index_hash_path,
url_util.join(cache_prefix, 'index.json.hash'),
keep_original=False,
extra_args={'ContentType': 'text/plain'})
def generate_package_index(cache_prefix):
"""Create the build cache index page.
@@ -790,35 +846,6 @@ def generate_package_index(cache_prefix):
tty.debug('Retrieving spec descriptor files from {0} to build index'.format(
cache_prefix))
all_mirror_specs = {}
for file_path in file_list:
try:
spec_url = url_util.join(cache_prefix, file_path)
tty.debug('fetching {0}'.format(spec_url))
_, _, spec_file = web_util.read_from_url(spec_url)
spec_file_contents = codecs.getreader('utf-8')(spec_file).read()
# Need full spec.json name or this gets confused with index.json.
if spec_url.endswith('.json'):
spec_dict = sjson.load(spec_file_contents)
s = Spec.from_json(spec_file_contents)
elif spec_url.endswith('.yaml'):
spec_dict = syaml.load(spec_file_contents)
s = Spec.from_yaml(spec_file_contents)
all_mirror_specs[s.dag_hash()] = {
'spec_url': spec_url,
'spec': s,
'num_deps': len(list(s.traverse(root=False))),
'binary_cache_checksum': spec_dict['binary_cache_checksum'],
'buildinfo': spec_dict['buildinfo'],
}
except (URLError, web_util.SpackWebError) as url_err:
tty.error('Error reading specfile: {0}'.format(file_path))
tty.error(url_err)
sorted_specs = sorted(all_mirror_specs.keys(),
key=lambda k: all_mirror_specs[k]['num_deps'])
tmpdir = tempfile.mkdtemp()
db_root_dir = os.path.join(tmpdir, 'db_root')
db = spack_db.Database(None, db_dir=db_root_dir,
@@ -826,85 +853,7 @@ def generate_package_index(cache_prefix):
record_fields=['spec', 'ref_count', 'in_buildcache'])
try:
tty.debug('Specs sorted by number of dependencies:')
for dag_hash in sorted_specs:
spec_record = all_mirror_specs[dag_hash]
s = spec_record['spec']
num_deps = spec_record['num_deps']
tty.debug(' {0}/{1} -> {2}'.format(
s.name, dag_hash[:7], num_deps))
if num_deps > 0:
# Check each of this spec's dependencies (which we have already
# processed), as they are the source of truth for their own
# full hash. If the full hash we have for any deps does not
# match what those deps have themselves, then we need to splice
# this spec with those deps, and push this spliced spec
# (spec.json file) back to the mirror, as well as update the
# all_mirror_specs dictionary with this spliced spec.
to_splice = []
for dep in s.dependencies():
dep_dag_hash = dep.dag_hash()
if dep_dag_hash in all_mirror_specs:
true_dep = all_mirror_specs[dep_dag_hash]['spec']
if true_dep.full_hash() != dep.full_hash():
to_splice.append(true_dep)
if to_splice:
tty.debug(' needs the following deps spliced:')
for true_dep in to_splice:
tty.debug(' {0}/{1}'.format(
true_dep.name, true_dep.dag_hash()[:7]))
s = s.splice(true_dep, True)
# Push this spliced spec back to the mirror
spliced_spec_dict = s.to_dict(hash=ht.full_hash)
for key in ['binary_cache_checksum', 'buildinfo']:
spliced_spec_dict[key] = spec_record[key]
temp_json_path = os.path.join(tmpdir, 'spliced.spec.json')
with open(temp_json_path, 'w') as fd:
fd.write(sjson.dump(spliced_spec_dict))
spliced_spec_url = spec_record['spec_url']
web_util.push_to_url(
temp_json_path, spliced_spec_url, keep_original=False)
tty.debug(' spliced and wrote {0}'.format(
spliced_spec_url))
spec_record['spec'] = s
db.add(s, None)
db.mark(s, 'in_buildcache', True)
# Now that we have fixed any old specfiles that might have had the wrong
# full hash for their dependencies, we can generate the index, compute
# the hash, and push those files to the mirror.
index_json_path = os.path.join(db_root_dir, 'index.json')
with open(index_json_path, 'w') as f:
db._write_to_file(f)
# Read the index back in and compute it's hash
with open(index_json_path) as f:
index_string = f.read()
index_hash = compute_hash(index_string)
# Write the hash out to a local file
index_hash_path = os.path.join(db_root_dir, 'index.json.hash')
with open(index_hash_path, 'w') as f:
f.write(index_hash)
# Push the index itself
web_util.push_to_url(
index_json_path,
url_util.join(cache_prefix, 'index.json'),
keep_original=False,
extra_args={'ContentType': 'application/json'})
# Push the hash
web_util.push_to_url(
index_hash_path,
url_util.join(cache_prefix, 'index.json.hash'),
keep_original=False,
extra_args={'ContentType': 'text/plain'})
_read_specs_and_push_index(file_list, cache_prefix, db, db_root_dir)
except Exception as err:
msg = 'Encountered problem pushing package index to {0}: {1}'.format(
cache_prefix, err)
@@ -1568,12 +1517,11 @@ def install_root_node(spec, allow_root, unsigned=False, force=False, sha256=None
sha256 (str): optional sha256 of the binary package, to be checked
before installation
"""
package = spack.repo.get(spec)
# Early termination
if spec.external or spec.virtual:
warnings.warn("Skipping external or virtual package {0}".format(spec.format()))
return
elif spec.concrete and package.installed and not force:
elif spec.concrete and spec.installed and not force:
warnings.warn("Package for spec {0} already installed.".format(spec.format()))
return
@@ -1611,16 +1559,14 @@ def install_single_spec(spec, allow_root=False, unsigned=False, force=False):
install_root_node(node, allow_root=allow_root, unsigned=unsigned, force=force)
def try_direct_fetch(spec, full_hash_match=False, mirrors=None):
def try_direct_fetch(spec, mirrors=None):
"""
Try to find the spec directly on the configured mirrors
"""
deprecated_specfile_name = tarball_name(spec, '.spec.yaml')
specfile_name = tarball_name(spec, '.spec.json')
specfile_is_json = True
lenient = not full_hash_match
found_specs = []
spec_full_hash = spec.full_hash()
for mirror in spack.mirror.MirrorCollection(mirrors=mirrors).values():
buildcache_fetch_url_yaml = url_util.join(
@@ -1650,29 +1596,21 @@ def try_direct_fetch(spec, full_hash_match=False, mirrors=None):
fetched_spec = Spec.from_yaml(specfile_contents)
fetched_spec._mark_concrete()
# Do not recompute the full hash for the fetched spec, instead just
# read the property.
if lenient or fetched_spec._full_hash == spec_full_hash:
found_specs.append({
'mirror_url': mirror.fetch_url,
'spec': fetched_spec,
})
found_specs.append({
'mirror_url': mirror.fetch_url,
'spec': fetched_spec,
})
return found_specs
def get_mirrors_for_spec(spec=None, full_hash_match=False,
mirrors_to_check=None, index_only=False):
def get_mirrors_for_spec(spec=None, mirrors_to_check=None, index_only=False):
"""
Check if concrete spec exists on mirrors and return a list
indicating the mirrors on which it can be found
Args:
spec (spack.spec.Spec): The spec to look for in binary mirrors
full_hash_match (bool): If True, only includes mirrors where the spec
full hash matches the locally computed full hash of the ``spec``
argument. If False, any mirror which has a matching DAG hash
is included in the results.
mirrors_to_check (dict): Optionally override the configured mirrors
with the mirrors in this dictionary.
index_only (bool): Do not attempt direct fetching of ``spec.json``
@@ -1689,29 +1627,14 @@ def get_mirrors_for_spec(spec=None, full_hash_match=False,
tty.debug("No Spack mirrors are currently configured")
return {}
results = []
lenient = not full_hash_match
spec_full_hash = spec.full_hash()
def filter_candidates(candidate_list):
filtered_candidates = []
for candidate in candidate_list:
candidate_full_hash = candidate['spec']._full_hash
if lenient or spec_full_hash == candidate_full_hash:
filtered_candidates.append(candidate)
return filtered_candidates
candidates = binary_index.find_built_spec(spec)
if candidates:
results = filter_candidates(candidates)
results = binary_index.find_built_spec(spec)
# Maybe we just didn't have the latest information from the mirror, so
# try to fetch directly, unless we are only considering the indices.
if not results and not index_only:
results = try_direct_fetch(spec,
full_hash_match=full_hash_match,
mirrors=mirrors_to_check)
results = try_direct_fetch(spec, mirrors=mirrors_to_check)
# We found a spec by the direct fetch approach, we might as well
# add it to our mapping.
if results:
binary_index.update_spec(spec, results)
@@ -1861,124 +1784,35 @@ def push_keys(*mirrors, **kwargs):
shutil.rmtree(tmpdir)
def needs_rebuild(spec, mirror_url, rebuild_on_errors=False):
def needs_rebuild(spec, mirror_url):
if not spec.concrete:
raise ValueError('spec must be concrete to check against mirror')
pkg_name = spec.name
pkg_version = spec.version
pkg_hash = spec.dag_hash()
pkg_full_hash = spec.full_hash()
tty.debug('Checking {0}-{1}, dag_hash = {2}, full_hash = {3}'.format(
pkg_name, pkg_version, pkg_hash, pkg_full_hash))
tty.debug('Checking {0}-{1}, dag_hash = {2}'.format(
pkg_name, pkg_version, pkg_hash))
tty.debug(spec.tree())
# Try to retrieve the specfile directly, based on the known
# format of the name, in order to determine if the package
# needs to be rebuilt.
cache_prefix = build_cache_prefix(mirror_url)
specfile_is_json = True
specfile_name = tarball_name(spec, '.spec.json')
deprecated_specfile_name = tarball_name(spec, '.spec.yaml')
specfile_path = os.path.join(cache_prefix, specfile_name)
deprecated_specfile_path = os.path.join(cache_prefix,
deprecated_specfile_name)
result_of_error = 'Package ({0}) will {1}be rebuilt'.format(
spec.short_spec, '' if rebuild_on_errors else 'not ')
try:
_, _, spec_file = web_util.read_from_url(specfile_path)
except (URLError, web_util.SpackWebError) as url_err:
try:
_, _, spec_file = web_util.read_from_url(deprecated_specfile_path)
specfile_is_json = False
except (URLError, web_util.SpackWebError) as url_err_y:
err_msg = [
'Unable to determine whether {0} needs rebuilding,',
' caught exception attempting to read from {1} or {2}.',
]
tty.error(''.join(err_msg).format(
spec.short_spec,
specfile_path,
deprecated_specfile_path))
tty.debug(url_err)
tty.debug(url_err_y)
tty.warn(result_of_error)
return rebuild_on_errors
spec_file_contents = codecs.getreader('utf-8')(spec_file).read()
if not spec_file_contents:
tty.error('Reading {0} returned nothing'.format(
specfile_path if specfile_is_json else deprecated_specfile_path))
tty.warn(result_of_error)
return rebuild_on_errors
spec_dict = (sjson.load(spec_file_contents)
if specfile_is_json else syaml.load(spec_file_contents))
try:
nodes = spec_dict['spec']['nodes']
except KeyError:
# Prior node dict format omitted 'nodes' key
nodes = spec_dict['spec']
name = spec.name
# In the old format:
# The "spec" key represents a list of objects, each with a single
# key that is the package name. While the list usually just contains
# a single object, we iterate over the list looking for the object
# with the name of this concrete spec as a key, out of an abundance
# of caution.
# In format version 2:
# ['spec']['nodes'] is still a list of objects, but with a
# multitude of keys. The list will commonly contain many objects, and in the
# case of build specs, it is highly likely that the same name will occur
# once as the actual package, and then again as the build provenance of that
# same package. Hence format version 2 matches on the dag hash, not name.
if nodes and 'name' not in nodes[0]:
# old style
cached_pkg_specs = [item[name] for item in nodes if name in item]
elif nodes and spec_dict['spec']['_meta']['version'] == 2:
cached_pkg_specs = [item for item in nodes
if item[ht.dag_hash.name] == spec.dag_hash()]
cached_target = cached_pkg_specs[0] if cached_pkg_specs else None
# If either the full_hash didn't exist in the specfile, or it
# did, but didn't match the one we computed locally, then we should
# just rebuild. This can be simplified once the dag_hash and the
# full_hash become the same thing.
rebuild = False
if not cached_target:
reason = 'did not find spec in specfile contents'
rebuild = True
elif ht.full_hash.name not in cached_target:
reason = 'full_hash was missing from remote specfile'
rebuild = True
else:
full_hash = cached_target[ht.full_hash.name]
if full_hash != pkg_full_hash:
reason = 'hash mismatch, remote = {0}, local = {1}'.format(
full_hash, pkg_full_hash)
rebuild = True
if rebuild:
tty.msg('Rebuilding {0}, reason: {1}'.format(
spec.short_spec, reason))
tty.msg(spec.tree())
return rebuild
# Only check for the presence of the json version of the spec. If the
# mirror only has the yaml version, or doesn't have the spec at all, we
# need to rebuild.
return not web_util.url_exists(specfile_path)
def check_specs_against_mirrors(mirrors, specs, output_file=None,
rebuild_on_errors=False):
def check_specs_against_mirrors(mirrors, specs, output_file=None):
"""Check all the given specs against buildcaches on the given mirrors and
determine if any of the specs need to be rebuilt. Reasons for needing to
rebuild include binary cache for spec isn't present on a mirror, or it is
present but the full_hash has changed since last time spec was built.
determine if any of the specs need to be rebuilt. Specs need to be rebuilt
when their hash doesn't exist in the mirror.
Arguments:
mirrors (dict): Mirrors to check against
@@ -1986,8 +1820,6 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None,
output_file (str): Path to output file to be written. If provided,
mirrors with missing or out-of-date specs will be formatted as a
JSON object and written to this file.
rebuild_on_errors (bool): Treat any errors encountered while
checking specs as a signal to rebuild package.
Returns: 1 if any spec was out-of-date on any mirror, 0 otherwise.
@@ -1999,7 +1831,7 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None,
rebuild_list = []
for spec in specs:
if needs_rebuild(spec, mirror.fetch_url, rebuild_on_errors):
if needs_rebuild(spec, mirror.fetch_url):
rebuild_list.append({
'short_spec': spec.short_spec,
'hash': spec.dag_hash()
@@ -2065,14 +1897,13 @@ def download_buildcache_entry(file_descriptions, mirror_url=None):
def download_single_spec(
concrete_spec, destination, require_cdashid=False, mirror_url=None
concrete_spec, destination, mirror_url=None
):
"""Download the buildcache files for a single concrete spec.
Args:
concrete_spec: concrete spec to be downloaded
destination (str): path where to put the downloaded buildcache
require_cdashid (bool): if False the `.cdashid` file is optional
mirror_url (str): url of the mirror from which to download
"""
tarfile_name = tarball_name(concrete_spec, '.spack')
@@ -2090,10 +1921,6 @@ def download_single_spec(
tarball_name(concrete_spec, '.spec.yaml')],
'path': destination,
'required': True,
}, {
'url': [tarball_name(concrete_spec, '.cdashid')],
'path': destination,
'required': require_cdashid,
},
]

View File

@@ -727,9 +727,11 @@ def _root_spec(spec_str):
spec_str (str): spec to be bootstrapped. Must be without compiler and target.
"""
# Add a proper compiler hint to the root spec. We use GCC for
# everything but MacOS.
# everything but MacOS and Windows.
if str(spack.platforms.host()) == 'darwin':
spec_str += ' %apple-clang'
elif str(spack.platforms.host()) == 'windows':
spec_str += ' %msvc'
else:
spec_str += ' %gcc'

View File

@@ -46,6 +46,7 @@
import llnl.util.tty as tty
from llnl.util.filesystem import install, install_tree, mkdirp
from llnl.util.lang import dedupe
from llnl.util.symlink import symlink
from llnl.util.tty.color import cescape, colorize
from llnl.util.tty.log import MultiProcessFd
@@ -110,6 +111,20 @@
dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so'
def should_set_parallel_jobs(jobserver_support=False):
"""Returns true in general, except when:
- The env variable SPACK_NO_PARALLEL_MAKE=1 is set
- jobserver_support is enabled, and a jobserver was found.
"""
if (
jobserver_support and
'MAKEFLAGS' in os.environ and
'--jobserver' in os.environ['MAKEFLAGS']
):
return False
return not env_flag(SPACK_NO_PARALLEL_MAKE)
class MakeExecutable(Executable):
"""Special callable executable object for make so the user can specify
parallelism options on a per-invocation basis. Specifying
@@ -119,9 +134,6 @@ class MakeExecutable(Executable):
call will name an environment variable which will be set to the
parallelism level (without affecting the normal invocation with
-j).
Note that if the SPACK_NO_PARALLEL_MAKE env var is set it overrides
everything.
"""
def __init__(self, name, jobs):
@@ -132,9 +144,8 @@ def __call__(self, *args, **kwargs):
"""parallel, and jobs_env from kwargs are swallowed and used here;
remaining arguments are passed through to the superclass.
"""
disable = env_flag(SPACK_NO_PARALLEL_MAKE)
parallel = (not disable) and kwargs.pop('parallel', self.jobs > 1)
parallel = should_set_parallel_jobs(jobserver_support=True) and \
kwargs.pop('parallel', self.jobs > 1)
if parallel:
args = ('-j{0}'.format(self.jobs),) + args
@@ -180,7 +191,7 @@ def clean_environment():
env.unset('PYTHONPATH')
# Affects GNU make, can e.g. indirectly inhibit enabling parallel build
env.unset('MAKEFLAGS')
# env.unset('MAKEFLAGS')
# Avoid that libraries of build dependencies get hijacked.
env.unset('LD_PRELOAD')
@@ -373,7 +384,8 @@ def set_wrapper_variables(pkg, env):
# directory. Add that to the path too.
env_paths = []
compiler_specific = os.path.join(
spack.paths.build_env_path, os.path.dirname(pkg.compiler.link_paths['cc']))
spack.paths.build_env_path,
os.path.dirname(pkg.compiler.link_paths['cc']))
for item in [spack.paths.build_env_path, compiler_specific]:
env_paths.append(item)
ci = os.path.join(item, 'case-insensitive')
@@ -526,7 +538,9 @@ def _set_variables_for_single_module(pkg, module):
m.cmake = Executable('cmake')
m.ctest = MakeExecutable('ctest', jobs)
# Standard build system arguments
if sys.platform == 'win32':
m.nmake = Executable('nmake')
# Standard CMake arguments
m.std_cmake_args = spack.build_systems.cmake.CMakePackage._std_args(pkg)
m.std_meson_args = spack.build_systems.meson.MesonPackage._std_args(pkg)
m.std_pip_args = spack.build_systems.python.PythonPackage._std_args(pkg)
@@ -545,7 +559,7 @@ def _set_variables_for_single_module(pkg, module):
m.makedirs = os.makedirs
m.remove = os.remove
m.removedirs = os.removedirs
m.symlink = os.symlink
m.symlink = symlink
m.mkdirp = mkdirp
m.install = install
@@ -668,11 +682,11 @@ def _static_to_shared_library(arch, compiler, static_lib, shared_lib=None,
shared_lib_link = os.path.basename(shared_lib)
if version or compat_version:
os.symlink(shared_lib_link, shared_lib_base)
symlink(shared_lib_link, shared_lib_base)
if compat_version and compat_version != version:
os.symlink(shared_lib_link, '{0}.{1}'.format(shared_lib_base,
compat_version))
symlink(shared_lib_link, '{0}.{1}'.format(shared_lib_base,
compat_version))
return compiler(*compiler_args, output=compiler_output)
@@ -821,12 +835,13 @@ def setup_package(pkg, dirty, context='build'):
for mod in pkg.compiler.modules:
load_module(mod)
# kludge to handle cray libsci being automatically loaded by PrgEnv
# modules on cray platform. Module unload does no damage when
# kludge to handle cray mpich and libsci being automatically loaded by
# PrgEnv modules on cray platform. Module unload does no damage when
# unnecessary
on_cray, _ = _on_cray()
if on_cray:
module('unload', 'cray-libsci')
if on_cray and not dirty:
for mod in ['cray-mpich', 'cray-libsci']:
module('unload', mod)
if target.module_name:
load_module(target.module_name)
@@ -1023,7 +1038,7 @@ def get_cmake_prefix_path(pkg):
def _setup_pkg_and_run(serialized_pkg, function, kwargs, child_pipe,
input_multiprocess_fd):
input_multiprocess_fd, jsfd1, jsfd2):
context = kwargs.get('context', 'build')
@@ -1130,19 +1145,29 @@ def child_fun():
"""
parent_pipe, child_pipe = multiprocessing.Pipe()
input_multiprocess_fd = None
jobserver_fd1 = None
jobserver_fd2 = None
serialized_pkg = spack.subprocess_context.PackageInstallContext(pkg)
try:
# Forward sys.stdin when appropriate, to allow toggling verbosity
if sys.stdin.isatty() and hasattr(sys.stdin, 'fileno'):
if sys.platform != "win32" and sys.stdin.isatty() and hasattr(sys.stdin,
'fileno'):
input_fd = os.dup(sys.stdin.fileno())
input_multiprocess_fd = MultiProcessFd(input_fd)
mflags = os.environ.get('MAKEFLAGS', False)
if mflags:
m = re.search(r'--jobserver-[^=]*=(\d),(\d)', mflags)
if m:
jobserver_fd1 = MultiProcessFd(int(m.group(1)))
jobserver_fd2 = MultiProcessFd(int(m.group(2)))
p = multiprocessing.Process(
target=_setup_pkg_and_run,
args=(serialized_pkg, function, kwargs, child_pipe,
input_multiprocess_fd))
input_multiprocess_fd, jobserver_fd1, jobserver_fd2))
p.start()
except InstallError as e:

View File

@@ -14,7 +14,7 @@
from llnl.util.filesystem import force_remove, working_dir
from spack.build_environment import InstallError
from spack.directives import depends_on
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.util.executable import Executable
@@ -76,7 +76,7 @@ def patch_config_files(self):
or self.spec.satisfies('target=riscv64:'))
#: Whether or not to update ``libtool``
#: (currently only for Arm/Clang/Fujitsu compilers)
#: (currently only for Arm/Clang/Fujitsu/NVHPC compilers)
patch_libtool = True
#: Targets for ``make`` during the :py:meth:`~.AutotoolsPackage.build`
@@ -104,6 +104,7 @@ def patch_config_files(self):
depends_on('gnuconfig', type='build', when='target=ppc64le:')
depends_on('gnuconfig', type='build', when='target=aarch64:')
depends_on('gnuconfig', type='build', when='target=riscv64:')
conflicts('platform=windows')
@property
def _removed_la_files_log(self):
@@ -251,7 +252,7 @@ def _set_autotools_environment_variables(self):
def _do_patch_libtool(self):
"""If configure generates a "libtool" script that does not correctly
detect the compiler (and patch_libtool is set), patch in the correct
flags for the Arm, Clang/Flang, and Fujitsu compilers."""
flags for the Arm, Clang/Flang, Fujitsu and NVHPC compilers."""
# Exit early if we are required not to patch libtool
if not self.patch_libtool:
@@ -262,9 +263,12 @@ def _do_patch_libtool(self):
self._patch_libtool(libtool_path)
def _patch_libtool(self, libtool_path):
if self.spec.satisfies('%arm')\
or self.spec.satisfies('%clang')\
or self.spec.satisfies('%fj'):
if (
self.spec.satisfies('%arm') or
self.spec.satisfies('%clang') or
self.spec.satisfies('%fj') or
self.spec.satisfies('%nvhpc')
):
fs.filter_file('wl=""\n', 'wl="-Wl,"\n', libtool_path)
fs.filter_file('pic_flag=""\n',
'pic_flag="{0}"\n'

View File

@@ -8,7 +8,8 @@
import os
import platform
import re
from typing import List # novm
import sys
from typing import List
import six
@@ -18,6 +19,7 @@
import spack.build_environment
from spack.directives import conflicts, depends_on, variant
from spack.package import InstallError, PackageBase, run_after
from spack.util.path import convert_to_posix_path
# Regex to extract the primary generator from the CMake generator
# string.
@@ -91,7 +93,12 @@ class CMakePackage(PackageBase):
#:
#: See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
#: for more information.
generator = 'Unix Makefiles'
generator = "Unix Makefiles"
if sys.platform == 'win32':
generator = "Ninja"
depends_on('ninja')
# https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
variant('build_type', default='RelWithDebInfo',
@@ -138,10 +145,11 @@ def std_cmake_args(self):
@staticmethod
def _std_args(pkg):
"""Computes the standard cmake arguments for a generic package"""
try:
generator = pkg.generator
except AttributeError:
generator = 'Unix Makefiles'
generator = CMakePackage.generator
# Make sure a valid generator was chosen
valid_primary_generators = ['Unix Makefiles', 'Ninja']
@@ -166,8 +174,9 @@ def _std_args(pkg):
define = CMakePackage.define
args = [
'-G', generator,
define('CMAKE_INSTALL_PREFIX', pkg.prefix),
define('CMAKE_INSTALL_PREFIX', convert_to_posix_path(pkg.prefix)),
define('CMAKE_BUILD_TYPE', build_type),
define('BUILD_TESTING', pkg.run_tests),
]
# CMAKE_INTERPROCEDURAL_OPTIMIZATION only exists for CMake >= 3.9
@@ -185,7 +194,7 @@ def _std_args(pkg):
# Set up CMake rpath
args.extend([
define('CMAKE_INSTALL_RPATH_USE_LINK_PATH', False),
define('CMAKE_INSTALL_RPATH_USE_LINK_PATH', True),
define('CMAKE_INSTALL_RPATH',
spack.build_environment.get_rpaths(pkg)),
define('CMAKE_PREFIX_PATH',
@@ -353,6 +362,7 @@ def cmake_args(self):
* CMAKE_INSTALL_PREFIX
* CMAKE_BUILD_TYPE
* BUILD_TESTING
which will be set automatically.

View File

@@ -107,10 +107,10 @@ def cuda_flags(arch_list):
# each release of a new cuda minor version.
conflicts('%gcc@10:', when='+cuda ^cuda@:11.0')
conflicts('%gcc@11:', when='+cuda ^cuda@:11.4.0')
conflicts('%gcc@12:', when='+cuda ^cuda@:11.6')
conflicts('%gcc@12:', when='+cuda ^cuda@:11.7')
conflicts('%clang@12:', when='+cuda ^cuda@:11.4.0')
conflicts('%clang@13:', when='+cuda ^cuda@:11.5')
conflicts('%clang@14:', when='+cuda ^cuda@:11.6')
conflicts('%clang@14:', when='+cuda ^cuda@:11.7')
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts('%gcc@10', when='+cuda ^cuda@:11.4.0')
@@ -188,7 +188,3 @@ def cuda_flags(arch_list):
# Darwin.
# TODO: add missing conflicts for %apple-clang cuda@:10
conflicts('platform=darwin', when='+cuda ^cuda@11.0.2: ')
# Make sure cuda_arch can not be used without +cuda
for value in cuda_arch_values:
conflicts('~cuda', when='cuda_arch=' + value)

View File

@@ -686,15 +686,15 @@ def openmp_libs(self):
# packages.yaml), specificially to provide the 'iomp5' libs.
elif '%gcc' in self.spec:
gcc = Executable(self.compiler.cc)
omp_lib_path = gcc(
'--print-file-name', 'libgomp.%s' % dso_suffix, output=str)
with self.compiler.compiler_environment():
omp_lib_path = Executable(self.compiler.cc)(
'--print-file-name', 'libgomp.%s' % dso_suffix, output=str)
omp_libs = LibraryList(omp_lib_path.strip())
elif '%clang' in self.spec:
clang = Executable(self.compiler.cc)
omp_lib_path = clang(
'--print-file-name', 'libomp.%s' % dso_suffix, output=str)
with self.compiler.compiler_environment():
omp_lib_path = Executable(self.compiler.cc)(
'--print-file-name', 'libomp.%s' % dso_suffix, output=str)
omp_libs = LibraryList(omp_lib_path.strip())
if len(omp_libs) < 1:
@@ -735,8 +735,9 @@ def tbb_libs(self):
# TODO: clang(?)
gcc = self._gcc_executable # must be gcc, not self.compiler.cc
cxx_lib_path = gcc(
'--print-file-name', 'libstdc++.%s' % dso_suffix, output=str)
with self.compiler.compiler_environment():
cxx_lib_path = gcc(
'--print-file-name', 'libstdc++.%s' % dso_suffix, output=str)
libs = tbb_lib + LibraryList(cxx_lib_path.rstrip())
debug_print(libs)
@@ -746,8 +747,9 @@ def tbb_libs(self):
def _tbb_abi(self):
'''Select the ABI needed for linking TBB'''
gcc = self._gcc_executable
matches = re.search(r'(gcc|LLVM).* ([0-9]+\.[0-9]+\.[0-9]+).*',
gcc('--version', output=str), re.I | re.M)
with self.compiler.compiler_environment():
matches = re.search(r'(gcc|LLVM).* ([0-9]+\.[0-9]+\.[0-9]+).*',
gcc('--version', output=str), re.I | re.M)
abi = ''
if sys.platform == 'darwin':
pass

View File

@@ -0,0 +1,102 @@
# 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)
import os
from llnl.util.filesystem import find
from spack.directives import depends_on, extends
from spack.multimethod import when
from spack.package import PackageBase
from spack.util.executable import Executable
class LuaPackage(PackageBase):
"""Specialized class for lua packages"""
phases = ['unpack', 'generate_luarocks_config', 'preprocess', 'install']
#: This attribute is used in UI queries that need to know the build
#: system base class
build_system_class = 'LuaPackage'
list_depth = 1 # LuaRocks requires at least one level of spidering to find versions
depends_on('lua-lang')
extends('lua', when='^lua')
with when('^lua-luajit'):
extends('lua-luajit')
depends_on('luajit')
depends_on('lua-luajit+lualinks')
with when('^lua-luajit-openresty'):
extends('lua-luajit-openresty')
depends_on('luajit')
depends_on('lua-luajit-openresty+lualinks')
def unpack(self, spec, prefix):
if os.path.splitext(self.stage.archive_file)[1] == '.rock':
directory = self.luarocks('unpack', self.stage.archive_file, output=str)
dirlines = directory.split('\n')
# TODO: figure out how to scope this better
os.chdir(dirlines[2])
def _generate_tree_line(self, name, prefix):
return """{{ name = "{name}", root = "{prefix}" }};""".format(
name=name,
prefix=prefix,
)
def _luarocks_config_path(self):
return os.path.join(self.stage.source_path, 'spack_luarocks.lua')
def generate_luarocks_config(self, spec, prefix):
spec = self.spec
table_entries = []
for d in spec.traverse(
deptypes=("build", "run"), deptype_query="run"
):
if d.package.extends(self.extendee_spec):
table_entries.append(self._generate_tree_line(d.name, d.prefix))
path = self._luarocks_config_path()
with open(path, 'w') as config:
config.write(
"""
deps_mode="all"
rocks_trees={{
{}
}}
""".format(
"\n".join(table_entries)
)
)
return path
def setup_build_environment(self, env):
env.set('LUAROCKS_CONFIG', self._luarocks_config_path())
def preprocess(self, spec, prefix):
"""Override this to preprocess source before building with luarocks"""
pass
@property
def lua(self):
return Executable(self.spec['lua-lang'].prefix.bin.lua)
@property
def luarocks(self):
lr = Executable(self.spec['lua-lang'].prefix.bin.luarocks)
return lr
def luarocks_args(self):
return []
def install(self, spec, prefix):
rock = '.'
specs = find('.', '*.rockspec', recursive=False)
if specs:
rock = specs[0]
rocks_args = self.luarocks_args()
rocks_args.append(rock)
self.luarocks('--tree=' + prefix, 'make', *rocks_args)

View File

@@ -10,6 +10,7 @@
import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
from spack.directives import conflicts
from spack.package import PackageBase, run_after
@@ -55,6 +56,7 @@ class MakefilePackage(PackageBase):
#: phase
install_targets = ['install']
conflicts('platform=windows')
#: Callback names for build-time test
build_time_test_callbacks = ['check']

View File

@@ -30,6 +30,15 @@ class IntelOneApiPackage(Package):
# organization (e.g. University/Company).
redistribute_source = False
@staticmethod
def update_description(cls):
"""Updates oneapi package descriptions with common text."""
text = """ LICENSE INFORMATION: By downloading and using this software, you agree to the terms
and conditions of the software license agreements at https://intel.ly/393CijO."""
cls.__doc__ = cls.__doc__ + text
return cls
@property
def component_dir(self):
"""Subdirectory for this component in the install prefix."""

View File

@@ -11,7 +11,7 @@
from llnl.util.filesystem import (
filter_file,
find,
get_filetype,
is_nonsymlink_exe_with_shebang,
path_contains_subdirectory,
same_path,
working_dir,
@@ -216,7 +216,7 @@ def view_file_conflicts(self, view, merge_map):
return conflicts
def add_files_to_view(self, view, merge_map):
def add_files_to_view(self, view, merge_map, skip_if_exists=True):
bin_dir = self.spec.prefix.bin
python_prefix = self.extendee_spec.prefix
python_is_external = self.extendee_spec.external
@@ -230,7 +230,7 @@ def add_files_to_view(self, view, merge_map):
view.link(src, dst)
elif not os.path.islink(src):
shutil.copy2(src, dst)
is_script = 'script' in get_filetype(src)
is_script = is_nonsymlink_exe_with_shebang(src)
if is_script and not python_is_external:
filter_file(
python_prefix, os.path.abspath(

View File

@@ -0,0 +1,70 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
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.util.environment import env_flag
from spack.util.executable import Executable, ProcessError
class RacketPackage(PackageBase):
"""Specialized class for packages that are built using Racket's
`raco pkg install` and `raco setup` commands.
This class provides the following phases that can be overridden:
* install
* setup
"""
#: Package name, version, and extension on PyPI
maintainers = ['elfprince13']
# Default phases
phases = ['install']
# To be used in UI queries that require to know which
# build-system class we are using
build_system_class = 'RacketPackage'
extends('racket')
pkgs = False
subdirectory = None
name = None
parallel = True
@property
def homepage(self):
if self.pkgs:
return 'https://pkgs.racket-lang.org/package/{0}'.format(self.name)
@property
def build_directory(self):
ret = os.getcwd()
if self.subdirectory:
ret = os.path.join(ret, self.subdirectory)
return ret
def install(self, spec, prefix):
"""Install everything from build directory."""
raco = Executable("raco")
with working_dir(self.build_directory):
allow_parallel = self.parallel and (not env_flag(SPACK_NO_PARALLEL_MAKE))
args = ['pkg', 'install', '-t', 'dir', '-n', self.name, '--deps', 'fail',
'--ignore-implies', '--copy', '-i', '-j',
str(determine_number_of_jobs(allow_parallel)),
'--', os.getcwd()]
try:
raco(*args)
except ProcessError:
args.insert(-2, "--skip-installed")
raco(*args)
tty.warn(("Racket package {0} was already installed, uninstalling via "
"Spack may make someone unhappy!").format(self.name))

View File

@@ -112,10 +112,6 @@ class ROCmPackage(PackageBase):
# need amd gpu type for rocm builds
conflicts('amdgpu_target=none', when='+rocm')
# Make sure amdgpu_targets cannot be used without +rocm
for value in amdgpu_targets:
conflicts('~rocm', when='amdgpu_target=' + value)
# https://github.com/ROCm-Developer-Tools/HIP/blob/master/bin/hipcc
# It seems that hip-clang does not (yet?) accept this flag, in which case
# we will still need to set the HCC_AMDGPU_TARGET environment flag in the

View File

@@ -8,6 +8,7 @@
import llnl.util.lang
from llnl.util.filesystem import mkdirp
from llnl.util.symlink import symlink
import spack.config
import spack.error
@@ -85,7 +86,7 @@ def symlink(self, mirror_ref):
# to https://github.com/spack/spack/pull/13908)
os.unlink(cosmetic_path)
mkdirp(os.path.dirname(cosmetic_path))
os.symlink(relative_dst, cosmetic_path)
symlink(relative_dst, cosmetic_path)
#: Spack's local cache for downloaded source archives

View File

@@ -5,7 +5,6 @@
import base64
import copy
import datetime
import json
import os
import re
@@ -24,7 +23,6 @@
import spack
import spack.binary_distribution as bindist
import spack.cmd
import spack.compilers as compilers
import spack.config as cfg
import spack.environment as ev
@@ -92,8 +90,8 @@ def _create_buildgroup(opener, headers, url, project, group_name, group_type):
return build_group_id
def populate_buildgroup(job_names, group_name, project, site,
credentials, cdash_url):
def _populate_buildgroup(job_names, group_name, project, site,
credentials, cdash_url):
url = "{0}/api/v1/buildgroup.php".format(cdash_url)
headers = {
@@ -134,16 +132,30 @@ def populate_buildgroup(job_names, group_name, project, site,
response_code = response.getcode()
if response_code != 200:
msg = 'Error response code ({0}) in populate_buildgroup'.format(
msg = 'Error response code ({0}) in _populate_buildgroup'.format(
response_code)
tty.warn(msg)
def is_main_phase(phase_name):
def _is_main_phase(phase_name):
return True if phase_name == 'specs' else False
def get_job_name(phase, strip_compiler, spec, osarch, build_group):
""" Given the necessary parts, format the gitlab job name
Arguments:
phase (str): Either 'specs' for the main phase, or the name of a
bootstrapping phase
strip_compiler (bool): Should compiler be stripped from job name
spec (spack.spec.Spec): Spec job will build
osarch: Architecture TODO: (this is a spack.spec.ArchSpec,
but sphinx doesn't recognize the type and fails).
build_group (str): Name of build group this job belongs to (a CDash
notion)
Returns: The job name
"""
item_idx = 0
format_str = ''
format_args = []
@@ -165,7 +177,7 @@ def get_job_name(phase, strip_compiler, spec, osarch, build_group):
format_args.append(spec.version)
item_idx += 1
if is_main_phase(phase) is True or strip_compiler is False:
if _is_main_phase(phase) is True or strip_compiler is False:
format_str += ' {{{0}}}'.format(item_idx)
format_args.append(spec.compiler)
item_idx += 1
@@ -182,12 +194,12 @@ def get_job_name(phase, strip_compiler, spec, osarch, build_group):
return format_str.format(*format_args)
def get_cdash_build_name(spec, build_group):
def _get_cdash_build_name(spec, build_group):
return '{0}@{1}%{2} arch={3} ({4})'.format(
spec.name, spec.version, spec.compiler, spec.architecture, build_group)
def get_spec_string(spec):
def _get_spec_string(spec):
format_elements = [
'{name}{@version}',
'{%compiler}',
@@ -199,15 +211,15 @@ def get_spec_string(spec):
return spec.format(''.join(format_elements))
def format_root_spec(spec, main_phase, strip_compiler):
def _format_root_spec(spec, main_phase, strip_compiler):
if main_phase is False and strip_compiler is True:
return '{0}@{1} arch={2}'.format(
spec.name, spec.version, spec.architecture)
else:
return spec.build_hash()
return spec.dag_hash()
def spec_deps_key(s):
def _spec_deps_key(s):
return '{0}/{1}'.format(s.name, s.dag_hash(7))
@@ -219,8 +231,8 @@ def _add_dependency(spec_label, dep_label, deps):
deps[spec_label].add(dep_label)
def get_spec_dependencies(specs, deps, spec_labels, check_index_only=False):
spec_deps_obj = compute_spec_deps(specs, check_index_only=check_index_only)
def _get_spec_dependencies(specs, deps, spec_labels, check_index_only=False):
spec_deps_obj = _compute_spec_deps(specs, check_index_only=check_index_only)
if spec_deps_obj:
dependencies = spec_deps_obj['dependencies']
@@ -268,11 +280,11 @@ def stage_spec_jobs(specs, check_index_only=False):
"""
# The convenience method below, "remove_satisfied_deps()", does not modify
# The convenience method below, "_remove_satisfied_deps()", does not modify
# the "deps" parameter. Instead, it returns a new dictionary where only
# dependencies which have not yet been satisfied are included in the
# return value.
def remove_satisfied_deps(deps, satisfied_list):
def _remove_satisfied_deps(deps, satisfied_list):
new_deps = {}
for key, value in iteritems(deps):
@@ -285,7 +297,7 @@ def remove_satisfied_deps(deps, satisfied_list):
deps = {}
spec_labels = {}
get_spec_dependencies(
_get_spec_dependencies(
specs, deps, spec_labels, check_index_only=check_index_only)
# Save the original deps, as we need to return them at the end of the
@@ -304,7 +316,7 @@ def remove_satisfied_deps(deps, satisfied_list):
# Note that "dependencies" is a dictionary mapping each dependent
# package to the set of not-yet-handled dependencies. The final step
# below removes all the dependencies that are handled by this stage.
dependencies = remove_satisfied_deps(dependencies, next_stage)
dependencies = _remove_satisfied_deps(dependencies, next_stage)
if unstaged:
stages.append(unstaged.copy())
@@ -312,13 +324,12 @@ def remove_satisfied_deps(deps, satisfied_list):
return spec_labels, deps, stages
def print_staging_summary(spec_labels, dependencies, stages):
def _print_staging_summary(spec_labels, dependencies, stages):
if not stages:
return
tty.msg(' Staging summary:')
stage_index = 0
for stage in stages:
tty.msg(' Staging summary ([x] means a job needs rebuilding):')
for stage_index, stage in enumerate(stages):
tty.msg(' stage {0} ({1} jobs):'.format(stage_index, len(stage)))
for job in sorted(stage):
@@ -326,12 +337,10 @@ def print_staging_summary(spec_labels, dependencies, stages):
tty.msg(' [{1}] {0} -> {2}'.format(
job,
'x' if spec_labels[job]['needs_rebuild'] else ' ',
get_spec_string(s)))
stage_index += 1
_get_spec_string(s)))
def compute_spec_deps(spec_list, check_index_only=False):
def _compute_spec_deps(spec_list, check_index_only=False):
"""
Computes all the dependencies for the spec(s) and generates a JSON
object which provides both a list of unique spec names as well as a
@@ -404,17 +413,17 @@ def append_dep(s, d):
continue
up_to_date_mirrors = bindist.get_mirrors_for_spec(
spec=s, full_hash_match=True, index_only=check_index_only)
spec=s, index_only=check_index_only)
skey = spec_deps_key(s)
skey = _spec_deps_key(s)
spec_labels[skey] = {
'spec': get_spec_string(s),
'spec': _get_spec_string(s),
'root': root_spec,
'needs_rebuild': not up_to_date_mirrors,
}
for d in s.dependencies(deptype=all):
dkey = spec_deps_key(d)
dkey = _spec_deps_key(d)
if d.external:
tty.msg('Will not stage external dep: {0}'.format(d))
continue
@@ -437,11 +446,11 @@ def append_dep(s, d):
return deps_json_obj
def spec_matches(spec, match_string):
def _spec_matches(spec, match_string):
return spec.satisfies(match_string)
def copy_attributes(attrs_list, src_dict, dest_dict):
def _copy_attributes(attrs_list, src_dict, dest_dict):
for runner_attr in attrs_list:
if runner_attr in src_dict:
if runner_attr in dest_dict and runner_attr == 'tags':
@@ -462,7 +471,7 @@ def copy_attributes(attrs_list, src_dict, dest_dict):
dest_dict[runner_attr] = copy.deepcopy(src_dict[runner_attr])
def find_matching_config(spec, gitlab_ci):
def _find_matching_config(spec, gitlab_ci):
runner_attributes = {}
overridable_attrs = [
'image',
@@ -473,16 +482,16 @@ def find_matching_config(spec, gitlab_ci):
'after_script',
]
copy_attributes(overridable_attrs, gitlab_ci, runner_attributes)
_copy_attributes(overridable_attrs, gitlab_ci, runner_attributes)
ci_mappings = gitlab_ci['mappings']
for ci_mapping in ci_mappings:
for match_string in ci_mapping['match']:
if spec_matches(spec, match_string):
if _spec_matches(spec, match_string):
if 'runner-attributes' in ci_mapping:
copy_attributes(overridable_attrs,
ci_mapping['runner-attributes'],
runner_attributes)
_copy_attributes(overridable_attrs,
ci_mapping['runner-attributes'],
runner_attributes)
return runner_attributes
else:
return None
@@ -490,16 +499,16 @@ def find_matching_config(spec, gitlab_ci):
return runner_attributes
def pkg_name_from_spec_label(spec_label):
def _pkg_name_from_spec_label(spec_label):
return spec_label[:spec_label.index('/')]
def format_job_needs(phase_name, strip_compilers, dep_jobs,
osname, build_group, prune_dag, stage_spec_dict,
enable_artifacts_buildcache):
def _format_job_needs(phase_name, strip_compilers, dep_jobs,
osname, build_group, prune_dag, stage_spec_dict,
enable_artifacts_buildcache):
needs_list = []
for dep_job in dep_jobs:
dep_spec_key = spec_deps_key(dep_job)
dep_spec_key = _spec_deps_key(dep_job)
dep_spec_info = stage_spec_dict[dep_spec_key]
if not prune_dag or dep_spec_info['needs_rebuild']:
@@ -514,10 +523,113 @@ def format_job_needs(phase_name, strip_compilers, dep_jobs,
return needs_list
def get_change_revisions():
"""If this is a git repo get the revisions to use when checking
for changed packages and spack core modules."""
git_dir = os.path.join(spack.paths.prefix, '.git')
if os.path.exists(git_dir) and os.path.isdir(git_dir):
# TODO: This will only find changed packages from the last
# TODO: commit. While this may work for single merge commits
# TODO: when merging the topic branch into the base, it will
# TODO: require more thought outside of that narrow case.
return 'HEAD^', 'HEAD'
return None, None
def get_stack_changed(env_path, rev1='HEAD^', rev2='HEAD'):
"""Given an environment manifest path and two revisions to compare, return
whether or not the stack was changed. Returns True if the environment
manifest changed between the provided revisions (or additionally if the
`.gitlab-ci.yml` file itself changed). Returns False otherwise."""
git = exe.which("git")
if git:
with fs.working_dir(spack.paths.prefix):
git_log = git("diff", "--name-only", rev1, rev2,
output=str, error=os.devnull,
fail_on_error=False).strip()
lines = [] if not git_log else re.split(r'\s+', git_log)
for path in lines:
if '.gitlab-ci.yml' in path or path in env_path:
tty.debug('env represented by {0} changed'.format(
env_path))
tty.debug('touched file: {0}'.format(path))
return True
return False
def compute_affected_packages(rev1='HEAD^', rev2='HEAD'):
"""Determine which packages were added, removed or changed
between rev1 and rev2, and return the names as a set"""
return spack.repo.get_all_package_diffs('ARC', rev1=rev1, rev2=rev2)
def get_spec_filter_list(env, affected_pkgs, dependencies=True, dependents=True):
"""Given a list of package names, and assuming an active and
concretized environment, return a set of concrete specs from
the environment corresponding to any of the affected pkgs (or
optionally to any of their dependencies/dependents).
Arguments:
env (spack.environment.Environment): Active concrete environment
affected_pkgs (List[str]): Affected package names
dependencies (bool): Include dependencies of affected packages
dependents (bool): Include dependents of affected pacakges
Returns:
A list of concrete specs from the active environment including
those associated with affected packages, and possible their
dependencies and dependents as well.
"""
affected_specs = set()
all_concrete_specs = env.all_specs()
tty.debug('All concrete environment specs:')
for s in all_concrete_specs:
tty.debug(' {0}/{1}'.format(s.name, s.dag_hash()[:7]))
for pkg in affected_pkgs:
env_matches = [s for s in all_concrete_specs if s.name == pkg]
for match in env_matches:
affected_specs.add(match)
if dependencies:
affected_specs.update(match.traverse(direction='children', root=False))
if dependents:
affected_specs.update(match.traverse(direction='parents', root=False))
return affected_specs
def generate_gitlab_ci_yaml(env, print_summary, output_file,
prune_dag=False, check_index_only=False,
run_optimizer=False, use_dependencies=False,
artifacts_root=None):
""" Generate a gitlab yaml file to run a dynamic chile pipeline from
the spec matrix in the active environment.
Arguments:
env (spack.environment.Environment): Activated environment object
which must contain a gitlab-ci section describing how to map
specs to runners
print_summary (bool): Should we print a summary of all the jobs in
the stages in which they were placed.
output_file (str): File path where generated file should be written
prune_dag (bool): If True, do not generate jobs for specs already
exist built on the mirror.
check_index_only (bool): If True, attempt to fetch the mirror index
and only use that to determine whether built specs on the mirror
this mode results in faster yaml generation time). Otherwise, also
check each spec directly by url (useful if there is no index or it
might be out of date).
run_optimizer (bool): If True, post-process the generated yaml to try
try to reduce the size (attempts to collect repeated configuration
and replace with definitions).)
use_dependencies (bool): If true, use "dependencies" rather than "needs"
("needs" allows DAG scheduling). Useful if gitlab instance cannot
be configured to handle more than a few "needs" per job.
artifacts_root (str): Path where artifacts like logs, environment
files (spack.yaml, spack.lock), etc should be written. GitLab
requires this to be within the project directory.
"""
with spack.concretize.disable_compiler_existence_check():
with env.write_transaction():
env.concretize()
@@ -546,6 +658,26 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
tty.verbose("Using CDash auth token from environment")
cdash_auth_token = os.environ.get('SPACK_CDASH_AUTH_TOKEN')
prune_untouched_packages = os.environ.get('SPACK_PRUNE_UNTOUCHED', None)
if prune_untouched_packages:
# Requested to prune untouched packages, but assume we won't do that
# unless we're actually in a git repo.
prune_untouched_packages = False
rev1, rev2 = get_change_revisions()
tty.debug('Got following revisions: rev1={0}, rev2={1}'.format(rev1, rev2))
if rev1 and rev2:
# If the stack file itself did not change, proceed with pruning
if not get_stack_changed(env.manifest_path, rev1, rev2):
prune_untouched_packages = True
affected_pkgs = compute_affected_packages(rev1, rev2)
tty.debug('affected pkgs:')
for p in affected_pkgs:
tty.debug(' {0}'.format(p))
affected_specs = get_spec_filter_list(env, affected_pkgs)
tty.debug('all affected specs:')
for s in affected_specs:
tty.debug(' {0}'.format(s.name))
generate_job_name = os.environ.get('CI_JOB_NAME', None)
parent_pipeline_id = os.environ.get('CI_PIPELINE_ID', None)
@@ -710,7 +842,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
max_needs_job = ''
# If this is configured, spack will fail "spack ci generate" if it
# generates any full hash which exists under the broken specs url.
# generates any hash which exists under the broken specs url.
broken_spec_urls = None
if broken_specs_url:
if broken_specs_url.startswith('http'):
@@ -725,7 +857,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
phase_name = phase['name']
strip_compilers = phase['strip-compilers']
main_phase = is_main_phase(phase_name)
main_phase = _is_main_phase(phase_name)
spec_labels, dependencies, stages = staged_phases[phase_name]
for stage_jobs in stages:
@@ -736,13 +868,18 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
for spec_label in stage_jobs:
spec_record = spec_labels[spec_label]
root_spec = spec_record['rootSpec']
pkg_name = pkg_name_from_spec_label(spec_label)
pkg_name = _pkg_name_from_spec_label(spec_label)
release_spec = root_spec[pkg_name]
release_spec_full_hash = release_spec.full_hash()
release_spec_dag_hash = release_spec.dag_hash()
release_spec_build_hash = release_spec.build_hash()
runner_attribs = find_matching_config(
if prune_untouched_packages:
if release_spec not in affected_specs:
tty.debug('Pruning {0}, untouched by change.'.format(
release_spec.name))
spec_record['needs_rebuild'] = False
continue
runner_attribs = _find_matching_config(
release_spec, gitlab_ci)
if not runner_attribs:
@@ -796,15 +933,13 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
compiler_action = 'NONE'
if len(phases) > 1:
compiler_action = 'FIND_ANY'
if is_main_phase(phase_name):
if _is_main_phase(phase_name):
compiler_action = 'INSTALL_MISSING'
job_vars = {
'SPACK_ROOT_SPEC': format_root_spec(
'SPACK_ROOT_SPEC': _format_root_spec(
root_spec, main_phase, strip_compilers),
'SPACK_JOB_SPEC_DAG_HASH': release_spec_dag_hash,
'SPACK_JOB_SPEC_BUILD_HASH': release_spec_build_hash,
'SPACK_JOB_SPEC_FULL_HASH': release_spec_full_hash,
'SPACK_JOB_SPEC_PKG_NAME': release_spec.name,
'SPACK_COMPILER_ACTION': compiler_action
}
@@ -823,15 +958,15 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# purposes, so we only get the direct dependencies.
dep_jobs = []
for dep_label in dependencies[spec_label]:
dep_pkg = pkg_name_from_spec_label(dep_label)
dep_pkg = _pkg_name_from_spec_label(dep_label)
dep_root = spec_labels[dep_label]['rootSpec']
dep_jobs.append(dep_root[dep_pkg])
job_dependencies.extend(
format_job_needs(phase_name, strip_compilers,
dep_jobs, osname, build_group,
prune_dag, spec_labels,
enable_artifacts_buildcache))
_format_job_needs(phase_name, strip_compilers,
dep_jobs, osname, build_group,
prune_dag, spec_labels,
enable_artifacts_buildcache))
rebuild_spec = spec_record['needs_rebuild']
@@ -842,7 +977,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# compiler we are supposed to use is listed in any of the
# bootstrap spec lists, then we will add more dependencies to
# the job (that compiler and maybe it's dependencies as well).
if is_main_phase(phase_name):
if _is_main_phase(phase_name):
spec_arch_family = (release_spec.architecture
.target
.microarchitecture
@@ -870,7 +1005,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# be rebuilt if the compiler targeted to build it
# needs to be rebuilt.
bs_specs, _, _ = staged_phases[bs['phase-name']]
c_spec_key = spec_deps_key(c_spec)
c_spec_key = _spec_deps_key(c_spec)
rbld_comp = bs_specs[c_spec_key]['needs_rebuild']
rebuild_spec = rebuild_spec or rbld_comp
# Also update record so dependents do not fail to
@@ -884,14 +1019,14 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
]
job_dependencies.extend(
format_job_needs(bs['phase-name'],
bs['strip-compilers'],
dep_jobs,
str(bs_arch),
build_group,
prune_dag,
bs_specs,
enable_artifacts_buildcache))
_format_job_needs(bs['phase-name'],
bs['strip-compilers'],
dep_jobs,
str(bs_arch),
build_group,
prune_dag,
bs_specs,
enable_artifacts_buildcache))
else:
debug_msg = ''.join([
'Considered compiler {0} for spec ',
@@ -903,13 +1038,14 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
tty.debug(debug_msg)
if prune_dag and not rebuild_spec:
tty.debug('Pruning spec that does not need to be rebuilt.')
tty.debug('Pruning {0}, does not need rebuild.'.format(
release_spec.name))
continue
if (broken_spec_urls is not None and
release_spec_full_hash in broken_spec_urls):
release_spec_dag_hash in broken_spec_urls):
known_broken_specs_encountered.append('{0} ({1})'.format(
release_spec, release_spec_full_hash))
release_spec, release_spec_dag_hash))
if artifacts_root:
job_dependencies.append({
@@ -920,19 +1056,10 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
job_vars['SPACK_SPEC_NEEDS_REBUILD'] = str(rebuild_spec)
if enable_cdash_reporting:
cdash_build_name = get_cdash_build_name(
cdash_build_name = _get_cdash_build_name(
release_spec, build_group)
all_job_names.append(cdash_build_name)
related_builds = [] # Used for relating CDash builds
if spec_label in dependencies:
related_builds = (
[spec_labels[d]['spec'].name
for d in dependencies[spec_label]])
job_vars['SPACK_CDASH_BUILD_NAME'] = cdash_build_name
job_vars['SPACK_RELATED_BUILDS_CDASH'] = ';'.join(
sorted(related_builds))
variables.update(job_vars)
@@ -947,7 +1074,6 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
local_mirror_dir, 'build_cache')
artifact_paths.extend([os.path.join(bc_root, p) for p in [
bindist.tarball_name(release_spec, '.spec.json'),
bindist.tarball_name(release_spec, '.cdashid'),
bindist.tarball_directory_name(release_spec),
]])
@@ -995,7 +1121,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
phase_name = phase['name']
tty.msg('Stages for phase "{0}"'.format(phase_name))
phase_stages = staged_phases[phase_name]
print_staging_summary(*phase_stages)
_print_staging_summary(*phase_stages)
tty.debug('{0} build jobs generated in {1} stages'.format(
job_id, stage_id))
@@ -1007,8 +1133,8 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# Use "all_job_names" to populate the build group for this set
if enable_cdash_reporting and cdash_auth_token:
try:
populate_buildgroup(all_job_names, build_group, cdash_project,
cdash_site, cdash_auth_token, cdash_url)
_populate_buildgroup(all_job_names, build_group, cdash_project,
cdash_site, cdash_auth_token, cdash_url)
except (SpackError, HTTPError, URLError) as err:
tty.warn('Problem populating buildgroup: {0}'.format(err))
else:
@@ -1044,9 +1170,9 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
cleanup_job = {}
if service_job_config:
copy_attributes(default_attrs,
service_job_config,
cleanup_job)
_copy_attributes(default_attrs,
service_job_config,
cleanup_job)
cleanup_job['stage'] = 'cleanup-temp-storage'
cleanup_job['script'] = [
@@ -1064,9 +1190,9 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
final_job = {}
if service_job_config:
copy_attributes(default_attrs,
service_job_config,
final_job)
_copy_attributes(default_attrs,
service_job_config,
final_job)
index_target_mirror = mirror_urls[0]
if is_pr_pipeline:
@@ -1137,9 +1263,9 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
noop_job = {}
if service_job_config:
copy_attributes(default_attrs,
service_job_config,
noop_job)
_copy_attributes(default_attrs,
service_job_config,
noop_job)
if 'script' not in noop_job:
noop_job['script'] = [
@@ -1162,7 +1288,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
outf.write(syaml.dump_config(sorted_output, default_flow_style=True))
def url_encode_string(input_string):
def _url_encode_string(input_string):
encoded_keyval = urlencode({'donotcare': input_string})
eq_idx = encoded_keyval.find('=') + 1
encoded_value = encoded_keyval[eq_idx:]
@@ -1170,6 +1296,17 @@ def url_encode_string(input_string):
def import_signing_key(base64_signing_key):
""" Given Base64-encoded gpg key, decode and import it to use for
signing packages.
Arguments:
base64_signing_key (str): A gpg key including the secret key,
armor-exported and base64 encoded, so it can be stored in a
gitlab CI variable. For an example of how to generate such
a key, see:
https://github.com/spack/spack-infrastructure/blob/main/gitlab-docker/files/gen-key
"""
if not base64_signing_key:
tty.warn('No key found for signing/verifying packages')
return
@@ -1207,14 +1344,34 @@ def import_signing_key(base64_signing_key):
def can_sign_binaries():
""" Utility method to determine if this spack instance is capable of
signing binary packages. This is currently only possible if the
spack gpg keystore contains exactly one secret key."""
return len(gpg_util.signing_keys()) == 1
def can_verify_binaries():
""" Utility method to determin if this spack instance is capable (at
least in theory) of verifying signed binaries."""
return len(gpg_util.public_keys()) >= 1
def configure_compilers(compiler_action, scope=None):
""" Depending on the compiler_action parameter, either turn on the
install_missing_compilers config option, or find spack compilers,
or do nothing. This is used from rebuild jobs in bootstrapping
pipelines, where in the bootsrapping phase we would pass
FIND_ANY in case of compiler-agnostic bootstrapping, while in the
spec building phase we would pass INSTALL_MISSING in order to get
spack to use the compiler which was built in the previous phase and
is now sitting in the binary mirror.
Arguments:
compiler_action (str): 'FIND_ANY', 'INSTALL_MISSING' have meanings
described above. Any other value essentially results in a no-op.
scope (spack.config.ConfigScope): Optional. The scope in which to look for
compilers, in case 'FIND_ANY' was provided.
"""
if compiler_action == 'INSTALL_MISSING':
tty.debug('Make sure bootstrapped compiler will be installed')
config = cfg.get('config')
@@ -1237,11 +1394,38 @@ def configure_compilers(compiler_action, scope=None):
return None
def get_concrete_specs(env, root_spec, job_name, related_builds,
compiler_action):
def get_concrete_specs(env, root_spec, job_name, compiler_action):
""" Build a dictionary of concrete specs relevant to a particular
rebuild job. This includes the root spec and the spec to be
rebuilt (which could be the same).
Arguments:
env (spack.environment.Environment): Activated spack environment
used to get concrete root spec by hash in case compiler_action
is anthing other than FIND_ANY.
root_spec (str): If compiler_action is FIND_ANY root_spec is
a string representation which can be turned directly into
a spec, otherwise, it's a hash used to index the activated
spack environment.
job_name (str): Name of package to be built, used to index the
concrete root spec and produce the concrete spec to be
built.
compiler_action (str): Determines how to interpret the root_spec
parameter, either as a string representation as a hash.
Returns:
.. code-block:: JSON
{
"root": "<spec>",
"<job-pkg-name>": "<spec>",
}
"""
spec_map = {
'root': None,
'deps': {},
}
if compiler_action == 'FIND_ANY':
@@ -1265,161 +1449,9 @@ def get_concrete_specs(env, root_spec, job_name, related_builds,
spec_map['root'] = concrete_root
spec_map[job_name] = concrete_root[job_name]
if related_builds:
for dep_job_name in related_builds.split(';'):
spec_map['deps'][dep_job_name] = concrete_root[dep_job_name]
return spec_map
def register_cdash_build(build_name, base_url, project, site, track):
url = base_url + '/api/v1/addBuild.php'
time_stamp = datetime.datetime.now().strftime('%Y%m%d-%H%M')
build_id = None
build_stamp = '{0}-{1}'.format(time_stamp, track)
payload = {
"project": project,
"site": site,
"name": build_name,
"stamp": build_stamp,
}
tty.debug('Registering cdash build to {0}, payload:'.format(url))
tty.debug(payload)
enc_data = json.dumps(payload).encode('utf-8')
headers = {
'Content-Type': 'application/json',
}
opener = build_opener(HTTPHandler)
request = Request(url, data=enc_data, headers=headers)
try:
response = opener.open(request)
response_code = response.getcode()
if response_code != 200 and response_code != 201:
msg = 'Adding build failed (response code = {0}'.format(response_code)
tty.warn(msg)
return (None, None)
response_text = response.read()
response_json = json.loads(response_text)
build_id = response_json['buildid']
except Exception as e:
print("Registering build in CDash failed: {0}".format(e))
return (build_id, build_stamp)
def relate_cdash_builds(spec_map, cdash_base_url, job_build_id, cdash_project,
cdashids_mirror_urls):
if not job_build_id:
return
dep_map = spec_map['deps']
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
}
cdash_api_url = '{0}/api/v1/relateBuilds.php'.format(cdash_base_url)
for dep_pkg_name in dep_map:
tty.debug('Fetching cdashid file for {0}'.format(dep_pkg_name))
dep_spec = dep_map[dep_pkg_name]
dep_build_id = None
for url in cdashids_mirror_urls:
try:
if url:
dep_build_id = read_cdashid_from_mirror(dep_spec, url)
break
except web_util.SpackWebError:
tty.debug('Did not find cdashid for {0} on {1}'.format(
dep_pkg_name, url))
else:
tty.warn('Did not find cdashid for {0} anywhere'.format(
dep_pkg_name))
return
payload = {
"project": cdash_project,
"buildid": job_build_id,
"relatedid": dep_build_id,
"relationship": "depends on"
}
enc_data = json.dumps(payload).encode('utf-8')
opener = build_opener(HTTPHandler)
request = Request(cdash_api_url, data=enc_data, headers=headers)
try:
response = opener.open(request)
response_code = response.getcode()
if response_code != 200 and response_code != 201:
msg = 'Relate builds ({0} -> {1}) failed (resp code = {2})'.format(
job_build_id, dep_build_id, response_code)
tty.warn(msg)
return
response_text = response.read()
tty.debug('Relate builds response: {0}'.format(response_text))
except Exception as e:
print("Relating builds in CDash failed: {0}".format(e))
def write_cdashid_to_mirror(cdashid, spec, mirror_url):
if not spec.concrete:
tty.die('Can only write cdashid for concrete spec to mirror')
with TemporaryDirectory() as tmpdir:
local_cdash_path = os.path.join(tmpdir, 'job.cdashid')
with open(local_cdash_path, 'w') as fd:
fd.write(cdashid)
buildcache_name = bindist.tarball_name(spec, '')
cdashid_file_name = '{0}.cdashid'.format(buildcache_name)
remote_url = os.path.join(
mirror_url, bindist.build_cache_relative_path(), cdashid_file_name)
tty.debug('pushing cdashid to url')
tty.debug(' local file path: {0}'.format(local_cdash_path))
tty.debug(' remote url: {0}'.format(remote_url))
try:
web_util.push_to_url(local_cdash_path, remote_url)
except Exception as inst:
# No matter what went wrong here, don't allow the pipeline to fail
# just because there was an issue storing the cdashid on the mirror
msg = 'Failed to write cdashid {0} to mirror {1}'.format(
cdashid, mirror_url)
tty.warn(inst)
tty.warn(msg)
def read_cdashid_from_mirror(spec, mirror_url):
if not spec.concrete:
tty.die('Can only read cdashid for concrete spec from mirror')
buildcache_name = bindist.tarball_name(spec, '')
cdashid_file_name = '{0}.cdashid'.format(buildcache_name)
url = os.path.join(
mirror_url, bindist.build_cache_relative_path(), cdashid_file_name)
resp_url, resp_headers, response = web_util.read_from_url(url)
contents = response.fp.read()
return int(contents)
def _push_mirror_contents(env, specfile_path, sign_binaries, mirror_url):
"""Unchecked version of the public API, for easier mocking"""
unsigned = not sign_binaries
@@ -1438,6 +1470,19 @@ def _push_mirror_contents(env, specfile_path, sign_binaries, mirror_url):
def push_mirror_contents(env, specfile_path, mirror_url, sign_binaries):
""" Push one or more binary packages to the mirror.
Arguments:
env (spack.environment.Environment): Optional environment. If
provided, it is used to make sure binary package to push
exists in the environment.
specfile_path (str): Path to spec.json corresponding to built pkg
to push.
mirror_url (str): Base url of target mirror
sign_binaries (bool): If True, spack will attempt to sign binary
package before pushing.
"""
try:
_push_mirror_contents(env, specfile_path, sign_binaries, mirror_url)
except Exception as inst:
@@ -1462,6 +1507,15 @@ def push_mirror_contents(env, specfile_path, mirror_url, sign_binaries):
def copy_stage_logs_to_artifacts(job_spec, job_log_dir):
""" Looks for spack-build-out.txt in the stage directory of the given
job_spec, and attempts to copy the file into the directory given
by job_log_dir.
Arguments:
job_spec (spack.spec.Spec): Spec associated with spack install log
job_log_dir (str): Path into which build log should be copied
"""
try:
job_pkg = spack.repo.get(job_spec)
tty.debug('job package: {0}'.format(job_pkg))
@@ -1480,6 +1534,14 @@ def copy_stage_logs_to_artifacts(job_spec, job_log_dir):
def download_and_extract_artifacts(url, work_dir):
""" Look for gitlab artifacts.zip at the given url, and attempt to download
and extract the contents into the given work_dir
Arguments:
url (str): Complete url to artifacts.zip file
work_dir (str): Path to destination where artifacts should be extracted
"""
tty.msg('Fetching artifacts from: {0}\n'.format(url))
headers = {
@@ -1519,6 +1581,8 @@ def download_and_extract_artifacts(url, work_dir):
def get_spack_info():
""" If spack is running from a git repo, return the most recent git log
entry, otherwise, return a string containing the spack version. """
git_path = os.path.join(spack.paths.prefix, ".git")
if os.path.exists(git_path):
git = exe.which("git")
@@ -1534,6 +1598,23 @@ def get_spack_info():
def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
""" Look in the local spack clone to find the checkout_commit, and if
provided, the merge_commit given as arguments. If those commits can
be found locally, then clone spack and attempt to recreate a merge
commit with the same parent commits as tested in gitlab. This looks
something like 1) git clone repo && cd repo 2) git checkout
<checkout_commit> 3) git merge <merge_commit>. If there is no
merge_commit provided, then skip step (3).
Arguments:
repro_dir (str): Location where spack should be cloned
checkout_commit (str): SHA of PR branch commit
merge_commit (str): SHA of target branch parent
Returns: True if git repo state was successfully recreated, or False
otherwise.
"""
# figure out the path to the spack git version being used for the
# reproduction
print('checkout_commit: {0}'.format(checkout_commit))
@@ -1570,12 +1651,12 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
# Next attempt to clone your local spack repo into the repro dir
with fs.working_dir(repro_dir):
clone_out = git("clone", spack_git_path,
clone_out = git("clone", spack_git_path, "spack",
output=str, error=os.devnull,
fail_on_error=False)
if git.returncode != 0:
tty.error('Unable to clone your local spac repo:')
tty.error('Unable to clone your local spack repo:')
tty.msg(clone_out)
return False
@@ -1608,6 +1689,18 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
def reproduce_ci_job(url, work_dir):
""" Given a url to gitlab artifacts.zip from a failed 'spack ci rebuild' job,
attempt to setup an environment in which the failure can be reproduced
locally. This entails the following:
First download and extract artifacts. Then look through those artifacts
to glean some information needed for the reproduer (e.g. one of the
artifacts contains information about the version of spack tested by
gitlab, another is the generated pipeline yaml containing details
of the job like the docker image used to run it). The output of this
function is a set of printed instructions for running docker and then
commands to run to reproduce the build once inside the container.
"""
download_and_extract_artifacts(url, work_dir)
lock_file = fs.find(work_dir, 'spack.lock')[0]

View File

@@ -308,8 +308,7 @@ def optimizer(yaml):
# try factoring out commonly repeated portions
common_job = {
'variables': {
'SPACK_COMPILER_ACTION': 'NONE',
'SPACK_RELATED_BUILDS_CDASH': ''
'SPACK_COMPILER_ACTION': 'NONE'
},
'after_script': ['rm -rf "./spack"'],

View File

@@ -26,6 +26,10 @@ def setup_parser(subparser):
def activate(parser, args):
tty.warn("spack activate is deprecated in favor of "
"environments and will be removed in v0.19.0")
specs = spack.cmd.parse_specs(args.spec)
if len(specs) != 1:
tty.die("activate requires one spec. %d given." % len(specs))

View File

@@ -161,11 +161,6 @@ def setup_parser(subparser):
help=('Check single spec from json or yaml file instead of release ' +
'specs file'))
check.add_argument(
'--rebuild-on-error', default=False, action='store_true',
help="Default to rebuilding packages if errors are encountered " +
"during the process of checking whether rebuilding is needed")
check.set_defaults(func=check_fn)
# Download tarball and specfile
@@ -180,9 +175,6 @@ def setup_parser(subparser):
download.add_argument(
'-p', '--path', default=None,
help="Path to directory where tarball should be downloaded")
download.add_argument(
'-c', '--require-cdashid', action='store_true', default=False,
help="Require .cdashid file to be downloaded with buildcache entry")
download.set_defaults(func=download_fn)
# Get buildcache name
@@ -364,7 +356,7 @@ def list_fn(args):
try:
specs = bindist.update_cache_and_get_specs()
except bindist.FetchCacheError as e:
tty.error(e)
tty.die(e)
if not args.allarch:
arch = spack.spec.Spec.default_arch()
@@ -433,16 +425,14 @@ def check_fn(args):
sys.exit(0)
sys.exit(bindist.check_specs_against_mirrors(
configured_mirrors, specs, args.output_file, args.rebuild_on_error))
configured_mirrors, specs, args.output_file))
def download_fn(args):
"""Download buildcache entry from a remote mirror to local folder. This
command uses the process exit code to indicate its result, specifically,
a non-zero exit code indicates that the command failed to download at
least one of the required buildcache components. Normally, just the
tarball and .spec.json files are required, but if the --require-cdashid
argument was provided, then a .cdashid file is also required."""
least one of the required buildcache components."""
if not args.spec and not args.spec_file:
tty.msg('No specs provided, exiting.')
sys.exit(0)
@@ -452,9 +442,7 @@ def download_fn(args):
sys.exit(0)
spec = _concrete_spec_from_args(args)
result = bindist.download_single_spec(
spec, args.path, require_cdashid=args.require_cdashid
)
result = bindist.download_single_spec(spec, args.path)
if not result:
sys.exit(1)
@@ -493,7 +481,7 @@ def save_specfile_fn(args):
else:
root_spec = Spec(args.root_spec)
root_spec.concretize()
root_spec_as_json = root_spec.to_json(hash=ht.build_hash)
root_spec_as_json = root_spec.to_json(hash=ht.dag_hash)
spec_format = 'yaml' if args.root_specfile.endswith('yaml') else 'json'
save_dependency_specfiles(
root_spec_as_json, args.specfile_dir, args.specs.split(), spec_format)
@@ -560,11 +548,6 @@ def copy_fn(args):
specfile_src_path_yaml = os.path.join(args.base_dir, specfile_rel_path)
specfile_dest_path_yaml = os.path.join(dest_root_path, specfile_rel_path)
cdashidfile_rel_path = os.path.join(
build_cache_dir, bindist.tarball_name(spec, '.cdashid'))
cdashid_src_path = os.path.join(args.base_dir, cdashidfile_rel_path)
cdashid_dest_path = os.path.join(dest_root_path, cdashidfile_rel_path)
# Make sure directory structure exists before attempting to copy
os.makedirs(os.path.dirname(tarball_dest_path))
@@ -578,11 +561,6 @@ def copy_fn(args):
tty.msg('Copying {0}'.format(specfile_rel_path_yaml))
shutil.copyfile(specfile_src_path_yaml, specfile_dest_path_yaml)
# Copy the cdashid file (if exists) to the destination mirror
if os.path.exists(cdashid_src_path):
tty.msg('Copying {0}'.format(cdashidfile_rel_path))
shutil.copyfile(cdashid_src_path, cdashid_dest_path)
def sync_fn(args):
""" Syncs binaries (and associated metadata) from one mirror to another.
@@ -667,8 +645,6 @@ def sync_fn(args):
build_cache_dir, bindist.tarball_name(s, '.spec.yaml')),
os.path.join(
build_cache_dir, bindist.tarball_name(s, '.spec.json')),
os.path.join(
build_cache_dir, bindist.tarball_name(s, '.cdashid'))
])
tmpdir = tempfile.mkdtemp()
@@ -720,7 +696,7 @@ def update_index(mirror_url, update_keys=False):
def update_index_fn(args):
"""Update a buildcache index."""
outdir = '.'
outdir = 'file://.'
if args.mirror_url:
outdir = args.mirror_url

View File

@@ -57,32 +57,32 @@ def checksum(parser, args):
pkg = spack.repo.get(args.package)
url_dict = {}
if args.versions:
# If the user asked for specific versions, use those
for version in args.versions:
versions = args.versions
if (not versions) and args.preferred:
versions = [preferred_version(pkg)]
if versions:
remote_versions = None
for version in versions:
version = ver(version)
if not isinstance(version, Version):
tty.die("Cannot generate checksums for version lists or "
"version ranges. Use unambiguous versions.")
url_dict[version] = pkg.url_for_version(version)
elif args.preferred:
version = preferred_version(pkg)
url_dict = dict([(version, pkg.url_for_version(version))])
url = pkg.find_valid_url_for_version(version)
if url is not None:
url_dict[version] = url
continue
# if we get here, it's because no valid url was provided by the package
# do expensive fallback to try to recover
if remote_versions is None:
remote_versions = pkg.fetch_remote_versions()
if version in remote_versions:
url_dict[version] = remote_versions[version]
else:
# Otherwise, see what versions we can find online
url_dict = pkg.fetch_remote_versions()
if not url_dict:
tty.die("Could not find any versions for {0}".format(pkg.name))
# And ensure the specified version URLs take precedence, if available
try:
explicit_dict = {}
for v in pkg.versions:
if not v.isdevelop():
explicit_dict[v] = pkg.url_for_version(v)
url_dict.update(explicit_dict)
except spack.package.NoURLError:
pass
if not url_dict:
tty.die("Could not find any versions for {0}".format(pkg.name))
version_lines = spack.stage.get_checksums_for_versions(
url_dict, pkg.name, keep_stage=args.keep_stage,

View File

@@ -167,8 +167,7 @@ def ci_reindex(args):
def ci_rebuild(args):
"""Check a single spec against the remote mirror, and rebuild it from
source if the mirror does not contain the full hash match of the spec
as computed locally. """
source if the mirror does not contain the hash. """
env = spack.cmd.require_active_env(cmd_name='ci rebuild')
# Make sure the environment is "gitlab-enabled", or else there's nothing
@@ -196,7 +195,6 @@ def ci_rebuild(args):
job_spec_pkg_name = get_env_var('SPACK_JOB_SPEC_PKG_NAME')
compiler_action = get_env_var('SPACK_COMPILER_ACTION')
cdash_build_name = get_env_var('SPACK_CDASH_BUILD_NAME')
related_builds = get_env_var('SPACK_RELATED_BUILDS_CDASH')
spack_pipeline_type = get_env_var('SPACK_PIPELINE_TYPE')
pr_mirror_url = get_env_var('SPACK_PR_MIRROR_URL')
remote_mirror_url = get_env_var('SPACK_REMOTE_MIRROR_URL')
@@ -236,7 +234,6 @@ def ci_rebuild(args):
tty.debug('cdash_project_enc = {0}'.format(cdash_project_enc))
tty.debug('cdash_build_name = {0}'.format(cdash_build_name))
tty.debug('cdash_site = {0}'.format(cdash_site))
tty.debug('related_builds = {0}'.format(related_builds))
tty.debug('job_spec_buildgroup = {0}'.format(job_spec_buildgroup))
# Is this a pipeline run on a spack PR or a merge to develop? It might
@@ -279,11 +276,11 @@ def ci_rebuild(args):
# Whatever form of root_spec we got, use it to get a map giving us concrete
# specs for this job and all of its dependencies.
spec_map = spack_ci.get_concrete_specs(
env, root_spec, job_spec_pkg_name, related_builds, compiler_action)
env, root_spec, job_spec_pkg_name, compiler_action)
job_spec = spec_map[job_spec_pkg_name]
job_spec_yaml_file = '{0}.yaml'.format(job_spec_pkg_name)
job_spec_yaml_path = os.path.join(repro_dir, job_spec_yaml_file)
job_spec_json_file = '{0}.json'.format(job_spec_pkg_name)
job_spec_json_path = os.path.join(repro_dir, job_spec_json_file)
# To provide logs, cdash reports, etc for developer download/perusal,
# these things have to be put into artifacts. This means downstream
@@ -337,23 +334,23 @@ def ci_rebuild(args):
# using a compiler already installed on the target system).
spack_ci.configure_compilers(compiler_action)
# Write this job's spec yaml into the reproduction directory, and it will
# Write this job's spec json into the reproduction directory, and it will
# also be used in the generated "spack install" command to install the spec
tty.debug('job concrete spec path: {0}'.format(job_spec_yaml_path))
with open(job_spec_yaml_path, 'w') as fd:
fd.write(job_spec.to_yaml(hash=ht.build_hash))
tty.debug('job concrete spec path: {0}'.format(job_spec_json_path))
with open(job_spec_json_path, 'w') as fd:
fd.write(job_spec.to_json(hash=ht.dag_hash))
# Write the concrete root spec yaml into the reproduction directory
root_spec_yaml_path = os.path.join(repro_dir, 'root.yaml')
with open(root_spec_yaml_path, 'w') as fd:
fd.write(spec_map['root'].to_yaml(hash=ht.build_hash))
# Write the concrete root spec json into the reproduction directory
root_spec_json_path = os.path.join(repro_dir, 'root.json')
with open(root_spec_json_path, 'w') as fd:
fd.write(spec_map['root'].to_json(hash=ht.dag_hash))
# Write some other details to aid in reproduction into an artifact
repro_file = os.path.join(repro_dir, 'repro.json')
repro_details = {
'job_name': ci_job_name,
'job_spec_yaml': job_spec_yaml_file,
'root_spec_yaml': 'root.yaml',
'job_spec_json': job_spec_json_file,
'root_spec_json': 'root.json',
'ci_project_dir': ci_project_dir
}
with open(repro_file, 'w') as fd:
@@ -362,32 +359,30 @@ def ci_rebuild(args):
# Write information about spack into an artifact in the repro dir
spack_info = spack_ci.get_spack_info()
spack_info_file = os.path.join(repro_dir, 'spack_info.txt')
with open(spack_info_file, 'w') as fd:
fd.write('\n{0}\n'.format(spack_info))
with open(spack_info_file, 'wb') as fd:
fd.write(b'\n')
fd.write(spack_info.encode('utf8'))
fd.write(b'\n')
# If we decided there should be a temporary storage mechanism, add that
# mirror now so it's used when we check for a full hash match already
# mirror now so it's used when we check for a hash match already
# built for this spec.
if pipeline_mirror_url:
spack.mirror.add(spack_ci.TEMP_STORAGE_MIRROR_NAME,
pipeline_mirror_url,
cfg.default_modify_scope())
cdash_build_id = None
cdash_build_stamp = None
# Check configured mirrors for a built spec with a matching full hash
matches = bindist.get_mirrors_for_spec(
job_spec, full_hash_match=True, index_only=False)
# Check configured mirrors for a built spec with a matching hash
matches = bindist.get_mirrors_for_spec(job_spec, index_only=False)
if matches:
# Got a full hash match on at least one configured mirror. All
# Got a hash match on at least one configured mirror. All
# matches represent the fully up-to-date spec, so should all be
# equivalent. If artifacts mirror is enabled, we just pick one
# of the matches and download the buildcache files from there to
# the artifacts, so they're available to be used by dependent
# jobs in subsequent stages.
tty.msg('No need to rebuild {0}, found full hash match at: '.format(
tty.msg('No need to rebuild {0}, found hash match at: '.format(
job_spec_pkg_name))
for match in matches:
tty.msg(' {0}'.format(match['mirror_url']))
@@ -400,14 +395,13 @@ def ci_rebuild(args):
bindist.download_single_spec(
job_spec,
build_cache_dir,
require_cdashid=False,
mirror_url=matching_mirror
)
# Now we are done and successful
sys.exit(0)
# No full hash match anywhere means we need to rebuild spec
# No hash match anywhere means we need to rebuild spec
# Start with spack arguments
install_args = [base_arg for base_arg in CI_REBUILD_INSTALL_BASE_ARGS]
@@ -419,7 +413,6 @@ def ci_rebuild(args):
install_args.extend([
'install',
'--keep-stage',
'--require-full-hash-match',
])
can_verify = spack_ci.can_verify_binaries()
@@ -427,16 +420,8 @@ def ci_rebuild(args):
if not verify_binaries:
install_args.append('--no-check-signature')
# If CDash reporting is enabled, we first register this build with
# the specified CDash instance, then relate the build to those of
# its dependencies.
if enable_cdash:
tty.debug('CDash: Registering build')
(cdash_build_id,
cdash_build_stamp) = spack_ci.register_cdash_build(
cdash_build_name, cdash_base_url, cdash_project,
cdash_site, job_spec_buildgroup)
# Add additional arguments to `spack install` for CDash reporting.
cdash_upload_url = '{0}/submit.php?project={1}'.format(
cdash_base_url, cdash_project_enc)
@@ -444,15 +429,9 @@ def ci_rebuild(args):
'--cdash-upload-url', cdash_upload_url,
'--cdash-build', cdash_build_name,
'--cdash-site', cdash_site,
'--cdash-buildstamp', cdash_build_stamp,
'--cdash-track', job_spec_buildgroup,
])
if cdash_build_id is not None:
tty.debug('CDash: Relating build with dependency builds')
spack_ci.relate_cdash_builds(
spec_map, cdash_base_url, cdash_build_id, cdash_project,
[pipeline_mirror_url, pr_mirror_url, remote_mirror_url])
# A compiler action of 'FIND_ANY' means we are building a bootstrap
# compiler or one of its deps.
# TODO: when compilers are dependencies, we should include --no-add
@@ -461,8 +440,8 @@ def ci_rebuild(args):
# TODO: once we have the concrete spec registry, use the DAG hash
# to identify the spec to install, rather than the concrete spec
# yaml file.
install_args.extend(['-f', job_spec_yaml_path])
# json file.
install_args.extend(['-f', job_spec_json_path])
tty.debug('Installing {0} from source'.format(job_spec.name))
tty.debug('spack install arguments: {0}'.format(
@@ -495,13 +474,13 @@ def ci_rebuild(args):
tty.debug('spack install exited {0}'.format(install_exit_code))
# If a spec fails to build in a spack develop pipeline, we add it to a
# list of known broken full hashes. This allows spack PR pipelines to
# list of known broken hashes. This allows spack PR pipelines to
# avoid wasting compute cycles attempting to build those hashes.
if install_exit_code == INSTALL_FAIL_CODE and spack_is_develop_pipeline:
tty.debug('Install failed on develop')
if 'broken-specs-url' in gitlab_ci:
broken_specs_url = gitlab_ci['broken-specs-url']
dev_fail_hash = job_spec.full_hash()
dev_fail_hash = job_spec.dag_hash()
broken_spec_path = url_util.join(broken_specs_url, dev_fail_hash)
tty.msg('Reporting broken develop build as: {0}'.format(
broken_spec_path))
@@ -512,7 +491,7 @@ def ci_rebuild(args):
'broken-spec': {
'job-url': get_env_var('CI_JOB_URL'),
'pipeline-url': get_env_var('CI_PIPELINE_URL'),
'concrete-spec-yaml': job_spec.to_dict(hash=ht.full_hash)
'concrete-spec-dict': job_spec.to_dict(hash=ht.dag_hash)
}
}
@@ -557,35 +536,23 @@ def ci_rebuild(args):
# per-PR mirror, if this is a PR pipeline
if buildcache_mirror_url:
spack_ci.push_mirror_contents(
env, job_spec_yaml_path, buildcache_mirror_url, sign_binaries
env, job_spec_json_path, buildcache_mirror_url, sign_binaries
)
if cdash_build_id:
tty.debug('Writing cdashid ({0}) to remote mirror: {1}'.format(
cdash_build_id, buildcache_mirror_url))
spack_ci.write_cdashid_to_mirror(
cdash_build_id, job_spec, buildcache_mirror_url)
# Create another copy of that buildcache in the per-pipeline
# temporary storage mirror (this is only done if either
# artifacts buildcache is enabled or a temporary storage url
# prefix is set)
if pipeline_mirror_url:
spack_ci.push_mirror_contents(
env, job_spec_yaml_path, pipeline_mirror_url, sign_binaries
env, job_spec_json_path, pipeline_mirror_url, sign_binaries
)
if cdash_build_id:
tty.debug('Writing cdashid ({0}) to remote mirror: {1}'.format(
cdash_build_id, pipeline_mirror_url))
spack_ci.write_cdashid_to_mirror(
cdash_build_id, job_spec, pipeline_mirror_url)
# If this is a develop pipeline, check if the spec that we just built is
# on the broken-specs list. If so, remove it.
if spack_is_develop_pipeline and 'broken-specs-url' in gitlab_ci:
broken_specs_url = gitlab_ci['broken-specs-url']
just_built_hash = job_spec.full_hash()
just_built_hash = job_spec.dag_hash()
broken_spec_path = url_util.join(broken_specs_url, just_built_hash)
if web_util.url_exists(broken_spec_path):
tty.msg('Removing {0} from the list of broken specs'.format(

View File

@@ -117,7 +117,7 @@ def format(self, cmd):
'virtual': '_providers',
'namespace': '_repos',
'hash': '_all_resource_hashes',
'pytest': '_tests',
'pytest': '_unit_tests',
}

View File

@@ -35,6 +35,9 @@ def shell_init_instructions(cmd, equivalent):
color.colorize("@*c{For fish:}"),
" source %s/setup-env.fish" % spack.paths.share_path,
"",
color.colorize("@*c{For Windows batch:}"),
" source %s/spack_cmd.bat" % spack.paths.share_path,
"",
"Or, if you do not want to use shell support, run " + (
"one of these" if shell_specific else "this") + " instead:",
"",
@@ -45,6 +48,7 @@ def shell_init_instructions(cmd, equivalent):
equivalent.format(sh_arg="--sh ") + " # bash/zsh/sh",
equivalent.format(sh_arg="--csh ") + " # csh/tcsh",
equivalent.format(sh_arg="--fish") + " # fish",
equivalent.format(sh_arg="--bat ") + " # batch"
]
else:
msg += [" " + equivalent]

View File

@@ -18,6 +18,8 @@
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ['clean', 'dirty'])
arguments.add_concretizer_args(subparser)
subparser.add_argument(
'--dump', metavar="FILE",
help="dump a source-able environment to FILE"

View File

@@ -22,6 +22,9 @@ def setup_parser(subparser):
help="""Concretize with test dependencies. When 'root' is chosen, test
dependencies are only added for the environment's root specs. When 'all' is
chosen, test dependencies are enabled for all packages in the environment.""")
subparser.add_argument(
'-q', '--quiet', action='store_true',
help="Don't print concretized specs")
spack.cmd.common.arguments.add_concretizer_args(subparser)
@@ -38,5 +41,6 @@ def concretize(parser, args):
with env.write_transaction():
concretized_specs = env.concretize(force=args.force, tests=tests)
ev.display_specs(concretized_specs)
if not args.quiet:
ev.display_specs(concretized_specs)
env.write()

View File

@@ -187,6 +187,27 @@ def cmake_args(self):
return args"""
class LuaPackageTemplate(PackageTemplate):
"""Provides appropriate overrides for LuaRocks-based packages"""
base_class_name = 'LuaPackage'
body_def = """\
def luarocks_args(self):
# FIXME: Add arguments to `luarocks make` other than rockspec path
# FIXME: If not needed delete this function
args = []
return args"""
def __init__(self, name, url, *args, **kwargs):
# If the user provided `--name lua-lpeg`, don't rename it lua-lua-lpeg
if not name.startswith('lua-'):
# Make it more obvious that we are renaming the package
tty.msg("Changing package name from {0} to lua-{0}".format(name))
name = 'lua-{0}'.format(name)
super(LuaPackageTemplate, self).__init__(name, url, *args, **kwargs)
class MesonPackageTemplate(PackageTemplate):
"""Provides appropriate overrides for meson-based packages"""
@@ -258,6 +279,42 @@ def install(self, spec, prefix):
bazel()"""
class RacketPackageTemplate(PackageTemplate):
"""Provides approriate overrides for Racket extensions"""
base_class_name = 'RacketPackage'
url_line = """\
# FIXME: set the proper location from which to fetch your package
git = "git@github.com:example/example.git"
"""
dependencies = """\
# FIXME: Add dependencies if required. Only add the racket dependency
# if you need specific versions. A generic racket dependency is
# added implicity by the RacketPackage class.
# depends_on('racket@8.3:', type=('build', 'run'))"""
body_def = """\
# FIXME: specify the name of the package,
# as it should appear to ``raco pkg install``
name = '{0}'
# FIXME: set to true if published on pkgs.racket-lang.org
# pkgs = False
# FIXME: specify path to the root directory of the
# package, if not the base directory
# subdirectory = None
"""
def __init__(self, name, url, *args, **kwargs):
# If the user provided `--name rkt-scribble`, don't rename it rkt-rkt-scribble
if not name.startswith('rkt-'):
# Make it more obvious that we are renaming the package
tty.msg("Changing package name from {0} to rkt-{0}".format(name))
name = 'rkt-{0}'.format(name)
self.body_def = self.body_def.format(name[4:])
super(RacketPackageTemplate, self).__init__(name, url, *args, **kwargs)
class PythonPackageTemplate(PackageTemplate):
"""Provides appropriate overrides for python extensions"""
base_class_name = 'PythonPackage'
@@ -536,6 +593,7 @@ def __init__(self, name, *args, **kwargs):
'bazel': BazelPackageTemplate,
'python': PythonPackageTemplate,
'r': RPackageTemplate,
'racket': RacketPackageTemplate,
'perlmake': PerlmakePackageTemplate,
'perlbuild': PerlbuildPackageTemplate,
'octave': OctavePackageTemplate,
@@ -543,6 +601,7 @@ def __init__(self, name, *args, **kwargs):
'makefile': MakefilePackageTemplate,
'intel': IntelPackageTemplate,
'meson': MesonPackageTemplate,
'lua': LuaPackageTemplate,
'sip': SIPPackageTemplate,
'generic': PackageTemplate,
}
@@ -607,6 +666,9 @@ def __call__(self, stage, url):
if url.endswith('.whl') or '.whl#' in url:
self.build_system = 'python'
return
if url.endswith('.rock'):
self.build_system = 'lua'
return
# A list of clues that give us an idea of the build system a package
# uses. If the regular expression matches a file contained in the
@@ -631,6 +693,7 @@ def __call__(self, stage, url):
(r'/Rakefile$', 'ruby'),
(r'/setup\.rb$', 'ruby'),
(r'/.*\.pro$', 'qmake'),
(r'/.*\.rockspec$', 'lua'),
(r'/(GNU)?[Mm]akefile$', 'makefile'),
(r'/DESCRIPTION$', 'octave'),
(r'/meson\.build$', 'meson'),
@@ -758,7 +821,15 @@ def get_versions(args, name):
# Default guesser
guesser = BuildSystemGuesser()
if args.url is not None and args.template != 'bundle':
valid_url = True
try:
spack.util.url.require_url_format(args.url)
if args.url.startswith('file://'):
valid_url = False # No point in spidering these
except ValueError:
valid_url = False
if args.url is not None and args.template != 'bundle' and valid_url:
# Find available versions
try:
url_dict = spack.util.web.find_versions_of_archive(args.url)

View File

@@ -8,9 +8,9 @@
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.environment as ev
import spack.graph
import spack.store
from spack.filesystem_view import YamlFilesystemView
from spack.graph import topological_sort
description = "deactivate a package extension"
section = "extensions"
@@ -32,6 +32,10 @@ def setup_parser(subparser):
def deactivate(parser, args):
tty.warn("spack deactivate is deprecated in favor of "
"environments and will be removed in v0.19.0")
specs = spack.cmd.parse_specs(args.spec)
if len(specs) != 1:
tty.die("deactivate requires one spec. %d given." % len(specs))
@@ -68,11 +72,8 @@ def deactivate(parser, args):
tty.msg("Deactivating %s and all dependencies." %
pkg.spec.short_spec)
topo_order = topological_sort(spec)
index = spec.index()
for name in topo_order:
espec = index[name]
nodes_in_topological_order = spack.graph.topological_sort(spec)
for espec in reversed(nodes_in_topological_order):
epkg = espec.package
if epkg.extends(pkg.extendee_spec):
if epkg.is_activated(view) or args.force:

View File

@@ -19,6 +19,7 @@
import os
import llnl.util.tty as tty
from llnl.util.symlink import symlink
import spack.cmd
import spack.cmd.common.arguments as arguments
@@ -123,7 +124,7 @@ def deprecate(parser, args):
if not answer:
tty.die('Will not deprecate any packages.')
link_fn = os.link if args.link_type == 'hard' else os.symlink
link_fn = os.link if args.link_type == 'hard' else symlink
for dcate, dcator in zip(all_deprecate, all_deprecators):
dcate.package.do_deprecate(dcator, link_fn)

View File

@@ -91,8 +91,8 @@ def dev_build(self, args):
spec.concretize()
package = spack.repo.get(spec)
if package.installed:
tty.error("Already installed in %s" % package.prefix)
if spec.installed:
tty.error("Already installed in %s" % spec.prefix)
tty.msg("Uninstall or try adding a version suffix for this dev build.")
sys.exit(1)

View File

@@ -68,8 +68,14 @@ def compare_specs(a, b, to_string=False, color=None):
# Prepare a solver setup to parse differences
setup = asp.SpackSolverSetup()
a_facts = set(t for t in setup.spec_clauses(a, body=True, expand_hashes=True))
b_facts = set(t for t in setup.spec_clauses(b, body=True, expand_hashes=True))
# get facts for specs, making sure to include build dependencies of concrete
# specs and to descend into dependency hashes so we include all facts.
a_facts = set(t for t in setup.spec_clauses(
a, body=True, expand_hashes=True, concrete_build_deps=True,
))
b_facts = set(t for t in setup.spec_clauses(
b, body=True, expand_hashes=True, concrete_build_deps=True,
))
# We want to present them to the user as simple key: values
intersect = sorted(a_facts.intersection(b_facts))

View File

@@ -8,6 +8,8 @@
import sys
import tempfile
import six
import llnl.util.filesystem as fs
import llnl.util.tty as tty
from llnl.util.tty.colify import colify
@@ -41,7 +43,8 @@
'loads',
'view',
'update',
'revert'
'revert',
'depfile'
]
@@ -60,6 +63,9 @@ def env_activate_setup_parser(subparser):
shells.add_argument(
'--fish', action='store_const', dest='shell', const='fish',
help="print fish commands to activate the environment")
shells.add_argument(
'--bat', action='store_const', dest='shell', const='bat',
help="print bat commands to activate the environment")
view_options = subparser.add_mutually_exclusive_group()
view_options.add_argument(
@@ -173,6 +179,9 @@ def env_deactivate_setup_parser(subparser):
shells.add_argument(
'--fish', action='store_const', dest='shell', const='fish',
help="print fish commands to activate the environment")
shells.add_argument(
'--bat', action='store_const', dest='shell', const='bat',
help="print bat commands to activate the environment")
def env_deactivate(args):
@@ -517,6 +526,154 @@ def env_revert(args):
tty.msg(msg.format(manifest_file))
def env_depfile_setup_parser(subparser):
"""generate a depfile from the concrete environment specs"""
subparser.add_argument(
'--make-target-prefix', default=None, metavar='TARGET',
help='prefix Makefile targets with <TARGET>/<name>. By default the absolute '
'path to the directory makedeps under the environment metadata dir is '
'used. Can be set to an empty string --make-target-prefix \'\'.')
subparser.add_argument(
'--make-disable-jobserver', default=True, action='store_false',
dest='jobserver', help='disable POSIX jobserver support.')
subparser.add_argument(
'-o', '--output', default=None, metavar='FILE',
help='write the depfile to FILE rather than to stdout')
subparser.add_argument(
'-G', '--generator', default='make', choices=('make',),
help='specify the depfile type. Currently only make is supported.')
def env_depfile(args):
# Currently only make is supported.
spack.cmd.require_active_env(cmd_name='env depfile')
env = ev.active_environment()
# Maps each hash in the environment to a string of install prereqs
hash_to_prereqs = {}
hash_to_spec = {}
if args.make_target_prefix is None:
target_prefix = os.path.join(env.env_subdir_path, 'makedeps')
else:
target_prefix = args.make_target_prefix
def get_target(name):
# The `all`, `fetch` and `clean` targets are phony. It doesn't make sense to
# have /abs/path/to/env/metadir/{all,clean} targets. But it *does* make
# sense to have a prefix like `env/all`, `env/fetch`, `env/clean` when they are
# supposed to be included
if name in ('all', 'fetch-all', 'clean') and os.path.isabs(target_prefix):
return name
else:
return os.path.join(target_prefix, name)
def get_install_target(name):
return os.path.join(target_prefix, '.install', name)
def get_fetch_target(name):
return os.path.join(target_prefix, '.fetch', name)
for _, spec in env.concretized_specs():
for s in spec.traverse(root=True):
hash_to_spec[s.dag_hash()] = s
hash_to_prereqs[s.dag_hash()] = [
get_install_target(dep.dag_hash()) for dep in s.dependencies()]
root_dags = [s.dag_hash() for _, s in env.concretized_specs()]
# Root specs without deps are the prereqs for the environment target
root_install_targets = [get_install_target(h) for h in root_dags]
# All package install targets, not just roots.
all_install_targets = [get_install_target(h) for h in hash_to_spec.keys()]
# Fetch targets for all packages in the environment, not just roots.
all_fetch_targets = [get_fetch_target(h) for h in hash_to_spec.keys()]
buf = six.StringIO()
buf.write("""SPACK ?= spack
.PHONY: {} {} {}
{}: {}
{}: {}
{}: {}
\t@touch $@
{}: {}
\t@touch $@
{}:
\t@mkdir -p {} {}
{}: | {}
\t$(info Fetching $(SPEC))
\t$(SPACK) -e '{}' fetch $(SPACK_FETCH_FLAGS) /$(notdir $@) && touch $@
{}: {}
\t$(info Installing $(SPEC))
\t{}$(SPACK) -e '{}' install $(SPACK_INSTALL_FLAGS) --only-concrete --only=package \
--no-add /$(notdir $@) && touch $@
""".format(get_target('all'), get_target('fetch-all'), get_target('clean'),
get_target('all'), get_target('env'),
get_target('fetch-all'), get_target('fetch'),
get_target('env'), ' '.join(root_install_targets),
get_target('fetch'), ' '.join(all_fetch_targets),
get_target('dirs'), get_target('.fetch'), get_target('.install'),
get_target('.fetch/%'), get_target('dirs'),
env.path,
get_target('.install/%'), get_target('.fetch/%'),
'+' if args.jobserver else '', env.path))
# Targets are of the form <prefix>/<name>: [<prefix>/<depname>]...,
# The prefix can be an empty string, in that case we don't add the `/`.
# The name is currently the dag hash of the spec. In principle it
# could be the package name in case of `concretization: together` so
# it can be more easily referred to, but for now we don't special case
# this.
fmt = '{name}{@version}{%compiler}{variants}{arch=architecture}'
# Set SPEC for each hash
buf.write('# Set the human-readable spec for each target\n')
for dag_hash in hash_to_prereqs.keys():
formatted_spec = hash_to_spec[dag_hash].format(fmt)
buf.write("{}: SPEC = {}\n".format(get_target('%/' + dag_hash), formatted_spec))
buf.write('\n')
# Set install dependencies
buf.write('# Install dependencies\n')
for parent, children in hash_to_prereqs.items():
if not children:
continue
buf.write('{}: {}\n'.format(get_install_target(parent), ' '.join(children)))
buf.write('\n')
# Clean target: remove target files but not their folders, cause
# --make-target-prefix can be any existing directory we do not control,
# including empty string (which means deleting the containing folder
# would delete the folder with the Makefile)
buf.write("{}:\n\trm -f -- {} {} {} {}\n".format(
get_target('clean'),
get_target('env'),
get_target('fetch'),
' '.join(all_fetch_targets),
' '.join(all_install_targets)))
makefile = buf.getvalue()
# Finally write to stdout/file.
if args.output:
with open(args.output, 'w') as f:
f.write(makefile)
else:
sys.stdout.write(makefile)
#: Dictionary mapping subcommand names and aliases to functions
subcommand_functions = {}

View File

@@ -5,6 +5,7 @@
from __future__ import print_function
import argparse
import os
import sys
import llnl.util.tty as tty
@@ -13,6 +14,7 @@
import spack
import spack.cmd
import spack.cmd.common.arguments
import spack.cray_manifest as cray_manifest
import spack.detection
import spack.error
import spack.util.environment
@@ -35,6 +37,9 @@ def setup_parser(subparser):
find_parser.add_argument(
'--not-buildable', action='store_true', default=False,
help="packages with detected externals won't be built with Spack")
find_parser.add_argument(
'-p', '--path', default=None, action='append',
help="Alternative search paths for finding externals. May be repeated")
find_parser.add_argument(
'--scope', choices=scopes, metavar=scopes_metavar,
default=spack.config.default_modify_scope('packages'),
@@ -55,8 +60,40 @@ def setup_parser(subparser):
'list', help='list detectable packages, by repository and name'
)
read_cray_manifest = sp.add_parser(
'read-cray-manifest', help=(
"consume a Spack-compatible description of externally-installed "
"packages, including dependency relationships"
)
)
read_cray_manifest.add_argument(
'--file', default=None,
help="specify a location other than the default")
read_cray_manifest.add_argument(
'--directory', default=None,
help="specify a directory storing a group of manifest files")
read_cray_manifest.add_argument(
'--dry-run', action='store_true', default=False,
help="don't modify DB with files that are read")
read_cray_manifest.add_argument(
'--fail-on-error', action='store_true',
help=("if a manifest file cannot be parsed, fail and report the "
"full stack trace")
)
def external_find(args):
if args.all or not (args.tags or args.packages):
# If the user calls 'spack external find' with no arguments, and
# this system has a description of installed packages, then we should
# consume it automatically.
try:
_collect_and_consume_cray_manifest_files()
except NoManifestFileError:
# 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
# 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:
args.tags = ['core-packages', 'build-tools']
@@ -90,7 +127,11 @@ def external_find(args):
if not args.tags and not packages_to_check:
packages_to_check = spack.repo.path.all_packages()
detected_packages = spack.detection.by_executable(packages_to_check)
detected_packages = spack.detection.by_executable(
packages_to_check, path_hints=args.path)
detected_packages.update(spack.detection.by_library(
packages_to_check, path_hints=args.path))
new_entries = spack.detection.update_configuration(
detected_packages, scope=args.scope, buildable=not args.not_buildable
)
@@ -104,6 +145,56 @@ def external_find(args):
tty.msg('No new external packages detected')
def external_read_cray_manifest(args):
_collect_and_consume_cray_manifest_files(
manifest_file=args.file,
manifest_directory=args.directory,
dry_run=args.dry_run,
fail_on_error=args.fail_on_error
)
def _collect_and_consume_cray_manifest_files(
manifest_file=None, manifest_directory=None, dry_run=False,
fail_on_error=False):
manifest_files = []
if manifest_file:
manifest_files.append(manifest_file)
manifest_dirs = []
if manifest_directory:
manifest_dirs.append(manifest_directory)
if os.path.isdir(cray_manifest.default_path):
tty.debug(
"Cray manifest path {0} exists: collecting all files to read."
.format(cray_manifest.default_path))
manifest_dirs.append(cray_manifest.default_path)
else:
tty.debug("Default Cray manifest directory {0} does not exist."
.format(cray_manifest.default_path))
for directory in manifest_dirs:
for fname in os.listdir(directory):
manifest_files.append(os.path.join(directory, fname))
if not manifest_files:
raise NoManifestFileError(
"--file/--directory not specified, and no manifest found at {0}"
.format(cray_manifest.default_path))
for path in manifest_files:
try:
cray_manifest.read(path, not dry_run)
except (spack.compilers.UnknownCompilerError, spack.error.SpackError) as e:
if fail_on_error:
raise
else:
tty.warn("Failure reading manifest file: {0}"
"\n\t{1}".format(path, str(e)))
def external_list(args):
# Trigger a read of all packages, might take a long time.
list(spack.repo.path.all_packages())
@@ -115,5 +206,10 @@ def external_list(args):
def external(parser, args):
action = {'find': external_find, 'list': external_list}
action = {'find': external_find, 'list': external_list,
'read-cray-manifest': external_read_cray_manifest}
action[args.external_command](args)
class NoManifestFileError(spack.error.SpackError):
pass

View File

@@ -69,14 +69,10 @@ def fetch(parser, args):
for spec in specs:
if args.missing or args.dependencies:
for s in spec.traverse():
package = spack.repo.get(s)
for s in spec.traverse(root=False):
# Skip already-installed packages with --missing
if args.missing and package.installed:
if args.missing and s.installed:
continue
package.do_fetch()
package = spack.repo.get(spec)
package.do_fetch()
s.package.do_fetch()
spec.package.do_fetch()

View File

@@ -202,6 +202,12 @@ def display_env(env, args, decorator):
def find(parser, args):
if args.bootstrap:
tty.warn(
"`spack find --bootstrap` is deprecated and will be removed in v0.19.",
"Use `spack --bootstrap find` instead."
)
if args.bootstrap:
bootstrap_store_path = spack.bootstrap.store_path()
with spack.bootstrap.ensure_bootstrap_configuration():

View File

@@ -8,6 +8,7 @@
import spack.binary_distribution
import spack.cmd.common.arguments as arguments
import spack.mirror
import spack.paths
import spack.util.gpg
@@ -200,8 +201,13 @@ def gpg_verify(args):
def gpg_publish(args):
"""publish public keys to a build cache"""
# TODO(opadron): switch to using the mirror args once #17547 is merged
mirror = args.directory
mirror = None
if args.directory:
mirror = spack.mirror.Mirror(args.directory, args.directory)
elif args.mirror_name:
mirror = spack.mirror.MirrorCollection().lookup(args.mirror_name)
elif args.mirror_url:
mirror = spack.mirror.Mirror(args.mirror_url, args.mirror_url)
spack.binary_distribution.push_keys(
mirror, keys=args.keys, regenerate_index=args.rebuild_index)

View File

@@ -5,6 +5,7 @@
from __future__ import print_function
import inspect
import textwrap
from six.moves import zip_longest
@@ -17,7 +18,7 @@
import spack.fetch_strategy as fs
import spack.repo
import spack.spec
from spack.package import preferred_version
from spack.package import has_test_method, preferred_version
description = 'get detailed information on a particular package'
section = 'basic'
@@ -39,6 +40,25 @@ def pad(string):
def setup_parser(subparser):
subparser.add_argument(
'-a', '--all', action='store_true', default=False,
help="output all package information"
)
options = [
('--detectable', print_detectable.__doc__),
('--maintainers', print_maintainers.__doc__),
('--no-dependencies', 'do not ' + print_dependencies.__doc__),
('--no-variants', 'do not ' + print_variants.__doc__),
('--no-versions', 'do not ' + print_versions.__doc__),
('--phases', print_phases.__doc__),
('--tags', print_tags.__doc__),
('--tests', print_tests.__doc__),
('--virtuals', print_virtuals.__doc__),
]
for opt, help_comment in options:
subparser.add_argument(opt, action='store_true', help=help_comment)
arguments.add_common_arguments(subparser, ['package'])
@@ -145,33 +165,28 @@ def lines(self):
yield " " + self.fmt % t
def print_text_info(pkg):
"""Print out a plain text description of a package."""
def print_dependencies(pkg):
"""output build, link, and run package dependencies"""
header = section_title(
'{0}: '
).format(pkg.build_system_class) + pkg.name
color.cprint(header)
color.cprint('')
color.cprint(section_title('Description:'))
if pkg.__doc__:
color.cprint(color.cescape(pkg.format_doc(indent=4)))
else:
color.cprint(" None")
color.cprint(section_title('Homepage: ') + pkg.homepage)
if len(pkg.maintainers) > 0:
mnt = " ".join(['@@' + m for m in pkg.maintainers])
for deptype in ('build', 'link', 'run'):
color.cprint('')
color.cprint(section_title('Maintainers: ') + mnt)
color.cprint(section_title('%s Dependencies:' % deptype.capitalize()))
deps = sorted(pkg.dependencies_of_type(deptype))
if deps:
colify(deps, indent=4)
else:
color.cprint(' None')
def print_detectable(pkg):
"""output information on external detection"""
color.cprint('')
color.cprint(section_title('Externally Detectable: '))
# If the package has an 'executables' field, it can detect an installation
if hasattr(pkg, 'executables'):
# If the package has an 'executables' of 'libraries' field, it
# can detect an installation
if hasattr(pkg, 'executables') or hasattr(pkg, 'libraries'):
find_attributes = []
if hasattr(pkg, 'determine_version'):
find_attributes.append('version')
@@ -187,6 +202,31 @@ def print_text_info(pkg):
else:
color.cprint(' False')
def print_maintainers(pkg):
"""output package maintainers"""
if len(pkg.maintainers) > 0:
mnt = " ".join(['@@' + m for m in pkg.maintainers])
color.cprint('')
color.cprint(section_title('Maintainers: ') + mnt)
def print_phases(pkg):
"""output installation phases"""
if hasattr(pkg, 'phases') and pkg.phases:
color.cprint('')
color.cprint(section_title('Installation Phases:'))
phase_str = ''
for phase in pkg.phases:
phase_str += " {0}".format(phase)
color.cprint(phase_str)
def print_tags(pkg):
"""output package tags"""
color.cprint('')
color.cprint(section_title("Tags: "))
if hasattr(pkg, 'tags'):
@@ -195,6 +235,90 @@ def print_text_info(pkg):
else:
color.cprint(" None")
def print_tests(pkg):
"""output relevant build-time and stand-alone tests"""
# Some built-in base packages (e.g., Autotools) define callback (e.g.,
# check) inherited by descendant packages. These checks may not result
# in build-time testing if the package's build does not implement the
# expected functionality (e.g., a 'check' or 'test' targets).
#
# So the presence of a callback in Spack does not necessarily correspond
# to the actual presence of built-time tests for a package.
for callbacks, phase in [(pkg.build_time_test_callbacks, 'Build'),
(pkg.install_time_test_callbacks, 'Install')]:
color.cprint('')
color.cprint(section_title('Available {0} Phase Test Methods:'
.format(phase)))
names = []
if callbacks:
for name in callbacks:
if getattr(pkg, name, False):
names.append(name)
if names:
colify(sorted(names), indent=4)
else:
color.cprint(' None')
# PackageBase defines an empty install/smoke test but we want to know
# if it has been overridden and, therefore, assumed to be implemented.
color.cprint('')
color.cprint(section_title('Stand-Alone/Smoke Test Methods:'))
names = []
pkg_cls = pkg if inspect.isclass(pkg) else pkg.__class__
if has_test_method(pkg_cls):
pkg_base = spack.package.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
# accepted.
v_names = list(set([vspec.name for vspec in pkg.virtuals_provided]))
# hack for compilers that are not dependencies (yet)
# TODO: this all eventually goes away
c_names = ('gcc', 'intel', 'intel-parallel-studio', 'pgi')
if pkg.name in c_names:
v_names.extend(['c', 'cxx', 'fortran'])
if pkg.spec.satisfies('llvm+clang'):
v_names.extend(['c', 'cxx'])
# TODO Refactor END
v_specs = [spack.spec.Spec(v_name) for v_name in v_names]
for v_spec in v_specs:
try:
pkg = v_spec.package
pkg_cls = pkg if inspect.isclass(pkg) else pkg.__class__
if has_test_method(pkg_cls):
names.append('{0}.test'.format(pkg.name.lower()))
except spack.repo.UnknownPackageError:
pass
if names:
colify(sorted(names), indent=4)
else:
color.cprint(' None')
def print_variants(pkg):
"""output variants"""
color.cprint('')
color.cprint(section_title('Variants:'))
formatter = VariantFormatter(pkg.variants)
for line in formatter.lines:
color.cprint(color.cescape(line))
def print_versions(pkg):
"""output versions"""
color.cprint('')
color.cprint(section_title('Preferred version: '))
@@ -238,29 +362,9 @@ def print_text_info(pkg):
line = version(' {0}'.format(pad(v))) + color.cescape(url)
color.cprint(line)
color.cprint('')
color.cprint(section_title('Variants:'))
formatter = VariantFormatter(pkg.variants)
for line in formatter.lines:
color.cprint(color.cescape(line))
if hasattr(pkg, 'phases') and pkg.phases:
color.cprint('')
color.cprint(section_title('Installation Phases:'))
phase_str = ''
for phase in pkg.phases:
phase_str += " {0}".format(phase)
color.cprint(phase_str)
for deptype in ('build', 'link', 'run'):
color.cprint('')
color.cprint(section_title('%s Dependencies:' % deptype.capitalize()))
deps = sorted(pkg.dependencies_of_type(deptype))
if deps:
colify(deps, indent=4)
else:
color.cprint(' None')
def print_virtuals(pkg):
"""output virtual packages"""
color.cprint('')
color.cprint(section_title('Virtual Packages: '))
@@ -280,9 +384,39 @@ def print_text_info(pkg):
else:
color.cprint(" None")
color.cprint('')
def info(parser, args):
pkg = spack.repo.get(args.package)
print_text_info(pkg)
# Output core package information
header = section_title(
'{0}: '
).format(pkg.build_system_class) + pkg.name
color.cprint(header)
color.cprint('')
color.cprint(section_title('Description:'))
if pkg.__doc__:
color.cprint(color.cescape(pkg.format_doc(indent=4)))
else:
color.cprint(" None")
color.cprint(section_title('Homepage: ') + pkg.homepage)
# Now output optional information in expected order
sections = [
(args.all or args.maintainers, print_maintainers),
(args.all or args.detectable, print_detectable),
(args.all or args.tags, print_tags),
(args.all or not args.no_versions, print_versions),
(args.all or not args.no_variants, print_variants),
(args.all or args.phases, print_phases),
(args.all or not args.no_dependencies, print_dependencies),
(args.all or args.virtuals, print_virtuals),
(args.all or args.tests, print_tests),
]
for print_it, func in sections:
if print_it:
func(pkg)
color.cprint('')

View File

@@ -47,7 +47,6 @@ def update_kwargs_from_args(args, kwargs):
'explicit': True, # Always true for install command
'stop_at': args.until,
'unsigned': args.unsigned,
'full_hash_match': args.full_hash_match,
})
kwargs.update({
@@ -117,11 +116,6 @@ def setup_parser(subparser):
'--no-check-signature', action='store_true',
dest='unsigned', default=False,
help="do not check signatures of binary packages")
subparser.add_argument(
'--require-full-hash-match', action='store_true',
dest='full_hash_match', default=False, help="""when installing from
binary mirrors, do not install binary package unless the full hash of the
remote spec matches that of the local spec""")
subparser.add_argument(
'--show-log-on-error', action='store_true',
help="print full build log to stderr if build fails")
@@ -159,10 +153,6 @@ def setup_parser(subparser):
if 'all' is chosen, run package tests during installation for all
packages. If neither are chosen, don't run tests for any packages."""
)
testing.add_argument(
'--run-tests', action='store_true',
help='run package tests during installation (same as --test=all)'
)
subparser.add_argument(
'--log-format',
default=None,
@@ -316,11 +306,8 @@ def install(parser, args, **kwargs):
if args.log_file:
reporter.filename = args.log_file
if args.run_tests:
tty.warn("Deprecated option: --run-tests: use --test=all instead")
def get_tests(specs):
if args.test == 'all' or args.run_tests:
if args.test == 'all':
return True
elif args.test == 'root':
return [spec.name for spec in specs]
@@ -477,7 +464,7 @@ def get_tests(specs):
})
# If we are using the monitor, we send configs. and create build
# The full_hash is the main package id, the build_hash for others
# The dag_hash is the main package id
if args.use_monitor and specs:
monitor.new_configuration(specs)
install_specs(args, kwargs, zip(abstract_specs, specs))

View File

@@ -0,0 +1,116 @@
cmake_minimum_required (VERSION 3.13)
project(spack_installer NONE)
set(PYTHON_VERSION "3.9.0" CACHE STRING "Version of Python to build.")
set(PY_DOWNLOAD_LINK "https://www.paraview.org/files/dependencies")
set(PY_FILENAME "Python-${PYTHON_VERSION}-win64.tar.xz")
set(PYTHON_DIR "Python-${PYTHON_VERSION}")
if (SPACK_VERSION)
set(SPACK_DL "https://github.com/spack/spack/releases/download/v${SPACK_VERSION}")
set(SPACK_FILENAME "spack-${SPACK_VERSION}.tar.gz")
set(SPACK_DIR "spack-${SPACK_VERSION}")
# SPACK DOWLOAD AND EXTRACTION-----------------------------------
file(DOWNLOAD "${SPACK_DL}/${SPACK_FILENAME}"
"${CMAKE_CURRENT_BINARY_DIR}/${SPACK_FILENAME}"
STATUS download_status
)
list(GET download_status 0 res)
if(res)
list(GET download_status 1 err)
message(FATAL_ERROR "Failed to download ${SPACK_FILENAME} ${err}")
endif()
message(STATUS "Successfully downloaded ${SPACK_FILENAME}")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xfz
"${CMAKE_CURRENT_BINARY_DIR}/${SPACK_FILENAME}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
RESULT_VARIABLE res)
if(NOT res EQUAL 0)
message(FATAL_ERROR "Extraction of ${SPACK_FILENAME} failed.")
endif()
message(STATUS "Extracted ${SPACK_DIR}")
SET(SPACK_SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${SPACK_DIR}")
elseif(SPACK_SOURCE)
get_filename_component(SPACK_DIR ${SPACK_SOURCE} NAME)
else()
message(FATAL_ERROR "Must specify SPACK_VERSION or SPACK_SOURCE")
endif()
# GIT DOWNLOAD----------------------------------------------------
set(GIT_FILENAME "Git-2.31.1-64-bit.exe")
file(DOWNLOAD "https://github.com/git-for-windows/git/releases/download/v2.31.1.windows.1/Git-2.31.1-64-bit.exe"
"${CMAKE_CURRENT_BINARY_DIR}/${GIT_FILENAME}"
STATUS download_status
EXPECTED_HASH "SHA256=c43611eb73ad1f17f5c8cc82ae51c3041a2e7279e0197ccf5f739e9129ce426e"
)
list(GET download_status 0 res)
if(res)
list(GET download_status 1 err)
message(FATAL_ERROR "Failed to download ${GIT_FILENAME} ${err}")
endif()
message(STATUS "Successfully downloaded ${GIT_FILENAME}")
# PYTHON DOWLOAD AND EXTRACTION-----------------------------------
file(DOWNLOAD "${PY_DOWNLOAD_LINK}/${PY_FILENAME}"
"${CMAKE_CURRENT_BINARY_DIR}/${PY_FILENAME}"
STATUS download_status
EXPECTED_HASH "SHA256=f6aeebc6d1ff77418678ed5612b64ce61be6bc9ef3ab9c291ac557abb1783420"
)
list(GET download_status 0 res)
if(res)
list(GET download_status 1 err)
message(FATAL_ERROR "Failed to download ${PY_FILENAME} ${err}")
endif()
message(STATUS "Successfully downloaded ${PY_FILENAME}")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xfz
"${CMAKE_CURRENT_BINARY_DIR}/${PY_FILENAME}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
RESULT_VARIABLE res)
if(NOT res EQUAL 0)
message(FATAL_ERROR "Extraction of ${PY_FILENAME} failed.")
endif()
message(STATUS "Extracted ${PY_FILENAME}.")
# license must be a .txt or .rtf file
configure_file("${SPACK_LICENSE}" "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.rtf" COPYONLY)
#INSTALLATION COMMANDS---------------------------------------------------
install(DIRECTORY "${SPACK_SOURCE}/"
DESTINATION "${SPACK_DIR}")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Python-${PYTHON_VERSION}-win64/"
DESTINATION "${PYTHON_DIR}")
# CPACK Installer Instructions
set(CPACK_PACKAGE_NAME "Spack")
set(CPACK_PACKAGE_VENDOR "Lawrence Livermore National Laboratories")
set(CPACK_PACKAGE_VERSION "0.16.0")
set(CPACK_PACKAGE_DESCRIPTION "A flexible package manager designed to support multiple versions, configurations, platforms, and compilers.")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://spack.io")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_ICON "${SPACK_LOGO}")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.rtf")
#set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE")
# WIX options (the default)
set(CPACK_GENERATOR "WIX")
set(CPACK_WIX_PRODUCT_ICON "${SPACK_LOGO}")
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/banner493x58.bmp")
set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/patch.xml")
set(CPACK_WIX_UPGRADE_GUID "D2C703E4-721D-44EC-8016-BCB96BB64E0B")
set(CPACK_WIX_SKIP_PROGRAM_FOLDER TRUE)
set(SHORTCUT_GUID "099213BC-0D37-4F29-B758-60CA2A7E6DDA")
# Set full path to icon, shortcut in spack.wxs
set(SPACK_SHORTCUT "spack_cmd.bat")
configure_file("spack.wxs.in" "${CMAKE_CURRENT_BINARY_DIR}/spack.wxs")
configure_file("bundle.wxs.in" "${CMAKE_CURRENT_BINARY_DIR}/bundle.wxs")
set(CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/spack.wxs")
include(CPack)

View File

@@ -0,0 +1,85 @@
This README is a guide for creating a Spack installer for Windows using the
``make-installer`` command. The installer is an executable file that users
can run to install Spack like any other Windows binary.
Before proceeding, follow the setup instructions in Steps 1 and 2 of
[Getting Started on Windows](https://spack.readthedocs.io/en/latest/getting_started.html#windows_support).
# Step 1: Install prerequisites
The only additional prerequisite for making the installer is Wix. Wix is a
utility used for .msi creation and can be downloaded and installed at
https://wixtoolset.org/releases/. The Visual Studio extensions are not
necessary.
# Step 2: Make the installer
To use Spack, run ``spack_cmd.bat``. This will provide a Windows command
prompt with an environment properly set up with Spack and its prerequisites.
Ensure that Python and CMake are on your PATH. If needed, you may add the
CMake executable provided by Visual Studio to your path, which will look
something like:
``C:\Program Files (x86)\Microsoft Visual Studio\<year>\<distribution>\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake``
**IMPORTANT**: If you use Tab to complete any part of this path, the console
will automatically add quotation marks to the start and the end since it will
see the spaces and want to parse the whole of it as a string. This is
incorrect for our purposes so before submitting the command, ensure that the
quotes are removed. You will encounter configuration errors if you fail to do
this.
There are two ways to create the installer using Spack's ``make-installer``
command. The recommended method is to build the installer using a local
checkout of Spack source (release or development), using the
`-s` flag to specify the directory where the local checkout is. For
example, if the local checkout is in a directory called ``spack-develop``
and want to generate an installer with the source there, you can use:
``spack make-installer -s spack-develop tmp``
Both the Spack source directory (e.g. ``spack-develop``) and installer
destination directory (e.g. ``tmp``) may be an absolute path or relative to
the current working directory. The entire contents of the specified
directory will be included in the installer (e.g. .git files or local
changes).
Alternatively, if you would like to create an installer from a release version
of Spack, say, 0.16.0, and store it in ``tmp``, you can use the following
command:
``spack make-installer -v 0.16.0 tmp``
**IMPORTANT**: Windows features are not currently supported in Spack's
official release branches, so an installer created using this method will
*not* run on Windows.
Regardless of your method, a file called ``Spack.exe`` will be created
inside the destination directory. This executable bundles the Spack installer
(``Spack.msi`` also located in destination directory) and the git installer.
# Step 3: Run the installer
After accepting the terms of service, select where on your computer you would
like Spack installed, and after a few minutes Spack, Python and git will be
installed and ready for use.
**IMPORTANT**: To avoid permissions issues, it is recommended to select an
install location other than ``C:\Program Files``.
**IMPORTANT**: There is a specific option that must be chosen when letting Git
install. When given the option of adjusting your ``PATH``, choose the
``Git from the command line and also from 3rd-party software`` option. This will
automatically update your ``PATH`` variable to include the ``git`` command.
Certain Spack commands expect ``git`` to be part of the ``PATH``. If this step
is not performed properly, certain Spack comands will not work.
If your Spack installation needs to be modified, repaired, or uninstalled,
you can do any of these things by rerunning ``Spack.exe``.
Running the installer creates a shortcut on your desktop that, when
launched, will run ``spack_cmd.bat`` and launch a console with its initial
directory being wherever Spack was installed on your computer. If Python is
found on your PATH, that will be used. If not, the Python included with the
installer will be used when running Spack.

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Version="1.0.0.0" UpgradeCode="63C4E213-0297-4CFE-BB7B-7A77EB68E966"
IconSourceFile="@CPACK_WIX_PRODUCT_ICON@"
Name="Spack Package Manager"
Manufacturer="Lawrence Livermore National Laboratory">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="@CPACK_RESOURCE_FILE_LICENSE@"/>
</BootstrapperApplicationRef>
<Chain>
<MsiPackage
SourceFile="Spack.msi"
DisplayInternalUI="yes"/>
<ExePackage
SourceFile="Git-2.31.1-64-bit.exe"
DetectCondition="ExeDetectedVariable"
InstallCommand="@SPACK_GIT_VERBOSITY@ /SUPPRESSMSGBOXES"
RepairCommand="/VERYSILENT"
UninstallCommand="/VERYSILENT" />
</Chain>
</Bundle>
</Wix>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<CPackWiXPatch>
<CPackWiXFragment Id ="#PRODUCT">
<Property Id="DISABLEADVTSHORTCUTS" Value="1"/>
</CPackWiXFragment>
<CPackWiXFragment Id ="#PRODUCTFEATURE">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ProgramMenuDir"/>
</CPackWiXFragment>
</CPackWiXPatch>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Icon Id="icon.ico" SourceFile="@CPACK_WIX_PRODUCT_ICON@"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
</Fragment>
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="DesktopFolder" Name="Desktop" >
<Component Id="SpackDesktopShortCut" Guid="@CPACK_WIX_UPGRADE_GUID@">
<Shortcut Id="SpackDesktopShortCut"
Name="Spack Package Manager"
Description="Spack package manager"
Target="[INSTALL_ROOT]/@SPACK_DIR@/bin/@SPACK_SHORTCUT@"
Icon="icon1.ico">
<Icon Id="icon1.ico" SourceFile="@CPACK_WIX_PRODUCT_ICON@" />
</Shortcut>
<RegistryValue Root="HKCU" Key="Software\LLNL\Spack"
Type="integer" Value="1" Name="SpackDesktopShortCut" KeyPath="yes" />
</Component>
</Directory>
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ApplicationProgramsFolder" Name="Spack">
<Component Id="SpackStartShortCut" Guid="@SHORTCUT_GUID@">
<Shortcut Id="SpackStartMenuShortCut"
Name="Spack Package Manager"
Description="Spack package manager"
Target="[INSTALL_ROOT]/@SPACK_DIR@/bin/@SPACK_SHORTCUT@"
Icon="icon2.ico">
<Icon Id="icon2.ico" SourceFile="@CPACK_WIX_PRODUCT_ICON@" />
</Shortcut>
<RegistryValue Root="HKCU" Key="Software/LLNL/Spack"
Type="integer" Value="1" Name="SpackStartMenuShortCut" KeyPath="yes" />
</Component>
<Component Id="ProgramMenuDir" Guid="*">
<RemoveFolder Id="ProgramMenuDir" On="uninstall"/>
<RegistryValue Root="HKMU" Key="Software\LLNL\Spack"
Type="integer" Value="1" Name="installed" KeyPath="yes" />
</Component>
</Directory>
</Directory>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents">
<ComponentRef Id="SpackStartShortCut"/>
<ComponentRef Id="SpackDesktopShortCut"/>
</ComponentGroup>
</Fragment>
</Wix>

View File

@@ -33,6 +33,9 @@ def setup_parser(subparser):
shells.add_argument(
'--fish', action='store_const', dest='shell', const='fish',
help="print fish commands to load the package")
shells.add_argument(
'--bat', action='store_const', dest='shell', const='bat',
help="print bat commands to load the package")
subparser.add_argument(
'--first',

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