From 7af99a4a4dbd91fbffea83b749e0a86a915187fe Mon Sep 17 00:00:00 2001 From: Yifei Feng Date: Sun, 3 Mar 2019 21:32:13 -0800 Subject: [PATCH] Pin auditwheel to 1.5.0 for virtualenv. PiperOrigin-RevId: 236587064 --- tensorflow/tools/ci_build/builds/pip_new.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tensorflow/tools/ci_build/builds/pip_new.sh b/tensorflow/tools/ci_build/builds/pip_new.sh index 0b243aa4782..acb3263df53 100755 --- a/tensorflow/tools/ci_build/builds/pip_new.sh +++ b/tensorflow/tools/ci_build/builds/pip_new.sh @@ -664,7 +664,10 @@ for WHL_PATH in $(ls ${PIP_WHL_DIR}/${PROJECT_NAME}*.whl); do # Repair the wheels for cpu manylinux1 echo "auditwheel repairing ${WHL_PATH}" pip show auditwheel - sudo pip3 install auditwheel==1.5.0 + # If in virtualenv, re-pin auditwheel to version 1.5.0 + if [ $(python -c 'import sys; print ("1" if hasattr(sys, "real_prefix") else "0")') == "1" ]; then + pip install auditwheel==1.5.0 + fi auditwheel --version auditwheel repair -w "${WHL_DIR}" "${WHL_PATH}"