diff --git a/components/dev-tools/easybuild/SOURCES/bootstrap_eb.py b/components/dev-tools/easybuild/SOURCES/bootstrap_eb.py index 3255caa1d0..77c80377d1 100644 --- a/components/dev-tools/easybuild/SOURCES/bootstrap_eb.py +++ b/components/dev-tools/easybuild/SOURCES/bootstrap_eb.py @@ -585,20 +585,22 @@ def stage2(tmpdir, templates, install_path, distribute_egg_dir, sourcepath): print('\n') info("+++ STAGE 2: installing EasyBuild in %s with EasyBuild from stage 1...\n" % install_path) - if distribute_egg_dir is None: - preinstallopts = '' - else: - # inject path to distribute installed in stage 1 into $PYTHONPATH via preinstallopts - # other approaches are not reliable, since EasyBuildMeta easyblock unsets $PYTHONPATH; - preinstallopts = "export PYTHONPATH=%s:$PYTHONPATH && " % distribute_egg_dir - - # ensure that (latest) setuptools is installed as well alongside EasyBuild, - # since it is a required runtime dependency for recent vsc-base and EasyBuild versions - # this is necessary since we provide our own distribute installation during the bootstrap (cfr. stage0) - preinstallopts += "easy_install -U --prefix %(installdir)s setuptools && " + preinstallopts = '' + + if distribute_egg_dir is not None: + # ensure that (latest) setuptools is installed as well alongside EasyBuild, + # since it is a required runtime dependency for recent vsc-base and EasyBuild versions + # this is necessary since we provide our own distribute installation during the bootstrap (cfr. stage0) + preinstallopts += "easy_install -U --prefix %(installdir)s setuptools && " + # vsc-install is a runtime dependency for the EasyBuild unit test suite, # and is easily picked up from stage1 rather than being actually installed, so force it - preinstallopts += "easy_install -U --prefix %(installdir)s vsc-install && " + vsc_install_tarball_paths = glob.glob(os.path.join(sourcepath, 'vsc-install*.tar.gz')) + if len(vsc_install_tarball_paths) == 1: + vsc_install = vsc_install_tarball_paths[0] + else: + vsc_install = 'vsc-install' + preinstallopts += "easy_install -U --prefix %%(installdir)s %s && " % vsc_install templates.update({ 'preinstallopts': preinstallopts, @@ -823,8 +825,8 @@ def main(): # >>> base64.b64encode(zlib.compress(open("distribute_setup.py").read())) # compressed copy below is for setuptools 0.6c11, after applying patch: # -# --- distribute_setup.py.orig 2013-07-05 03:50:13.000000000 +0200 -# +++ distribute_setup.py 2015-11-27 12:20:12.040032041 +0100 +# --- distribute_setup.py.orig 2013-07-05 03:50:13.000000000 +0200 +# +++ distribute_setup.py 2015-11-27 12:20:12.040032041 +0100 # @@ -528,6 +528,8 @@ # log.warn("--user requires Python 2.6 or later") # raise SystemExit(1) @@ -949,4 +951,3 @@ def main(): # run main function as body of script main() - diff --git a/components/dev-tools/easybuild/SPECS/easybuild.spec b/components/dev-tools/easybuild/SPECS/easybuild.spec index 373e685299..152ccba707 100644 --- a/components/dev-tools/easybuild/SPECS/easybuild.spec +++ b/components/dev-tools/easybuild/SPECS/easybuild.spec @@ -74,8 +74,9 @@ export EASYBUILD_BOOTSTRAP_SOURCEPATH=%{_sourcedir} export EASYBUILD_BOOTSTRAP_DEBUG=1 export DEBUG_EASYBUILD_OPTIONS=1 export EASYBUILD_INSTALLPATH=%{install_path} -export EB_VERSION=%{version} export PATH=${LMOD_DIR}:${PATH} +# note: $EB_VERSION and $PYTHON_VERSION are only required because of bootstrap_eb.py-apply-patch.patch +export EB_VERSION=%{version} export PYTHON_VERSION=`python -c 'print ".".join(map(str, __import__("sys").version_info[:2]))'` MODULEPATH= python ./bootstrap_eb.py %{buildroot}/%{install_path}