mirror of
https://github.com/mtshiba/pylyzer.git
synced 2025-07-07 17:45:00 +00:00
feat: Version-independent wheel files
This commit is contained in:
parent
4c471b8261
commit
513f112d6a
1 changed files with 12 additions and 0 deletions
12
setup.py
12
setup.py
|
@ -10,12 +10,23 @@ from setuptools import setup, Command
|
||||||
from setuptools_rust import RustBin
|
from setuptools_rust import RustBin
|
||||||
import tomli
|
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):
|
def removeprefix(string, prefix):
|
||||||
if string.startswith(prefix):
|
if string.startswith(prefix):
|
||||||
return string[len(prefix):]
|
return string[len(prefix):]
|
||||||
else:
|
else:
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
class BdistWheel(bdist_wheel):
|
||||||
|
def get_tag(self):
|
||||||
|
_, _, plat = super().get_tag()
|
||||||
|
return "py3", "none", plat
|
||||||
|
|
||||||
class Clean(Command):
|
class Clean(Command):
|
||||||
user_options = []
|
user_options = []
|
||||||
def initialize_options(self):
|
def initialize_options(self):
|
||||||
|
@ -68,6 +79,7 @@ setup(
|
||||||
],
|
],
|
||||||
cmdclass={
|
cmdclass={
|
||||||
"clean": Clean,
|
"clean": Clean,
|
||||||
|
"bdist_wheel": BdistWheel,
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 2 - Pre-Alpha",
|
"Development Status :: 2 - Pre-Alpha",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue