forked from tazle/bufrpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
35 lines (31 loc) · 1.14 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
from setuptools import setup
import ast
path = 'bufrpy/__init__.py'
with open(path, 'rU') as file:
t = compile(file.read(), path, 'exec', ast.PyCF_ONLY_AST)
for node in t.body:
if isinstance(node, ast.Assign) and len(node.targets) == 1:
name = node.targets[0]
if isinstance(name, ast.Name) and name.id == '__version__':
version = node.value.s
break
else:
raise ValueError("Could not determine software version")
setup(name="bufrpy",
packages=["bufrpy"],
version=version,
description="Pyre-Python BUFR decoder",
url="https://github.com/tazle/bufrpy",
author="Tuure Laurinolli / FMI",
author_email="[email protected]",
zip_safe=False,
keywords=["bufr"],
install_requires=["bitstring>=3.1.2"],
test_suite="tests",
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Topic :: Scientific/Engineering"
])