]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/setup-virtualenv: do not use wheel if wheelhouse does not exist 42657/head
authorKefu Chai <kchai@redhat.com>
Wed, 4 Aug 2021 16:55:12 +0000 (00:55 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 5 Aug 2021 09:51:17 +0000 (17:51 +0800)
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 <kchai@redhat.com>
src/tools/setup-virtualenv.sh

index e9a1c6ddfbe4db774e95f8832b70f20b718937b1..0ec89af8e043ab10ca92117f235e49a411209368 100755 (executable)
@@ -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