Add target to download and install Proj4js
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,6 +11,8 @@
|
||||
/build/src
|
||||
/build/phantomjs-*-windows
|
||||
/build/phantomjs-*-windows.zip
|
||||
/build/proj4js-*.zip
|
||||
/build/proj4js
|
||||
/examples/*.json
|
||||
/examples/*.combined.js
|
||||
/examples/example-list.js
|
||||
|
||||
15
build.py
15
build.py
@@ -77,6 +77,10 @@ SRC = [path
|
||||
PLOVR_JAR = 'bin/plovr-eba786b34df9.jar'
|
||||
PLOVR_JAR_MD5 = '20eac8ccc4578676511cf7ccbfc65100'
|
||||
|
||||
PROJ4JS = 'build/proj4js/lib/proj4js-combined.js'
|
||||
PROJ4JS_ZIP = 'build/proj4js-1.1.0.zip'
|
||||
PROJ4JS_ZIP_MD5 = '17caad64cf6ebc6e6fe62f292b134897'
|
||||
|
||||
|
||||
def report_sizes(t):
|
||||
t.info('uncompressed: %d bytes', os.stat(t.name).st_size)
|
||||
@@ -338,6 +342,17 @@ def hostexamples(t):
|
||||
t.cp('examples/example-list.js', 'examples/example-list.xml', 'examples/Jugl.js', 'build/gh-pages/%(BRANCH)s/examples/')
|
||||
|
||||
|
||||
@target(PROJ4JS, PROJ4JS_ZIP)
|
||||
def proj4js(t):
|
||||
from zipfile import ZipFile
|
||||
ZipFile(PROJ4JS_ZIP).extractall('build')
|
||||
|
||||
|
||||
@target(PROJ4JS_ZIP, clean=False)
|
||||
def proj4js_zip(t):
|
||||
t.download('http://download.osgeo.org/proj4js/' + os.path.basename(t.name), md5=PROJ4JS_ZIP_MD5)
|
||||
|
||||
|
||||
if sys.platform == 'win32':
|
||||
@target('test', '%(PHANTOMJS)s', INTERNAL_SRC, 'test/requireall.js', phony=True)
|
||||
def test(t):
|
||||
|
||||
Reference in New Issue
Block a user