-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
executable file
·62 lines (56 loc) · 2.56 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
import os, sys
from maptiler import version
# py2exe - needs OSGeo4W with GDAL 1.6
if sys.platform in ['win32','win64']:
from distutils.core import setup
import glob
import py2exe
sys.path.insert(0, 'C:\\OSGeo4W\\apps\\gdal-16\\pymod' )
os.environ['PATH'] += ';C:\\OSGeo4W\\bin'
setup(name='MapTiler',
version=version.replace(' ','.'),
description = "MapTiler - Map Tile Generator for Mashups",
long_description= "MapTiler is a powerful tool for online map publishing and generation of map overlay mashups. Your geodata are transformed to the tiles compatible with Google Maps and Earth - ready for uploading to your webserver.",
url='http://www.maptiler.org/',
author='Klokan Petr Pridal',
author_email='klokan@klokan.cz',
packages=['maptiler'],
scripts=['maptiler.py'],
windows=[ {'script':'maptiler.py', "icon_resources": [(1, os.path.join('resources', 'maptiler.ico'))] } ],
data_files=[
('proj', glob.glob('C:\\OSGeo4W\\share\\proj\\*')),
('gdal', glob.glob('C:\\OSGeo4W\\apps\\gdal-16\\share\\gdal\\*')),
('gdalplugins', glob.glob('C:\\OSGeo4W\\apps\\gdal-16\\bin\\gdalplugins\\*.*')),
('', glob.glob('C:\\OSGeo4W\\bin\\*.dll')+glob.glob('C:\\OSGeo4W\\bin\\*.manifest')),
],
options={'py2exe':{'packages':['maptiler'],
'includes':['encodings','osgeo'],
'excludes':['PIL','numpy','wx.BitmapFromImage','wx.EmptyIcon']
},
},
)
# py2app - creates 'fat' standalone Universal binary - with size around 160MB :-(
# Use 'Build Applet.app' for small Leopard-only bundle with dependency on the Kyngchaos GDAL 1.6 Framework
if sys.platform == 'darwin':
from setuptools import setup
import py2app
# Build the .app file
setup(
options=dict(
py2app=dict(
iconfile='resources/maptiler.icns',
packages='wx',
excludes='osgeo,PIL,numpy',
resources=['resources/license/LICENSE.txt','maptiler'],
plist=dict(
CFBundleName = "MapTiler",
CFBundleShortVersionString = version.replace(' ','.'),
CFBundleGetInfoString = "MapTiler %s" % version,
CFBundleExecutable = "MapTiler",
CFBundleIdentifier = "cz.klokan.maptiler",
),
frameworks=['PROJ.framework','GEOS.framework','SQLite3.framework','UnixImageIO.framework','GDAL.framework'],
),
),
app=[ 'maptiler.py' ]
)