From 89cc228e5fc0a629a422134e67693b1a60f2fe25 Mon Sep 17 00:00:00 2001 From: TopRichard Date: Wed, 11 Oct 2023 06:42:48 +0000 Subject: [PATCH 1/6] {2023.06}[foss/2022a] matplotlib v3.5.2 --- eb_hooks.py | 14 +++++++++++++- eessi-2023.06-eb-4.8.1-2022a.yml | 8 +++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index dbb8415541..2bdead4b73 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -54,13 +54,25 @@ def get_rpath_override_dirs(software_name): return rpath_injection_dirs +def set_Pillow_envvars(ec): + """Get an EESSI_CPATH environment variable from the environment""" + EESSI_CPATH = os.getenv('EESSI_EPREFIX') + '/usr/include' + EESSI_LIB_PATH = os.getenv('EESSI_EPREFIX') + '/usr/lib64' + if ec.name == 'Pillow': + os.environ['CPATH'] = os.pathsep + EESSI_CPATH + os.environ['LIBRARY_PATH'] = os.pathsep + EESSI_LIB_PATH + print_msg("NOTE: For Pillow which has Szip as a dependancy, CPATH has been set to %s", os.getenv('CPATH')) + print_msg("NOTE: For Pillow which has Szip as a dependancy, LIBRARY_PATH has been set to %s", os.getenv('LIBRARY_PATH')) + ec.log.info("NOTE: For Pillow which has Szip as a dependancy, CPATH has been set to %s", os.getenv('CPATH')) + ec.log.info("NOTE: For Pillow which has Szip as a dependancy, LIBRARY_PATH has been set to %s", os.getenv('LIBRARY_PATH')) + def parse_hook(ec, *args, **kwargs): """Main parse hook: trigger custom functions based on software name.""" # determine path to Prefix installation in compat layer via $EPREFIX eprefix = get_eessi_envvar('EPREFIX') - + set_Pillow_envvars(ec) if ec.name in PARSE_HOOKS: PARSE_HOOKS[ec.name](ec, eprefix) diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index 97704ebe30..87ca700d96 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -6,4 +6,10 @@ easyconfigs: from-pr: 18870 - foss-2022a - SciPy-bundle-2022.05-foss-2022a - - BAMM-2.5.0-foss-2022a.eb \ No newline at end of file + - BAMM-2.5.0-foss-2022a.eb + - Pillow-9.1.1-GCCcore-11.3.0.eb: + # avoid that hardcoded paths like /usr/include are used in build commands + # Uses a hook to modify the hardcoded LIBRARY and Header paths. + options: + from-pr: 18881 + - matplotlib-3.5.2-foss-2022a.eb From b03340ac61e2e1d168efe0b56ece7122c06c16a6 Mon Sep 17 00:00:00 2001 From: TopRichard Date: Mon, 13 Nov 2023 16:57:32 +0000 Subject: [PATCH 2/6] removed Pillow hook --- eb_hooks.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index ede8401760..c592fcd6ec 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -54,25 +54,12 @@ def get_rpath_override_dirs(software_name): return rpath_injection_dirs -def set_Pillow_envvars(ec): - """Get an EESSI_CPATH environment variable from the environment""" - EESSI_CPATH = os.getenv('EESSI_EPREFIX') + '/usr/include' - EESSI_LIB_PATH = os.getenv('EESSI_EPREFIX') + '/usr/lib64' - if ec.name == 'Pillow': - os.environ['CPATH'] = os.pathsep + EESSI_CPATH - os.environ['LIBRARY_PATH'] = os.pathsep + EESSI_LIB_PATH - print_msg("NOTE: For Pillow which has Szip as a dependancy, CPATH has been set to %s", os.getenv('CPATH')) - print_msg("NOTE: For Pillow which has Szip as a dependancy, LIBRARY_PATH has been set to %s", os.getenv('LIBRARY_PATH')) - ec.log.info("NOTE: For Pillow which has Szip as a dependancy, CPATH has been set to %s", os.getenv('CPATH')) - ec.log.info("NOTE: For Pillow which has Szip as a dependancy, LIBRARY_PATH has been set to %s", os.getenv('LIBRARY_PATH')) - def parse_hook(ec, *args, **kwargs): """Main parse hook: trigger custom functions based on software name.""" # determine path to Prefix installation in compat layer via $EPREFIX eprefix = get_eessi_envvar('EPREFIX') - set_Pillow_envvars(ec) if ec.name in PARSE_HOOKS: PARSE_HOOKS[ec.name](ec, eprefix) From 09c97bd2b96f1628461f1784d2aaa813d22d9145 Mon Sep 17 00:00:00 2001 From: TopRichard Date: Mon, 13 Nov 2023 16:59:11 +0000 Subject: [PATCH 3/6] removed the hook comment --- eessi-2023.06-eb-4.8.1-2022a.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index 0aaa66a4ab..b6504915ca 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -12,7 +12,6 @@ easyconfigs: from-pr: 18963 - Pillow-9.1.1-GCCcore-11.3.0.eb: # avoid that hardcoded paths like /usr/include are used in build commands - # Uses a hook to modify the hardcoded LIBRARY and Header paths. options: from-pr: 19266 - matplotlib-3.5.2-foss-2022a.eb From 9b150a73de58592050383adfc7c73b90c2797c69 Mon Sep 17 00:00:00 2001 From: TopRichard Date: Mon, 13 Nov 2023 18:28:17 +0000 Subject: [PATCH 4/6] added the eb file in 4.8.2 yml file --- eessi-2023.06-eb-4.8.1-2022a.yml | 5 ----- eessi-2023.06-eb-4.8.2-2022a.yml | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index b6504915ca..8317a40b7a 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -10,8 +10,3 @@ easyconfigs: - ESPResSo-4.2.1-foss-2022a: options: from-pr: 18963 - - Pillow-9.1.1-GCCcore-11.3.0.eb: - # avoid that hardcoded paths like /usr/include are used in build commands - options: - from-pr: 19266 - - matplotlib-3.5.2-foss-2022a.eb diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/eessi-2023.06-eb-4.8.2-2022a.yml index bab796db2b..81fa757cd7 100644 --- a/eessi-2023.06-eb-4.8.2-2022a.yml +++ b/eessi-2023.06-eb-4.8.2-2022a.yml @@ -35,3 +35,8 @@ easyconfigs: - WSClean-3.4-foss-2022a: options: from-pr: 19119 + - Pillow-9.1.1-GCCcore-11.3.0.eb: + # avoid that hardcoded paths like /usr/include are used in build commands + options: + from-pr: 19266 + - matplotlib-3.5.2-foss-2022a.eb From b396a56257d42a4a365a97f9e3bcc680404c3fec Mon Sep 17 00:00:00 2001 From: TopRichard Date: Tue, 14 Nov 2023 09:06:56 +0000 Subject: [PATCH 5/6] reference to PR#19226 instead --- eessi-2023.06-eb-4.8.2-2022a.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/eessi-2023.06-eb-4.8.2-2022a.yml index 81fa757cd7..6406064513 100644 --- a/eessi-2023.06-eb-4.8.2-2022a.yml +++ b/eessi-2023.06-eb-4.8.2-2022a.yml @@ -38,5 +38,5 @@ easyconfigs: - Pillow-9.1.1-GCCcore-11.3.0.eb: # avoid that hardcoded paths like /usr/include are used in build commands options: - from-pr: 19266 + from-pr: 19226 - matplotlib-3.5.2-foss-2022a.eb From c2e26c159230aa7e06851cd9099368785e189075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 15 Nov 2023 09:33:11 +0100 Subject: [PATCH 6/6] restore blank line --- eb_hooks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eb_hooks.py b/eb_hooks.py index c592fcd6ec..31f2b9588d 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -60,6 +60,7 @@ def parse_hook(ec, *args, **kwargs): # determine path to Prefix installation in compat layer via $EPREFIX eprefix = get_eessi_envvar('EPREFIX') + if ec.name in PARSE_HOOKS: PARSE_HOOKS[ec.name](ec, eprefix)