Revision: 692
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=692&view=rev
Author: mithro
Date: 2008-08-18 01:57:45 +0000 (Mon, 18 Aug 2008)
Log Message:
-----------
Use a regex to find the version number (rather then a split).
Should work on SUSE and other people who modify the version line.
Modified Paths:
--------------
trunk/python-ogre/environment.py
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2008-08-17 13:10:15 UTC (rev 691)
+++ trunk/python-ogre/environment.py 2008-08-18 01:57:45 UTC (rev 692)
@@ -511,8 +511,8 @@
# FIXME: This assumes that the gcc we are building with now was what we built boost with
import subprocess
gccp = subprocess.Popen (["gcc", "--version"], stdout=subprocess.PIPE)
- gcc_version = gccp.communicate()[0].split('\n')[0].split()[2].split('.')
-
+ import re
+ gcc_version = re.search(r'([0-9]+?\.[0-9]+?\.[0-9]+?)', gccp.communicate()[0]).groups()[0]
# FIXME: Should this be the multithreaded version!?
lib = "boost_python-gcc%s%s-%s" % (gcc_version[0], gcc_version[1], base[6:])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|