scipion.install.funcs module

class scipion.install.funcs.Command(env, cmd, targets=None, **kwargs)[source]

Bases: object

execute()[source]
class scipion.install.funcs.Environment(**kwargs)[source]

Bases: object

addLibrary(name, **kwargs)[source]

Add library <name> to the construction process.

Checks that the needed programs are in PATH, needed libraries can be found, downloads the given url, untars the resulting tar file, configures the library with the given flags, compiles it (in the given buildDir) and installs it.

If default=False, the library will not be built.

Returns the final targets, the ones that Make will create.

addPackage(name, **kwargs)[source]

Download a package tgz, untar it and create a link in software/em. Params in kwargs:

tar: the package tar file, by default the name + .tgz. Pass None or VOID_TGZ if there is no tar file. commands: a list with actions to be executed to install the package
addPipModule(name, version='', pipCmd=None, target=None, default=True, deps=[])[source]

Add a new module to our built Python . Params in kwargs:

name: pip module name version: module version - must be specified to prevent undesired updates. default: True if this module is build by default.
addTarget(name, *commands, **kwargs)[source]
addTargetAlias(name, alias)[source]

Add an alias to an existing target. This function will be used for installing the last version of each package.

execute()[source]
static getBin(name)[source]
static getBinFolder(*paths)[source]
static getEm(name)[source]
static getEmFolder()[source]
static getIncludeFolder()[source]
getLib(name)[source]
static getLibFolder(*paths)[source]
getLibSuffix()[source]
static getLogFolder(*path)[source]
getPackage(name)[source]
getPackages()[source]

Return all plugin packages

getProcessors()[source]
static getPython()[source]
static getPythonPackagesFolder()[source]
static getSoftware(*paths)[source]
getTarget(name)[source]
getTargetList()[source]
getTargets()[source]
static getTmpFolder()[source]
hasPackage(name)[source]

Returns true if it has the package

hasTarget(name)[source]
printHelp()[source]
setDefault(default)[source]

Set default values of all packages to the passed parameter

updateCudaEnviron(package)[source]

Update the environment adding CUDA_LIB and/or CUDA_BIN to support packages that uses CUDA. package: package that needs CUDA to compile.

Bases: object

Create a link to packageFolder in packageLink, validate that packageFolder exists and if packageLink exists it is a link. This function is supposed to be executed in software/em folder.

class scipion.install.funcs.Target(env, name, *commands, **kwargs)[source]

Bases: object

addCommand(cmd, **kwargs)[source]
addDep(dep)[source]
execute()[source]
getCommands()[source]
getDeps()[source]
getName()[source]
isDefault()[source]
setDefault(default)[source]
scipion.install.funcs.ansi(n)[source]

Return function that escapes text with ANSI color n.

scipion.install.funcs.black(txt)
scipion.install.funcs.blue(txt)
scipion.install.funcs.checkLib(lib, target=None)[source]

See if we have library lib

scipion.install.funcs.cyan(txt)
scipion.install.funcs.green(txt)
scipion.install.funcs.magenta(txt)
scipion.install.funcs.mkdir(path)[source]

Creates a folder if it does not exists

scipion.install.funcs.progInPath(prog)[source]

Is program prog in PATH?

scipion.install.funcs.red(txt)
scipion.install.funcs.white(txt)
scipion.install.funcs.yellow(txt)