Revert sudo and six workarounds for virtualenv 20.0.1 issues

Reverts the workarounds added for the Partial-Bug below.
This is to fix issues described in Related-Bug. 

* ensure sudo is not called in ci.centos
* remove patches to fix lp#1862724 
* add python-virtualenv for queens branch centos-7

Partial-Bug: #1862724
Related-Bug: #1863632
Depends-On: https://review.opendev.org/708791
Change-Id: I3d9bd1aa3b498890a2a773a838df78b53d2c30e6
This commit is contained in:
Wes Hayutin 2020-02-17 14:57:47 -07:00 committed by Marios Andreou
parent 8ab3ea04f6
commit a949829391
2 changed files with 2 additions and 9 deletions

View File

@ -40,6 +40,8 @@ python2-pip [platform:fedora-27]
libselinux-python [platform:centos-7] libselinux-python [platform:centos-7]
python-netaddr [platform:centos-7] python-netaddr [platform:centos-7]
python-setuptools [platform:centos-7] python-setuptools [platform:centos-7]
# build-test-packages failing in queens
python-virtualenv [platform:centos-7]
# #
redhat-rpm-config [platform:rpm] redhat-rpm-config [platform:rpm]

View File

@ -127,8 +127,6 @@ install_deps () {
$SETUPTOOLS_PACKAGE \ $SETUPTOOLS_PACKAGE \
$VIRTUALENV_PACKAGE \ $VIRTUALENV_PACKAGE \
$PIP_PACKAGE $PIP_PACKAGE
# workaround for lp #1862941
sudo $(python_cmd) -m pip install -U --force-reinstall "six>=1.14.0"
check_python_module virtualenv &> /dev/null || \ check_python_module virtualenv &> /dev/null || \
PYTHON_PACKAGES+=($VIRTUALENV_PACKAGE) PYTHON_PACKAGES+=($VIRTUALENV_PACKAGE)
@ -177,13 +175,6 @@ install_virtual_env(){
echo "Warning: $OPT_WORKDIR virtualenv already exists, just activating it." echo "Warning: $OPT_WORKDIR virtualenv already exists, just activating it."
else else
echo "Creating virtualenv at $OPT_WORKDIR" echo "Creating virtualenv at $OPT_WORKDIR"
# TODO(chkumar): virtualenv:20.0.1 is broken due to
# https://github.com/pypa/virtualenv/issues/1551 and installing lower version
# will fix the issue. It will be removed in future once it gets fixed.
if [ "$(python_cmd)" != "python3" ]; then
sudo $(python_cmd) -m pip uninstall -y virtualenv
sudo $(python_cmd) -m pip install "virtualenv<20.0.0"
fi
$(python_cmd) -m virtualenv \ $(python_cmd) -m virtualenv \
$( [ "$OPT_SYSTEM_PACKAGES" = 1 ] && printf -- "--system-site-packages\n" )\ $( [ "$OPT_SYSTEM_PACKAGES" = 1 ] && printf -- "--system-site-packages\n" )\
$OPT_WORKDIR $OPT_WORKDIR