diff options
author | Luis Martinez | 2022-06-26 12:43:53 -0500 |
---|---|---|
committer | Luis Martinez | 2022-06-26 12:43:53 -0500 |
commit | c3e59e5d10913626acbb7371ae826c4d8e6ee573 (patch) | |
tree | 9b430795c98afcb340eaa4624cb6761d1840e41d | |
parent | 92eb696a60da40fcab2dfb01bfa91ff65b5701e1 (diff) | |
download | aur-c3e59e5d10913626acbb7371ae826c4d8e6ee573.tar.gz |
package cleanup
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 27 |
2 files changed, 21 insertions, 15 deletions
@@ -1,15 +1,18 @@ pkgbase = python-tinyrecord pkgdesc = Atomic transactions for TinyDB pkgver = 0.2.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/eugene-eeo/tinyrecord arch = any license = MIT checkdepends = python-pytest + makedepends = python-build + makedepends = python-installer makedepends = python-setuptools + makedepends = python-wheel makedepends = git - depends = python-tinydb>=4.0.0 - source = python-tinyrecord-0.2.1::git+https://github.com/eugene-eeo/tinyrecord#commit=6affc1814314e067f266a65d9d7d21b2e978b23f?signed + depends = python-tinydb + source = python-tinyrecord::git+https://github.com/eugene-eeo/tinyrecord#commit=6affc18?signed validpgpkeys = BB354D48E3A3B416AC1242CB517D153BDE152D17 sha256sums = SKIP @@ -2,32 +2,35 @@ # Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com> pkgname=python-tinyrecord +_pkg="${pkgname#python-}" pkgver=0.2.1 -pkgrel=1 +pkgrel=2 pkgdesc="Atomic transactions for TinyDB" arch=('any') url="https://github.com/eugene-eeo/tinyrecord" license=('MIT') -depends=('python-tinydb>=4.0.0') -makedepends=('python-setuptools' 'git') +depends=('python-tinydb') +makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel' 'git') checkdepends=('python-pytest') -source=("$pkgname-$pkgver::git+$url#commit=6affc1814314e067f266a65d9d7d21b2e978b23f?signed") +source=("$pkgname::git+$url#commit=6affc18?signed") sha256sums=('SKIP') validpgpkeys=('BB354D48E3A3B416AC1242CB517D153BDE152D17') build() { - cd "$pkgname-$pkgver" - python setup.py build + cd "$pkgname" + python -m build --wheel --no-isolation } check() { - cd "$pkgname-$pkgver" - pytest tests.py + cd "$pkgname" + pytest -x tests.py } package() { - cd "$pkgname-$pkgver" - PYTHONHASHSEED=0 python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build - install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" - install -Dm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/" + cd "$pkgname" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl + install -Dm644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/" + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" } |