From 16de410cdf925157fd2287b57639510cd88311df Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sat, 17 Feb 2024 00:35:54 +0100 Subject: [PATCH] flush download output --- setup.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 666810c4..4d19eeff 100755 --- a/setup.py +++ b/setup.py @@ -34,12 +34,13 @@ "x64": "64"} def download_check_fail(url, expected_type): + print("download URL:", url, flush=True) response = requests.get(url, allow_redirects=True, timeout=60) if not response.ok: raise RuntimeError("error retrieving "+response.url) if response.headers.get('content-type') != expected_type: print("Warning: invalid content type, expected '{}', got '{}'".format( - expected_type, response.headers.get('content-type'))) + expected_type, response.headers.get('content-type')), flush=True) return response def read_downloadable_archives(package): @@ -86,8 +87,6 @@ def qtc_download_check_extract(cfg, dir_install): for archive_name in archive_names: url_archive = base_url+"/"+archive_name - print("download", url_archive) - content = download_check_fail(url_archive, "application/x-7z-compressed").content if md5sums[archive_name] != hashlib.md5(content).hexdigest(): @@ -162,8 +161,6 @@ def qt_download_check_extract(cfg, dir_install): for package_name, package_version, archive_name in archives_match: url_archive = base_url+'/'+package_name+'/'+package_version+archive_name - print("download", url_archive) - content = download_check_fail(url_archive, "application/x-7z-compressed").content sha1sum = download_check_fail(url_archive+".sha1", "application/x-7z-compressed").text