Skip to content

Commit 7d39fb0

Browse files
committed
Avoid subclassing the bdist_wheel command
This is no longer necessary in recent versions of setuptools.
1 parent 3e0b553 commit 7d39fb0

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
requires = [
33
# First version of setuptools to support pyproject.toml configuration
44
"setuptools>=61.0.0",
5-
"wheel",
65
# Must be kept in sync with `project.dependencies`
76
"cffi>=1.0.0",
87
"pkgconfig>=1.5",

setup.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from os import path
44
from setuptools import setup
5-
from wheel.bdist_wheel import bdist_wheel
65

76
base_dir = path.dirname(__file__)
87
src_dir = path.join(base_dir, 'pyvips', 'pyvips')
@@ -12,23 +11,12 @@
1211
sys.path.insert(0, src_dir)
1312

1413

15-
class bdist_wheel_abi3(bdist_wheel):
16-
def get_tag(self):
17-
python, abi, plat = super().get_tag()
18-
19-
if python.startswith('cp'):
20-
# on CPython, our wheels are abi3 and compatible back to 3.7
21-
return 'cp37', 'abi3', plat
22-
23-
return python, abi, plat
24-
25-
2614
if 'bdist_wheel' in sys.argv:
2715
cffi_modules = ['pyvips/pyvips/pyvips_build.py:ffibuilder']
2816
else:
2917
cffi_modules = []
3018

3119
setup(
3220
cffi_modules=cffi_modules,
33-
cmdclass={'bdist_wheel': bdist_wheel_abi3},
21+
options={'bdist_wheel': {'py_limited_api': f'cp{sys.version_info.major}{sys.version_info.minor}'}},
3422
)

0 commit comments

Comments
 (0)