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

Build shared libpython.so #1570

Closed
wants to merge 1 commit into from
Closed

Conversation

lpsinger
Copy link
Contributor

@lpsinger lpsinger commented Feb 2, 2024

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.

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
Copy link
Member

mayeut commented Feb 3, 2024

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.

@mayeut mayeut closed this Feb 3, 2024
@lpsinger
Copy link
Contributor Author

lpsinger commented Feb 3, 2024

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

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

Successfully merging this pull request may close these issues.

2 participants