Merge pull request #7833 from kmilos/tifffile_install

python-tifffile: update to 2021.2.1
This commit is contained in:
Christoph Reiter
2021-02-02 13:19:25 +01:00
committed by GitHub

View File

@@ -4,9 +4,9 @@
_realname=tifffile
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=2021.1.14
pkgver=2021.2.1
pkgrel=1
pkgdesc='Read and write image data from and to TIFF files (mingw-w64)'
pkgdesc="Read and write image data from and to TIFF files (mingw-w64)"
arch=('any')
url="https://github.com/cgohlke/tifffile"
license=('BSD-3-Clause')
@@ -15,11 +15,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
optdepends=("${MINGW_PACKAGE_PREFIX}-python-imagecodecs: required only for encoding or decoding LZW, JPEG, etc."
"${MINGW_PACKAGE_PREFIX}-python-matplotlib: required only for plotting"
"${MINGW_PACKAGE_PREFIX}-python-lxml: required only for validating and printing XML")
options=('staticlibs' 'strip' '!debug')
source=("https://files.pythonhosted.org/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('a5f8caaf672dab0dc8b2609b61d4fd23c6b6fe7e9df38750d4c872962a080ba9')
sha256sums=('6793787742e18cf2116bc65e17c51cd9c14cd27a4a6033a8ddd5bf801a637615')
prepare() {
cd "$srcdir"
cd "${srcdir}"
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
}
@@ -30,6 +32,12 @@ build() {
${MINGW_PREFIX}/bin/python setup.py build
}
check() {
msg "Python test for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py check --strict
}
package() {
cd "${srcdir}/python-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
@@ -41,7 +49,6 @@ package() {
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
# fix python command in files
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f}
sed -i 's/\#\!.*//' ${_f}
done
}