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.
This resolve issues with binary top-level modules affecting delocate on macOS (which helps with macOS wheel creation). Specifically, matthew-brett/delocate#12 (comment)
Change is that it moves (eg)
site-packages/_pygit2.cpython-37m-darwin.so
tosite-packages/pygit2/_pygit2.cpython-37m-darwin.so
, meaning the_pygit2
internal api is available viaimport pygit2._pygit2
cfimport _pygit2
The impact this has building macOS wheels:
(fyi
delocate-listdeps
shows the libraries and what depends on them indented)Before:
_pygit2.*.so
is still referencing the$LIBGIT2
path (everything should be prefixed@loader_path/.dylibs/
)$LIBGIT2/lib/libgit2.dylib
in position too (eg via:import pygit2; pygit2.config.Config()
), then you get a segfault$LIBGIT2/lib
location.By moving the
_pygit2
module into the top-level python package, delocate correctly links it to the baked libgit2.After:
Delocate could fix the issue, but the comments in that ticket imply there are additional concerns there, and I can't see any particular need for the internal
_pygit2
to be a top-level package.