From 24af50f18282c6a36fb190309188225db60260fe Mon Sep 17 00:00:00 2001 From: SaeHie Park Date: Tue, 17 Jun 2025 06:42:15 +0900 Subject: [PATCH] [one-cmds] Tidy python3.8 support This will tidy one-prepare-venv with Ubuntu18.04 python3.8 support. ONE-DCO-1.0-Signed-off-by: SaeHie Park --- compiler/one-cmds/one-prepare-venv | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/compiler/one-cmds/one-prepare-venv b/compiler/one-cmds/one-prepare-venv index b8331b89ca8..d40d621cd2c 100644 --- a/compiler/one-cmds/one-prepare-venv +++ b/compiler/one-cmds/one-prepare-venv @@ -14,11 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTE check if we can use python3.8 for Ubuntu 18.04. -# use +e as python3.8 may not exist in the system and 'command' will return error. +# NOTE check if we can use python3.10 for Ubuntu 20.04. +# use +e as python3.10 may not exist in the system and 'command' will return error. set +e -PYTHON_CANDIDATES=("python3.12" "python3.10" "python3.8" "python3") +PYTHON_CANDIDATES=("python3.12" "python3.10" "python3") for py in "${PYTHON_CANDIDATES[@]}"; do PYTHON3_EXEC=$(command -v "$py") if [[ -n "${PYTHON3_EXEC}" ]]; then @@ -70,9 +70,7 @@ VER_NUMPY=1.24.3 PYTHON_VER=$(${PYTHON3_EXEC} -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')" ) echo "Setting package version for python $PYTHON_VER" -if [[ "$PYTHON_VER" == "3.8" ]]; then - : # use as is -elif [[ "$PYTHON_VER" == "3.10" ]]; then +if [[ "$PYTHON_VER" == "3.10" ]]; then : # TODO change vesions elif [[ "$PYTHON_VER" == "3.12" ]]; then : # TODO change vesions