-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
Pure Python fallbacks #1839
Comments
See also #1081 |
The main problem generating different kinds of wheels based on the environment is that it breaks built source distribution caching, which is one of the main assumption a python package manager has to make. Would uploading a |
Interesting idea to upload a pure python wheel. I think if users have set the build backend to I think the Python sources can be the same ones, they could do a fairly common trick of try to import from the Rust library, and if that fails fall back to Python. cc @mgorny who I understand would want this in Gentoo. Does giving |
Yes, I think having an option of building pure Python wheels would be helpful. Rather than via envvar, enabling it via maturin options (i.e. via the However, it all depends on whether the Python-Rust ecosystem would actually develop a culture of providing fallbacks. |
Thought I'd share my experience here, as I’m also working on a project with a pure-python fallback. In general I'm really happy with
I also wonder if it'd be a lot faster since it uses cross-compilation instead of relying on emulation 🤔 My project would easily build with edit: update: I now switched to maturin for building wheels and it is way faster (2 minutes instead of >20 minutes with cibuildwheel!) |
Thanks @ariebovenberg, I think your approach of combining |
Recently I heard a comment pointing out that many C extension modules offer a pure Python fallbacks for users on performs without wheels and do not wish to compile code.
For Rust there's the additional case that not all hardware can run Rust code. Even if that gap is closing over time, it would be nice to make it possible to package code for these users.
I think it might not be too hard - there could be a pure-python path in the pep517 backend which is activated by a
MATURIN_NO_RUST
environment variable. This pathway would just install the Python code and skip any compile. Maybe we could even delegate to another backend likehatch
.Then we just need an example, to prompt users to consider it.
Of course, maybe this kind of complex configuration is better left to
setuptools-rust
.The text was updated successfully, but these errors were encountered: