Index: sunpinyin-20190805/SConstruct
===================================================================
--- sunpinyin-20190805.orig/SConstruct
+++ sunpinyin-20190805/SConstruct
@@ -2,6 +2,7 @@ import platform
 import os
 import sys
 
+from functools import reduce
 
 version = "2.0.4"
 abi_major = 3
@@ -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()
Index: sunpinyin-20190805/src/SConscript
===================================================================
--- sunpinyin-20190805.orig/src/SConscript
+++ sunpinyin-20190805/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", "0755"),
 ])
 
 # -*- indent-tabs-mode: nil -*- vim:et:ts=4
