From ee5a8096bdbd443fb00442d4b054a5e8dda1bf91 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Apr 2021 01:53:29 +0200 Subject: [PATCH] Install pip if it's not available at all This is not supposed to happen, but somehow it does on Travis CI, so try to remedy this by installing pip via apt if it's missing. --- build/tools/httpbin.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tools/httpbin.sh b/build/tools/httpbin.sh index 8ea0587a7b..b64609a411 100644 --- a/build/tools/httpbin.sh +++ b/build/tools/httpbin.sh @@ -37,6 +37,11 @@ httpbin_launch() { # Elsewhere just use Python 3. PY3=3 + # Ensure that we have at least some version of pip. + if ! python3 -m pip; then + sudo apt-get -q -o=Dpkg::Use-Pty=0 install python3-pip + fi + # Running pip install fails with weird errors out of the box when # using old pip version because it attempts to use python rather # than python3, so upgrade it to fix this.