-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
53 lines (48 loc) · 1.6 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
from setuptools import setup, Extension
from Cython.Distutils import build_ext
import numpy
import os
catchmod = Extension('pycatchmod._catchmod', ['pycatchmod/_catchmod.pyx'],
include_dirs=[numpy.get_include()])
weather_generator = Extension('pycatchmod._weather_generator', ['pycatchmod/_weather_generator.pyx'],
include_dirs=[numpy.get_include()])
with open(os.path.join(os.path.dirname(__file__), "pycatchmod", "__init__.py"), "r") as f:
for line in f:
if line.startswith("__version__"):
_, version, _ = line.split("\"")
break
# needed to compile
setup_requires = [
"cython", "numpy", "setuptools_scm"
]
# needed to run
install_requires = [
"numpy", "pandas", "click", "tables", "xlrd", "scipy", "future", "matplotlib"
]
# only needed for testing
test_requires = [
"pytest"
]
with open('README.rst') as fh:
long_description = fh.read()
setup(
name='pycatchmod',
description='Python implementation of the rainfall runoff model CATCHMOD.',
long_description= long_description,
long_description_content_type='text/x-rst',
author='James E Tomlinson',
author_email='tomo.bbe@gmail.com',
url="https://github.com/pywr/pycatchmod",
packages=['pycatchmod', "pycatchmod.io"],
install_requires=install_requires,
use_scm_version=True,
setup_requires=setup_requires,
tests_require=test_requires,
ext_modules=[catchmod, weather_generator],
cmdclass = {'build_ext': build_ext},
entry_points={
"console_scripts": [
"pycatchmod = pycatchmod.__main__:main"
]
}
)