From 6c4ea468b2831a3fa377242b5c565ae9ce2adbf0 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Thu, 21 Sep 2023 21:31:52 +0200 Subject: [PATCH] python: Fix tests Revert part of commit 138213ac. --- python/tests/Makefile.am | 3 ++- python/tests/setup_test.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index 5cfcac45..c2270ce5 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -62,7 +62,8 @@ if WITH_PYTHON check-local: @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done @echo "## running Python regression tests" - @(export LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ + @(export PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \ + export LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ export DYLD_LIBRARY_PATH="$(top_builddir)/.libs:$$DYLD_LIBRARY_PATH" ; \ export PATH="$(top_builddir)/.libs:$$PATH" ; \ for test in $(PYTESTS) ; do \ diff --git a/python/tests/setup_test.py b/python/tests/setup_test.py index 84f07b18..f893e56e 100644 --- a/python/tests/setup_test.py +++ b/python/tests/setup_test.py @@ -1,7 +1,5 @@ import os import sys -sys.path += ('..', '../.libs') - if hasattr(os, 'add_dll_directory'): os.add_dll_directory(os.path.join(os.getcwd(), '..', '..', '.libs'))