Skip to content
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

mangling and dependency over .so in other wheels #410

Open
amol- opened this issue Jan 27, 2023 · 2 comments
Open

mangling and dependency over .so in other wheels #410

amol- opened this issue Jan 27, 2023 · 2 comments

Comments

@amol-
Copy link

amol- commented Jan 27, 2023

I tried to come up with an experiment to understand how a big package containing many shared objects could be divided in smaller packages all containing some shared objects and allowing each wheel to rely on the shared objects provided by the other wheel.

It seemed to me that --exclude could have allowed that when the python libraries are imported in the proper order, so I created https://github.com/amol-/wheeldeps

If my understanding is correct, the mangling of shared objects would prevent that experiment from being successful, because once auditwheel repair is applied, one package would provide libfoo-ef63151d.so (the package where libfoo is embedded), but the other package would look for libfoo.so as it had --exclude libfoo.so and thus would not recognise libfoo-ef63151d.so as the library that it is looking for.

What would be the best way to handle this use case?

@amol-
Copy link
Author

amol- commented Jan 30, 2023

I was able to make my proof of concept work correctly by applying the name mangling done by auditwheel to the excluded library too ( amol-/wheeldeps@6b1f8af ).

But that seems like an hack and not something that might be a long term solution.

@amol-
Copy link
Author

amol- commented Feb 2, 2023

I built https://github.com/amol-/consolidatewheels as a way to address this problem and consolidate mangling convention across multiple wheels. This is now also used in https://github.com/amol-/wheeldeps/blob/main/try.sh#L9 experiment to consolidate wheels and make the experiment work.

If anyone needs the same approach, this is now available on pypi https://pypi.org/project/consolidatewheels/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant