[arch-commits] Commit in python-tpm2-pytss/trunk (PKGBUILD)

Jonas Witschel diabonas at gemini.archlinux.org
Wed Apr 27 19:56:40 UTC 2022


    Date: Wednesday, April 27, 2022 @ 19:56:40
  Author: diabonas
Revision: 1191297

python-tpm2-pytss: improve pytest setup for compiled C extension

Instead of copying the generated files, --import-mode=append can be used in
combination with setting PYTHONPATH to the build directory, cf.
https://github.com/tpm2-software/tpm2-pytss/issues/341

Modified:
  python-tpm2-pytss/trunk/PKGBUILD

----------+
 PKGBUILD |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-27 19:54:17 UTC (rev 1191296)
+++ PKGBUILD	2022-04-27 19:56:40 UTC (rev 1191297)
@@ -28,9 +28,8 @@
 
 check() {
 	cd "${pkgname#python-}"
-	cp build/lib.*/tpm2_pytss/_libtpm2_pytss.abi3.so tpm2_pytss
-	cp build/lib.*/tpm2_pytss/internal/{type_mapping,versions}.py tpm2_pytss/internal
-	python -B -m pytest
+	local _python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+	PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_python_version" pytest --import-mode=append
 }
 
 package() {



More information about the arch-commits mailing list