-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·133 lines (113 loc) · 4.33 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·133 lines (113 loc) · 4.33 KB
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
#!/usr/bin/env python
try:
from setuptools import setup, Extension
except ImportError:
raise RuntimeError('setuptools is required')
import os
from distutils.util import convert_path
import sys
# The minimum python version which can be used to run ObsPy
MIN_PYTHON_VERSION = (3, 10)
# Fail fast if the user is on an unsupported version of python.
if sys.version_info < MIN_PYTHON_VERSION:
msg = ("gemlog requires python version >= {}".format(MIN_PYTHON_VERSION) +
" you are using python version {}".format(sys.version_info))
print(msg, file=sys.stderr)
sys.exit(1)
DESCRIPTION = 'A set of functions for processing Gem datalogger files.'
LONG_DESCRIPTION = """
gemlog is a python package that provides functions for processing the
log files from the Gem infrasound datalogger. The Gem infrasound logger
is a low-cost, lightweight, low-power instrument for recording infrasound
in field campaigns.
Source code: https://github.com/ajakef/gemlog
"""
DISTNAME = 'gemlog'
LICENSE = 'GPL-3.0'
AUTHOR = 'Jake Anderson'
MAINTAINER_EMAIL = 'ajakef@gmail.com'
URL = 'https://github.com/ajakef/gemlog'
# TO-DO: replace this with versioneer
version_dict = {}
version_path = convert_path('gemlog/version.py')
with open(version_path) as version_file:
exec(version_file.read(), version_dict)
VERSION = version_dict['__version__']
## Dependency notes:
## Main version requirements
# numpy: >=1.22 (2022-06-22; earlier versions have security issue https://github.com/advisories/GHSA-fpfv-jqm9-f5jm).
# scipy: >=1.10 (2023-07-12; security issue)
## Secondary requirements
# pandas: >= 1.3.3 (2021-09; required by numpy 1.22)
# obspy: >=1.3 (2022-06-22; >=1.3 is required for numpy 1.22 compatibility)
# matplotlib: 3.7 (2023-02-13; >=3.7 required to prevent malfunction with pandas>2)
# python: >=3.8 (2022-06-22; >=3.8 is required by numpy 1.22).
## example range: pandas>=1.3.0,<1.4.0
## example exact: numpy==1.21
INSTALL_REQUIRES = [
'setuptools>=18.0', # 18.0 needed to handle cython in installation
'obspy>=1.3',
'numpy>=1.22',
'pandas>=1.3.3', # minimum for numpy 1.22 compatibility
'scipy>=1.10.0', # 1.10 for a security update in July 2023
'matplotlib>=3.7.0', # required for compatibility with pandas>2
'cython', # used for reading raw files quickly
'fpdf' # needed for pdf huddle test reports
]
TESTS_REQUIRE = ['pytest']
EXTRAS_REQUIRE = {
# 'optional': [...],
'doc': ['sphinx==5.3.0', 'sphinx-rtd-theme==1.1.1'],
'test': TESTS_REQUIRE
}
EXTRAS_REQUIRE['all'] = sorted(set(sum(EXTRAS_REQUIRE.values(), [])))
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Physics'
]
ENTRY_POINTS = {
'console_scripts': [
'gem2ms = gemlog.gemconvert:main',
'gemconvert = gemlog.gemconvert:main',
'gemconvert_single = gemlog.gemconvert_single:main',
'gem_cat = gemlog.gem_cat:main',
'change_mseed_times = gemlog.change_mseed_times:main',
'verify_huddle_test = gemlog.huddle_test:main',
'waveform_calc_lags = gemlog.xcorr:xcorr_all_terminal',
'waveform_calc_directions = gemlog.xcorr:calculate_direction_terminal',
'gem_make_inventory = gemlog.gem_network:summarize_gps_terminal'
]
}
setuptools_kwargs = {
'zip_safe': False,
'scripts': [],
'include_package_data': True,
}
PACKAGES = ['gemlog']
setup(name=DISTNAME,
setup_requires=['setuptools>=18.0','cython'],
version=VERSION,
packages=PACKAGES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
tests_require=TESTS_REQUIRE,
ext_modules=[Extension('gemlog.parsers', sources=['gemlog/parsers.pyx'])],
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=AUTHOR,
maintainer_email=MAINTAINER_EMAIL,
license=LICENSE,
url=URL,
classifiers=CLASSIFIERS,
entry_points=ENTRY_POINTS,
**setuptools_kwargs)