author | George Rawlinson
<grawlinson@archlinux.org> 2022-05-07 07:00:03 UTC |
committer | George Rawlinson
<grawlinson@archlinux.org> 2022-05-07 07:00:03 UTC |
parent | f24000116451610d3f4e969ebe1c3625350fddbb |
PKGBUILD | +20 | -10 |
diff --git a/PKGBUILD b/PKGBUILD index bdefaec..9bcea0b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,30 +4,40 @@ # SPDX-License-Identifier: CC0-1.0 pkgname='python-boolean.py' -_name=${pkgname#python-} -pkgver=3.8 -pkgrel=5 +pkgver=4.0 +pkgrel=1 pkgdesc='Implements boolean algebra in one module' arch=('any') url='https://github.com/bastikr/boolean.py' license=('BSD') depends=('python') -makedepends=('python-setuptools') -source=("$pkgname-$pkgver.tar.gz::https://github.com/bastikr/boolean.py/archive/v$pkgver.tar.gz") -sha512sums=('d41ce9a05743342c116d68b88ea36be316ac9fc190a8451aca97b52fde60c58ec49d36d2dee071f83fb5f6ad49337da80bf9de1bf3d479b46386fd87e4cf2f14') +makedepends=('git' 'python-setuptools') +checkdepends=('python-pytest') +_commit='93589c505c256eead9757402e908fcfdc1bb5ec5' +source=("$pkgname::git+$url#commit=$_commit") +b2sums=('SKIP') + +pkgver() { + cd "$pkgname" + + git describe --tags | sed 's/^v//' +} build() { - cd "$_name-$pkgver" + cd "$pkgname" + python setup.py build } check() { - cd "$_name-$pkgver" - python3 -m unittest discover --verbose + cd "$pkgname" + + pytest } package() { - cd "$_name-$pkgver" + cd "$pkgname" + python setup.py install --root="$pkgdir" --optimize=1 --skip-build install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt