-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
74 lines (51 loc) · 1.63 KB
/
Copy pathsetup.py
File metadata and controls
74 lines (51 loc) · 1.63 KB
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
67
68
69
70
71
72
73
74
from setuptools import setup, find_namespace_packages
import json
pkg_name = 'SMART'
with open("README.rst", 'r') as fh:
long_desc = fh.read()
with open("unifhycontrib/{}/version.py".format(pkg_name.lower()), 'r') as fv:
exec(fv.read())
def requirements(filename):
requires = []
with open(filename, 'r') as fr:
for line in fr:
package = line.strip()
if package:
requires.append(package)
return requires
def read_authors(filename):
authors = []
with open(filename, 'r') as fz:
meta = json.load(fz)
for author in meta['creators']:
name = author['name'].strip()
authors.append(name)
return ', '.join(authors)
setup(
name='unifhycontrib-{}'.format(pkg_name.lower()),
version=__version__,
description='unifhy components for the {} model'.format(pkg_name),
long_description=long_desc,
long_description_content_type="text/x-rst",
author=read_authors('.zenodo.json'),
project_urls={
'Source Code':
'https://github.com/unifhy-org/unifhycontrib-{}'.format(pkg_name.lower())
},
license='GPL-3.0',
classifiers=[
'Development Status :: 4 - Beta',
'Natural Language :: English',
'Topic :: Scientific/Engineering :: Hydrology',
],
packages=find_namespace_packages(include=['unifhycontrib.*'],
exclude=['tests']),
namespace_packages=['unifhycontrib'],
install_requires=requirements('requirements.txt'),
extras_require={
'tests': [
'cf-python'
]
},
zip_safe=False
)