merge main

This commit is contained in:
Junzi Sun
2022-12-26 18:27:23 +01:00
parent 67ced74c0a
commit f9225bf375
55 changed files with 2439 additions and 442 deletions
+48 -7
View File
@@ -11,6 +11,8 @@ Steps for deploying a new version:
4. twine upload dist/*
"""
import sys
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
@@ -27,7 +29,7 @@ with open(path.join(here, "README.rst"), encoding="utf-8") as f:
details = dict(
name="pyModeS",
version="2.8",
version="2.11",
description="Python Mode-S and ADS-B Decoder",
long_description=long_description,
url="https://github.com/junzis/pyModeS",
@@ -43,18 +45,57 @@ details = dict(
],
keywords="Mode-S ADS-B EHS ELS Comm-B",
packages=find_packages(exclude=["contrib", "docs", "tests"]),
install_requires=["numpy", "pyzmq", "pyrtlsdr"],
package_data={"pyModeS": ["*.pyx", "*.pxd"]},
# typing_extensions are no longer necessary after Python 3.8 (TypedDict)
install_requires=["numpy", "pyzmq", "typing_extensions"],
extras_require={"fast": ["Cython"]},
package_data={
"pyModeS": ["*.pyx", "*.pxd", "py.typed"],
"pyModeS.decoder.flarm": ["*.pyx", "*.pxd", "*.pyi"],
},
scripts=["pyModeS/streamer/modeslive"],
)
try:
from setuptools.extension import Extension
from distutils.core import Extension
from Cython.Build import cythonize
extensions = [Extension("pyModeS.c_common", ["pyModeS/c_common.pyx"])]
compile_args = []
include_dirs = ["pyModeS/decoder/flarm"]
setup(**dict(details, ext_modules=cythonize(extensions)))
if sys.platform == "linux":
compile_args += [
"-march=native",
"-O3",
"-msse",
"-msse2",
"-mfma",
"-mfpmath=sse",
"-Wno-pointer-sign",
]
except:
extensions = [
Extension("pyModeS.c_common", ["pyModeS/c_common.pyx"]),
Extension(
"pyModeS.decoder.flarm.decode",
[
"pyModeS/decoder/flarm/decode.pyx",
"pyModeS/decoder/flarm/core.c",
],
extra_compile_args=compile_args,
include_dirs=include_dirs,
),
]
setup(
**dict(
details,
ext_modules=cythonize(
extensions,
include_path=include_dirs,
compiler_directives={"binding": True, "language_level": 3},
),
)
)
except ImportError:
setup(**details)