forked from usgs/shakemap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
82 lines (76 loc) · 2.55 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
import os
from distutils.core import setup
import os.path
import versioneer
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import numpy
# This should be handled by conda when we install a platform-specific
# compiler
# os.environ['CC'] = 'gcc'
sourcefiles = ["shakemap/c/pcontour.pyx", "shakemap/c/contour.c"]
clib_source = ["shakemap/c/clib.pyx"]
ext_modules = [Extension("shakemap.c.pcontour",
sourcefiles,
libraries=["m"],
include_dirs=[numpy.get_include()],
extra_compile_args=["-O3"]),
Extension("shakemap.c.clib",
clib_source,
libraries=['m'],
include_dirs=[numpy.get_include()],
extra_compile_args=["-O3", "-fopenmp"],
extra_link_args=["-fopenmp"])]
cmdclass = versioneer.get_cmdclass()
cmdclass['build_ext'] = build_ext
setup(name='shakemap',
version=versioneer.get_version(),
description='USGS Near-Real-Time Ground Motion Mapping',
author='Bruce Worden, Mike Hearne, Eric Thompson',
url='http://github.com/usgs/shakemap',
packages=[
'shakemap',
'shakemap.utils',
'shakelib',
'shakelib.conversions',
'shakelib.conversions.imc',
'shakelib.conversions.imt',
'shakelib.correlation',
'shakelib.directivity',
'shakelib.gmice',
'shakelib.rupture',
'shakelib.plotting',
'shakelib.utils',
],
package_data={
'shakemap': [
os.path.join('tests', 'shakemap', 'data', '*'),
os.path.join('data', '*'),
],
'shakelib': [
os.path.join('test', 'data', '*'),
os.path.join('utils', 'data', '*'),
os.path.join('rupture', 'ps2ff', '*.csv')
]
},
scripts=[
'bin/associate_amps',
'bin/getdyfi',
'bin/receive_amps',
'bin/receive_origins',
'bin/run_verification',
'bin/shake',
'bin/sm_check',
'bin/sm_compare',
'bin/sm_create',
'bin/sm_migrate',
'bin/sm_profile',
'bin/sm_queue',
'bin/sm_rupture',
'bin/sm_batch',
'bin/sm_sync'],
cmdclass=cmdclass,
ext_modules=cythonize(ext_modules)
)