Hi
I've made a patch to fix this already. As attachment. I'll also forward to the upstream first. Yours, Paul
Description: Porting to python3 python2 is end of life in Debian. We patch the scons file from python2 to python3 syntax. Author: Ying-Chun Liu (PaulLiu) <paul...@debian.org> Bug-Debian: https://bugs.debian.org/947579 Last-Update: 2020-02-01 Index: rlvm-0.14/SConstruct =================================================================== --- rlvm-0.14.orig/SConstruct +++ rlvm-0.14/SConstruct @@ -191,9 +191,9 @@ int main(int argc, char **argv) { def VerifyLibrary(config, library, header): if not config.CheckLibWithHeader(library, header, "c"): if config.CheckLib(library): - print "You have " + library + " installed, but the development headers aren't installed." + print ("You have " + library + " installed, but the development headers aren't installed.") else: - print "You need " + library + " to compile this program!" + print ("You need " + library + " to compile this program!") Exit(1) def CheckForSystemLibrary(config, library_dict, componentlist): @@ -213,7 +213,7 @@ def CheckForSystemLibrary(config, librar if not res: lib_name = library_dict['library'] - print "(Using included version of %s)" % lib_name + print ("(Using included version of %s)" % lib_name) componentlist.append(lib_name) config.Define("HAVE_LIB" + lib_name, 1, "Define to 1 if you have the `%s' library." % lib_name) @@ -229,7 +229,7 @@ config = env.Configure(custom_tests = {' 'CheckGuichan' : CheckGuichan}, config_h="build/config.h") if not config.CheckBoost('1.40'): - print "Boost version >= 1.40 needed to compile rlvm!" + print ("Boost version >= 1.40 needed to compile rlvm!") Exit(1) VerifyLibrary(config, 'pthread', 'pthread.h') @@ -246,7 +246,7 @@ VerifyLibrary(config, 'vorbisfile', 'vor if env['PLATFORM'] != 'darwin': VerifyLibrary(config, 'SDL', 'SDL/SDL.h') else: - print "Can't properly detect SDL under OSX. Assuming you have the libraries." + print ("Can't properly detect SDL under OSX. Assuming you have the libraries.") # Libraries we need, but will use a local copy if not installed. local_sdl_libraries = [ @@ -276,7 +276,7 @@ for library_dict in local_sdl_libraries: CheckForSystemLibrary(config, library_dict, subcomponents) if not config.CheckGuichan(): - print "(Using included copy of guichan)" + print ("(Using included copy of guichan)") subcomponents.append("guichan") # Really optional libraries that jagarl's file loaders take advantage of if on Index: rlvm-0.14/site_scons/site_tools/rlvm.py =================================================================== --- rlvm-0.14.orig/site_scons/site_tools/rlvm.py +++ rlvm-0.14/site_scons/site_tools/rlvm.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 """ Support for building rlvm objects @@ -56,19 +56,19 @@ def RlvmProgram(env, prog_name, *args, * objects.extend(args) # TODO: Deal with RLVM_LIBS in a shared objecty way - if kwargs.has_key('rlvm_libs'): + if 'rlvm_libs' in kwargs.keys(): for lib_name in kwargs['rlvm_libs']: objects.append(env['LIBPREFIX'] + lib_name + env['LIBSUFFIX']) # Add all static libraries from the various categories - if kwargs.has_key('use_lib_set'): + if 'use_lib_set' in kwargs.keys(): for lib_set_name in kwargs['use_lib_set']: lib_set = cloned_env[_MakeStaticName(lib_set_name)] if lib_set: objects.extend(lib_set) # First, we need to see if this is a static build - if kwargs.has_key("full_static_build") and kwargs['full_static_build'] == True: + if "full_static_build" in kwargs.keys() and kwargs['full_static_build'] == True: # We must unpack each entry in LIBS and try to locate a static library to old_libs = cloned_env['LIBS'] libpaths = cloned_env['LIBPATH'] Index: rlvm-0.14/SConscript.luarlvm =================================================================== --- rlvm-0.14.orig/SConscript.luarlvm +++ rlvm-0.14/SConscript.luarlvm @@ -34,7 +34,7 @@ config = test_env.Configure() if config.CheckLibWithHeader('lua5.1', 'lua5.1/lua.h', 'cpp'): env['BUILD_LUA_TESTS'] = True else: - print "Not building luaRlvm. (Don't worry, it's only a testing tool!)" + print ("Not building luaRlvm. (Don't worry, it's only a testing tool!)") test_env = config.Finish() Index: rlvm-0.14/scripts/buildhik.py =================================================================== --- rlvm-0.14.orig/scripts/buildhik.py +++ rlvm-0.14/scripts/buildhik.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # A fairly naive script which takes a JSON file generated from dumphik.py and # tries to generate a valid HIK file. @@ -17,10 +17,10 @@ def write_property(output, property): output.write(struct.pack("i", len(x))) output.write(x) else: - print type(x) + print (type(x)) if len(sys.argv) != 3: - print "Usage: " + sys.argv[0] + " <input json file> <output hik>" + print ("Usage: " + sys.argv[0] + " <input json file> <output hik>") exit(-1) with open(sys.argv[1], "rb") as input: Index: rlvm-0.14/scripts/dumphik.py =================================================================== --- rlvm-0.14.orig/scripts/dumphik.py +++ rlvm-0.14/scripts/dumphik.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # A fairly naive script which dumps out the data of a HIK file to a JSON file # for editing and reencoding with buildhik.py. @@ -48,7 +48,7 @@ property_formats = { results = [ ] if len(sys.argv) != 3: - print "Usage: " + sys.argv[0] + " <input hik file> <output json>" + print ("Usage: " + sys.argv[0] + " <input hik file> <output json>") exit(-1) with open(sys.argv[1], "rb") as f: @@ -67,7 +67,7 @@ with open(sys.argv[1], "rb") as f: if property_id in property_formats: record.append([property_id, property_formats[property_id](f)]) else: - print "huh: " + str(property_id) + print ("huh: " + str(property_id)) property_id = struct.unpack("i", f.read(0x4))[0] @@ -77,4 +77,4 @@ with open(sys.argv[1], "rb") as f: results.append(record) with open(sys.argv[2], "w") as f: - print >>f, json.dumps(results, sort_keys=True, indent=4) + print (json.dumps(results, sort_keys=True, indent=4), file=f) Index: rlvm-0.14/scripts/fix_guards.py =================================================================== --- rlvm-0.14.orig/scripts/fix_guards.py +++ rlvm-0.14/scripts/fix_guards.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import sys import os
signature.asc
Description: OpenPGP digital signature