Skip to content

Commit

Permalink
{2023.06}[foss/2022a] Pillow V9.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Top committed Oct 10, 2023
1 parent 29a3433 commit 2d45617
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ def get_eessi_envvar(eessi_envvar):

return eessi_envvar_value

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 get_rpath_override_dirs(software_name):
# determine path to installations in software layer via $EESSI_SOFTWARE_PATH
Expand Down Expand Up @@ -62,6 +74,7 @@ def parse_hook(ec, *args, **kwargs):
# 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)

Expand Down
4 changes: 4 additions & 0 deletions eessi-2023.06-eb-4.8.1-2022a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ easyconfigs:
- Tk-8.6.12-GCCcore-11.3.0.eb
- GROMACS-2023.1-foss-2022a.eb
- MUMPS-5.5.1-foss-2022a-metis.eb
- Pillow-9.1.1-GCCcore-11.3.0.eb:
# Uses a custom hook since has Szip as dependency which has hard coded header and library path within Pillow code.
options:
from-pr: 18881

0 comments on commit 2d45617

Please sign in to comment.