update bootstrap to
@@ -53,7 +53,7 @@ from distutils.version import LooseVersion
from hashlib import md5
-EB_BOOTSTRAP_VERSION = '20170503.01'
+EB_BOOTSTRAP_VERSION = '20170808.01'
# argparse preferrred, optparse deprecated >=2.7
HAVE_ARGPARSE = False
@@ -69,6 +69,10 @@ VSC_BASE = 'vsc-base'
VSC_INSTALL = 'vsc-install'
EASYBUILD_PACKAGES = [VSC_INSTALL, VSC_BASE, 'easybuild-framework', 'easybuild-easyblocks', 'easybuild-easyconfigs']
+STAGE1_SUBDIR = 'eb_stage1'
+
+STAGE1_SUBDIR = 'eb_stage1'
+
# set print_debug to True for detailed progress info
print_debug = os.environ.pop('EASYBUILD_BOOTSTRAP_DEBUG', False)
@@ -482,7 +486,7 @@ def stage1(tmpdir, sourcepath, distribute_egg_dir):
run_easy_install(['--help'])
# prepare install dir
- targetdir_stage1 = os.path.join(tmpdir, 'eb_stage1')
+ targetdir_stage1 = os.path.join(tmpdir, STAGE1_SUBDIR)
prep(targetdir_stage1) # set PATH, Python search path
# install latest EasyBuild with easy_install from PyPi
@@ -682,6 +686,22 @@ def stage2(tmpdir, templates, install_path, distribute_egg_dir, sourcepath):
debug("Running EasyBuild with arguments '%s'" % ' '.join(eb_args))
sys.argv = eb_args
+ # location to 'eb' command (from stage 1) may be expected to be included in $PATH
+ # it usually is there after stage1, unless 'prep' is called again with another location
+ # (only when stage 0 is not skipped)
+ # cfr. https://github.com/easybuilders/easybuild-framework/issues/2279
+ curr_path = [x for x in os.environ.get('PATH', '').split(os.pathsep) if len(x) > 0]
+ os.environ['PATH'] = os.pathsep.join([os.path.join(tmpdir, STAGE1_SUBDIR, 'bin')] + curr_path)
+ debug("$PATH: %s" % os.environ['PATH'])
+
+ # location to 'eb' command (from stage 1) may be expected to be included in $PATH
+ # it usually is there after stage1, unless 'prep' is called again with another location
+ # (only when stage 0 is not skipped)
+ # cfr. https://github.com/easybuilders/easybuild-framework/issues/2279
+ curr_path = [x for x in os.environ.get('PATH', '').split(os.pathsep) if len(x) > 0]
+ os.environ['PATH'] = os.pathsep.join([os.path.join(tmpdir, STAGE1_SUBDIR, 'bin')] + curr_path)
+ debug("$PATH: %s" % os.environ['PATH'])
+
# install EasyBuild with EasyBuild
from easybuild.main import main as easybuild_main
easybuild_main()
