Skip to content

Commit

Permalink
Use python executable variable instead of hardcode python3 (#239)
Browse files Browse the repository at this point in the history
* Use python interpreter instead of hardcode python3
* Use previous PythonInterp instead of Python3

Signed-off-by: Jose Luis Rivero <[email protected]>

* find python version 3

Signed-off-by: Steve Peters <[email protected]>

Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
j-rivero and scpeters authored Sep 18, 2021
1 parent e311b3b commit e431c4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if (SWIG_FOUND)

########################################
# Include python
find_package(PythonInterp 3 REQUIRED) # change to Python3 when Bionic is EOL
find_package(PythonLibs QUIET)
if (NOT PYTHONLIBS_FOUND)
message (STATUS "Searching for Python - not found.")
Expand Down
2 changes: 1 addition & 1 deletion src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if (PYTHONLIBS_FOUND)

foreach (test ${python_tests})
add_test(NAME ${test}.py COMMAND
python3 ${CMAKE_SOURCE_DIR}/src/python/${test}.py)
"${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/src/python/${test}.py")

set(_env_vars)
list(APPEND _env_vars "PYTHONPATH=${FAKE_INSTALL_PREFIX}/lib/python/")
Expand Down

0 comments on commit e431c4a

Please sign in to comment.