diff options
author | Luis Martinez | 2022-03-23 19:13:32 -0500 |
---|---|---|
committer | Luis Martinez | 2022-03-23 19:13:32 -0500 |
commit | f1855af84486e782cfd461909087185b8bba8ec5 (patch) | |
tree | ccf4fbe55f2af28b0be5373f700b81897cb30012 /PKGBUILD | |
parent | 6dd5ca64367e3c6e00630d16481b038947680224 (diff) | |
download | aur-python-tidylib.tar.gz |
update to 0.3.2
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 41 |
1 files changed, 31 insertions, 10 deletions
@@ -1,18 +1,39 @@ -# Maintainer: Alexander Minges <alexander.minges@gmail.com> +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> +# Contributor: Alexander Minges <alexander.minges@gmail.com> # Contributor: Antonio Lucas <antonioluccas@gmail.com> + pkgname=python-tidylib -_realname=pytidylib -pkgver=0.2.4 -pkgrel=2 +pkgver=0.3.2 +pkgrel=1 pkgdesc="Python bindings for Tidy HTML parser/cleaner." -arch=('i686' 'x86_64') -url="http://countergram.com/open-source/${_realname}" +arch=('any') +url="https://github.com/countergram/pytidylib" license=('MIT') depends=('tidyhtml' 'python') -source=("https://github.com/countergram/${_realname}/archive/$pkgver.tar.gz") -sha256sums=('5bdc5a6889742ae0a8be21166fe92c895b23dd4114db39bb23bffe66db3c9079') +makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel') +provides=('python-pytidylib') +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/pytidylib/pytidylib-$pkgver.tar.gz") +sha256sums=('22b1c8d75970d8064ff999c2369e98af1d0685417eda4c829a5c9f56764b0af3') + +build() { + cd "pytidylib-$pkgver" + ## dependency check fails due to slicing errors + python -m build --wheel --skip-dependency-check --no-isolation +} + +check() { + cd "pytidylib-$pkgver" + python -m unittest discover +} package() { - cd $startdir/src/$_realname-$pkgver - python setup.py install --root=$pkgdir --optimize=1 || return 1 + export PYTHONHASHSEED=0 + cd "pytidylib-$pkgver" + python -m installer --destdir="$pkgdir/" dist/*.whl + + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s \ + "$_site/pytidylib-$pkgver.dist-info/LICENSE" \ + "$pkgdir/usr/share/licenses/$pkgname/" } |