Skip to content

Commit

Permalink
Prepend to PYTHONPATH in tests
Browse files Browse the repository at this point in the history
Preserve the existing PYTHONPATH by prepending
instead of replacing.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored Nov 11, 2024
1 parent 990f1c2 commit 0e29348
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ if (BUILD_TESTING)
endif()

set(_env_vars)
list(APPEND _env_vars "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/")
list(APPEND _env_vars "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/:$ENV{PYTHONPATH}")
list(APPEND _env_vars "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}:$ENV{LD_LIBRARY_PATH}")
set_tests_properties(${test} PROPERTIES
ENVIRONMENT "${_env_vars}")
Expand Down

0 comments on commit 0e29348

Please sign in to comment.