-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
executable file
·78 lines (69 loc) · 2.69 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
import os
import re
from setuptools import setup
# Load the package's __version__.py to get version string
here = os.path.abspath(os.path.dirname(__file__))
init_py = os.path.join(here, 'snowmicropyn', '__init__.py')
with open(init_py) as f:
VERSION = re.search("__version__ = \'(.*?)\'", f.read()).group(1)
DESC = 'A Python package to read, export and post process data (*.pnt files) ' \
'recorded by SnowMicroPen, a snow penetration probe for scientific ' \
'applications developed at SLF.'
readme_rst = os.path.join(here, 'README.rst')
with open(readme_rst) as f:
LONG_DESC = f.read()
DEPENDENCIES = [
'matplotlib >= 2',
'numpy',
'pandas >= 0.22',
'pytz',
'scipy >= 1',
'scikit-learn',
'PyQt5',
]
# To build documentation of docstrings, Read the Docs (RTD) must install the
# the snowmicropyn package. But RTD does not allow to install packages with
# binary dependencies like PyQt5. So we have to drop this requirement. Pandas,
# matplotlib, etc seems to be no issue. To know if the scripts get executed on
# RTD, we read the environment variable READTHEDOCS.
ON_RTD = os.environ.get('READTHEDOCS') == 'True'
if ON_RTD:
DEPENDENCIES.remove('PyQt5')
setup(
name='snowmicropyn',
version=VERSION,
description=DESC,
long_description=LONG_DESC,
author='WSL Institute for Snow and Avalanche Research SLF',
author_email='[email protected]',
keywords=['SLF', 'SnowMicroPen', 'Snow Micro Pen', 'SMP', 'Snow', 'Science', 'Research'],
url='https://github.com/slf-dot-ch/snowmicropyn',
license='GPL',
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Development Status :: 5 - Production/Stable',
'Environment :: Other Environment',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering :: Atmospheric Science'
],
packages=['snowmicropyn', 'snowmicropyn.ai', 'snowmicropyn.parameterizations', 'snowmicropyn.pyngui', 'snowmicropyn.serialize'],
package_data={
'snowmicropyn': ['githash'],
'snowmicropyn.pyngui': ['about.html'],
'snowmicropyn.ai': ['trained_model_rhossa.dat'],
},
include_package_data=True,
entry_points={
'gui_scripts': [
'pyngui = snowmicropyn.pyngui.app:main'
]
},
python_requires='>=3.8',
install_requires=DEPENDENCIES
)