-
Notifications
You must be signed in to change notification settings - Fork 26
/
setup.py
129 lines (109 loc) · 4.75 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
##############################################################################
# Copyright by The HDF Group. #
# All rights reserved. #
# #
# This file is part of the HDF Compass Viewer. The full HDF Compass #
# copyright notice, including terms governing use, modification, and #
# terms governing use, modification, and redistribution, is contained in #
# the file COPYING, which can be found at the root of the source code #
# distribution tree. If you do not have access to this file, you may #
# request a copy from [email protected]. #
##############################################################################
""" A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
Run `python setup.py --help-commands` for available options
"""
from __future__ import absolute_import, division, print_function # unicode_literals
import os
import sys
# To use a consistent encoding
from codecs import open
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# ---------------------------------------------------------------------------
# Some helper stuff
# ---------------------------------------------------------------------------
here = os.path.abspath(os.path.dirname(__file__))
def txt_read(*paths):
""" Build a file path from *paths* and return the textual contents """
with open(os.path.join(here, *paths), encoding='utf-8') as f:
return f.read()
# ---------------------------------------------------------------------------
# Populate dictionary with settings
# ---------------------------------------------------------------------------
# Create a dict with the basic information that is passed to setup after keys are added.
setup_args = dict()
setup_args['name'] = 'hdf_compass'
# The adopted versioning scheme follow PEP40
setup_args['version'] = '0.7.0b1'
setup_args['url'] = 'https://github.com/HDFGroup/hdf-compass/'
setup_args['license'] = 'BSD-like license'
setup_args['author'] = 'HDFGroup'
setup_args['author_email'] = '[email protected]'
#
# descriptive stuff
#
description = 'An experimental viewer program for HDF5 and related formats.'
setup_args['description'] = description
setup_args['long_description'] = txt_read('README.rst')
setup_args['classifiers'] = \
[ # https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 3',
# 'Programming Language :: Python :: 3.4',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Office/Business :: Office Suites',
'Topic :: Utilities'
]
setup_args['keywords'] = "data hdf bag ascii grid opendap"
#
# code stuff
#
# requirements
setup_args['setup_requires'] =\
[
"setuptools",
"wheel",
]
setup_args['install_requires'] =\
[
"numpy",
"matplotlib>=1.5",
"h5py",
"wxPython==3.0.2",
"requests"
]
setup_args['extras_require'] =\
{
"GeoNodes": ["cartopy[plotting]", ], # required for visualization of GeoArray and GeoSurface nodes
"BAG": ["hydroffice.bag>=0.2.10", ], # required by BAG plugin
"OpenDAP": ["pydap<3.2", ], # required by OpenDAP plugin, there is an issue
# with pydap 3.2: https://github.com/pydap/pydap/issues/66
"ADIOS": ["adios>=1.9.1b19", ], # required by ADIOS plugin
}
# hdf_compass namespace, packages and other files
setup_args['namespace_packages'] = ['hdf_compass']
setup_args['packages'] = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests", "*.test*",
])
setup_args['package_data'] =\
{
'': ['icons/*.png', 'icons/*.ico', 'icons/*.icns', 'icons/*.txt'],
}
setup_args['data_files'] = []
setup_args['entry_points'] =\
{
'gui_scripts': ['HDFCompass = hdf_compass.compass_viewer.viewer:run'],
}
# ---------------------------------------------------------------------------
# Do the actual setup now
# ---------------------------------------------------------------------------
setup(**setup_args)