Don't emit `Py_LIMITED_API` cfg for PyPy

This commit is contained in:
messense 2021-11-15 10:44:26 +08:00
parent 543f4c1792
commit 73c3911748
2 changed files with 4 additions and 5 deletions

View File

@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fix creating `#[classattr]` by functions with the name of a known magic method. [#1969](https://github.com/PyO3/pyo3/pull/1969)
- Fix build failure on PyPy when abi3 features are activated. [#1991](https://github.com/PyO3/pyo3/pull/1991)
- Fix mingw platform detection. [#1993](https://github.com/PyO3/pyo3/pull/1993)
## [0.15.0] - 2021-11-03

View File

@ -135,10 +135,6 @@ impl InterpreterConfig {
println!("cargo:rustc-cfg=Py_3_{}", i);
}
if self.abi3 {
println!("cargo:rustc-cfg=Py_LIMITED_API");
}
if self.implementation.is_pypy() {
println!("cargo:rustc-cfg=PyPy");
if self.abi3 {
@ -147,7 +143,9 @@ impl InterpreterConfig {
See https://foss.heptapod.net/pypy/pypy/-/issues/3397 for more information."
);
}
};
} else if self.abi3 {
println!("cargo:rustc-cfg=Py_LIMITED_API");
}
for flag in &self.build_flags.0 {
println!("cargo:rustc-cfg=py_sys_config=\"{}\"", flag)