Classes | Namespaces | Functions | Variables
utilities.py File Reference

Main module of project-independent BASIS utilities. More...

Go to the source code of this file.

Classes

class  basis.utilities.SubprocessError
 Exception thrown when command execution failed. More...
 

Namespaces

 basis.utilities
 

Functions

def basis.utilities.decode (s)
 
def basis.utilities.execute (args, quiet=False, stdout=False, allow_fail=False, verbose=0, simulate=False, prefix=None, targets=None, base='.')
 Execute command as subprocess. More...
 
def basis.utilities.exedir (name=None, prefix=None, targets=None, base='.')
 Get directory of executable file. More...
 
def basis.utilities.exename (name=None, prefix=None, targets=None, base='.')
 Get name of executable file. More...
 
def basis.utilities.exepath (name=None, prefix=None, targets=None, base='.')
 Get absolute path of executable file. More...
 
def basis.utilities.istarget (name, prefix=None, targets=None)
 Determine whether a given build target is known. More...
 
def basis.utilities.print_contact (contact=CONTACT)
 Print contact information. More...
 
def basis.utilities.print_version (name, version=None, project=None, copyright=COPYRIGHT, license=LICENSE)
 Print version information including copyright and license notices. More...
 
def basis.utilities.qsplit (args)
 Split quoted string of arguments. More...
 
def basis.utilities.targetuid (name, prefix=None, targets=None)
 Get UID of build target. More...
 
def basis.utilities.tostring (args)
 Convert array of arguments to quoted string. More...
 

Variables

 basis.utilities.binary_type = str
 
string basis.utilities.CONTACT = """andreas.schuh.84@gmail.com"""
 Default contact to use for help output of executables. More...
 
string basis.utilities.COPYRIGHT = """2011-12 University of Pennsylvania, 2013-14 Carnegie Mellon University, 2013-16 Andreas Schuh"""
 Default copyright of executables. More...
 
string basis.utilities.LICENSE = """See https://cmake-basis.github.io/download.html#license or COPYING file."""
 Default license of executables. More...
 
 basis.utilities.text_type = unicode
 

Detailed Description

Main module of project-independent BASIS utilities.

This module defines the BASIS Utilities whose implementations are not project-specific, i.e., do not make use of particular project attributes such as the name or version of the project. The utility functions defined by this module are intended for use in Python scripts and modules that are not build as part of a particular BASIS project. Otherwise, the project-specific implementations should be used instead, i.e., those defined by the basis.py module of the project. The basis.py module and the submodules imported by it are generated from template modules which are customized for the particular project that is being build.

Definition in file utilities.py.