11#[[ Generate common python virtual enviornment ]]
2- # NOTE find_package try to use at least python3.8 as follows depending on platform version
3- # Ubuntu18.04; explictly installed python3.8 (default is python3.6)
4- # Ubuntu20.04; default python3.8
2+ # NOTE find_package try to use at least python3.10 as follows depending on platform version
3+ # Ubuntu20.04; explictly installed python3.10 (default is python3.8)
54# Ubuntu22.04; default python3.10
65# Ubuntu24.04; default python3.12
76# refer https://github.com/Samsung/ONE/issues/9962
8- # find python 3.8 or above
9- find_package (Python 3.8 EXACT COMPONENTS Interpreter QUIET )
7+ # refer https://github.com/Samsung/ONE/issues/15226
8+ # find python 3.10 or above
9+ find_package (Python 3.10 EXACT COMPONENTS Interpreter QUIET )
1010if (NOT Python_FOUND)
11- find_package (Python 3.8 COMPONENTS Interpreter QUIET )
11+ find_package (Python 3.10 COMPONENTS Interpreter QUIET )
1212endif ()
1313
1414if (NOT Python_Interpreter_FOUND)
1515 message (STATUS "Build common-artifacts: FAILED (Python3 is missing)" )
1616 return ()
1717endif ()
1818
19- if (Python_VERSION VERSION_LESS 3.8)
20- message (STATUS "Build common-artifacts: FAILED (Need Python version 3.8 or higher)" )
21- return ()
22- endif ()
23-
24- # NOTE assume only use 3.8.x or 3.10.x or 3.12.x
25- if ((Python_VERSION VERSION_GREATER_EQUAL 3.8) AND (Python_VERSION VERSION_LESS 3.9))
26- set (PYTHON_VERSION_MINOR 8)
27- elseif ((Python_VERSION VERSION_GREATER_EQUAL 3.10) AND (Python_VERSION VERSION_LESS 3.11))
19+ # NOTE assume only use 3.10.x or 3.12.x
20+ if ((Python_VERSION VERSION_GREATER_EQUAL 3.10) AND (Python_VERSION VERSION_LESS 3.11))
2821 set (PYTHON_VERSION_MINOR 10)
2922elseif ((Python_VERSION VERSION_GREATER_EQUAL 3.12) AND (Python_VERSION VERSION_LESS 3.13))
3023 set (PYTHON_VERSION_MINOR 12)
@@ -49,8 +42,8 @@ set(REQUIREMENTS_FILE "requirements.txt")
4942set (REQUIREMENTS_OVERLAY_PATH "${VIRTUALENV_OVERLAY} /${REQUIREMENTS_FILE} " )
5043
5144set (PYTHON_OVERLAY python3)
52- if (PYTHON_EXECUTABLE MATCHES python3.8 )
53- set (PYTHON_OVERLAY python3.8 )
45+ if (PYTHON_EXECUTABLE MATCHES python3.10 )
46+ set (PYTHON_OVERLAY python3.10 )
5447endif ()
5548
5649# NOTE when using behind proxy with self signed certificate, need to set '--trusted-host' options
0 commit comments