summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-05-23 21:08:20 +0100
committerCarl Hetherington <cth@carlh.net>2018-05-23 21:08:20 +0100
commit4c31eea6ddc6bb64bcf4f72687a73715818b1ce8 (patch)
tree16bca42326eef71adde59333792f0f0f618bcb55 /wscript
parentfeb24ad5e3b904c8ec06110606e8fae4644f3e88 (diff)
Python 3 fix for wscript.
Diffstat (limited to 'wscript')
-rw-r--r--wscript9
1 files changed, 7 insertions, 2 deletions
diff --git a/wscript b/wscript
index 62bbb1413..824cfa9dc 100644
--- a/wscript
+++ b/wscript
@@ -24,7 +24,12 @@ import sys
import glob
import distutils
import distutils.spawn
-import urllib
+try:
+ # python 2
+ from urllib import urlencode
+except ImportError:
+ # python 3
+ from urllib.parse import urlencode
from waflib import Logs, Context
APPNAME = 'dcpomatic'
@@ -603,7 +608,7 @@ def configure(conf):
def download_supporters():
last_date = subprocess.Popen(shlex.split('git log -1 --format=%%ai %s' % last_version), stdout=subprocess.PIPE).communicate()[0]
- os.system('curl https://dcpomatic.com/supporters.cc?%s > src/wx/supporters.cc' % urllib.urlencode({"until": last_date.strip()}))
+ os.system('curl https://dcpomatic.com/supporters.cc?%s > src/wx/supporters.cc' % urlencode({"until": last_date.strip()}))
def build(bld):
create_version_cc(VERSION, bld.env.CXXFLAGS)