--- tests/python/CMakeLists.txt.orig	2018-11-05 06:22:25
+++ tests/python/CMakeLists.txt	2023-01-14 10:18:36
@@ -37,7 +37,7 @@
   STRING(REPLACE ".py" "_Python" _tst_name ${_s})
   FILE(COPY ${_s} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   ADD_TEST(NAME ${_tst_name}
-           COMMAND "/usr/bin/env" "PYTHONPATH=${PROJECT_BINARY_DIR}/python" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/${_s}")
+           COMMAND "/usr/bin/env" "DYLD_LIBRARY_PATH=__MACPORTS_DYLD_LIBRARY_PATH__" "PYTHONPATH=${PROJECT_BINARY_DIR}/python" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/${_s}")
 ENDFOREACH()
 
 INSTALL(FILES ${_to_install} DESTINATION bin/testpy)