-
Notifications
You must be signed in to change notification settings - Fork 911
docs: replace extension-module feature in docs
#5588
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
| PyO3 has some Cargo features to configure projects for building Python extension modules: | ||
|
|
||
| - The `extension-module` feature, which must be enabled when building Python extension modules. | ||
| - The `PYO3_BUILD_EXTENSION_MODULE` environment variable, which must be set when building Python extension modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bullet doesn't match the intro :-)
It's probably worth saying that people don't generally need to set this themselves, because maturin/setuptools-rust set it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…2821) Similar change as PyO3/pyo3#5588
Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
|
Looks like this failed to merge because |
|
I think we can review/merge #5624 and then this PR should be mergeable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #5624 merged, is this now mergeable?
I've read the updated guide text and I think its clear and consistent.
Thanks for the work that you do :)
| ### The `PYO3_BUILD_EXTENSION_MODULE` environment variable | ||
|
|
||
| PyO3's `extension-module` feature is used to disable [linking](https://en.wikipedia.org/wiki/Linker_(computing)) to `libpython` on Unix targets. | ||
| <a name="the-extension-module-feature"></a> <!-- for backwards compatibility --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
Could also use a heading attribute here now, like here in the mdbook0.5 upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I want both the new heading referring to the environment variable, and the old one referring to the feature.
Co-authored-by: Matthijs Kok <matthijs.kok2@gmail.com>
Following up from #5343
This updates documentation across the codebase to discourage use of the
extension-modulefeature and to instead rely on thePYO3_BUILD_EXTENSION_MODULEenvironment variable when relevant.