21863: Remove test scripts for Red Hat SCL python36 packages
[arvados.git] / build / run-build-packages-python-and-ruby.sh
index 871641fcdb3ab6c0ececc85947c631719c76d8aa..141435a3a2d0c795b66912b0c0e6768d0015b3e7 100755 (executable)
@@ -6,7 +6,6 @@
 COLUMNS=80
 
 . `dirname "$(readlink -f "$0")"`/run-library.sh
-#. `dirname "$(readlink -f "$0")"`/libcloud-pin.sh
 
 read -rd "\000" helpmessage <<EOF
 $(basename $0): Build Arvados Python packages and Ruby gems
@@ -50,6 +49,23 @@ gem_wrapper() {
   title "End of $gem_name gem build (`timer`)"
 }
 
+handle_python_package () {
+  # This function assumes the current working directory is the python package directory
+  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."
+  else
+    python3 setup.py $DASHQ_UNLESS_DEBUG "${pkg_fmts[@]}"
+  fi
+}
+
 python_wrapper() {
   local package_name="$1"; shift
   local package_directory="$1"; shift
@@ -156,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