Skip to content

Commit

Permalink
build abi3
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Feb 27, 2024
1 parent 170a9de commit b121bfd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -14,6 +25,7 @@
packages = find_packages(where="."),
package_dir = {"": "."},
ext_modules = [ext],
cmdclass = {"bdist_wheel": bdist_wheel_abi3},
)

setup(**setup_args)

0 comments on commit b121bfd

Please sign in to comment.