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'
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)