Files
MINGW-packages/mingw-w64-python-testpath/PKGBUILD
Christoph Reiter 31de6deb3b Remove template comment
the goal was to point to where to find the rigth test command, not
to have it in the PKGBUILD.

just remove it.. it's pytest in 99% of cases anyway.
2022-07-30 16:43:37 +02:00

50 lines
1.6 KiB
Bash

# Maintainer: Peter Budai <peterbudai@hotmail.com>
_realname=testpath
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=0.6.0
pkgrel=1
pkgdesc="Test utilities for code working with files and commands (mingw-w64)"
url="https://github.com/jupyter/testpath"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-flit-core")
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('2f1b97e6442c02681ebe01bd84f531028a7caea1af3825000f52345c30285e0f')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
rm testpath/cli*.exe
sed -i 's/shutil.copy(src, dst)/return/' testpath/commands.py
}
build() {
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m pytest
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}