blob: 1994ed387166365a02813ad3be692c7e84a3ceb3 [file] [log] [blame] [edit]
# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>
_realname=yarl
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.6.3
pkgrel=1
pkgdesc='Yet another URL library (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
url="https://github.com/aio-libs/yarl/"
license=('Apache')
depends=("${MINGW_PACKAGE_PREFIX}-python-idna" "${MINGW_PACKAGE_PREFIX}-python-multidict" "${MINGW_PACKAGE_PREFIX}-python-typing_extensions")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-cython")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-runner")
source=("https://github.com/aio-libs/yarl/archive/v${pkgver}/yarl-${pkgver}.tar.gz")
sha256sums=('0dd52e81a7079982c33a22098148f2f6973209823418e820f8d9e596d7bacca4')
prepare() {
cd "$srcdir"
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
}
build() {
msg "Python build for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
sed 's| .install-cython ||g' -i Makefile
make cythonize
LANG=en_US.UTF-8 ${MINGW_PREFIX}/bin/python setup.py build
}
check() {
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py test || warning "Tests failed"
}
package() {
cd "${srcdir}/python-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
LANG=en_US.UTF-8 ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}