Getting Started • Community • Packaging Guide • Spack
This is the default Spack package repository, which contains the set of packages maintained by the Spack community. In Spack v1.0 and later, the repository here is automatically added to the Spack configuration.
To contribute, make a pull request to this repository with your package changes. We run continuous integration to test builds of a large number of Spack packages.
If you want to test your changes locally before submitting a PR, you can make
Spack use your local clone of spack-packages like this:
spack repo set --destination /path/to/local/spack-packages builtin
$spack can be used to form a relative path to your Spack root directory.
If you are migrating your pull requests from github.com/spack/spack, it is recommended to use the migration tool.
Spack is an open source project. Questions, discussion, and contributions are welcome.
- Slack workspace: spackpm.slack.com. To get an invitation, visit slack.spack.io.
- Matrix space: #spack-space:matrix.org: bridged to Slack.
This repository does not look like the original Spack package repositories. Its structure has been renovated a bit to make it work better with modern python tooling. The repo looks like this:
spack-packages/
repos/ # add this to PYTHONPATH for your editor
spack_repo/ # dedicated python package for spack repositories
builtin/ # namespace of this package repository
build_systems/ # build_systems: common base classes used by many packages
packages/ # This is where all the package.py files go
<PKG_NAME>/ # e.g., hdf5, zlib, mfem
package.py # actual package recipes
The new repository structure is designed around several goals:
- Make it easy to add the repository to
PYTHONPATH; - Allow common python code like
build_systemsto live in the package repo, not core Spack; and - Allow multiple repositories (e.g. something in addition to
builtin) to live in the same git repository.
If you use an editor like vscode, you should be able to point it directly to the repos/
directory and have the editor understand the package code.
You can query the packages built in this repository by visiting packages.spack.io.
The packages we build in CI here are available as Spack build caches. You can search hosted binaries at cache.spack.io.
Spack is distributed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their option.
All new contributions must be made under both the MIT and Apache-2.0 licenses.
See LICENSE-MIT, LICENSE-APACHE, COPYRIGHT, and NOTICE for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
LLNL-CODE-811652