forked from GaukeT/pre-commit-mirrors-trivy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
26 lines (21 loc) · 862 Bytes
/
setup.py
File metadata and controls
26 lines (21 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from __future__ import annotations
from setuptools import setup
try:
from setuptools.command.bdist_wheel import bdist_wheel as orig_bdist_wheel
except ImportError:
cmdclass = {}
else:
class bdist_wheel(orig_bdist_wheel):
def finalize_options(self):
orig_bdist_wheel.finalize_options(self)
# Mark us as not a pure python package
self.root_is_pure = False
def get_tag(self):
_, _, plat = orig_bdist_wheel.get_tag(self)
# Convert linux tags to manylinux tags for PyPI compatibility
if plat.startswith('linux'):
plat = plat.replace('linux', 'manylinux2014')
# We don't contain any python source, nor any python extensions
return 'py2.py3', 'none', plat
cmdclass = {'bdist_wheel': bdist_wheel}
setup(cmdclass=cmdclass)