Date: Monday, April 17, 2023 @ 10:48:32
  Author: dvzrv
Revision: 1446689

upgpkg: rst2pdf 0.100-3: Rebuild against Python 3.11.

Simplify check() by using fewer variables and abstracting pytest options away.

Modified:
  rst2pdf/trunk/PKGBUILD

----------+
 PKGBUILD |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-17 10:46:50 UTC (rev 1446688)
+++ PKGBUILD    2023-04-17 10:48:32 UTC (rev 1446689)
@@ -2,7 +2,7 @@
 
 pkgname=rst2pdf
 pkgver=0.100
-pkgrel=2
+pkgrel=3
 pkgdesc="Use a text editor. Make a PDF"
 arch=(any)
 url="https://github.com/rst2pdf/rst2pdf";
@@ -57,17 +57,19 @@
 }
 
 check() {
-  local _site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
-  local _test_dir="test_dir"
+  local pytest_options=(
+    -vv
+    # https://github.com/rst2pdf/rst2pdf/issues/1067
+    --deselect tests/input/test_raw_html.rst::test_raw_html
+  )
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
 
   cd $pkgname-$pkgver
-  mkdir -vp $_test_dir
-  python -m installer --destdir="$_test_dir" dist/*.whl
+  python -m installer --destdir="test_dir" dist/*.whl
 
-  export PYTHONPATH="$PWD/$_test_dir/$_site_packages:$PYTHONPATH"
-  export PATH="$PWD/$_test_dir/usr/bin:$PATH"
-  # NOTE: disable all broken tests: 
https://github.com/rst2pdf/rst2pdf/issues/1067
-  pytest -v --deselect tests/input/test_raw_html.rst::test_raw_html
+  export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
+  export PATH="$PWD/test_dir/usr/bin:$PATH"
+  pytest "${pytest_options[@]}"
 }
 
 package() {

Reply via email to