--- PKGBUILD 2023-04-15 18:38:40.402299795 +0200 +++ PKGBUILD 2023-04-15 21:58:21.898732006 +0200 @@ -10,11 +10,14 @@ pkgname=("powerline" "python-powerline" "powerline-common" "powerline-vim" "powerline-fonts") pkgdesc='Statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome, i3 and Qtile' pkgver=2.8.3 -pkgrel=2 +pkgrel=3 url="https://github.com/${_pkgname}/${_pkgname}" license=('MIT') arch=('x86_64') makedepends=( + 'python-build' + 'python-installer' + 'python-wheel' 'python-setuptools' 'python-sphinx' 'git' @@ -25,9 +28,11 @@ ) source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/${pkgver}.tar.gz" "fail-on-binary-error.patch" + "logging_format_fix.patch" "https://github.com/powerline/powerline/commit/50d73bfb.patch") sha512sums=('fe0301d8a64827825ed5a1c9c91066299c198bc03d949e01241fa750d892a7f86029ab777ac991dfebf05d7a163a3fdd7cd44e2dea862562bc219c3566891455' 'd8f77a55d6056353e05556b283840e65bc0411890b5906deaf7f041843a17b08b6975ec399810e10d333384d840e66c1125f6851559e4806a850502c685a6621' + '83b80841e99c752131f6dd26d7a3909a6a0c7256987432413eb81e74274c02b50689ae8c4f4607371897f52f9dde9096a6cdc49e9b574691dd7ea49940f816a7' '506cce7894a5634f8365cf55c09fec3031ee58f7620730213a9032195482b3adae278402198920e6918851a8f34e451b19b3176d7cd29c31bf195214886f9fcd') @@ -42,6 +47,8 @@ patch -N <../fail-on-binary-error.patch # Fix build with python 3.11 patch -p1 -i ../50d73bfb.patch + # Fix tests: do not validate logging format + patch -p0 -i ../logging_format_fix.patch } build(){ @@ -51,14 +58,16 @@ # build C client cd "${srcdir}/${_pkgname}-${pkgver}" - LC_ALL=C python setup.py build + LC_ALL=C python -m build --wheel } -# FIXME Currently test will fail with dividers and other errors check(){ cd "${srcdir}/${_pkgname}-${pkgver}" - LC_ALL=C python setup.py test + for file in tests/test_python/test_*.py ; do + echo $file + PATH="$PWD:$PATH" PYTHONPATH="$PWD" python -m unittest "$file" + done } package_powerline(){ @@ -96,9 +105,9 @@ # install by redirect scripts and binaries cd "${srcdir}/${_pkgname}-${pkgver}" - python setup.py install --skip-build --root="${pkgdir}" --install-data=tmp --install-scripts=tmp --optimize=1 - # remove redirected scripts and binaries - rm -rf "${pkgdir}/tmp" + python -m installer --destdir="$pkgdir" dist/*.whl + # remove binaries + rm -rf "${pkgdir}/usr/bin" install -dm755 "${pkgdir}/usr/share/licenses/" ln -s "/usr/share/licenses/${_pkgname}" "${pkgdir}/usr/share/licenses/${pkgname}"