Skip to content

Commit 9fd7016

Browse files
committed
fix CI? (mac and win pass; linux fails)
1 parent 28195cc commit 9fd7016

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ fn main() {
22
// Keep extension-module link flags for the cdylib artifact.
33
pyo3_build_config::add_extension_module_link_args();
44

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+
512
// Link tests/binaries against the discovered Python shared library so
613
// `cargo test` works without extra environment flags.
714
let cfg = pyo3_build_config::get();

0 commit comments

Comments
 (0)