forked from keirf/greaseweazle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
38 lines (35 loc) · 1.16 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
from setuptools import setup, find_packages, Extension
from setuptools_scm import get_version
import platform
if platform.system() == 'Linux':
extra_compile_args = ['-Wall', '-Werror']
else:
extra_compile_args = []
def version():
version = get_version()
with open('src/greaseweazle/__init__.py', 'w') as f:
f.write('__version__ = \'%s\'\n' % version)
return version
setup(name = 'greaseweazle',
python_requires = '>=3.7',
version = version(),
install_requires = [
'crcmod',
'bitarray',
'pyserial',
'requests'
],
packages = find_packages('src'),
package_dir = { '': 'src' },
package_data = { 'greaseweazle.data': ['*.cfg'] },
ext_modules = [
Extension('greaseweazle.optimised.optimised',
sources = ['src/greaseweazle/optimised/optimised.c',
'src/greaseweazle/optimised/c64.c',
'src/greaseweazle/optimised/mac.c'],
extra_compile_args = extra_compile_args)
],
entry_points= {
'console_scripts': ['gw=greaseweazle.cli:main']
}
)