From 0c702c4f9513cf98f8df52d66287a2f23e3154d8 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 1 Mar 2019 17:30:18 -0800 Subject: [PATCH] Additional python version retrieval filter. PiperOrigin-RevId: 236407702 --- tensorflow/tools/ci_build/builds/pip_new.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/tools/ci_build/builds/pip_new.sh b/tensorflow/tools/ci_build/builds/pip_new.sh index fb035624662..f91deaadbb8 100755 --- a/tensorflow/tools/ci_build/builds/pip_new.sh +++ b/tensorflow/tools/ci_build/builds/pip_new.sh @@ -208,7 +208,7 @@ if [[ -z "$PYTHON_BIN_PATH" ]]; then die "Error: PYTHON_BIN_PATH was not provided. Did you run configure?" fi # Get python version for configuring pip later in installation. -PYTHON_VER_CFG=$(${PYTHON_BIN_PATH} -V 2>&1 | awk '{print $2}' | cut -d. -f-2) +PYTHON_VER_CFG=$(${PYTHON_BIN_PATH} -V 2>&1 | awk '{print $2}' | cut -d. -f-2 | cut -c1-3) echo "PYTHON_BIN_PATH: ${PYTHON_BIN_PATH} (version: ${PYTHON_VER_CFG})" # Default values for optional global variables in case they are not user @@ -239,7 +239,7 @@ PIP_WHL_DIR=$(realpath "${PIP_WHL_DIR}") # Get absolute path WHL_PATH="" # Determine the major.minor versions of python being used (e.g., 2.7). # Useful for determining the directory of the local pip installation. -PY_MAJOR_MINOR_VER=$(${PYTHON_BIN_PATH} -V 2>&1 | awk '{print $2}' | cut -d. -f-2) +PY_MAJOR_MINOR_VER=$(${PYTHON_BIN_PATH} -V 2>&1 | awk '{print $2}' | cut -d. -f-2 | cut -c1-3) if [[ -z "${PY_MAJOR_MINOR_VER}" ]]; then die "ERROR: Unable to determine the major.minor version of Python." fi