--- glusterfs-5.0rc0/configure.ac.orig 2018-09-24 12:44:51.547254900 -0400 +++ glusterfs-5.0rc0/configure.ac 2018-09-24 12:55:49.464254900 -0400 @@ -629,12 +629,14 @@ *) if test -x /usr/bin/python3; then PYTHON=/usr/bin/python3 - else + fi + if test -x /usr/bin/python2; then PYTHON=/usr/bin/python2 fi ;; esac fi + AM_PATH_PYTHON([2.6],,[:]) if test -n "${PYTHON}"; then have_python=yes @@ -1688,13 +1690,16 @@ pushd $(dirname $0) &> /dev/null if test ! -e python-shebangs; then - touch python-shebangs - if test "x${PYTHON}" = "x/usr/bin/python2"; then - echo "fixing python shebangs..." - for f in api events extras geo-replication libglusterfs tests tools xlators; do - find $f -type f -exec sed -i 's|/usr/bin/python3|/usr/bin/python2|' {} \; - done - echo "...done" + dnl koji's mock buildSRPMFromSCM subtask run's configure, with + if test -n "${PYTHON}"; then + touch python-shebangs + if test "x${PYTHON}" = "x/usr/bin/python2"; then + echo "fixing python shebangs..." + for f in api events extras geo-replication libglusterfs tests tools xlators; do + find $f -type f -exec sed -i 's|/usr/bin/python3|/usr/bin/python2|' {} \; + done + echo "...done" + fi fi fi popd &> /dev/null