Skip to content

Commit

Permalink
don't install latest setuptools in stage2 if stage0 was skipped, use …
Browse files Browse the repository at this point in the history
…provided vsc-install tarball in stage2 if available
  • Loading branch information
boegel committed Nov 8, 2016
1 parent 6d93527 commit d66d1b4
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions components/dev-tools/easybuild/SOURCES/bootstrap_eb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -949,4 +951,3 @@ def main():

# run main function as body of script
main()

0 comments on commit d66d1b4

Please sign in to comment.