-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
52 lines (43 loc) · 1.47 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import os
import re
from setuptools import setup, find_packages
regexp = re.compile(r".*__version__ = [\'\"](.*?)[\'\"]", re.S)
base_package = "adsb"
base_path = os.path.dirname(__file__)
init_file = os.path.join(base_path, "src", "adsb", "__init__.py")
with open(init_file, "r") as f:
module_content = f.read()
match = regexp.match(module_content)
if match:
version = match.group(1)
else:
raise RuntimeError("Cannot find __version__ in {}".format(init_file))
with open("README.rst", "r") as f:
readme = f.read()
with open("CHANGELOG.rst", "r") as f:
changes = f.read()
with open("requirements.txt", "r") as f:
requirements = [line for line in f.read().split("\n") if len(line.strip())]
if __name__ == "__main__":
setup(
name="adsb",
description="ADS-B tools for Python",
long_description="\n\n".join([readme, changes]),
license="MIT license",
url="https://github.com/claws/adsb",
version=version,
author="Chris Laws",
author_email="[email protected]",
maintainer="Chris Laws",
maintainer_email="[email protected]",
install_requires=requirements,
keywords=["adsb"],
package_dir={"": "src"},
packages=find_packages("src"),
zip_safe=False,
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.6",
],
)