From f0c12bd4b54eec793cd73e0bf4d07dc2d7fee4ea Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Wed, 24 Jun 2020 07:26:35 +0200 Subject: [PATCH] Further py2 cleanup for Fedora Change-Id: I2433e2ed067f866751bf49983c0a7efce4be8900 --- tools/fixup_stuff.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh index bf31dcbebb..441075ddcb 100755 --- a/tools/fixup_stuff.sh +++ b/tools/fixup_stuff.sh @@ -87,12 +87,6 @@ function fixup_ubuntu { # Python Packages # --------------- -# get_package_path python-package # in import notation -function get_package_path { - local package=$1 - echo $(python -c "import os; import $package; print(os.path.split(os.path.realpath($package.__file__))[0])") -} - function fixup_fedora { if ! is_fedora; then return @@ -130,32 +124,6 @@ function fixup_fedora { fi fi - if [[ "$os_VENDOR" == "Fedora" ]] && [[ "$os_RELEASE" -ge "22" ]]; then - # requests ships vendored version of chardet/urllib3, but on - # fedora these are symlinked back to the primary versions to - # avoid duplication of code on disk. This is fine when - # maintainers keep things in sync, but since devstack takes - # over and installs later versions via pip we can end up with - # incompatible versions. - # - # The rpm package is not removed to preserve the dependent - # packages like cloud-init; rather we remove the symlinks and - # force a re-install of requests so the vendored versions it - # wants are present. - # - # Realted issues: - # https://bugs.launchpad.net/glance/+bug/1476770 - # https://bugzilla.redhat.com/show_bug.cgi?id=1253823 - - base_path=$(get_package_path requests)/packages - if [ -L $base_path/chardet -o -L $base_path/urllib3 ]; then - sudo rm -f $base_path/{chardet,urllib3} - # install requests with the bundled urllib3 to avoid conflicts - pip_install --upgrade --force-reinstall requests - fi - - fi - # Since pip10, pip will refuse to uninstall files from packages # that were created with distutils (rather than more modern # setuptools). This is because it technically doesn't have a