From e7331d3e78fe43800305f6652de95b92378e7ee8 Mon Sep 17 00:00:00 2001 From: Yuanmiao Gui Date: Fri, 23 Aug 2019 21:24:34 +0800 Subject: [PATCH] python-keras: Update to 2.2.5 --- .../0001-change-backend-to-theano.patch | 8 ++++--- mingw-w64-python-keras/PKGBUILD | 24 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/mingw-w64-python-keras/0001-change-backend-to-theano.patch b/mingw-w64-python-keras/0001-change-backend-to-theano.patch index 41bf122e82..d14d1ef025 100644 --- a/mingw-w64-python-keras/0001-change-backend-to-theano.patch +++ b/mingw-w64-python-keras/0001-change-backend-to-theano.patch @@ -1,6 +1,8 @@ ---- keras-2.2.4.orig/keras/backend/__init__.py 2019-01-21 14:13:39.446288200 +0800 -+++ keras-2.2.4/keras/backend/__init__.py 2019-01-21 14:14:43.204935000 +0800 -@@ -23,8 +23,8 @@ +diff --git a/keras/backend/load_backend.py b/keras/backend/load_backend.py +index 4942f613d..f7256b191 100644 +--- a/keras/backend/load_backend.py ++++ b/keras/backend/load_backend.py +@@ -23,8 +23,8 @@ else: _keras_base_dir = '/tmp' _keras_dir = os.path.join(_keras_base_dir, '.keras') diff --git a/mingw-w64-python-keras/PKGBUILD b/mingw-w64-python-keras/PKGBUILD index 7665709ca1..01a3f9c399 100644 --- a/mingw-w64-python-keras/PKGBUILD +++ b/mingw-w64-python-keras/PKGBUILD @@ -3,21 +3,21 @@ _realname=keras pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=2.2.4 +pkgver=2.2.5 pkgrel=1 pkgdesc="Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano. (mingw-w64)" arch=('any') url="http://keras.io/" license=('MIT') -_archive=${_realname}-${pkgver} -source=(${_archive}.tar.gz::https://github.com/keras-team/keras/archive/${pkgver}.tar.gz +makedepends=("patch" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +source=(${_realname}-${pkgver}.tar.gz::https://github.com/keras-team/keras/archive/${pkgver}.tar.gz 0001-change-backend-to-theano.patch) -sha256sums=('46F8E5BD66F778ABD8D5A62B3C3D749FBD41854176FCF0DF5258CF94C3FD1B28' - '13CEDF9FD8636A3AC472671B8F07D118F6708BDD63CE3F3614923C18B35E3D7D') +sha256sums=('149c281194976e2799bea423d192d8520606d5ddec5bf776d7dd30244f67d94f' + '2e53d3c474d0d797ef7c6faf3ecdc77dfe123fa43bd19a151caaf894baadb47e') _deps=('numpy' 'scipy' 'six' 'yaml' 'h5py' 'keras_applications' 'keras_preprocessing' 'theano') -makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools") # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -29,7 +29,7 @@ apply_patch_with_msg() { } prepare() { - cd "${srcdir}/${_archive}" + cd "${srcdir}/${_realname}-${pkgver}" apply_patch_with_msg \ 0001-change-backend-to-theano.patch } @@ -38,9 +38,9 @@ build() { cd "${srcdir}" rm -rf python{2,3}-build for builddir in python{2,3}-build; do - cp -r ${_archive} ${builddir} + cp -r ${_realname}-${pkgver} ${builddir} pushd $builddir - ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build + ${MINGW_PREFIX}/bin/${builddir%-build} setup.py --quiet build popd done } @@ -50,7 +50,7 @@ package_python3-keras() { cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py --quiet install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" } @@ -60,7 +60,7 @@ package_python2-keras() { cd "${srcdir}/python2-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + ${MINGW_PREFIX}/bin/python2 setup.py --quiet install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" }