]> granicus.if.org Git - python/commitdiff
Use Guido's trick for always extracting the version number from a
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 27 Mar 2001 08:42:12 +0000 (08:42 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 27 Mar 2001 08:42:12 +0000 (08:42 +0000)
CVS Revision string correctly, even under -kv.

Lib/xml/__init__.py

index b26d378cfe691c8fa40df4b98fe9769217c2f534..7245b7e2c9ccf0750ee8d452393941cc2df36812 100644 (file)
@@ -15,7 +15,10 @@ sax -- The Simple API for XML, developed by XML-Dev, led by David
 
 __all__ = ["dom", "parsers", "sax"]
 
-__version__ = "$Revision$".split()[1]
+# When being checked-out without options, this has the form
+# "<dollar>Revision: x.y </dollar>"
+# When exported using -kv, it is "x.y".
+__version__ = "$Revision$".split()[-2][0]
 
 
 _MINIMUM_XMLPLUS_VERSION = (0, 6, 1)