From: Michael Tremer Date: Fri, 26 Jan 2024 18:38:55 +0000 (+0000) Subject: tests: Test the locally built binaries X-Git-Tag: 0.9.30~1242 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4d4eb96d21de7bee831fd339a75a77280f48034;p=pakfire.git tests: Test the locally built binaries Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index d064a6d20..9e4f33a46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1135,6 +1135,14 @@ TESTS_ENVIRONMENT = \ PAKFIRE_LOG=debug \ topdir="$(shell pwd)" +# Test the library we just built +TESTS_ENVIRONMENT += \ + LD_LIBRARY_PATH=$(top_srcdir)/.libs:$(LD_LIBRARY_PATH) + +# Test the Python modules we just built +TESTS_ENVIRONMENT += \ + PYTHONPATH=$(top_srcdir)/src:$(top_srcdir)/.libs:$(PYTHONPATH) + dist_check_SCRIPTS = \ tests/python/archive.py \ tests/python/ctx.py \ diff --git a/src/pakfire/__init__.py b/src/pakfire/__init__.py index d30bcd679..92264a729 100644 --- a/src/pakfire/__init__.py +++ b/src/pakfire/__init__.py @@ -23,4 +23,7 @@ from .__version__ import PAKFIRE_VERSION as __version__ # Import everything from the C module -from ._pakfire import * +try: + from ._pakfire import * +except ImportError: + from _pakfire import *