Skip to content

Commit

Permalink
Added cpio, modified the eb_hooks and set BLAST+ as a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Top committed Oct 16, 2023
2 parents 7a06be7 + 58fc0e6 commit 4ffba6c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
28 changes: 28 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ def post_prepare_hook(self, *args, **kwargs):
POST_PREPARE_HOOKS[self.name](self, *args, **kwargs)


def parse_hook_blast_builddependencies(ec, eprefix):
"""Append cpio as a builddependency for BLAST."""
if ec.name == 'BLAST+':
ec['builddependencies'].append(('cpio','2.14'))
print_msg("NOTE: Blast+ requires cpio during the build process, The original builddependency list has been appended with (cpio,2.14))"
ec.log.info("NOTE: Blast+ requires cpio during the build process, The original builddependency list has been appended with (cpio,2.14))"
else:
raise EasyBuildError("blast-specific hook triggered for non-blast easyconfig?!")

def parse_hook_cgal_toolchainopts_precise(ec, eprefix):
"""Enable 'precise' rather than 'strict' toolchain option for CGAL on POWER."""
if ec.name == 'CGAL':
Expand Down Expand Up @@ -177,6 +186,23 @@ def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix):
raise EasyBuildError("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!")


def parse_hook_pillow_set_cpath_library_path(ec, eprefix):
"""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)
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 parse_hook_ucx_eprefix(ec, eprefix):
"""Make UCX aware of compatibility layer via additional configuration options."""
if ec.name == 'UCX':
Expand Down Expand Up @@ -269,9 +295,11 @@ def pre_test_hook_ignore_failing_tests_SciPybundle(self, *args, **kwargs):


PARSE_HOOKS = {
'BLAST+': parse_hook_blast_builddependencies,
'CGAL': parse_hook_cgal_toolchainopts_precise,
'fontconfig': parse_hook_fontconfig_add_fonts,
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
'Pillow': parse_hook_pillow_set_cpath_library_path,
'UCX': parse_hook_ucx_eprefix,
}

Expand Down
9 changes: 9 additions & 0 deletions eessi-2023.06-eb-4.8.1-2022a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,13 @@ easyconfigs:
- PCRE2-10.40-GCCcore-11.3.0.eb
- 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 zlib as dependency which has hard coded header and library path within Pillow code.
options:
from-pr: 18881
- cpio-2.14-foss-2022a.eb:
options:
from-pr: 19017
- BLAST+-2.13.0-gompi-2022a.eb
- MAKER-3.01.04-foss-2022a.eb

0 comments on commit 4ffba6c

Please sign in to comment.