Merge pull request #9568 from MehdiChinoune/numpy-update

numpy: update to 1.21.2
This commit is contained in:
Christoph Reiter
2021-09-12 14:18:58 +02:00
committed by GitHub
3 changed files with 46 additions and 32 deletions

View File

@@ -4,33 +4,33 @@
_realname=cython
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-cython")
pkgver=0.29.23
pkgrel=2
pkgver=0.29.24
pkgrel=1
pkgdesc="C-Extensions for Python (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://cython.org/"
license=('APACHE')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python-setuptools")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/cython/cython/archive/${pkgver}.tar.gz")
sha256sums=('b10e32255418203c612b22d3647de75eafad20d79c55123ca696c7dda32d7f98')
sha256sums=('a5efb97612f0f97164e87c54cc295b2e2d06c539487670079963adeab872de80')
prepare() {
cd "${srcdir}"
rm -rf python-build-${CARCH}| true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
sed -e "s|\/usr\/bin\/python|${MINGW_PREFIX}\/bin\/python|" -i python-build-${CARCH}/setup.py
rm -rf python-build-${MSYSTEM}| true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
sed -e "s|\/usr\/bin\/python|${MINGW_PREFIX}\/bin\/python|" -i python-build-${MSYSTEM}/setup.py
}
build() {
cd "${srcdir}/python-build-${CARCH}"
cd "${srcdir}/python-build-${MSYSTEM}"
DISTUTILS_DEBUG=1 \
${MINGW_PREFIX}/bin/python setup.py build
}
package() {
cd "${srcdir}/python-build-${CARCH}"
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
DISTUTILS_DEBUG=1 \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \

View File

@@ -32,7 +32,7 @@ index c72424a..8e7b0ff 100644
return (uint64_t)product;
}
#else
-#ifdef _WIN32
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__MINGW32__)
#include <intrin.h>
#if defined(_WIN64) && defined(_M_AMD64)

View File

@@ -8,8 +8,8 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=1.21.0
pkgrel=4
pkgver=1.21.2
pkgrel=1
pkgdesc="Scientific tools for Python (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
@@ -21,7 +21,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cython"
$( [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || \
echo "${MINGW_PACKAGE_PREFIX}-gcc-fortran"))
depends=("${MINGW_PACKAGE_PREFIX}-python"
$( [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || \
$( [[ ${MSYSTEM} == "CLANG32" ]] || \
echo "${MINGW_PACKAGE_PREFIX}-openblas"))
optdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest: testsuite")
#options=('!strip' 'debug')
@@ -38,7 +38,7 @@ source=(https://github.com/numpy/numpy/releases/download/v${pkgver}/${_realname}
0010-mingw-inline-stuff.patch
0011-dont-die-if-no-fcompiler.patch
0012-clang-no-gcc-workaround.patch)
sha256sums=('b662c841b29848c04d9134f31dbaa7d4c8e673f45bb3a5f28d02f49c424d558a'
sha256sums=('76af194fbc117934ec5bbe2ff15177adbd05aeed23f18ee209ed88edcd777e05'
'94f111ab238c4a82e8613ed14e4cbeb553eabff26523f576e5fcafdbfdc8ee29'
'3aacb1d92e7764c9f0f24afa1a97b136a069fcd81d63c9fa55565c40c5a29974'
'2679482ce9396b551e1e1e7674f373d139b3e8a2f9729026000dd3c581de41d7'
@@ -48,29 +48,43 @@ sha256sums=('b662c841b29848c04d9134f31dbaa7d4c8e673f45bb3a5f28d02f49c424d558a'
'cafc924fd11d8653a49970d0cce5b31869cce0e8996a3ae57bcbccca96bc8eb3'
'c7222c3cd85ff6af515514c5c3b8f3c02144c58c1373dec16683fa455504aa69'
'22ca44e7f5d01b2bcb805251f5964026e92c55400d4c17055e10268bdc93849e'
'ffa3eb1b65ffeb1aece369e2e3e56092013c0a0b64c67e6166cece622e526ff3'
'ae47d0c8adbae798ca1675ae9c0a35146bad00c6b5734f713cd76c01832e5436'
'87bdd0a47a8662bdb8acaca18452901ee1f42cf08b985443ffb214f7facfdb2d'
'86eceee1ec86934d416c52fe8197c09c644b9f27ab93454a849e065b1ddac12f')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd ${_realname}-${pkgver}
patch -Np1 -i ${srcdir}/0001-detect-mingw-environment.patch
patch -Np1 -i ${srcdir}/0002-fix-finding-python2.patch
patch -Np1 -i ${srcdir}/0003-gfortran-better-version-check.patch
patch -Np1 -i ${srcdir}/0004-fix-testsuite.patch
# Note, -mincoming-stack-boundary (and the other flags set) doesn't get used except
# in a test compilation, AFAICT.
patch -Np1 -i ${srcdir}/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch
patch -Np1 -i ${srcdir}/0006-disable-visualcompaq-for-mingw.patch
patch -Np1 -i ${srcdir}/0007-disable-64bit-experimental-warning.patch
patch -Np1 -i ${srcdir}/0008-mingw-gcc-doesnt-support-visibility.patch
patch -Np1 -i ${srcdir}/0009-disable-old-mingw-stuff.patch
patch -Np1 -i ${srcdir}/0010-mingw-inline-stuff.patch
patch -Np1 -i ${srcdir}/0011-dont-die-if-no-fcompiler.patch
patch -Np1 -i ${srcdir}/0012-clang-no-gcc-workaround.patch
apply_patch_with_msg \
0001-detect-mingw-environment.patch \
0002-fix-finding-python2.patch \
0003-gfortran-better-version-check.patch \
0004-fix-testsuite.patch \
0006-disable-visualcompaq-for-mingw.patch \
0007-disable-64bit-experimental-warning.patch \
0008-mingw-gcc-doesnt-support-visibility.patch \
0009-disable-old-mingw-stuff.patch \
0010-mingw-inline-stuff.patch \
0011-dont-die-if-no-fcompiler.patch \
0012-clang-no-gcc-workaround.patch
apply_patch_with_msg \
0005-mincoming-stack-boundary-32bit-optimized-64bit.patch
# Note, -mincoming-stack-boundary (and the other flags set) doesn't get used except
# in a test compilation, AFAICT.
cd ..
cp -a ${_realname}-${pkgver} ${_realname}-py-${CARCH}
cp -a ${_realname}-${pkgver} ${_realname}-py-${MSYSTEM}
}
build() {
@@ -84,7 +98,7 @@ build() {
_fortran_config="config_fc --fcompiler=gnu95"
fi
cd ${_realname}-py-${CARCH}
cd ${_realname}-py-${MSYSTEM}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py ${_fortran_config} build
}
@@ -102,7 +116,7 @@ package() {
_fortran_config="config_fc --fcompiler=gnu95"
fi
cd ${_realname}-py-${CARCH}
cd ${_realname}-py-${MSYSTEM}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py ${_fortran_config} install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1