21863: Run piprepo only when building a distro package
[arvados.git] / build / run-library.sh
index 6fdc4aafcd748f97b98ef551578f5c4a9bb624bd..08aa2e5b6728878ec63ef01b3787cbfa667d83d3 100755 (executable)
@@ -717,13 +717,13 @@ fpm_build_virtualenv_worker () {
   if [[ $? -ne 0 ]]; then
     printf "Error, unable to download/build wheel for %s @ %s" "$PKG" "$PKG_DIR"
     exit 1
-  elif ! "$PYTHON_BUILDROOT/venv/bin/piprepo" build "$PYTHON_BUILDROOT/wheelhouse"; then
-    printf "Error, unable to update local wheel repository"
-    exit 1
   fi
 
   if [[ -n "$ONLY_BUILD" ]] && [[ "$PYTHON_PKG" != "$ONLY_BUILD" ]] && [[ "$PKG" != "$ONLY_BUILD" ]]; then
     return 0
+  elif ! "$PYTHON_BUILDROOT/venv/bin/piprepo" build "$PYTHON_BUILDROOT/wheelhouse"; then
+    printf "Error, unable to update local wheel repository"
+    exit 1
   fi
 
   local venv_dir="$PYTHON_BUILDROOT/$PYTHON_PKG"