gnucash-on-windows master: Adjust jhbuild and jhbuildrc for MSYS2 dropping python2.

John Ralls jralls at code.gnucash.org
Mon Nov 23 17:44:25 EST 2020


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/303f125c (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/b4bd3289 (commit)



commit 303f125cf486626543260d9649ed166a1b92300b
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Nov 23 14:39:27 2020 -0800

    Adjust jhbuild and jhbuildrc for MSYS2 dropping python2.
    
    jhbuild has to force /usr/bin/python because the mingw32/64 one
    requires MSDOS style paths and that breaks jhbuild modules.

diff --git a/jhbuild.in b/jhbuild.in
index f93a47d..baa189f 100644
--- a/jhbuild.in
+++ b/jhbuild.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 import sys
diff --git a/jhbuildrc.in b/jhbuildrc.in
index 9110445..67a23f6 100644
--- a/jhbuildrc.in
+++ b/jhbuildrc.in
@@ -8,7 +8,7 @@ def _popen(cmd_arg):
     cmd.stdout.close()
     devnull.close()
     if err:
-        raise RuntimeError, "Failed to close %s stream" % cmd_arg
+        raise RuntimeError("Failed to close %s stream" % cmd_arg)
     return retval
 
 def environ_append(key, value, separator=' '):
@@ -33,7 +33,7 @@ def add_to_path_var(var, path):
 _basedir = "@-BASE_DIR-@"
 _download_dir = "@-DOWNLOAD_DIR-@"
 _arch = "@-ARCH-@"
-if os.environ.has_key('TARGET'):
+if 'TARGET' in os.environ:
     (_project, _branch) = os.environ['TARGET'].split('-')
 else:
     _project = 'gnucash'



Summary of changes:
 jhbuild.in   | 2 +-
 jhbuildrc.in | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)



More information about the gnucash-changes mailing list