Debian Codegraph @

setup.py

raw symbols SCIP
1 #!/usr/bin/env python3
2
3 # Part of mlat-client - an ADS-B multilateration client.
4 # Copyright 2015, Oliver Jowett <[email protected]>
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 import sys
20
21 # setuptools with python 3.9 is buggy or something
22 # only use setuptools for 3.10 and up as distutils is deprecated 3.12 and up
23
24 if sys.version_info.minor >= 10:
25 from setuptools import setup, Extension
26 else:
27 from distutils.core import setup, Extension
28
29 import platform
30
31 # get the version from the source
32 CLIENT_VERSION = "unknown"
33 exec(open('mlat/client/version.py').read())
34
35 more_warnings = False
36 extra_compile_args = []
37 if platform.system() == 'Linux':
38 extra_compile_args.append('-O3')
39
40 if more_warnings:
41 # let's assume this is GCC
42 extra_compile_args.append('-Wpointer-arith')
43
44 modes_ext = Extension('_modes',
45 sources=['_modes.c', 'modes_reader.c', 'modes_message.c', 'modes_crc.c'],
46 extra_compile_args=extra_compile_args)
47
48 setup(name='MlatClient',
49 version=CLIENT_VERSION,
50 description='Multilateration client package',
51 author='adsb.fi',
52 author_email='adsb.fi',
53 packages=['mlat', 'mlat.client'],
54 ext_modules=[modes_ext],
55 scripts=['mlat-client'])