From 0ff2c60525eb370914e548727201507b5f7ce10a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 27 Aug 2021 11:04:33 +0200 Subject: [PATCH] patch reframe script to ensure Python packages are picked up from ReFrame installation directory in recent ReFrame easyconfigs --- easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.2.eb | 5 ++++- easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.3.eb | 5 ++++- easybuild/easyconfigs/r/ReFrame/ReFrame-3.7.3.eb | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.2.eb b/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.2.eb index be6da2fe133..b3d80d6b8fe 100644 --- a/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.2.eb +++ b/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.2.eb @@ -39,7 +39,10 @@ postinstallcmds = [ 'mkdir -p %(installdir)s/share/man/man1 %(installdir)s/share/man/man8', 'cp docs/man/man1/reframe.1 %(installdir)s/share/man/man1', 'cp docs/man/man8/reframe.settings.8 %(installdir)s/share/man/man8', - 'cp -r share/completions %(installdir)s/share/completions' + 'cp -r share/completions %(installdir)s/share/completions', + # patch reframe script to disable import of 'site' module to make sure that Python packages installed + # in ReFrame installation directory are used, rather than those in the Python installation + r"sed -i 's@/\(python[0-9.]*\)$@/\1 -S@g' %(installdir)s/bin/reframe", ] sanity_check_paths = { diff --git a/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.3.eb b/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.3.eb index a3f94b9c0c7..58bc6d53a22 100644 --- a/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.3.eb +++ b/easybuild/easyconfigs/r/ReFrame/ReFrame-3.6.3.eb @@ -39,7 +39,10 @@ postinstallcmds = [ 'mkdir -p %(installdir)s/share/man/man1 %(installdir)s/share/man/man8', 'cp docs/man/man1/reframe.1 %(installdir)s/share/man/man1', 'cp docs/man/man8/reframe.settings.8 %(installdir)s/share/man/man8', - 'cp -r share/completions %(installdir)s/share/completions' + 'cp -r share/completions %(installdir)s/share/completions', + # patch reframe script to disable import of 'site' module to make sure that Python packages installed + # in ReFrame installation directory are used, rather than those in the Python installation + r"sed -i 's@/\(python[0-9.]*\)$@/\1 -S@g' %(installdir)s/bin/reframe", ] sanity_check_paths = { diff --git a/easybuild/easyconfigs/r/ReFrame/ReFrame-3.7.3.eb b/easybuild/easyconfigs/r/ReFrame/ReFrame-3.7.3.eb index ed0c7106320..adf12a18c0b 100644 --- a/easybuild/easyconfigs/r/ReFrame/ReFrame-3.7.3.eb +++ b/easybuild/easyconfigs/r/ReFrame/ReFrame-3.7.3.eb @@ -40,6 +40,9 @@ exts_list = [ postinstallcmds = [ "cp -r tutorials %(installdir)s", "mkdir -p %(installdir)s/share && cp -r share/completions %(installdir)s/share/completions", + # patch reframe script to disable import of 'site' module to make sure that Python packages installed + # in ReFrame installation directory are used, rather than those in the Python installation + r"sed -i 's@/\(python[0-9.]*\)$@/\1 -S@g' %(installdir)s/bin/reframe", ] sanity_check_paths = {