-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for delocating top level modules. #123
Conversation
Codecov Report
@@ Coverage Diff @@
## master #123 +/- ##
==========================================
+ Coverage 94.76% 94.88% +0.11%
==========================================
Files 13 13
Lines 994 997 +3
==========================================
+ Hits 942 946 +4
+ Misses 52 51 -1
Continue to review full report at Codecov.
|
68a261e
to
d87ca80
Compare
Add a top-level package-less wheel to test. Fixes duplicate library issues when a wheel has multiple packages. Fixes issues where a wheel has no packages.
d87ca80
to
f67a014
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic - thanks! Just a few suggestions. Are you testing the case for more than one package in wheel?
Co-authored-by: Matthew Brett <[email protected]>
d397666
to
d6619c9
Compare
How about a test for namespace packages as well? (Sorry for the stream of requests). |
Only the current wheels are tested so more wheels either need to be added or the current need to be modified to be more diverse. There are no wheels using namespace packages, or wheels with more than one package. Namespace packages are currently treated the same as wheels with no packages. I see this as acceptable since wheel names shouldn't collide. While there are no wheels with multiple packages, both the conditions of selecting a package by the wheel name and selecting a package alphabetically have been covered by tests. |
Move _make_install_name_ids_unique outside of the function. Remove all_copied since this function no longer has a loop.
c641aa3
to
f5e1e8a
Compare
I've added a namespace wheel with a typical test for it. |
a7a4f22
to
317b3d9
Compare
317b3d9
to
6aed15e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a final few comments.
Co-authored-by: Matthew Brett <[email protected]>
This parameter is no longer used by its function and may be removed in the future.
515aa88
to
4c36ca0
Compare
Thanks very much for this - it's a big step forward. |
I'd like to make a release of a version with this merged. make_release.rst mentions making announcements to a mailing list, but I don't see the mailing list this is referring to. If you ever want to make a release then all you have to do right now is push a tag with the version (after following the release guide of course.) We should also look at the other PR's which were trying to implement this feature: #36 #38 #39 #74 can probably be closed without merging. #96 might improve the handling of namespace packages but I don't think the author will care much now that namespace packages decloate correctly. |
Yes, good idea to make a release. Maybe this could be version 1.0, to
signal the loss of Python 2, and the extended features. We could leave up
#96 for now, and let the author decide later ...
|
I'm not sure about a 1.0 release yet. Semantic versioning gives more flexibility for public API changes before a 1.0.0 release and I'm not sure the API is settled yet. |
I have personally found little use for applying semantic versioning with any rigor. Basically, it seems to me that we always want to preserve the API, or migrate sensibly, and a version number change will do little to effectively warn users that a breaking API change is on the way. But if you'd rather play it that way, that's OK too. |
I'm not sure. It's probably not as big of a deal to have a stable programming API for a primarily CLI tool, but my current suggestion is to go with |
That's fine too - it's really not a big deal - I don't think people pay much attention to version numbers anyway. |
Semantic versioning just sets the rules for why versions are what they are. If you released
Personally, there are things I'd like to do or braking changes I'd consider making before |
can confirm this works -- thanks for picking up this patch! |
It looks like the missing functionality was merged matthew-brett/delocate#123
It looks like the missing functionality was merged matthew-brett/delocate#123
It looks like the missing functionality was merged matthew-brett/delocate#123
This delocates libraries into one directory per wheel. I've added a top-level package-less wheel to test with.
Prevents copying duplicate libraries when a wheel has multiple packages. Fixes #35.
Fixes issues where the module to work on is at the top-level, such as a wheel with no packages. Generally any current issue where delocate mysteriously doesn't bundle libraries has been fixed. Fixes #72, fixes #22, fixes #45, fixes #63, fixes #121, fixes #66, fixes #49, fixes #67.
See
_decide_dylib_bundle_directory
for how the folder to use is determined. I've followed the advice from #72 to use an auditwheel-style name. Wheels without packages use the folder{package_name}.dylibs
, wheels with packages will put a.dylibs
folder in only one of the packages preferring the one that matches the wheel name. The one directory will hold the dependencies of the entire wheel.After that the fix was simple: In
delocate_wheel
calldelocate_path
only once and call it with atree_path
that includes the entire wheel.Since this always collects everything regardless of if a package is found or not. This will also resolve issues where namespace packages couldn't be delocated. Fixes #95.