Fix libraw linking on macOS with sdist - #294
Merged
Merged
Conversation
Link bundled Unix libraries by their exact paths so environment-provided library directories cannot select an incompatible system LibRaw. Co-authored-by: Copilot <[email protected]>
Build with Homebrew LibRaw ahead of the bundled library directory and inspect the wheel before delocation to catch accidental system-library linkage. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
I just tested this and confirm this fixes the problem on my mac. agrif@anduril:~/devel/lightleak$ otool -L rawpy/_rawpy.cpython-313-darwin.so
rawpy/_rawpy.cpython-313-darwin.so:
@rpath/libraw_r.25.dylib (compatibility version 25.0.0, current version 25.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)And with #295, it is loading the version it compiled with (and not my system libraw 0.21.4). Python 3.13.3 (main, Apr 12 2025, 09:27:05) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import rawpy
>>> rawpy.libraw_version
(0, 22, 1)
>>> rawpy.libraw_version_compiled
(0, 22, 1)Thank you very much! |
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 #293.