From 8c2eb55f64313c5764b40b1645306a755790af8b Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 18 Feb 2013 19:15:25 +0100 Subject: [PATCH] Work around extractall bug in older versions of Python Python bug: http://bugs.python.org/issue4710 Refs #200 --- build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index e2c5264019..1addb62c55 100755 --- a/build.py +++ b/build.py @@ -345,7 +345,10 @@ def hostexamples(t): @target(PROJ4JS, PROJ4JS_ZIP) def proj4js(t): from zipfile import ZipFile - ZipFile(PROJ4JS_ZIP).extractall('build') + zf = ZipFile(PROJ4JS_ZIP) + contents = zf.open('proj4js/lib/proj4js-combined.js').read() + with open(t.name, 'wb') as f: + f.write(contents) @target(PROJ4JS_ZIP, clean=False)