Date: Tuesday, April 11, 2023 @ 19:20:50
  Author: dvzrv
Revision: 1444751

upgpkg: python-pytest-socket 0.6.0-3: Rebuild against Python 3.11.

Disable broken test: https://github.com/miketheman/pytest-socket/issues/161
Use bash arrays with one entry per line for better handling.
Remove unnecessary quotes and curly braces.

Modified:
  python-pytest-socket/trunk/PKGBUILD

----------+
 PKGBUILD |   44 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 33 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-11 19:12:08 UTC (rev 1444750)
+++ PKGBUILD    2023-04-11 19:20:50 UTC (rev 1444751)
@@ -1,19 +1,36 @@
-# Maintainer: Felix Yan <[email protected]>
+# Maintainer:
+# Contributor: Felix Yan <[email protected]>
 
 _name=pytest-socket
 pkgname=python-pytest-socket
 pkgver=0.6.0
-pkgrel=2
+pkgrel=3
 pkgdesc='Pytest Plugin to disable socket calls during tests'
-arch=('any')
-license=('MIT')
-url='https://github.com/miketheman/pytest-socket'
-depends=('python-pytest')
-makedepends=('python-build' 'python-installer' 'python-poetry-core' 
'python-wheel')
-checkdepends=('python-asynctest' 'python-pytest-cov' 'python-pytest-flake8' 
'python-pytest-httpbin'
-              'python-httpx' 'python-requests' 'python-starlette')
-source=("https://github.com/miketheman/pytest-socket/archive/$pkgver/$pkgname-$pkgver.tar.gz";)
+arch=(any)
+license=(MIT)
+url="https://github.com/miketheman/pytest-socket";
+depends=(
+  python
+  python-pytest
+)
+makedepends=(
+  python-build
+  python-installer
+  python-poetry-core
+  python-wheel
+)
+checkdepends=(
+  python-asynctest
+  python-httpx
+  python-pytest-cov
+  python-pytest-flake8
+  python-pytest-httpbin
+  python-requests
+  python-starlette
+)
+source=($url/archive/$pkgver/$pkgname-$pkgver.tar.gz)
 
sha512sums=('b70ab9fe3c41a707f16b6ae23d45e07238d03a731b3f99b794a6707303cd0301b75360ea164b7de48e9f2d56b5544e2da39373ba14a3b0fc20ef03afce03ab03')
+b2sums=('640ce9d047ee422221ac4b707aa8a36b1c9dbeb4e8f9dc138270cbe9e5e04ece849b7308e092c1a6fc67c0c92a48f99aea41db535ad45d87ee87d18e0b6c9607')
 
 build() {
   cd $_name-$pkgver
@@ -21,6 +38,11 @@
 }
 
 check() {
+  local pytest_options=(
+    -vv
+    # https://github.com/miketheman/pytest-socket/issues/161
+    --deselect tests/test_async.py::test_asynctest
+  )
   local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
 
   cd $_name-$pkgver
@@ -27,7 +49,7 @@
   # install to temporary location, as importlib is used
   python -m installer --destdir=test_dir dist/*.whl
   export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
-  pytest -vv
+  pytest "${pytest_options[@]}"
 }
 
 package() {

Reply via email to