]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
setup: Remove override of bdist_wheel 3433/head
authorBen Darnell <ben@bendarnell.com>
Thu, 24 Oct 2024 13:33:13 +0000 (09:33 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 24 Oct 2024 13:33:13 +0000 (09:33 -0400)
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 https://github.com/joerick/python-abi3-package-sample/pull/30

Replaces #3425

setup.py

index 14ddc3f25fe09f3c3176f40b640ee02ab622d80a..0b175af856b482f1d810b51328c2802b06cd0de3 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -19,11 +19,6 @@ import os
 import platform
 import setuptools
 
-try:
-    import wheel.bdist_wheel
-except ImportError:
-    wheel = None
-
 
 kwargs = {}
 
@@ -56,17 +51,7 @@ if (
         )
     ]
 
-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(