Skip to content

Commit

Permalink
pypy: include minor version in library on Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Feb 24, 2022
1 parent 8d93cff commit 9f213fd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pyo3-build-config/src/impl_.rs
Expand Up @@ -1131,7 +1131,16 @@ fn default_lib_name_unix(
Some(ld_version) => format!("python{}", ld_version),
None => format!("python{}.{}", version.major, version.minor),
},
PythonImplementation::PyPy => format!("pypy{}-c", version.major),
PythonImplementation::PyPy => {
if version >= (PythonVersion { major: 3, minor: 9 }) {
match ld_version {
Some(ld_version) => format!("pypy{}-c", ld_version),
None => format!("pypy{}.{}-c", version.major, version.minor),
}
} else {
format!("pypy{}-c", version.major)
}
},
}
}

Expand Down

0 comments on commit 9f213fd

Please sign in to comment.