forked from krischer/LASIF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
92 lines (84 loc) · 2.67 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
LASIF (LArge-scale Seismic Inversion Framework)
A collection of scripts that are useful for running a full waveform inversion
workflow with SES3D 4.0.
:copyright:
Lion Krischer ([email protected]) and
Andreas Fichtner ([email protected]) 2012-2016
:license:
GNU General Public License, Version 3
(http://www.gnu.org/copyleft/gpl.html)
"""
import inspect
import os
from setuptools import setup, find_packages
def get_package_data():
"""
Returns a list of all files needed for the installation relativ to the
"lasif" subfolder.
"""
filenames = []
# The lasif root dir.
root_dir = os.path.join(os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe()))), "lasif")
# Recursively include all files in these folders:
folders = [os.path.join(root_dir, "tests", "baseline_images"),
os.path.join(root_dir, "tests", "data")]
for folder in folders:
for directory, _, files in os.walk(folder):
for filename in files:
# Exclude hidden files.
if filename.startswith("."):
continue
filenames.append(os.path.relpath(
os.path.join(directory, filename),
root_dir))
return filenames
setup_config = dict(
name="lasif",
version="0.1.x",
description="",
author="Lion Krischer and Andreas Fichtner",
author_email="[email protected]",
url="https://github.com/krischer/LASIF",
packages=find_packages(),
license="GNU General Public License, version 3 (GPLv3)",
platforms="OS Independent",
install_requires=[
"obspy>=1.0.1",
"progressbar",
"geographiclib",
"numpy",
"colorama",
"matplotlib",
"mpi4py",
"joblib",
"lxml",
"nose",
"numexpr",
"pytest",
"mock",
"flask",
"flask-cache",
"geojson"],
package_data={
"lasif": get_package_data()},
entry_points={
# Register the console scripts.
"console_scripts": [
"lasif = lasif.scripts.lasif_cli:main",
"iris2quakeml = lasif.scripts.iris2quakeml:main"
],
# Register the SES3D reading function with ObsPy.
"obspy.plugin.waveform":
"SES3D = lasif.file_handling.s3d_file_parser",
"obspy.plugin.waveform.SES3D": [
"isFormat = lasif.file_handling.ses3d_file_parser:is_SES3D",
"readFormat = lasif.file_handling.ses3d_file_parser:read_SES3D"
]
}
)
if __name__ == "__main__":
setup(**setup_config)