-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
73 lines (49 loc) · 1.91 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
67
68
69
70
71
72
from setuptools import setup, find_namespace_packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# information to be updated by contributors
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# model_name: name of the overarching model for the component(s)
model_name = 'template'
# authors: list of the contributors' names
# (firstname followed by lastname, comma-separated list)
authors = 'Jane Doe, John Doe'
# licence: open source licence under which package is distributed
# (see https://choosealicense.com/)
licence = 'GPL-3'
# source_url: remote location of the git repository hosting the source code
source_url = 'https://github.com/unifhy-org/unifhycontrib-template'
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
with open("README.rst", 'r') as fh:
long_desc = fh.read()
with open("unifhycontrib/{}/version.py".format(model_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
setup(
name='unifhycontrib-{}'.format(model_name.lower()),
version=__version__,
description='unifhy component(s) for the {} model'.format(model_name),
long_description=long_desc,
long_description_content_type="text/x-rst",
author=authors,
project_urls={
'Source Code': source_url
},
license=licence,
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'),
zip_safe=False
)