Skip to content

Commit

Permalink
Merge pull request #98 from Bing-su/fix/setup.py
Browse files Browse the repository at this point in the history
feat: Version-independent wheel files
  • Loading branch information
mtshiba authored Aug 14, 2024
2 parents 4c471b8 + 513f112 commit 11527b3
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 @@ -10,12 +10,23 @@
from setuptools_rust import RustBin
import tomli

try:
# setuptools >= 70.1.0
from setuptools.command.bdist_wheel import bdist_wheel
except ImportError:
from wheel.bdist_wheel import bdist_wheel

def removeprefix(string, prefix):
if string.startswith(prefix):
return string[len(prefix):]
else:
return string

class BdistWheel(bdist_wheel):
def get_tag(self):
_, _, plat = super().get_tag()
return "py3", "none", plat

class Clean(Command):
user_options = []
def initialize_options(self):
Expand Down Expand Up @@ -68,6 +79,7 @@ def run(self):
],
cmdclass={
"clean": Clean,
"bdist_wheel": BdistWheel,
},
classifiers=[
"Development Status :: 2 - Pre-Alpha",
Expand Down

0 comments on commit 11527b3

Please sign in to comment.