Date: Saturday, October 8, 2022 @ 21:34:12 Author: grawlinson Revision: 1324436
addpkg: python-isoduration 20.11.0-1 Added: python-isoduration/ python-isoduration/repos/ python-isoduration/trunk/ python-isoduration/trunk/PKGBUILD ----------+ PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) Added: python-isoduration/trunk/PKGBUILD =================================================================== --- python-isoduration/trunk/PKGBUILD (rev 0) +++ python-isoduration/trunk/PKGBUILD 2022-10-08 21:34:12 UTC (rev 1324436) @@ -0,0 +1,57 @@ +# Maintainer: George Rawlinson <[email protected]> + +pkgname=python-isoduration +_pkgname="${pkgname#python-}" +pkgver=20.11.0 +pkgrel=1 +pkgdesc='Operations with ISO 8601 durations' +arch=('any') +url='https://github.com/bolsote/isoduration' +license=('ISC') +depends=('python' 'python-arrow') +makedepends=( + 'git' + 'python-build' + 'python-installer' + 'python-wheel' + 'python-setuptools' +) +checkdepends=( + 'python-pytest' + 'python-pytest-benchmark' + 'python-isodate' + 'python-hypothesis' +) +_commit='f7316c5dad4d087d823795feaa401653906ac340' +source=("$pkgname::git+$url#commit=$_commit") +b2sums=('SKIP') + +pkgver() { + cd "$pkgname" + + git describe --tags | sed 's/^v//' +} + +build() { + cd "$pkgname" + + python -m build --wheel --no-isolation +} + +check() { + cd "$pkgname" + + PYTHONPATH="$PWD/src:$PYTHONPATH" pytest -v +} + +package() { + cd "$pkgname" + + python -m installer --destdir="$pkgdir" dist/*.whl + + # documentation + install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE +}
