diff options
author | David Cournapeau <cournape@gmail.com> | 2008-11-14 16:10:21 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-11-14 16:10:21 +0000 |
commit | 0ba62e66aef44d52f228c351366c4c021fd7a0fb (patch) | |
tree | f093ac4d1c2402396dc8ee05b5eb7e48858db721 /numpy/random/setup.py | |
parent | fd9a6496911b449882788c3e7d99d15efec6d6d3 (diff) | |
download | numpy-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.py | 9 |
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 |