From 35cb784452504a977b96174a8d4c8fc0f766fabe Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 20 Oct 2022 11:15:51 +0530 Subject: [PATCH] See if using python instead of curl bypasses the windows CI failure --- setup/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup/__init__.py b/setup/__init__.py index d5689cdf83..84fcab0a4e 100644 --- a/setup/__init__.py +++ b/setup/__init__.py @@ -69,6 +69,10 @@ def download_securely(url): # We use curl here as on some OSes (OS X) when bootstrapping calibre, # python will be unable to validate certificates until after cacerts is # installed + if os.environ.get('CI') and iswindows: + # curl is failing for wikipedia urls on CI (used for browser_data) + from urllib.request import urlopen + return urlopen(url).read() if not curl_supports_etags(): return subprocess.check_output(['curl', '-fsSL', url]) url_hash = hashlib.sha1(url.encode('utf-8')).hexdigest()