WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] better python test patch

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] better python test patch
From: Guillaume Rousse <Guillaume.Rousse@xxxxxxxx>
Date: Mon, 11 Dec 2006 16:27:48 +0100
Delivery-date: Mon, 11 Dec 2006 07:27:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (X11/20061109)
The python test in xen sources is a bit ugly, and will requires manual
intervention everytime a new python version is available.

The following patch use python internal computation instead.
diff -Naur xen-3.0.3_0-src/tools/check/check_python 
xen-3.0.3_0-src.better-python-check/tools/check/check_python
--- xen-3.0.3_0-src/tools/check/check_python    2006-10-15 14:22:03.000000000 
+0200
+++ xen-3.0.3_0-src.better-python-check/tools/check/check_python        
2006-12-11 16:26:01.000000000 +0100
@@ -7,4 +7,4 @@
     exit 1
 }
 
-python -V 2>&1 | cut -d ' ' -f 2 | grep -q '^2.[2345]' || error
+python -c 'import sys; sys.exit(sys.version_info[0] < 2 or sys.version_info[1] 
< 2);' || error
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] better python test patch, Guillaume Rousse <=