-
- Downloads
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
Showing
- lib/spack/docs/packaging_guide.rst 221 additions, 18 deletionslib/spack/docs/packaging_guide.rst
- lib/spack/spack/cmd/external.py 41 additions, 12 deletionslib/spack/spack/cmd/external.py
- lib/spack/spack/package.py 108 additions, 11 deletionslib/spack/spack/package.py
- lib/spack/spack/pkgkit.py 1 addition, 1 deletionlib/spack/spack/pkgkit.py
- lib/spack/spack/schema/packages.py 1 addition, 1 deletionlib/spack/spack/schema/packages.py
- lib/spack/spack/spec.py 4 additions, 0 deletionslib/spack/spack/spec.py
- lib/spack/spack/test/cmd/external.py 77 additions, 37 deletionslib/spack/spack/test/cmd/external.py
- share/spack/spack-completion.bash 5 additions, 1 deletionshare/spack/spack-completion.bash
- var/spack/repos/builtin/packages/automake/package.py 5 additions, 19 deletionsvar/spack/repos/builtin/packages/automake/package.py
- var/spack/repos/builtin/packages/cmake/package.py 8 additions, 21 deletionsvar/spack/repos/builtin/packages/cmake/package.py
- var/spack/repos/builtin/packages/gcc/package.py 105 additions, 5 deletionsvar/spack/repos/builtin/packages/gcc/package.py
Loading
Please register or sign in to comment