Commit 86b7fac
Fix Python test PYTHONPATH: use ENVIRONMENT_MODIFICATION instead of ENVIRONMENT (#584)
* Fix Python test PYTHONPATH: use ENVIRONMENT_MODIFICATION instead of ENVIRONMENT
The Python test environment setup in python/CMakeLists.txt uses
set_tests_properties(... ENVIRONMENT "PYTHONPATH=...") which overwrites
any PYTHONPATH set in the shell environment and bakes CMAKE_INSTALL_PREFIX
paths that don't exist at test time (before install).
Replace with ENVIRONMENT_MODIFICATION using path_list_prepend (CMake 3.22+)
to prepend CMAKE_BINARY_DIR/lib to PYTHONPATH and LD_LIBRARY_PATH at
test-execution time, preserving any paths already set in the environment.
Signed-off-by: Taylor Howard <taylorhoward@me.com>
Generated-by: Claude <noreply@anthropic.com>
(cherry picked from commit ca96b71)1 parent 353496f commit 86b7fac
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
0 commit comments