Open
Description
Link to reproducible example: https://github.com/medley56/python_rust
When using meson-python to package a Rust extension, I get the following error when running pip install .
../meson.build:10:14: ERROR: Rust crate python_rust_lib.cpython-312-darwin type dylib does not allow spaces, periods or dashes in the library name due to a limitation of rustc. Replace them with underscores, for example
The project works when using maturin
as a build backend so I'm reasonably sure it's not a problem with the actual extension. I believe the problem is in meson-python or in my configuration of meson-python, causing the backend to build the rust extension with an invalid name.
Platform: MacOS Sequioia 15.3
Documentation I've consulted:
Tutorial: https://mesonbuild.com/meson-python/tutorials/introduction.html#tutorial
meson docs for extension_module
: https://mesonbuild.com/Python-module.html#extension_module
PyO3 docs (uses maturin): https://pyo3.rs/v0.23.4/module.html