Skip to content

Commit

Permalink
Add workaround for pypa/setuptools#4647
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas A Caswell
<199813+tacaswell@users.noreply.github.com>
  • Loading branch information
hynek committed Oct 12, 2024
1 parent dff48c0 commit f1c4650
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@

if platform.python_implementation() == "CPython":
try:
import wheel.bdist_wheel
try:
from setuptools.command.bdist_wheel import bdist_wheel
except ImportError:
from wheel.bdist_wheel import bdist_wheel

class BDistWheel(wheel.bdist_wheel.bdist_wheel):
class BDistWheel(bdist_wheel):
def finalize_options(self):
self.py_limited_api = f"cp3{sys.version_info[1]}"
wheel.bdist_wheel.bdist_wheel.finalize_options(self)

super().finalize_options()

cmdclass["bdist_wheel"] = BDistWheel
except ImportError:
Expand Down

0 comments on commit f1c4650

Please # to comment.