Browse Source

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

tags/2.36.0
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
eebb68b385
4 changed files with 25 additions and 10 deletions
  1. +4
    -0
      .zuul.d/jobs.yaml
  2. +1
    -3
      diskimage_builder/elements/install-bin/pre-install.d/01-install-bin
  3. +16
    -7
      diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip
  4. +4
    -0
      releasenotes/notes/pip-and-virtualenv-platform-removal-52e0d6a22829a3b2.yaml

+ 4
- 0
.zuul.d/jobs.yaml View File

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

- job:
name: dib-functests-xenial-python3-image


+ 1
- 3
diskimage_builder/elements/install-bin/pre-install.d/01-install-bin View File

@@ -6,6 +6,4 @@ fi
set -eu
set -o pipefail

for f in $(find $(dirname $0)/../bin/ -type f -executable -print); do
install -m 0755 -o root -g root $f /usr/local/bin
done
install -m 0755 -o root -g root $(dirname $0)/../bin/* /usr/local/bin

+ 16
- 7
diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip View File

@@ -29,6 +29,10 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then
_clear_old_files=1
;;
fedora)
if [[ ${DIB_RELEASE} -gt 30 ]]; then
echo "This element is not supported for this version of Fedora"
exit 1
fi
_do_py3=1
packages="python2-virtualenv python2-pip python2-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
;;
15*)
# XXX: python3?
packages="python-xml python"
packages+=" python3-virtualenv python3-pip python3-setuptools"
_do_py3=1
_clear_old_files=1
# 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)
### _do_py3=1
packages="python-xml python"
packages+=" python3-virtualenv python3-pip python3-setuptools"
echo "This element is not supported for this platform"
exit 1
;;
esac
;;
@@ -157,7 +164,9 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then
#
# Thus we need to *reinstall* the RPM version now, so those
# files come back and system tools continue to work
dnf reinstall -y python3-setuptools
if [[ $DISTRO_NAME != opensuse ]]; then
dnf reinstall -y python3-setuptools
fi
fi

# now install latest virtualenv. it vendors stuff it needs so


+ 4
- 0
releasenotes/notes/pip-and-virtualenv-platform-removal-52e0d6a22829a3b2.yaml View File

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

Loading…
Cancel
Save