diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-21 22:52:15 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-24 19:29:58 -0600 |
commit | c92d924dd3dfa9eb97f65848e04ec9391709bc09 (patch) | |
tree | 665040ee28bf7b5f0885b8e7b21ac82bb472c8a5 /numpy/core/setup.py | |
parent | d0d8d1c1deb28fb2b43c7180cd0e293608b6964e (diff) | |
download | numpy-c92d924dd3dfa9eb97f65848e04ec9391709bc09.tar.gz |
MAINT: Remove unneeded version checks.
Now that only Python versions 2.6-2.7 and 3.2-3.3 are supported
some version checks are no longer needed. This patch removes them
so as to clean up the code.
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 4e4630eb0..0b2ecfe67 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -154,11 +154,10 @@ def check_math_capabilities(config, moredefs, mathlibs): # config.h in the public namespace, so we have a clash for the common # functions we test. We remove every function tested by python's # autoconf, hoping their own test are correct - if sys.version_info[:2] >= (2, 5): - for f in OPTIONAL_STDFUNCS_MAYBE: - if config.check_decl(fname2def(f), - headers=["Python.h", "math.h"]): - OPTIONAL_STDFUNCS.remove(f) + for f in OPTIONAL_STDFUNCS_MAYBE: + if config.check_decl(fname2def(f), + headers=["Python.h", "math.h"]): + OPTIONAL_STDFUNCS.remove(f) check_funcs(OPTIONAL_STDFUNCS) @@ -222,19 +221,16 @@ def check_ieee_macros(config): # functions we test. We remove every function tested by python's # autoconf, hoping their own test are correct _macros = ["isnan", "isinf", "signbit", "isfinite"] - if sys.version_info[:2] >= (2, 6): - for f in _macros: - py_symbol = fname2def("decl_%s" % f) - already_declared = config.check_decl(py_symbol, - headers=["Python.h", "math.h"]) - if already_declared: - if config.check_macro_true(py_symbol, - headers=["Python.h", "math.h"]): - pub.append('NPY_%s' % fname2def("decl_%s" % f)) - else: - macros.append(f) - else: - macros = _macros[:] + for f in _macros: + py_symbol = fname2def("decl_%s" % f) + already_declared = config.check_decl(py_symbol, + headers=["Python.h", "math.h"]) + if already_declared: + if config.check_macro_true(py_symbol, + headers=["Python.h", "math.h"]): + pub.append('NPY_%s' % fname2def("decl_%s" % f)) + else: + macros.append(f) # Normally, isnan and isinf are macro (C99), but some platforms only have # func, or both func and macro version. Check for macro only, and define # replacement ones if not found. |