Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise target-lexicon version and update for API changes #4822

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/4822.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bumped `target-lexicon` dependency to 0.13
4 changes: 2 additions & 2 deletions pyo3-build-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ rust-version = "1.63"
[dependencies]
once_cell = "1"
python3-dll-a = { version = "0.2.11", optional = true }
target-lexicon = "0.12.14"
target-lexicon = "0.13"

[build-dependencies]
python3-dll-a = { version = "0.2.11", optional = true }
target-lexicon = "0.12.14"
target-lexicon = "0.13"

[features]
default = []
Expand Down
4 changes: 2 additions & 2 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,8 @@ impl CrossCompileConfig {
&& host.operating_system == OperatingSystem::Windows;

// Not cross-compiling to compile for x86-64 Python from macOS arm64 and vice versa
compatible |= target.operating_system == OperatingSystem::Darwin
&& host.operating_system == OperatingSystem::Darwin;
compatible |= matches!(target.operating_system, OperatingSystem::Darwin(_))
&& matches!(host.operating_system, OperatingSystem::Darwin(_));

!compatible
}
Expand Down
2 changes: 1 addition & 1 deletion pyo3-build-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn add_extension_module_link_args() {
}

fn _add_extension_module_link_args(triple: &Triple, mut writer: impl std::io::Write) {
if triple.operating_system == OperatingSystem::Darwin {
if matches!(triple.operating_system, OperatingSystem::Darwin(_)) {
writeln!(writer, "cargo:rustc-cdylib-link-arg=-undefined").unwrap();
writeln!(writer, "cargo:rustc-cdylib-link-arg=dynamic_lookup").unwrap();
} else if triple == &Triple::from_str("wasm32-unknown-emscripten").unwrap() {
Expand Down
Loading