From 6aac8fcf1f49332ccfd711c236ea7fa0d32aa60a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 3 Apr 2021 19:36:44 +0200 Subject: [PATCH 1/2] Don't use lsb_release under non-Linux platforms in Travis script Avoid the error about command not being found. --- build/tools/travis-ci.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index bc5a52abee..18f9eb71ef 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -16,9 +16,15 @@ launch_httpbin() { echo 'travis_fold:start:httpbin' echo 'Running httpbin...' + case "$(uname -s)" in + Linux) + dist_codename=$(lsb_release --codename --short) + ;; + esac + # We need to disable SSL certificate checking under Trusty because Python # version there is too old to support SNI. - case "$(lsb_release --codename --short)" in + case "$dist_codename" in trusty) pip_args='--trusted-host files.pythonhosted.org' ;; From b78508615aba31fa1f9e68460c1713e6ae48d4e3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 3 Apr 2021 19:41:55 +0200 Subject: [PATCH 2/2] Explicitly install decorator 4.4.2 as httpbin dependency The latest version doesn't work with Python 2 any more and installing it breaks Travis CI builds still using Python 2. --- build/tools/travis-ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 18f9eb71ef..ab8563d5df 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -30,7 +30,9 @@ launch_httpbin() { ;; esac - pip install httpbin --user $pip_args + # decorator 5+ is incompatible with Python 2 which we still use under in + # some builds, so explicitly select version 4.4 which is known to work. + pip install decorator==4.4.2 httpbin --user $pip_args python -m httpbin.core & WX_TEST_WEBREQUEST_URL="http://localhost:5000"