|
1 |
| -# -*- coding: utf-8 -*- |
2 |
| -# Copyright (C) 2018 Thibault Hallouin |
| 1 | +# Copyright (C) 2018-2022 Thibault Hallouin |
3 | 2 | from setuptools import setup
|
4 | 3 |
|
5 | 4 |
|
6 |
| -with open("README.md", "r") as fh: |
| 5 | +with open("README.rst", "r") as fh: |
7 | 6 | long_desc = fh.read()
|
8 | 7 |
|
9 | 8 | with open('smartpy/version.py') as fv:
|
10 | 9 | exec(fv.read())
|
11 | 10 |
|
12 |
| -setup( |
13 |
| - name='smartpy', |
14 | 11 |
|
15 |
| - version=__version__, |
| 12 | +def requirements(filename): |
| 13 | + requires = [] |
| 14 | + with open(filename, 'r') as fr: |
| 15 | + for line in fr: |
| 16 | + package = line.strip() |
| 17 | + if package: |
| 18 | + requires.append(package) |
16 | 19 |
|
17 |
| - description='SMARTpy: an open-source rainfall-runoff model in Python', |
18 |
| - long_description=long_desc, |
19 |
| - long_description_content_type="text/markdown", |
| 20 | + return requires |
20 | 21 |
|
21 |
| - url='https://github.com/ThibHlln/smartpy', |
22 | 22 |
|
| 23 | +setup( |
| 24 | + name='smartpy', |
| 25 | + version=__version__, |
| 26 | + description='An implementation of the rainfall-runoff model SMART in Python', |
| 27 | + long_description=long_desc, |
| 28 | + long_description_content_type="text/x-rst", |
| 29 | + download_url="https://pypi.python.org/pypi/smartpy", |
| 30 | + project_urls={ |
| 31 | + 'Bug Tracker': 'https://github.com/thibhlln/smartpy/issues', |
| 32 | + 'User Support': 'https://github.com/thibhlln/smartpy/discussions', |
| 33 | + 'Documentation': 'https://thibhlln.github.io/smartpy', |
| 34 | + 'Source Code': 'https://github.com/thibhlln/smartpy', |
| 35 | + }, |
23 | 36 | author='Thibault Hallouin, Eva Mockler, and Michael Bruen',
|
24 |
| - author_email='thibault.hallouin@ucdconnect.ie', |
25 |
| - |
26 |
| - license='GPLv3', |
27 |
| - |
| 37 | + author_email='thibhlln@gmail.com', |
| 38 | + license='GPL-3.0', |
28 | 39 | classifiers=[
|
29 | 40 | 'Development Status :: 4 - Beta',
|
30 |
| - |
31 | 41 | 'Natural Language :: English',
|
32 |
| - |
33 | 42 | 'Intended Audience :: Science/Research',
|
34 | 43 | 'Intended Audience :: Developers',
|
35 | 44 | 'Topic :: Scientific/Engineering :: Hydrology',
|
36 |
| - |
37 | 45 | 'Operating System :: MacOS',
|
38 | 46 | 'Operating System :: Microsoft :: Windows',
|
39 | 47 | 'Operating System :: POSIX :: Linux',
|
40 |
| - |
41 |
| - |
42 | 48 | 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
43 |
| - |
44 | 49 | 'Programming Language :: Python :: 2',
|
45 | 50 | 'Programming Language :: Python :: 2.7',
|
46 | 51 | 'Programming Language :: Python :: 3',
|
47 | 52 | 'Programming Language :: Python :: 3.5',
|
48 | 53 | 'Programming Language :: Python :: 3.6',
|
49 | 54 | 'Programming Language :: Python :: Implementation :: CPython'
|
50 | 55 | ],
|
51 |
| - |
52 | 56 | packages=['smartpy', 'smartpy.montecarlo', 'examples'],
|
53 |
| - |
54 |
| - install_requires=[ |
55 |
| - 'numpy>=1.16', |
56 |
| - 'scipy', |
57 |
| - 'future' |
58 |
| - ], |
59 |
| - |
| 57 | + install_requires=requirements('requirements.txt'), |
60 | 58 | extras_require={
|
61 | 59 | 'with_netcdf': ['netCDF4'],
|
62 |
| - 'with_spotpy': ['spotpy>=1.3.27'], |
| 60 | + 'with_spotpy': ['spotpy>=1.5.14'], |
63 | 61 | 'with_smartcpp': ['smartcpp'],
|
64 |
| - 'with_all_extras': ['netCDF4', 'spotpy', 'smartcpp'] |
| 62 | + 'with_all_extras': ['netCDF4', 'spotpy>=1.5.14', 'smartcpp'] |
65 | 63 | }
|
66 | 64 | )
|
0 commit comments