Skip to content

Commit 57a868d

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Revert "Workaround for new pip 20.3 behavior""
2 parents 26bd94b + 6b9a564 commit 57a868d

5 files changed

Lines changed: 20 additions & 15 deletions

File tree

inc/python

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,13 @@ function _setup_package_with_constraints_edit {
378378
project_dir=$(cd $project_dir && pwd)
379379

380380
if [ -n "$REQUIREMENTS_DIR" ]; then
381-
# Constrain this package to this project directory from here on out.
381+
# Remove this package from constraints before we install it.
382+
# That way, later installs won't "downgrade" the install from
383+
# source we are about to do.
382384
local name
383385
name=$(awk '/^name.*=/ {print $3}' $project_dir/setup.cfg)
384386
$REQUIREMENTS_DIR/.venv/bin/edit-constraints \
385-
$REQUIREMENTS_DIR/upper-constraints.txt -- $name \
386-
"$flags file://$project_dir#egg=$name"
387+
$REQUIREMENTS_DIR/upper-constraints.txt -- $name
387388
fi
388389

389390
setup_package $bindep $project_dir "$flags" $extras

lib/tempest

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,6 @@ function install_tempest {
709709
set_tempest_venv_constraints $tmp_u_c_m
710710

711711
tox -r --notest -efull
712-
# TODO: remove the trailing pip constraint when a proper fix
713-
# arrives for bug https://bugs.launchpad.net/devstack/+bug/1906322
714-
$TEMPEST_DIR/.tox/tempest/bin/pip install -U -r $RC_DIR/tools/cap-pip.txt
715712
# NOTE(mtreinish) Respect constraints in the tempest full venv, things that
716713
# are using a tox job other than full will not be respecting constraints but
717714
# running pip install -U on tempest requirements

tools/cap-pip.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

tools/fixup_stuff.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,23 @@ function fixup_ovn_centos {
155155
yum_install centos-release-openstack-victoria
156156
}
157157

158+
function fixup_ubuntu {
159+
if ! is_ubuntu; then
160+
return
161+
fi
162+
163+
# Since pip10, pip will refuse to uninstall files from packages
164+
# that were created with distutils (rather than more modern
165+
# setuptools). This is because it technically doesn't have a
166+
# manifest of what to remove. However, in most cases, simply
167+
# overwriting works. So this hacks around those packages that
168+
# have been dragged in by some other system dependency
169+
sudo rm -rf /usr/lib/python3/dist-packages/PyYAML-*.egg-info
170+
}
171+
158172
function fixup_all {
159173
fixup_keystone
174+
fixup_ubuntu
160175
fixup_fedora
161176
fixup_suse
162177
}

tools/install_pip.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ function install_get_pip {
9191
die $LINENO "Download of get-pip.py failed"
9292
touch $LOCAL_PIP.downloaded
9393
fi
94-
# TODO: remove the trailing pip constraint when a proper fix
95-
# arrives for bug https://bugs.launchpad.net/devstack/+bug/1906322
96-
sudo -H -E python${PYTHON3_VERSION} $LOCAL_PIP -c $TOOLS_DIR/cap-pip.txt
94+
sudo -H -E python${PYTHON3_VERSION} $LOCAL_PIP
9795
}
9896

9997

@@ -130,11 +128,6 @@ if [[ -n $PYPI_ALTERNATIVE_URL ]]; then
130128
configure_pypi_alternative_url
131129
fi
132130

133-
# Just use system pkgs on Focal
134-
if [[ "$DISTRO" == focal ]]; then
135-
exit 0
136-
fi
137-
138131
# Eradicate any and all system packages
139132

140133
# Python in fedora/suse depends on the python-pip package so removing it

0 commit comments

Comments
 (0)