[arch-commits] Commit in python-pytest/trunk (PKGBUILD)
Daniel M. Capella
polyzen at gemini.archlinux.org
Fri Sep 2 16:22:25 UTC 2022
Date: Friday, September 2, 2022 @ 16:22:24
Author: polyzen
Revision: 1290922
upgpkg: python-pytest 7.1.2-2 Use PEP 517
Modified:
python-pytest/trunk/PKGBUILD
----------+
PKGBUILD | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-09-02 15:59:41 UTC (rev 1290921)
+++ PKGBUILD 2022-09-02 16:22:24 UTC (rev 1290922)
@@ -4,7 +4,7 @@
pkgname=python-pytest
pkgver=7.1.2
-pkgrel=1
+pkgrel=2
pkgdesc="Simple powerful testing with Python"
arch=('any')
license=('MIT')
@@ -11,7 +11,7 @@
url="https://pytest.org/"
depends=('python-attrs' 'python-iniconfig' 'python-packaging' 'python-pluggy'
'python-py' 'python-tomli')
-makedepends=('python-setuptools')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-argcomplete' 'python-hypothesis' 'python-mock'
'python-nose' 'python-requests' 'python-xmlschema'
# Unlisted, but actually used. Check again after a while:
@@ -33,18 +33,23 @@
build() {
cd pytest-$pkgver
- python setup.py build
+ python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd pytest-$pkgver
python -m venv --system-site-packages test-env
- test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest
}
package() {
cd pytest-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1
- install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # Symlink license file
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s "$site_packages"/pytest-$pkgver.dist-info/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
More information about the arch-commits
mailing list