Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pypy: fix wheel artifacts #482

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* auditwheel choose higher priority tag when possible in [#456](https://github.com/PyO3/maturin/pull/456), dropped `auditwheel` Cargo feature.
* develop now writes an [INSTALLER](https://packaging.python.org/specifications/recording-installed-packages/#the-installer-file) file
* develop removes an old .dist-info directory if it exists before installing the new one
* Fix wheels for PyPy on windows containing extension modules with incorrect names. [#482](https://github.com/PyO3/maturin/pull/482)


## 0.9.4 - 2021-02-18

* Fix building a bin with musl
* Fix building a bin with musl

## 0.9.3

Expand All @@ -34,24 +35,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Escape version in wheel metadata by messense in [#420](https://github.com/PyO3/maturin/pull/420)
* Set executable bit on shared library by messense in [#421](https://github.com/PyO3/maturin/pull/421)
* Rename `classifier` to `classifiers` for pypi compatibility. The old `classifier` is still available and now also works with pypi
* Fix building for musl by automatically setting `-C target-feature=-crt-static`
* Rename `classifier` to `classifiers` for pypi compatibility. The old `classifier` is still available and now also works with pypi
* Fix building for musl by automatically setting `-C target-feature=-crt-static`

## 0.9.1 - 2021-01-13

* Error when the `abi3` feature is selected but no minimum version
* Support building universal2 wheels (x86 and aarch64 in a single file) by messense in [#403](https://github.com/PyO3/maturin/pull/403)
* Recognize `PYO3_CROSS_LIB_DIR` for cross compiling with abi3 targeting windows.
* Recognize `PYO3_CROSS_LIB_DIR` for cross compiling with abi3 targeting windows.
* `package.metadata.maturin.classifier` is renamed to `classifiers` by kngwyu in [#416](https://github.com/PyO3/maturin/pull/416)
* Added more instructions to building complex manylinux setups

## 0.9.0 - 2021-01-10

* Added support for building abi3 wheels with pyo3 0.13.1
* Python 3.9 is supported (it should have worked before, but it is now tested on ci)
* There are 64-bit and aarch64 binary builds for linux and 64-bit builds for windows, mac and freebsd-12-1
* There are 64-bit and aarch64 binary builds for linux and 64-bit builds for windows, mac and freebsd-12-1
* The auditwheel options have changed to `--manylinux=[off|2010|2014]` with manylinux2010 as default, and optionally `--skip-auditwheel`.
* Removed Python 3.5 since it is unsupported
* Removed Python 3.5 since it is unsupported
* The default and minimum manylinux version is now manylinux2010
* restructured text (rst) readmes are now supported, by clbarnes in [#360](https://github.com/PyO3/maturin/pull/360)
* Allow python 3 interpreter with debuginfo use maturin by inevity in [#370](https://github.com/PyO3/maturin/pull/370)
Expand Down
16 changes: 15 additions & 1 deletion src/get_interpreter_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
import sys
import sysconfig

if platform.python_implementation() == "PyPy":
# Workaround for PyPy 3.6 on windows:
# - sysconfig.get_config_var("EXT_SUFFIX") differs to importlib until
# Python 3.8
# - PyPy does not load the plain ".pyd" suffix because it expects that's
# for a CPython extension module
#
# This workaround can probably be removed once PyPy for Python 3.8 is the
# main PyPy version.
import importlib.machinery
ext_suffix = importlib.machinery.EXTENSION_SUFFIXES[0]
else:
ext_suffix = sysconfig.get_config_var("EXT_SUFFIX")

metadata = {
"major": sys.version_info.major,
"minor": sys.version_info.minor,
"abiflags": sysconfig.get_config_var("ABIFLAGS"),
"interpreter": platform.python_implementation().lower(),
"ext_suffix": sysconfig.get_config_var("EXT_SUFFIX"),
"ext_suffix": ext_suffix,
"abi_tag": (sysconfig.get_config_var("SOABI") or "-").split("-")[1] or None,
# This one isn't technically necessary, but still very useful for sanity checks
"platform": platform.system().lower(),
Expand Down
5 changes: 1 addition & 4 deletions src/python_interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,7 @@ impl PythonInterpreter {
/// Mac: foobar.cpython-36m-darwin.so
/// FreeBSD: foobar.cpython-36m.so
///
/// For pypy3, we read sysconfig.get_config_var("EXT_SUFFIX").
///
/// The pypy3 value appears to be wrong for Windows: instead of
/// e.g., ".pypy3-70-x86_64-linux-gnu.so", it is just ".pyd".
/// For pypy3, we read importlib.machinery.EXTENSION_SUFFIXES[0].
pub fn get_library_name(&self, base: &str) -> String {
match self.interpreter_kind {
InterpreterKind::CPython => {
Expand Down