spack_repo.builtin.build_systems package¶
Submodules¶
spack_repo.builtin.build_systems.aspell_dict module¶
- class spack_repo.builtin.build_systems.aspell_dict.AspellBuilder(pkg: PackageBase)[source]¶
Bases:
AutotoolsBuilderThe Aspell builder is close enough to an autotools builder to allow specializing the builder class, so to use variables that are specific to the Aspell extensions.
- configure(pkg: AspellDictPackage, spec: Spec, prefix: Prefix)[source]¶
Run “configure”, with the arguments specified by the builder and an appropriately set prefix.
- class spack_repo.builtin.build_systems.aspell_dict.AspellDictPackage(spec: Spec)[source]¶
Bases:
AutotoolsPackageSpecialized class for building aspell dictionairies.
- AutotoolsBuilder¶
Override the default autotools builder
alias of
AspellBuilder
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.autotools module¶
- class spack_repo.builtin.build_systems.autotools.AutotoolsBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe autotools builder encodes the default way of installing software built with autotools. It has four phases that can be overridden, if need be:
They all have sensible defaults and for many packages the only thing necessary is to override the helper method
configure_args().For a finer tuning you may also override:
Method
Purpose
Specify
maketargets for the build phaseSpecify
maketargets for the install phaseRun build time tests if required
- autoreconf(pkg: AutotoolsPackage, spec: Spec, prefix: Prefix) None[source]¶
Not needed usually, configure should be already there
- autoreconf_extra_args: List[str]¶
Options to be passed to autoreconf when using the default implementation
- property autoreconf_search_path_args: List[str]¶
Search path includes for autoreconf. Add an -I flag for all aclocal dirs of build deps, skips the default path of automake, move external include flags to the back, since they might pull in unrelated m4 files shadowing spack dependencies.
- build(pkg: AutotoolsPackage, spec: Spec, prefix: Prefix) None[source]¶
Run “make” on the build targets specified by the builder.
- configure(pkg: AutotoolsPackage, spec: Spec, prefix: Prefix) None[source]¶
Run “configure”, with the arguments specified by the builder and an appropriately set prefix.
- configure_args() List[str][source]¶
Return the list of all the arguments that must be passed to configure, except
--prefixwhich will be pre-pended to the list.
- enable_or_disable(name: str, activation_value: Callable | str | None = None, variant: str | None = None) List[str][source]¶
Same as
with_or_without()but substitutewithwithenableandwithoutwithdisable.- Parameters:
name – name of a valid multi-valued variant
activation_value –
if present accepts a single value and returns the parameter to be used leading to an entry of the type
--enable-{name}={parameter}The special value “prefix” can also be assigned and will return
spec[name].prefixas activation parameter.
- Returns:
list of arguments to configure
- force_autoreconf¶
Set to true to force the autoreconf step even if configure is present
- install(pkg: AutotoolsPackage, spec: Spec, prefix: Prefix) None[source]¶
Run “make” on the install targets specified by the builder.
- install_libtool_archives¶
If False deletes all the .la files in the prefix folder after the installation. If True instead it installs them.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- property patch_config_files: bool¶
Whether to update old
config.guessandconfig.subfiles distributed with the tarball.This currently only applies to
ppc64le:,aarch64:, andriscv64target architectures.The substitutes are taken from the
gnuconfigpackage, which is automatically added as a build dependency for these architectures. In case system versions of these config files are required, thegnuconfigpackage can be marked external, with a prefix pointing to the directory containing the systemconfig.guessandconfig.subfiles.
- patch_libtool¶
Whether to update
libtool(e.g. for Arm/Clang/Fujitsu/NVHPC compilers)
- setup_build_environment(env: EnvironmentModifications) None[source]¶
Sets up the build environment for a package.
This method will be called before the current package prefix exists in Spack’s store.
- Parameters:
env – environment modifications to be applied when the package is built. Package authors can call methods on it to alter the build environment.
- with_or_without(name: str, activation_value: Callable | str | None = None, variant: str | None = None) List[str][source]¶
Inspects a variant and returns the arguments that activate or deactivate the selected feature(s) for the configure options.
This function works on all type of variants. For bool-valued variants it will return by default
--with-{name}or--without-{name}. For other kinds of variants it will cycle over the allowed values and return either--with-{value}or--without-{value}.If activation_value is given, then for each possible value of the variant, the option
--with-{value}=activation_value(value)or--without-{value}will be added depending on whether or notvariant=valueis in the spec.- Parameters:
name – name of a valid multi-valued variant
activation_value –
callable that accepts a single value and returns the parameter to be used leading to an entry of the type
--with-{name}={parameter}.The special value “prefix” can also be assigned and will return
spec[name].prefixas activation parameter.
- Returns:
list of arguments to configure
- class spack_repo.builtin.build_systems.autotools.AutotoolsPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using GNU Autotools.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- flags_to_build_system_args(flags)[source]¶
Produces a list of all command line arguments to pass specified compiler flags to configure.
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
spack_repo.builtin.build_systems.bundle module¶
- class spack_repo.builtin.build_systems.bundle.BundleBuilder(pkg: PackageBase)[source]¶
Bases:
Builder
- class spack_repo.builtin.build_systems.bundle.BundlePackage(spec: Spec)[source]¶
Bases:
PackageBaseGeneral purpose bundle, or no-code, package class.
- build_system_class: str¶
This attribute is used in UI queries that require to know which build-system class we are using
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.cached_cmake module¶
- class spack_repo.builtin.build_systems.cached_cmake.CachedCMakeBuilder(pkg: PackageBase)[source]¶
Bases:
CMakeBuilder- property cache_name¶
- property cache_path¶
- define_cmake_cache_from_variant(cmake_var, variant=None, comment='')[source]¶
Return a Cached CMake field from the given variant’s value. See define_from_variant in lib/spack/spack/build_systems/cmake.py package
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- phases: Tuple[str, ...]¶
Phases of a Cached CMake package Note: the initconfig phase is used for developer builds as a final phase to stop on
- property std_cmake_args¶
Standard cmake arguments provided as a property for convenience of package writers
- class spack_repo.builtin.build_systems.cached_cmake.CachedCMakePackage(spec: Spec)[source]¶
Bases:
CMakePackageSpecialized class for packages built using CMake initial cache.
This feature of CMake allows packages to increase reproducibility, especially between Spack- and manual builds. It also allows packages to sidestep certain parsing bugs in extremely long
cmakecommands, and to avoid system limits on the length of the command line.- CMakeBuilder¶
alias of
CachedCMakeBuilder
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- spack_repo.builtin.build_systems.cached_cmake.cmake_cache_filepath(name, value, comment='')[source]¶
Generate a string for a cmake cache variable of type FILEPATH
- spack_repo.builtin.build_systems.cached_cmake.cmake_cache_option(name, boolean_value, comment='', force=False)[source]¶
Generate a string for a cmake configuration option
- spack_repo.builtin.build_systems.cached_cmake.cmake_cache_path(name, value, comment='', force=False)[source]¶
Generate a string for a cmake cache variable
spack_repo.builtin.build_systems.cargo module¶
- class spack_repo.builtin.build_systems.cargo.CargoBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe Cargo builder encodes the most common way of building software with a rust Cargo.toml file. It has two phases that can be overridden, if need be:
For a finer tuning you may override:
Method
Purpose
Specify arguments to
cargo installSpecify arguments to
cargo test- build(pkg: CargoPackage, spec: Spec, prefix: Prefix) None[source]¶
Runs
cargo installin the source directory
- property build_args¶
Arguments for
cargo build.
- property build_directory¶
Return the directory containing the main Cargo.toml.
- property check_args¶
Argument for
cargo testduring check phase
- install(pkg: CargoPackage, spec: Spec, prefix: Prefix) None[source]¶
Copy build files into package prefix.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- property std_build_args¶
Standard arguments for
cargo buildprovided as a property for convenience of package writers.
- class spack_repo.builtin.build_systems.cargo.CargoPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using cargo.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- default_buildsystem: str¶
Must be defined as a fallback for old specs that don’t have the
build_systemvariant
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.cmake module¶
- class spack_repo.builtin.build_systems.cmake.CMakeBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe cmake builder encodes the default way of building software with CMake. IT has three phases that can be overridden:
They all have sensible defaults and for many packages the only thing necessary will be to override
cmake_args().For a finer tuning you may also override:
Method
Purpose
Location of the root CMakeLists.txt
Directory where to build the package
- check() None[source]¶
Search the CMake-generated files for the targets
testandcheck, and runs them if found.
- cmake(pkg: CMakePackage, spec: Spec, prefix: Prefix) None[source]¶
Runs
cmakein the build directory
- cmake_args() List[str][source]¶
List of all the arguments that must be passed to cmake, except:
CMAKE_INSTALL_PREFIX
CMAKE_BUILD_TYPE
which will be set automatically.
- static define_cuda_architectures(pkg: PackageBase) str[source]¶
- static define_hip_architectures(pkg: PackageBase) str[source]¶
- install_targets¶
Targets to be used during the install phase
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- property root_cmakelists_dir: str¶
The relative path to the directory containing CMakeLists.txt
This path is relative to the root of the extracted tarball, not to the
build_directory. Defaults to the current directory.
- class spack_repo.builtin.build_systems.cmake.CMakePackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using CMake
For more information on the CMake build system, see: https://cmake.org/cmake/help/latest/
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_cmake_hints_from: List[str]¶
List of package names for which CMake argument injection should be disabled
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- flags_to_build_system_args(flags)[source]¶
Return a list of all command line arguments to pass the specified compiler flags to cmake. Note CMAKE does not have a cppflags option, so cppflags will be added to cflags, cxxflags, and fflags to mimic the behavior in other tools.
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- spack_repo.builtin.build_systems.cmake.define(cmake_var: str, value: Any) str[source]¶
Return a CMake command line argument that defines a variable.
The resulting argument will convert boolean values to OFF/ON and lists/tuples to CMake semicolon-separated string lists. All other values will be interpreted as strings.
Examples
[define("BUILD_SHARED_LIBS", True), define("CMAKE_CXX_STANDARD", 14), define("swr", ["avx", "avx2"])]
will generate the following configuration options:
["-DBUILD_SHARED_LIBS:BOOL=ON", "-DCMAKE_CXX_STANDARD:STRING=14", "-DSWR:STRING=avx;avx2]
- spack_repo.builtin.build_systems.cmake.define_cuda_architectures(pkg: PackageBase) str[source]¶
Returns the str
-DCMAKE_CUDA_ARCHITECTURES:STRING=(expanded cuda_arch).cuda_archis variant composed of a list of target CUDA architectures and it is declared in the cuda package.This method is no-op for cmake<3.18 and when
cuda_archvariant is not set.
- spack_repo.builtin.build_systems.cmake.define_from_variant(pkg: PackageBase, cmake_var: str, variant: str | None = None) str[source]¶
Return a CMake command line argument from the given variant’s value.
The optional
variantargument defaults to the lower-case transform ofcmake_var.Examples
Given a package with:
variant("cxxstd", default="11", values=("11", "14"), multi=False, description="") variant("shared", default=True, description="") variant("swr", values=any_combination_of("avx", "avx2"), description="")
calling this function like:
[ self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"), self.define_from_variant("SWR"), ]
will generate the following configuration options:
[ "-DBUILD_SHARED_LIBS:BOOL=ON", "-DCMAKE_CXX_STANDARD:STRING=14", "-DSWR:STRING=avx;avx2", ]
for
<spec-name> cxxstd=14 +shared swr=avx,avx2- Note: if the provided variant is conditional, and the condition is not met, this function
returns an empty string. CMake discards empty strings provided on the command line.
- spack_repo.builtin.build_systems.cmake.define_hip_architectures(pkg: PackageBase) str[source]¶
Returns the str
-DCMAKE_HIP_ARCHITECTURES:STRING=(expanded amdgpu_target).amdgpu_targetis variant composed of a list of the target HIP architectures and it is declared in the rocm package.This method is no-op for cmake<3.18 and when
amdgpu_targetvariant is not set.
- spack_repo.builtin.build_systems.cmake.generator(*names: str, default: str | None = None) None[source]¶
The build system generator to use.
See
cmake --helpfor a list of valid generators. Currently, “Unix Makefiles” and “Ninja” are the only generators that Spack supports. Defaults to “Unix Makefiles”.See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html for more information.
- Parameters:
names – allowed generators for this package
default – default generator
spack_repo.builtin.build_systems.compiler module¶
- class spack_repo.builtin.build_systems.compiler.CompilerPackage(spec: Spec)[source]¶
Bases:
PackageBaseA Package mixin for all common logic for packages that implement compilers
- classmethod compiler_bindir(prefix: str | Path) str | Path[source]¶
Overridable method for the location of the compiler bindir within the prefix
- compiler_names¶
Construct list of compiler names from per-language names
- compiler_suffixes: List[str]¶
Optional suffix regexes for searching for this type of compiler. Suffixes are used by some frameworks, e.g. macports uses an ‘-mp-X.Y’ version suffix for gcc.
- compiler_version_argument: str | Tuple[str, ...]¶
Compiler argument(s) that produces version information If multiple arguments, the earlier arguments must produce errors when invalid
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- classmethod determine_compiler_paths(exes: Sequence[str | Path]) Dict[str, str | Path][source]¶
Compute the paths to compiler executables associated with this package
This is a helper method for
determine_variantsto compute theextra_attributesto include with each spec object.
- classmethod determine_spec_details(prefix, objs_in_prefix)¶
Allow
spack external find ...to locate installations.
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- executables¶
Construct executables for external detection from names, prefixes, and suffixes.
- property fortran¶
- classmethod platform_executables()¶
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
- standard_flag(*, language: str, standard: str) str[source]¶
Returns the flag used to enforce a given standard for a language
spack_repo.builtin.build_systems.cuda module¶
- class spack_repo.builtin.build_systems.cuda.CudaPackage(spec: Spec)[source]¶
Bases:
PackageBaseAuxiliary class which contains CUDA variant, dependencies and conflicts and is meant to unify and facilitate its usage.
Maintainers: ax3l, Rombur, davidbeckingsale, pauleonix
- static compute_capabilities(arch_list: Iterable[str]) List[str][source]¶
Adds a decimal place to each CUDA arch.
>>> compute_capabilities(['90', '90a', '100f']) ['9.0', '9.0a', '10.0f']
- Parameters:
arch_list – A list of integer strings, optionally followed by a suffix.
- Returns:
A list of float strings, optionally followed by a suffix
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- cuda_arch_values¶
- default_buildsystem: str¶
Must be defined as a fallback for old specs that don’t have the
build_systemvariant
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.gnu module¶
- class spack_repo.builtin.build_systems.gnu.GNUMirrorPackage(spec: Spec)[source]¶
Bases:
PackageBaseMixin that takes care of setting url and mirrors for GNU packages.
- base_mirrors¶
List of GNU mirrors used by Spack
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
- property urls¶
spack_repo.builtin.build_systems.go module¶
- class spack_repo.builtin.build_systems.go.GoBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe Go builder encodes the most common way of building software with a golang go.mod file. It has two phases that can be overridden, if need be:
For a finer tuning you may override:
Method
Purpose
Specify arguments to
go buildSpecify arguments to
go test- build(pkg: GoPackage, spec: Spec, prefix: Prefix) None[source]¶
Runs
go buildin the source directory
- property build_args¶
Arguments for
go build.
- property build_directory¶
Return the directory containing the main go.mod.
- property check_args¶
Argument for
go testduring check phase
- install(pkg: GoPackage, spec: Spec, prefix: Prefix) None[source]¶
Install built binaries into prefix bin.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- setup_build_environment(env: EnvironmentModifications) None[source]¶
Setup build environment variables
- class spack_repo.builtin.build_systems.go.GoPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using the Go toolchain.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.lua module¶
- class spack_repo.builtin.build_systems.lua.LuaBuilder(pkg: PackageBase)[source]¶
Bases:
Builder- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- preprocess(pkg: LuaPackage, spec: Spec, prefix: Prefix) None[source]¶
Override this to preprocess source before building with luarocks
- setup_build_environment(env: EnvironmentModifications) None[source]¶
Sets up the build environment for a package.
This method will be called before the current package prefix exists in Spack’s store.
- Parameters:
env – environment modifications to be applied when the package is built. Package authors can call methods on it to alter the build environment.
- class spack_repo.builtin.build_systems.lua.LuaPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for lua packages
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- property lua¶
- property luarocks¶
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.makefile module¶
- class spack_repo.builtin.build_systems.makefile.MakefileBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe Makefile builder encodes the most common way of building software with Makefiles. It has three phases that can be overridden, if need be:
It is usually necessary to override the
edit()phase (which is by default a no-op), while the other two have sensible defaults.For a finer tuning you may override:
Method
Purpose
Specify
maketargets for the build phaseSpecify
maketargets for the install phaseDirectory where the Makefile is located
- build(pkg: MakefilePackage, spec: Spec, prefix: Prefix) None[source]¶
Run “make” on the build targets specified by the builder.
- edit(pkg: MakefilePackage, spec: Spec, prefix: Prefix) None[source]¶
Edit the Makefile before calling make. The default is a no-op.
- install(pkg: MakefilePackage, spec: Spec, prefix: Prefix) None[source]¶
Run “make” on the install targets specified by the builder.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- class spack_repo.builtin.build_systems.makefile.MakefilePackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using Makefiles.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.maven module¶
- class spack_repo.builtin.build_systems.maven.MavenBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe Maven builder encodes the default way to build software with Maven. It has two phases that can be overridden, if need be:
- build(pkg: MavenPackage, spec: Spec, prefix: Prefix) None[source]¶
Compile code and package into a JAR file.
- property build_directory¶
The directory containing the
pom.xmlfile.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- class spack_repo.builtin.build_systems.maven.MavenPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages that are built using the Maven build system. See https://maven.apache.org/index.html for more information.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.meson module¶
- class spack_repo.builtin.build_systems.meson.MesonBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe Meson builder encodes the default way to build software with Meson. The builder has three phases that can be overridden, if need be:
They all have sensible defaults and for many packages the only thing necessary will be to override
meson_args().For a finer tuning you may also override:
Method
Purpose
Location of the root MesonLists.txt
Directory where to build the package
- property archive_files¶
Files to archive for packages based on Meson
- property build_directory¶
Directory to use when building the package.
- property build_dirname¶
Returns the directory name to use when building the package.
- install_targets¶
- meson_args() List[str][source]¶
List of arguments that must be passed to meson, except:
--prefix--libdir--buildtype--strip--default_library
which will be set automatically.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- class spack_repo.builtin.build_systems.meson.MesonPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using Meson. For more information on the Meson build system, see https://mesonbuild.com/
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- flags_to_build_system_args(flags)[source]¶
Produces a list of all command line arguments to pass the specified compiler flags to meson.
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- plat¶
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.msbuild module¶
- class spack_repo.builtin.build_systems.msbuild.MSBuildBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe MSBuild builder encodes the most common way of building software with Mircosoft’s MSBuild tool. It has two phases that can be overridden, if need be:
It is usually necessary to override the
install()phase as many packages with MSBuild systems neglect to provide an install target. The default install phase will attempt to invoke an install target from MSBuild. If none exists, this will result in a build failureFor a finer tuning you may override:
Method
Purpose
Specify
msbuildtargets for the build phaseSpecify
msbuildtargets for the install phaseDirectory where the project sln/vcxproj is located
- build(pkg: MSBuildPackage, spec: Spec, prefix: Prefix) None[source]¶
Run “msbuild” on the build targets specified by the builder.
- property build_directory¶
Return the directory containing the MSBuild solution or vcxproj.
- install(pkg: MSBuildPackage, spec: Spec, prefix: Prefix) None[source]¶
Run “msbuild” on the install targets specified by the builder. This is INSTALL by default
- msbuild_args()[source]¶
Define build arguments to MSbuild. This is an empty list by default. Individual packages should override to specify MSBuild args to command line PlatformToolset is already defined an can be controlled via the toolchain_version property
- msbuild_install_args()[source]¶
Define install arguments to MSBuild outside of the INSTALL target. This is the same as msbuild_args by default.
- property std_msbuild_args¶
Return common msbuild cl arguments, for now just toolchain
- property toolchain_version¶
Return currently targeted version of MSVC toolchain Override this method to select a specific version of the toolchain or change selection heuristics. Default is whatever version of msvc has been selected by concretization
- class spack_repo.builtin.build_systems.msbuild.MSBuildPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using Visual Studio project files or solutions.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- default_buildsystem: str¶
Must be defined as a fallback for old specs that don’t have the
build_systemvariant
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.nmake module¶
- class spack_repo.builtin.build_systems.nmake.NMakeBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe NMake builder encodes the most common way of building software with Mircosoft’s NMake tool. It has two phases that can be overridden, if need be:
It is usually necessary to override the
install()phase as many packages with NMake systems neglect to provide an install target. The default install phase will attempt to invoke an install target from NMake. If none exists, this will result in a build failureFor a finer tuning you may override:
Method
Purpose
Specify
nmaketargets for the build phaseSpecify
nmaketargets for the install phaseDirectory where the project makefile is located
- build(pkg: NMakePackage, spec: Spec, prefix: Prefix) None[source]¶
Run “nmake” on the build targets specified by the builder.
- property build_directory¶
Return the directory containing the makefile.
- property ignore_quotes¶
Control whether or not Spack warns about quoted arguments passed to build utilities. If this is True, spack will not warn about quotes. This is useful in cases with a space in the path or when build scripts require quoted arugments.
- install(pkg: NMakePackage, spec: Spec, prefix: Prefix) None[source]¶
Run “nmake” on the install targets specified by the builder. This is INSTALL by default
- property makefile_name¶
Name of the current makefile. This is currently an empty value. If a project defines this value, it will be used with the /f argument to provide nmake an explicit makefile. This is usefule in scenarios where there are multiple nmake files in the same directory.
- property makefile_root¶
The relative path to the directory containing nmake makefile
This path is relative to the root of the extracted tarball, not to the
build_directory. Defaults to the current directory.
- nmake_args()[source]¶
Define build arguments to NMake. This is an empty list by default. Individual packages should override to specify NMake args to command line
- nmake_install_args()[source]¶
Define arguments appropriate only for install phase to NMake. This is an empty list by default. Individual packages should override to specify NMake args to command line
- override_env(var_name, new_value)[source]¶
Helper method to format arguments for overridding env variables on the nmake command line. Returns properly formatted argument
- property std_nmake_args¶
Returns list of standards arguments provided to NMake Currently is only /NOLOGO
- class spack_repo.builtin.build_systems.nmake.NMakePackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using a Makefiles.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- default_buildsystem: str¶
Must be defined as a fallback for old specs that don’t have the
build_systemvariant
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.octave module¶
- class spack_repo.builtin.build_systems.octave.OctaveBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe octave builder provides the following phases that can be overridden:
- install(pkg: OctavePackage, spec: Spec, prefix: Prefix) None[source]¶
Install the package from the archive file
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- setup_build_environment(env: EnvironmentModifications) None[source]¶
Sets up the build environment for a package.
This method will be called before the current package prefix exists in Spack’s store.
- Parameters:
env – environment modifications to be applied when the package is built. Package authors can call methods on it to alter the build environment.
- class spack_repo.builtin.build_systems.octave.OctavePackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for Octave packages. See https://www.gnu.org/software/octave/doc/v4.2.0/Installing-and-Removing-Packages.html for more information.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.oneapi module¶
Common utilities for managing intel oneapi packages.
- spack_repo.builtin.build_systems.oneapi.INTEL_MATH_LIBRARIES¶
Tuple of Intel math libraries, exported to packages
- class spack_repo.builtin.build_systems.oneapi.IntelOneApiLibraryPackage(spec: Spec)[source]¶
Bases:
IntelOneApiPackageBase class for Intel oneAPI library packages.
Contains some convenient default implementations for libraries. Implement the method directly in the package if something different is needed.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- property headers¶
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- property libs¶
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- class spack_repo.builtin.build_systems.oneapi.IntelOneApiLibraryPackageWithSdk(spec: Spec)[source]¶
Bases:
IntelOneApiLibraryPackageBase class for Intel oneAPI library packages with SDK components.
Contains some convenient default implementations for libraries that expose functionality in sdk subdirectories. Implement the method directly in the package if something different is needed.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- property headers¶
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- property libs¶
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- class spack_repo.builtin.build_systems.oneapi.IntelOneApiPackage(spec: Spec)[source]¶
Bases:
PackageBase class for Intel oneAPI packages.
- c¶
- property component_dir¶
Subdirectory for this component in the install prefix.
- property component_prefix¶
Path to component <prefix>/<component>/<version>.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- property env_script_args¶
Additional arguments to pass to vars.sh script.
- homepage: str | None | classproperty[str | None]¶
Package homepage where users can find more information about the package
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- setup_run_environment(env: EnvironmentModifications) None[source]¶
Adds environment variables to the generated module file.
These environment variables come from running:
$ source {prefix}/{component}/{version}/env/vars.sh
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
- unresolved_libraries: List[str]¶
List of fnmatch patterns of library file names (specifically DT_NEEDED entries) that are not expected to be locatable in RPATHs. Generally this is a problem, and Spack install with config:shared_linking:strict will cause install failures if such libraries are found. However, in certain cases it can be hard if not impossible to avoid accidental linking against system libraries; until that is resolved, this attribute can be used to suppress errors.
- property v2_layout¶
Returns true if this version implements the v2 directory layout.
- property v2_layout_versions¶
Version that implements the v2 directory layout.
- class spack_repo.builtin.build_systems.oneapi.IntelOneApiStaticLibraryList(static_libs, dynamic_libs)[source]¶
Bases:
LibraryListProvides ld_flags when static linking is needed
Oneapi puts static and dynamic libraries in the same directory, so -l will default to finding the dynamic library. Use absolute paths, as recommended by oneapi documentation.
Allow both static and dynamic libraries to be supplied by the package.
- property directories¶
Stable de-duplication of the directories where the files reside.
>>> l = LibraryList(["/dir1/liba.a", "/dir2/libb.a", "/dir1/libc.a"]) >>> l.directories ["/dir1", "/dir2"] >>> h = HeaderList(["/dir1/a.h", "/dir1/b.h", "/dir2/c.h"]) >>> h.directories ["/dir1", "/dir2"]
- Returns:
A list of directories
- property ld_flags¶
Search flags + link flags
>>> l = LibraryList(["/dir1/liba.a", "/dir2/libb.a", "/dir1/liba.so"]) >>> l.ld_flags "-L/dir1 -L/dir2 -la -lb"
- Returns:
A joined list of search flags and link flags
- property link_flags¶
Link flags for the libraries
>>> l = LibraryList(["/dir1/liba.a", "/dir2/libb.a", "/dir1/liba.so"]) >>> l.link_flags "-la -lb"
- Returns:
A joined list of link flags
- property search_flags¶
Search flags for the libraries
>>> l = LibraryList(["/dir1/liba.a", "/dir2/libb.a", "/dir1/liba.so"]) >>> l.search_flags "-L/dir1 -L/dir2"
- Returns:
A joined list of search flags
spack_repo.builtin.build_systems.perl module¶
- class spack_repo.builtin.build_systems.perl.PerlBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe perl builder provides four phases that can be overridden, if required:
- The default methods use, in order of preference:
Makefile.PL,
Build.PL.
Some packages may need to override
configure_args(), which produces a list of arguments forconfigure().Arguments should not include the installation base directory.
- property build_executable¶
Returns the executable method to build the perl package
- property build_method¶
Searches the package for either a Makefile.PL or Build.PL.
- Raises:
RuntimeError – if neither Makefile.PL nor Build.PL exist
- configure(pkg: PerlPackage, spec: Spec, prefix: Prefix) None[source]¶
Run Makefile.PL or Build.PL with arguments consisting of an appropriate installation base directory followed by the list returned by
configure_args().
- configure_args()[source]¶
List of arguments passed to
configure().Arguments should not include the installation base directory, which is prepended automatically.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- class spack_repo.builtin.build_systems.perl.PerlPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages that are built using Perl.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- property skip_modules: Iterable[str]¶
Names of modules that should be skipped when running tests.
These are a subset of use_modules.
- Returns:
List of strings of module names.
spack_repo.builtin.build_systems.python module¶
- class spack_repo.builtin.build_systems.python.PythonExtension(spec: Spec)[source]¶
Bases:
PackageBase- add_files_to_view(view, merge_map, skip_if_exists=True)[source]¶
Given a map of package files to destination paths in the view, add the files to the view. By default this adds all files. Alternative implementations may skip some files, for example if other packages linked into the view already include the file.
- Parameters:
view (spack.filesystem_view.FilesystemView) – the view that’s updated
merge_map (dict) – maps absolute source paths to absolute dest paths for all files in from this package.
skip_if_exists (bool) – when True, don’t link files in view when they already exist. When False, always link files, without checking if they already exist.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- default_buildsystem: str¶
Must be defined as a fallback for old specs that don’t have the
build_systemvariant
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- property import_modules: Iterable[str]¶
Names of modules that the Python package provides.
These are used to test whether or not the installation succeeded. These names generally come from running:
>> import setuptools >> setuptools.find_packages()
in the source tarball directory. If the module names are incorrectly detected, this property can be overridden by the package.
- Returns:
List of strings of module names.
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- property skip_modules: Iterable[str]¶
Names of modules that should be skipped when running tests.
These are a subset of import_modules. If a module has submodules, they are skipped as well (meaning a.b is skipped if a is contained).
- Returns:
List of strings of module names.
- class spack_repo.builtin.build_systems.python.PythonPackage(spec: Spec)[source]¶
Bases:
PythonExtensionSpecialized class for packages that are built using pip.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- property headers: HeaderList¶
- homepage: str | None | classproperty[str | None]¶
Package homepage where users can find more information about the package
- install_time_test_callbacks¶
Callback names for install-time test
- property libs: LibraryList¶
- list_url: str | None | classproperty[str | None]¶
Default list URL (place to find available versions)
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- class spack_repo.builtin.build_systems.python.PythonPipBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaults- property build_directory: str¶
The root directory of the Python package.
This is usually the directory containing one of the following files:
pyproject.tomlsetup.cfgsetup.py
- config_settings(spec: Spec, prefix: Prefix) Dict[str, object][source]¶
Configuration settings to be passed to the PEP 517 build backend.
Requires pip 22.1 or newer for keys that appear only a single time, or pip 23.1 or newer if the same key appears multiple times.
- Parameters:
spec – Build spec.
prefix – Installation prefix.
- Returns:
Possibly nested dictionary of KEY, VALUE settings.
- global_options(spec: Spec, prefix: Prefix) Iterable[str][source]¶
Extra global options to be supplied to the setup.py call before the install or bdist_wheel command.
Deprecated in pip 23.1.
- Parameters:
spec – Build spec.
prefix – Installation prefix.
- Returns:
List of options.
- install(pkg: PythonPackage, spec: Spec, prefix: Prefix) None[source]¶
Install everything from build directory.
- install_options(spec: Spec, prefix: Prefix) Iterable[str][source]¶
Extra arguments to be supplied to the setup.py install command.
Requires pip 23.0 or older.
- Parameters:
spec – Build spec.
prefix – Installation prefix.
- Returns:
List of options.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
spack_repo.builtin.build_systems.qmake module¶
- class spack_repo.builtin.build_systems.qmake.QMakeBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe qmake builder provides three phases that can be overridden:
They all have sensible defaults and for many packages the only thing necessary will be to override
qmake_args().- property build_directory¶
The directory containing the
*.profile.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- class spack_repo.builtin.build_systems.qmake.QMakePackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using qmake.
For more information on the qmake build system, see: http://doc.qt.io/qt-5/qmake-manual.html
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.r module¶
- class spack_repo.builtin.build_systems.r.RBuilder(pkg: PackageBase)[source]¶
Bases:
GenericBuilderThe R builder provides a single phase that can be overridden:
It has sensible defaults, and for many packages the only thing necessary will be to add dependencies.
- class spack_repo.builtin.build_systems.r.RPackage(spec: Spec)[source]¶
Bases:
PackageSpecialized class for packages that are built using R.
For more information on the R build system, see: https://stat.ethz.ch/R-manual/R-devel/library/utils/html/INSTALL.html
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- homepage: str | None | classproperty[str | None]¶
Package homepage where users can find more information about the package
- list_url: str | None | classproperty[str | None]¶
Default list URL (place to find available versions)
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.racket module¶
- class spack_repo.builtin.build_systems.racket.RacketBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderThe Racket builder provides an
installphase that can be overridden.- property build_directory¶
- install(pkg: RacketPackage, spec: Spec, prefix: Prefix) None[source]¶
Install everything from build directory.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- package_methods: Tuple[str, ...]¶
Names associated with package methods in the old build-system format
- property subdirectory¶
- class spack_repo.builtin.build_systems.racket.RacketPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages that are built using Racket’s raco pkg install and raco setup commands.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- homepage: str | None | classproperty[str | None]¶
Package homepage where users can find more information about the package
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.rocm module¶
- class spack_repo.builtin.build_systems.rocm.ROCmLibrary(spec: Spec)[source]¶
Bases:
PackageBaseHelpers for detecting ROCm versions from an external installation.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- default_buildsystem: str¶
Must be defined as a fallback for old specs that don’t have the
build_systemvariant
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
- class spack_repo.builtin.build_systems.rocm.ROCmPackage(spec: Spec)[source]¶
Bases:
PackageBaseAuxiliary class which contains ROCm variant, dependencies and conflicts and is meant to unify and facilitate its usage. Closely mimics CudaPackage.
Maintainers: dtaller
- amdgpu_targets¶
- asan_on(env: EnvironmentModifications)[source]¶
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- default_buildsystem: str¶
Must be defined as a fallback for old specs that don’t have the
build_systemvariant
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.ruby module¶
- class spack_repo.builtin.build_systems.ruby.RubyBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe Ruby builder provides two phases that can be overridden if required:
- install(pkg: RubyPackage, spec: Spec, prefix: Prefix) None[source]¶
Install a Ruby gem.
The ruby package sets
GEM_HOMEto tell gem where to install to.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- class spack_repo.builtin.build_systems.ruby.RubyPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for building Ruby gems.
- build_system_class: str¶
This attribute is used in UI queries that need to know the build system base class
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.scons module¶
- class spack_repo.builtin.build_systems.scons.SConsBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe Scons builder provides the following phases that can be overridden:
Packages that use SCons as a build system are less uniform than packages that use other build systems. Developers can add custom subcommands or variables that control the build. You will likely need to override
build_args()to pass the appropriate variables.- build_test()[source]¶
Run unit tests after build.
By default, does nothing. Override this if you want to add package-specific tests.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- class spack_repo.builtin.build_systems.scons.SConsPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages built using SCons.
See http://scons.org/documentation.html for more information.
- build_system_class: str¶
To be used in UI queries that require to know which build-system class we are using
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.sip module¶
- class spack_repo.builtin.build_systems.sip.SIPBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe SIP builder provides the following phases that can be overridden:
configure
build
install
The configure phase already adds a set of default flags. To see more options, run
sip-build --help.- build_directory¶
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- class spack_repo.builtin.build_systems.sip.SIPPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages that are built using the SIP build system. See https://www.riverbankcomputing.com/software/sip/intro for more information.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- property import_modules¶
Names of modules that the Python package provides.
These are used to test whether or not the installation succeeded. These names generally come from running:
>> import setuptools >> setuptools.find_packages()
in the source tarball directory. If the module names are incorrectly detected, this property can be overridden by the package.
- Returns:
list of strings of module names
- Return type:
- install_time_test_callbacks¶
Callback names for install-time testing
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- sip_module¶
Name of private sip module to install alongside package
spack_repo.builtin.build_systems.sourceforge module¶
- class spack_repo.builtin.build_systems.sourceforge.SourceforgePackage(spec: Spec)[source]¶
Bases:
PackageBaseMixin that takes care of setting url and mirrors for Sourceforge packages.
- base_mirrors¶
List of Sourceforge mirrors used by Spack
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
- property urls¶
spack_repo.builtin.build_systems.sourceware module¶
- class spack_repo.builtin.build_systems.sourceware.SourcewarePackage(spec: Spec)[source]¶
Bases:
PackageBaseMixin that takes care of setting url and mirrors for Sourceware.org packages.
- base_mirrors¶
List of Sourceware mirrors used by Spack
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
- property urls¶
spack_repo.builtin.build_systems.waf module¶
- class spack_repo.builtin.build_systems.waf.WafBuilder(pkg: PackageBase)[source]¶
Bases:
BuilderWithDefaultsThe WAF builder provides the following phases that can be overridden:
configure
build
install
These are all standard Waf commands and can be found by running:
$ python waf --helpEach phase provides a function <phase> that runs:
$ python waf -j<jobs> <phase>where <jobs> is the number of parallel jobs to build with. Each phase also has a <phase_args> function that can pass arguments to this call. All of these functions are empty except for the
configure_argsfunction, which passes--prefix=/path/to/installation/prefix.- property build_directory¶
The directory containing the
waffile.
- build_test()[source]¶
Run unit tests after build.
By default, does nothing. Override this if you want to add package-specific tests.
- install(pkg: WafPackage, spec: Spec, prefix: Prefix) None[source]¶
Installs the targets on the system.
- install_test()[source]¶
Run unit tests after install.
By default, does nothing. Override this if you want to add package-specific tests.
- package_attributes: Tuple[str, ...]¶
Names associated with package attributes in the old build-system format
- class spack_repo.builtin.build_systems.waf.WafPackage(spec: Spec)[source]¶
Bases:
PackageBaseSpecialized class for packages that are built using the Waf build system. See https://waf.io/book/ for more information.
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- legacy_buildsystem: str¶
Use
default_buildsysteminstead of this attribute, which is deprecated
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
spack_repo.builtin.build_systems.xorg module¶
- class spack_repo.builtin.build_systems.xorg.XorgPackage(spec: Spec)[source]¶
Bases:
PackageBaseMixin that takes care of setting url and mirrors for x.org packages.
- base_mirrors¶
- conflicts: Dict[Spec, List[Tuple[Spec, str | None]]]¶
Class level dictionary populated by
conflicts()directives
- dependencies: Dict[Spec, Dict[str, Dependency]]¶
Class level dictionary populated by
depends_on()andextends()directives
- disable_redistribute: Dict[Spec, DisableRedistribute]¶
Class level dictionary populated by
redistribute()directives
- provided_together: Dict[Spec, List[Set[str]]]¶
Class level dictionary populated by
provides()directives
- requirements: Dict[Spec, List[Tuple[Tuple[Spec, ...], str, str | None]]]¶
Class level dictionary populated by
requires()directives
- splice_specs: Dict[Spec, Tuple[Spec, None | str | List[str]]]¶
Class level dictionary populated by
can_splice()directives
- property urls¶