* update python-tblib to 1.7.0-7

This commit is contained in:
Alexander Baldeck 2024-05-10 12:08:41 +02:00
parent afe869c118
commit ad7dd80640

View File

@ -4,32 +4,38 @@
pkgname=python-tblib
_pyname=tblib
pkgver=1.7.0
pkgrel=6
pkgrel=7
pkgdesc='Python traceback fiddling library'
url='https://github.com/ionelmc/python-tblib'
arch=(any)
license=('BSD')
license=('BSD-2-Clause')
depends=('python-six')
makedepends=('python-setuptools' 'python-six')
source=(https://github.com/ionelmc/python-tblib/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-six' 'python-wheel')
checkdepends=('python-pytest' 'python-twisted')
source=("https://github.com/ionelmc/python-tblib/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('14745af9647262c4569ae578e2bd439b4fbc430735449bf3c4dbc99c6dd39706725ddbf5b6d6e078eee34f0ccb5d9a5f5143d133a2a0b171afa6975e21c30999')
b2sums=('edbd9e475304b6486072ef86147a65c0a8f540dc821a0f7e8babd72386276246b64d3d04f4fbb89edb34164965746e999694fba5d5b65f71b8ce3e8cfddb0add')
build() {
cd ${pkgbase}-${pkgver}
python setup.py build
cd ${pkgname}-${pkgver}
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd ${pkgbase}-${pkgver}
python setup.py test
cd ${pkgname}-${pkgver}
PYTHONPATH="$PWD/src" pytest
}
package() {
cd ${pkgbase}-${pkgver}
python setup.py install -O1 --root="${pkgdir}" --prefix=/usr --skip-build
cd ${pkgname}-${pkgver}
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s "${site_packages}/${_pyname}-${pkgver}.dist-info/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim: ts=2 sw=2 et: