-
-
Notifications
You must be signed in to change notification settings - Fork 190
libpython_link_mode=shared for unix platforms ? #44
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
Comments
When I initially wrote this project, the aim was static only builds (to support PyOxidizer's initial vision of single file executables). Only recently have we added support for shared libraries on Windows (out of necessity to support pre-compiled extension modules). That's why we don't distribute a libpythonXY.so outside of Windows. I agree that shipping a shared library would be useful. I think the Linux and macOS distributions should have shared library distribution variants, if not distribute both the shared and static libraries in the same distribution (it should be possible on these platforms whereas Windows needs separate builds/distributions because of symbol visibility wonkiness). In the mean time, you should be able to produce your own .so on Linux by linking the As for |
I just committed a change to produce a dynamic libpython by default on Linux and macOS. The distribution archives now contain both a shared and static libpython. There might be some subtle bugs lingering. But I'm pretty confident basic |
That's pretty cool, thanks a lot !
I'm going to do a custom build from the master, I'll notify you if I encounter any trouble 😄 |
Hi @indygreg,
I working on a python binding for the Godot game engine
Godot works as a standalone application that can be extended by loading shared libraries, hence my binding must embed a python interpreter.
So currently I build CPython from the source as part of the binding build, but (as you very well know 😄 ) this is a tedious and error-prone step.
Hence I'll be really interested in using your pre-build releases instead ;-)
However my binding is written in Cython which produces native modules that depend on
libpythonXY.so
, but your builds only providelibpythonXY.so
for Windows :'(So what the reasons shared library is not available for Unix ? Is there something I can do to help ? ;-)
Does a cheap hack like
gcc -shared -o libpythonXY.so build/Object/**.so
or recompilinglibpythonX.Ym.a
into a shared lib could work ?Another important requirement for godot-python is to allow game developer to be able to use
pip
to access the full Python ecosystem. Is there some limitations I would face with your builds ?(From why I've seen in the documentation, the main issues are the shebang in the pip binary which isn't a big deal and the fact that plenty of native lib expect to have a libpython.so available but my project already have this requirement by itself so I have to solve this anyway)
PS: I've been following your Pyoxidizer project since it announcement, it's an incredible work you're doing at addressing one of the biggest weakness of Python. I guess we can confidently say you are building a killer feature for Python 😃
The text was updated successfully, but these errors were encountered: