Skip to content

Commit

Permalink
setup: Remove override of bdist_wheel
Browse files Browse the repository at this point in the history
This is no longer necessary in recent versions of setuptools
(and we now check that abi3 is used properly in official releases).
The bdist_wheel implementation is being moved from the wheel package
into setuptools so overriding it will stop working in the future.

Follows the example of joerick/python-abi3-package-sample#30

Replaces #3425
  • Loading branch information
bdarnell committed Oct 24, 2024
1 parent fbbf126 commit b690f4c
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
import platform
import setuptools

try:
import wheel.bdist_wheel
except ImportError:
wheel = None


kwargs = {}

Expand Down Expand Up @@ -56,17 +51,7 @@
)
]

if wheel is not None:
# From https://github.com/joerick/python-abi3-package-sample/blob/main/setup.py
class bdist_wheel_abi3(wheel.bdist_wheel.bdist_wheel):
def get_tag(self):
python, abi, plat = super().get_tag()

if python.startswith("cp"):
return "cp39", "abi3", plat
return python, abi, plat

kwargs["cmdclass"] = {"bdist_wheel": bdist_wheel_abi3}
kwargs["options"] = {"bdist_wheel": {"py_limited_api": "cp39"}}


setuptools.setup(
Expand Down

0 comments on commit b690f4c

Please # to comment.