forked from gipit/gips
-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
executable file
·76 lines (69 loc) · 2.5 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
#!/usr/bin/env python
################################################################################
# GIPS: Geospatial Image Processing System
#
# AUTHOR: Matthew Hanson
# EMAIL: matt.a.hanson@gmail.com
#
# Copyright (C) 2014-2018 Applied Geosolutions
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
################################################################################
"""
setup for GIPS
"""
import os
from setuptools import setup, find_packages
import shutil
import glob
import traceback
import imp
__version__ = imp.load_source('gips.version', 'gips/version.py').__version__
# collect console scripts to install
console_scripts = []
for f in glob.glob('gips/scripts/*.py'):
name = os.path.splitext(os.path.basename(f))[0]
if name not in ['__init__', 'core']:
script = 'gips_%s = gips.scripts.%s:main' % (name, name.lower())
console_scripts.append(script)
# Read requirements file for install_requires
stable_reqs_file = open('requirements_stable.txt', 'r')
reqs = stable_reqs_file.read().splitlines()
if os.environ.get('SENTINEL1', 'NO') == 'YES':
s1_reqs_file = open('requirements_sentinel1.txt', 'r')
reqs.append(s1_reqs_file.read().splitlines())
setup(
name='gips',
version=__version__,
description='Geospatial Image Processing System',
author='Matthew Hanson',
author_email='matt.a.hanson@gmail.com',
license='GNU General Public License v3 (GPLv3)',
python_requires='>=3',
packages=find_packages(),
package_data={
'': ['*.shp', '*.prj', '*.shx', '*.dbf', '*.csv'],
'gips': [
'acolite.cfg',
'data/landsat/input_file_tmp.inp',
'data/landsat/lndortho.cps_par.ini',
],
},
install_requires=reqs,
entry_points={'console_scripts': console_scripts},
zip_safe=False,
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
)