Merge "pip-and-virtualenv: drop f31 & tumbleweed, rework suse 15 install"

This commit is contained in:
Zuul 2020-04-23 23:52:10 +00:00 committed by Gerrit Code Review
commit eebb68b385
4 changed files with 25 additions and 10 deletions

View File

@ -130,6 +130,10 @@
Run the default tests on a Xenial build host with Python 3 Run the default tests on a Xenial build host with Python 3
parent: dib-functests-default parent: dib-functests-default
nodeset: ubuntu-xenial nodeset: ubuntu-xenial
vars:
dib_functests_extra:
# Only builds on xenial; should work on focal in future
- pip-and-virtualenv/source-install-opensuse
- job: - job:
name: dib-functests-xenial-python3-image name: dib-functests-xenial-python3-image

View File

@ -6,6 +6,4 @@ fi
set -eu set -eu
set -o pipefail set -o pipefail
for f in $(find $(dirname $0)/../bin/ -type f -executable -print); do install -m 0755 -o root -g root $(dirname $0)/../bin/* /usr/local/bin
install -m 0755 -o root -g root $f /usr/local/bin
done

View File

@ -29,6 +29,10 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then
_clear_old_files=1 _clear_old_files=1
;; ;;
fedora) fedora)
if [[ ${DIB_RELEASE} -gt 30 ]]; then
echo "This element is not supported for this version of Fedora"
exit 1
fi
_do_py3=1 _do_py3=1
packages="python2-virtualenv python2-pip python2-setuptools" packages="python2-virtualenv python2-pip python2-setuptools"
packages=" python3-virtualenv python3-pip python3-setuptools" packages=" python3-virtualenv python3-pip python3-setuptools"
@ -60,14 +64,17 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then
_clear_old_files=1 _clear_old_files=1
;; ;;
15*) 15*)
# XXX: python3? _do_py3=1
packages="python-xml python" _clear_old_files=1
packages+=" python3-virtualenv python3-pip python3-setuptools" # python*-six gets dragged in, and then is a
# distutils package and won't uninstall. put it
# here so it gets cleaned.
packages="python2-virtualenv python2-pip python2-setuptools python2-six"
packages+=" python3-virtualenv python3-pip python3-setuptools python3-six"
;; ;;
tumbleweed) tumbleweed)
### _do_py3=1 echo "This element is not supported for this platform"
packages="python-xml python" exit 1
packages+=" python3-virtualenv python3-pip python3-setuptools"
;; ;;
esac esac
;; ;;
@ -157,8 +164,10 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then
# #
# Thus we need to *reinstall* the RPM version now, so those # Thus we need to *reinstall* the RPM version now, so those
# files come back and system tools continue to work # files come back and system tools continue to work
if [[ $DISTRO_NAME != opensuse ]]; then
dnf reinstall -y python3-setuptools dnf reinstall -y python3-setuptools
fi fi
fi
# now install latest virtualenv. it vendors stuff it needs so # now install latest virtualenv. it vendors stuff it needs so
# doesn't have issues with other system packages. # doesn't have issues with other system packages.

View File

@ -0,0 +1,4 @@
---
upgrade:
- The ``pip-and-virtualenv`` element does not support Fedora 31 (and
greater) or Tumbleweed distributions.