forked from usgs/groundmotion-processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
115 lines (107 loc) · 3.52 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
# -*- coding: utf-8 -*-
import os
import glob
import numpy
import distutils.sysconfig as dsc
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from Cython.Distutils import build_ext
osc_sourcefiles = ["gmprocess/metrics/oscillators.pyx", "gmprocess/metrics/cfuncs.c"]
ko_sourcefiles = [
"gmprocess/waveform_processing/smoothing/konno_ohmachi.pyx",
"gmprocess/waveform_processing/smoothing/smoothing.c",
]
auto_fchp_sourcefiles = ["gmprocess/waveform_processing/auto_fchp.pyx"]
libraries = []
if os.name == "posix":
libraries.append("m")
libraries.append("omp")
ext_modules = [
Extension(
"gmprocess.metrics.oscillators",
osc_sourcefiles,
libraries=libraries,
include_dirs=[numpy.get_include()],
extra_compile_args=["-O1", "-Xpreprocessor", "-fopenmp"],
extra_link_args=["-Xpreprocessor", "-fopenmp"],
),
Extension(
"gmprocess.waveform_processing.smoothing.konno_ohmachi",
ko_sourcefiles,
libraries=libraries,
include_dirs=[numpy.get_include()],
extra_compile_args=["-O2", "-Xpreprocessor", "-fopenmp"],
extra_link_args=["-Xpreprocessor", "-fopenmp"],
),
Extension(
"gmprocess.waveform_processing.auto_fchp",
auto_fchp_sourcefiles,
libraries=libraries,
include_dirs=[numpy.get_include()],
extra_compile_args=["-O2", "-Xpreprocessor", "-fopenmp"],
extra_link_args=["-Xpreprocessor", "-fopenmp"],
),
]
setup(
name="gmprocess",
description="USGS Automated Ground Motion Processing Software",
include_package_data=True,
author=(
"Mike Hearne, Eric Thompson, "
"Heather Schovanec, John Rekoske, "
"Brad Aagaard, Bruce Worden"
),
author_email=(
),
url="https://github.com/usgs/groundmotion-processing",
packages=[
"gmprocess",
"gmprocess.apps",
"gmprocess.bin",
"gmprocess.subcommands",
"gmprocess.core",
"gmprocess.io",
"gmprocess.io.asdf",
"gmprocess.io.bhrc",
"gmprocess.io.esm",
"gmprocess.io.obspy",
"gmprocess.io.nsmn",
"gmprocess.io.cwb",
"gmprocess.io.dmg",
"gmprocess.io.geonet",
"gmprocess.io.knet",
"gmprocess.io.cosmos",
"gmprocess.io.renadic",
"gmprocess.io.smc",
"gmprocess.io.unam",
"gmprocess.io.usc",
"gmprocess.metrics",
"gmprocess.metrics.imt",
"gmprocess.metrics.imc",
"gmprocess.metrics.rotation",
"gmprocess.metrics.combination",
"gmprocess.metrics.transform",
"gmprocess.metrics.reduction",
"gmprocess.utils",
"gmprocess.waveform_processing",
"gmprocess.waveform_processing.smoothing",
],
package_data={"gmprocess": glob.glob("gmprocess/data/**", recursive=True)},
entry_points={
"console_scripts": [
"gmconvert = gmprocess.bin.gmconvert:main",
"gminfo = gmprocess.bin.gminfo:main",
"gmrecords = gmprocess.bin.gmrecords:main",
"gmworkspace = gmprocess.bin.gmworkspace:main",
"list_metrics = gmprocess.bin.list_metrics:main",
"cwb_gather = gmprocess.bin.cwb_gather:main",
]
},
cmdclass={"build_ext": build_ext},
ext_modules=cythonize(ext_modules),
zip_safe=False,
)