Index: sunpinyin-3.0.0-rc1/SConstruct =================================================================== --- sunpinyin-3.0.0-rc1.orig/SConstruct +++ sunpinyin-3.0.0-rc1/SConstruct @@ -1,6 +1,7 @@ import platform import os import sys +import functools version = "2.0.4" @@ -227,7 +228,7 @@ def CreateEnvironment(): def PassVariables(envvar, env): for (x, y) in envvar: if x in os.environ: - print 'Warning: you\'ve set %s in the environmental variable!' % x + print ('Warning: you\'ve set %s in the environmental variable!' % x) env[y] = os.environ[x] env = CreateEnvironment() @@ -427,7 +428,7 @@ env.Substfile('sunpinyin-2.0.pc.in', SUB '@PREFIX@': env['PREFIX'], '@LIBDIR@': env['LIBDIR'], '@VERSION@': version, - '@CFLAGS@': reduce(lambda a, b: a + ' ' + b, + '@CFLAGS@': functools.reduce(lambda a, b: a + ' ' + b, map(lambda x: '-I$${includedir}' + x[3:], allinc())), }) Index: sunpinyin-3.0.0-rc1/src/SConscript =================================================================== --- sunpinyin-3.0.0-rc1.orig/src/SConscript +++ sunpinyin-3.0.0-rc1/src/SConscript @@ -53,7 +53,7 @@ env.Substfile('sunpinyin-dictgen.mk.in', }) env.Command('sunpinyin-dictgen', 'sunpinyin-dictgen.mk', [ Copy("$TARGET", "$SOURCE"), - Chmod("$TARGET", 0755), + Chmod("$TARGET", 0o755), ]) # -*- indent-tabs-mode: nil -*- vim:et:ts=4 Index: sunpinyin-3.0.0-rc1/wrapper/ibus/SConstruct =================================================================== --- sunpinyin-3.0.0-rc1.orig/wrapper/ibus/SConstruct +++ sunpinyin-3.0.0-rc1/wrapper/ibus/SConstruct @@ -36,7 +36,7 @@ opts.Add('DATADIR', default='/usr/local/ def PassVariables(envvar, env): for (x, y) in envvar: if x in os.environ: - print 'Warning: you\'ve set %s in the environmental variable!' % x + print ('Warning: you\'ve set %s in the environmental variable!' % x) env[y] = os.environ[x] env = Environment(ENV=os.environ, @@ -141,7 +141,7 @@ def DoInstall(): libexec_target = env.Install(bin_dir, ['ibus-engine-sunpinyin', 'setup/ibus-setup-sunpinyin']) for exec_bin in libexec_target: - env.AddPostAction(exec_bin, Chmod(str(exec_bin), 0755)) + env.AddPostAction(exec_bin, Chmod(str(exec_bin), 0o755)) setup_target = env.Install(data_dir + '/setup', ['setup/setup.xml',