Skip to content

Commit 4efd7a6

Browse files
lazkadavidhewitt
authored andcommitted
Link explicitly with libpython under Cygwin (#5571)
* Link explicitly with libpython under Cygwin As with native Windows Python, we need to explicitly link with libpython under Cygwin too. This fixes building extensions under Cygwin. * bump `target-lexicon` to 0.13.3 0.13.3 added support for Cygwin
1 parent c6a25a2 commit 4efd7a6

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

newsfragments/5571.fixed.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix linking with libpython under Cygwin
2+
Bumped `target-lexicon` dependency to 0.13.3 for Cygwin support.

pyo3-build-config/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ rust-version.workspace = true
1313

1414
[dependencies]
1515
python3-dll-a = { version = "0.2.12", optional = true }
16-
target-lexicon = "0.13"
16+
target-lexicon = "0.13.3"
1717

1818
[build-dependencies]
1919
python3-dll-a = { version = "0.2.12", optional = true }
20-
target-lexicon = "0.13"
20+
target-lexicon = "0.13.3"
2121

2222
[features]
2323
default = []

pyo3-build-config/src/impl_.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ pub fn is_linking_libpython_for_target(target: &Triple) -> bool {
890890
|| target.operating_system == OperatingSystem::Aix
891891
|| target.environment == Environment::Android
892892
|| target.environment == Environment::Androideabi
893+
|| target.operating_system == OperatingSystem::Cygwin
893894
|| !is_extension_module()
894895
}
895896

0 commit comments

Comments
 (0)