-
- Downloads
Spack can be extended with external commands (#8612)
This provides a mechanism to implement a new Spack command in a separate directory, and with a small configuration change point Spack to the new command. To register the command, the directory must be added to the "extensions" section of config.yaml. The command directory name must have the prefix "spack-", and have the following layout: spack-X/ pytest.ini #optional, for testing X/ cmd/ name-of-command1.py name-of-command2.py ... tests/ #optional conftest.py test_name-of-command1.py templates/ #optional jinja templates, if needed And in config.yaml: config: extensions: - /path/to/spack-X If the extension includes tests, you can run them via spack by adding the --extension option, like "spack test --extension=X"
Showing
- lib/spack/llnl/util/lang.py 32 additions, 0 deletionslib/spack/llnl/util/lang.py
- lib/spack/spack/cmd/__init__.py 22 additions, 11 deletionslib/spack/spack/cmd/__init__.py
- lib/spack/spack/cmd/test.py 14 additions, 2 deletionslib/spack/spack/cmd/test.py
- lib/spack/spack/extensions.py 123 additions, 0 deletionslib/spack/spack/extensions.py
- lib/spack/spack/schema/config.py 4 additions, 0 deletionslib/spack/spack/schema/config.py
- lib/spack/spack/tengine.py 5 additions, 2 deletionslib/spack/spack/tengine.py
- lib/spack/spack/test/conftest.py 5 additions, 4 deletionslib/spack/spack/test/conftest.py
- lib/spack/spack/test/llnl/util/lang.py 20 additions, 0 deletionslib/spack/spack/test/llnl/util/lang.py
Loading
Please register or sign in to comment