From cfa6b9ae4986bf5ced2f8f197719fc78152a83f9 Mon Sep 17 00:00:00 2001 From: eeldill Date: Wed, 2 May 2018 14:36:01 +0200 Subject: [PATCH] Fix sphinx-docs job for stable branch build-openstack-sphinx-docs jobs fail on stable branches due to the new pip version 10 introduces some previously Warning as Error: in case of calling "pip install" without any package name, the command fails. tox_install.sh is called during docs job without any package passed to pip. Change-Id: I860a8776bb32e8e05abd914110ca8df24d869bd2 --- doc/source/conf.py | 2 +- tools/tox_install.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 2d26f1f6..c04e7e70 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -64,7 +64,7 @@ copyright = u'%s, OpenStack Foundation' % datetime.date.today().year # The short X.Y version. version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'], stdout=subprocess.PIPE).stdout.read() -version = version.strip() +version = str(version).strip() # The full version, including alpha/beta/rc tags. release = version diff --git a/tools/tox_install.sh b/tools/tox_install.sh index e61b63a8..05c58b33 100755 --- a/tools/tox_install.sh +++ b/tools/tox_install.sh @@ -26,5 +26,10 @@ pip install -c"$localfile" openstack-requirements # install will be constrained and we need to unconstrain it. edit-constraints "$localfile" -- "$CLIENT_NAME" +if [ -z "$@" ]; then + echo "No packages to be installed." + exit 0 +fi + pip install -c"$localfile" -U "$@" exit $?