Date: Tuesday, November 22, 2022 @ 22:09:52
  Author: kgizdov
Revision: 1351901

upgpkg: python-xxhash 3.1.0-2: stop using python setup.py test

Modified:
  python-xxhash/trunk/PKGBUILD

----------+
 PKGBUILD |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-11-22 22:08:18 UTC (rev 1351900)
+++ PKGBUILD    2022-11-22 22:09:52 UTC (rev 1351901)
@@ -3,7 +3,7 @@
 _pyname=xxhash
 pkgname="python-${_pyname}"
 pkgver=3.1.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Python binding for xxHash'
 arch=('x86_64')
 url="https://github.com/ifduyue/${pkgname}";
@@ -25,7 +25,12 @@
 
 check() {
     cd "${srcdir}/${pkgname}"
-    python setup.py test
+    # name clash is preventing import, rename source temporarily
+    # don't forget to rename back after running tests
+    mv xxhash _noxxhash
+    local python_version=$(python -c 'import sys; print("".join(map(str, 
sys.version_info[:2])))')
+    PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-${python_version}" python 
-m unittest discover -vs tests
+    mv _noxxhash xxhash
 }
 
 package() {

Reply via email to