pypa / manylinux

Python wheels that work on any linux (almost)
MIT License
1.42k stars 217 forks source link

Build shared libpython.so #1570

Closed lpsinger closed 7 months ago

lpsinger commented 7 months ago

Our project (http://git.ligo.org/lscsoft/lalsuite, https://pypi.org/project/lalsuite/) distributes several C command line programs that embed Python interpreters by linking against libpython, plus some Python C extensions modules (which of course do not link against libpython).

For those rare cases like ours where Python embedding is required, using a shared library libpython permits auditwheel to deduplicate libpython and store only one copy in the wheel.

mayeut commented 7 months ago

Thanks for your contribution.

I understand your needs which are different from the past ones to get a shared build in this repo however, this adds too many risks which I'm not prepared to deal with.

As I've said before, I'm not against getting support to build a shared version as long as it's an optional non-default feature. The images would need to be generated / published elsewhere though.

I'm sorry to close this like this as it's the first legitimate - given the scope of the project - use case I'm seeing to build a shared version.

The only thing I can think of apart from building / publishing the images yourself is to generate those executables as a single one (busybox like) but I'm not sure it would play well with the wheel format & probably requires too much work on your end.

lpsinger commented 7 months ago

That makes sense. Given that we have a valid application, would you view #1185 favorably?