forked from lpinner/gdal-calculations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
57 lines (47 loc) · 1.85 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
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from codecs import open
from os import path
import sys
here = path.abspath(path.dirname(__file__))
sys.path.insert(0, path.join(here,'lib'))
# Get the version from the VERSION file
with open(path.join(here, 'VERSION'), encoding='utf-8') as f:
version = f.read()
SHORTDESC='Simple tiled (or untiled if desired) raster calculations (AKA "map algebra")'
LONGDESC='''This package enables simple tiled (or untiled if desired) raster calculations
(AKA "map algebra") from the commandline or from within your python scripts.
There is a commandline raster calculator and a raster calculations library.'''
AUTHOR="Luke Pinner"
AUTHOR_EMAIL="gdal.calculations@mailinator.com"
URL="https://github.com/lpinner/metageta"
CLASSIFIERS = [ 'Operating System :: OS Independent',
'License :: OSI Approved :: MIT License',
'Topic :: Scientific/Engineering :: GIS']
REQUIRED = ['GDAL >= 1.7, < 2.0','numpy >= 1.7']
if 'install' in sys.argv:
for module in REQUIRED:
try:__import__(module)
except ImportError:raise ImportError('%s is required.'%module)
setupargs = {
'name':'gdal_calculations',
'version':version,
'description':SHORTDESC,
'long_description':LONGDESC,
'platforms':['linux','windows','darwin'],
'author':AUTHOR,
'author_email':AUTHOR_EMAIL,
'classifiers': CLASSIFIERS,
'url':URL,
'keywords':'raster calculations',
'package_dir':{'': 'lib'},
'packages':find_packages('lib'),
'install_requires':REQUIRED,
'package_data':{'gdal_calculations': ['README','COPYING','NEWS','VERSION']},
'entry_points':{
'console_scripts': [
'gdal_calculate=gdal_calculations.gdal_calculate:main',
],
}
}
setup(**setupargs)