21863: Remove test scripts for Red Hat SCL python36 packages
[arvados.git] / build / run-build-packages-python-and-ruby.sh
index f255307607c492468f567e7f649c6dcd0818b919..141435a3a2d0c795b66912b0c0e6768d0015b3e7 100755 (executable)
@@ -51,12 +51,19 @@ gem_wrapper() {
 
 handle_python_package () {
   # This function assumes the current working directory is the python package directory
-  if [ -n "$(find dist -name "*-$(nohash_version_from_git).tar.gz" -print -quit)" ]; then
+  local -a pkg_fmts=()
+  local version="$(nohash_version_from_git)"
+  if [[ -z "$(find dist -name "*-$version.tar.gz" -print -quit)" ]]; then
+    pkg_fmts+=(sdist)
+  fi
+  if [[ -z "$(find dist -name "*-$version-py*.whl" -print -quit)" ]]; then
+    pkg_fmts+=(bdist_wheel)
+  fi
+  if [[ "${#pkg_fmts[@]}" -eq 0 ]]; then
     echo "This package doesn't need rebuilding."
-    return
+  else
+    python3 setup.py $DASHQ_UNLESS_DEBUG "${pkg_fmts[@]}"
   fi
-  # Make sure only to use sdist - that's the only format pip can deal with (sigh)
-  python3 setup.py $DASHQ_UNLESS_DEBUG sdist
 }
 
 python_wrapper() {
@@ -165,13 +172,6 @@ if [ $RUBY -eq 0 ] && [ $PYTHON -eq 0 ]; then
   exit 0
 fi
 
-if [[ -f /etc/profile.d/rvm.sh ]]; then
-    source /etc/profile.d/rvm.sh
-    GEM="rvm-exec default gem"
-else
-    GEM=gem
-fi
-
 # Make all files world-readable -- jenkins runs with umask 027, and has checked
 # out our git tree here
 chmod o+r "$WORKSPACE" -R
@@ -203,6 +203,8 @@ if [ $PYTHON -eq 1 ]; then
   python_wrapper arvados-python-client "$WORKSPACE/sdk/python"
   python_wrapper arvados-cwl-runner "$WORKSPACE/sdk/cwl"
   python_wrapper arvados_fuse "$WORKSPACE/services/fuse"
+  python_wrapper crunchstat_summary "$WORKSPACE/tools/crunchstat-summary"
+  python_wrapper arvados-user-activity "$WORKSPACE/tools/user-activity"
 
   if [ $((${#failures[@]} - $GEM_BUILD_FAILURES)) -ne 0 ]; then
     PYTHON_BUILD_FAILURES=$((${#failures[@]} - $GEM_BUILD_FAILURES))