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

Fix ABI tag for CPython 3.13 on Windows #578

Merged
merged 7 commits into from
Oct 26, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release Notes
=============

**UNRELEASED**

- Fixed ABI tag generation for CPython 3.13a1 on Windows (PR by Sam Gross)

**0.41.2 (2023-08-22)**

- Fixed platform tag detection for GraalPy and 32-bit python running on an aarch64
Expand Down
6 changes: 5 additions & 1 deletion src/wheel/bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ def get_abi_tag():
m = "m"

abi = f"{impl}{tags.interpreter_version()}{d}{m}{u}"
elif soabi and impl == "cp":
elif soabi and impl == "cp" and soabi.startswith("cpython"):
# non-Windows
abi = "cp" + soabi.split("-")[1]
elif soabi and impl == "cp" and soabi.startswith("cp"):
# Windows
abi = soabi.split("-")[0]
elif soabi and impl == "pp":
# we want something like pypy36-pp73
abi = "-".join(soabi.split("-")[:2])
Expand Down
6 changes: 6 additions & 0 deletions tests/test_bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ def test_unix_epoch_timestamps(dummy_dist, monkeypatch, tmp_path):
)


def test_get_abi_tag_windows(monkeypatch):
monkeypatch.setattr(tags, "interpreter_name", lambda: "cp")
monkeypatch.setattr(sysconfig, "get_config_var", lambda x: "cp313-win_amd64")
assert get_abi_tag() == "cp313"


def test_get_abi_tag_pypy_old(monkeypatch):
monkeypatch.setattr(tags, "interpreter_name", lambda: "pp")
monkeypatch.setattr(sysconfig, "get_config_var", lambda x: "pypy36-pp73")
Expand Down