Skip to content

Commit 228306d

Browse files
committed
version 2.8
1 parent 1c6b393 commit 228306d

File tree

1 file changed

+15
-64
lines changed

1 file changed

+15
-64
lines changed

setup.py

Lines changed: 15 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,12 @@
88
1. Increase the version number
99
2. remove the old deployment under [dist] and [build] folder
1010
3. run: python setup.py sdist
11-
run: python setup.py bdist_wheel --universal
1211
4. twine upload dist/*
1312
"""
1413

1514
# Always prefer setuptools over distutils
1615
from setuptools import setup, find_packages
1716

18-
# Compile some parts
19-
from setuptools.extension import Extension
20-
from Cython.Build import cythonize
21-
22-
extensions = [Extension("pyModeS.c_common", ["pyModeS/c_common.pyx"])]
23-
24-
2517
# To use a consistent encoding
2618
from codecs import open
2719
from os import path
@@ -32,78 +24,37 @@
3224
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
3325
long_description = f.read()
3426

35-
setup(
27+
28+
details = dict(
3629
name="pyModeS",
37-
# Versions should comply with PEP440. For a discussion on single-sourcing
38-
# the version across setup.py and the project code, see
39-
# https://packaging.python.org/en/latest/single_source_version.html
40-
version="2.5",
30+
version="2.8",
4131
description="Python Mode-S and ADS-B Decoder",
4232
long_description=long_description,
43-
# The project's main homepage.
4433
url="https://github.com/junzis/pyModeS",
45-
# Author details
4634
author="Junzi Sun",
4735
author_email="j.sun-1@tudelft.nl",
48-
# Choose your license
4936
license="GNU GPL v3",
50-
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
5137
classifiers=[
52-
# How mature is this project? Common values are
53-
# 3 - Alpha
54-
# 4 - Beta
55-
# 5 - Production/Stable
5638
"Development Status :: 4 - Beta",
57-
# Indicate who your project is intended for
5839
"Intended Audience :: Developers",
5940
"Topic :: Software Development :: Libraries",
60-
# Pick your license as you wish (should match "license" above)
6141
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
62-
# Specify the Python versions you support here. In particular, ensure
63-
# that you indicate whether you support Python 2, Python 3 or both.
64-
# "Programming Language :: Python :: 2",
6542
"Programming Language :: Python :: 3",
6643
],
67-
ext_modules=cythonize(extensions),
68-
# What does your project relate to?
6944
keywords="Mode-S ADS-B EHS ELS Comm-B",
70-
# You can just specify the packages manually here if your project is
71-
# simple. Or you can use find_packages().
7245
packages=find_packages(exclude=["contrib", "docs", "tests"]),
73-
# Alternatively, if you want to distribute just a my_module.py, uncomment
74-
# this:
75-
# py_modules=["my_module"],
76-
# List run-time dependencies here. These will be installed by pip when
77-
# your project is installed. For an analysis of "install_requires" vs pip's
78-
# requirements files see:
79-
# https://packaging.python.org/en/latest/requirements.html
8046
install_requires=["numpy", "pyzmq", "pyrtlsdr"],
81-
# List additional groups of dependencies here (e.g. development
82-
# dependencies). You can install these using the following syntax,
83-
# for example:
84-
# $ pip install -e .[dev,test]
85-
# extras_require={
86-
# 'dev': ['check-manifest'],
87-
# 'test': ['coverage'],
88-
# },
89-
# If there are data files included in your packages that need to be
90-
# installed, specify them here. If using Python 2.6 or less, then these
91-
# have to be included in MANIFEST.in as well.
92-
# package_data={
93-
# 'sample': ['package_data.dat'],
94-
# },
95-
# Although 'package_data' is the preferred approach, in some case you may
96-
# need to place data files outside of your packages. See:
97-
# http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
98-
# In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
99-
# data_files=[('my_data', ['data/data_file'])],
100-
# To provide executable scripts, use entry points in preference to the
101-
# "scripts" keyword. Entry points provide cross-platform support and allow
102-
# pip to create the appropriate form of executable for the target platform.
103-
# entry_points={
104-
# 'console_scripts': [
105-
# 'sample=sample:main',
106-
# ],
107-
# },
47+
package_data={"pyModeS": ["*.pyx", "*.pxd"]},
10848
scripts=["pyModeS/streamer/modeslive"],
10949
)
50+
51+
try:
52+
from setuptools.extension import Extension
53+
from Cython.Build import cythonize
54+
55+
extensions = [Extension("pyModeS.c_common", ["pyModeS/c_common.pyx"])]
56+
57+
setup(**dict(details, ext_modules=cythonize(extensions)))
58+
59+
except:
60+
setup(**details)

0 commit comments

Comments
 (0)