buildenv

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2019 License: BSD-3-Clause Imports: 15 Imported by: 3

Documentation

Overview

* buildenv is a package that provides all the capabilities to deal with a build environment, * from defining where the software should be compiled and install, to the actual configuration, * compilation and installation of software.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultContainerEnvCfg

func CreateDefaultContainerEnvCfg(containerBuildEnv *Info, kvs []kv.KV, sysCfg *sys.Config) (func(), error)

CreateDefaultContainerEnvCfg sets all the details for a default build environment for any type of application (it does not have to be a MPI application)

func CreateDefaultHostEnvCfg

func CreateDefaultHostEnvCfg(env *Info, mpi *implem.Info, sysCfg *sys.Config) error

CreateDefaultHostEnvCfg returns the default configuration to install/manage MPI on the host

func GetDefaultScratchDir

func GetDefaultScratchDir(mpi *implem.Info) string

GetDefaultScratchDir returns the default directory to use as scratch directory

Types

type Info

type Info struct {
	// SrcPath is the path to the downloaded tarball
	SrcPath string

	// SrcDir is the directory where the source code is
	SrcDir string

	// ScratchDir is the directory where we can store temporary data
	ScratchDir string

	// InstallDir is the directory where the software needs to be installed
	InstallDir string

	// BuildDir is the directory where the software is built
	BuildDir string

	// Env is the environment to use with the build environment
	Env []string
}

Info gathers the details of the build environment

func (*Info) Get

func (env *Info) Get(p *SoftwarePackage) error

Get is the function to get a given source code

func (*Info) GetEnvLDPath

func (env *Info) GetEnvLDPath() string

GetEnvLDPath returns the string representing the value for the LD_LIBRARY_PATH environment variable to use

func (*Info) GetEnvPath

func (env *Info) GetEnvPath() string

GetEnvPath returns the string representing the value for the PATH environment variable to use

func (*Info) Init

func (e *Info) Init(sysCfg *sys.Config) error

Init ensures that the buildenv is correctly initialized

func (*Info) Install

func (env *Info) Install(p *SoftwarePackage) error

Install is a generic function to install a software

func (*Info) IsInstalled

func (env *Info) IsInstalled(p *SoftwarePackage) bool

IsInstalled checks whether a specific software package is already installed in a specific build environment

func (*Info) RunMake

func (env *Info) RunMake(priv bool, args []string, stage string) error

RunMake executes the appropriate command to build the software

func (*Info) Unpack

func (env *Info) Unpack() error

Unpack extracts the source code from a package/tarball/zip file.

type SoftwarePackage

type SoftwarePackage struct {
	// Name is the name with which the software package is recognized
	Name string

	// URL is the source of the software
	URL string

	// InstallCmd is the command used to install the software
	InstallCmd string
	// contains filtered or unexported fields
}

SoftwarePackage gathers all the information related to the software package to prepare in the build environment

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL