Date: Monday, April 10, 2023 @ 14:23:21
Author: felixonmars
Revision: 1444440
upgpkg: python-alt-pytest-asyncio 0.6.0-2: rebuild with python 3.11
Modified:
python-alt-pytest-asyncio/trunk/PKGBUILD
----------+
PKGBUILD | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2023-04-10 14:11:25 UTC (rev 1444439)
+++ PKGBUILD 2023-04-10 14:23:21 UTC (rev 1444440)
@@ -2,7 +2,7 @@
pkgname=python-alt-pytest-asyncio
pkgver=0.6.0
-pkgrel=1
+pkgrel=2
pkgdesc='Alternative pytest plugin to pytest-asyncio'
arch=('any')
license=('MIT')
@@ -13,6 +13,12 @@
source=("https://github.com/delfick/alt-pytest-asyncio/archive/release-$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('1e93fd6a14bdff4f9ec3efa2300093cf235d911d47c198b52ebf3038ddde738e5f4083909c815438b3b9a7eefc301fe0d6acf56d95ef0e7c9e68a3e61016e233')
+prepare() {
+ cd alt-pytest-asyncio-release-$pkgver
+ # https://github.com/delfick/alt-pytest-asyncio/issues/12
+ sed -i -e 's/from _pytest.pytester import Testdir as TD, LineMatcher/from
_pytest.legacypath import Testdir as TD\nfrom _pytest.pytester import
LineMatcher, MonkeyPatch/' -e 's/TD(request, factory)/TD(request, factory,
MonkeyPatch())/' tests/test_examples.py
+}
+
build() {
cd alt-pytest-asyncio-release-$pkgver
python setup.py build
@@ -23,9 +29,8 @@
cd alt-pytest-asyncio-release-$pkgver
python setup.py install --root="$PWD/tmp_install" --optimize=1
- # https://github.com/delfick/alt-pytest-asyncio/issues/5
local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
- PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH" pytest
+ PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH" pytest --deselect
tests/test_examples.py
}
package() {