git » python-tornado.git » commit e59b041

Remove hardcoded python version strings

author Jelle van der Waa
2023-01-20 21:20:47 UTC
committer Jelle van der Waa
2023-01-20 21:20:47 UTC
parent 6552b3c5cfb6310b2a6e2677f67eb9d7d50cfee9

Remove hardcoded python version strings

PKGBUILD +2 -1

diff --git a/PKGBUILD b/PKGBUILD
index 6cfcf55..f2af801 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -29,7 +29,8 @@ check() {
   (
     cd tornado-$pkgver
     python setup.py install --root="$PWD/tmp_install" --optimize=1
-    export PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH"
+    local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+    export PYTHONPATH="$PWD/tmp_install/usr/lib/python${python_version}/site-packages:$PYTHONPATH"
     cd tmp_install
     python -m tornado.test.runtests
     python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop