-
Notifications
You must be signed in to change notification settings - Fork 114
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
Opt-in feature to enable pyo3/multiple-pymethods feature #475
base: main
Are you sure you want to change the base?
Conversation
This would cause the numpy crate to no longer compile for pyodide (target I don't think it should be necessary for numpy to enable this feature for you to be able to use it in your own project. |
The idea is to offer an opt-in feature to enable pyo3's multiple-pymethods feature in the numpy crate (as is already the case for the pyo3/gil-refs feature) |
There is no need to do that. With a simple starter project I have no problem compiling with the following pyo3 = { version = "0.22", features = ["multiple-pymethods"] }
numpy = "0.22" ( |
This is not the case with proc-macros, which is our use case:
source: https://doc.rust-lang.org/cargo/reference/features.html#feature-resolver-version-2
You can take a look at the simple example we've provided which highlights this problem. |
I can't really tell whos fault this is. From my perpective these should be completely independend builds that should interfere with each other. My guess would be that this is some weird You can simply add Anyway I still don't think adding a feature makes sense, it's always possible to also add |
Hi there,
Context
We’ve encountered an issue while using the rust-numpy crate in conjunction with the pyo3 multiple-pymethods feature in one of our internal projects. This feature is essential for implementing methods on a structure across multiple files, which helps in organizing larger codebases. However, since rust-numpy does not currently enable this feature, it caused conflicts when trying to use both crates together.
Reproducible example
reproducible_example.zip
What this pull request does
Simply adds a opt-in
multiple-pymethods
feature to enable thepyo3/multiple-pymethods
feature.We believe this change will improve the usability of rust-numpy for users with similar requirements
Thank you for considering this PR!
Best regards,
Nuant Team