Permalink
Browse files

Fix the scipy version display.

  • Loading branch information...
1 parent 5ccb162 commit 3bcec41a2dd9d5a43ce4d51379783d5f398f7571 @teoliphant teoliphant committed Nov 30, 2005
Showing with 12 additions and 6 deletions.
  1. +12 −6 Lib/scipy_version.py
View
@@ -2,11 +2,17 @@
minor = 4
micro = 3
-#try:
-# from __svn_version__ import version as svn_revision
-# scipy_version = '%(major)d.%(minor)d.%(micro)d_%(svn_revision)s'\
-# % (locals ())
-#except ImportError,msg:
-# svn_revision = 0
scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ())
+import os
+svn_version_file = os.path.join(os.path.dirname(__file__),
+ '__svn_version__.py')
+
+if os.path.isfile(svn_version_file):
+ import imp
+ svn = imp.load_module('scipy.__svn_version__',
+ open(svn_version_file),
+ svn_version_file,
+ ('.py','U',1))
+ scipy_version += '.'+svn.version
+

0 comments on commit 3bcec41

Please sign in to comment.