diff --git a/inc/python b/inc/python index 8941fd038d..9382d352dc 100644 --- a/inc/python +++ b/inc/python @@ -378,12 +378,13 @@ function _setup_package_with_constraints_edit { project_dir=$(cd $project_dir && pwd) if [ -n "$REQUIREMENTS_DIR" ]; then - # Constrain this package to this project directory from here on out. + # Remove this package from constraints before we install it. + # That way, later installs won't "downgrade" the install from + # source we are about to do. local name name=$(awk '/^name.*=/ {print $3}' $project_dir/setup.cfg) $REQUIREMENTS_DIR/.venv/bin/edit-constraints \ - $REQUIREMENTS_DIR/upper-constraints.txt -- $name \ - "$flags file://$project_dir#egg=$name" + $REQUIREMENTS_DIR/upper-constraints.txt -- $name fi setup_package $bindep $project_dir "$flags" $extras diff --git a/lib/tempest b/lib/tempest index fb55931803..e62dce2c9d 100644 --- a/lib/tempest +++ b/lib/tempest @@ -750,9 +750,6 @@ function install_tempest { set_tempest_venv_constraints $tmp_u_c_m tox -r --notest -efull - # TODO: remove the trailing pip constraint when a proper fix - # arrives for bug https://bugs.launchpad.net/devstack/+bug/1906322 - $TEMPEST_DIR/.tox/tempest/bin/pip install -U -r $RC_DIR/tools/cap-pip.txt # NOTE(mtreinish) Respect constraints in the tempest full venv, things that # are using a tox job other than full will not be respecting constraints but # running pip install -U on tempest requirements diff --git a/tools/cap-pip.txt b/tools/cap-pip.txt deleted file mode 100644 index 8ee551b261..0000000000 --- a/tools/cap-pip.txt +++ /dev/null @@ -1 +0,0 @@ -pip<20.3 diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh index 25f726892f..c910a70c5b 100755 --- a/tools/fixup_stuff.sh +++ b/tools/fixup_stuff.sh @@ -192,6 +192,20 @@ function fixup_ovn_centos { yum_install centos-release-openstack-victoria } +function fixup_ubuntu { + if ! is_ubuntu; then + return + 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 + # manifest of what to remove. However, in most cases, simply + # overwriting works. So this hacks around those packages that + # have been dragged in by some other system dependency + sudo rm -rf /usr/lib/python3/dist-packages/PyYAML-*.egg-info +} + function fixup_all { fixup_keystone fixup_ubuntu diff --git a/tools/install_pip.sh b/tools/install_pip.sh index c7bb2c6f55..735de112f7 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -100,9 +100,7 @@ function install_get_pip { die $LINENO "Download of get-pip.py failed" touch $_local_pip.downloaded fi - # TODO: remove the trailing pip constraint when a proper fix - # arrives for bug https://bugs.launchpad.net/devstack/+bug/1906322 - sudo -H -E python${PYTHON3_VERSION} $_local_pip -c $TOOLS_DIR/cap-pip.txt + sudo -H -E python${PYTHON3_VERSION} $_local_pip } @@ -139,11 +137,6 @@ if [[ -n $PYPI_ALTERNATIVE_URL ]]; then configure_pypi_alternative_url fi -# Just use system pkgs on Focal -if [[ "$DISTRO" == focal ]]; then - exit 0 -fi - # Eradicate any and all system packages # Python in fedora/suse depends on the python-pip package so removing it