summaryrefslogtreecommitdiff
path: root/numpy/random/setup.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-11-14 16:10:21 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-11-14 16:10:21 +0000
commit0ba62e66aef44d52f228c351366c4c021fd7a0fb (patch)
treef093ac4d1c2402396dc8ee05b5eb7e48858db721 /numpy/random/setup.py
parentfd9a6496911b449882788c3e7d99d15efec6d6d3 (diff)
downloadnumpy-0ba62e66aef44d52f228c351366c4c021fd7a0fb.tar.gz
Add code to detect msvc used to build python.
Diffstat (limited to 'numpy/random/setup.py')
-rw-r--r--numpy/random/setup.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/random/setup.py b/numpy/random/setup.py
index 6ec65ee19..e7955db7f 100644
--- a/numpy/random/setup.py
+++ b/numpy/random/setup.py
@@ -1,4 +1,13 @@
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