|
4 | 4 | import re |
5 | 5 |
|
6 | 6 | from easybuild.easyblocks.generic.configuremake import obtain_config_guess |
| 7 | +from easybuild.framework.easyconfig.constants import EASYCONFIG_CONSTANTS |
7 | 8 | from easybuild.tools.build_log import EasyBuildError, print_msg |
8 | 9 | from easybuild.tools.config import build_option, update_build_option |
9 | 10 | from easybuild.tools.filetools import apply_regex_substitutions, copy_file, which |
|
23 | 24 |
|
24 | 25 | EESSI_RPATH_OVERRIDE_ATTR = 'orig_rpath_override_dirs' |
25 | 26 |
|
| 27 | +SYSTEM = EASYCONFIG_CONSTANTS['SYSTEM'][0] |
| 28 | + |
26 | 29 |
|
27 | 30 | def get_eessi_envvar(eessi_envvar): |
28 | 31 | """Get an EESSI environment variable from the environment""" |
@@ -181,6 +184,25 @@ def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix): |
181 | 184 | raise EasyBuildError("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!") |
182 | 185 |
|
183 | 186 |
|
| 187 | +def parse_hook_pybind11_replace_catch2(ec, eprefix): |
| 188 | + """ |
| 189 | + Replace Catch2 build dependency in pybind11 easyconfigs with one that doesn't use system toolchain. |
| 190 | + cfr. https://github.com/easybuilders/easybuild-easyconfigs/pull/19270 |
| 191 | + """ |
| 192 | + # this is mainly necessary to avoid that --missing keeps reporting Catch2/2.13.9 is missing, |
| 193 | + # and to avoid that we need to use "--from-pr 19270" for every easyconfigs that (indirectly) depends on pybind11 |
| 194 | + if ec.name == 'pybind11' and ec.version in ['2.10.3', '2.11.1']: |
| 195 | + build_deps = ec['builddependencies'] |
| 196 | + catch2_build_dep = None |
| 197 | + catch2_name, catch2_version = ('Catch2', '2.13.9') |
| 198 | + for idx, build_dep in enumerate(build_deps): |
| 199 | + if build_dep[0] == catch2_name and build_dep[1] == catch2_version: |
| 200 | + catch2_build_dep = build_dep |
| 201 | + break |
| 202 | + if catch2_build_dep and len(catch2_build_dep) == 4 and catch2_build_dep[3] == SYSTEM: |
| 203 | + build_deps[idx] = (catch2_name, catch2_version) |
| 204 | + |
| 205 | + |
184 | 206 | def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix): |
185 | 207 | """ |
186 | 208 | Disable check for QtWebEngine in Qt5 as workaround for problem with determining glibc version. |
@@ -314,11 +336,19 @@ def pre_test_hook_ignore_failing_tests_FFTWMPI(self, *args, **kwargs): |
314 | 336 |
|
315 | 337 | def pre_test_hook_ignore_failing_tests_SciPybundle(self, *args, **kwargs): |
316 | 338 | """ |
317 | | - Pre-test hook for SciPy-bundle: skip failing tests for SciPy-bundle 2021.10 (currently the only version that is failing). |
| 339 | + Pre-test hook for SciPy-bundle: skip failing tests for selected SciPy-bundle versions |
| 340 | + In version 2021.10, 2 failing tests in scipy 1.6.3: |
| 341 | + FAILED optimize/tests/test_linprog.py::TestLinprogIPSparse::test_bug_6139 - A... |
| 342 | + FAILED optimize/tests/test_linprog.py::TestLinprogIPSparsePresolve::test_bug_6139 |
| 343 | + = 2 failed, 30554 passed, 2064 skipped, 10992 deselected, 76 xfailed, 7 xpassed, 40 warnings in 380.27s (0:06:20) = |
| 344 | + In versions 2023.07, 2 failing tests in scipy 1.11.1: |
| 345 | + FAILED scipy/spatial/tests/test_distance.py::TestPdist::test_pdist_correlation_iris |
| 346 | + FAILED scipy/spatial/tests/test_distance.py::TestPdist::test_pdist_correlation_iris_float32 |
| 347 | + = 2 failed, 54409 passed, 3016 skipped, 223 xfailed, 13 xpassed, 10917 warnings in 892.04s (0:14:52) = |
318 | 348 | In previous versions we were not as strict yet on the numpy/SciPy tests |
319 | 349 | """ |
320 | 350 | cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') |
321 | | - if self.name == 'SciPy-bundle' and self.version == '2021.10' and cpu_target == CPU_TARGET_NEOVERSE_V1: |
| 351 | + if self.name == 'SciPy-bundle' and self.version in ['2021.10', '2023.07'] and cpu_target == CPU_TARGET_NEOVERSE_V1: |
322 | 352 | self.cfg['testopts'] = "|| echo ignoring failing tests" |
323 | 353 |
|
324 | 354 |
|
@@ -352,6 +382,7 @@ def pre_single_extension_isoband(ext, *args, **kwargs): |
352 | 382 | 'CGAL': parse_hook_cgal_toolchainopts_precise, |
353 | 383 | 'fontconfig': parse_hook_fontconfig_add_fonts, |
354 | 384 | 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, |
| 385 | + 'pybind11': parse_hook_pybind11_replace_catch2, |
355 | 386 | 'Qt5': parse_hook_qt5_check_qtwebengine_disable, |
356 | 387 | 'UCX': parse_hook_ucx_eprefix, |
357 | 388 | } |
|
0 commit comments