Skip to content

Commit 8587152

Browse files
authored
Use find_package and Python3_EXECUTABLE to work with python venv (#32)
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
1 parent b878758 commit 8587152

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ install(
2525
DESTINATION "${THIRD_PARTY_APP_DST}/josev/iso15118/evcc"
2626
)
2727

28-
find_program(
29-
PYTHON_EXECUTABLE
30-
python3
31-
REQUIRED
32-
)
28+
find_package(Python3 COMPONENTS Interpreter)
3329

3430
ev_create_pip_install_targets(
3531
PACKAGE_NAME
@@ -43,7 +39,7 @@ ev_create_python_wheel_targets(
4339

4440
add_custom_target(iso15118_requirements_pip_install_dist
4541
COMMAND
46-
${PYTHON_EXECUTABLE} -m pip install --force-reinstall -r requirements.txt
42+
${Python3_EXECUTABLE} -m pip install --force-reinstall -r requirements.txt
4743
WORKING_DIRECTORY
4844
${CMAKE_CURRENT_SOURCE_DIR}
4945
COMMENT

0 commit comments

Comments
 (0)