Rename python3 packages to python and update to latest. Round 1

This commit is contained in:
Alexey Pavlov
2019-12-25 14:35:12 +03:00
parent 7fbfc331f9
commit 08a0fc40a0
116 changed files with 1816 additions and 1499 deletions

View File

@@ -4,20 +4,23 @@
_realname=numpy
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=1.17.4
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.18.0
pkgrel=1
pkgdesc="Scientific tools for Python (mingw-w64)"
arch=('any')
license=('BSD')
url="https://www.numpy.org/"
makedepends=("${MINGW_PACKAGE_PREFIX}-openblas"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-python3-pytest"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-pytest"
"${MINGW_PACKAGE_PREFIX}-gcc-fortran")
depends=("${MINGW_PACKAGE_PREFIX}-openblas"
"${MINGW_PACKAGE_PREFIX}-python3")
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest: testsuite")
"${MINGW_PACKAGE_PREFIX}-python")
optdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest: testsuite")
#options=('!strip' 'debug')
source=(https://github.com/numpy/numpy/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz
0001-detect-mingw-environment.patch
@@ -30,7 +33,7 @@ source=(https://github.com/numpy/numpy/releases/download/v${pkgver}/${_realname}
0008-mingw-gcc-doesnt-support-visibility.patch
0009-disable-old-mingw-stuff.patch
0010-mingw-inline-stuff.patch)
sha256sums=('fb0415475e673cb9a6dd816df999e0ab9f86fa3af2b1770944e7288d2bea4ac9'
sha256sums=('e5eaf340489b76eef91352bf48b36e92ace07f6b0f1c87dcd3b5dbada97df03a'
'173e9020eb88a9b281180024ad0f137f86f893e2099693693e42a5bf5944381a'
'140c23c214cae880833380e8479e4ce45c8439b22b1432d73ff0cc2cd58da886'
'3b640625b56b158465d6628f75fadce90af8825259d04af1b1af09fef53a720c'
@@ -58,7 +61,7 @@ prepare() {
patch -Np1 -i ${srcdir}/0010-mingw-inline-stuff.patch
cd ..
cp -a ${_realname}-${pkgver} ${_realname}-py3-${CARCH}
cp -a ${_realname}-${pkgver} ${_realname}-py-${CARCH}
}
build() {
@@ -67,25 +70,24 @@ build() {
# See: https://sourceforge.net/p/mingw-w64/mailman/message/36287627/
export CFLAGS="$CFLAGS -fno-asynchronous-unwind-tables"
cd ${_realname}-py3-${CARCH}
cd ${_realname}-py-${CARCH}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py config_fc --fcompiler=gnu95 build
${MINGW_PREFIX}/bin/python setup.py config_fc --fcompiler=gnu95 build
}
package() {
_pyver=$(${MINGW_PREFIX}/bin/python3 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))")
_pyinc=${_pyver}m
_pyver=$(${MINGW_PREFIX}/bin/python -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))")
_pyinc=${_pyver}
export ATLAS=None
export LDFLAGS="$LDFLAGS -shared"
export CFLAGS="$CFLAGS -fno-asynchronous-unwind-tables"
cd ${_realname}-py3-${CARCH}
cd ${_realname}-py-${CARCH}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py config_fc --fcompiler=gnu95 install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1
${MINGW_PREFIX}/bin/python setup.py config_fc --fcompiler=gnu95 install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}"
install -m644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/"
install -Dm644 LICENSE.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt
install -m755 -d "${pkgdir}${MINGW_PREFIX}/include/python${_pyinc}"
cp -rf ${pkgdir}${MINGW_PREFIX}/lib/python${_pyver}/site-packages/${_realname}/core/include/${_realname} "${pkgdir}${MINGW_PREFIX}/include/python${_pyinc}/"