[libxslt] Set library path when running Python tests



commit fc3601b9062453b7062560ebd3cdb5ecacadea8b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Aug 29 20:44:20 2022 +0200

    Set library path when running Python tests
    
    Copied from libxml2.
    
    Should fix #75.

 python/tests/Makefile.am | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index c633ce66..64b4ec5c 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -9,11 +9,16 @@ exampledir = $(docdir)/python/examples
 dist_example_DATA = test.xml test.xsl pyxsltproc.py $(TESTSPY)
 
 tests: $(TESTSPY)
-       @(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
+       @(export PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH"; \
+         export 
LD_LIBRARY_PATH="$(top_builddir)/libxslt/.libs:$(top_builddir)/libexslt/.libs:$$LD_LIBRARY_PATH"; \
+         export 
DYLD_LIBRARY_PATH="$(top_builddir)/libxslt/.libs:$(top_builddir)/libexslt/.libs:$$DYLD_LIBRARY_PATH"; \
+         export PATH="$(top_builddir)/libxslt/.libs:$(top_builddir)/libexslt/.libs:$$PATH" ; \
          if test "x$(LIBXML_SRC)" != "x" ; then \
-            PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; \
+            PYTHONPATH="$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs:$$PYTHONPATH"; \
+           LD_LIBRARY_PATH="$(LIBXML_SRC)/.libs:$$LD_LIBRARY_PATH"; \
+           DYLD_LIBRARY_PATH="$(LIBXML_SRC)/.libs:$$DYLD_LIBRARY_PATH"; \
+           PATH="$(LIBXML_SRC)/.libs:$$PATH" ; \
           fi; \
-         export PYTHONPATH; \
          for test in $(TESTSPY) ; do \
            echo "-- $$test" ; \
            (cd $(srcdir) && $(PYTHON) $$test ) || exit 1; \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]