taucmdr.cf.software.installation module¶
Software installation management.
- class taucmdr.cf.software.installation.AutotoolsInstallation(name, title, sources, target_arch, target_os, compilers, repos, commands, libraries, headers)[source]¶
Bases:
MakeInstallationBase class for installations that follow the GNU Autotools installation process.
- The GNU Autotools installation process is::
./configure [options] make [flags] all [options] make [flags] install [options]
- configure(flags, env=None)[source]¶
Invoke configure.
- Parameters:
flags (list) – Command line flags to pass to configure.
- Raises:
SoftwarePackageError – Configuration failed.
- class taucmdr.cf.software.installation.CMakeInstallation(name, title, sources, target_arch, target_os, compilers, repos, commands, libraries, headers)[source]¶
Bases:
MakeInstallationBase class for installations that follow the CMake installation process.
- The CMake installation process is::
cmake [options] make [flags] all [options] make [flags] install [options]
- cmake(flags)[source]¶
Invoke cmake.
- Parameters:
flags (list) – Command line flags to pass to cmake.
- Raises:
SoftwarePackageError – Configuration failed.
- class taucmdr.cf.software.installation.Installation(name, title, sources, target_arch, target_os, compilers, repos, commands, libraries, headers)[source]¶
Bases:
objectEncapsulates a software package installation.
- name¶
The package name, lowercase, alphanumeric with underscores. All packages have a corresponding
taucmdr.cf.software.<name>_installationmodule.- Type:
- title¶
Human readable name of the software package, e.g. ‘TAU Performance System’ or ‘Score-P’.
- Type:
- src¶
Path or URL to a source archive file, or a path to a directory where the software is installed, or the special keyword ‘download’.
- Type:
- compilers¶
Compilers to use if software must be compiled.
- Type:
- _prepare_src(reuse_archive=True)[source]¶
Prepares source code for installation.
Acquires package source code archive file via download or file copy, unpacks the archive, and verifies that required paths exist.
- Parameters:
reuse_archive (bool) – If True, attempt to reuse archive files.
- Returns:
The path to the unpacked source code files.
- Return type:
- Raises:
ConfigurationError – The source code couldn’t be acquired or unpacked.
- acquire_source(reuse_archive=True)[source]¶
Acquires package source code archive file via download or file copy.
If the package is configured to use an existing installation as the source then this routine does nothing.
- Parameters:
reuse_archive (bool) – If True don’t download, just confirm that the archive exists.
- Returns:
Absolute path to the source archive.
- Return type:
- Raises:
ConfigurationError – Package source code not provided or couldn’t be acquired.
- add_dependency(name, sources, *args, **kwargs)[source]¶
Adds a new package to the list of packages this package depends on.
- Parameters:
name (str) – The name of the package. There must be a corresponding
taucmdr.cf.software.<name>_installationmodule.sources (dict) – Packages sources as strings indexed by package names as strings. A source may be a path to a directory where the software has already been installed, or a path to a source archive file, or the special keyword ‘download’.
- property bin_path¶
- compiletime_config(opts=None, env=None)[source]¶
Configure compilation environment to use this software package.
Returns command line options and environment variables required by this software package when it is used to compile other software packages. The default behavior, to be overridden by subclasses as needed, is to prepend
self.bin_pathto the PATH environment variable.
- property include_path¶
- install(force_reinstall=False)[source]¶
Execute the installation sequence in a sanitized environment.
Modifies the system by building and installing software.
- Parameters:
force_reinstall (bool) – If True, reinstall even if the software package passes verification.
- Raises:
SoftwarePackageError – Installation failed.
- property install_prefix¶
- property lib_path¶
- runtime_config(opts=None, env=None)[source]¶
Configure runtime environment to use this software package.
Returns command line options and environment variables required by this software package when other software packages depending on it execute. The default behavior, to be overridden by subclasses as needed, is to prepend
self.bin_pathto the PATH environment variable andself.lib_pathto the system library path (e.g. LD_LIBRARY_PATH).
- set_group(gid=None)[source]¶
Sets the group for all files in the installation.
- Parameters:
gid (int) – Group ID number. If not given the use the group ID of the folder containing the installation.
- property uid¶
- uid_items()[source]¶
List items affecting this installation’s UID.
Most packages only care about changes in source archive, target, or C/C++ compilers. More sensitive packages (e.g. Score-P or TAU) can override this function.
- Returns:
- An ordered list of items affecting this installation’s UID.
Changing the order of this list will change the UID.
- Return type:
- verify()[source]¶
Check if the installation at
install_prefixis valid.A valid installation provides all expected files and commands. Subclasses may wish to perform additional checks.
- Raises:
SoftwarePackageError – Describes why the installation is invalid.
- class taucmdr.cf.software.installation.MakeInstallation(name, title, sources, target_arch, target_os, compilers, repos, commands, libraries, headers)[source]¶
Bases:
InstallationBase class for installations that follows the process: make [flags] all [options] make [flags] install [options]
- make(flags)[source]¶
Invoke make.
- Parameters:
flags (list) – Command line flags to pass to make.
- Raises:
SoftwarePackageError – Compilation failed.
- make_install(flags)[source]¶
Invoke make install.
- Parameters:
flags (list) – Command line flags to pass to make.
- Raises:
SoftwarePackageError – Configuration failed.