Skip to content

Commit 89cc228

Browse files
author
TopRichard
committed
{2023.06}[foss/2022a] matplotlib v3.5.2
1 parent 860f935 commit 89cc228

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

eb_hooks.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,25 @@ def get_rpath_override_dirs(software_name):
5454

5555
return rpath_injection_dirs
5656

57+
def set_Pillow_envvars(ec):
58+
"""Get an EESSI_CPATH environment variable from the environment"""
59+
EESSI_CPATH = os.getenv('EESSI_EPREFIX') + '/usr/include'
60+
EESSI_LIB_PATH = os.getenv('EESSI_EPREFIX') + '/usr/lib64'
61+
if ec.name == 'Pillow':
62+
os.environ['CPATH'] = os.pathsep + EESSI_CPATH
63+
os.environ['LIBRARY_PATH'] = os.pathsep + EESSI_LIB_PATH
64+
print_msg("NOTE: For Pillow which has Szip as a dependancy, CPATH has been set to %s", os.getenv('CPATH'))
65+
print_msg("NOTE: For Pillow which has Szip as a dependancy, LIBRARY_PATH has been set to %s", os.getenv('LIBRARY_PATH'))
66+
ec.log.info("NOTE: For Pillow which has Szip as a dependancy, CPATH has been set to %s", os.getenv('CPATH'))
67+
ec.log.info("NOTE: For Pillow which has Szip as a dependancy, LIBRARY_PATH has been set to %s", os.getenv('LIBRARY_PATH'))
68+
5769

5870
def parse_hook(ec, *args, **kwargs):
5971
"""Main parse hook: trigger custom functions based on software name."""
6072

6173
# determine path to Prefix installation in compat layer via $EPREFIX
6274
eprefix = get_eessi_envvar('EPREFIX')
63-
75+
set_Pillow_envvars(ec)
6476
if ec.name in PARSE_HOOKS:
6577
PARSE_HOOKS[ec.name](ec, eprefix)
6678

eessi-2023.06-eb-4.8.1-2022a.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ easyconfigs:
66
from-pr: 18870
77
- foss-2022a
88
- SciPy-bundle-2022.05-foss-2022a
9-
- BAMM-2.5.0-foss-2022a.eb
9+
- BAMM-2.5.0-foss-2022a.eb
10+
- Pillow-9.1.1-GCCcore-11.3.0.eb:
11+
# avoid that hardcoded paths like /usr/include are used in build commands
12+
# Uses a hook to modify the hardcoded LIBRARY and Header paths.
13+
options:
14+
from-pr: 18881
15+
- matplotlib-3.5.2-foss-2022a.eb

0 commit comments

Comments
 (0)