-
Notifications
You must be signed in to change notification settings - Fork 40
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
Usage in PyO3 extension module #27
Comments
Interesting! It seems that enabling Cargo automatically takes the union of all requested features of a crate through the whole dependency graph, which includes the procedural macros. This means that I don't know much about how this works on Windows and Mac, but on Linux it works fine to make an extension module without |
See PyO3/pyo3#904 |
Thanks for the quick response! The follow up is a bit beyond my expertise, but I agree that this is an issue with PyO3 as features should be strictly additive. There has in fact already been discussion about this in PyO3/pyo3#771. Additionally, from PyO3s # Use this feature when building an extension module.
# It tells the linker to keep the python symbols unresolved,
# so that the module can also be used with statically linked python interpreters.
extension-module = [] it seems that IMO it is fine to close this issue. But I would consider adding a small note to the How to Use section in the Readme indicating that the |
Does the new Cargo feature resolver solve this issue (by no longer unifying proc-macro and build dependency features with "run-time" dependencies)? |
Hi! Awesome project.
I'm currently working on Python bindings for a Rust library. I occasionally have to call small Python snippets from the Rust code. This library would be a very elegant solution to that.
However, when I try to compile
inline-python
with the feature"extension-module"
in PyO3 enabled I get an error:To reproduce
Cargo.toml
src/lib.rs
Rust version: rustc 1.45.0-nightly (fa51f810e 2020-04-29)
Thanks for any help!
The text was updated successfully, but these errors were encountered: