Import 2017-06-07 23:51:09: master 71602609

Author Committer Branch Timestamp Parent
msmolens msmolens master 2015-09-17 15:49:35 master 9063d387
Affected Issues 0003159: Update Slicer build system to use numpy 1.7.1
0003160: Make sure numpy 1.7.1 can be build on Unix and MacOSx without requiring Fortran compiler
Changeset

ENH: Upgrade to NumPy 1.9.2

This commit upgrades from NumPy 1.4.1 to NumPy 1.9.2.

To continue building NumPy without a Fortran compiler, a build step is
introduced that applies a patch to effectively back out the following
change:

numpy/numpy@4a3fd1f

This new version of NumPy still compiles with Visual Studio 2008 and Visual
Studio 2010, but now also compiles with Visual Studio 2013. To make it compile
with Visual Studio 2013, this commit updates the patched version of
'msvc9compiler.py' for Python 2.7 by adding an entry in WINSDK_VERSION_MAP for
Visual Studio 2013. This fixes the following error when building NumPy with
Visual Studio 2013:

Traceback (most recent call last):
  ...
  File "C:\dev\S4D\NUMPY\numpy\distutils\command\config.py", line 55, in _check_compiler
    self.compiler.initialize()
  File "C:\dev\S4D\python-install\Lib\distutils\msvc9compiler.py", line 500, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\dev\S4D\python-install\Lib\distutils\msvc9compiler.py", line 371, in query_vcvarsall
    for sdkver in WINSDK_VERSION_MAP[versionstr]:
KeyError: '12.0'

NumPy test results on each platform are below:

>>> import numpy
>>> numpy.test(label='full')

- Mac OS X 10.6.8 (GCC 4.2.1 Compatible Clang 3.1, Release):
    - NumPy 1.4.1, manually disabled test_multiarray.TestIO.* because many tests segfault:
        ERROR: Failure: TypeError (setting function's dictionary to a non-dict)
        FAIL: Check formatting of complex types.
        FAIL: Check formatting of complex types.
        FAIL: Check formatting of complex types.
        FAILED (KNOWNFAIL=4, SKIP=4, errors=1, failures=3)
        <nose.result.TextTestResult run=2364 errors=1 failures=3>
    - NumPy 1.9.2:
        OK (KNOWNFAIL=5, SKIP=43)
        <nose.result.TextTestResult run=5382 errors=0 failures=0>

- Ubuntu 14.04.3 (GCC 4.8.4, Debug):
    - NumPy 1.4.1, manually disabled test_multiarray.TestIO.* because many tests segfault:
        ERROR: Failure: TypeError (setting function's dictionary to a non-dict)
        FAIL: Check formatting of complex types.
        FAIL: Check formatting of complex types.
        FAIL: Check formatting of complex types.
        FAILED (KNOWNFAIL=4, SKIP=4, errors=1, failures=3)
        <nose.result.TextTestResult run=2364 errors=1 failures=3>
    - NumPy 1.9.2:
        FAIL: test_allnans (test_nanfunctions.TestNanFunctions_Median)
        FAILED (KNOWNFAIL=5, SKIP=40, failures=1)
        <nose.result.TextTestResult run=5418 errors=0 failures=1>

- Windows (Visual Studio 2008, Release):
    - NumPy 1.4.1, manually disabled test_multiarray.TestIO.* because many tests segfault:
        ERROR: Failure: TypeError (setting function's dictionary to a non-dict)
        FAIL: Check formatting of complex types.
        FAIL: Check formatting of complex types.
        FAIL: Check formatting of complex types.
        FAILED (KNOWNFAIL=8, SKIP=4, errors=1, failures=3)
        <nose.result.TextTestResult run=2216 errors=1 failures=3>
    - NumPy 1.9.2:
        FAIL: test_allnans (test_nanfunctions.TestNanFunctions_Median)
        FAILED (KNOWNFAIL=10, SKIP=44, failures=1)
        <nose.result.TextTestResult run=5226 errors=0 failures=1>

- Windows (Visual Studio 2013, Debug):
    - NumPy 1.4.1:
        Unsupported compiler.
    - NumPy 1.9.2:
        FAIL: test_any_ninf (test_umath.TestArctan2SpecialValues)
        FAIL: test_any_pinf (test_umath.TestArctan2SpecialValues)
        FAIL: test_inf_ninf (test_umath.TestArctan2SpecialValues)
        FAIL: test_inf_pinf (test_umath.TestArctan2SpecialValues)
        FAIL: test_one_one (test_umath.TestArctan2SpecialValues)
        FAIL: test_zero_negative (test_umath.TestArctan2SpecialValues)
        FAIL: test_zero_nzero (test_umath.TestArctan2SpecialValues)
        FAIL: test_zero_pzero (test_umath.TestArctan2SpecialValues)
        FAIL: test_umath.TestComplexFunctions.test_branch_cuts(<ufunc 'log1p'>, -1.5, 1j, 1, -1)
        FAIL: test_umath.TestLogAddExp.test_inf
        FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, 1, 3.141592653589793, False)
        FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, -1, -0.0, False)
        FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, inf, 2.356194490192345, False)
        FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, -inf, -2.356194490192345, False)
        FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, -inf, -0.7853981633974483, False)
        FAIL: test_basic (test_function_base.TestAngle)
        FAILED (KNOWNFAIL=10, SKIP=42, failures=16)
        <nose.result.TextTestResult run=5226 errors=0 failures=16>

No new Slicer test failures are seen when running the tests manually on:

  • Mac OS X 10.6.8 (Release)
  • Ubuntu 14.04.3 (Debug)
  • Windows (Visual Studio 2013, Debug)

Fixes 0003159
Fixes 0003160

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24561 3bd1e089-480b-0410-8dfb-8563597acbee

mod - SuperBuild/External_NUMPY.cmake Diff File
mod - SuperBuild/NUMPY_patch.cmake Diff File
add - SuperBuild/NUMPY_patched_fcompiler_init.py Diff File
mod - SuperBuild/python_patch.cmake Diff File
mod - SuperBuild/python_patched_msvc9compiler.py Diff File