From 586ac824f2cf05bb5301fd139aa744a2902c75f9 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 5 Aug 2021 00:55:12 +0800 Subject: [PATCH] tools/setup-virtualenv: do not use wheel if wheelhouse does not exist some times, developer does not use install-deps.sh to prepare the wheel at all. in that case, just do not pass the wheelhouse options to pip. this helps to silence the pip warnings complaining that the wheelhouse does not exist. Signed-off-by: Kefu Chai --- src/tools/setup-virtualenv.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tools/setup-virtualenv.sh b/src/tools/setup-virtualenv.sh index e9a1c6ddfbe4..0ec89af8e043 100755 --- a/src/tools/setup-virtualenv.sh +++ b/src/tools/setup-virtualenv.sh @@ -77,10 +77,11 @@ else fi if test -d wheelhouse ; then - export NO_INDEX=--no-index + NO_INDEX=--no-index + FIND_LINKS_OPT=--find-links=file://$(pwd)/wheelhouse fi -pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse 'tox >=2.9.1' +pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX $FIND_LINKS_OPT 'tox >=2.9.1' require_files=$(ls *requirements*.txt 2>/dev/null) || true constraint_files=$(ls *constraints*.txt 2>/dev/null) || true @@ -90,7 +91,8 @@ md5=wheelhouse/md5 if test "$require"; then if ! test -f $md5 || ! md5sum -c wheelhouse/md5 > /dev/null; then NO_INDEX='' + FIND_LINKS_OPT='' fi - pip --exists-action i $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX \ - --find-links=file://$(pwd)/wheelhouse $require $constraint + pip --exists-action i $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install \ + $NO_INDEX $FIND_LINKS_OPT $require $constraint fi -- 2.47.3