Files
MINGW-packages/mingw-w64-python-pystemmer/PKGBUILD
Christoph Reiter 8519df2bf9 Move all reverse dependencies to cython0
Which is what they used up to now, so rebuilds don't break.
We can rebuild them against cython v3 later.
2023-10-22 19:52:17 +02:00

50 lines
1.7 KiB
Bash

# Maintainer: Andrew Sun <adsun701@gmail.com>
_pyname=PyStemmer
_realname=pystemmer
pkgbase=mingw-w64-python-${_realname}
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=2.2.0.1
pkgrel=2
pkgdesc="Snowball stemming algorithms, for information retrieval (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
msys2_references=(
'pypi: PyStemmer'
)
url="https://github.com/snowballstem/pystemmer/"
license=('MIT' 'BSD')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-cython0"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-libstemmer")
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('9f3b366f1ed06b49dc1868bf0aefd884423db80f3431be442d0f993e448cc67b')
prepare() {
cd "${srcdir}"/${_pyname}-${pkgver}
rm -rf "${srcdir}"/python-build-${MSYSTEM} | true
cp -r "${srcdir}"/"${_pyname}-${pkgver}" "${srcdir}"/"python-build-${MSYSTEM}"
}
build() {
cd "${srcdir}/python-build-${MSYSTEM}"
PYSTEMMER_SYSTEM_LIBSTEMMER=1 ${MINGW_PREFIX}/bin/python setup.py build
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
PYSTEMMER_SYSTEM_LIBSTEMMER=1 \
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -D -m644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}