--- SConstruct.orig 2008-08-23 19:37:34.000000000 -0500 +++ SConstruct 2023-03-09 03:53:53.000000000 -0600 @@ -27,57 +27,57 @@ # Options #----------------------------------------------------------------------------- -opts = Options (conf_file) +opts = Variables (conf_file) -opts.AddOptions (EnumOption ('host', +opts.Add (EnumVariable ('host', help = 'host build platform', allowed_values = ('posix', 'win32'), default = 'posix', - ignorecase = 1), + ignorecase = 1)) - EnumOption ('target', +opts.Add (EnumVariable ('target', help = 'execution target platform', allowed_values = ('posix', 'win32'), default = 'posix', - ignorecase = 1), + ignorecase = 1)) - PathOption ('prefix', +opts.Add (PathVariable ('prefix', 'installation path prefix', - '/usr/local'), + '/usr/local')) # Don't use PathOption for other paths, because we don't # require the directories to preexist. - ('bindir', +opts.Add ('bindir', 'path for executable files (default is $prefix/bin)', - ''), + '') - ('libdir', +opts.Add ('libdir', 'path for library files (default is $prefix/lib/nonpareil)', - ''), + '') - ('destdir', +opts.Add ('destdir', 'installation virtual root directory (for packaging)', - ''), + '') - BoolOption ('debug', +opts.Add (BoolVariable ('debug', help = 'compile for debugging', - default = 1), + default = 1)) # Feature switches: - BoolOption ('has_debugger_gui', +opts.Add (BoolVariable ('has_debugger_gui', help = 'enable debugger GUI interface', - default = 0), + default = 0)) - BoolOption ('has_debugger_cli', +opts.Add (BoolVariable ('has_debugger_cli', help = 'enable debugger command-line interface', - default = 0), + default = 0)) - BoolOption ('use_tcl', +opts.Add (BoolVariable ('use_tcl', help = 'use Tcl as debug command interpreter (only when debugger CLI is enabled)', - default = 1), # only if has_debugger_cli + default = 1)) # only if has_debugger_cli - BoolOption ('use_readline', +opts.Add (BoolVariable ('use_readline', help = 'use Readline library for command editing and history (only when debugger CLI is enabled)', default = 1)) # only if has_debugger_cli @@ -120,9 +120,10 @@ try: os.mkdir (treedir) - except OSError, (errnum, strerror): + except OSError as errnum_and_strerror: + (errnum, strerror) = errnum_and_strerror.args if errnum != errno.EEXIST: - print 'mkdir ', treedir, ':', strerror + print('mkdir ', treedir, ':', strerror) cmd = 'tar cf - ' # @@ -137,7 +138,7 @@ def tarballer (target, source, env): cmd = 'tar -czf ' + str (target[0]) + ' ' + str(source[0]) - print 'running ', cmd, ' ... ' + print('running ', cmd, ' ... ') p = os.popen (cmd) return p.close () @@ -235,7 +236,7 @@ # host platform code #----------------------------------------------------------------------------- -native_env = env.Copy () +native_env = env.Clone () native_env ['build_target_only'] = 0 SConscript ('src/SConscript', build_dir = 'build/' + env ['host'], @@ -256,7 +257,7 @@ #----------------------------------------------------------------------------- if (env ['host'] != env ['target']): - cross_build_env = env.Copy () + cross_build_env = env.Clone () cross_build_env ['build_target_only'] = 1 SConscript ('src/SConscript', build_dir = 'build/' + env ['target'],