-
Notifications
You must be signed in to change notification settings - Fork 80
python bindings: build/install via integrated meson support #45
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
Conversation
|
@asoulier by the way, python packaging is another thing you can ask me about. ;) |
|
Thank Eli. That works great ;) Can I also ask you for some help with building WASM with meson? |
It is committed e67bb2d |
|
I know little to nothing about wasm. I tried writing a simple meson cross toolchain file: [binaries]
c = ['clang', '--target=wasm32']
[built-in options]
c_args = ['-mbulk-memory']
c_link_args = ['-nostdlib', '-Wl,--no-entry', '-Wl,--export-dynamic']
b_asneeded = false
b_lundef = falseconfigure log: compile log: So close, yet so far. It seems like meson may need a small tweak or so to get this to work. |
|
The start-group end-group stuff is technically used in the event that a library has multiple dependencies which liblc3 doesn't have, so my meson PR should count as a perfectly adequate workaround. Configuring with |
The meson build system has builtin support for python packaging, and unlike hatchling it is spec-compliant. Additionally, meson is already responsible for building the shared library itself, which the python build backend can then distribute inside the wheel. This allows shipping a wheel that can find its own liblc3.so via ctypes and doesn't require passing paths to the library around, nor to install both separately and hope that this works.
80f50cf to
32775b4
Compare
|
README updated. PTAL. |
The meson build system has builtin support for python packaging, and unlike hatchling it is spec-compliant. Additionally, meson is already responsible for building the shared library itself, which the python build backend can then distribute inside the wheel. This allows shipping a wheel that can find its own liblc3.so via ctypes and doesn't require passing paths to the library around, nor to install both separately and hope that this works.