-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
49 lines (45 loc) · 1.4 KB
/
setup.py
File metadata and controls
49 lines (45 loc) · 1.4 KB
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
45
46
47
48
49
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):
# Use py3-none tag since we just ship a binary executable
# and don't have any Python version or ABI specific code
if sys.platform == 'darwin':
plat = f'macosx_11_0_{pf.machine()}'
elif sys.platform.startswith('linux'):
plat = f'manylinux1_{pf.machine()}'
else:
_, _, plat = super().get_tag()
return 'py3', 'none', plat
setup(
name=PACKAGE,
description='Flatter Library Distribution Package',
author='Mathias Hall-Andersen',
author_email='mathias@hall-andersen.dk',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
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'],
)