Use brackets in wscript to be python 3 compatible

It won't actually build, but it's a step towards that.
This commit is contained in:
Christian Dywan 2010-10-22 21:41:18 +02:00
parent 03f69c0b51
commit 031929e773

12
wscript
View file

@ -10,7 +10,7 @@ try:
except: except:
WAFVERSION='1.0.0' WAFVERSION='1.0.0'
if WAFVERSION[:3] != '1.5': if WAFVERSION[:3] != '1.5':
print 'Incompatible Waf, use 1.5' print ('Incompatible Waf, use 1.5')
sys.exit (1) sys.exit (1)
import Build import Build
@ -322,7 +322,7 @@ def configure (conf):
conf.env.append_value ('VALAFLAGS', '--enable-checking'.split ()) conf.env.append_value ('VALAFLAGS', '--enable-checking'.split ())
elif debug_level == 'none': elif debug_level == 'none':
conf.env.append_value ('VALAFLAGS', '--disable-assert') conf.env.append_value ('VALAFLAGS', '--disable-assert')
print ''' print ('''
Localization: %(nls)s (intltool) Localization: %(nls)s (intltool)
Icon optimizations: %(icons)s (rsvg-convert) Icon optimizations: %(icons)s (rsvg-convert)
Notifications: %(libnotify)s (libnotify) Notifications: %(libnotify)s (libnotify)
@ -330,7 +330,7 @@ def configure (conf):
IDN support: %(idn)s (libidn or libsoup 2.27.90) IDN support: %(idn)s (libidn or libsoup 2.27.90)
User documentation: %(user_docs)s (docutils) User documentation: %(user_docs)s (docutils)
API documentation: %(api_docs)s (gtk-doc) API documentation: %(api_docs)s (gtk-doc)
''' % locals () ''' % locals ())
if unique == 'yes' and conf.check_cfg (modversion='unique-1.0') == '1.0.4': if unique == 'yes' and conf.check_cfg (modversion='unique-1.0') == '1.0.4':
Utils.pprint ('RED', 'unique 1.0.4 found, this version is erroneous.') Utils.pprint ('RED', 'unique 1.0.4 found, this version is erroneous.')
Utils.pprint ('RED', 'Please use an older or newer version.') Utils.pprint ('RED', 'Please use an older or newer version.')
@ -568,7 +568,7 @@ def shutdown ():
size_old = 0 size_old = 0
subprocess.call (['intltool-update', '-p', '-g', APPNAME]) subprocess.call (['intltool-update', '-p', '-g', APPNAME])
size_new = os.stat (APPNAME + '.pot').st_size size_new = os.stat (APPNAME + '.pot').st_size
if size_new <> size_old: if size_new != size_old:
Utils.pprint ('YELLOW', "Updated po template.") Utils.pprint ('YELLOW', "Updated po template.")
try: try:
command = 'intltool-update -r -g %s' % APPNAME command = 'intltool-update -r -g %s' % APPNAME
@ -613,7 +613,7 @@ def shutdown ():
command += ' wine cmd /k "PATH=%PATH%;' + Build.bld.env['PREFIX'] + os.sep + 'bin' + ' && ' + APPNAME + '.exe"' command += ' wine cmd /k "PATH=%PATH%;' + Build.bld.env['PREFIX'] + os.sep + 'bin' + ' && ' + APPNAME + '.exe"'
else: else:
command += ' ' + relfolder + os.sep + APPNAME + os.sep + APPNAME command += ' ' + relfolder + os.sep + APPNAME + os.sep + APPNAME
print command print (command)
Utils.exec_command (command) Utils.exec_command (command)
except Exception, msg: except Exception as msg:
Utils.pprint ('RED', "Failed to run application: " + str (msg)) Utils.pprint ('RED', "Failed to run application: " + str (msg))