-
Notifications
You must be signed in to change notification settings - Fork 1
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
{2023.06}[foss/2022a] Pillow V9.1.1 #202
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,23 @@ def parse_hook(ec, *args, **kwargs): | |
PARSE_HOOKS[ec.name](ec, eprefix) | ||
|
||
|
||
def parse_hook_pillow_set_cpath_library_path(ec, eprefix): | ||
"""Get EESSI_CPATH environment variable from the environment""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, the hook augments env vars Mention There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this look good : Extend CPATH and LIBRARY_PATH environment variables using EESSI_EPREFIX. |
||
if ec.name == 'Pillow': | ||
EESSI_CPATH = os.getenv('EESSI_EPREFIX') + '/usr/include' | ||
EESSI_LIB_PATH = os.getenv('EESSI_EPREFIX') + '/usr/lib64' | ||
print_msg("NOTE:Pillow has zlib as a dependancy,the original CPATH value: (%s) has been extended with (%s)", | ||
os.getenv('CPATH'), EESSI_CPATH) | ||
print_msg("NOTE:Pillow has zlib as a dependancy,the original LIBRARY_PATH value: (%s) has been extended with (%s)", | ||
os.getenv('LIBRARY_PATH'), EESSI_LIB_PATH) | ||
ec.log.info("NOTE:Pillow has zlib as a dependancy,the original CPATH value: (%s) has been extended with (%s)", | ||
os.getenv('CPATH'), EESSI_CPATH) | ||
ec.log.info("NOTE:Pillow has zlib as a dependancy,the original LIBRARY_VALUE value: (%s) has been extended with (%s)", | ||
os.getenv('LIBRARY_PATH'), EESSI_LIB_PATH) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor suggestion on formatting. Added spaces. "NOTE: Pillow has zlib as a dependency. The original CPATH ..." |
||
os.environ['CPATH'] = os.pathsep.join(filter(None,[os.environ.get('CPATH',''), EESSI_CPATH])) | ||
os.environ['LIBRARY_PATH'] = os.pathsep.join(filter(None,[os.environ.get('LIBRARY_PATH',''), EESSI_LIB_PATH])) | ||
|
||
|
||
def pre_prepare_hook(self, *args, **kwargs): | ||
"""Main pre-prepare hook: trigger custom functions.""" | ||
|
||
|
@@ -273,6 +290,7 @@ def pre_test_hook_ignore_failing_tests_SciPybundle(self, *args, **kwargs): | |
'fontconfig': parse_hook_fontconfig_add_fonts, | ||
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, | ||
'UCX': parse_hook_ucx_eprefix, | ||
'Pillow': parse_hook_pillow_set_cpath_library_path, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you order the entries alphabetically ... one line upwards. |
||
} | ||
|
||
POST_PREPARE_HOOKS = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move the whole function to where the other parse hooks are defined?