From 6eb2c5990d738612c4cec34daeb673092303a50a Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 25 Sep 2019 12:51:23 -0700 Subject: [PATCH] Fix six package on opensuse for pip 10 openSUE Leap 15.0 and 15.1 both provide python3-six version 1.11.0. Since version 1.12.0 was released, pip>=10 recognizes the version difference and tries to uninstall the distro-provided version and fails. This change adds another hack to remove the egg-info file for the six library so that pip can manage it directly. We also have to wait to install os-testr until after the fixup has happened since trying to install it triggers the issue. Change-Id: I4649abe06b5893a5251bfcdd4234abccde6ceda2 --- stack.sh | 6 +++--- tools/fixup_stuff.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stack.sh b/stack.sh index 11783fd5bc..b7b37e2cf6 100755 --- a/stack.sh +++ b/stack.sh @@ -796,9 +796,6 @@ if [[ "$OFFLINE" != "True" ]]; then PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:-""} $TOP_DIR/tools/install_pip.sh fi -# Install subunit for the subunit output stream -pip_install -U os-testr - TRACK_DEPENDS=${TRACK_DEPENDS:-False} # Install Python packages into a virtualenv so that we can track them @@ -816,6 +813,9 @@ fi source $TOP_DIR/tools/fixup_stuff.sh fixup_all +# Install subunit for the subunit output stream +pip_install -U os-testr + if [[ "$USE_SYSTEMD" == "True" ]]; then pip_install_gr systemd-python # the default rate limit of 1000 messages / 30 seconds is not diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh index d7b824c048..d2989379fe 100755 --- a/tools/fixup_stuff.sh +++ b/tools/fixup_stuff.sh @@ -256,6 +256,7 @@ function fixup_suse { # overwriting works. So this hacks around those packages that # have been dragged in by some other system dependency sudo rm -rf /usr/lib/python3.6/site-packages/ply-*.egg-info + sudo rm -rf /usr/lib/python3.6/site-packages/six-*.egg-info } # The version of pip(1.5.4) supported by python-virtualenv(1.11.4) has