-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
100 lines (75 loc) · 2.44 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env python
import logging
import sys
import pprint
from setuptools import setup, find_packages
from setuptools.extension import Extension
# Set up the logging environment
logging.basicConfig()
log = logging.getLogger()
# Handle the -W all flag
if 'all' in sys.warnoptions:
log.level = logging.DEBUG
# Parse the verison from the ecopy module
with open('hidropy/__init__.py') as f:
for line in f:
if line.find('__version__') >= 0:
version = line.split('=')[1].strip()
version = version.strip('"')
version = version.strip("'")
continue
with open('VERSION.txt', 'w') as f:
f.write(version)
# Use Cython if available
try:
from Cython.Build import cythonize
except:
log.critical(
'Cython.Build.cythonize not found. '
'Cython is required to build from a repo.')
sys.exit(1)
# Use README.rst as the long description
with open('README.md') as f:
readme = f.read()
# Extension options
include_dirs = []
try:
import numpy
include_dirs.append(numpy.get_include())
except ImportError:
log.critical('Numpy and its headers are required to run setup(). Exiting')
sys.exit(1)
opts = dict(
include_dirs=include_dirs,
)
log.debug('opts:\n%s', pprint.pformat(opts))
# Dependencies
install_requires = [
'numpy>=1.7',
'scipy>=0.14',
'matplotlib>=1.3.1',
'pandas>=0.13',
'patsy>=0.3.0'
]
setup_args = dict(
name='hidropy',
version=version,
description='HidroPy: Python for Hidrological and Meteorogical Data Analyses',
long_description=readme,
url='https://github.com/juanpac96/hidropy',
author='Juan Pablo Cuevas & Jhon Erick Castro',
author_email='[email protected]; [email protected]',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
keywords=['ordination', 'hidrology', 'data analysis'],
#ext_modules=ext_modules,
install_requires=install_requires,
packages=find_packages(),
)
setup(**setup_args)