-
Notifications
You must be signed in to change notification settings - Fork 150
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
Fix: Patch RPATHs of non-Python extension dependencies #283
Conversation
…n-py extensions (pypa#134) * Adding minimal test wheel based on PR pypa#134 * Separate tests for each change in PR pypa#134 pypa#134 * non-py extension does not show in auditwheel show (ignoring assert) * Confirming tests on macOS * pytest in travis is weirdly triggering a manual test * Sorry! Forgot to install zlib-devel
Codecov Report
@@ Coverage Diff @@
## master #283 +/- ##
==========================================
+ Coverage 89.03% 89.04% +0.01%
==========================================
Files 20 20
Lines 1058 1059 +1
Branches 226 226
==========================================
+ Hits 942 943 +1
Misses 69 69
Partials 47 47
Continue to review full report at Codecov.
|
full_external_refs[fn] = lddtree_external_references( | ||
nonpy_elftree[fn], ctx.path) |
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.
The core of the fix in this PR is just to move this line out of the "if" statement above. Almost everything else in this PR is just adding tests.
Thank you so much for providing this. I really wasn't able to work on the original PRs. I wonder if you have used any of the code that I wrote for this. |
Yes, I based this on your previous PRs. You can see in the commit history that I cherry-picked your previous work onto a new branch before updating the code, so that you receive credit in the git history. 👍 |
Thanks for working on this @bdice, @thomaslima |
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.
The functional code change is OK however, I find the test case a bit too complicated and might conflict (or more exactly, the test would become useless) with #152
A simpler, more contained test should work as well here, maybe something like tests/integration/testdependencies
but going one level deeper in dependencies to cover the issue would work if I understand correctly ?
@mayeut I agree that your suggestion for a simpler test extension would be good. I had hoped it would be good enough as-is, but you're right that won't work any more with #152. It will take me some time to make these changes -- I will try to have a simpler test extension by the end of the week. Is there a release schedule or other timeline to be aware of? I would like to get this fix into the next release if possible. |
pypa/auditwheel#136 results in pure C++ libraries not getting patched by auditwheel. This is a problem for us, since our pure C++ library, libstem.so, needs its rpath patched for hdf5. pypa/auditwheel#283 fixes this issue, but is not yet merged. Until it gets merged and added to quay.io/pypa/manylinux2010_x86_64, we will patch auditwheel inside quay.io/pypa/manylinux2010_x86_64 to include this fix. Signed-off-by: Patrick Avery <[email protected]>
pypa/auditwheel#136 results in pure C++ libraries not getting patched by auditwheel. This is a problem for us, since our pure C++ library, libstem.so, needs its rpath patched for hdf5. pypa/auditwheel#283 fixes this issue, but is not yet merged. Until it gets merged and added to quay.io/pypa/manylinux2010_x86_64, we will patch auditwheel inside quay.io/pypa/manylinux2010_x86_64 to include this fix. Signed-off-by: Patrick Avery <[email protected]>
Update: I just finished writing a new, simpler test case. I have to do some local testing and code cleanup before re-requesting review. I anticipate having updated tests for this PR finished in the next 2 days. |
Thanks for the update @bdice
We have no release schedule for |
@mayeut I tried to create a new test, in Edit: also, I noticed that the command |
@bdice,
Yes, see also #281. Should be easier for tests once #289 lands. |
This PR resolves #136, and replaces the open (stalled) PR #139 from @thomaslima (closes #139).
Summary of the problem
From my comment in #136, slightly edited for clarity:
Solution
Add non-Python extensions to the dictionary of
full_external_refs
inget_wheel_elfdata
inwheel_abi.py
.Context
This PR adds the fix and ports over tests from a previous PR #134 that was reverted in #190 due to tests failing (I think the failures were caused by changes in the testing infrastructure, but I'm not 100% sure). Also related to this is PR #245 which handles a related issue that @thomaslima worked on in #140.
Testing
The
hello
package intests/integration/nonpy_rpath
is a minimal-ish example of such a package with a non-Python extension library with an RPATH that needs to be repaired. The tests I added are based on @thomaslima's previous work, updated to match newer conventions in the testing code for auditwheel. I think the tests are relatively complete. I manually verified that the tests fail without the fix.