diff --git a/CHANGELOG.md b/CHANGELOG.md index e74f516fc6..81227615c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Bug fixes: - `CentreOfRotationCorrector.image_sharpness` data is now correctly smoothed to reduce aliasing artefacts and improve robustness. (#2202) - `PaganinProcessor` now correctly applies scaling with magnification for cone-beam geometry (#2225) + - `cilacc` path lookup no longer broken for editable installations (#2257) - update `version.py` to use `importlib` & fix tagless installation #2255 (#2269) - Dependencies: - olefile and dxchange are optional dependencies, instead of required (#2209) diff --git a/Wrappers/Python/cil/framework/cilacc.py b/Wrappers/Python/cil/framework/cilacc.py index 367cfbeec2..32078f03cc 100644 --- a/Wrappers/Python/cil/framework/cilacc.py +++ b/Wrappers/Python/cil/framework/cilacc.py @@ -17,10 +17,11 @@ # CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt # Joshua DM Hellier (University of Manchester) [refactorer] import ctypes -from pathlib import Path +from importlib.metadata import distribution try: - cilacc_path = next((Path(__file__).parent.parent / 'lib').resolve().glob("*cilacc.*")) + dist = distribution("cil").locate_file("cil/lib") + cilacc_path = next(dist.glob("*cilacc.*")) except StopIteration: raise FileNotFoundError("cilacc library not found") cilacc = ctypes.cdll.LoadLibrary(str(cilacc_path))