From 457ac0064ee941b230c88c69d71f6a126c34f9f5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 15:45:57 +0000 Subject: import numpy-1.7.1-11.el7 --- diff --git a/SOURCES/numpy-1.8.1.ppc64le.patch b/SOURCES/numpy-1.8.1.ppc64le.patch new file mode 100644 index 0000000..8cc266e --- /dev/null +++ b/SOURCES/numpy-1.8.1.ppc64le.patch @@ -0,0 +1,134 @@ +--- + numpy/core/include/numpy/npy_cpu.h | 3 +++ + numpy/core/include/numpy/npy_endian.h | 3 ++- + numpy/core/setup.py | 2 +- + numpy/core/setup_common.py | 4 ++++ + numpy/core/src/npymath/ieee754.c.src | 3 ++- + numpy/core/src/npymath/npy_math_private.h | 3 ++- + numpy/core/src/private/npy_fpmath.h | 5 ++++- + 7 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h +index 9707a7a..321cc04 100644 +--- a/numpy/core/include/numpy/npy_cpu.h ++++ b/numpy/core/include/numpy/npy_cpu.h +@@ -5,6 +5,7 @@ + * NPY_CPU_AMD64 + * NPY_CPU_PPC + * NPY_CPU_PPC64 ++ * NPY_CPU_PPC64LE + * NPY_CPU_SPARC + * NPY_CPU_S390 + * NPY_CPU_IA64 +@@ -41,6 +42,8 @@ + * _ARCH_PPC is used by at least gcc on AIX + */ + #define NPY_CPU_PPC ++#elif defined(__ppc64le__) ++ #define NPY_CPU_PPC64LE + #elif defined(__ppc64__) + #define NPY_CPU_PPC64 + #elif defined(__sparc__) || defined(__sparc) +diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h +index 4e3349f..d8af8b3 100644 +--- a/numpy/core/include/numpy/npy_endian.h ++++ b/numpy/core/include/numpy/npy_endian.h +@@ -27,7 +27,8 @@ + || defined(NPY_CPU_ARMEL) \ + || defined(NPY_CPU_AARCH64) \ + || defined(NPY_CPU_SH_LE) \ +- || defined(NPY_CPU_MIPSEL) ++ || defined(NPY_CPU_MIPSEL) \ ++ || defined(NPY_CPU_PPC64LE) + #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN + #elif defined(NPY_CPU_PPC) \ + || defined(NPY_CPU_SPARC) \ +diff --git a/numpy/core/setup.py b/numpy/core/setup.py +index a1000ae..36cec26 100644 +--- a/numpy/core/setup.py ++++ b/numpy/core/setup.py +@@ -444,7 +444,7 @@ def configuration(parent_package='',top_path=None): + 'INTEL_EXTENDED_16_BYTES_LE', + 'IEEE_QUAD_LE', 'IEEE_QUAD_BE', + 'IEEE_DOUBLE_LE', 'IEEE_DOUBLE_BE', +- 'DOUBLE_DOUBLE_BE']: ++ 'DOUBLE_DOUBLE_BE', 'DOUBLE_DOUBLE_LE']: + moredefs.append(('HAVE_LDOUBLE_%s' % rep, 1)) + else: + raise ValueError("Unrecognized long double format: %s" % rep) +diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py +index 58876a8..3289afe 100644 +--- a/numpy/core/setup_common.py ++++ b/numpy/core/setup_common.py +@@ -221,6 +221,8 @@ _IEEE_QUAD_PREC_BE = ['300', '031', '326', '363', '105', '100', '000', '000', + _IEEE_QUAD_PREC_LE = _IEEE_QUAD_PREC_BE[::-1] + _DOUBLE_DOUBLE_BE = ['301', '235', '157', '064', '124', '000', '000', '000'] + \ + ['000'] * 8 ++_DOUBLE_DOUBLE_LE = ['000', '000', '000', '124', '064', '157', '235', '301'] + \ ++ ['000'] * 8 + + def long_double_representation(lines): + """Given a binary dump as given by GNU od -b, look for long double +@@ -258,6 +260,8 @@ def long_double_representation(lines): + return 'IEEE_QUAD_LE' + elif read[8:-8] == _DOUBLE_DOUBLE_BE: + return 'DOUBLE_DOUBLE_BE' ++ elif read[8:-8] == _DOUBLE_DOUBLE_LE: ++ return 'DOUBLE_DOUBLE_LE' + elif read[:16] == _BEFORE_SEQ: + if read[16:-8] == _IEEE_DOUBLE_LE: + return 'IEEE_DOUBLE_LE' +diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src +index 90bbf5f..bccb3c8 100644 +--- a/numpy/core/src/npymath/ieee754.c.src ++++ b/numpy/core/src/npymath/ieee754.c.src +@@ -133,7 +133,8 @@ float _nextf(float x, int p) + return x; + } + +-#ifdef HAVE_LDOUBLE_DOUBLE_DOUBLE_BE ++#if defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_BE) || \ ++ defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_LE) + + /* + * FIXME: this is ugly and untested. The asm part only works with gcc, and we +diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h +index 722d03f..b0ede48 100644 +--- a/numpy/core/src/npymath/npy_math_private.h ++++ b/numpy/core/src/npymath/npy_math_private.h +@@ -398,7 +398,8 @@ do { \ + typedef npy_uint32 ldouble_sign_t; + #endif + +-#ifndef HAVE_LDOUBLE_DOUBLE_DOUBLE_BE ++#if !defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_BE) && \ ++ !defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_LE) + /* Get the sign bit of x. x should be of type IEEEl2bitsrep */ + #define GET_LDOUBLE_SIGN(x) \ + (((x).a[LDBL_SIGN_INDEX] & LDBL_SIGN_MASK) >> LDBL_SIGN_SHIFT) +diff --git a/numpy/core/src/private/npy_fpmath.h b/numpy/core/src/private/npy_fpmath.h +index 92338e4..f709d39 100644 +--- a/numpy/core/src/private/npy_fpmath.h ++++ b/numpy/core/src/private/npy_fpmath.h +@@ -29,6 +29,8 @@ + #define HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE + #elif defined(NPY_CPU_PPC) || defined(NPY_CPU_PPC64) + #define HAVE_LDOUBLE_IEEE_DOUBLE_16_BYTES_BE ++ #elif defined(NPY_CPU_PPC64LE) ++ #define HAVE_LDOUBLE_IEEE_DOUBLE_16_BYTES_LE + #endif + #endif + #endif +@@ -40,7 +42,8 @@ + defined(HAVE_LDOUBLE_IEEE_DOUBLE_16_BYTES_BE) || \ + defined(HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE) || \ + defined(HAVE_LDOUBLE_INTEL_EXTENDED_12_BYTES_LE) || \ +- defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_BE)) ++ defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_BE) || \ ++ defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_LE)) + #error No long double representation defined + #endif + +-- +1.9.3 + diff --git a/SPECS/numpy.spec b/SPECS/numpy.spec index 532c8b4..3e89086 100644 --- a/SPECS/numpy.spec +++ b/SPECS/numpy.spec @@ -6,7 +6,7 @@ Name: numpy Version: 1.7.1 -Release: 10%{?dist} +Release: 11%{?dist} Epoch: 1 Summary: A fast multidimensional array facility for Python @@ -22,6 +22,8 @@ Source0: http://downloads.sourceforge.net/numpy/%{name}-%{version}%{?relc # - 524b9eaa33ec67e34eb31a208e02bb934f778096 # - 0bb46c1448b0d3f5453d5182a17ea7ac5854ee15 Patch0: CVE-2014-1858-CVE-2014-1859.patch +# bz1125621 +Patch1: numpy-1.8.1.ppc64le.patch BuildRequires: python2-devel lapack-devel python-setuptools gcc-gfortran atlas-devel python-nose Requires: python-nose @@ -89,6 +91,10 @@ This package includes a version of f2py that works properly with NumPy. %setup -q -n %{name}-%{version}%{?relc} %patch0 -p1 +%ifarch ppc64le +%patch1 -p1 +%endif + # workaround for rhbz#849713 # http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063530.html rm numpy/distutils/command/__init__.py && touch numpy/distutils/command/__init__.py @@ -260,6 +266,10 @@ popd &> /dev/null %changelog +* Thu Aug 07 2014 jchaloup - 1:1.7.1-11 +- resolves: #1125621 + support for ppc64le, taken from private-rhel-7.0-ppc64le branch + * Tue Mar 18 2014 Tomas Tomecek - 1:1.7.1-10 - fix changelog entry below