From 6ce929ba91ac6edcfbf3f362d441a2c7c2646495 Mon Sep 17 00:00:00 2001 From: Alexpux Date: Fri, 29 Aug 2014 13:02:57 +0400 Subject: [PATCH] numpy: Update to 1.8.2 --- mingw-w64-python-numpy/PKGBUILD | 12 +++++---- .../fix-finding-python2.patch | 26 +++++++++++++++++++ .../gfortran-better-version-check.patch | 11 ++++++++ 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 mingw-w64-python-numpy/gfortran-better-version-check.patch diff --git a/mingw-w64-python-numpy/PKGBUILD b/mingw-w64-python-numpy/PKGBUILD index ad5a98174b..046da525e5 100644 --- a/mingw-w64-python-numpy/PKGBUILD +++ b/mingw-w64-python-numpy/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=numpy - pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.8.1 +pkgver=1.8.2 pkgrel=1 pkgdesc="Scientific tools for Python (mingw-w64)" arch=('any') @@ -19,13 +18,16 @@ makedepends=( ) options=('staticlibs') source=(http://downloads.sourceforge.net/numpy/${_realname}-${pkgver}.tar.gz - fix-finding-python2.patch) -md5sums=('be95babe263bfa3428363d6db5b64678' - '3b28e649316bcbc7fcc88a8c8498b817') + fix-finding-python2.patch + gfortran-better-version-check.patch) +md5sums=('dd8eece8f6fda3a13836de4adbafb0cb' + '1f9586ab1206193fd4058f2cf802c7df' + '556602e863965de01fea83edb3840310') prepare() { cd ${_realname}-$pkgver patch -Np1 -i ${srcdir}/fix-finding-python2.patch + patch -Np1 -i ${srcdir}/gfortran-better-version-check.patch cd .. cp -a numpy-$pkgver numpy-py2-$pkgver diff --git a/mingw-w64-python-numpy/fix-finding-python2.patch b/mingw-w64-python-numpy/fix-finding-python2.patch index 8e2c9350a5..fae3d433a2 100644 --- a/mingw-w64-python-numpy/fix-finding-python2.patch +++ b/mingw-w64-python-numpy/fix-finding-python2.patch @@ -25,6 +25,32 @@ #self.set_executables(compiler='gcc -mno-cygwin -O2 -w', --- numpy-py2-1.8.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:27:32.252800000 +0400 +++ numpy-1.8.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:31:29.804200000 +0400 +@@ -6,6 +6,7 @@ + import warnings + import platform + import tempfile ++from sysconfig import _POSIX_BUILD + from subprocess import Popen, PIPE, STDOUT + + from numpy.distutils.cpuinfo import cpu +@@ -86,7 +87,7 @@ + pic_flags = ['-fPIC'] + + # use -mno-cygwin for g77 when Python is not Cygwin-Python +- if sys.platform == 'win32': ++ if sys.platform == 'win32' and not _POSIX_BUILD: + for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']: + executables[key].append('-mno-cygwin') + +@@ -235,7 +236,7 @@ + pass + else: + # use -mno-cygwin flag for gfortran when Python is not Cygwin-Python +- if sys.platform == 'win32': ++ if sys.platform == 'win32' and not _POSIX_BUILD: + for key in ['version_cmd', 'compiler_f77', 'compiler_f90', + 'compiler_fix', 'linker_so', 'linker_exe']: + self.executables[key].append('-mno-cygwin') @@ -324,13 +324,6 @@ i = opt.index("gcc") opt.insert(i+1, "mingwex") diff --git a/mingw-w64-python-numpy/gfortran-better-version-check.patch b/mingw-w64-python-numpy/gfortran-better-version-check.patch new file mode 100644 index 0000000000..461d0f9903 --- /dev/null +++ b/mingw-w64-python-numpy/gfortran-better-version-check.patch @@ -0,0 +1,11 @@ +--- numpy-1.8.2/numpy/distutils/fcompiler/gnu.py.orig 2014-08-28 15:49:10.742000000 +0400 ++++ numpy-1.8.2/numpy/distutils/fcompiler/gnu.py 2014-08-28 15:50:44.903600000 +0400 +@@ -43,7 +43,7 @@ + m = re.search(r'GNU Fortran\s+95.*?([0-9-.]+)', version_string) + if m: + return ('gfortran', m.group(1)) +- m = re.search(r'GNU Fortran.*?\-?([0-9-.]+)', version_string) ++ m = re.search(r'GNU Fortran.*?\-?(\d*(?:\.\d+))', version_string) + if m: + v = m.group(1) + if v.startswith('0') or v.startswith('2') or v.startswith('3'):