Repository navigation
Make pyccl importable when isitgr is installed but unloadable - #1316
Merged
Merged
Conversation
Coverage Report for CI Build 40483085944Coverage remained the same at 97.471%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
carlosggarcia
approved these changes
Oct 27, 2026
An installed but broken isitgr (e.g. an invalid isitgrlib.so, as seen on the macOS arm64 CI runners) raises OSError from dlopen, not ImportError. The guarded import in pyccl/boltzmann.py only caught ModuleNotFoundError, so `import pyccl` and the whole test suite (conftest) failed. - boltzmann.py: catch (ImportError, OSError) on the early isitgr import. - tests/conftest.py: skip tests parametrized with boltzmann_isitgr when isitgr cannot be imported (previously they failed). - Add a regression test for the broken-isitgr import. This does not fix the underlying isitgr build on macOS arm64.
CFLAGS/LDFLAGS pointed at /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk (a workaround from the macos-10.15/11 images, see #1025), while the compiler uses the SDK of the active Xcode (xcrun, see SDKROOT). On the current macos-latest image the Command Line Tools SDK is newer than the Xcode linker can parse, so the CMake C++ compiler check fails at link time ("ld: tapi error: malformed file ... libSystem.B.tbd ... unknown architecture"). Use $SDKROOT for both, consistent with CONDA_BUILD_SYSROOT.
carlosggarcia
force-pushed
the
fix_isitgr_import_oserror
branch
from
October 27, 2026 09:44
aa8d9b7 to
c73ee08
Compare
Contributor
Author
Yes, I think that once the isitgr build is fixed, we should revisit the workflow. But it should not skip isitgr is it is present, and should bark anyway if it is not. So silently skipping is really occurring right now, while isitgr is broken in a specific way. Once the dust settles I am happy to reevaluate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An installed but broken isitgr (e.g. an invalid isitgrlib.so, as seen on the macOS arm64 CI runners) raises OSError from dlopen, not ImportError. The guarded import in pyccl/boltzmann.py only caught ModuleNotFoundError, so
import pyccland the whole test suite (conftest) failed.This does not fix the underlying isitgr build on macOS arm64.