We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PYO3_BUILD_EXTENSION_MODULE
1 parent 12a1792 commit bfef190Copy full SHA for bfef190
pyo3-build-config/src/impl_.rs
@@ -862,9 +862,14 @@ pub fn get_abi3_version() -> Option<PythonVersion> {
862
863
/// Checks if the `extension-module` feature is enabled for the PyO3 crate.
864
///
865
+/// This can be triggered either by:
866
+/// - The `extension-module` Cargo feature
867
+/// - Setting the `PYO3_BUILD_EXTENSION_MODULE` environment variable
868
+///
869
/// Must be called from a PyO3 crate build script.
870
pub fn is_extension_module() -> bool {
871
cargo_env_var("CARGO_FEATURE_EXTENSION_MODULE").is_some()
872
+ || env_var("PYO3_BUILD_EXTENSION_MODULE").is_some()
873
}
874
875
/// Checks if we need to link to `libpython` for the current build target.
0 commit comments