Skip to content

Commit

Permalink
fix build config again
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Aug 15, 2024
1 parent a85fa4c commit 60c26c4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,12 @@ impl InterpreterConfig {
out.push("cargo:rustc-cfg=Py_LIMITED_API".to_owned());
}

if self.build_flags.0.contains(&BuildFlag::Py_GIL_DISABLED) {
out.push("cargo:rustc-cfg=Py_GIL_DISABLED".to_owned());
}

for flag in &self.build_flags.0 {
match flag {
BuildFlag::Py_GIL_DISABLED => out.push("cargo:rustc-cfg=Py_GIL_DISABLED".to_owned());
flag => out.push(format!("cargo:rustc-cfg=py_sys_config=\"{}\"", flag));
BuildFlag::Py_GIL_DISABLED => {
out.push("cargo:rustc-cfg=Py_GIL_DISABLED".to_owned())
}
flag => out.push(format!("cargo:rustc-cfg=py_sys_config=\"{}\"", flag)),
}
}

Expand Down

0 comments on commit 60c26c4

Please sign in to comment.