|
8 | 8 | 1. Increase the version number
|
9 | 9 | 2. remove the old deployment under [dist] and [build] folder
|
10 | 10 | 3. run: python setup.py sdist
|
11 |
| - run: python setup.py bdist_wheel --universal |
12 | 11 | 4. twine upload dist/*
|
13 | 12 | """
|
14 | 13 |
|
15 | 14 | # Always prefer setuptools over distutils
|
16 | 15 | from setuptools import setup, find_packages
|
17 | 16 |
|
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 |
| - |
25 | 17 | # To use a consistent encoding
|
26 | 18 | from codecs import open
|
27 | 19 | from os import path
|
|
32 | 24 | with open(path.join(here, "README.rst"), encoding="utf-8") as f:
|
33 | 25 | long_description = f.read()
|
34 | 26 |
|
35 |
| -setup( |
| 27 | + |
| 28 | +details = dict( |
36 | 29 | 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", |
41 | 31 | description="Python Mode-S and ADS-B Decoder",
|
42 | 32 | long_description=long_description,
|
43 |
| - # The project's main homepage. |
44 | 33 | url="https://github.com/junzis/pyModeS",
|
45 |
| - # Author details |
46 | 34 | author="Junzi Sun",
|
47 | 35 | author_email="j.sun-1@tudelft.nl",
|
48 |
| - # Choose your license |
49 | 36 | license="GNU GPL v3",
|
50 |
| - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers |
51 | 37 | classifiers=[
|
52 |
| - # How mature is this project? Common values are |
53 |
| - # 3 - Alpha |
54 |
| - # 4 - Beta |
55 |
| - # 5 - Production/Stable |
56 | 38 | "Development Status :: 4 - Beta",
|
57 |
| - # Indicate who your project is intended for |
58 | 39 | "Intended Audience :: Developers",
|
59 | 40 | "Topic :: Software Development :: Libraries",
|
60 |
| - # Pick your license as you wish (should match "license" above) |
61 | 41 | "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", |
65 | 42 | "Programming Language :: Python :: 3",
|
66 | 43 | ],
|
67 |
| - ext_modules=cythonize(extensions), |
68 |
| - # What does your project relate to? |
69 | 44 | 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(). |
72 | 45 | 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 |
80 | 46 | 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"]}, |
108 | 48 | scripts=["pyModeS/streamer/modeslive"],
|
109 | 49 | )
|
| 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