Skip to content

Commit

Permalink
Fixed building binary wheels against the limited ABI
Browse files Browse the repository at this point in the history
Fixes #305.
  • Loading branch information
agronholm committed Aug 18, 2019
1 parent 8293917 commit d799ca3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Release Notes
=============

**UNRELEASED**

- Fixed regression from 0.33.5 that broke building binary wheels against the
limited ABI

**0.33.5 (2019-08-17)**

- Don't add the ``m`` ABI flag to wheel names on Python 3.8 (PR by rdb)
Expand Down
12 changes: 12 additions & 0 deletions tests/test_bdist_wheel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: utf-8
import os
import subprocess
import sys
from zipfile import ZipFile
Expand Down Expand Up @@ -98,3 +99,14 @@ def test_build_number(dummy_dist, monkeypatch, tmpdir):
filenames = set(wf.namelist())
assert 'dummy_dist-1.0.dist-info/RECORD' in filenames
assert 'dummy_dist-1.0.dist-info/METADATA' in filenames


def test_limited_abi(monkeypatch, tmpdir):
"""Test that building a binary wheel with the limited ABI works."""
this_dir = os.path.dirname(__file__)
source_dir = os.path.join(this_dir, 'testdata', 'extension.dist')
build_dir = tmpdir.join('build')
dist_dir = tmpdir.join('dist')
monkeypatch.chdir(source_dir)
subprocess.check_call([sys.executable, 'setup.py', 'bdist_wheel', '-b', str(build_dir),
'-d', str(dist_dir)])
2 changes: 1 addition & 1 deletion wheel/pep425tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def get_supported(versions=None, supplied_platform=None):
abi3s = set()
for suffix in get_all_suffixes():
if suffix.startswith('.abi'):
abi3s.add(suffix[0].split('.', 2)[1])
abi3s.add(suffix.split('.', 2)[1])

abis.extend(sorted(list(abi3s)))

Expand Down

0 comments on commit d799ca3

Please sign in to comment.