forked from nasa/harmony-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (57 loc) · 2.19 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# For a fully annotated version of this file and what it does, see
# https://github.com/pypa/sampleproject/blob/master/setup.py
# To upload this file to PyPI you must build it then upload it:
# python setup.py sdist bdist_wheel # build in 'dist' folder
# python-m twine upload dist/* # 'twine' must be installed: 'pip install twine'
import ast
import os
import pathlib
import re
from setuptools import find_packages, setup
DEPENDENCIES = []
with open('requirements/core.txt', 'r') as f:
DEPENDENCIES = f.read().strip().split('\n')
DEV_DEPENDENCIES = []
with open('requirements/dev.txt', 'r') as f:
DEV_DEPENDENCIES = f.read().strip().split('\n')
with open('README.md', 'r') as f:
README = f.read()
CURDIR = os.path.abspath(os.path.dirname(__file__))
def get_version():
main_file = os.path.join(CURDIR, "harmony", "__init__.py")
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
with open(main_file, "r", encoding="utf8") as f:
match = _version_re.search(f.read())
version = match.group("version") if match is not None else '"unknown"'
return str(ast.literal_eval(version))
setup(
name='harmony-py',
version=get_version(),
description='The NASA Harmony Python library',
long_description=README,
long_description_content_type='text/markdown',
url='https://github.com/nasa/harmony-py',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3 :: Only',
],
keywords='nasa, harmony, remote-sensing, science, geoscience',
packages=find_packages(exclude=['tests']),
python_requires='>=3.6, <4',
install_requires=DEPENDENCIES,
extras_require={
'dev': DEV_DEPENDENCIES,
},
include_package_data=True,
test_suite="tests",
)