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

Shared library paths #365

Closed
dazza-codes opened this issue Nov 27, 2020 · 3 comments
Closed

Shared library paths #365

dazza-codes opened this issue Nov 27, 2020 · 3 comments

Comments

@dazza-codes
Copy link

If wheels were to use shared library paths, is this project a useful point of consolidation to enable this, with sem-ver support for shared libs and conventions for building/distributing sem-ver shared libs?

In OSGeo/gdal#3060 I raised the problem and question of whether several projects that use a common dependency might all use a shared library in their binary wheel builds. In OSGeo/gdal#3060 (comment) I provided a nasty post-install hack to demonstrate and test the concept. Without repeating a lot of the details from OSGeo/gdal#3060 here, please check it out, including the links to related projects noted in the last comment. Any related pointers or commentary on python practices for shared libs would be great.

A shared-libs path should be able to support installations of many packages for any specific library. Ideally, it might prune a shared-libs path to provide only the latest patch (in major.minor.patch) version of any given library. If libraries were able to truly provide sem-ver releases, it might be possible to prune at the major.minor release level, but that's likely aiming too high. The option to prune shared libs might be enabled by default at the patch level, but could be disabled entirely for debugging.

@dazza-codes
Copy link
Author

dazza-codes commented Nov 28, 2020

It may be that any attempt to use a shared-libs python path requires changes in auditwheel or related wheel building, e.g.

If so, that's beyond the scope of this project, AFAICT. It seems that this project has a higher level of concern for OS distros than the concerns for building wheels or packaging shared libs into wheels. If the multiwheel builds that are called or used in this multibuild project could patch auditwheel, this project might define one or more conventions for a shared library path (assuming it might use or create new conventions for LD_LIBRARY_PATH).

Any kind of post-install hacks like https://github.com/dazza-codes/aws-lambda-layer-packing/blob/master/layer_create_zip.sh#L108 are risky and might only work for a specific OS target where the LD_LIBRARY_PATH is or can be identified and/or modified and tested. (Not to mention dep-tree resolution issues, which kinda rely on pip-extensions for OS packaging solutions.)

@matthew-brett
Copy link
Collaborator

matthew-brett commented Nov 30, 2020 via email

@radarhere radarhere changed the title shared library paths Shared library paths Dec 3, 2020
@mattip
Copy link
Collaborator

mattip commented Oct 23, 2024

Work has been done on this to share openblas wheels between scipy and numpy. However, it needs a tweak due to interactions with sdist distributions. See the conversation starting with this comment and pep 0725. Closing as out-of-scope for this repo.

@mattip mattip closed this as completed Oct 23, 2024
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

3 participants