Date: Friday, September 23, 2022 @ 08:47:45 Author: grawlinson Revision: 1309140
addpkg: python-babelfish 0.6.0-2 Added: python-babelfish/ python-babelfish/repos/ python-babelfish/trunk/ python-babelfish/trunk/PKGBUILD ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Added: python-babelfish/trunk/PKGBUILD =================================================================== --- python-babelfish/trunk/PKGBUILD (rev 0) +++ python-babelfish/trunk/PKGBUILD 2022-09-23 08:47:45 UTC (rev 1309140) @@ -0,0 +1,42 @@ +# Maintainer: George Rawlinson <[email protected]> + +pkgname=python-babelfish +pkgver=0.6.0 +pkgrel=2 +pkgdesc='A Python module to work with countries & languages' +arch=('any') +url='https://github.com/Diaoul/babelfish' +license=('BSD') +depends=('python' 'python-setuptools') +makedepends=('git' 'python-build' 'python-installer' 'python-poetry-core') +checkdepends=('python-pytest') +_commit='62ee6f572585ed4d0d1cde51374aa7afdfe8aed2' +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:$PYTHONPATH" pytest +} + +package() { + cd "$pkgname" + + python -m installer --destdir="$pkgdir" dist/*.whl + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE +}
