[arch-commits] Commit in python-pytest-testinfra/trunk (PKGBUILD)

David Runge dvzrv at gemini.archlinux.org
Wed Apr 13 14:33:36 UTC 2022


    Date: Wednesday, April 13, 2022 @ 14:33:35
  Author: dvzrv
Revision: 1186052

upgpkg: python-pytest-testinfra 6.7.0-1: Upgrade to 6.7.0.

Switch to PEP517.

Modified:
  python-pytest-testinfra/trunk/PKGBUILD

----------+
 PKGBUILD |   51 +++++++++++++++++++++++++++++----------------------
 1 file changed, 29 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-13 14:29:38 UTC (rev 1186051)
+++ PKGBUILD	2022-04-13 14:33:35 UTC (rev 1186052)
@@ -6,7 +6,7 @@
 
 _name=pytest-testinfra
 pkgname=python-pytest-testinfra
-pkgver=6.6.0
+pkgver=6.7.0
 pkgrel=1
 pkgdesc='Testinfra test your infrastructures'
 arch=(any)
@@ -13,38 +13,45 @@
 url="https://github.com/pytest-dev/pytest-testinfra"
 license=(Apache)
 depends=(python-pytest)
-makedepends=(python-setuptools-scm python-sphinx)
+makedepends=(python-build python-installer python-setuptools-scm python-sphinx python-wheel)
 checkdepends=(ansible python-mock python-paramiko python-pytest-cov
 python-pytest-xdist python-pywinrm python-tornado salt)
-optdepends=('ansible: for tests using ansible inventories'
-            'docker: for test running docker containers'
-            'kubectl: for test running containers in kubernetes'
-            'lxd: for test running LXC or LXD containers'
-            'podman: for test running podman containers'
-            'python-paramiko: for testing remote hosts'
-            'python-pywinrm: for testing on Windows hosts'
-            'salt: for tests using saltstack')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-sha512sums=('f78f1cd5240e157d4e2949178f29900a7b85a6065b4113b18273af3f1fef6b19c859192f59426b93eba48418bb89d163ad1d951e97d4fdfcea4394635a05140a')
-b2sums=('c7583685aeb770f76e4679730599909b8fff53d1909664f55e2d35f7f5a6a96741e3aa56b81da464c2d474d1d5f646892e36a4f9b6938327cb526476536b0b6c')
+optdepends=(
+  'ansible: for tests using ansible inventories'
+  'docker: for test running docker containers'
+  'kubectl: for test running containers in kubernetes'
+  'lxd: for test running LXC or LXD containers'
+  'podman: for test running podman containers'
+  'python-paramiko: for testing remote hosts'
+  'python-pywinrm: for testing on Windows hosts'
+  'salt: for tests using saltstack'
+)
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha512sums=('d11f30da0eae9f215173d3f84e6ba7965d926b8ef6c49619c2ccae3d3ff215f351b950eea019e6516a56de0aa7bc533658af978d827a3ad3d1c50e37902b6f91')
+b2sums=('08678f381392fe8a1fe335adc90ac6dc67c5bfa33c87f4e9d81b439eaabd29c393b8dc80cc79625784e76e5b0e264cdfc272cddb531acefbac9a8327be46f7be')
 
 build() {
-  cd "${_name}-${pkgver}"
-  python setup.py build
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
   make -C doc man
 }
 
 check() {
-  cd "${_name}-${pkgver}"
-  export PYTHONPATH="build:$PYTHONPATH"
-  pytest -v
+  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+
+  cd $_name-$pkgver
+
+  # install to temporary location
+  python -m installer --destdir="$_test_dir" dist/*.whl
+  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+  pytest -vv
 }
 
 package() {
-  cd "${_name}-${pkgver}"
-  python setup.py install --root="${pkgdir}" --optimize=1
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
   # man page
-  install -Dm 644 doc/build/man/*.1 -t "${pkgdir}/usr/share/man/man1/"
+  install -Dm 644 doc/build/man/*.1 -t "$pkgdir/usr/share/man/man1/"
   # docs
-  install -vDm 644 {CHANGELOG,CONTRIBUTING,README}.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -vDm 644 {CHANGELOG,CONTRIBUTING,README}.rst -t "$pkgdir/usr/share/doc/$pkgname/"
 }



More information about the arch-commits mailing list