Add dll binary path for cadet core pypi distribution#78
Merged
hannahlanzrath merged 4 commits intoJun 24, 2026
Merged
Conversation
28b8c5f to
87bea92
Compare
bdd334e to
0196ee3
Compare
0196ee3 to
f738aee
Compare
f738aee to
67e4380
Compare
jbreue16
approved these changes
Jun 24, 2026
jbreue16
left a comment
Contributor
There was a problem hiding this comment.
Fix works for me,
from cadet import Cadet
c = Cadet()
print("DLL:", c.cadet_dll_path)
print("CLI:", c.cadet_cli_path)
prints None for the DLL on master, but gives a correct path with this branch
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.
Fixes and add tests for #77
When this PR is merged we should to a bug fix release!
Summary
Make CADET-Python correctly find the CADET-Core DLL when installed via the
cadet-corePyPI package (not just conda), and add CI coverage for that install path.cadet/cadet.py:resolve_cadet_pathsnow falls back to thecadet_corepackage's own directory (Path(cadet_core.__file__).parent) to locate the shared library whenever it isn't found under the originally-resolved root. This handles two PyPI problems: binaries nested insidesite-packages/cadet_core/rather than at the venv root, and (discovered via CI)cadet-cli/createLWEconsole scripts sometimes living in a completely different prefix than thecadet_corepackage itself (seen on macOS GH Actions runners). Also added the SONAME-versionedlibcadet.0.dylibas a fallback filename on macOS.tests/test_cadet.py: newtest_create_lwe_and_run_cli_smoke, parametrized over the conda-autodetected install and thecadet-corePyPI install (skipped viapytest.importorskipifcadet_coreisn't present). Runscreate_lwe()+run_simulation()and checks for a clean return code..github/workflows/pipeline.yml: newtest-pypi-job: a plain-Python (no conda) matrix job thatpip installs CADET-Python +cadet-coreand runs the test suite, exercising the PyPI install path end-to-end across Linux/Windows/macOS.tests/test_install_path_settings.py: relaxedtest_autodetectionto check thatcadet_dll_path/cadet_cli_pathexist rather than asserting they share a parent directory with the install root, since that invariant doesn't hold for PyPI installs where the dll and the console scripts can live under different prefixes.