Skip to content

Commit 38529a0

Browse files
committed
Fix abi3 wheel names
1 parent e96ef36 commit 38529a0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

setup.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
#!/usr/bin/env python
2+
from typing import Tuple
23

34
from setuptools import Extension, setup
5+
from wheel.bdist_wheel import bdist_wheel
6+
7+
8+
class bdist_wheel_abi3(bdist_wheel):
9+
def get_tag(self) -> Tuple[str, str, str]:
10+
# From https://github.com/joerick/python-abi3-package-sample/blob/main/setup.py
11+
python, abi, plat = super().get_tag()
12+
13+
if python.startswith("cp"):
14+
# on CPython, our wheels are abi3 and compatible back to 3.8
15+
return "cp38", "abi3", plat
16+
17+
return python, abi, plat
18+
419

520
setup(
21+
cmdclass={"bdist_wheel": bdist_wheel_abi3},
622
ext_modules=[
723
Extension(
824
"getdents._getdents",

0 commit comments

Comments
 (0)