X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ba8df2612ce43c906f181721695644ead5355e93..d9506e8ac1add07732c64ca923468465ca96007b:/build/run-build-packages-python-and-ruby.sh diff --git a/build/run-build-packages-python-and-ruby.sh b/build/run-build-packages-python-and-ruby.sh index 285bb11d71..141435a3a2 100755 --- a/build/run-build-packages-python-and-ruby.sh +++ b/build/run-build-packages-python-and-ruby.sh @@ -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() {