forked from landlab/landlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
167 lines (146 loc) · 6.13 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#! /usr/bin/env python
#from ez_setup import use_setuptools
#use_setuptools()
from setuptools import setup, find_packages, Extension
from setuptools.command.install import install
from setuptools.command.develop import develop
from distutils.extension import Extension
import pkg_resources
import versioneer
numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')
ext_modules = [
Extension('landlab.ca.cfuncs',
['landlab/ca/cfuncs.pyx']),
Extension('landlab.grid.cfuncs',
['landlab/grid/cfuncs.pyx']),
Extension('landlab.components.flexure.cfuncs',
['landlab/components/flexure/cfuncs.pyx']),
Extension('landlab.components.flow_accum.cfuncs',
['landlab/components/flow_accum/cfuncs.pyx']),
Extension('landlab.components.flow_director.cfuncs',
['landlab/components/flow_director/cfuncs.pyx']),
Extension('landlab.components.stream_power.cfuncs',
['landlab/components/stream_power/cfuncs.pyx']),
Extension('landlab.components.space.cfuncs',
['landlab/components/space/cfuncs.pyx']),
Extension('landlab.components.drainage_density.cfuncs',
['landlab/components/drainage_density/cfuncs.pyx']),
Extension('landlab.components.erosion_deposition.cfuncs',
['landlab/components/erosion_deposition/cfuncs.pyx']),
Extension('landlab.utils.ext.jaggedarray',
['landlab/utils/ext/jaggedarray.pyx']),
Extension('landlab.graph.structured_quad.ext.at_node',
['landlab/graph/structured_quad/ext/at_node.pyx']),
Extension('landlab.graph.structured_quad.ext.at_link',
['landlab/graph/structured_quad/ext/at_link.pyx']),
Extension('landlab.graph.structured_quad.ext.at_patch',
['landlab/graph/structured_quad/ext/at_patch.pyx']),
Extension('landlab.graph.structured_quad.ext.at_cell',
['landlab/graph/structured_quad/ext/at_cell.pyx']),
Extension('landlab.graph.structured_quad.ext.at_face',
['landlab/graph/structured_quad/ext/at_face.pyx']),
Extension('landlab.graph.hex.ext.hex',
['landlab/graph/hex/ext/hex.pyx']),
Extension('landlab.graph.sort.ext.remap_element',
['landlab/graph/sort/ext/remap_element.pyx']),
Extension('landlab.graph.sort.ext.argsort',
['landlab/graph/sort/ext/argsort.pyx']),
Extension('landlab.graph.sort.ext.spoke_sort',
['landlab/graph/sort/ext/spoke_sort.pyx']),
Extension('landlab.graph.voronoi.ext.voronoi',
['landlab/graph/voronoi/ext/voronoi.pyx']),
Extension('landlab.graph.voronoi.ext.delaunay',
['landlab/graph/voronoi/ext/delaunay.pyx']),
Extension('landlab.graph.object.ext.at_node',
['landlab/graph/object/ext/at_node.pyx']),
Extension('landlab.graph.object.ext.at_patch',
['landlab/graph/object/ext/at_patch.pyx']),
Extension('landlab.graph.quantity.ext.of_link',
['landlab/graph/quantity/ext/of_link.pyx']),
Extension('landlab.graph.quantity.ext.of_patch',
['landlab/graph/quantity/ext/of_patch.pyx']),
Extension('landlab.graph.matrix.ext.matrix',
['landlab/graph/matrix/ext/matrix.pyx']),
Extension('landlab.grid.structured_quad.cfuncs',
['landlab/grid/structured_quad/cfuncs.pyx']),
Extension('landlab.grid.structured_quad.c_faces',
['landlab/grid/structured_quad/c_faces.pyx']),
Extension('landlab.layers.ext.eventlayers',
['landlab/layers/ext/eventlayers.pyx']),
]
def register(**kwds):
import httplib, urllib
data = urllib.urlencode(kwds)
header = {"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"}
conn = httplib.HTTPConnection('csdms.colorado.edu')
conn.request('POST', '/register/', data, header)
def register_landlab():
try:
from sys import argv
import platform
data = {
'name': 'landlab',
'version': __version__,
'platform': platform.platform(),
'desc': ';'.join(argv),
}
register(**data)
except Exception:
pass
class install_and_register(install):
def run(self):
install.run(self)
register_landlab()
class develop_and_register(develop):
def run(self):
develop.run(self)
register_landlab()
import os
#cython_pathspec = os.path.join('landlab', 'components','**','*.pyx')
#ext_modules = cythonize(cython_pathspec)
setup(name='landlab',
version=versioneer.get_version(),
author='Eric Hutton',
author_email='[email protected]',
url='https://github.com/landlab',
description='Plugin-based component modeling tool.',
long_description=open('README.rst').read(),
install_requires=['scipy>=0.12',
'nose>=1.3',
'matplotlib',
'sympy',
'pandas',
'six',
'pyyaml',
'netCDF4',
'xarray',
],
# 'Cython>=0.22'],
setup_requires=['cython'],
classifiers=[
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Cython',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: Physics'
],
packages=find_packages(),
package_data={'': ['tests/*txt', 'data/*asc', 'data/*nc',
'preciptest.in']},
test_suite='nose.collector',
cmdclass=versioneer.get_cmdclass({
'install': install_and_register,
'develop': develop_and_register,
}),
entry_points={
'console_scripts': [
'landlab=landlab.cmd.landlab:main',
]
},
include_dirs = [numpy_incl, ],
ext_modules = ext_modules,
)