8000 Actually add Py_3_14 as a legitimate macro · PyO3/pyo3@5da57af · GitHub
[go: up one dir, main page]

Skip to content

Commit 5da57af

Browse files
committed
Actually add Py_3_14 as a legitimate macro
When `rustc` is invoked, the macro is included with the `--check-cfg` flag, but not with the `--cfg` flag. This caused errors about duplicate definitions to spew out when building with stable Rust toolchains.
1 parent abf9a6e commit 5da57af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyo3-build-config/src/impl_.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl InterpreterConfig {
179179

180180
let mut out = vec![];
181181

182-
for i in MINIMUM_SUPPORTED_VERSION.minor..=self.version.minor {
182+
for i in MINIMUM_SUPPORTED_VERSION.minor..=self.version.minor + 1 {
183183
out.push(format!("cargo:rustc-cfg=Py_3_{}", i));
184184
}
185185

@@ -3116,7 +3116,7 @@ mod tests {
31163116
implementation: PythonImplementation::CPython,
31173117
version: PythonVersion {
31183118
major: 3,
3119-
minor: 13,
3119+
minor: 14,
31203120
},
31213121
shared: true,
31223122
abi3: false,
@@ -3140,6 +3140,7 @@ mod tests {
31403140
"cargo:rustc-cfg=Py_3_11".to_owned(),
31413141
"cargo:rustc-cfg=Py_3_12".to_owned(),
31423142
"cargo:rustc-cfg=Py_3_13".to_owned(),
3143+
"cargo:rustc-cfg=Py_3_14".to_owned(),
31433144
"cargo:rustc-cfg=Py_GIL_DISABLED".to_owned(),
31443145
]
31453146
);

0 commit comments

Comments
 (0)
0