[arch-commits] Commit in python-cerberus/trunk (PKGBUILD)
David Runge
dvzrv at gemini.archlinux.org
Sat Apr 16 20:04:40 UTC 2022
Date: Saturday, April 16, 2022 @ 20:04:40
Author: dvzrv
Revision: 1186729
upgpkg: python-cerberus 1.3.4-4: Rebuild to add python-setuptools to depends.
As cerberus uses pkg_resources it requires python-setuptools.
Switch to PEP517.
Simplify call to pytest and do not use legacy way via setup.py.
Modified:
python-cerberus/trunk/PKGBUILD
----------+
PKGBUILD | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-04-16 19:50:28 UTC (rev 1186728)
+++ PKGBUILD 2022-04-16 20:04:40 UTC (rev 1186729)
@@ -2,13 +2,13 @@
pkgname=python-cerberus
pkgver=1.3.4
-pkgrel=3
+pkgrel=4
pkgdesc="Lightweight, extensible schema and data validation tool for Python dictionaries"
url="https://github.com/pyeve/cerberus"
license=('ISC')
arch=('any')
-depends=('python')
-makedepends=('python-setuptools')
+depends=('python-setuptools')
+makedepends=('python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest-runner' 'python-pytest-benchmark')
source=("$pkgname-$pkgver.tar.gz::https://github.com/pyeve/cerberus/archive/$pkgver.tar.gz")
sha512sums=('c816b426ed1b32367d1e8f1c26d6ddd4b49c6578540e688baf693e3094a05800f645cfe879be6378c1e9be9899cad7bc2ad1ed9844d6762d2ef6e0cc54a7476a')
@@ -15,17 +15,19 @@
build() {
cd cerberus-$pkgver
- python setup.py build
+ python -m build --wheel --no-isolation
+ # NOTE: remove build dir as pytest otherwise chokes on duplicate imports
+ rm -frv build
}
check() {
cd cerberus-$pkgver
- python setup.py pytest --addopts cerberus
+ pytest -vv
}
package() {
cd cerberus-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
More information about the arch-commits
mailing list