From: Kefu Chai Date: Sat, 10 Nov 2018 21:33:43 +0000 (-0800) Subject: install-deps: install setuptools before upgrading virtualenv X-Git-Tag: v13.2.7~139^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5a0003b938d109c0bf37d5432bead51ac632edfc;p=ceph.git install-deps: install setuptools before upgrading virtualenv this should address the failures when running install-deps.sh, like Downloading/unpacking virtualenv Running setup.py egg_info for package virtualenv /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) error in virtualenv setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers. Complete output from command python setup.py egg_info: /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) error in virtualenv setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers. this only happens on very old virtualenv shipped with RHEL7.4 Signed-off-by: Kefu Chai (cherry picked from commit 95386752ab2635f56e1d38b50de7144e2135b323) --- diff --git a/install-deps.sh b/install-deps.sh index 84c5d130753e..7d0d49e932fb 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -318,6 +318,9 @@ function activate_virtualenv() { # because CentOS 7 has a buggy old version (v1.10.1) # https://github.com/pypa/virtualenv/issues/463 virtualenv ${env_dir}_tmp + # install setuptools before upgrading virtualenv, as the latter needs + # a recent setuptools for setup commands like `extras_require`. + ${env_dir}_tmp/bin/pip install --upgrade setuptools ${env_dir}_tmp/bin/pip install --upgrade virtualenv ${env_dir}_tmp/bin/virtualenv --python $interpreter $env_dir rm -rf ${env_dir}_tmp