git » python-pycryptodome.git » commit e564a24

Don't hardcode PYTHONPATH to 3.11

author Jelle van der Waa
2024-03-02 13:40:28 UTC
committer Jelle van der Waa
2024-03-02 13:40:28 UTC
parent 6df870c461ebd3bb2ab6fd4f3debb5703c258b36

Don't hardcode PYTHONPATH to 3.11

PKGBUILD +2 -1

diff --git a/PKGBUILD b/PKGBUILD
index ee60277..4def178 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -29,7 +29,8 @@ check() {
   cd pycryptodome-$pkgver
   python -m installer -d tmpinstall dist/*.whl
   python -m installer -d tmpinstall test_vectors/dist/*.whl
-  PYTHONPATH="$PWD/tmpinstall/usr/lib/python3.11/site-packages" python -m Crypto.SelfTest
+  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+  PYTHONPATH="$PWD/tmpinstall/usr/lib/python${python_version}/site-packages" python -m Crypto.SelfTest
 }
 
 package() {