summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-07-31 13:07:48 +0200
committerPeter Scheibel <scheibel1@llnl.gov>2020-08-10 11:59:05 -0700
commitc0d490ffbe7268e72b3214764d7b03aee9f65502 (patch)
tree4b186cfc39499cf346e7c61c23259b842aed15e0 /share
parent193e8333fa23a2e9b44d44a80e153d9a27033860 (diff)
downloadspack-c0d490ffbe7268e72b3214764d7b03aee9f65502.tar.gz
spack-c0d490ffbe7268e72b3214764d7b03aee9f65502.tar.bz2
spack-c0d490ffbe7268e72b3214764d7b03aee9f65502.tar.xz
spack-c0d490ffbe7268e72b3214764d7b03aee9f65502.zip
Simplify the detection protocol for packages
Packages can implement “detect_version” to support detection of external instances of a package. This is generally easier than implementing “determine_spec_details”. The API for determine_version is similar: for example you can return “None” to indicate that an executable is not an instance of a package. Users may implement a “determine_variants” method for a package. When doing external detection, executables are grouped by version and each group results in a single invocation of “determine_variants” for the associated spec. The method returns a string specifying the variants for the package. The method may additionally return a dictionary representing extra attributes for the package. These will be stored in the spec yaml and can be retrieved from self.spec.extra_attributes The Spack GCC package has been updated with an implementation of “determine_variants” which adds the following extra attributes to the package: c, cxx, fortran
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash6
1 files changed, 5 insertions, 1 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 329b9f28ff..876ed0c647 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -853,7 +853,7 @@ _spack_external() {
then
SPACK_COMPREPLY="-h --help"
else
- SPACK_COMPREPLY="find"
+ SPACK_COMPREPLY="find list"
fi
}
@@ -866,6 +866,10 @@ _spack_external_find() {
fi
}
+_spack_external_list() {
+ SPACK_COMPREPLY="-h --help"
+}
+
_spack_fetch() {
if $list_options
then