Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate EasyBuild bootstrap script #3742

Merged
merged 6 commits into from
Jun 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/bootstrap_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,14 @@ jobs:
EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g')
EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ')
EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM"
EB_BOOTSTRAP_EXPECTED="20210106.01 c2d93de0dd91123eb4f51cfc16d1f5efb80f1d238b3d6cd100994086887a1ae0"
EB_BOOTSTRAP_EXPECTED="20210618.01 e5d477d717c6d3648ba2027ab735713ba5804fbf52f4b4adcca0bc1379b44618"
test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1)

# test bootstrap script
export PREFIX=/tmp/$USER/$GITHUB_SHA/eb_bootstrap
export EASYBUILD_BOOTSTRAP_DEPRECATED=1
python easybuild/scripts/bootstrap_eb.py $PREFIX
unset EASYBUILD_BOOTSTRAP_DEPRECATED
# unset $PYTHONPATH to avoid mixing two EasyBuild 'installations' when testing bootstrapped EasyBuild module
unset PYTHONPATH
# simple sanity check on bootstrapped EasyBuild module
Expand Down
16 changes: 15 additions & 1 deletion easybuild/scripts/bootstrap_eb.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
import urllib.request as std_urllib


EB_BOOTSTRAP_VERSION = '20210106.01'
EB_BOOTSTRAP_VERSION = '20210618.01'

# argparse preferrred, optparse deprecated >=2.7
HAVE_ARGPARSE = False
Expand All @@ -82,6 +82,9 @@

STAGE1_SUBDIR = 'eb_stage1'

# the EasyBuild bootstrap script is deprecated, and will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined
EASYBUILD_BOOTSTRAP_DEPRECATED = os.environ.pop('EASYBUILD_BOOTSTRAP_DEPRECATED', None)

# set print_debug to True for detailed progress info
print_debug = os.environ.pop('EASYBUILD_BOOTSTRAP_DEBUG', False)

Expand Down Expand Up @@ -854,6 +857,17 @@ def main():
self_txt = open(__file__).read()
if IS_PY3:
self_txt = self_txt.encode('utf-8')

url = 'https://docs.easybuild.io/en/latest/Installation.html'
info("Use of the EasyBuild boostrap script is DEPRECATED (since June 2021).")
info("It is strongly recommended to use one of the installation methods outlined at %s instead!\n" % url)
if not EASYBUILD_BOOTSTRAP_DEPRECATED:
error("The EasyBuild bootstrap script will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined.")
else:
msg = "You have opted to continue with the EasyBuild bootstrap script by defining "
msg += "$EASYBUILD_BOOTSTRAP_DEPRECATED. Good luck!\n"
info(msg)

info("EasyBuild bootstrap script (version %s, MD5: %s)" % (EB_BOOTSTRAP_VERSION, md5(self_txt).hexdigest()))
info("Found Python %s\n" % '; '.join(sys.version.split('\n')))

Expand Down