[Numpy-svn] r6027 - trunk/numpy/random

numpy-svn@scip... numpy-svn@scip...
Fri Nov 14 10:10:37 CST 2008


Author: cdavid
Date: 2008-11-14 10:10:21 -0600 (Fri, 14 Nov 2008)
New Revision: 6027

Modified:
   trunk/numpy/random/setup.py
Log:
Add code to detect msvc used to build python.

Modified: trunk/numpy/random/setup.py
===================================================================
--- trunk/numpy/random/setup.py	2008-11-14 08:27:02 UTC (rev 6026)
+++ trunk/numpy/random/setup.py	2008-11-14 16:10:21 UTC (rev 6027)
@@ -1,5 +1,14 @@
 from os.path import join, split
+import sys
 
+def msvc_version():
+    """Return the msvc version used to build the running python, None if not
+    built with MSVC."""
+    msc_pos = sys.version.find('MSC v.')
+    if msc_pos != -1:
+        return sys.version[msc_pos+6:msc_pos+10]
+    return None
+
 def configuration(parent_package='',top_path=None):
     from numpy.distutils.misc_util import Configuration, get_mathlibs
     config = Configuration('random',parent_package,top_path)



More information about the Numpy-svn mailing list