Date: Wednesday, May 18, 2022 @ 14:08:18 Author: dvzrv Revision: 1208312
upgpkg: python-svglib 1.3.0-1: Upgrade to 1.3.0. Switch to github tarball as sdist tarball on pypi does not include all necessary files. https://github.com/deeplook/svglib/issues/341 Remove unneeded quotes and curly braces. Switch to PEP517. Modified: python-svglib/trunk/PKGBUILD ----------+ PKGBUILD | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-05-18 14:08:13 UTC (rev 1208311) +++ PKGBUILD 2022-05-18 14:08:18 UTC (rev 1208312) @@ -2,7 +2,7 @@ _name=svglib pkgname=python-svglib -pkgver=1.2.1 +pkgver=1.3.0 pkgrel=1 pkgdesc="Read SVG files and convert them to other formats" arch=(any) @@ -9,26 +9,28 @@ url="https://github.com/deeplook/svglib" license=(LGPL3) depends=(python-lxml python-reportlab python-tinycss2 python-cssselect2) -makedepends=(python-setuptools) +makedepends=(python-build python-installer python-setuptools python-wheel) checkdepends=(python-pillow python-pytest) -source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") -sha512sums=('64c73c31e878c7d3a0fe39306ad9c086f22e57dab93b31e22d6db12df69397b15a115eccdb0113331038d7aaefaea910fb80f8834cdda4c6f433a510b60d79f7') -b2sums=('ab57e97f0443179fa718427cec1b8d9abc12030a800a89c2dc3dc91235de652182c77431aee289c7ec200c048c06af17be01936b05b2441883c16295e7ac1cf0') +# sdist tarballs do not include all necessary files: https://github.com/deeplook/svglib/issues/341 +# source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz) +source=($_name-v$pkgver.tar.gz::https://github.com/deeplook/$_name/archive/refs/tags/v$pkgver.tar.gz) +sha512sums=('457fb69ba1c298079888f200502c7099cf5ee674857ff8682948011bf8e1544715e6196544212f5c0ddef1202d04f3f05d01edb4351e673ceae16a85ca0d66e5') +b2sums=('f53bda781479ddc5d4b04fd122b5141620db81756308973cb283957615711e62623baa74b69af954936be24970a4e4a6f026667c4069d62bf1705a839ecc52f3') build() { - cd "${_name}-$pkgver" - python setup.py build + cd $_name-$pkgver + python -m build --wheel --no-isolation } check() { - cd "${_name}-$pkgver" - export PYTHONPATH="build:${PYTHONPATH}" - # disable tests that download stuff and that are broken - pytest -v -k "not TestWikipediaSymbols and not TestWikipediaFlags and not test_png_in_svg and not test_external_svg_in_svg" + cd $_name-$pkgver + export PYTHONPATH="build:$PYTHONPATH" + # disable tests that need remote resources + pytest -vv -k "not TestWikipediaSymbols and not TestWikipediaFlags" } package() { - cd "${_name}-$pkgver" - python setup.py install --optimize=1 --root="${pkgdir}" - install -vDm 644 {CHANGELOG,CONTRIBUTORS,README}.rst -t "${pkgdir}/usr/share/doc/${pkgname}" + cd $_name-$pkgver + python -m installer --destdir="$pkgdir" dist/*.whl + install -vDm 644 {CHANGELOG,CONTRIBUTORS,README}.rst -t "$pkgdir/usr/share/doc/$pkgname/" }
