Date: Tuesday, February 21, 2023 @ 09:32:27 Author: alerque Revision: 1403210
upgpkg: python-qrcode 7.4.2-1; switch to PEP517 build and new upstream dep situation Modified: python-qrcode/trunk/PKGBUILD ----------+ PKGBUILD | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-02-21 09:09:21 UTC (rev 1403209) +++ PKGBUILD 2023-02-21 09:32:27 UTC (rev 1403210) @@ -1,46 +1,37 @@ # Maintainer: Felix Yan <[email protected]> # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> # Maintainer: Caleb Maclennan <[email protected]> -# Contributor Maintainer: Timothy Redaelli <[email protected]> +# Contributor: Timothy Redaelli <[email protected]> # Contributor: Francois Boulogne <fboulogne at april dot org> -# Dependency on pillow is technically optional, but if not available some -# functionality will expect to find unlisted dependency pymaging instead; -# see upstream issue: https://github.com/lincolnloop/python-qrcode/issues/223 - pkgname=python-qrcode -pkgver=7.3.1 +_pkgname=${pkgname#python-} +pkgver=7.4.2 pkgrel=1 pkgdesc='Python library to generate QR codes' arch=('any') url='https://github.com/lincolnloop/python-qrcode' license=('BSD') -depends=('python' 'python-pillow') -makedepends=('python-setuptools') +depends=('python' 'python-pypng') +optdepends=('python-pillow: faster but not python native backend') +makedepends=('python-'{build,installer,wheel} 'python-setuptools') checkdepends=('python-pytest') -source=($url/archive/v$pkgver/$pkgname-$pkgver.tar.gz) -sha512sums=('e08498e73281d850c2cf64b3371b669605dc523420180b48c4bfc5a464f6184fc36f78741358699c450937066514f21ae0e76b0b3bbbcb40a0dedf116b31838d') +_archive="$_pkgname-$pkgver" +source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_archive.tar.gz") +sha512sums=('a8642845990341034e39c43ef674f5b4ce8d3175a44d6062f711af2c24ffd45bda5f3ecf8a7825b7ebafe734b6396d52a37bb59177c544f921e43eaa9f1f5405') -prepare() { - cd $pkgname-$pkgver - sed -i \ - -e '/pkg_resources/d' \ - -e "/version =/s/get_distribution('qrcode').version/'$pkgver'/" \ - qrcode/console_scripts.py -} - build() { - cd $pkgname-$pkgver - python setup.py build + cd "$_archive" + python -m build -wn } check() { - cd $pkgname-$pkgver + cd "$_archive" pytest } package() { - cd $pkgname-$pkgver - python setup.py install --root="$pkgdir" --optimize=1 --skip-build - install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname + cd "$_archive" + python -m installer -d "$pkgdir" dist/*.whl + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE }
