From orion@cora.nwra.com  Tue Dec 18 18:00:51 2012
Received: (at submit) by bugs.x2go.org; 18 Dec 2012 17:00:51 +0000
Received: from mail.cora.nwra.com (mercury.cora.nwra.com [4.28.99.165])
	by ymir (Postfix) with ESMTPS id 56E625DA6C
	for <submit@bugs.x2go.org>; Tue, 18 Dec 2012 18:00:51 +0100 (CET)
Received: from barry.cora.nwra.com (barry.cora.nwra.com [10.10.20.7])
	(authenticated bits=0)
	by mail.cora.nwra.com (8.14.4/8.14.4) with ESMTP id qBIH0n0A001977
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO)
	for <submit@bugs.x2go.org>; Tue, 18 Dec 2012 10:00:49 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cora.nwra.com;
	s=default; t=1355850049;
	bh=/pvXvDJqMHsLY8j6dykVr+pccWc93IO+LKgHS1PTlGY=;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type;
	b=souf+6VLUS3xZRZKrggOxbO7siCbvumeviRYPfN9l9C8lakX4JuDiUUaxph9GpQbM
	 a7oLsfvvfXeKtGJN7cSy7y5J9Bj2IU7M0ay+Qp4up4YRzef6+svl8vPEKWXOeOvr5M
	 2xgV+tLfnIJGBvSXGf7Z/ez2ReOiVy+GAtlw+C4M=
Message-ID: <50D0A141.4090902@cora.nwra.com>
Date: Tue, 18 Dec 2012 10:00:49 -0700
From: Orion Poplawski <orion@cora.nwra.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: submit@bugs.x2go.org
Subject: Don't import pyhoca.wxgui just for the version in setup.py
Content-Type: multipart/mixed;
 boundary="------------020209040504070505030008"

This is a multi-part message in MIME format.
--------------020209040504070505030008
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Package: pyhoca-gui
Version: 0.2.1.1
Tags: patch

Importing all of pyhoca.wxgui in setup.py causes rpmbuild problems due to 
DISPLAY not being set.  It is overkill as well, causing extra dependencies to 
be installed at build time.  The attached patch fixes.

Something similar can be done for the other python packages as well.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                   http://www.nwra.com

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

diff -up pyhoca-gui-0.2.1.1/setup.py.version pyhoca-gui-0.2.1.1/setup.py
--- pyhoca-gui-0.2.1.1/setup.py.version	2012-12-18 05:02:18.000000000 -0700
+++ pyhoca-gui-0.2.1.1/setup.py	2012-12-18 09:56:38.711286882 -0700
@@ -21,11 +21,13 @@
 # import the PyHoca-GUI
 import sys
 import os
-import pyhoca.wxgui
 
 PROGRAM_NAME = 'PyHoca-GUI'
 PROGRAM_DESC = '%s is a cross-platform (Windows, MacOS X, Linux) graphical X2Go client.' % PROGRAM_NAME
-PROGRAM_VERSION = pyhoca.wxgui.__VERSION__
+for line in file(os.path.join('pyhoca', 'wxgui', '__init__.py')).readlines():
+    if (line.startswith('__VERSION__')):
+        exec(line.strip())
+PROGRAM_VERSION = __VERSION__
 PROGRAM_ICON = "pixmaps/pyhoca_x2go-logo-ubuntu.ico"
 LICENSE = 'AGPLv3+'
 AUTHOR = 'Mike Gabriel, Dick Kniep'

--------------020209040504070505030008--
