2016-03-17 06:11:15 +08:00
|
|
|
"""A setuptools based setup module.
|
|
|
|
|
|
|
|
See:
|
|
|
|
https://packaging.python.org/en/latest/distributing.html
|
|
|
|
https://github.com/pypa/sampleproject
|
2017-03-22 01:14:30 +08:00
|
|
|
|
2019-10-31 20:36:26 +08:00
|
|
|
Steps for deploying a new version:
|
2017-03-22 01:14:30 +08:00
|
|
|
1. Increase the version number
|
2019-09-25 03:26:35 +08:00
|
|
|
2. remove the old deployment under [dist] and [build] folder
|
2017-03-22 01:14:30 +08:00
|
|
|
3. run: python setup.py sdist
|
|
|
|
4. twine upload dist/*
|
2016-03-17 06:11:15 +08:00
|
|
|
"""
|
|
|
|
|
|
|
|
# Always prefer setuptools over distutils
|
|
|
|
from setuptools import setup, find_packages
|
2019-08-05 22:37:30 +08:00
|
|
|
|
2016-03-17 06:11:15 +08:00
|
|
|
# To use a consistent encoding
|
|
|
|
from codecs import open
|
|
|
|
from os import path
|
|
|
|
|
|
|
|
here = path.abspath(path.dirname(__file__))
|
|
|
|
|
|
|
|
# Get the long description from the README file
|
2019-08-05 22:37:30 +08:00
|
|
|
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
|
2016-03-17 06:11:15 +08:00
|
|
|
long_description = f.read()
|
|
|
|
|
2020-05-05 03:35:29 +08:00
|
|
|
|
|
|
|
details = dict(
|
2019-08-05 22:37:30 +08:00
|
|
|
name="pyModeS",
|
2022-04-18 23:59:30 +08:00
|
|
|
version="2.10.1",
|
2019-08-05 22:37:30 +08:00
|
|
|
description="Python Mode-S and ADS-B Decoder",
|
2016-03-17 06:11:15 +08:00
|
|
|
long_description=long_description,
|
2019-08-05 22:37:30 +08:00
|
|
|
url="https://github.com/junzis/pyModeS",
|
|
|
|
author="Junzi Sun",
|
|
|
|
author_email="j.sun-1@tudelft.nl",
|
|
|
|
license="GNU GPL v3",
|
2016-03-17 06:11:15 +08:00
|
|
|
classifiers=[
|
2019-08-05 22:37:30 +08:00
|
|
|
"Development Status :: 4 - Beta",
|
|
|
|
"Intended Audience :: Developers",
|
2019-10-01 05:50:07 +08:00
|
|
|
"Topic :: Software Development :: Libraries",
|
2019-08-05 22:37:30 +08:00
|
|
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
|
|
"Programming Language :: Python :: 3",
|
2016-03-17 06:11:15 +08:00
|
|
|
],
|
2019-10-01 05:50:07 +08:00
|
|
|
keywords="Mode-S ADS-B EHS ELS Comm-B",
|
2019-08-05 22:37:30 +08:00
|
|
|
packages=find_packages(exclude=["contrib", "docs", "tests"]),
|
2020-08-17 07:19:16 +08:00
|
|
|
install_requires=["numpy", "pyzmq"],
|
2020-12-01 21:09:39 +08:00
|
|
|
extras_require={"fast": ["Cython"]},
|
2021-01-11 21:45:32 +08:00
|
|
|
package_data={"pyModeS": ["*.pyx", "*.pxd", "py.typed"]},
|
2019-08-05 22:37:30 +08:00
|
|
|
scripts=["pyModeS/streamer/modeslive"],
|
2016-03-17 06:11:15 +08:00
|
|
|
)
|
2020-05-05 03:35:29 +08:00
|
|
|
|
|
|
|
try:
|
|
|
|
from setuptools.extension import Extension
|
|
|
|
from Cython.Build import cythonize
|
|
|
|
|
|
|
|
extensions = [Extension("pyModeS.c_common", ["pyModeS/c_common.pyx"])]
|
|
|
|
|
|
|
|
setup(**dict(details, ext_modules=cythonize(extensions)))
|
|
|
|
|
2022-04-19 00:47:12 +08:00
|
|
|
except ImportError:
|
2020-05-05 03:35:29 +08:00
|
|
|
setup(**details)
|