diff --git a/newsfragments/5571.fixed.md b/newsfragments/5571.fixed.md new file mode 100644 index 00000000000..62d27103903 --- /dev/null +++ b/newsfragments/5571.fixed.md @@ -0,0 +1,2 @@ +Fix linking with libpython under Cygwin +Bumped `target-lexicon` dependency to 0.13.3 for Cygwin support. \ No newline at end of file diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index cd7cd52b73f..2f711915b8d 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -13,11 +13,11 @@ rust-version.workspace = true [dependencies] python3-dll-a = { version = "0.2.12", optional = true } -target-lexicon = "0.13" +target-lexicon = "0.13.3" [build-dependencies] python3-dll-a = { version = "0.2.12", optional = true } -target-lexicon = "0.13" +target-lexicon = "0.13.3" [features] default = [] diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs index cca9393d873..b977ac79479 100644 --- a/pyo3-build-config/src/impl_.rs +++ b/pyo3-build-config/src/impl_.rs @@ -890,6 +890,7 @@ pub fn is_linking_libpython_for_target(target: &Triple) -> bool { || target.operating_system == OperatingSystem::Aix || target.environment == Environment::Android || target.environment == Environment::Androideabi + || target.operating_system == OperatingSystem::Cygwin || !is_extension_module() }