Blob Blame History Raw
diff -up serf-1.3.9/SConstruct.python3 serf-1.3.9/SConstruct
--- serf-1.3.9/SConstruct.python3	2018-07-02 17:21:47.331685070 +0200
+++ serf-1.3.9/SConstruct	2018-07-02 17:27:12.316413515 +0200
@@ -20,6 +20,8 @@
 # ====================================================================
 #
 
+from __future__ import print_function
+
 import sys
 import os
 import re
@@ -166,7 +168,7 @@ env.Append(BUILDERS = {
 match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
                   'SERF_MINOR_VERSION ([0-9]+).*'
                   'SERF_PATCH_VERSION ([0-9]+)',
-                  env.File('serf.h').get_contents(),
+                  env.File('serf.h').get_contents().decode('utf-8'),
                   re.DOTALL)
 MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
 env.Append(MAJOR=str(MAJOR))
@@ -183,7 +185,7 @@ CALLOUT_OKAY = not (env.GetOption('clean
 
 unknown = opts.UnknownVariables()
 if unknown:
-  print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
+  print('Warning: Used unknown variables:', ', '.join(unknown.keys()))
 
 apr = str(env['APR'])
 apu = str(env['APU'])
diff -uap serf-1.3.9/build/check.py.python3 serf-1.3.9/build/check.py
--- serf-1.3.9/build/check.py.python3	2015-09-17 13:46:24.000000000 +0100
+++ serf-1.3.9/build/check.py	2018-12-17 11:40:06.524901129 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 #
 # check.py :  Run all the test cases.
 #
@@ -52,16 +52,16 @@ if __name__ == '__main__':
 
   # Find test responses and run them one by one
   for case in glob.glob(testdir + "/testcases/*.response"):
-    print "== Testing %s ==" % (case)
+    print("== Testing %s ==" % (case))
     try:
       subprocess.check_call([SERF_RESPONSE_EXE, case])
     except subprocess.CalledProcessError:
-      print "ERROR: test case %s failed" % (case)
+      print("ERROR: test case %s failed" % (case))
       sys.exit(1)
 
-  print "== Running the unit tests =="
+  print("== Running the unit tests ==")
   try:
     subprocess.check_call(TEST_ALL_EXE)
   except subprocess.CalledProcessError:
-    print "ERROR: test(s) failed in test_all"
+    print("ERROR: test(s) failed in test_all")
     sys.exit(1)