[maemo-commits] [maemo-commits] r9767 - projects/haf/trunk/python-hildon

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Feb 8 21:48:22 EET 2007
Author: luciano
Date: 2007-02-08 21:48:10 +0200 (Thu, 08 Feb 2007)
New Revision: 9767

Modified:
   projects/haf/trunk/python-hildon/setup.py
Log:
Fixed pkg-config problem inside setup.py

Modified: projects/haf/trunk/python-hildon/setup.py
===================================================================
--- projects/haf/trunk/python-hildon/setup.py	2007-02-08 17:26:15 UTC (rev 9766)
+++ projects/haf/trunk/python-hildon/setup.py	2007-02-08 19:48:10 UTC (rev 9767)
@@ -9,15 +9,15 @@
 includedir = '/usr/include'
 
 def get_hildon_version():
-    proc = subprocess.Popen(
-	["/usr/bin/pkg-config","--modversion","hildon-libs"],
-	stdout=subprocess.PIPE,
-	stderr=subprocess.PIPE
-    )
-    cmdresult = proc.stdout
-    error = proc.stderr
-    print >>sys.stderr, error.read()
-    raw_version = cmdresult.read().strip()
+    input = open('/usr/lib/pkgconfig/hildon-libs.pc','r')
+
+    for line in input:
+	result = line.split()
+        if result:
+	    if result[0] == 'Version:':
+                raw_version = result[-1]
+
+    input.close()
     hildon_version = tuple([ int(x) for x in raw_version.split('.') ])
     return hildon_version
 hildon_version = get_hildon_version()


More information about the maemo-commits mailing list