Python API¶
This section includes information for using the Python API of bob.buildout
.
Extension¶
A monkey patch to zc.buildout.easy_install.develop that takes into consideration eggs installed at both development and deployment directories.
-
class
bob.buildout.extension.
Extension
(buildout)[source]¶ Bases:
object
-
develop
(setup, dest, build_ext=None, executable='/scratch/builds/bob/bob.buildout/miniconda/conda-bld/bob.buildout_1581698239106/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/bin/python3.7')[source]¶
-
Recipe¶
Builds custom interpreters with the right paths for external Bob
-
bob.buildout.scripts.
version_is_lessthan
(name, version)[source]¶ Checks if the version of a package is at least…
-
class
bob.buildout.scripts.
UserScripts
(buildout, name, options)[source]¶ Bases:
bob.buildout.script.Recipe
Installs all user scripts from the eggs
-
update
()¶
-
-
class
bob.buildout.scripts.
IPythonInterpreter
(buildout, name, options)[source]¶ Bases:
bob.buildout.script.Recipe
Installs all user scripts from the eggs
-
update
()¶
-
-
class
bob.buildout.scripts.
PyLint
(buildout, name, options)[source]¶ Bases:
bob.buildout.script.Recipe
Installs PyLint infrastructure
-
update
()¶
-
-
class
bob.buildout.scripts.
NoseTests
(buildout, name, options)[source]¶ Bases:
bob.buildout.script.Recipe
Installs Nose infrastructure
-
update
()¶
-
-
class
bob.buildout.scripts.
Coverage
(buildout, name, options)[source]¶ Bases:
bob.buildout.script.Recipe
Installs Coverage infrastructure
-
update
()¶
-
-
class
bob.buildout.scripts.
Sphinx
(buildout, name, options)[source]¶ Bases:
bob.buildout.script.Recipe
Installs the Sphinx documentation generation infrastructure
-
update
()¶
-
Other Modules¶
A wrapper for defining environment variables for the compilation
-
bob.buildout.envwrapper.
substitute
(value, d)[source]¶ Substitutes ${} expressions on
value
with values fromd
, using string.Template
-
class
bob.buildout.envwrapper.
EnvironmentWrapper
(logger, debug=None, prefixes=None, environ=None)[source]¶ Bases:
object
Provides methods for wrapping other install() methods with environment settings from initialization.
-
DEBUG_CFLAGS
= '-O0 -g -DBOB_DEBUG -DBZ_DEBUG'¶
-
Generic tools for Bob buildout recipes
-
bob.buildout.tools.
site_paths
(buildout, prefixes)[source]¶ Filters the site paths to make sure we don’t get mistaken when filtering user directories.
-
bob.buildout.tools.
parse_list
(l)[source]¶ Parses a ini-style list from buildout and solves complex nesting
-
bob.buildout.tools.
prepend_path
(path, paths)[source]¶ Prepends a path to the list of paths making sure it remains unique
-
bob.buildout.tools.
directory_readlines
(package, filename)[source]¶ Read all lines of a given file in a directory
-
bob.buildout.tools.
zipfile_readlines
(package, filename)[source]¶ Read all lines of a given file in a tar ball
-
bob.buildout.tools.
tarfile_readlines
(package, filename)[source]¶ Read all lines of a given file in tar ball
-
bob.buildout.tools.
package_readlines
(package, filename)[source]¶ Extracts a single file contents from a given package
-
bob.buildout.tools.
requirement_is_satisfied
(requirement, working_set, newest)[source]¶ Checks if the specifications for a requirement are satisfied by the current working set
-
bob.buildout.tools.
unsatisfied_requirements
(buildout, package, working_set)[source]¶ Reads and extracts the unsatisfied requirements from the package
-
bob.buildout.tools.
merge_working_sets
(self, other)[source]¶ Merge two working sets, results are put on the first one
-
bob.buildout.tools.
install_package
(buildout, specification, working_set)[source]¶ Installs a package on either the eggs directory or development-eggs directory. Updates the working set
-
bob.buildout.tools.
satisfy_requirements
(buildout, package, working_set)[source]¶ Makes sure all requirements from a given package are installed properly before we try to install the package itself.
-
bob.buildout.tools.
get_pythonpath
(working_set, buildout, prefixes)[source]¶ Returns the PYTHONPATH setting for a particular working set
-
bob.buildout.tools.
get_prefixes
(buildout)[source]¶ Returns a list of prefixes set on the buildout section
-
bob.buildout.tools.
has_distribution
(path)[source]¶ Tests if a given path really has installed python distributions
-
bob.buildout.tools.
order_egg_dirs
(buildout)[source]¶ Orders the egg directories and returns them newest first
-
bob.buildout.tools.
working_set
(buildout)[source]¶ Creates and returns a new working set based on user prefixes and existing packages already installed
-
bob.buildout.tools.
filter_working_set_hard
(working_set, requirements)[source]¶ Returns a new working set which contains only the paths to the required packages. Raises if a requirement cannot be met.
-
bob.buildout.tools.
filter_working_set_soft
(working_set, requirements)[source]¶ Returns a new working set which contains only the paths to the required packages. requirements that cannot be fulfilled are returned
Builds custom scripts with the right paths for external dependencies installed on different prefixes.
-
class
bob.buildout.script.
ScriptGenerator
(buildout, prefixes)[source]¶ Bases:
object
Replaces the default script generator so paths are properly filtered
-
class
bob.buildout.script.
Recipe
(buildout, name, options)[source]¶ Bases:
zc.recipe.egg.egg.Scripts
Just creates a given script with the “correct” paths
-
working_set
(extra=())[source]¶ Separate method to just get the working set - overriding zc.recipe.egg
This is intended for reuse by similar recipes.
-
update
()¶
-
Builds a custom python script interpreter
-
class
bob.buildout.python.
Recipe
(buildout, name, options)[source]¶ Bases:
bob.buildout.script.Recipe
Just creates a python interpreter with the “correct” paths
Builds a custom python script interpreter that is executed inside gdb/lldb
-
class
bob.buildout.dbpy.
Recipe
(buildout, name, options)[source]¶ Bases:
bob.buildout.python.Recipe
Just creates a gdb/lldb executable running a python interpreter with the “correct” paths