diff --git a/setup.py b/setup.py index cf101f4..1baaca1 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,17 @@ # -*- coding: utf-8 -*- from setuptools import setup, find_packages, Extension +from wheel.bdist_wheel import bdist_wheel + +class bdist_wheel_abi3(bdist_wheel): + def get_tag(self): + python, abi, plat = super().get_tag() + + if python.startswith("cp"): + # on CPython, our wheels are abi3 and compatible back to 3.6 + return "cp36", "abi3", plat + + return python, abi, plat ext = Extension( name = 'ruapu', @@ -14,6 +25,7 @@ packages = find_packages(where="."), package_dir = {"": "."}, ext_modules = [ext], + cmdclass = {"bdist_wheel": bdist_wheel_abi3}, ) setup(**setup_args)