We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28195cc commit 9fd7016Copy full SHA for 9fd7016
build.rs
@@ -2,6 +2,13 @@ fn main() {
2
// Keep extension-module link flags for the cdylib artifact.
3
pyo3_build_config::add_extension_module_link_args();
4
5
+ // Skip explicit libpython linking when building the extension module itself.
6
+ // Manylinux wheels do not ship a linkable libpython, so the extra link flags
7
+ // cause the build to fail; tests/binaries still link for host runs.
8
+ if std::env::var_os("PYO3_BUILD_EXTENSION_MODULE").is_some() {
9
+ return;
10
+ }
11
+
12
// Link tests/binaries against the discovered Python shared library so
13
// `cargo test` works without extra environment flags.
14
let cfg = pyo3_build_config::get();
0 commit comments