From: David I. L. <dl...@us...> - 2002-10-13 00:05:22
|
CVS Root: /cvsroot/gstreamer Module: common Changes by: dlehn Date: Sat Oct 12 2002 17:05:22 PDT Log message: fix python check to use sys.version_info rather than parsing sys.version Modified files: m4 : as-python.m4 Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/common/m4/as-python.m4.diff?r1=1.2&r2=1.3 ====Begin Diffs==== Index: as-python.m4 =================================================================== RCS file: /cvsroot/gstreamer/common/m4/as-python.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- as-python.m4 31 Aug 2002 22:57:49 -0000 1.2 +++ as-python.m4 13 Oct 2002 00:05:10 -0000 1.3 @@ -49,12 +49,10 @@ prog=" import sys, string minver = '$1' -pyver = string.split(sys.version)[0] # first word is version string -# split strings by '.' and convert to numeric -minver = map(string.atoi, string.split(minver, '.')) -pyver = map(string.atoi, string.split(pyver, '.')) +# split string by '.' and convert to numeric +minver_info = map(string.atoi, string.split(minver, '.')) # we can now do comparisons on the two lists: -if pyver >= minver: +if sys.version_info >= tuple(minver_info): sys.exit(0) else: sys.exit(1)" |