-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
50 lines (40 loc) · 1.41 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
# -*- coding: utf-8 -*-
import sys
from subprocess import check_call
from setuptools import setup
from setuptools.command.build_py import build_py
packname = 'pyttimes'
def make_prerequisites():
try:
check_call(['sh', 'prerequisites/prerequisites.sh'])
except Exception:
sys.exit(
'error: failed to build the included prerequisites with '
'"sh prerequisites/prerequisites.sh"')
class CustomBuildPyCommand(build_py):
def run(self):
make_prerequisites()
build_py.run(self)
setup(
cmdclass={'build_py': CustomBuildPyCommand},
name=packname,
version='0.1.0',
description='Python wrapper to create seismic travel-time '
'lookup-tables and/or NonLinLoc binary grid files '
'through 1-D layered velocity models',
author='Nima Nooshiri',
author_email='[email protected]',
keywords='seismology seismic-travel-times',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering'],
python_requires='>=3.8',
install_requires=['numpy>=1.21.2', 'guts>=0.2'],
packages=[packname],
package_dir={packname: 'src'},
scripts=['apps/{}'.format(packname)],
package_data={packname: ['data/earth_models/*.tvel']}
)