Skip to content

Commit 8150f1f

Browse files
authored
Merge pull request #2 from boegel/branfosj_develop
require that $EASYBUILD_BOOTSTRAP_DEPRECATED is defined to run EasyBuild bootstrap script
2 parents b0544c1 + 2cea28e commit 8150f1f

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/workflows/bootstrap_script.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ jobs:
107107
EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g')
108108
EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ')
109109
EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM"
110-
EB_BOOTSTRAP_EXPECTED="20210106.01 c2d93de0dd91123eb4f51cfc16d1f5efb80f1d238b3d6cd100994086887a1ae0"
110+
EB_BOOTSTRAP_EXPECTED="20210618.01 e5d477d717c6d3648ba2027ab735713ba5804fbf52f4b4adcca0bc1379b44618"
111111
test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1)
112112
113113
# test bootstrap script
114114
export PREFIX=/tmp/$USER/$GITHUB_SHA/eb_bootstrap
115+
export EASYBUILD_BOOTSTRAP_DEPRECATED=1
115116
python easybuild/scripts/bootstrap_eb.py $PREFIX
117+
unset EASYBUILD_BOOTSTRAP_DEPRECATED
116118
# unset $PYTHONPATH to avoid mixing two EasyBuild 'installations' when testing bootstrapped EasyBuild module
117119
unset PYTHONPATH
118120
# simple sanity check on bootstrapped EasyBuild module

easybuild/scripts/bootstrap_eb.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
import urllib.request as std_urllib
6363

6464

65-
EB_BOOTSTRAP_VERSION = '20210106.01'
65+
EB_BOOTSTRAP_VERSION = '20210618.01'
6666

6767
# argparse preferrred, optparse deprecated >=2.7
6868
HAVE_ARGPARSE = False
@@ -82,6 +82,9 @@
8282

8383
STAGE1_SUBDIR = 'eb_stage1'
8484

85+
# the EasyBuild bootstrap script is deprecated, and will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined
86+
EASYBUILD_BOOTSTRAP_DEPRECATED = os.environ.pop('EASYBUILD_BOOTSTRAP_DEPRECATED', None)
87+
8588
# set print_debug to True for detailed progress info
8689
print_debug = os.environ.pop('EASYBUILD_BOOTSTRAP_DEBUG', False)
8790

@@ -854,8 +857,17 @@ def main():
854857
self_txt = open(__file__).read()
855858
if IS_PY3:
856859
self_txt = self_txt.encode('utf-8')
857-
info("DEPRECATED: Use of the EasyBuild boostrap script is deprecated and may not work.")
858-
info("Recommended install methods: https://docs.easybuild.io/en/latest/Installation.html\n")
860+
861+
url = 'https://docs.easybuild.io/en/latest/Installation.html'
862+
info("Use of the EasyBuild boostrap script is DEPRECATED (since June 2021).")
863+
info("It is strongly recommended to use one of the installation methods outlined at %s instead!\n" % url)
864+
if not EASYBUILD_BOOTSTRAP_DEPRECATED:
865+
error("The EasyBuild bootstrap script will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined.")
866+
else:
867+
msg = "You have opted to continue with the EasyBuild bootstrap script by defining "
868+
msg += "$EASYBUILD_BOOTSTRAP_DEPRECATED. Good luck!\n"
869+
info(msg)
870+
859871
info("EasyBuild bootstrap script (version %s, MD5: %s)" % (EB_BOOTSTRAP_VERSION, md5(self_txt).hexdigest()))
860872
info("Found Python %s\n" % '; '.join(sys.version.split('\n')))
861873

0 commit comments

Comments
 (0)