[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.4.0.8-29-g7a11d53

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:31:39 CET 2014


The branch, build-baikal has been updated
       via  7a11d530d14ae25ad3702e39b4428239d20a67d3 (commit)
      from  71ebec29c3730627499e48e26d8f8f1cd0851cb4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog |    2 ++
 setup.py         |   14 +++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 80b9796..9300c08 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ python-x2go (0.4.0.9-0x2go1) UNRELEASED; urgency=low
     - Check for pulse cookie file in old (~/.pulse-cookie) and new
       (~/.config/pulse/cookie) location.
     - Import python-x2go-py3.patch from Fedora. Thanks to Orion!!!
+    - Improve setup.py script: make it run with Python3 and older Python2
+      versions.
   * debian/source/format:
     + Switch to format 1.0.
   * Ship python-x2go.spec (RPM package definitions) in upstream project. (Thanks
diff --git a/setup.py b/setup.py
index f4f8926..47ef58d 100755
--- a/setup.py
+++ b/setup.py
@@ -21,9 +21,17 @@
 import os
 
 from setuptools import setup, find_packages
-for line in open(os.path.join('x2go', '__init__.py'),encoding='utf-8').readlines():
-    if (line.startswith('__VERSION__')):
-        exec(line.strip())
+try:
+    # for python3.x
+    for line in open(os.path.join('x2go', '__init__.py'),encoding='utf-8').readlines():
+        if (line.startswith('__VERSION__')):
+            exec(line.strip())
+except TypeError:
+    # for older python2.x versions
+    for line in file(os.path.join('x2go', '__init__.py')).readlines():
+        if (line.startswith('__VERSION__')):
+            exec(line.strip())
+e
 MODULE_VERSION = __VERSION__
 
 setup(


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list