From 7603e2b7ce9be7feb1ab564c305fefd7ded15e17 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 3 Apr 2021 23:14:59 +0200 Subject: [PATCH] Another attempt to fix httpbin in Travis CI Trusty build Somehow installing decorator==4.4.2 worked a few times, but then stopped and now fails with Could not find a version that satisfies the requirement decorator==4.4.2 (from versions: ) No matching distribution found for decorator==4.4.2 Try using explicit URL. --- build/tools/travis-ci.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index ab8563d5df..4e46db6ca1 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -26,13 +26,21 @@ launch_httpbin() { # version there is too old to support SNI. case "$dist_codename" in trusty) - pip_args='--trusted-host files.pythonhosted.org' + # Here "decorator==4.4.2" doesn't work neither for some reason ("no + # matching distribution found"), so use an explicit URL. + pip_decorator_arg='https://files.pythonhosted.org/packages/ed/1b/72a1821152d07cf1d8b6fce298aeb06a7eb90f4d6d41acec9861e7cc6df0/decorator-4.4.2-py2.py3-none-any.whl' + pip_options='--trusted-host files.pythonhosted.org' + ;; + + *) + # Current decorator (>= 5) is incompatible with Python 2 which we + # still use under in some builds, so explicitly use a version which + # is known to work. + pip_decorator_arg='decorator==4.4.2' ;; esac - # 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 + pip install $pip_decorator_arg httpbin --user $pip_options python -m httpbin.core & WX_TEST_WEBREQUEST_URL="http://localhost:5000"