diff --git a/python-tidylib/PKGBUILD b/python-tidylib/PKGBUILD new file mode 100644 index 0000000..389a224 --- /dev/null +++ b/python-tidylib/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: George Rawlinson + +pkgname=python-tidylib +pkgver=0.3.2 +pkgrel=1 +pkgdesc='Python wrapper around tidyhtml parser/cleaner' +arch=('any') +url='https://countergram.github.io/pytidylib/' +license=('MIT') +depends=('python' 'tidyhtml') +makedepends=('git' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel') +_commit='25bc4713f4fe42bccbd61fb8454ae5b4814063b6' +source=("$pkgname::git+https://github.com/countergram/pytidylib#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" + + python -m unittest discover +} + +package() { + cd "$pkgname" + + python -m installer --destdir="$pkgdir" dist/*.whl + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE +}