bootstrap_eb
Bootstrap script for EasyBuild
Installs distribute with included (patched) distribute_setup.py script to obtain easy_install, and then performs a staged install of EasyBuild: * stage 0: install setuptools (which provides easy_install), unless already available * stage 1: install EasyBuild with easy_install to a temporary directory * stage 2: install EasyBuild with EasyBuild from stage 1 to specified install directory
Authors: Kenneth Hoste (UGent), Stijn Deweirdt (UGent), Ward Poelmans (UGent) License: GPLv2
inspired by https://bitbucket.org/pdubroy/pip/raw/tip/getpip.py (via http://dubroy.com/blog/so-you-want-to-install-a-python-package/)
check_easy_install_cmd()
¶
Try to make sure available 'easy_install' command matches active 'setuptools' installation.
check_module_command(tmpdir)
¶
Check which module command is available, and prepare for using it.
check_setuptools()
¶
Check whether a suitable setuptools installation is already available.
debug(msg)
¶
Print debug message.
det_lib_path(libdir)
¶
Determine relative path of Python library dir.
det_modules_path(install_path)
¶
Determine modules path.
error(msg, exit=True)
¶
Print error message and exit.
find_egg_dir_for(path, pkg)
¶
Find full path of egg dir for given package.
info(msg)
¶
Print info message.
main()
¶
Main script: bootstrap EasyBuild in stages.
mock_stdout_stderr()
¶
Mock stdout/stderr channels
prep(path)
¶
Prepare for installing a Python package in the specified path.
restore_stdout_stderr(orig_stdout, orig_stderr)
¶
Restore stdout/stderr channels after mocking
run_easy_install(args)
¶
Run easy_install with specified list of arguments
stage0(tmpdir)
¶
STAGE 0: Prepare and install distribute via included (patched) distribute_setup.py script.
stage1(tmpdir, sourcepath, distribute_egg_dir, forcedversion)
¶
STAGE 1: temporary install EasyBuild using distribute's easy_install.
stage2(tmpdir, templates, install_path, distribute_egg_dir, sourcepath)
¶
STAGE 2: install EasyBuild to temporary dir with EasyBuild from stage 1.