-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
44 lines (40 loc) · 1.17 KB
/
setup.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import sys
import platform as pf
from wheel.bdist_wheel import bdist_wheel
from setuptools import setup, find_packages
PACKAGE = 'flatn'
class CustomBdistWheel(bdist_wheel):
def finalize_options(self):
super().finalize_options()
self.root_is_pure = False
def get_tag(self):
python, abi, plat = super().get_tag()
if sys.platform == 'darwin':
plat = f'macosx_11_0_{pf.machine()}'
elif sys.platform.startswith('linux'):
plat = f'manylinux1_{pf.machine()}'
return python, abi, plat
setup(
name=PACKAGE,
description='Flatter Library Distribution Package',
author='Mathias Hall-Andersen',
author_email='mathias@hall-andersen.dk',
packages=find_packages(),
package_data={
PACKAGE: [
'flatter',
'libflatter.*',
]
},
exclude_package_data={
'': ['*.tar.gz', '*.tar.xz', '*.zip'],
},
cmdclass={
'bdist_wheel': CustomBdistWheel,
},
python_requires='>=3.4',
# Indicate this is not a pure Python package by setting ext_modules
ext_modules=[],
has_ext_modules=lambda: True,
platforms=['linux', 'darwin'],
)