From unknown Mon May 04 17:09:33 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#1286: python3 support for pyhoca-gui
Reply-To: Orion Poplawski <orion@nwra.com>, 1286@bugs.x2go.org
Resent-From: Orion Poplawski <orion@nwra.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Sat, 14 Apr 2018 17:30:02 +0000
Resent-Message-ID: <handler.1286.B.15237267306556@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 1286
X-X2Go-PR-Package: pyhoca-gui
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.15237267306556
          (code B); Sat, 14 Apr 2018 17:30:02 +0000
Received: (at submit) by bugs.x2go.org; 14 Apr 2018 17:25:30 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,
	URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 60BD75DAEA
	for <submit@bugs.x2go.org>; Sat, 14 Apr 2018 19:25:27 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 8a45QJfwuOcg for <submit@bugs.x2go.org>;
	Sat, 14 Apr 2018 19:25:21 +0200 (CEST)
Received: from mail.nwra.com (mail.nwra.com [72.52.192.72])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 1F2005DA96
	for <submit@bugs.x2go.org>; Sat, 14 Apr 2018 19:25:20 +0200 (CEST)
Received: from pacas.cora.nwra.com (inferno.cora.nwra.com [208.187.183.84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mail.nwra.com (Postfix) with ESMTPSA id 30A7A340034
	for <submit@bugs.x2go.org>; Sat, 14 Apr 2018 10:25:18 -0700 (PDT)
To: submit@bugs.x2go.org
From: Orion Poplawski <orion@nwra.com>
Organization: NorthWest Research Associates
Message-ID: <5782d828-107b-ae54-2a6e-1a3034a466a8@nwra.com>
Date: Sat, 14 Apr 2018 11:25:15 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.7.0
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="------------7ED4837EBB9BC254058333FD"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------7ED4837EBB9BC254058333FD
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Package: pyhoca-gui
Version: 0.5.0.7

2to3 is not sufficient to add python3 support of pyhoca-gui.  The 
attached patches are needed as well.

file() is no longer present in python3.  The mro patch fixes:

/usr/bin/python3.4 setup.py build '--executable=/usr/bin/python3.4 -s'
Traceback (most recent call last):
   File "setup.py", line 212, in <module>
     class build_installer_bbfreeze(build_installer, Freezer, Command):
TypeError: Cannot create a consistent method resolution
order (MRO) for bases object, Command

-- 
Orion Poplawski
Manager of NWRA Technical Systems          720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                 https://www.nwra.com/

--------------7ED4837EBB9BC254058333FD
Content-Type: text/x-patch;
 name="pyhoca-gui-file.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="pyhoca-gui-file.patch"

diff -up pyhoca-gui-0.5.0.7/setup.py.file pyhoca-gui-0.5.0.7/setup.py
--- pyhoca-gui-0.5.0.7/setup.py.file	2017-09-24 03:02:41.000000000 -0600
+++ pyhoca-gui-0.5.0.7/setup.py	2018-04-14 10:51:22.120132138 -0600
@@ -33,7 +33,7 @@ PROGRAM_DESC_SHORT = '%s is a graphical
 
 # silence pyflakes with assigning a dummy version here... the real __VERSION__ assignment happens below
 __VERSION__ = '0.0.0.0'
-for line in file(os.path.join('pyhoca', 'wxgui', '__init__.py')).readlines():
+for line in open(os.path.join('pyhoca', 'wxgui', '__init__.py'),'r').readlines():
     if (line.startswith('__VERSION__')):
         exec(line.strip())
 if platform.system() == 'Windows':

--------------7ED4837EBB9BC254058333FD
Content-Type: text/x-patch;
 name="pyhoca-gui-mro.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="pyhoca-gui-mro.patch"

diff -up pyhoca-gui-0.5.0.7/setup.py.mro pyhoca-gui-0.5.0.7/setup.py
--- pyhoca-gui-0.5.0.7/setup.py.mro	2018-04-14 10:52:19.582773079 -0600
+++ pyhoca-gui-0.5.0.7/setup.py	2018-04-14 11:05:40.829314467 -0600
@@ -209,7 +209,7 @@ class build_installer_py2exe(build_insta
         # First, let py2exe do it's work.
         py2exe.run(self)
 
-class build_installer_bbfreeze(build_installer, Freezer, Command):
+class build_installer_bbfreeze(build_installer, Command, Freezer):
 
     user_options = [
         ('dist-dir=', 'd',

--------------7ED4837EBB9BC254058333FD--
