Skip to content

Commit f0c12bd

Browse files
committed
Further py2 cleanup for Fedora
Change-Id: I2433e2ed067f866751bf49983c0a7efce4be8900
1 parent b9fe9c7 commit f0c12bd

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

tools/fixup_stuff.sh

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ function fixup_ubuntu {
8787
# Python Packages
8888
# ---------------
8989

90-
# get_package_path python-package # in import notation
91-
function get_package_path {
92-
local package=$1
93-
echo $(python -c "import os; import $package; print(os.path.split(os.path.realpath($package.__file__))[0])")
94-
}
95-
9690
function fixup_fedora {
9791
if ! is_fedora; then
9892
return
@@ -130,32 +124,6 @@ function fixup_fedora {
130124
fi
131125
fi
132126

133-
if [[ "$os_VENDOR" == "Fedora" ]] && [[ "$os_RELEASE" -ge "22" ]]; then
134-
# requests ships vendored version of chardet/urllib3, but on
135-
# fedora these are symlinked back to the primary versions to
136-
# avoid duplication of code on disk. This is fine when
137-
# maintainers keep things in sync, but since devstack takes
138-
# over and installs later versions via pip we can end up with
139-
# incompatible versions.
140-
#
141-
# The rpm package is not removed to preserve the dependent
142-
# packages like cloud-init; rather we remove the symlinks and
143-
# force a re-install of requests so the vendored versions it
144-
# wants are present.
145-
#
146-
# Realted issues:
147-
# https://bugs.launchpad.net/glance/+bug/1476770
148-
# https://bugzilla.redhat.com/show_bug.cgi?id=1253823
149-
150-
base_path=$(get_package_path requests)/packages
151-
if [ -L $base_path/chardet -o -L $base_path/urllib3 ]; then
152-
sudo rm -f $base_path/{chardet,urllib3}
153-
# install requests with the bundled urllib3 to avoid conflicts
154-
pip_install --upgrade --force-reinstall requests
155-
fi
156-
157-
fi
158-
159127
# Since pip10, pip will refuse to uninstall files from packages
160128
# that were created with distutils (rather than more modern
161129
# setuptools). This is because it technically doesn't have a

0 commit comments

Comments
 (0)