Skip to content

Commit 23d0340

Browse files
authored
Add Python 3.12 to write_def_file (#37)
* Add Python 3.12 to `write_def_file` * Fix typo
1 parent 06b1e58 commit 23d0340

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ impl ImportLibraryGenerator {
255255
Some((3, 9)) => ("python39.def", include_str!("python39.def")),
256256
Some((3, 10)) => ("python310.def", include_str!("python310.def")),
257257
Some((3, 11)) => ("python311.def", include_str!("python311.def")),
258+
Some((3, 12)) => ("python312.def", include_str!("python312.def")),
258259
_ => return Err(Error::new(ErrorKind::Other, "Unsupported Python version")),
259260
},
260261
PythonImplementation::PyPy => match self.version {
@@ -522,7 +523,7 @@ mod tests {
522523
.generate(&dir)
523524
.unwrap();
524525

525-
for minor in 7..=11 {
526+
for minor in 7..=12 {
526527
ImportLibraryGenerator::new("x86_64", "gnu")
527528
.version(Some((3, minor)))
528529
.generate(&dir)
@@ -561,7 +562,7 @@ mod tests {
561562
.generate(&dir)
562563
.unwrap();
563564

564-
for minor in 7..=11 {
565+
for minor in 7..=12 {
565566
ImportLibraryGenerator::new("x86_64", "msvc")
566567
.version(Some((3, minor)))
567568
.generate(&dir)

0 commit comments

Comments
 (0)