From: Kefu Chai Date: Wed, 4 Aug 2021 16:55:12 +0000 (+0800) Subject: tools/setup-virtualenv: do not use wheel if wheelhouse does not exist X-Git-Tag: v17.1.0~1133^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=586ac824f2cf05bb5301fd139aa744a2902c75f9;p=ceph.git 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 --- 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